增加OTA功能,交直流回检滤波时间延长
This commit is contained in:
parent
b707353a49
commit
73fbc98c82
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
OBJ/App.bin
BIN
OBJ/App.bin
Binary file not shown.
9869
OBJ/DCBms.hex
9869
OBJ/DCBms.hex
File diff suppressed because it is too large
Load Diff
9869
OBJ/LED.hex
9869
OBJ/LED.hex
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -5,7 +5,8 @@
|
||||
|
||||
#pragma anon_unions
|
||||
|
||||
#define PROGRAMMING_PASS_TIMEOUT_TIME 500 //5s
|
||||
#define PROGRAMMING_PASS_TIMEOUT_TIME 500 //5s base:10ms
|
||||
#define OTA_TIMEOUT_TIME (6) //30min base:5min
|
||||
|
||||
/*
|
||||
INPUT_OVERVOLTAGE) \
|
||||
@ -46,7 +47,7 @@ typedef struct {
|
||||
uint16_t CurrDcVolt; //当前直流电压 0.1V
|
||||
uint8_t ChargeTemp; //充电座温度值 °C
|
||||
uint8_t BoardTemp; //板载温度值 °C
|
||||
uint8_t OtaModeSts; //OTA ģʽ״̬ 0:not in ota 1:in transition ota 2:in ota
|
||||
// uint8_t OtaModeSts; //OTA ģʽ״̬ 0:not in ota 1:in transition ota 2:in ota
|
||||
uint8_t BusoffCnt; //busoff计数器,进入busoff后每恢复一次就累加1。CAN总线正常后退出busoff就清零。
|
||||
DTC_SnapshotType Snapshot;
|
||||
}VehicleInfo2UdsType;
|
||||
@ -66,6 +67,7 @@ typedef struct {
|
||||
uint16_t InsulDetVoltVal; // 绝缘检测电压 0.1V
|
||||
uint8_t DTCNum; //DTC个数
|
||||
uint8_t DTCList[DTC_ID_NUM];
|
||||
uint8_t OtaModeSts; //OTA ģʽ״̬ 0:not in ota 1:in transition ota 2:in ota
|
||||
}UdsInfo2VehicleType;
|
||||
|
||||
|
||||
|
BIN
UDS/uds_api.c
BIN
UDS/uds_api.c
Binary file not shown.
BIN
UDS/uds_api.h
BIN
UDS/uds_api.h
Binary file not shown.
BIN
UDS/uds_config.h
BIN
UDS/uds_config.h
Binary file not shown.
BIN
UDS/uds_did.h
BIN
UDS/uds_did.h
Binary file not shown.
@ -246,6 +246,7 @@ void GotoDefaultSession(void)
|
||||
//INT8U Tmp[10];
|
||||
static INT16U Timer1sCnt=0;
|
||||
static INT16U Timer10msCnt=0;
|
||||
// static INT16U Timer5minCnt=0;
|
||||
|
||||
//if(++Timer1sCnt >= 1000)
|
||||
if(++Timer10msCnt >= 10) {
|
||||
@ -320,15 +321,25 @@ void GotoDefaultSession(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (UdsService.IsUdsFlg) {
|
||||
udsInfo2Vehicle.UdsOffLine = false;
|
||||
} else {
|
||||
udsInfo2Vehicle.UdsOffLine = true;
|
||||
udsInfo2Vehicle.OtaModeSts = 0;
|
||||
#if BOOTLOADER_CODE_FLAG == 0
|
||||
IO_InputOutputRelease();
|
||||
#endif
|
||||
}
|
||||
|
||||
// if (++Timer5minCnt >= 300) {
|
||||
// Timer5minCnt = 0;
|
||||
// if (UdsService.OtaTimeoutTimer) {
|
||||
// UdsService.OtaTimeoutTimer--;
|
||||
// }
|
||||
// if (UdsService.OtaTimeoutTimer == 0) {
|
||||
// udsInfo2Vehicle.OtaModeSts = 0;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -166,10 +166,13 @@ typedef struct{
|
||||
uint16_t IoDid;
|
||||
uint16_t Nrc78Timer;
|
||||
uint16_t ProgrammingPassTimer;
|
||||
// uint8_t OtaTimeoutTimer; //5min
|
||||
}__UDSService;
|
||||
|
||||
typedef struct {
|
||||
uint8_t SA_FailureCounter;
|
||||
// uint8_t OtaModeSts;
|
||||
// uint8_t OtaTimeoutTimer; //5min
|
||||
uint8_t resever[7];
|
||||
uint8_t crc16[2];
|
||||
}UDS_ParameterType;
|
||||
|
BIN
UDS/uds_types.h
BIN
UDS/uds_types.h
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -412,7 +412,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>USER</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -602,7 +602,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>HARDWARE</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -718,7 +718,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>SYSTEM</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1244,7 +1244,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>Sleep</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1264,7 +1264,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>KC</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1360,7 +1360,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>SecTimer</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1380,7 +1380,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>GUNDiscriminate</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1400,7 +1400,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>UDS</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
|
BIN
USER/main.c
BIN
USER/main.c
Binary file not shown.
Loading…
Reference in New Issue
Block a user