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
53981bdb
Commit
53981bdb
authored
Sep 15, 2024
by
李延凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加诊断27服务
parent
5f9e98d4
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
282 additions
and
31 deletions
+282
-31
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+1
-0
UDS_ISO14229_Server.c
Firmware/Source/UDS/UDS_ISO14229_Server.c
+11
-3
UDS_ISO14229_Services.c
Firmware/Source/UDS/UDS_ISO14229_Services.c
+262
-27
UDS_ISO14229_Services.h
Firmware/Source/UDS/UDS_ISO14229_Services.h
+8
-1
No files found.
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
53981bdb
...
@@ -68,6 +68,7 @@ static void Power_KL30_Init(void)
...
@@ -68,6 +68,7 @@ static void Power_KL30_Init(void)
g_stRTCInformation
.
u8RTCYear
=
20
;
g_stRTCInformation
.
u8RTCYear
=
20
;
RTE_RTC_Init
(
g_stRTCInformation
);
RTE_RTC_Init
(
g_stRTCInformation
);
Menu_User_Init
();
Menu_User_Init
();
UDS_Startup_Init
();
Can_Init
();
Can_Init
();
Protocol_KL30_Wakeup_Init
();
Protocol_KL30_Wakeup_Init
();
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
500
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
500
);
...
...
Firmware/Source/UDS/UDS_ISO14229_Server.c
View file @
53981bdb
...
@@ -203,11 +203,13 @@ void UDS_S_Data_Indication(uint16_t S_TAtype, uint8_t *S_Data, uint16_t S_Length
...
@@ -203,11 +203,13 @@ void UDS_S_Data_Indication(uint16_t S_TAtype, uint8_t *S_Data, uint16_t S_Length
返回值:无 SYSC0_RUNPLL2CNTR
返回值:无 SYSC0_RUNPLL2CNTR
******************************************************************************/
******************************************************************************/
extern
uint8_t
S3_Server_refresh
;
extern
uint8_t
S3_Server_refresh
;
extern
uint8_t
S3_ServerEN
;
extern
uint8_t
SessionType
;
void
UDS_Process_Service_Request
(
void
)
void
UDS_Process_Service_Request
(
void
)
{
{
if
(
UDS_APP_RX
.
A_PDU
.
New
)
if
(
UDS_APP_RX
.
A_PDU
.
New
)
{
{
S3_Server
_refresh
=
1
;
S3_Server
EN
=
0
;
// 收到消息时,暂停S3Timer
switch
(
UDS_APP_RX
.
A_PDU
.
A_PCI
.
SI
)
switch
(
UDS_APP_RX
.
A_PDU
.
A_PCI
.
SI
)
{
{
case
0x10
:
UDS_Service_10_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
case
0x10
:
UDS_Service_10_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
...
@@ -218,10 +220,10 @@ void UDS_Process_Service_Request(void)
...
@@ -218,10 +220,10 @@ void UDS_Process_Service_Request(void)
UDS_Service_22_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
UDS_Service_22_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
}
}
break
;
break
;
/* case 0x2E: UDS_Service_2E_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
break;
case
0x27
:
UDS_Service_27_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
case
0x27
:
UDS_Service_27_Indication
(
UDS_APP_RX
.
A_PDU
.
TA_type
,
UDS_APP_RX
.
A_PDU
.
Length
,
UDS_APP_RX
.
A_PDU
.
Data
);
break
;
break
;
/* case 0x2E: UDS_Service_2E_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
break;
case 0x28: UDS_Service_28_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
case 0x28: UDS_Service_28_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
break;
break;
case 0x85: UDS_Service_85_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
case 0x85: UDS_Service_85_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
...
@@ -239,6 +241,12 @@ void UDS_Process_Service_Request(void)
...
@@ -239,6 +241,12 @@ void UDS_Process_Service_Request(void)
break
;
break
;
}
}
UDS_APP_RX
.
A_PDU
.
New
=
0
;
UDS_APP_RX
.
A_PDU
.
New
=
0
;
if
(
SessionType
>
DefaultSession
)
// 非默认会话时执行
{
S3_Server_refresh
=
1
;
// 诊断请求处理完成, 刷新S3Timer
S3_ServerEN
=
1
;
// 消息处理完成,恢复S3Timer计时
}
}
}
}
}
...
...
Firmware/Source/UDS/UDS_ISO14229_Services.c
View file @
53981bdb
This diff is collapsed.
Click to expand it.
Firmware/Source/UDS/UDS_ISO14229_Services.h
View file @
53981bdb
...
@@ -341,9 +341,12 @@ typedef struct
...
@@ -341,9 +341,12 @@ typedef struct
void
UDS_Service_10_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_10_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_11_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_11_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_22_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_22_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_27_Indication
(
uint32_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_3E_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
UDS_Service_3E_Indication
(
uint16_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
);
void
S3_ServerCNTT
(
void
);
void
S3_ServerCNTT
(
void
);
extern
void
DIAG_InitParameter
(
void
);
extern
void
UDS_Normal_Init
(
void
);
extern
void
UDS_Startup_Init
(
void
);
typedef
void
(
*
InitFunction
)(
void
);
typedef
void
(
*
InitFunction
)(
void
);
...
@@ -360,4 +363,8 @@ void Write_App_InValid(uint32_t m32);
...
@@ -360,4 +363,8 @@ void Write_App_InValid(uint32_t m32);
extern
void
Get_Into_630H_Update_MCU_Mode
(
void
);
extern
void
Get_Into_630H_Update_MCU_Mode
(
void
);
extern
void
Check_MCU_Info_in_630H
(
void
);
extern
void
Check_MCU_Info_in_630H
(
void
);
extern
void
Ser27_CreateRandomSeed
(
void
);
extern
uint32_t
CalculateKey
(
uint8_t
seed_array
[]);
extern
uint32_t
Combine_U8_Into_U32
(
uint8_t
*
U8
);
#endif
#endif
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