Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TY
TianYing_ty100
Commits
c04903d0
Commit
c04903d0
authored
Sep 03, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:增加段码强制刷新策略
parent
ecadc495
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
BU98R10.c
Firmware/Source/Component/BU98R10/BU98R10.c
+19
-16
No files found.
Firmware/Source/Component/BU98R10/BU98R10.c
View file @
c04903d0
...
@@ -275,6 +275,7 @@ BU98R10DDRAMUnion BU98R10Chip1DDRAMBackup;
...
@@ -275,6 +275,7 @@ BU98R10DDRAMUnion BU98R10Chip1DDRAMBackup;
#endif
#endif
BU98R10UpdateCtrlStruct
BU98R10Update
;
BU98R10UpdateCtrlStruct
BU98R10Update
;
uint32_t
u32BU98R10ForcedUpdate
=
0UL
;
void
BU98R10_Init
(
void
)
void
BU98R10_Init
(
void
)
{
{
...
@@ -283,6 +284,8 @@ void BU98R10_Init(void)
...
@@ -283,6 +284,8 @@ void BU98R10_Init(void)
#if BU98R10_WRITE_AT_SAME_TIME
#if BU98R10_WRITE_AT_SAME_TIME
#if BU98R10_COLORFUL_LCD_MODE
#if BU98R10_COLORFUL_LCD_MODE
Gen_TimeDelay
(
120
*
1000u
,
50u
);
BU98R10_All_Command_Write
(
BU98R10_CMD_SWRST
);
BU98R10_All_Command_Write
(
BU98R10_CMD_SWRST
);
Gen_TimeDelay
(
20
*
1000
,
50U
);
Gen_TimeDelay
(
20
*
1000
,
50U
);
...
@@ -545,7 +548,7 @@ void BU98R10_Init(void)
...
@@ -545,7 +548,7 @@ void BU98R10_Init(void)
#endif
#endif
#endif
#endif
#endif
#endif
u32BU98R10ForcedUpdate
=
0UL
;
BU98R10Update
.
En
=
0
;
BU98R10Update
.
En
=
0
;
BU98R10Update
.
Step
=
0
;
BU98R10Update
.
Step
=
0
;
BU98R10Update
.
Cont
=
0
;
BU98R10Update
.
Cont
=
0
;
...
@@ -575,24 +578,22 @@ void BU98R10_Shutdown(void)
...
@@ -575,24 +578,22 @@ void BU98R10_Shutdown(void)
#endif
#endif
}
}
uint8_t
u8BU98R10CheckCount
=
0
;
#define BU98R10_FORCED_SEG_NUM 2U
void
BU98R10_Update_Request
(
void
)
void
BU98R10_Update_Request
(
void
)
{
{
// if (g_sysFlag.Bits.AccSaveState)
if
(
BU98R10Update
.
En
==
0
)
//{
// //if (u8BU98R10CheckCount < 20)
// //{
// // BU98R10Update.En = 1;
// // u8BU98R10CheckCount++;
// //}
// BU98R10Update.En = 1;
// }
// else
{
{
if
(
u32BU98R10ForcedUpdate
<=
(
BU98R10_DDRAM_SIZE
-
BU98R10_FORCED_SEG_NUM
))
{
u32BU98R10ForcedUpdate
+=
BU98R10_FORCED_SEG_NUM
;
}
else
{
u32BU98R10ForcedUpdate
=
0UL
;
}
}
u8BU98R10CheckCount
=
0
;
BU98R10Update
.
En
=
1
;
BU98R10Update
.
En
=
1
;
}
#if USE_BU98R10_CHIP_0
#if USE_BU98R10_CHIP_0
BU98R10Update
.
Chip
=
0
;
BU98R10Update
.
Chip
=
0
;
...
@@ -613,7 +614,9 @@ void BU98R10_Update_Service(void)
...
@@ -613,7 +614,9 @@ void BU98R10_Update_Service(void)
{
{
case
0
:
case
0
:
if
((
BU98R10Chip0DDRAM
.
Byte
[
BU98R10Update
.
Addr
]
!=
BU98R10Chip0DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
])
||
if
((
BU98R10Chip0DDRAM
.
Byte
[
BU98R10Update
.
Addr
]
!=
BU98R10Chip0DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
])
||
(
BU98R10Chip1DDRAM
.
Byte
[
BU98R10Update
.
Addr
]
!=
BU98R10Chip1DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
]))
(
BU98R10Chip1DDRAM
.
Byte
[
BU98R10Update
.
Addr
]
!=
BU98R10Chip1DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
])
||
((
u32BU98R10ForcedUpdate
<=
BU98R10Update
.
Addr
)
&&
((
u32BU98R10ForcedUpdate
+
BU98R10_FORCED_SEG_NUM
)
>=
BU98R10Update
.
Addr
)))
{
{
BU98R10Chip0DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
]
=
BU98R10Chip0DDRAM
.
Byte
[
BU98R10Update
.
Addr
];
BU98R10Chip0DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
]
=
BU98R10Chip0DDRAM
.
Byte
[
BU98R10Update
.
Addr
];
BU98R10Chip1DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
]
=
BU98R10Chip1DDRAM
.
Byte
[
BU98R10Update
.
Addr
];
BU98R10Chip1DDRAMBackup
.
Byte
[
BU98R10Update
.
Addr
]
=
BU98R10Chip1DDRAM
.
Byte
[
BU98R10Update
.
Addr
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment