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
baizhengyuan
TianYing_ty100
Commits
a957bea1
Commit
a957bea1
authored
May 10, 2024
by
张明扬
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改项目校验信息,修改零件号长度
parent
992552cd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
UDS_ISO14229_Services.c
Firmware/Source/UDS/UDS_ISO14229_Services.c
+8
-8
UDS_ISO14229_Services.h
Firmware/Source/UDS/UDS_ISO14229_Services.h
+2
-2
No files found.
Firmware/Source/UDS/UDS_ISO14229_Services.c
View file @
a957bea1
...
...
@@ -27,9 +27,9 @@ extern void UDS_Service_Response(uint8_t si, uint8_t RspType, uint16_t A_TA_type
/*诊断使用, 判断App一致性, 禁止修改(内部版本号除外)*/
extern
const
ProjectInfoStruct
ProjectInfo
__attribute__
((
section
(
".ARM.__at_0x00007800"
)))
=
{
"
HaoJin232"
,
// 豪进232
"
HJYB-5
"
,
"BAT32
A239K
K64FB"
,
// 中微芯片
"
TianYing100"
,
// 天鹰100
"
TY200.080000b
"
,
"BAT32
G139G
K64FB"
,
// 中微芯片
{
"CAN_STD"
,
"CAN_CH_0"
,
...
...
@@ -93,7 +93,7 @@ uint8_t MCU_HWversion[6] = {'H', 'V', (uint8_t)((HWV >> 8u) & 0x0Fu) + 0x30u, '.
uint8_t
MCU_FBLversion
[
6
]
=
{
'B'
,
'V'
,
(
uint8_t
)((
BTV
>>
8u
)
&
0x0Fu
)
+
0x30u
,
'.'
,
(
uint8_t
)((
BTV
>>
4u
)
&
0x0Fu
)
+
0x30u
,
(
uint8_t
)(
BTV
&
0x0Fu
)
+
0x30u
};
//零件号信息 F187
uint8_t
MCU_PartNumber
[
6
]
=
{
'H'
,
'J'
,
'Y'
,
'B'
,
'-'
,
'5
'
};
uint8_t
MCU_PartNumber
[
13
]
=
{
'T'
,
'Y'
,
'2'
,
'0'
,
'0'
,
'.'
,
'0'
,
'8'
,
'0'
,
'0'
,
'0'
,
'0'
,
'b
'
};
void
Data_Set_DiagPara
(
void
)
{
...
...
@@ -104,7 +104,7 @@ void Data_Set_DiagPara(void)
{
DiagDataForDFlash
.
DID_F180
[
i
]
=
MCU_FBLversion
[
i
];
}
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
13
;
i
++
)
{
DiagDataForDFlash
.
DID_F187
[
i
]
=
MCU_PartNumber
[
i
];
}
...
...
@@ -141,7 +141,7 @@ void DFlash_init(void)
if
(
(
ReadDiagDataForDFlash
->
Flag
!=
0x5AA5A77Au
)
||
(
0
!=
memcmp
(
ReadDiagDataForDFlash
->
DID_F180
,
MCU_FBLversion
,
sizeof
(
MCU_FBLversion
)))
||
(
0
!=
memcmp
(
ReadDiagDataForDFlash
->
DID_F187
,
MCU_PartNumber
,
sizeof
(
MCU_
FBLversion
)))
||
(
0
!=
memcmp
(
ReadDiagDataForDFlash
->
DID_F187
,
MCU_PartNumber
,
sizeof
(
MCU_
PartNumber
)))
||
(
0
!=
memcmp
(
ReadDiagDataForDFlash
->
DID_F193
,
MCU_HWversion
,
sizeof
(
MCU_HWversion
)))
||
(
0
!=
memcmp
(
ReadDiagDataForDFlash
->
DID_F195
,
MCU_SWversion
,
sizeof
(
MCU_SWversion
)))
)
...
...
@@ -774,11 +774,11 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
break
;
case
0xF187
:
// 读零件号
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
13
;
i
++
)
{
UDS_ISO14229_Transfer
[
i
+
2
]
=
MCU_PartNumber
[
i
];
}
UDS_Service_Response
(
si
,
POSITIVE_RSP
,
DIAG_ID_Tx
,
2
+
6
,
UDS_ISO14229_Transfer
);
UDS_Service_Response
(
si
,
POSITIVE_RSP
,
DIAG_ID_Tx
,
2
+
13
,
UDS_ISO14229_Transfer
);
break
;
case
0x1024
:
// 读内部版本号
...
...
Firmware/Source/UDS/UDS_ISO14229_Services.h
View file @
a957bea1
...
...
@@ -341,10 +341,10 @@ typedef struct
{
uint32_t
Flag
;
uint8_t
DID_F180
[
6
];
uint8_t
DID_F187
[
6
];
uint8_t
DID_F187
[
13
];
uint8_t
DID_F193
[
6
];
uint8_t
DID_F195
[
6
];
uint8_t
Filldata
[
4
];
uint8_t
Filldata
[
1
];
}
DiagDFlashData
;
extern
DiagDFlashData
DiagDataForDFlash
;
typedef
struct
...
...
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