Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WZ-EF01
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
WZ
WZ-EF01
Commits
b8fe879c
Commit
b8fe879c
authored
Mar 08, 2024
by
李秉薇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:39992
parent
8a5b0299
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
6 deletions
+71
-6
UDS_ISO14229_Services.h
code/Sources/Diagnostic/inc/UDS_ISO14229_Services.h
+3
-1
UDS_ISO14229_Services.c
code/Sources/Diagnostic/src/UDS_ISO14229_Services.c
+64
-2
CRG.c
code/Sources/Driver/src/CRG.c
+3
-3
main.c
code/Sources/System/src/main.c
+1
-0
No files found.
code/Sources/Diagnostic/inc/UDS_ISO14229_Services.h
View file @
b8fe879c
...
...
@@ -393,7 +393,7 @@ typedef union
#define DTCNoTestThisCycle 0x40
#define DTCNoError 0xFE
#define AgeingCount
39
#define AgeingCount
40
typedef
union
{
...
...
@@ -497,4 +497,6 @@ uint8_t Write_Base_DATA_FROM_FLASH(uint32_t Adrr, uint8_t *Data,uint8_t len);
uint8_t
ReadDFlashData
(
uint32_t
u8BlockNum
,
uint32_t
u32Data
[],
uint16_t
u16Len
,
InitFunction
initFunction
);
void
Ser2EToDFlashInfoInit
(
void
);
void
ReadAllDflashData
(
void
);
void
DTCAgeing
(
void
);
void
UDS_KL15_init
(
void
);
#endif
\ No newline at end of file
code/Sources/Diagnostic/src/UDS_ISO14229_Services.c
View file @
b8fe879c
...
...
@@ -789,7 +789,7 @@ void WRITE_BZ_inDFLAH2Sector ( INT16U bz )
if
(
DFLASH_Erase_Sector
(
DFLASH_APPvAddress
)
!=
OK
)
return
;
mRUL
=
DFLASH_Program
(
DFLASH_APPvAddress
,
&
bz
,
1
);
mRUL
=
DFLASH_Program
(
DFLASH_APPvAddress
+
4
,
&
bz
,
1
);
}
//========================================================
...
...
@@ -2437,7 +2437,13 @@ Get KL15 Status
*/
uint8_t
getKL15Status
(
void
)
{
return
ANALOG_KL15_VOLTAGE_VALID
;
uint8_t
flag
=
0
;
if
(
ANALOG_KL15_VOLTAGE
>
500
)
{
flag
=
1
;
}
else
{
flag
=
0
;
}
return
flag
;
}
/*
...
...
@@ -2754,6 +2760,62 @@ uint8_t getMSGStatus(uint8_t cnMsgID)
}
/**
*DTC Aged
*/
void
DTCAgeing
(
void
)
{
INT8U
i
;
for
(
i
=
0u
;
i
<
cnDTCslen
;
++
i
)
{
DiagDtc
[
i
].
Status
.
Flag
|=
(
DTCNoTestThisCycle
);
if
(
(
uint8_t
)(
DiagDtc
[
i
].
Status
.
Flag
&
DTCErrorThisCycle
)
!=
DTCErrorThisCycle
)
{
DiagDtc
[
i
].
Status
.
Flag
=
(
uint8_t
)(
DiagDtc
[
i
].
Status
.
Flag
&
(
~
DTCPending
));
DiagDtc
[
i
].
FaultPendCount
=
0u
;
if
(
(
uint8_t
)(
DiagDtc
[
i
].
Status
.
Flag
&
DTCConfirmed
)
==
DTCConfirmed
)
{
DiagDtc
[
i
].
DTCAgingCount
++
;
if
(
DiagDtc
[
i
].
DTCAgingCount
>=
AgeingCount
)
{
DiagDtc
[
i
].
Status
.
Flag
=
(
uint8_t
)(
DiagDtc
[
i
].
Status
.
Flag
&
(
~
DTCConfirmed
));
DTCUpdataStatusList
[
i
]
=
1u
;
}
}
}
else
{
DiagDtc
[
i
].
Status
.
Flag
=
(
uint8_t
)(
DiagDtc
[
i
].
Status
.
Flag
&
(
~
DTCErrorThisCycle
));
}
DiagDtc
[
i
].
Status
.
Flag
=
(
uint8_t
)(
DiagDtc
[
i
].
Status
.
Flag
&
DTCNoError
);
}
}
void
UDS_KL15_init
(
void
)
{
INT8U
KL15Status
=
getKL15Status
(
);
if
(
UDSKL15Status
==
0u
)
{
if
(
KL15Status
==
1u
)
{
UDSKL15Status
=
1u
;
setDTCEnableTimer
(
KL15DTCEnableTimer
);
SessionType
=
1
;
//S3_ServiceTimeOut( );
DTCAgeing
(
);
}
}
else
{
if
(
KL15Status
==
0u
)
{
UDSKL15Status
=
0u
;
setDTCEnableTimer
(
KL15DTCEnableTimer
);
}
}
}
void
UDS_Service_19_Indication
(
uint32_t
A_TA_type
,
uint16_t
A_Length
,
uint8_t
*
A_Data
)
{
uint16_t
i
;
...
...
code/Sources/Driver/src/CRG.c
View file @
b8fe879c
...
...
@@ -29,9 +29,9 @@ extern void Data_Fuel_Consumption_Count_ISR(void);
void
WDT_Init
(
void
)
{
//配置看门狗
//
wdt_reset();
//
COPCTL = WDT_PERIOD; //配置看门狗定时周期
//
PLLCTL_PCE = 1; //看门狗在Pseudo Stop模式下持续运行
wdt_reset
();
COPCTL
=
WDT_PERIOD
;
//配置看门狗定时周期
PLLCTL_PCE
=
1
;
//看门狗在Pseudo Stop模式下持续运行
}
/******************************************************************************
...
...
code/Sources/System/src/main.c
View file @
b8fe879c
...
...
@@ -151,6 +151,7 @@ void main(void)
UDS_Server_Application_Service
();
//诊断
EEPROM_RW_Service
();
TFT_LCD_General_Table_Write_Service
();
UDS_KL15_init
();
if
(
SYS_IGN_OFF_DISP_MODE
)
{
TFT_LCD_General_Table_Write_Service
();
...
...
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