Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
caacdc92
Commit
caacdc92
authored
Aug 16, 2024
by
李延凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 诊断读内部版本号和日期时合并输出
parent
8010e1a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
31 deletions
+31
-31
UDS_ISO14229_Services.c
Firmware/Source/UDS/UDS_ISO14229_Services.c
+20
-24
UDS_ISO14229_Services.h
Firmware/Source/UDS/UDS_ISO14229_Services.h
+11
-7
No files found.
Firmware/Source/UDS/UDS_ISO14229_Services.c
View file @
caacdc92
...
...
@@ -84,6 +84,24 @@ uint8_t MCU_FBLversion[6] = {'B', 'V', (uint8_t)((BTV >> 8u) & 0x0Fu) + 0x30u, '
//零件号信息 F187
uint8_t
MCU_PartNumber
[
16
]
=
{
'K'
,
'E'
,
'E'
,
'W'
,
'A'
,
'Y'
,
'_'
,
'T'
,
'0'
,
'6'
,
'_'
,
'M'
,
'E'
,
'T'
,
'E'
,
'R'
};
/* internal program info */
const
uint8_t
DID_1024
[
13
]
=
{
((
internal_version
/
100UL
)
+
0x30UL
),
'.'
,
(((
internal_version
/
10UL
)
%
10UL
)
+
0x30UL
),
((
internal_version
%
10UL
)
+
0x30UL
),
'_'
,
((
internal_date
/
10000000UL
)
+
0x30
),
(((
internal_date
/
1000000UL
)
%
10UL
)
+
0x30
),
(((
internal_date
/
100000UL
)
%
10UL
)
+
0x30
),
(((
internal_date
/
10000UL
)
%
10UL
)
+
0x30
),
(((
internal_date
/
1000UL
)
%
10UL
)
+
0x30
),
(((
internal_date
/
100UL
)
%
10UL
)
+
0x30
),
(((
internal_date
/
10UL
)
%
10UL
)
+
0x30
),
((
internal_date
%
10UL
)
+
0x30
)
};
void
Data_Set_DiagPara
(
void
)
{
uint8_t
i
;
...
...
@@ -797,30 +815,8 @@ void UDS_Service_22_Indication(uint16_t A_TA_type, uint16_t A_Length, uint8_t *A
break
;
case
0x1024
:
// 读内部版本号
UDS_ISO14229_Transfer
[
0
]
=
0x10u
;
UDS_ISO14229_Transfer
[
1
]
=
0x24u
;
UDS_ISO14229_Transfer
[
2
]
=
'A'
;
UDS_ISO14229_Transfer
[
3
]
=
'_'
;
UDS_ISO14229_Transfer
[
4
]
=
'V'
;
UDS_ISO14229_Transfer
[
5
]
=
(
uint8_t
)((
INTLV
>>
8u
)
&
0x0Fu
)
+
0x30u
;
UDS_ISO14229_Transfer
[
6
]
=
'.'
;
UDS_ISO14229_Transfer
[
7
]
=
(
uint8_t
)((
INTLV
>>
4u
)
&
0x0Fu
)
+
0x30u
;
UDS_ISO14229_Transfer
[
8
]
=
(
uint8_t
)(
INTLV
&
0x0Fu
)
+
0x30u
;
UDS_Service_Response
(
si
,
POSITIVE_RSP
,
DIAG_ID_Tx
,
2
+
7
,
UDS_ISO14229_Transfer
);
break
;
case
0x1028
:
// 读内部版本号
UDS_ISO14229_Transfer
[
0
]
=
0x10u
;
UDS_ISO14229_Transfer
[
1
]
=
0x28u
;
UDS_ISO14229_Transfer
[
2
]
=
'2'
;
UDS_ISO14229_Transfer
[
3
]
=
'0'
;
UDS_ISO14229_Transfer
[
4
]
=
(
uint8_t
)((
PROG_Y
>>
4u
)
&
0x0Fu
)
+
0x30u
;
UDS_ISO14229_Transfer
[
5
]
=
(
uint8_t
)(
PROG_Y
&
0x0Fu
)
+
0x30u
;
UDS_ISO14229_Transfer
[
6
]
=
(
uint8_t
)((
PROG_M
>>
4u
)
&
0x0Fu
)
+
0x30u
;
UDS_ISO14229_Transfer
[
7
]
=
(
uint8_t
)(
PROG_M
&
0x0Fu
)
+
0x30u
;
UDS_ISO14229_Transfer
[
8
]
=
(
uint8_t
)((
PROG_D
>>
4u
)
&
0x0Fu
)
+
0x30u
;
UDS_ISO14229_Transfer
[
9
]
=
(
uint8_t
)(
PROG_D
&
0x0Fu
)
+
0x30u
;
UDS_Service_Response
(
si
,
POSITIVE_RSP
,
DIAG_ID_Tx
,
2
+
8
,
UDS_ISO14229_Transfer
);
(
void
)
memcpy
(
&
UDS_ISO14229_Transfer
[
2
],
DID_1024
,
sizeof
(
DID_1024
));
UDS_Service_Response
(
si
,
POSITIVE_RSP
,
DIAG_ID_Tx
,
2
+
sizeof
(
DID_1024
),
UDS_ISO14229_Transfer
);
break
;
case
0xF184
:
// UUID
...
...
Firmware/Source/UDS/UDS_ISO14229_Services.h
View file @
caacdc92
...
...
@@ -26,6 +26,16 @@
#include "UDS_ISO14229_Server_Config.h"
/******************************************************************************
program version
*******************************************************************************/
#define SWV 0x100 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define internal_version (105UL)
/* 内部版本号 105 -> 1.05 */
#define internal_date (20240805UL)
/* 内部版本日期 20240805 -> 2024.08.05 */
/**
*DFlash
*/
...
...
@@ -313,13 +323,7 @@
#define CheckSumErr 7 // Checksum Error
#define UnknownPartID 8 // Unknown Part ID
#define SWV 0x100 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x100 // 0x100 = 1.00 internal version 内部版本号
#define PROG_Y 0x24 // 0x24 = 2024年, program year
#define PROG_M 0x07 // 0x03 = 3月, program month
#define PROG_D 0x16 // 0x19 = 19日, program day
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