Commit edca1d26 authored by 姜凯文's avatar 姜凯文 🤒

Merge branch 'dev' into 'master'

修改QAC高危问题

See merge request !11
parents 58a06062 a35590a5
This diff is collapsed.
#include "Radar_R3.h"
RadarR3DataBufferUnion RadarR3Data;
RadarR3ReceivingCtrlStruct RadarR3ReceivingCtrl;
void Radar_R3_Init(void)
{
RadarR3ReceivingCtrl.Enable = 0;
RadarR3ReceivingCtrl.SelfTest = 0;
RadarR3ReceivingCtrl.Ptr = 0;
RadarR3ReceivingCtrl.Len = 0;
RadarR3ReceivingCtrl.Complete = 0;
RadarR3ReceivingCtrl.Counter = 0;
RADAR_VALID = 0;
RADAR_SELF_TEST_PASSED = 0;
RADAR_SYS_FAULT = 0;
RADAR_SOUND = RADAR_SND_MUTE;
RADAR_SENSOR_FL = 0;
RADAR_SENSOR_FLM = 0;
RADAR_SENSOR_FRM = 0;
RADAR_SENSOR_FR = 0;
RADAR_SENSOR_RL = 0;
RADAR_SENSOR_RLM = 0;
RADAR_SENSOR_RRM = 0;
RADAR_SENSOR_RR = 0;
}
//10ms
void Radar_R3_Receiving_Service(void)
{
#if 0
uint16_t Counter;
uint8_t SelfTestResult;
if (RadarR3ReceivingCtrl.Enable)
{
if (LINE_IN_GEAR_R_SIGNAL)
{
RADAR_VALID = (RADAR_REAR_VALID_FLAG | RADAR_FRONT_VALID_FLAG) ;
if (RadarR3ReceivingCtrl.Timer < 0xFFFF)
RadarR3ReceivingCtrl.Timer++;
if (RadarR3ReceivingCtrl.Timer >= (RADAR_R3_MSG_LOST_THRESHOLD * 100))
RADAR_SYS_FAULT |= RADAR_MSG_LOST_BIT;
else
RADAR_SYS_FAULT &= ~RADAR_MSG_LOST_BIT;
if (RadarR3ReceivingCtrl.Complete)
{
RadarR3ReceivingCtrl.Complete = 0;
RadarR3ReceivingCtrl.Timer = 0;
if (RadarR3Data.Frame.Type == RADAR_R3_MESSAGE_FRAME)
{
if (RadarR3ReceivingCtrl.SelfTest == 1) //雷达结束首次自检
{
RadarR3ReceivingCtrl.SelfTest = 2;
SelfTestResult = 0;
SelfTestResult |= RADAR_SENSOR_FL;
SelfTestResult |= RADAR_SENSOR_FLM;
SelfTestResult |= RADAR_SENSOR_FRM;
SelfTestResult |= RADAR_SENSOR_FR;
SelfTestResult |= RADAR_SENSOR_RL;
SelfTestResult |= RADAR_SENSOR_RLM;
SelfTestResult |= RADAR_SENSOR_RRM;
SelfTestResult |= RADAR_SENSOR_RR;
if (SelfTestResult == 0)
RADAR_SELF_TEST_PASSED = 1;
}
RADAR_SOUND = RadarR3Data.Msg.Snd;
RADAR_SENSOR_FL = RadarR3Data.Msg.FL;
RADAR_SENSOR_FLM = RadarR3Data.Msg.FLM;
RADAR_SENSOR_FRM = RadarR3Data.Msg.FRM;
RADAR_SENSOR_FR = RadarR3Data.Msg.FR;
RADAR_SENSOR_RL = RadarR3Data.Msg.RL;
RADAR_SENSOR_RLM = RadarR3Data.Msg.RLM;
RADAR_SENSOR_RRM = RadarR3Data.Msg.RRM;
RADAR_SENSOR_RR = RadarR3Data.Msg.RR;
}
else if (RadarR3Data.Frame.Type == RADAR_R3_SELF_TEST_FRAME)
{
if (RadarR3ReceivingCtrl.SelfTest == 0) //雷达刚启动,未进行自检
RadarR3ReceivingCtrl.SelfTest = 1;
if (RadarR3Data.SelfTest.FLFault)
RADAR_SENSOR_FL = RADAR_SENSOR_FAULT;
else
RADAR_SENSOR_FL = 0;
if (RadarR3Data.SelfTest.FLMFault)
RADAR_SENSOR_FLM = RADAR_SENSOR_FAULT;
else
RADAR_SENSOR_FLM = 0;
if (RadarR3Data.SelfTest.FRMFault)
RADAR_SENSOR_FRM = RADAR_SENSOR_FAULT;
else
RADAR_SENSOR_FRM = 0;
if (RadarR3Data.SelfTest.FRFault)
RADAR_SENSOR_FR = RADAR_SENSOR_FAULT;
else
RADAR_SENSOR_FR = 0;
if (RadarR3Data.SelfTest.RLFault)
RADAR_SENSOR_RL = RADAR_SENSOR_FAULT;
else
RADAR_SENSOR_RL = 0;
if (RadarR3Data.SelfTest.RLMFault)
RADAR_SENSOR_RLM = RADAR_SENSOR_FAULT;
else
RADAR_SENSOR_RLM = 0;
if (RadarR3Data.SelfTest.RRMFault)
RADAR_SENSOR_RRM = RADAR_SENSOR_FAULT;
else
RADAR_SENSOR_RRM = 0;
if (RadarR3Data.SelfTest.RRFault)
RADAR_SENSOR_RR = RADAR_SENSOR_FAULT;
else
RADAR_SENSOR_RR = 0;
}
}
else
{
Counter = API_ROLLING_COUNTER;
if (Counter - RadarR3ReceivingCtrl.Counter >= (10000 / API_INT_CYCLE))
RadarR3ReceivingCtrl.Ptr = 0;
}
}
else
{
if (RADAR_VALID)
{
RadarR3ReceivingCtrl.SelfTest = 0;
RadarR3ReceivingCtrl.Ptr = 0;
RadarR3ReceivingCtrl.Complete = 0;
RadarR3ReceivingCtrl.Timer = 0;
RADAR_VALID = 0;
RADAR_SELF_TEST_PASSED = 0;
RADAR_SYS_FAULT = 0;
RADAR_SOUND = RADAR_SND_MUTE;
RADAR_SENSOR_FL = 0;
RADAR_SENSOR_FLM = 0;
RADAR_SENSOR_FRM = 0;
RADAR_SENSOR_FR = 0;
RADAR_SENSOR_RL = 0;
RADAR_SENSOR_RLM = 0;
RADAR_SENSOR_RRM = 0;
RADAR_SENSOR_RR = 0;
}
}
}
#endif
}
void Radar_R3_Receive_Enable(uint8_t En)
{
if (En)
En = 1;
if (RadarR3ReceivingCtrl.Enable != En)
{
RadarR3ReceivingCtrl.SelfTest = 0;
RadarR3ReceivingCtrl.Enable = En;
RadarR3ReceivingCtrl.Timer = 0;
RADAR_SELF_TEST_PASSED = 0;
RADAR_SYS_FAULT = 0;
RADAR_SOUND = RADAR_SND_MUTE;
RADAR_SENSOR_FL = 0;
RADAR_SENSOR_FLM = 0;
RADAR_SENSOR_FRM = 0;
RADAR_SENSOR_FR = 0;
RADAR_SENSOR_RL = 0;
RADAR_SENSOR_RLM = 0;
RADAR_SENSOR_RRM = 0;
RADAR_SENSOR_RR = 0;
if (RadarR3ReceivingCtrl.Enable == 0)
RADAR_VALID = 0;
}
}
void Radar_R3_Receive_Data(uint8_t Data, uint8_t Parity)
{
uint16_t Counter;
if ((RadarR3ReceivingCtrl.Enable) && (RADAR_VALID))
{
if (RadarR3ReceivingCtrl.Complete)
return;
Counter = API_ROLLING_COUNTER;
RadarR3Data.Byte[RadarR3ReceivingCtrl.Ptr] = Data;
if (RadarR3ReceivingCtrl.Ptr == 0)
{
if (RadarR3Data.Frame.Type == RADAR_R3_MESSAGE_FRAME)
{
RadarR3ReceivingCtrl.Ptr = 1;
RadarR3ReceivingCtrl.Len = 5;
RadarR3ReceivingCtrl.Counter = Counter;
}
else if (RadarR3Data.Frame.Type == RADAR_R3_SELF_TEST_FRAME)
{
RadarR3ReceivingCtrl.Ptr = 1;
RadarR3ReceivingCtrl.Len = 3;
RadarR3ReceivingCtrl.Counter = Counter;
}
}
else
{
//如果 1、超时10ms(10,000 us) 2、校验错误 则重新接收
if ((Counter - RadarR3ReceivingCtrl.Counter >= (10000 / API_INT_CYCLE)) || \
(Parity != 0))
{
RadarR3ReceivingCtrl.Ptr = 0;
return;
}
RadarR3ReceivingCtrl.Counter = Counter;
RadarR3ReceivingCtrl.Ptr++;
if (RadarR3ReceivingCtrl.Ptr >= RadarR3ReceivingCtrl.Len)
{
if (((RadarR3Data.Frame.Type == RADAR_R3_MESSAGE_FRAME) && \
(RadarR3Data.Msg.EOF == RADAR_R3_EOF_MESSAGE)) || \
((RadarR3Data.Frame.Type == RADAR_R3_SELF_TEST_FRAME) && \
(RadarR3Data.SelfTest.EOF == RADAR_R3_EOF_SELF_TEST)))
{
RadarR3ReceivingCtrl.Complete = 1;
}
RadarR3ReceivingCtrl.Ptr = 0;
}
}
}
}
......@@ -66,6 +66,7 @@ ReadDTCInformation
#define U300316 0xF00316 //Internal local voltage < 16V
#define U300317 0xF00317 //Internal local voltage > 32V
#define U111087 0xD11087 //NM Limphome failure
#define U014087 0xC14087 //Lost communication with BCM 0x10FF7521
#define U012187 0xC12187 //Lost communication with ABS 0x18FEBF0B
#define U010087 0xC10087 //Lost communication with EMS 0x0CF00400
......
......@@ -98,10 +98,9 @@
//DTC
uint32_t msgList[3][4] = {
{0x10FF7521, 8, 4000, 0, },
{0x18FEBF0B, 8, 1000, 0, },
{0x0CF00400, 8, 400, 0, },
{0x10FF7521, 8, 4000, 0,},
{0x18FEBF0B, 8, 1000, 0,},
{0x0CF00400, 8, 400, 0,},
};
uint16_t DTCTimerList [ cnDTCslen ] = {0};
uint8_t isNeedSaveDTC = 0;
......@@ -1626,7 +1625,7 @@ void UDS_Service_22_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t
UDS_ISO14229_Transfer[ 8] = '0';
UDS_ISO14229_Transfer[ 9] = '.';
UDS_ISO14229_Transfer[10] = '1';
UDS_ISO14229_Transfer[11] = '0';
UDS_ISO14229_Transfer[11] = '1';
UDS_Service_Response ( 0x22, POSITIVE_RSP, DIAG_ID_Tx, 12, UDS_ISO14229_Transfer );
break;
case 0xF191:
......@@ -2609,7 +2608,7 @@ void setDTCEnableTimer(uint16_t Timer)
isEnable = 0;
enableTimer = 0;
enableMaxTimer = Timer;
for ( i = 0; i < 8; ++i )
for ( i = 0; i < 3; ++i )
{
msgList [ i ][ 3 ] = 0;
}
......@@ -2819,9 +2818,9 @@ void ReceivedMsg(uint32_t MsgID, uint8_t DLC)
uint8_t i;
if ( CoCANCtrl.RxEnable == CoCAN_ENABLE )
{
for ( i = 0u; i < 8; ++i )
for ( i = 0u; i < 3; ++i )
{
if ( (MsgID == msgList [ i ][ 0 ]) )//&& (DLC == msgList [ i ][ 1u ]) )
if ( (MsgID == msgList [ i ][ 0 ]) )
{
msgList [ i ][ 3 ] = 0u;
break;
......@@ -3343,10 +3342,11 @@ void UDS_Service_14_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t
//ClearAllDTC();
for ( i = 0; i < cnDTCslen; i++ )
{
DiagDtc[ i ].Status.Flag = 0x00;
DTCTimerList[i] = 0;
DTCUpdataStatusList [ i ] = 1u;
msgList[i][3] = 0;
DiagDtc[ i ].Status.Flag = 0x00;
DTCTimerList[i] = 0;
DTCUpdataStatusList [ i ] = 1u;
if (i<3)
msgList[i][3] = 0;
}
UDS_Service_Response ( 0x14, POSITIVE_RSP, DIAG_ID_Tx, 0, UDS_ISO14229_Transfer );
......
......@@ -40,7 +40,7 @@ MOTOR_3: ͨ
/******************************************************************************
参数预处理
******************************************************************************/
#if (MOTOR_CONTROLLER_PERIOD == 0) || (MOTOR_CONTROLLER_PERIOD > BUSCLK))
#if ((MOTOR_CONTROLLER_PERIOD == 0) || (MOTOR_CONTROLLER_PERIOD > BUSCLK))
#error Invalid motor controller period setting
#endif
......
......@@ -178,9 +178,9 @@ void Sound_Scheduling_Service(void)
{
if (Sound_Stop(SoundList[SoundScheduling.Current].Src) == 0)
{
SoundScheduling.Current = SND_NONE;
SoundScheduling.StopReq = 0;
SoundEnableCode[SoundScheduling.Current] = 0;
SoundScheduling.Current = SND_NONE;
}
}
}
......
......@@ -578,15 +578,15 @@ typedef union
{
uint8_t b00_00 : 1; // LowBrakeLuidLevel
uint8_t b01_01 : 1; // SafetyBeltSt
uint8_t b02_04 : 3; // TankLevel
uint8_t b02_04 : 3; //
uint8_t b05_05 : 1; // MaintainSignal
uint8_t b06_07 : 2; //
uint8_t b10_17 : 8; // AverageFuelConsumption_LL
uint8_t b20_27 : 8; // AverageFuelConsumption_LH
uint8_t b30_37 : 8; // AverageFuelConsumption_HL
uint8_t b40_47 : 8; // AverageFuelConsumption_HH
uint8_t b50_57 : 8; //
uint8_t b10_17 : 8; //
uint8_t b20_27 : 8; //
uint8_t b30_37 : 8; //
uint8_t b40_47 : 8; //
uint8_t b50_57 : 8; // TankLevel
uint8_t b60_67 : 8; //
uint8_t b70_77 : 8; //
} Sig;
......@@ -604,13 +604,6 @@ extern volatile uint8_t CANMsg18FE8E17Status;
#define TankLevel CANMsg18FE8E17.Sig.b50_57 // 油箱液位
#define MaintainSignal CANMsg18FE8E17.Sig.b05_05 // 保养信号
#define AverageFuelConsumption_LL CANMsg18FE8E17.Sig.b10_17 // 平均油耗
#define AverageFuelConsumption_LH CANMsg18FE8E17.Sig.b20_27 // 平均油耗
#define AverageFuelConsumption_HL CANMsg18FE8E17.Sig.b30_37 // 平均油耗
#define AverageFuelConsumption_HH CANMsg18FE8E17.Sig.b40_47 // 平均油耗
static const uint8_t CANMsg18FE8E17Init[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static const uint8_t CANMsg18FE8E17Timeout[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
......
......@@ -25,6 +25,11 @@
//20240307 修改燃油不走问题(诊断屏蔽了3300配置项)
//20240313 取消0x18FFOA17外发(EF01报文矩阵里没有),修改30电15电同时上首帧网络管理报文外发超时问题
//20240315 修改诊断测出问题(李秉微)
//V00.11
//20240446 修改车厂问题:0x18FE8E17外发不对(新报文矩阵无平均油耗输出)
//20240430 修改软件版本号
//20240515 修改禅道QAC高危问题:42983、42982、42979
//20240522 修改禅道QAC高危问题:43378
#include "main.h"
#include "fuelconfig.h"
......
......@@ -47,7 +47,7 @@ S12XSDBG_TRIGGER_C=RangeAllowed:1 AccessSizeCompareAllowed:0 Disabled:0 BreakAll
S12XSDBG_TRIGGER_D=RangeAllowed:0 AccessSizeCompareAllowed:1 Disabled:0 BreakAllways:0 Range:0 OutsideRange:0 CompareMismatch:0 DataToCompare:0 DataToCompareMask:0 AccessSizeCompare: 0 WordAccessSizeCompare:0
DBG_S12XS_2=DBG PREDEFINED DBGENGINE TRACE HCS12X RECORDBEFORE PUREPC
DBG_S12XS_3=DBG PREDEFINED DBGENGINE SEQUENCER 0x02 0x02 0x02
NV_PARAMETER_FILE=C:\Program Files (x86)\Freescale\CWS12v5.1\prog\FPP\mcu01C9.fpp
NV_PARAMETER_FILE=
NV_SAVE_WSP=0
NV_AUTO_ID=1
COMDEVICE=SETCOMM COMPORT LPT "TBDML #1"
......@@ -110,10 +110,10 @@ Search15=GUI_ADAS_Display
[Recent Applications File List]
File0=H:\EF01\变\原程序\bin\WuZhengProject7.0.abs
File1=H:\EF01\变\建文件夹\W3_EF01_BootApp_BV1.2_SV00.10_HV1.07_FV0.08.s19
File2=I:\GIT\DEV\WZ-EF01\s19\W3_EF01_20231206_BV1.01(500k)_SVa00.09_HV1.07_FV0.08-12V_ALL.s19
File3=H:\EF01\源\03-程序源码\wuzheng_a901-master\原程序\bin\WuZhengProject7.0.abs
File0=I:\GIT\DEV\WZ-EF01\s19\WZ_EF01_BootApp_BV1.04_SV00.10_HV1.07_FV0.08_20240315.s19
File1=H:\EF01\变\程序\bin\WuZhengProject7.0.abs
File2=H:\EF01\变\新建文件夹\W3_EF01_BootApp_BV1.2_SV00.10_HV1.07_FV0.08.s19
File3=I:\GIT\DEV\WZ-EF01\s19\W3_EF01_20231206_BV1.01(500k)_SVa00.09_HV1.07_FV0.08-12V_ALL.s19
LoadFlags0=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
LoadFlags1=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
LoadFlags2=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Data:1 < ADDXPR ONLY_ADD_IF_NEW "FuelResistanceV"
Data:1 < ADDXPR ONLY_ADD_IF_NEW "hyqhyq"
Data:1 < ADDXPR ONLY_ADD_IF_NEW "AnalogFuelSensorRes"
Data:1 < ADDXPR ONLY_ADD_IF_NEW "NVMConfig3300.Sig.S10 "
Data:1 < ADDXPR ONLY_ADD_IF_NEW "NVMConfig3300.Sig.S1 "
Data:1 < ADDXPR ONLY_ADD_IF_NEW "NVMConfig3300.Sig.S26 "
Data:1 < ADDXPR ONLY_ADD_IF_NEW "NVMConfig3300.Sig.S25 "
Data:2 < ADDXPR ONLY_ADD_IF_NEW "Network_Status"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "DataVSpeedDisp"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "DataESpeedDisp"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "DataESpeedActual"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "DataESPeedDamping.Speed"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "NVMConfig3300"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "FuelResistanceV"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CANNetTxOFF"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CoCANCycleMsg"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CoCANCtrl.Timer"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CoCANTxMsgTable"
Data:2 < ADDXPR ONLY_ADD_IF_NEW "CANMsg18FEF717Status"
This source diff could not be displayed because it is too large. You can view the blob instead.
1、WZ_EF01_BootApp_BV1.05_SV00.10_HV1.07_FV0.08_20240321.s19,完整版,适用于新生产的无程序仪表
2、WZ_EF01_UpdateApp_BV1.05_SV00.10_HV1.07_FV0.08_20240321.s19,APP版,适用于烧过完整版程序仪表,需配合诊断工具使用
1、WZ_EF01_BootApp_S0.11_FV0.08_240522.s19,完整版,适用于新生产的无程序仪表
2、WZ_EF01_UpdateApp_S0.11_F0.08_240522.s19,APP版,适用于烧过完整版程序仪表,需配合诊断工具使用
#new Option
#Fri Mar 15 19:55:18 CST 2024
#Wed May 22 16:01:36 CST 2024
IsSort=true
MergeFlashIsCompression=false
ChangeAppFilePath=
......@@ -7,7 +7,7 @@ MergeCanXLSPath=
RH850_D1M1AGPIOJSONpath=
DBFFilePath=
MergeCrcTtpe=1
MergeBootFilePath=I\:\\GIT\\DEV\\WZ-EF01\\utility\\Boot_Release\\WuZheng_EF01_3820010-EF01_Boot_BV1.04_20240315.s19
MergeBootFilePath=I\:\\GIT\\DEV\\WZ-EF01\\utility\\Boot_Release\\WuZheng_EF01_3820010-EF01_Boot_BV1.05_20240321.s19
IsMergeChangeAddress=false
MergeFlashOutPutFilePath=
GPIOOutPutPath=
......@@ -26,7 +26,7 @@ MergeLineInOutPutPath=
Leave2ID=5
PHYID=7D2
BaudRate=500K
AppUpdateFilePath=I\:\\GIT\\DEV\\WZ-EF01\\s19\\WZ_EF01_UpdateApp_BV1.04_SV00.10_HV1.07_FV0.08_20240315.s19
AppUpdateFilePath=
FUNID=7DF
IsMergeCreateBin=false
IsOverWrite=false
......@@ -56,8 +56,8 @@ IsHexDisplay=true
MergeLineInXLSPath=
MergeFlashInPutFilePath=
MergeFlashIsInternal=false
MergeOutPutFilePath=I\:\\GIT\\DEV\\WZ-EF01\\s19
MergeAppFilePath=I\:\\GIT\\DEV\\WZ-EF01\\code\\bin\\WuZhengProject7.0.abs.s19
MergeOutPutFilePath=H\:\\\u4E94\u5F81\\\u4E94\u5F81EF01\\\u53D8\u66F4\\\u65B0\u5EFA\u6587\u4EF6\u5939
MergeAppFilePath=H\:\\\u4E94\u5F81\\\u4E94\u5F81EF01\\\u53D8\u66F4\\\u539F\u7A0B\u5E8F\\bin\\WuZhengProject7.0.abs.s19
MergeTelltalesXLSPath=
FillingByte=-86
ImageVersion=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment