|
@@ -15,7 +15,7 @@ static uint8 BattSendFlg = 0;
|
|
|
static void UDSAnsFunc(uint8 *rawData);
|
|
|
static void UdsAns(bool PosFlg, uint8 UdsService, uint8 UdsSubService, uint8 Idx, uint8 *AnsData, uint8 AnsDataLen);
|
|
|
static void BattSendFunc(void);
|
|
|
-static void CalAccAhFunc(void);
|
|
|
+static void CalAccAhFunc(bool isSaveFlag);
|
|
|
void CanTask(void *pvParameters)
|
|
|
{
|
|
|
uint32 timerCANIdle = 0x00;
|
|
@@ -60,46 +60,86 @@ void CanTask(void *pvParameters)
|
|
|
timerCANIdle = 0;
|
|
|
xSemaphoreGive(sleep_mutex);
|
|
|
}
|
|
|
+ if(BMS_MinCellVolt != 0 && BMS_MaxCellVolt != 0 && BMS_AverCellVolt !=0 && BMS_MinCellVolt != 0xFFFF && BMS_MaxCellVolt != 0xFFFF && BMS_AverCellVolt !=0xFFFF)
|
|
|
+ {
|
|
|
+ BBox_DataReadyFlag = 1;
|
|
|
+ }
|
|
|
} while (ret == pdPASS);
|
|
|
if ((TimerCounter - timerCounterNow) >= 100)
|
|
|
{
|
|
|
timerCANIdle = timerCANIdle + 100;
|
|
|
BcuRxDiagnose();
|
|
|
timerCounterNow = TimerCounter;
|
|
|
- //累计放电Ah和充电Ah积分计算
|
|
|
- CalAccAhFunc();
|
|
|
+
|
|
|
+// static uint8 counter1 = 0;
|
|
|
+// bool flag = false;
|
|
|
+// counter1++;
|
|
|
+// if(counter1>=100) // 10s
|
|
|
+// {
|
|
|
+// flag = true;
|
|
|
+// }
|
|
|
+// //累计放电Ah和充电Ah积分计算
|
|
|
+// CalAccAhFunc(flag);
|
|
|
+// flag = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-static void CalAccAhFunc(void)//100ms运行一次
|
|
|
+static void CalAccAhFunc(bool isSaveFlag)//100ms运行一次
|
|
|
{
|
|
|
static float tmp_DischrgAh = 0;//mah
|
|
|
static float tmp_ChrgAh = 0;//mah
|
|
|
- if(BcuRxLongError[3]==0)
|
|
|
+ static float tmp_BackChrgAh = 0;
|
|
|
+ if(BcuRxShortError[3]==0)
|
|
|
{
|
|
|
if(BMS_CharSt==1)//充电计算
|
|
|
{
|
|
|
- tmp_ChrgAh = tmp_ChrgAh + (float)(abs(BMS_PackCurr - 10000)/360);
|
|
|
+ tmp_ChrgAh = tmp_ChrgAh + (float)(abs(BMS_PackCurr/10 - 1000)/360);
|
|
|
}
|
|
|
- else if(BMS_Mode==2)//放电计算
|
|
|
+ else if(BMS_PackCurr > 10000 && BMS_PackCurr!=0xFFFF)//放电计算
|
|
|
{
|
|
|
tmp_DischrgAh = tmp_DischrgAh + (float)(abs(BMS_PackCurr - 10000)/360);
|
|
|
}
|
|
|
- if(tmp_ChrgAh>1000)
|
|
|
+ else if(BMS_PackCurr < 10000 && BMS_PackCurr > 0) //动能回收计算
|
|
|
+ {
|
|
|
+ tmp_BackChrgAh += (float)(abs(BMS_PackCurr - 10000)/360);
|
|
|
+ }
|
|
|
+
|
|
|
+ if((tmp_ChrgAh>=1000) && isSaveFlag)
|
|
|
{
|
|
|
AppConfigInfo.AppDataInfo.battChrgAccCap = AppConfigInfo.AppDataInfo.battChrgAccCap + (uint32)tmp_ChrgAh;
|
|
|
tmp_ChrgAh = 0;
|
|
|
- AppConfigInfo.appSaveFlg = 1;
|
|
|
+
|
|
|
+ if(globalSaveFlag == 0)
|
|
|
+ {
|
|
|
+ AppConfigInfo.appSaveFlg = 1;
|
|
|
+ globalSaveFlag = 1;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- if(tmp_DischrgAh>1000)
|
|
|
+ if(tmp_DischrgAh>=1000 && isSaveFlag)
|
|
|
{
|
|
|
AppConfigInfo.AppDataInfo.battDischrgAccCap = AppConfigInfo.AppDataInfo.battDischrgAccCap + (uint32)tmp_DischrgAh;
|
|
|
tmp_DischrgAh = 0;
|
|
|
- AppConfigInfo.appSaveFlg = 1;
|
|
|
+ if(globalSaveFlag == 0)
|
|
|
+ {
|
|
|
+ AppConfigInfo.appSaveFlg = 1;
|
|
|
+ globalSaveFlag = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(tmp_BackChrgAh >= 1000 && isSaveFlag)
|
|
|
+ {
|
|
|
+ AppConfigInfo.AppDataInfo.battBackChrgAccCap = AppConfigInfo.AppDataInfo.battBackChrgAccCap + (uint32)tmp_BackChrgAh;
|
|
|
+ tmp_BackChrgAh = 0;
|
|
|
+ if(globalSaveFlag == 0)
|
|
|
+ {
|
|
|
+ AppConfigInfo.appSaveFlg = 1;
|
|
|
+ globalSaveFlag = 1;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- BMS_TotalCharCapy = AppConfigInfo.AppDataInfo.battChrgAccCap/100;
|
|
|
- BMS_TotalDisCharCapy = AppConfigInfo.AppDataInfo.battDischrgAccCap/100;
|
|
|
+ BMS_TotalCharCapy = AppConfigInfo.AppDataInfo.battChrgAccCap/100;
|
|
|
+ BMS_TotalDischarCapy = AppConfigInfo.AppDataInfo.battDischrgAccCap/100;
|
|
|
+ BMS_TotalBackCharCapy = AppConfigInfo.AppDataInfo.battBackChrgAccCap/100;
|
|
|
}
|
|
|
// 注意解码超限问题
|
|
|
void BcuDecodeFunction(uint32 ID, uint8 *rawData)
|
|
@@ -204,6 +244,7 @@ void BcuDecodeFunction(uint32 ID, uint8 *rawData)
|
|
|
BMS_NegIns = (UINT16)(((*(UINT8 *)(rawData + 2)) | (*(UINT8 *)(rawData + 3) << 8)) & 0xFFFF);
|
|
|
BMS_BattVolt = (UINT16)(((*(UINT8 *)(rawData + 4)) | (*(UINT8 *)(rawData + 5) << 8)) & 0xFFFF);
|
|
|
BMS_LinkVolt = (UINT16)(((*(UINT8 *)(rawData + 6)) | (*(UINT8 *)(rawData + 7) << 8)) & 0xFFFF);
|
|
|
+ BMS_SysInsRes = min(BMS_PosIns,BMS_NegIns);
|
|
|
BcuRxFlag[5] = 0x01;
|
|
|
break;
|
|
|
case 0x1884D0F3:
|
|
@@ -232,22 +273,22 @@ void BcuDecodeFunction(uint32 ID, uint8 *rawData)
|
|
|
BcuRxFlag[8] = 0x01;
|
|
|
break;
|
|
|
case 0x1887D0F3:
|
|
|
- BMS_CharReqVolt = (UINT16)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8)) & 0xFFFF);
|
|
|
- BMS_CharReqCurr = (UINT16)(((*(UINT8 *)(rawData + 2)) | (*(UINT8 *)(rawData + 3) << 8)) & 0xFFFF);
|
|
|
- BMS_SysInsRes = (UINT16)(((*(UINT8 *)(rawData + 4)) | (*(UINT8 *)(rawData + 5) << 8)) & 0xFFFF);
|
|
|
- BMS_InsDeteSt = (UINT8)(((*(UINT8 *)(rawData + 6))) & 0x1);
|
|
|
- BMS_FtCharInsLow = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 1) & 0x1);
|
|
|
- BMS_FtCurrSenr = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 2) & 0x1);
|
|
|
- BMS_FtHeatingFilm = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 3) & 0x1);
|
|
|
- BMS_FtMainLoopPreChar = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 4) & 0x1);
|
|
|
- BMS_FtAuxLoopPreChar = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 5) & 0x1);
|
|
|
- BMS_FtACANLost = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 6) & 0x1);
|
|
|
- BMS_FtDCDC = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 7) & 0x1);
|
|
|
- BMS_FtSOCDif = (UINT8)(((*(UINT8 *)(rawData + 7))) & 0x1);
|
|
|
- BMS_FtCellOverDisChar = (UINT8)(((*(UINT8 *)(rawData + 7)) >> 1) & 0x1);
|
|
|
- BMS_FtCharOver = (UINT8)(((*(UINT8 *)(rawData + 7)) >> 2) & 0x3);
|
|
|
- BMS_FtContDisCharCurrOverLoad = (UINT8)(((*(UINT8 *)(rawData + 7)) >> 4) & 0x3);
|
|
|
- BMS_FtContCharCurrOverLoad = (UINT8)(((*(UINT8 *)(rawData + 7)) >> 6) & 0x3);
|
|
|
+// BMS_CharReqVolt = (UINT16)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8)) & 0xFFFF);
|
|
|
+// BMS_CharReqCurr = (UINT16)(((*(UINT8 *)(rawData + 2)) | (*(UINT8 *)(rawData + 3) << 8)) & 0xFFFF);
|
|
|
+// BMS_SysInsRes = (UINT16)(((*(UINT8 *)(rawData + 4)) | (*(UINT8 *)(rawData + 5) << 8)) & 0xFFFF);
|
|
|
+// BMS_InsDeteSt = (UINT8)(((*(UINT8 *)(rawData + 6))) & 0x1);
|
|
|
+// BMS_FtCharInsLow = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 1) & 0x1);
|
|
|
+// BMS_FtCurrSenr = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 2) & 0x1);
|
|
|
+// BMS_FtHeatingFilm = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 3) & 0x1);
|
|
|
+// BMS_FtMainLoopPreChar = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 4) & 0x1);
|
|
|
+// BMS_FtAuxLoopPreChar = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 5) & 0x1);
|
|
|
+// BMS_FtACANLost = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 6) & 0x1);
|
|
|
+// BMS_FtDCDC = (UINT8)(((*(UINT8 *)(rawData + 6)) >> 7) & 0x1);
|
|
|
+// BMS_FtSOCDif = (UINT8)(((*(UINT8 *)(rawData + 7))) & 0x1);
|
|
|
+// BMS_FtCellOverDisChar = (UINT8)(((*(UINT8 *)(rawData + 7)) >> 1) & 0x1);
|
|
|
+// BMS_FtCharOver = (UINT8)(((*(UINT8 *)(rawData + 7)) >> 2) & 0x3);
|
|
|
+// BMS_FtContDisCharCurrOverLoad = (UINT8)(((*(UINT8 *)(rawData + 7)) >> 4) & 0x3);
|
|
|
+// BMS_FtContCharCurrOverLoad = (UINT8)(((*(UINT8 *)(rawData + 7)) >> 6) & 0x3);
|
|
|
BcuRxFlag[9] = 0x01;
|
|
|
break;
|
|
|
case 0x1888D0F3:
|
|
@@ -433,31 +474,31 @@ void BcuDecodeFunction(uint32 ID, uint8 *rawData)
|
|
|
break;
|
|
|
case 0x18F1D0F3:
|
|
|
BMS_TotalCharEngy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16) | (*(UINT8 *)(rawData + 3) << 24)) & 0xFFFFFF);
|
|
|
- BMS_TotalDisCharEngy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
+ BMS_TotalDischarEngy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
BMS_SingleCharEngy = (UINT16)(((*(UINT8 *)(rawData + 6)) | (*(UINT8 *)(rawData + 7) << 8)) & 0xFFFF);
|
|
|
BcuRxFlag[21] = 0x01;
|
|
|
break;
|
|
|
case 0x18F2D0F3:
|
|
|
- BMS_TotalBackCharEngy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16) | (*(UINT8 *)(rawData + 3) << 24)) & 0xFFFFFF);
|
|
|
- BMS_TotalStaCharEngy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
+ BMS_TotalBackCharEngy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16)) & 0xFFFFFF); //byte1~byte3
|
|
|
+ BMS_TotalStaCharEngy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16)) & 0xFFFFFF); //byte4~byte6
|
|
|
BcuRxFlag[22] = 0x01;
|
|
|
break;
|
|
|
case 0x18F3D0F3:
|
|
|
- BMS_TotalGunCharEngy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16) | (*(UINT8 *)(rawData + 3) << 24)) & 0xFFFFFF);
|
|
|
- BMS_TotalGunCharCapy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
+ BMS_TotalGunCharEngy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16)) & 0xFFFFFF); //byte1~byte3
|
|
|
+// BMS_TotalGunCharCapy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
BcuRxFlag[23] = 0x01;
|
|
|
break;
|
|
|
case 0x18F4D0F3:
|
|
|
- BMS_TotalCharCapy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16) | (*(UINT8 *)(rawData + 3) << 24)) & 0xFFFFFF);
|
|
|
- BMS_TotalDisCharCapy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
+ BMS_TotalCharCapy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16) ) & 0xFFFFFF); //byte1~byte3
|
|
|
+// BMS_TotalDischarCapy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
BMS_SingleCharCapy = (UINT16)(((*(UINT8 *)(rawData + 6)) | (*(UINT8 *)(rawData + 7) << 8)) & 0xFFFF);
|
|
|
BcuRxFlag[24] = 0x01;
|
|
|
break;
|
|
|
case 0x18F5D0F3:
|
|
|
- BMS_TotalBackCharCapy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16) | (*(UINT8 *)(rawData + 3) << 24)) & 0xFFFFFF);
|
|
|
- BMS_TotalStaCharCapy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
- BMS_HVBranNum = (UINT8)(((*(UINT8 *)(rawData + 6))) & 0xFF);
|
|
|
- BMS_SingleHVBranchCellNum = (UINT8)(((*(UINT8 *)(rawData + 7))) & 0xFF);
|
|
|
+// BMS_TotalBackCharCapy = (UINT32)(((*(UINT8 *)(rawData + 0)) | (*(UINT8 *)(rawData + 1) << 8) | (*(UINT8 *)(rawData + 2) << 16) | (*(UINT8 *)(rawData + 3) << 24)) & 0xFFFFFF);
|
|
|
+// BMS_TotalStaCharCapy = (UINT32)(((*(UINT8 *)(rawData + 3)) | (*(UINT8 *)(rawData + 4) << 8) | (*(UINT8 *)(rawData + 5) << 16) | (*(UINT8 *)(rawData + 6) << 24)) & 0xFFFFFF);
|
|
|
+// BMS_HVBranNum = (UINT8)(((*(UINT8 *)(rawData + 6))) & 0xFF);
|
|
|
+// BMS_SingleHVBranchCellNum = (UINT8)(((*(UINT8 *)(rawData + 7))) & 0xFF);
|
|
|
BcuRxFlag[25] = 0x01;
|
|
|
break;
|
|
|
case 0x18FF45F4:
|
|
@@ -717,8 +758,11 @@ static void UDSAnsFunc(uint8 *rawData)
|
|
|
if (deviceSnRecvFlg == 0x1F)
|
|
|
{
|
|
|
deviceSnRecvFlg = 0;
|
|
|
- AppConfigInfo.appSaveFlg = true;
|
|
|
AppConfigInfo.eolFlg = true;
|
|
|
+ AppConfigInfo.appSaveFlg = false;
|
|
|
+ HAL_EEP_Write(200, (uint8 *)&AppConfigInfo, sizeof(AppConfigInfo));
|
|
|
+ AppConfigInfo.appSaveFlg = true;
|
|
|
+
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -911,7 +955,7 @@ void BcuRxDiagnose(void) // 100ms调用一次
|
|
|
{
|
|
|
|
|
|
static UINT32 TimeCounter = 0; // ms
|
|
|
- TimeCounter = TimeCounter + 10; //
|
|
|
+ TimeCounter = TimerCounter; //
|
|
|
for (UINT8 i = 0; i < sizeof(BcuInTable) / 4; i++)
|
|
|
{
|
|
|
if (BcuRxFlag[i] == 1) // received msg, and clear the error conter
|
|
@@ -932,12 +976,12 @@ void BcuRxDiagnose(void) // 100ms调用一次
|
|
|
}
|
|
|
else if (BcuRxErrorCounter[i] >= 13)
|
|
|
{
|
|
|
- BcuRxShortError[i] = 0;
|
|
|
+ BcuRxShortError[i] = 1;
|
|
|
BcuRxLongError[i] = 1;
|
|
|
-// BcuRxMsgSetInvalidValue(BcuInTable[i]);
|
|
|
- BcuRxErrorCounter[i] = 0;
|
|
|
+ BcuRxMsgSetInvalidValue(BcuInTable[i]);
|
|
|
+// BcuRxErrorCounter[i] = 0;
|
|
|
}
|
|
|
- else if (BcuRxErrorCounter[i] == 0xFF)
|
|
|
+ if (BcuRxErrorCounter[i] == 0xFF)
|
|
|
{
|
|
|
BcuRxErrorCounter[i] = 0xFE;
|
|
|
}
|
|
@@ -1013,98 +1057,98 @@ void BcuRxMsgSetInvalidValue(uint32 ID)
|
|
|
switch (ID)
|
|
|
{
|
|
|
case 0x1801D0F3:
|
|
|
- BMS_ReqVIN = 0xFF;
|
|
|
- BMS_ReqHVOff = 0xFF;
|
|
|
+// BMS_ReqVIN = 0xFF;
|
|
|
+// BMS_ReqHVOff = 0xFF;
|
|
|
break;
|
|
|
case 0x1801D8F3:
|
|
|
- BMS_SoftwareVersion = 0xFFFF;
|
|
|
- BMS_HardwareVersion = 0xFFFF;
|
|
|
- BMS_ProtocolEditionH = 0xFF;
|
|
|
- BMS_ProtocolEditionL = 0xFF;
|
|
|
+// BMS_SoftwareVersion = 0xFFFF;
|
|
|
+// BMS_HardwareVersion = 0xFFFF;
|
|
|
+// BMS_ProtocolEditionH = 0xFF;
|
|
|
+// BMS_ProtocolEditionL = 0xFF;
|
|
|
break;
|
|
|
case 0x1880D0F3:
|
|
|
- BMS_CharDevNum = 0xFF;
|
|
|
- BMS_FtPosRly = 0xFF;
|
|
|
- BMS_FtNegRly = 0xFF;
|
|
|
- BMS_FtPosCharRly1 = 0xFF;
|
|
|
- BMS_FtNegCharRly1 = 0xFF;
|
|
|
- BMS_FtPosCharRly2 = 0xFF;
|
|
|
- BMS_FtNegCharRly2 = 0xFF;
|
|
|
- BMS_FtHeatRly1 = 0xFF;
|
|
|
- BMS_FtHeatRly2 = 0xFF;
|
|
|
- BMS_StPosRly = 0xFF;
|
|
|
- BMS_StNegRly = 0xFF;
|
|
|
- BMS_StPreCharRly = 0xFF;
|
|
|
- BMS_StPosCharRly1 = 0xFF;
|
|
|
- BMS_StNegCharRly1 = 0xFF;
|
|
|
- BMS_StPosCharRly2 = 0xFF;
|
|
|
- BMS_StNegCharRly2 = 0xFF;
|
|
|
- BMS_FtAuxRelayWeld = 0xFF;
|
|
|
- BMS_BraOpenCirc = 0xFF;
|
|
|
- BMS_FtBackCharCurrOutLim = 0xFF;
|
|
|
- BMS_FtPosRlyOpen = 0xFF;
|
|
|
- BMS_FtNegRlyOpen = 0xFF;
|
|
|
- BMS_FtPosCharRly1Open = 0xFF;
|
|
|
- BMS_FtPosCharRly2Open = 0xFF;
|
|
|
- BMS_FtNegCharRly1Open = 0xFF;
|
|
|
- BMS_FtNegCharRly2Open = 0xFF;
|
|
|
- BMS_FtTMSContClose = 0xFF;
|
|
|
- BMS_FtTMSContOpen = 0xFF;
|
|
|
- BMS_FtTMS = 0xFF;
|
|
|
- BMS_Ft24VSpy = 0xFF;
|
|
|
- BMS_FtPACKSelfProt = 0xFF;
|
|
|
- BMS_FtCharSockTempOver = 0xFF;
|
|
|
- BMS_FtTempOutCtrl = 0xFF;
|
|
|
- BMS_StPosHeatRly = 0xFF;
|
|
|
- BMS_StNegHeatRly = 0xFF;
|
|
|
- BMS_CharSysNum = 0xFF;
|
|
|
- BMS_FtCode = 0xFF;
|
|
|
+// BMS_CharDevNum = 0xFF;
|
|
|
+// BMS_FtPosRly = 0xFF;
|
|
|
+// BMS_FtNegRly = 0xFF;
|
|
|
+// BMS_FtPosCharRly1 = 0xFF;
|
|
|
+// BMS_FtNegCharRly1 = 0xFF;
|
|
|
+// BMS_FtPosCharRly2 = 0xFF;
|
|
|
+// BMS_FtNegCharRly2 = 0xFF;
|
|
|
+// BMS_FtHeatRly1 = 0xFF;
|
|
|
+// BMS_FtHeatRly2 = 0xFF;
|
|
|
+// BMS_StPosRly = 0xFF;
|
|
|
+// BMS_StNegRly = 0xFF;
|
|
|
+// BMS_StPreCharRly = 0xFF;
|
|
|
+// BMS_StPosCharRly1 = 0xFF;
|
|
|
+// BMS_StNegCharRly1 = 0xFF;
|
|
|
+// BMS_StPosCharRly2 = 0xFF;
|
|
|
+// BMS_StNegCharRly2 = 0xFF;
|
|
|
+// BMS_FtAuxRelayWeld = 0xFF;
|
|
|
+// BMS_BraOpenCirc = 0xFF;
|
|
|
+// BMS_FtBackCharCurrOutLim = 0xFF;
|
|
|
+// BMS_FtPosRlyOpen = 0xFF;
|
|
|
+// BMS_FtNegRlyOpen = 0xFF;
|
|
|
+// BMS_FtPosCharRly1Open = 0xFF;
|
|
|
+// BMS_FtPosCharRly2Open = 0xFF;
|
|
|
+// BMS_FtNegCharRly1Open = 0xFF;
|
|
|
+// BMS_FtNegCharRly2Open = 0xFF;
|
|
|
+// BMS_FtTMSContClose = 0xFF;
|
|
|
+// BMS_FtTMSContOpen = 0xFF;
|
|
|
+// BMS_FtTMS = 0xFF;
|
|
|
+// BMS_Ft24VSpy = 0xFF;
|
|
|
+// BMS_FtPACKSelfProt = 0xFF;
|
|
|
+// BMS_FtCharSockTempOver = 0xFF;
|
|
|
+// BMS_FtTempOutCtrl = 0xFF;
|
|
|
+// BMS_StPosHeatRly = 0xFF;
|
|
|
+// BMS_StNegHeatRly = 0xFF;
|
|
|
+// BMS_CharSysNum = 0xFF;
|
|
|
+// BMS_FtCode = 0xFF;
|
|
|
break;
|
|
|
case 0x1881D0F3:
|
|
|
- BMS_ST1CheckSum = 0xFF;
|
|
|
- BMS_ST1Counter = 0xFF;
|
|
|
- BMS_Mode = 0xFF;
|
|
|
- BMS_AuxRlySt = 0xFF;
|
|
|
- BMS_BattBalaSt = 0xFF;
|
|
|
- BMS_CharGunSt = 0xFF;
|
|
|
- BMS_CharMode = 0xFF;
|
|
|
- BMS_CharSt = 0xFF;
|
|
|
- BMS_FtLvl = 0xFF;
|
|
|
- BMS_FtCellTempDiff = 0xFF;
|
|
|
- BMS_FtCellTempHigh = 0xFF;
|
|
|
- BMS_FtPACKOverVolt = 0xFF;
|
|
|
- BMS_FtPACKUndeVolt = 0xFF;
|
|
|
- BMS_FtSOCLow = 0xFF;
|
|
|
- BMS_FtCellOverVolt = 0xFF;
|
|
|
- BMS_FtCellUndeVolt = 0xFF;
|
|
|
- BMS_FtIns = 0xFF;
|
|
|
- BMS_FtCellOverVoltDiff = 0xFF;
|
|
|
- BMS_FtCharCurrOver = 0xFF;
|
|
|
- BMS_FtDisCharCurrOver = 0xFF;
|
|
|
- BMS_FtCellTempLow = 0xFF;
|
|
|
- BMS_FtBranVoltDifOver = 0xFF;
|
|
|
- BMS_FtBMSHardWare = 0xFF;
|
|
|
- BMS_FtSOCHigh = 0xFF;
|
|
|
- BMS_FtSOCJump = 0xFF;
|
|
|
- BMS_FtInCom = 0xFF;
|
|
|
- BMS_FtSysMism = 0xFF;
|
|
|
- BMS_FtHvIntLock = 0xFF;
|
|
|
- BMS_FtSmoke = 0xFF;
|
|
|
- BMS_FtFire = 0xFF;
|
|
|
- BMS_FtNum = 0xFF;
|
|
|
+// BMS_ST1CheckSum = 0xFF;
|
|
|
+// BMS_ST1Counter = 0xFF;
|
|
|
+// BMS_Mode = 0xFF;
|
|
|
+// BMS_AuxRlySt = 0xFF;
|
|
|
+// BMS_BattBalaSt = 0xFF;
|
|
|
+// BMS_CharGunSt = 0xFF;
|
|
|
+// BMS_CharMode = 0xFF;
|
|
|
+ BMS_CharSt = 0x02;
|
|
|
+// BMS_FtLvl = 0xFF;
|
|
|
+// BMS_FtCellTempDiff = 0xFF;
|
|
|
+// BMS_FtCellTempHigh = 0xFF;
|
|
|
+// BMS_FtPACKOverVolt = 0xFF;
|
|
|
+// BMS_FtPACKUndeVolt = 0xFF;
|
|
|
+// BMS_FtSOCLow = 0xFF;
|
|
|
+// BMS_FtCellOverVolt = 0xFF;
|
|
|
+// BMS_FtCellUndeVolt = 0xFF;
|
|
|
+// BMS_FtIns = 0xFF;
|
|
|
+// BMS_FtCellOverVoltDiff = 0xFF;
|
|
|
+// BMS_FtCharCurrOver = 0xFF;
|
|
|
+// BMS_FtDisCharCurrOver = 0xFF;
|
|
|
+// BMS_FtCellTempLow = 0xFF;
|
|
|
+// BMS_FtBranVoltDifOver = 0xFF;
|
|
|
+// BMS_FtBMSHardWare = 0xFF;
|
|
|
+// BMS_FtSOCHigh = 0xFF;
|
|
|
+// BMS_FtSOCJump = 0xFF;
|
|
|
+// BMS_FtInCom = 0xFF;
|
|
|
+// BMS_FtSysMism = 0xFF;
|
|
|
+// BMS_FtHvIntLock = 0xFF;
|
|
|
+// BMS_FtSmoke = 0xFF;
|
|
|
+// BMS_FtFire = 0xFF;
|
|
|
+// BMS_FtNum = 0xFF;
|
|
|
break;
|
|
|
case 0x1882D0F3:
|
|
|
- BMS_PackSOC = 0xFF;
|
|
|
- BMS_PackSOH = 0xFF;
|
|
|
- BMS_PackCurr = 0xFFFF;
|
|
|
- BMS_MaxCharCurr = 0xFFFF;
|
|
|
- BMS_MaxDisCharCurr = 0xFFFF;
|
|
|
+// BMS_PackSOC = 0xFF;
|
|
|
+// BMS_PackSOH = 0xFF;
|
|
|
+ BMS_PackCurr = 0x2710;
|
|
|
+// BMS_MaxCharCurr = 0xFFFF;
|
|
|
+// BMS_MaxDisCharCurr = 0xFFFF;
|
|
|
break;
|
|
|
case 0x1883D0F3:
|
|
|
BMS_PosIns = 0xFFFF;
|
|
|
BMS_NegIns = 0xFFFF;
|
|
|
- BMS_BattVolt = 0xFFFF;
|
|
|
- BMS_LinkVolt = 0xFFFF;
|
|
|
+// BMS_BattVolt = 0xFFFF;
|
|
|
+// BMS_LinkVolt = 0xFFFF;
|
|
|
break;
|
|
|
case 0x1884D0F3:
|
|
|
BMS_MaxCellTemp = 0xFF;
|
|
@@ -1129,95 +1173,95 @@ void BcuRxMsgSetInvalidValue(uint32 ID)
|
|
|
BMS_ContDisCharCurr = 0xFFFF;
|
|
|
break;
|
|
|
case 0x1887D0F3:
|
|
|
- BMS_CharReqVolt = 0xFFFF;
|
|
|
- BMS_CharReqCurr = 0xFFFF;
|
|
|
- BMS_SysInsRes = 0xFFFF;
|
|
|
- BMS_InsDeteSt = 0xFF;
|
|
|
- BMS_FtCharInsLow = 0xFF;
|
|
|
- BMS_FtCurrSenr = 0xFF;
|
|
|
- BMS_FtHeatingFilm = 0xFF;
|
|
|
- BMS_FtMainLoopPreChar = 0xFF;
|
|
|
- BMS_FtAuxLoopPreChar = 0xFF;
|
|
|
- BMS_FtACANLost = 0xFF;
|
|
|
- BMS_FtDCDC = 0xFF;
|
|
|
- BMS_FtSOCDif = 0xFF;
|
|
|
- BMS_FtCellOverDisChar = 0xFF;
|
|
|
- BMS_FtCharOver = 0xFF;
|
|
|
- BMS_FtContDisCharCurrOverLoad = 0xFF;
|
|
|
- BMS_FtContCharCurrOverLoad = 0xFF;
|
|
|
+// BMS_CharReqVolt = 0xFFFF;
|
|
|
+// BMS_CharReqCurr = 0xFFFF;
|
|
|
+// BMS_SysInsRes = 0xFFFF;
|
|
|
+// BMS_InsDeteSt = 0xFF;
|
|
|
+// BMS_FtCharInsLow = 0xFF;
|
|
|
+// BMS_FtCurrSenr = 0xFF;
|
|
|
+// BMS_FtHeatingFilm = 0xFF;
|
|
|
+// BMS_FtMainLoopPreChar = 0xFF;
|
|
|
+// BMS_FtAuxLoopPreChar = 0xFF;
|
|
|
+// BMS_FtACANLost = 0xFF;
|
|
|
+// BMS_FtDCDC = 0xFF;
|
|
|
+// BMS_FtSOCDif = 0xFF;
|
|
|
+// BMS_FtCellOverDisChar = 0xFF;
|
|
|
+// BMS_FtCharOver = 0xFF;
|
|
|
+// BMS_FtContDisCharCurrOverLoad = 0xFF;
|
|
|
+// BMS_FtContCharCurrOverLoad = 0xFF;
|
|
|
break;
|
|
|
case 0x1888D0F3:
|
|
|
- BMS_MaxDisCharPwr = 0xFFFF;
|
|
|
- BMS_MaxCharPwr = 0xFFFF;
|
|
|
- BMS_ContDisCharPwr = 0xFFFF;
|
|
|
- BMS_ContCharPwr = 0xFFFF;
|
|
|
+// BMS_MaxDisCharPwr = 0xFFFF;
|
|
|
+// BMS_MaxCharPwr = 0xFFFF;
|
|
|
+// BMS_ContDisCharPwr = 0xFFFF;
|
|
|
+// BMS_ContCharPwr = 0xFFFF;
|
|
|
break;
|
|
|
case 0x1889D0F3:
|
|
|
- BMS_InstEngyCons = 0xFFFF;
|
|
|
- BMS_TotalEngyCons = 0xFFFF;
|
|
|
- BMS_SOE = 0xFFFF;
|
|
|
- BMS_RmanCharTime = 0xFFFF;
|
|
|
+// BMS_InstEngyCons = 0xFFFF;
|
|
|
+// BMS_TotalEngyCons = 0xFFFF;
|
|
|
+// BMS_SOE = 0xFFFF;
|
|
|
+// BMS_RmanCharTime = 0xFFFF;
|
|
|
break;
|
|
|
case 0x188AD0F3:
|
|
|
- BMS_Gun1DCNegTemp = 0xFF;
|
|
|
- BMS_Gun1DCPosTemp = 0xFF;
|
|
|
- BMS_Gun2DCNegTemp = 0xFF;
|
|
|
- BMS_Gun2DCPosTemp = 0xFF;
|
|
|
- BMS_CurrHeatSt = 0xFF;
|
|
|
- BMS_CurrCoolSt = 0xFF;
|
|
|
- BMS_FtCharCnct = 0xFF;
|
|
|
- BMS_FtOverDisCharCurrDuringChar = 0xFF;
|
|
|
- BMS_FtCharNTC = 0xFF;
|
|
|
- BMS_FtELock = 0xFF;
|
|
|
- BMS_CharNum = 0xFFFF;
|
|
|
+// BMS_Gun1DCNegTemp = 0xFF;
|
|
|
+// BMS_Gun1DCPosTemp = 0xFF;
|
|
|
+// BMS_Gun2DCNegTemp = 0xFF;
|
|
|
+// BMS_Gun2DCPosTemp = 0xFF;
|
|
|
+// BMS_CurrHeatSt = 0xFF;
|
|
|
+// BMS_CurrCoolSt = 0xFF;
|
|
|
+// BMS_FtCharCnct = 0xFF;
|
|
|
+// BMS_FtOverDisCharCurrDuringChar = 0xFF;
|
|
|
+// BMS_FtCharNTC = 0xFF;
|
|
|
+// BMS_FtELock = 0xFF;
|
|
|
+// BMS_CharNum = 0xFFFF;
|
|
|
break;
|
|
|
case 0x18C1D0F3:
|
|
|
- BMS_CellVoltFramNum = 0xFF;
|
|
|
- memset(canRecvFramNum,0x00,sizeof(canRecvFramNum));
|
|
|
- BMS_CellRecvFlg = 0;
|
|
|
- for (UINT16 i = 0; i < sizeof(BMS_CellVolt) / 2; i++)
|
|
|
- {
|
|
|
- BMS_CellVolt[i] = 0xFFFF;
|
|
|
- }
|
|
|
+// BMS_CellVoltFramNum = 0xFF;
|
|
|
+// memset(canRecvFramNum,0x00,sizeof(canRecvFramNum));
|
|
|
+// BMS_CellRecvFlg = 0;
|
|
|
+// for (UINT16 i = 0; i < sizeof(BMS_CellVolt) / 2; i++)
|
|
|
+// {
|
|
|
+// BMS_CellVolt[i] = 0xFFFF;
|
|
|
+// }
|
|
|
break;
|
|
|
case 0x18C2D0F3:
|
|
|
- BMS_CellTempFramNum = 0xFF;
|
|
|
- BMS_CSC_Code = 0xFF;
|
|
|
- for (UINT8 i = 0; i < sizeof(BMS_CellTemp); i++)
|
|
|
- {
|
|
|
- BMS_CellTemp[i] = 0xFF;
|
|
|
- }
|
|
|
+// BMS_CellTempFramNum = 0xFF;
|
|
|
+// BMS_CSC_Code = 0xFF;
|
|
|
+// for (UINT8 i = 0; i < sizeof(BMS_CellTemp); i++)
|
|
|
+// {
|
|
|
+// BMS_CellTemp[i] = 0xFF;
|
|
|
+// }
|
|
|
break;
|
|
|
case 0x18E1D0F3:
|
|
|
- BMS_Checksum = 0xFF;
|
|
|
- BMS_PackComp = 0xFF;
|
|
|
- BMS_BattCodeLeng = 0xFF;
|
|
|
- BMS_SN[0] = 0xFF;
|
|
|
- BMS_SN[1] = 0xFF;
|
|
|
- BMS_SN[2] = 0xFF;
|
|
|
- BMS_SN[3] = 0xFF;
|
|
|
- BMS_SN[4] = 0xFF;
|
|
|
- BMS_SN[5] = 0xFF;
|
|
|
+// BMS_Checksum = 0xFF;
|
|
|
+// BMS_PackComp = 0xFF;
|
|
|
+// BMS_BattCodeLeng = 0xFF;
|
|
|
+// BMS_SN[0] = 0xFF;
|
|
|
+// BMS_SN[1] = 0xFF;
|
|
|
+// BMS_SN[2] = 0xFF;
|
|
|
+// BMS_SN[3] = 0xFF;
|
|
|
+// BMS_SN[4] = 0xFF;
|
|
|
+// BMS_SN[5] = 0xFF;
|
|
|
break;
|
|
|
case 0x18E2D0F3:
|
|
|
- BMS_Checksum = 0xFF;
|
|
|
- BMS_SN[6] = 0xFF;
|
|
|
- BMS_SN[7] = 0xFF;
|
|
|
- BMS_SN[8] = 0xFF;
|
|
|
- BMS_SN[9] = 0xFF;
|
|
|
- BMS_SN[10] = 0xFF;
|
|
|
- BMS_SN[11] = 0xFF;
|
|
|
- BMS_SN[12] = 0xFF;
|
|
|
+// BMS_Checksum = 0xFF;
|
|
|
+// BMS_SN[6] = 0xFF;
|
|
|
+// BMS_SN[7] = 0xFF;
|
|
|
+// BMS_SN[8] = 0xFF;
|
|
|
+// BMS_SN[9] = 0xFF;
|
|
|
+// BMS_SN[10] = 0xFF;
|
|
|
+// BMS_SN[11] = 0xFF;
|
|
|
+// BMS_SN[12] = 0xFF;
|
|
|
break;
|
|
|
case 0x18E3D0F3:
|
|
|
- BMS_Checksum = 0xFF;
|
|
|
- BMS_SN[13] = 0xFF;
|
|
|
- BMS_SN[14] = 0xFF;
|
|
|
- BMS_SN[15] = 0xFF;
|
|
|
- BMS_SN[16] = 0xFF;
|
|
|
- BMS_SN[17] = 0xFF;
|
|
|
- BMS_SN[18] = 0xFF;
|
|
|
- BMS_SN[19] = 0xFF;
|
|
|
+// BMS_Checksum = 0xFF;
|
|
|
+// BMS_SN[13] = 0xFF;
|
|
|
+// BMS_SN[14] = 0xFF;
|
|
|
+// BMS_SN[15] = 0xFF;
|
|
|
+// BMS_SN[16] = 0xFF;
|
|
|
+// BMS_SN[17] = 0xFF;
|
|
|
+// BMS_SN[18] = 0xFF;
|
|
|
+// BMS_SN[19] = 0xFF;
|
|
|
break;
|
|
|
case 0x18E4D0F3:
|
|
|
BMS_Checksum = 0xFF;
|
|
@@ -1230,11 +1274,11 @@ void BcuRxMsgSetInvalidValue(uint32 ID)
|
|
|
// BMS_SN[26] = 0xFF;
|
|
|
break;
|
|
|
case 0x18E5D0F3:
|
|
|
- BMS_BattRateCap = 0xFFFF;
|
|
|
- BMS_BattRateVolt = 0xFFFF;
|
|
|
- BMS_BattRateEngy = 0xFFFF;
|
|
|
- BMS_BattType = 0xFF;
|
|
|
- BMS_CoolType = 0xFF;
|
|
|
+// BMS_BattRateCap = 0xFFFF;
|
|
|
+// BMS_BattRateVolt = 0xFFFF;
|
|
|
+// BMS_BattRateEngy = 0xFFFF;
|
|
|
+// BMS_BattType = 0xFF;
|
|
|
+// BMS_CoolType = 0xFF;
|
|
|
break;
|
|
|
case 0x18E6D0F3:
|
|
|
BMS_CSC_Total = 0xFF;
|
|
@@ -1263,29 +1307,29 @@ void BcuRxMsgSetInvalidValue(uint32 ID)
|
|
|
// BMS_SingleCharCapy = 0xFFFF;
|
|
|
break;
|
|
|
case 0x18F5D0F3:
|
|
|
- BMS_TotalBackCharCapy = 0xFFFFFFFF;
|
|
|
- BMS_TotalStaCharCapy = 0xFFFFFFFF;
|
|
|
- BMS_HVBranNum = 0xFF;
|
|
|
- BMS_SingleHVBranchCellNum = 0xFF;
|
|
|
+// BMS_TotalBackCharCapy = 0xFFFFFFFF;
|
|
|
+// BMS_TotalStaCharCapy = 0xFFFFFFFF;
|
|
|
+// BMS_HVBranNum = 0xFF;
|
|
|
+// BMS_SingleHVBranchCellNum = 0xFF;
|
|
|
break;
|
|
|
case 0x18FF45F4:
|
|
|
- BMS_ReqMode = 0xFF;
|
|
|
- BMS_HVCmd = 0xFF;
|
|
|
- BMS_ChgSts = 0xFF;
|
|
|
- BMS_HVRelaySts = 0xFF;
|
|
|
- BMS_HVVolt = 0xFFFF;
|
|
|
- BMS_SetTemp = 0xFF;
|
|
|
- BMS_Life = 0xFF;
|
|
|
- BMS_CRC = 0xFF;
|
|
|
+// BMS_ReqMode = 0xFF;
|
|
|
+// BMS_HVCmd = 0xFF;
|
|
|
+// BMS_ChgSts = 0xFF;
|
|
|
+// BMS_HVRelaySts = 0xFF;
|
|
|
+// BMS_HVVolt = 0xFFFF;
|
|
|
+// BMS_SetTemp = 0xFF;
|
|
|
+// BMS_Life = 0xFF;
|
|
|
+// BMS_CRC = 0xFF;
|
|
|
break;
|
|
|
case 0x18FFC13A:
|
|
|
- TMS_WorkStatus = 0xFF;
|
|
|
- TMS_HVRelayST = 0xFF;
|
|
|
- TMS_OutletTemp = 0xFF;
|
|
|
- TMS_InletTemp = 0xFF;
|
|
|
- TMS_ReqPow = 0xFFFF;
|
|
|
- TMS_ErrCode = 0xFF;
|
|
|
- TMS_FaultLevel = 0xFF;
|
|
|
+// TMS_WorkStatus = 0xFF;
|
|
|
+// TMS_HVRelayST = 0xFF;
|
|
|
+// TMS_OutletTemp = 0xFF;
|
|
|
+// TMS_InletTemp = 0xFF;
|
|
|
+// TMS_ReqPow = 0xFFFF;
|
|
|
+// TMS_ErrCode = 0xFF;
|
|
|
+// TMS_FaultLevel = 0xFF;
|
|
|
break;
|
|
|
default:
|
|
|
break;
|