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
b7655a31
Commit
b7655a31
authored
Sep 10, 2024
by
张明扬
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改22服务数据存储地址为0x500800ul,
共用同一地址时会导致频繁更新BOOT程序与22服务信息
parent
fa9fdbc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
UDS_ISO14229_Services.c
Firmware/Source/UDS/UDS_ISO14229_Services.c
+3
-3
UDS_ISO14229_Services.h
Firmware/Source/UDS/UDS_ISO14229_Services.h
+1
-0
No files found.
Firmware/Source/UDS/UDS_ISO14229_Services.c
View file @
b7655a31
...
@@ -168,7 +168,7 @@ void Write_App_InValid(uint32_t m32)
...
@@ -168,7 +168,7 @@ void Write_App_InValid(uint32_t m32)
/*写22服务数据*/
/*写22服务数据*/
void
DFlash_init
(
void
)
void
DFlash_init
(
void
)
{
{
DiagDFlashData
*
ReadDiagDataForDFlash
=
(
DiagDFlashData
*
)
0x500200
;
DiagDFlashData
*
ReadDiagDataForDFlash
=
(
DiagDFlashData
*
)
APP_DATA_INFO
;
if
(
(
ReadDiagDataForDFlash
->
Flag
!=
0x5AA5A77Au
)
||
if
(
(
ReadDiagDataForDFlash
->
Flag
!=
0x5AA5A77Au
)
||
(
0
!=
memcmp
(
ReadDiagDataForDFlash
->
DID_F180
,
MCU_FBLversion
,
sizeof
(
MCU_FBLversion
)))
||
(
0
!=
memcmp
(
ReadDiagDataForDFlash
->
DID_F180
,
MCU_FBLversion
,
sizeof
(
MCU_FBLversion
)))
||
...
@@ -180,9 +180,9 @@ void DFlash_init(void)
...
@@ -180,9 +180,9 @@ void DFlash_init(void)
Data_Set_DiagPara
();
Data_Set_DiagPara
();
DiagDataForDFlash
.
Flag
=
0x5AA5A77Au
;
DiagDataForDFlash
.
Flag
=
0x5AA5A77Au
;
//擦除扇区
//擦除扇区
EraseSector
(
0x500200ul
);
EraseSector
(
APP_DATA_INFO
);
//App程序状态和22服务数据全写进去
//App程序状态和22服务数据全写进去
ProgramPage
(
0x500200ul
,
sizeof
(
DiagDataForDFlash
),
(
uint8_t
*
)(
&
DiagDataForDFlash
));
ProgramPage
(
APP_DATA_INFO
,
sizeof
(
DiagDataForDFlash
),
(
uint8_t
*
)(
&
DiagDataForDFlash
));
}
}
else
else
{
{
...
...
Firmware/Source/UDS/UDS_ISO14229_Services.h
View file @
b7655a31
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#define NoNeedWait 0x00u
#define NoNeedWait 0x00u
#define NeedWait 0x01u
#define NeedWait 0x01u
#define APP_STATUS_ADDR (0x500400ul)
#define APP_STATUS_ADDR (0x500400ul)
#define APP_DATA_INFO (0x500800ul)
#define Data_Flash_Addr_BootValid_OFFSET 0x00000000
#define Data_Flash_Addr_BootValid_OFFSET 0x00000000
#define Data_Flash_Addr_DiagReceive_OFFSET 0x00002000
#define Data_Flash_Addr_DiagReceive_OFFSET 0x00002000
...
...
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