CHENJIE-PC\QiXiang_CHENJIE 2 лет назад
Родитель
Сommit
dec9542560

+ 2 - 2
Project_Settings/Debugger/S32K146_4G_Debug_FLASH_PNE.launch

@@ -214,7 +214,7 @@
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
 <listEntry value="4"/>
 </listAttribute>
-<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#13;&#10;"/>
+<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536806032&quot; label=&quot;RX_Buffer[UART_LPUART2]&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536823956&quot; label=&quot;GpsBufferGet&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;255&quot; label=&quot;SocketId&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
-<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x1fff0167,0x237a0,0x1fff4218,0x1fff01fc,0x1fff01c8,0x1fff4228,0x237d8,0x1fff01d7,0x1fff01d5,0x1fff01d3,0x1fff01d6,0x1fff01d4,0x1fff01d2,0x1fff01d0,0x1fff01c0"/>
+<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x1fff01d2,0x1fff01d0,0x1fff01c0,0x1fff4b00,0x1fff4b51,0x1fff4b56,0x1fff0290,0x1fff4894,0x1fff04e8,0x1fff01c8,0x1fff2ce8,0x1fff0100,0x1fff08d0,0x1fff4b48,0x1fff4b50"/>
 </launchConfiguration>

+ 162 - 127
src/AppFuncLib.c

@@ -3,7 +3,7 @@
  * @Date         : 2022-01-21 09:28:20
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-02-11 16:28:11
+ * @LastEditTime : 2022-02-14 15:23:30
  * @Description  : file content
  * @FilePath     : \S32K146_4G\src\AppFuncLib.c
  */
@@ -175,158 +175,193 @@ char *Myitoa(int value, char *result, int base)
 }
 
 /************************************************************************
-* @brief 整数转字符串
-* @param[in] num 整数
-* @param[out] buf 字符串
-* @return 返回字符串长度
-************************************************************************/
+ * @brief 整数转字符串
+ * @param[in] num 整数
+ * @param[out] buf 字符串
+ * @return 返回字符串长度
+ ************************************************************************/
 inline int _itoa(int num, char buf[32])
 {
-	return _i2a(num, buf, 10);
+    return _i2a(num, buf, 10);
 }
 
 /************************************************************************
-* @brief 整数转字符串
-* @param[in] num 整数
-* @param[out] buf 字符串
-* @param[in] radix 进位制整数
-* @return 返回字符串长度
-************************************************************************/
+ * @brief 整数转字符串
+ * @param[in] num 整数
+ * @param[out] buf 字符串
+ * @param[in] radix 进位制整数
+ * @return 返回字符串长度
+ ************************************************************************/
 int _i2a(int num, char buf[32], int radix)
 {
-	static const char s[] = "0123456789abcdef";
-	int n = num, R = radix;
-	char *dst = buf;
-	if (n < 0) { *dst++ = '-'; n = -n; }
-	if (n < 10)
-	{
-		*dst++ = s[n]; *dst = 0;
-	}else
-	{
-		char tmp[32], *p = tmp;
-		while (n) { *p++ = s[n % R]; n /= R; }
-		while (--p != tmp) *dst++ = *p;
-		*dst++ = *tmp; *dst = 0;
-	}
-	return dst-buf;
+    static const char s[] = "0123456789abcdef";
+    int n = num, R = radix;
+    char *dst = buf;
+    if (n < 0)
+    {
+        *dst++ = '-';
+        n = -n;
+    }
+    if (n < 10)
+    {
+        *dst++ = s[n];
+        *dst = 0;
+    }
+    else
+    {
+        char tmp[32], *p = tmp;
+        while (n)
+        {
+            *p++ = s[n % R];
+            n /= R;
+        }
+        while (--p != tmp)
+            *dst++ = *p;
+        *dst++ = *tmp;
+        *dst = 0;
+    }
+    return dst - buf;
 }
 
 /************************************************************************
-* @brief 浮点数转字符串
-* @param[in] val 浮点数
-* @param[out] buf 字符串
-* @param[in] eps 精度(小数位)
-* @return 返回字符串长度
-************************************************************************/
+ * @brief 浮点数转字符串
+ * @param[in] val 浮点数
+ * @param[out] buf 字符串
+ * @param[in] eps 精度(小数位)
+ * @return 返回字符串长度
+ ************************************************************************/
 int _ftoa(double val, char buf[32], int eps)
 {
-	double f = val;
-	char *p = buf;
-	if (val < 0) { *p++ = '-'; f = -f; }
-	int n = f;
-	int len = _itoa(n, p);
-	return len + __ftoa(f - n, p + len, eps);
+    double f = val;
+    char *p = buf;
+    if (val < 0)
+    {
+        *p++ = '-';
+        f = -f;
+    }
+    int n = f;
+    int len = _itoa(n, p);
+    return len + __ftoa(f - n, p + len, eps);
 }
 
 /************************************************************************
-* @brief 浮点数转字符串:范围(-1, 1)
-* @param[in] val 浮点数
-* @param[out] buf 字符串
-* @param[in] eps 精度(小数位)
-* @return 返回字符串长度
-************************************************************************/
+ * @brief 浮点数转字符串:范围(-1, 1)
+ * @param[in] val 浮点数
+ * @param[out] buf 字符串
+ * @param[in] eps 精度(小数位)
+ * @return 返回字符串长度
+ ************************************************************************/
 int __ftoa(double val, char buf[32], int eps)
 {
-	double f = val;
-	char *p = buf;
-	static const char s[] = "0123456789";
-	if (f<0){*p++ = '-'; f = -f;}*p++ = '.';
-	for (int i = eps+1, n; --i; ++p, f -= n)
-		*p = s[n = f *= 10.0];
-	*p = 0;
-	return p-buf;
+    double f = val;
+    char *p = buf;
+    static const char s[] = "0123456789";
+    if (f < 0)
+    {
+        *p++ = '-';
+        f = -f;
+    }
+    *p++ = '.';
+    for (int i = eps + 1, n; --i; ++p, f -= n)
+        *p = s[n = f *= 10.0];
+    *p = 0;
+    return p - buf;
 }
 
 /************************************************************************
-* @brief 替换sprintf
-* @ref 可变长参数列表误区与陷阱——va_arg不可接受的类型
-* http://www.cppblog.com/ownwaterloo/archive/2009/04/21/80655.aspx
-************************************************************************/
+ * @brief 替换sprintf
+ * @ref 可变长参数列表误区与陷阱——va_arg不可接受的类型
+ * http://www.cppblog.com/ownwaterloo/archive/2009/04/21/80655.aspx
+ ************************************************************************/
 int _sprintf(char *dst, const char *format, ...)
 {
-	char *s = dst;
-	const char *f = format;
-	va_list ap, another;
-	va_start(ap, format);
-	va_copy(another, ap);
-	while (*f)
-	{
-		int n = 1;
-		if ('%' != *f)
-		{
-			*s = *f;
-		}else{
-			++f;
-			switch (*f)
-			{
-			case 's':// 字符串
-				{
-					const char *p = va_arg(ap, char*);
-					n = strlen(p);
-					memcpy(s, p, n);
-				}
-				break;
+    char *s = dst;
+    const char *f = format;
+    va_list ap, another;
+    va_start(ap, format);
+    va_copy(another, ap);
+    while (*f)
+    {
+        int n = 1;
+        if ('%' != *f)
+        {
+            *s = *f;
+        }
+        else
+        {
+            ++f;
+            switch (*f)
+            {
+            case 's': // 字符串
+            {
+                const char *p = va_arg(ap, char *);
+                n = strlen(p);
+                memcpy(s, p, n);
+            }
+            break;
 
-			case 'd': case 'u':// 整数
-				{
-					char buf[32];
-					n = _itoa(va_arg(ap, int), buf);
-					memcpy(s, buf, n);
-				}
-				break;
+            case 'd':
+            case 'u': // 整数
+            {
+                char buf[32];
+                n = _itoa(va_arg(ap, int), buf);
+                memcpy(s, buf, n);
+            }
+            break;
 
-			case 'f':// 浮点数
-				{
-					char buf[32];
-					n = _ftoa(va_arg(ap, double), buf,6);
-					memcpy(s, buf, n);
-				}
-				break;
+            case 'f': // 浮点数
+            {
+                char buf[32];
+                n = _ftoa(va_arg(ap, double), buf, 6);
+                memcpy(s, buf, n);
+            }
+            break;
 
-			case 'x':// 16进制数
-				{
-					char buf[32];
-					n = _i2a(va_arg(ap, int), buf, 16);
-					memcpy(s, buf, n);
-				}
-				break;
+            case 'x': // 16进制数
+            {
+                char buf[32];
+                n = _i2a(va_arg(ap, int), buf, 16);
+                memcpy(s, buf, n);
+            }
+            break;
 
-			case 'c':// 字符
-				{
-					*s = va_arg(ap, int);
-				}
-				break;
+            case 'c': // 字符
+            {
+                *s = va_arg(ap, int);
+            }
+            break;
 
-			case '%':// 百分号
-				{
-					*s = '%';
-				}
-				break;
+            case '%': // 百分号
+            {
+                *s = '%';
+            }
+            break;
 
-			default:
-				{
-					va_end(ap);
-					int x = vsprintf(dst, format, another);
-					va_end(another);
-					return x;
-				}
-				break;
-			}
-		}
-		++f;
-		s += n;
-	}
-	*s = 0;
-	va_end(ap);
-	return s-dst;
+            default:
+            {
+                va_end(ap);
+                int x = vsprintf(dst, format, another);
+                va_end(another);
+                return x;
+            }
+            break;
+            }
+        }
+        ++f;
+        s += n;
+    }
+    *s = 0;
+    va_end(ap);
+    return s - dst;
+}
+uint8 bcc_chk(uint8 *data, uint16 length)
+{
+    uint8 bcc_chk_return = 0x00;
+    uint16 count = 0;
+    while (count < length)
+    {
+        bcc_chk_return ^= data[count];
+        count++;
+    }
+    return bcc_chk_return;
 }

+ 2 - 1
src/AppFuncLib.h

@@ -3,7 +3,7 @@
  * @Date         : 2022-01-23 13:45:09
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-02-11 16:28:19
+ * @LastEditTime : 2022-02-14 15:24:03
  * @Description  : file content
  * @FilePath     : \S32K146_4G\src\AppFuncLib.h
  */
@@ -29,6 +29,7 @@ unsigned char HexToChar(unsigned char bHex);
 unsigned char CharToHex(unsigned char bChar);
 uint8 AtStrCompare(const char *a, const char *b);
 unsigned short CRC16_Modbus(unsigned char *pdata, int len);
+uint8 bcc_chk(uint8 *data, uint16 length);
 char *Myitoa(int value, char *result, int base);
 // ÕûÊýת×Ö·û´®
 int _itoa(int num, char buf[32]);

+ 347 - 1
src/AppGlobalVar.c

@@ -15,12 +15,21 @@
  */
 
 #include "AppGlobalVar.h"
+//测试
+
+
 //*全局变量*//
 char ImeiNum[15] = {0};
 char IccidNum[20] = {0};
 uint8 CSQValue = 0;
 sint8 SocketId = -1;
 char WebSiteIp[15] = {0};
+uint8 TcpbattSN[17] = {0x31};//上传的SN编号
+uint8 VIN[17] = {0};
+volatile uint32 TimerCounter = 0;//ms单位
+//gps
+QueueHandle_t GpsDataQueueHandle;
+sint16 xyzData[3] = {0};
 /*Can*/
 uint8 CanIf_u8TxConfirmCnt = 0U;
 boolean CanIf_bTxFlag = false;
@@ -30,4 +39,341 @@ QueueHandle_t CanRecvQueueHandle;
 
 // Const 变量
 const char WebSiteName[] = "\"iotp.fast-fun.cn\"";
-const uint8 WebSitePort = 8712;
+const uint16 WebSitePort = 8712;
+
+//Vcu相关
+uint8 vehicleStatus = 0;
+uint8 bmsHVOn = 0;
+uint8 currentGearPosition = 0;
+uint8 parkingBreakStatus = 0;
+uint8 breakingStatus = 0;
+uint32 ODO = 0;
+uint8 dcdcWorkStatus = 0;
+uint8 numOfChrgableSubsys = 0;
+uint8 chrgableSubsysCode = 0;
+uint8 ebcStatus = 0;
+uint8 ebcAskHVOn = 0;
+uint8 ebcAskHVOff = 0;
+uint8 retainLockSignal = 0;
+uint8 dischargeLockSignal = 0;
+uint8 chargeLockSignal = 0;
+uint8 chargeFlag = 0;
+uint16 vcuDCVol = 0;
+//Bcu相关
+uint32 BcuInTable[130] = {
+	0x1801EFF4,
+	0x1801FBF4,
+	0x1802FBF4,
+	0x1803FBF4,
+	0x1804FBF4,
+	0x1805FBF4,
+	0x1806FBF4,
+	0x1807FBF4,
+	0x1808FBF4,
+	0x1809FBF4,
+	0x180AFBF4,
+	0x180BFBF4,
+	0x180CFBF4,
+	0x180DFBF4,
+	0x180EFBF4,
+	0x180FFBF4,
+	0x1810FBF4,
+	0x1811FBF4,
+	0x1812FBF4,
+	0x1813FBF4,
+	0x1814FBF4,
+	0x1815FBF4,
+	0x1816FBF4,
+	0x1817FBF4,
+	0x1818FBF4,
+	0x1819FBF4,
+	0x181AFBF4,
+	0x181BFBF4,
+	0x181CFBF4,
+	0x181DFBF4,
+	0x181EFBF4,
+	0x181FFBF4,
+	0x1820FBF4,
+	0x1821FBF4,
+	0x1822FBF4,
+	0x1823FBF4,
+	0x1824FBF4,
+	0x1825FBF4,
+	0x1826FBF4,
+	0x1827FBF4,
+	0x1828FBF4,
+	0x1829FBF4,
+	0x182AFBF4,
+	0x182BFBF4,
+	0x182CFBF4,
+	0x182DFBF4,
+	0x182EFBF4,
+	0x182FFBF4,
+	0x1830FBF4,
+	0x1831FBF4,
+	0x1832FBF4,
+	0x1833FBF4,
+	0x1834FBF4,
+	0x1835FBF4,
+	0x1836FBF4,
+	0x1837FBF4,
+	0x1838FBF4,
+	0x1839FBF4,
+	0x183AFBF4,
+	0x183BFBF4,
+	0x183CFBF4,
+	0x183DFBF4,
+	0x183EFBF4,
+	0x183FFBF4,
+	0x1840FBF4,
+	0x1841FBF4,
+	0x1842FBF4,
+	0x1843FBF4,
+	0x1844FBF4,
+	0x1845FBF4,
+	0x1846FBF4,
+	0x1847FBF4,
+	0x1848FBF4,
+	0x1849FBF4,
+	0x184AFBF4,
+	0x184BFBF4,
+	0x184CFBF4,
+	0x184DFBF4,
+	0x184EFBF4,
+	0x184FFBF4,
+	0x1850FBF4,
+	0x1851FBF4,
+	0x1852FBF4,
+	0x1853FBF4,
+	0x1854FBF4,
+	0x1855FBF4,
+	0x1856FBF4,
+	0x1857FBF4,
+	0x1858FBF4,
+	0x1859FBF4,
+	0x185AFBF4,
+	0x185BFBF4,
+	0x185CFBF4,
+	0x185DFBF4,
+	0x185EFBF4,
+	0x185FFBF4,
+	0x1860FBF4,
+	0x1881EFF4,
+	0x1882EFF4,
+	0x1883EFF4,
+	0x1884EFF4,
+	0x1885EFF4,
+	0x1886EFF4,
+	0x1887EFF4,
+	0x1888EFF4,
+	0x1889EFF4,
+	0x18A0FBF4,
+	0x18A1FBF4,
+	0x18A2FBF4,
+	0x18A3FBF4,
+	0x18A4FBF4,
+	0x18A5FBF4,
+	0x18A6FBF4,
+	0x18E1EFF4,
+	0x18E2EFF4,
+	0x18E3EFF4,
+	0x18E4EFF4,
+	0x18FEDAF4,
+	0x18FF23F4,
+	0x18FF24F4,
+	0x18FF25F4,
+	0x18FF30F4,
+	0x18FF45F4,
+	0x18FFC13A,
+	0x18FFD4F4,
+	0x18FFD5F4,
+	0x18FFD6F4,
+	0x18FFD7F4,
+	0x18FFD8F4,
+	0x18FFD9F4,
+};
+bool BcuRxShortError[130];
+bool BcuRxLongError[130];
+uint8 BcuRxErrorCounter[130];
+uint8 BcuRxFlag[130];
+/************************************************************
+ *BCU->4G解码变量存放区
+ ************************************************************/
+uint8 BMS13_ReqVIN = 0x00;						   // BMS请求VIN码标志,0-无请求 1-请求,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_DelTemp = 0x00;				   //电芯温差异常报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_OverTemp = 0x00;				   //电芯温度过高报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_PackOverHVolt = 0x00;			   // PACK过压报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_PackLowHVolt = 0x00;			   // PACK欠压报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-4级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_LowSOC = 0x00;				   // SOC过低报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-5级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_OverUcell = 0x00;				   //单体电压过高报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-6级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_LowUcell = 0x00;				   //单体电压欠压报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-7级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_LowInsRes = 0x00;				   //绝缘报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-8级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_UcellUniformity = 0x00;		   //电池一致性差报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-9级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_OverChg = 0x00;				   //车载储能装置过充报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-10级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_OverSOC = 0x00;				   // SOC过高报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_SOCChangeFast = 0x00;			   // SOC跳变报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_BatSysNotMatch = 0x00;		   //可充电储能系统不匹配报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS11_Fult1_HVILFault = 0x00;				   //高压互锁报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_FaultNum = 0x00;				   // BMS当前发生的故障总数目(包括GB32960中规定的故障数目) 精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_CellOverDischrg = 0x00;		   //电芯过放故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_CellLowTemp = 0x00;			   //电芯低温报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_PackFireWarning = 0x00;		   //电池包火灾报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_OverDischrgCurr = 0x00;		   //放电电流超限报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_OverChrgCurrInTheDrive = 0x00;   //回充电流超限报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_CurrSensorErr = 0x00;			   //电流传感器故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_PowerSupplyErr = 0x00;		   // BMS低压供电电压异常报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_TMSErr = 0x00;				   //热管理机组故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_HeatingFilmErr = 0x00;		   //加热膜加热回路故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_PackSelfProtect = 0x00;		   //电池包自保护故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_MainLoopPrechrgErr = 0x00;	   //主回路预充或预检故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_AuxLoopPrechrgErr = 0x00;		   //辅件回路预充或预检故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_ChrgInsLowErr = 0x00;			   //充电绝缘阻值低,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_ACANLost = 0x00;				   // ACAN通讯故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_InnerCommunicationErr = 0x00;	   // BMS内部通信故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCDCErr = 0x00;				   // BMS-DC-DC故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_BranchBreakErr = 0x00;		   //支路断路故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_HeatRelayOpenErr = 0x00;		   //加热膜或TMS接触器故障无法闭合报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_HeatRelayWeldErr = 0x00;		   //加热膜或TMS接触器故障无法断开报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_MainPosRelayOpenErr = 0x00;	   //主正接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_MainPosRelayWeldErr = 0x00;	   //主正接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_MainNegRelayOpenErr = 0x00;	   //主负接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_MainNegRelayWeldErr = 0x00;	   //主负接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCChrgPos1RelayOpenErr = 0x00;   //直流充电A正接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCChrgPos1RelayWeldErr = 0x00;   //直流充电A正接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCChrgNeg1RelayOpenErr = 0x00;   //直流充电A负接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCChrgNeg1RelayWeldErr = 0x00;   //直流充电A负接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCChrgPos2RelayOpenErr = 0x00;   //直流充电B正接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCChrgPos2RelayWeldErr = 0x00;   //直流充电B正接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCChrgNeg2RelayOpenErr = 0x00;   //直流充电B负接触器无法闭合故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_DCChrgNeg2RelayWeldErr = 0x00;   //直流充电B负接触器无法断开故障报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_ChrgConnectErr = 0x00;		   //插枪连接信号异常,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_ult2_OverDischrgCurrWhenInChrg = 0x00; //充电时放电电流过大,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_OverChrgCurrInTheChrg = 0x00;	   //充电电流超限报警,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_ChrgNTCErr = 0x00;			   //充电插座NTC故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_ChrgNTCTempOver = 0x00;		   //充电插座过温报警,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_ELockErr = 0x00;				   //电子锁故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_FireDetectorEr = 0x00;		   //火警探测器故障,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_ContiDischrgCurrOverLoad = 0x00; //持续回充过流故障,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_SOCDifferErr = 0x00;			   // SOC差异过大,0-正常  1-故障,精度_1,偏移量_0,单位_
+uint8 BMS12_Fult2_ContiChrgCurrOverLoad = 0x00;	   //持续放电过流故障,0-正常  1-1级 轻微故障 2-2级 较严重故障 3-11级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS1_MainPosRelaySt = 0x00;				   //主正继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_MainNegRelaySt = 0x00;				   //主负继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_PreChgRelaySt = 0x00;				   //预充继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_DCChrgPos1RelaySt = 0x00;			   //直流充正继电器1状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_DCChrgNeg1RelaySt = 0x00;			   //直流充负继电器1状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_DCChrgPos2RelaySt = 0x00;			   //直流充正继电器2状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_DCChrgNeg2RelaySt = 0x00;			   //直流充负继电器2状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_HeatPosRelaySt = 0x00;				   //加热正继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_HeatNegRelaySt = 0x00;				   //加热负继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+uint8 BMS1_SysSts = 0x00;						   //电池管理系统工作状态,0-初始化 1-自检完成允许上电 2-运行状态 3-高压切断 4-故障状态,精度_1,偏移量_0,单位_
+uint8 BMS1_Life = 0x00;							   // BMS生命信号 精度_1,偏移量_1,单位_
+uint8 BMS1_BalanceStatus = 0x00;				   // BMS当前均衡状态,0-未均衡 1-均衡中,精度_1,偏移量_0,单位_
+uint8 BMS1_DCChrgConnectSt = 0x00;				   //直流充电枪连接状态,0-未连接 1-单枪连接 2-双枪连接 3-无效,精度_1,偏移量_0,单位_
+uint8 BMS1_ChrgMode = 0x00;						   // BMS当前充电模式,0-未充电 1-直流充电 2-交流充电 3-其他充电模式,精度_1,偏移量_0,单位_
+uint8 BMS1_ChrgStatus = 0x00;					   //充电状态,0-未充电 1-充电中 2-充电已完成 3-充电错误故障,精度_1,偏移量_0,单位_
+uint8 BMS1_HeatingStatus = 0x00;				   //当前加热状态,0-未加热 1-加热中,精度_1,偏移量_0,单位_
+uint8 BMS1_CoolingStatus = 0x00;				   //当前冷却状态,0-未冷却 1-冷却中,精度_1,偏移量_0,单位_
+uint8 BMS2_SOC = 0x00;							   //电池包SOC 精度_0.4,偏移量_0,单位_
+uint8 BMS2_SOH = 0x00;							   //电池包SOH 精度_0.4,偏移量_0,单位_
+uint8 BMS2_FaultCode = 0x00;					   //故障码,见BMS_ErrCode,精度_1,偏移量_0,单位_
+uint8 BMS2_FaultLevel = 0x00;					   //当前最高故障等级,0-正常 1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
+uint8 BMS2_RqHVPoerOff = 0x00;					   // BMS下高压请求,0-无效 1-请求下高压 2-不请求下高压 3-无效,精度_1,偏移量_0,单位_
+uint8 BMS2_Life = 0x00;							   // BMS生命信号 精度_1,偏移量_0,单位_
+uint8 BMS4_InsDetectorSt = 0x00;				   // BMS绝缘检测状态,0-停止检测  1-激活检测,精度_1,偏移量_0,单位_
+uint8 BMS8_Max_Temp = 0x00;						   //单体最高温度 精度_1,偏移量_-40,单位_℃
+uint8 BMS8_Min_Temp = 0x00;						   //单体最低温度 精度_1,偏移量_-40,单位_℃
+uint8 BMS8_Avg_Temp = 0x00;						   //单体平均温度 精度_1,偏移量_-40,单位_℃
+uint8 BMS8_MaxTempSysNr = 0x00;					   //最高温度子系统号 精度_1,偏移量_0,单位_
+uint8 BMS8_MaxTempNr = 0x00;					   //最高温度探针单体代号 精度_1,偏移量_0,单位_
+uint8 BMS8_MinTempSysNr = 0x00;					   //最低温度子系统号 精度_1,偏移量_0,单位_
+uint8 BMS8_MinTempNr = 0x00;					   //最低温度探针子系统代号 精度_1,偏移量_0,单位_
+uint8 BMS7_MaxUcellSysNr = 0x00;				   //最高电压电池子系统号 精度_1,偏移量_0,单位_
+uint8 BMS7_MinUcellSysNr = 0x00;				   //最低电压电池子系统号 精度_1,偏移量_0,单位_
+uint8 BMS23_Gun1DCPosTemp = 0x00;				   // A枪DC+温度传感器温度 精度_1,偏移量_-40,单位_℃
+uint8 BMS23_Gun1DCNegTemp = 0x00;				   // A枪DC-温度传感器温度 精度_1,偏移量_-40,单位_℃
+uint8 BMS23_Gun2DCPosTemp = 0x00;				   // B枪DC+温度传感器温度 精度_1,偏移量_-40,单位_℃
+uint8 BMS23_Gun2DCNegTemp = 0x00;				   // B枪DC-温度传感器温度 精度_1,偏移量_-40,单位_℃
+uint8 BMS_Cell_TempN[64] = {0x00};				   //电池温度编号
+uint8 BMS_SN_SysCode[24] = {0x00};				   //电池实际SN
+uint8 BMS21_BattType = 0x00;					   //电池类型,1 -铅酸电池 2 -镍氢电池 3 -磷酸铁锂电池  4 -锰酸锂电池 5 -钴酸锂电池 6 -三元材料电池  7 -聚合物锂离子电池 8 -钛酸锂电池  9-超级电容 15-其他车载储能装置,精度_1,偏移量_0,单位_
+uint8 BMS21_CoolType = 0x00;					   //电池冷却方式,0-其他冷却方式 1-自然冷却 2-风扇冷却 3-水冷却,精度_1,偏移量_0,单位_
+uint8 BMS21_Manufacture = 0x00;					   //电池厂家,1-CATL 2-LS 3-MGL 4-SAMSUN 5-LG 6-GXGK 7-SUNWODA 8-Others,精度_1,偏移量_0,单位_
+uint8 BMS21_ProtocolEditionH = 0x00;			   //通讯协议版本高位(例 - 版本为3 .1,则此处发3) 精度_1,偏移量_0,单位_
+uint8 BMS21_ProtocolEditionL = 0x00;			   //通讯协议版本低位(例 - 版本为3 .1,则此处发1) 精度_1,偏移量_0,单位_
+uint8 BMS9_TotCSCNum = 0x00;					   //电池系统中CSC总的数目 精度_1,偏移量_0,单位_
+uint8 BMS9_PackTotTempNum = 0x00;				   // PACK中电芯温度点(探针)的总数目 精度_1,偏移量_0,单位_
+uint8 BMS9_HVBranchNum = 0x00;					   //电池系统高压支路数 精度_1,偏移量_0,单位_
+uint8 BMS9_SingleHVBranchCellNum = 0x00;		   //电池系统单支路电芯数 精度_1,偏移量_0,单位_
+uint8 BMS9_BattSysNum = 0x00;					   //可充电储能系统数目(EV默认1,满足GB32960要求) 精度_1,偏移量_0,单位_
+uint8 BMS9_BattSysSeqNum = 0x00;				   //可充电储能系统序号(EV默认1,满足GB32960要求) 精度_1,偏移量_0,单位_
+uint8 BMS22_AvaiMaxSOC = 0x00;					   // PACK可用最高SOC(根据技术协议) 精度_0.4,偏移量_0,单位_
+uint8 BMS22_AvaiMinSOC = 0x00;					   // PACK可用最低SOC(根据技术协议) 精度_0.4,偏移量_0,单位_
+uint8 BMS22_AvaiMaxTemp = 0x00;					   // PACK可用温度上限(根据技术协议) 精度_1,偏移量_-40,单位_℃
+uint8 BMS22_AvaiMinTemp = 0x00;					   // PACK可用温度下限(根据技术协议) 精度_1,偏移量_-40,单位_℃
+uint8 BMS10_SubSysEncodingLen = 0x00;			   //可充电储能系统编码长度 精度_1,偏移量_0,单位_
+uint8 BMS10_SubSysIdx = 0x00;					   //可充电储能系统编码 精度_1,偏移量_0,单位_
+uint8 BMS10_SubSysErrNum = 0x00;				   //可充电储能装置故障总数 精度_1,偏移量_0,单位_
+uint8 BMS28_ReqMode = 0x00;						   // BMS请求设定模式,0-关机模式 1-制冷模式 2-制热模式 3-自循环模式,精度_1,偏移量_0,单位_
+uint8 BMS28_HVCmd = 0x00;						   //高压请求,0-请求上高压 1-请求下高压,精度_1,偏移量_0,单位_
+uint8 BMS28_ChgSts = 0x00;						   //充电状态,0-非充电 1-充电,精度_1,偏移量_0,单位_
+uint8 BMS28_HVRelaySts = 0x00;					   // BMS高压继电器状态,0-断开状态 1-闭合状态,精度_1,偏移量_0,单位_
+uint8 BMS28_SetTemp = 0x00;						   //设定温度 精度_1,偏移量_-40,单位_
+uint8 BMS28_Life = 0x00;						   // BMS生命帧 精度_1,偏移量_0,单位_
+uint8 BMS28_CRC = 0x00;							   // CRC校验值 精度_1,偏移量_0,单位_
+uint8 TMS_WorkStatus = 0x00;					   // TMS工作状态,0-关机模式 1-制冷模式 2-制热模式 3-自循环模式,精度_1,偏移量_0,单位_
+uint8 TMS_HVRelayST = 0x00;						   // TMS高压继电器状态,0-断开状态 1-闭合状态,精度_1,偏移量_0,单位_
+uint8 TMS_OutletTemp = 0x00;					   //出水温度(机组到电池) 精度_1,偏移量_-40,单位_
+uint8 TMS_InletTemp = 0x00;						   //回水温度(电池到机组) 精度_1,偏移量_-40,单位_
+uint8 TMS_Version = 0x00;						   // TMS软件版本 精度_0.1,偏移量_0,单位_
+uint8 TMS_ErrCode = 0x00;						   // TMS故障码,见附件,精度_1,偏移量_0,单位_
+uint8 TMS_FaultLevel = 0x00;					   // TMS故障码等级,0-无效 1-1级故障 2-2级故障 3-3级故障,精度_1,偏移量_0,单位_
+uint8 BCU_SnMsgFlag = 0x00;						   // SN码收全标志位
+uint16 BMS_Cell_Volt[384] = {0x00};				   //电芯电压
+uint16 BMS11_PackOutsideVolt = 0x00;			   //电池包外侧电压 精度_0.1,偏移量_0,单位_V
+uint16 BMS2_PackCurrent = 0x00;					   //电池包总电流,充电为负值,放电为正值 精度_0.1,偏移量_-1000,单位_A
+uint16 BMS2_PackInsideVolt = 0x00;				   //电池包内侧电压 精度_0.1,偏移量_0,单位_V
+uint16 BMS4_PosIsolation = 0x00;				   //母线正对车体绝缘电阻 精度_1,偏移量_0,单位_KΩ
+uint16 BMS4_NegIsolation = 0x00;				   //母线负对车体绝缘电阻 精度_1,偏移量_0,单位_KΩ
+uint16 BMS4_SysInsRes = 0x00;					   //系统绝缘电阻 精度_1,偏移量_0,单位_KΩ
+uint16 BMS6_Max_Ucell = 0x00;					   //单体最高电压值 精度_0.001,偏移量_0,单位_V
+uint16 BMS6_Min_Ucell = 0x00;					   //单体最低电压值 精度_0.001,偏移量_0,单位_V
+uint16 BMS6_Avg_Ucell = 0x00;					   //电体电压平均值 精度_0.001,偏移量_0,单位_V
+uint16 BMS6_SOE = 0x00;							   //剩余电量电量(SOE) 精度_0.01,偏移量_0,单位_Kwh
+uint16 BMS7_MaxUcellNr = 0x00;					   //最高电压电池单体代号 精度_1,偏移量_0,单位_
+uint16 BMS7_MinUcellNr = 0x00;					   //最低电压电池单体代号 精度_1,偏移量_0,单位_
+uint16 BMS23_RemainChgTi = 0x00;				   //剩余充电时间 精度_1,偏移量_0,单位_min
+uint16 BMS21_RateCap = 0x00;					   //电池包额定容量 精度_0.1,偏移量_0,单位_Ah
+uint16 BMS21_RateHVolt = 0x00;					   //电池包额定电压 精度_0.1,偏移量_0,单位_V
+uint16 BMS21_RatePower = 0x00;					   //电池包额定总能量 精度_0.1,偏移量_0,单位_kWh
+uint16 BMS9_PackTotCellNum = 0x00;				   // PACK中单体电芯的总数目 精度_1,偏移量_0,单位_
+uint16 BMS22_PackAvaiMaxVolt = 0x00;			   // PACK可用电压上限(根据技术协议) 精度_0.1,偏移量_0,单位_V
+uint16 BMS22_PackAvaiMinVolt = 0x00;			   // PACK可用电压下限(根据技术协议) 精度_0.1,偏移量_0,单位_V
+uint16 BMS_SoftwareVersion = 0x00;				   //软件版本 精度_0.1,偏移量_0,单位_
+uint16 BMS_HardwareVersion = 0x00;				   //硬件版本 精度_0.1,偏移量_0,单位_
+uint16 BMS3_MaxDischgPow = 0x00;				   //最大允许放电功率 精度_0.1,偏移量_0,单位_Kw
+uint16 BMS3_MaxChgPow = 0x00;					   //最大允许充电功率 精度_0.1,偏移量_0,单位_Kw
+uint16 BMS3_MaxInstantDischgPow = 0x00;			   //最大允许瞬时放电功率 精度_0.1,偏移量_0,单位_Kw
+uint16 BMS3_MaxiInstantChgPow = 0x00;			   //最大允许瞬时充电功率 精度_0.1,偏移量_0,单位_Kw
+uint16 BMS5_DischgCurMaxAllw = 0x00;			   //电池最大允许放电电流 精度_0.1,偏移量_-1000,单位_A
+uint16 BMS5_ChrgCurMaxAllw = 0x00;				   //电池最大允许充电电流 精度_0.1,偏移量_-1000,单位_A
+uint16 BMS5_InstChrgCurMaxAllw = 0x00;			   //动力电池允许最大瞬时充电电流 精度_0.1,偏移量_-1000,单位_A
+uint16 BMS5_InstDischrgCurMaxAllw = 0x00;		   //电池允许最大瞬时放电电流 精度_0.1,偏移量_-1000,单位_A
+uint16 BMS26_Bat_InstantConsume = 0x00;			   //动力电池瞬时能耗 精度_0.1,偏移量_0,单位_Wh
+uint16 BMS26_Bat_TotalConsume = 0x00;			   //动力电池总能量能耗 精度_0.1,偏移量_0,单位_Wh
+uint16 BMS26_ChgReqVoltage = 0x00;				   //充电所需电压 精度_0.1,偏移量_0,单位_V
+uint16 BMS26_ChgReqCurrent = 0x00;				   //充电所需电流 精度_0.1,偏移量_-1000,单位_A
+uint16 BMS28_HVVolt = 0x00;						   // BMS当前电压 精度_1,偏移量_0,单位_
+uint16 TMS_ReqPow = 0x00;						   // TMS需求功率 精度_0.1,偏移量_0,单位_Kw
+uint32 BMS1_RechrgCycels = 0x00;				   //充电次数 精度_1,偏移量_0,单位_
+uint32 BMS14_TotalChargeAh = 0x00;				   //累积充入Ah 数 精度_0.1,偏移量_0,单位_Ah
+uint32 BMS14_TotalDischargeAh = 0x00;			   //累积放出Ah 数 精度_0.1,偏移量_0,单位_Ah
+uint32 BMS15_TotalChargeKwh = 0x00;				   //累计充入kWh 数 精度_0.1,偏移量_0,单位_KWh
+uint32 BMS15_TotalDischargeKwh = 0x00;			   //累计放出kWh 数 精度_0.1,偏移量_0,单位_KWh
+uint32 BMS16_TotalEneryECOChargeAh = 0x00;		   //累计动能回馈充入Ah 数 精度_0.1,偏移量_0,单位_Ah
+uint32 BMS16_TotalEneryECOChargeKwh = 0x00;		   //累计动能回馈充入kWh 数 精度_0.1,偏移量_0,单位_KWh
+uint32 BMS17_TotalStationChargeAh = 0x00;		   //累计换电站充入Ah 数 精度_0.1,偏移量_0,单位_Ah
+uint32 BMS17_TotalStationChargeKwh = 0x00;		   //累计换电站充入kWh 数 精度_0.1,偏移量_0,单位_KWh
+uint32 BMS18_TotalPoleChargeAh = 0x00;			   //累计插枪充电充入Ah 数 精度_0.1,偏移量_0,单位_Ah
+uint32 BMS18_TotalPoleChargeKwh = 0x00;			   //累计插枪充电充入kWh 数 精度_0.1,偏移量_0,单位_KWh
+uint32 BMS19_SingleChargeAh = 0x00;				   //单次充电Ah 数 精度_0.1,偏移量_0,单位_Ah
+uint32 BMS19_SingleChargeKwh = 0x00;			   //单次充电kWh 数 精度_0.1,偏移量_0,单位_KWh

+ 220 - 1
src/AppGlobalVar.h

@@ -17,17 +17,33 @@
 #define APPGLOBALVAR_H_
 
 #include "hal_adapter.h"
+//test Var
+#define defaultSn "GYTEST00000000001"
+
+#define HWVERSION 0x0001
+#define BLSWVERSION 0x00000001
+#define DRVSWVERSION 0x00000001
+#define APPSWVERSION 0x00000002
+#define BMS_MANUFACTURE 0xFF
+#define BMS_INFO 0xFF
+#define DATA_MODULE_TYPE 0x02
 //*È«¾Ö±äÁ¿*//
 extern char ImeiNum[15];
 extern char IccidNum[20];
 extern uint8 CSQValue;
 extern sint8 SocketId;
 extern char WebSiteIp[15];
+extern uint8 TcpbattSN[17];
+extern uint8 VIN[17];
+extern volatile uint32 TimerCounter;
 typedef struct
 {
     uint8 RealLen;
     uint8 *DataPtr;
 } QueueDataTrans_Type;
+//gps
+extern QueueHandle_t GpsDataQueueHandle;
+extern sint16 xyzData[3];
 /*Can*/
 extern uint8 CanIf_u8TxConfirmCnt;
 extern boolean CanIf_bTxFlag;
@@ -36,6 +52,209 @@ extern boolean CanIf_bRxFlag;
 extern QueueHandle_t CanRecvQueueHandle;
 
 extern const char WebSiteName[];
-extern const uint8 WebSitePort;
+extern const uint16 WebSitePort;
+
+//VCUÏà¹Ø
+extern uint8 vehicleStatus;
+extern uint8 bmsHVOn ;
+extern uint8 currentGearPosition;
+extern uint8 parkingBreakStatus ;
+extern uint8 breakingStatus ;
+extern uint32 ODO ;
+extern uint8 dcdcWorkStatus ;
+extern uint8 numOfChrgableSubsys;
+extern uint8 chrgableSubsysCode ;
+extern uint8 ebcStatus ;
+extern uint8 ebcAskHVOn ;
+extern uint8 ebcAskHVOff ;
+extern uint8 retainLockSignal ;
+extern uint8 dischargeLockSignal ;
+extern uint8 chargeLockSignal ;
+extern uint8 chargeFlag ;
+extern uint16 vcuDCVol ;
+//BCU½âÂë±äÁ¿
+extern uint32 BcuInTable[130];
+extern bool BcuRxShortError[130];
+extern bool BcuRxLongError[130];
+extern uint8 BcuRxErrorCounter[130];
+extern uint8 BcuRxFlag[130];
+extern uint8 BMS13_ReqVIN;
+extern uint8 BMS11_Fult1_DelTemp;
+extern uint8 BMS11_Fult1_OverTemp;
+extern uint8 BMS11_Fult1_PackOverHVolt;
+extern uint8 BMS11_Fult1_PackLowHVolt;
+extern uint8 BMS11_Fult1_LowSOC;
+extern uint8 BMS11_Fult1_OverUcell;
+extern uint8 BMS11_Fult1_LowUcell;
+extern uint8 BMS11_Fult1_LowInsRes;
+extern uint8 BMS11_Fult1_UcellUniformity;
+extern uint8 BMS11_Fult1_OverChg;
+extern uint8 BMS11_Fult1_OverSOC;
+extern uint8 BMS11_Fult1_SOCChangeFast;
+extern uint8 BMS11_Fult1_BatSysNotMatch;
+extern uint8 BMS11_Fult1_HVILFault;
+extern uint8 BMS12_Fult2_FaultNum;
+extern uint8 BMS12_Fult2_CellOverDischrg;
+extern uint8 BMS12_Fult2_CellLowTemp;
+extern uint8 BMS12_Fult2_PackFireWarning;
+extern uint8 BMS12_Fult2_OverDischrgCurr;
+extern uint8 BMS12_Fult2_OverChrgCurrInTheDrive;
+extern uint8 BMS12_Fult2_CurrSensorErr;
+extern uint8 BMS12_Fult2_PowerSupplyErr;
+extern uint8 BMS12_Fult2_TMSErr;
+extern uint8 BMS12_Fult2_HeatingFilmErr;
+extern uint8 BMS12_Fult2_PackSelfProtect;
+extern uint8 BMS12_Fult2_MainLoopPrechrgErr;
+extern uint8 BMS12_Fult2_AuxLoopPrechrgErr;
+extern uint8 BMS12_Fult2_ChrgInsLowErr;
+extern uint8 BMS12_Fult2_ACANLost;
+extern uint8 BMS12_Fult2_InnerCommunicationErr;
+extern uint8 BMS12_Fult2_DCDCErr;
+extern uint8 BMS12_Fult2_BranchBreakErr;
+extern uint8 BMS12_Fult2_HeatRelayOpenErr;
+extern uint8 BMS12_Fult2_HeatRelayWeldErr;
+extern uint8 BMS12_Fult2_MainPosRelayOpenErr;
+extern uint8 BMS12_Fult2_MainPosRelayWeldErr;
+extern uint8 BMS12_Fult2_MainNegRelayOpenErr;
+extern uint8 BMS12_Fult2_MainNegRelayWeldErr;
+extern uint8 BMS12_Fult2_DCChrgPos1RelayOpenErr;
+extern uint8 BMS12_Fult2_DCChrgPos1RelayWeldErr;
+extern uint8 BMS12_Fult2_DCChrgNeg1RelayOpenErr;
+extern uint8 BMS12_Fult2_DCChrgNeg1RelayWeldErr;
+extern uint8 BMS12_Fult2_DCChrgPos2RelayOpenErr;
+extern uint8 BMS12_Fult2_DCChrgPos2RelayWeldErr;
+extern uint8 BMS12_Fult2_DCChrgNeg2RelayOpenErr;
+extern uint8 BMS12_Fult2_DCChrgNeg2RelayWeldErr;
+extern uint8 BMS12_Fult2_ChrgConnectErr;
+extern uint8 BMS12_ult2_OverDischrgCurrWhenInChrg;
+extern uint8 BMS12_Fult2_OverChrgCurrInTheChrg;
+extern uint8 BMS12_Fult2_ChrgNTCErr;
+extern uint8 BMS12_Fult2_ChrgNTCTempOver;
+extern uint8 BMS12_Fult2_ELockErr;
+extern uint8 BMS12_Fult2_FireDetectorEr;
+extern uint8 BMS12_Fult2_ContiDischrgCurrOverLoad;
+extern uint8 BMS12_Fult2_SOCDifferErr;
+extern uint8 BMS12_Fult2_ContiChrgCurrOverLoad;
+extern uint8 BMS1_MainPosRelaySt;
+extern uint8 BMS1_MainNegRelaySt;
+extern uint8 BMS1_PreChgRelaySt;
+extern uint8 BMS1_DCChrgPos1RelaySt;
+extern uint8 BMS1_DCChrgNeg1RelaySt;
+extern uint8 BMS1_DCChrgPos2RelaySt;
+extern uint8 BMS1_DCChrgNeg2RelaySt;
+extern uint8 BMS1_HeatPosRelaySt;
+extern uint8 BMS1_HeatNegRelaySt;
+extern uint8 BMS1_SysSts;
+extern uint8 BMS1_Life;
+extern uint8 BMS1_BalanceStatus;
+extern uint8 BMS1_DCChrgConnectSt;
+extern uint8 BMS1_ChrgMode;
+extern uint8 BMS1_ChrgStatus;
+extern uint8 BMS1_HeatingStatus;
+extern uint8 BMS1_CoolingStatus;
+extern uint8 BMS2_SOC;
+extern uint8 BMS2_SOH;
+extern uint8 BMS2_FaultCode;
+extern uint8 BMS2_FaultLevel;
+extern uint8 BMS2_RqHVPoerOff;
+extern uint8 BMS2_Life;
+extern uint8 BMS4_InsDetectorSt;
+extern uint8 BMS8_Max_Temp;
+extern uint8 BMS8_Min_Temp;
+extern uint8 BMS8_Avg_Temp;
+extern uint8 BMS8_MaxTempSysNr;
+extern uint8 BMS8_MaxTempNr;
+extern uint8 BMS8_MinTempSysNr;
+extern uint8 BMS8_MinTempNr;
+extern uint8 BMS7_MaxUcellSysNr;
+extern uint8 BMS7_MinUcellSysNr;
+extern uint8 BMS23_Gun1DCPosTemp;
+extern uint8 BMS23_Gun1DCNegTemp;
+extern uint8 BMS23_Gun2DCPosTemp;
+extern uint8 BMS23_Gun2DCNegTemp;
+extern uint8 BMS_Cell_TempN[64];
+extern uint8 BMS_SN_SysCode[24];
+extern uint8 BMS21_BattType;
+extern uint8 BMS21_CoolType;
+extern uint8 BMS21_Manufacture;
+extern uint8 BMS21_ProtocolEditionH;
+extern uint8 BMS21_ProtocolEditionL;
+extern uint8 BMS9_TotCSCNum;
+extern uint8 BMS9_PackTotTempNum;
+extern uint8 BMS9_HVBranchNum;
+extern uint8 BMS9_SingleHVBranchCellNum;
+extern uint8 BMS9_BattSysNum;
+extern uint8 BMS9_BattSysSeqNum;
+extern uint8 BMS22_AvaiMaxSOC;
+extern uint8 BMS22_AvaiMinSOC;
+extern uint8 BMS22_AvaiMaxTemp;
+extern uint8 BMS22_AvaiMinTemp;
+extern uint8 BMS10_SubSysEncodingLen;
+extern uint8 BMS10_SubSysIdx;
+extern uint8 BMS10_SubSysErrNum;
+extern uint8 BMS28_ReqMode;
+extern uint8 BMS28_HVCmd;
+extern uint8 BMS28_ChgSts;
+extern uint8 BMS28_HVRelaySts;
+extern uint8 BMS28_SetTemp;
+extern uint8 BMS28_Life;
+extern uint8 BMS28_CRC;
+extern uint8 TMS_WorkStatus;
+extern uint8 TMS_HVRelayST;
+extern uint8 TMS_OutletTemp;
+extern uint8 TMS_InletTemp;
+extern uint8 TMS_Version;
+extern uint8 TMS_ErrCode;
+extern uint8 TMS_FaultLevel;
+extern uint8 BCU_SnMsgFlag;
+extern uint16 BMS_Cell_Volt[384];
+extern uint16 BMS11_PackOutsideVolt;
+extern uint16 BMS2_PackCurrent;
+extern uint16 BMS2_PackInsideVolt;
+extern uint16 BMS4_PosIsolation;
+extern uint16 BMS4_NegIsolation;
+extern uint16 BMS4_SysInsRes;
+extern uint16 BMS6_Max_Ucell;
+extern uint16 BMS6_Min_Ucell;
+extern uint16 BMS6_Avg_Ucell;
+extern uint16 BMS6_SOE;
+extern uint16 BMS7_MaxUcellNr;
+extern uint16 BMS7_MinUcellNr;
+extern uint16 BMS23_RemainChgTi;
+extern uint16 BMS21_RateCap;
+extern uint16 BMS21_RateHVolt;
+extern uint16 BMS21_RatePower;
+extern uint16 BMS9_PackTotCellNum;
+extern uint16 BMS22_PackAvaiMaxVolt;
+extern uint16 BMS22_PackAvaiMinVolt;
+extern uint16 BMS_SoftwareVersion;
+extern uint16 BMS_HardwareVersion;
+extern uint16 BMS3_MaxDischgPow;
+extern uint16 BMS3_MaxChgPow;
+extern uint16 BMS3_MaxInstantDischgPow;
+extern uint16 BMS3_MaxiInstantChgPow;
+extern uint16 BMS5_DischgCurMaxAllw;
+extern uint16 BMS5_ChrgCurMaxAllw;
+extern uint16 BMS5_InstChrgCurMaxAllw;
+extern uint16 BMS5_InstDischrgCurMaxAllw;
+extern uint16 BMS26_Bat_InstantConsume;
+extern uint16 BMS26_Bat_TotalConsume;
+extern uint16 BMS26_ChgReqVoltage;
+extern uint16 BMS26_ChgReqCurrent;
+extern uint16 BMS28_HVVolt;
+extern uint16 TMS_ReqPow;
+extern uint32 BMS1_RechrgCycels;
+extern uint32 BMS14_TotalChargeAh;
+extern uint32 BMS14_TotalDischargeAh;
+extern uint32 BMS15_TotalChargeKwh;
+extern uint32 BMS15_TotalDischargeKwh;
+extern uint32 BMS16_TotalEneryECOChargeAh;
+extern uint32 BMS16_TotalEneryECOChargeKwh;
+extern uint32 BMS17_TotalStationChargeAh;
+extern uint32 BMS17_TotalStationChargeKwh;
+extern uint32 BMS18_TotalPoleChargeAh;
+extern uint32 BMS18_TotalPoleChargeKwh;
+extern uint32 BMS19_SingleChargeAh;
+extern uint32 BMS19_SingleChargeKwh;
 
 #endif /* APPGLOBALVAR_H_ */

+ 2407 - 0
src/AppTaskCan.c

@@ -0,0 +1,2407 @@
+/*
+ * AppTaskCan.c
+ *
+ *  Created on: 2022年2月13日
+ *      Author: QiXiang_CHENJIE
+ */
+#include "AppTaskCan.h"
+static void vTimerCallback(TimerHandle_t pxTimer);
+void CanTask(void *pvParameters)
+{
+	TimerHandle_t monitorTimer;
+	monitorTimer = xTimerCreate("monitor",10,pdTRUE,(void *)0,vTimerCallback);
+	(void)pvParameters;
+	CanIf_bRxFlag = false;
+	Can_Msg_Type CanRxMsg;
+	CanRecvQueueHandle = xQueueCreate(5, sizeof(Can_Msg_Type));
+	xTimerStart(monitorTimer,0);
+	while(1)
+	{
+		memset(&CanRxMsg, 0, sizeof(CanRxMsg));
+		Can_MainFunction_Read();
+		BaseType_t ret = xQueueReceive(CanRecvQueueHandle, &CanRxMsg, 10);
+		if (ret == pdPASS)
+		{
+			BcuDecodeFunction(CanRxMsg.id,CanRxMsg.sdu);//can协议解析
+		}
+		else if(TimerCounter%100==0)
+		{
+			BcuRxDiagnose();
+		}
+	}
+}
+static void vTimerCallback(TimerHandle_t pxTimer)
+{
+	uint32 ulTimerID;
+	ulTimerID = (uint32)pvTimerGetTimerID(pxTimer);
+	if(ulTimerID==0)
+	{
+		TimerCounter = TimerCounter + 10;
+	}
+}
+void BcuDecodeFunction(uint32 ID, uint8 *rawData)
+{
+	switch (ID)
+	{
+	case 0x1801EFF4:
+		BMS13_ReqVIN = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BcuRxFlag[0] = 0x01;
+		break;
+	case 0x1801FBF4:
+		BMS_Cell_Volt[0] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[1] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[2] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[3] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[1] = 0x01;
+		break;
+	case 0x1802FBF4:
+		BMS_Cell_Volt[4] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[5] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[6] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[7] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[2] = 0x01;
+		break;
+	case 0x1803FBF4:
+		BMS_Cell_Volt[8] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[9] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[10] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[11] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[3] = 0x01;
+		break;
+	case 0x1804FBF4:
+		BMS_Cell_Volt[12] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[13] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[14] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[15] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[4] = 0x01;
+		break;
+	case 0x1805FBF4:
+		BMS_Cell_Volt[16] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[17] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[18] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[19] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[5] = 0x01;
+		break;
+	case 0x1806FBF4:
+		BMS_Cell_Volt[20] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[21] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[22] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[23] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[6] = 0x01;
+		break;
+	case 0x1807FBF4:
+		BMS_Cell_Volt[24] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[25] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[26] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[27] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[7] = 0x01;
+		break;
+	case 0x1808FBF4:
+		BMS_Cell_Volt[28] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[29] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[30] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[31] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[8] = 0x01;
+		break;
+	case 0x1809FBF4:
+		BMS_Cell_Volt[32] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[33] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[34] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[35] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[9] = 0x01;
+		break;
+	case 0x180AFBF4:
+		BMS_Cell_Volt[36] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[37] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[38] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[39] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[10] = 0x01;
+		break;
+	case 0x180BFBF4:
+		BMS_Cell_Volt[40] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[41] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[42] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[43] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[11] = 0x01;
+		break;
+	case 0x180CFBF4:
+		BMS_Cell_Volt[44] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[45] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[46] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[47] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[12] = 0x01;
+		break;
+	case 0x180DFBF4:
+		BMS_Cell_Volt[48] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[49] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[50] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[51] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[13] = 0x01;
+		break;
+	case 0x180EFBF4:
+		BMS_Cell_Volt[52] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[53] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[54] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[55] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[14] = 0x01;
+		break;
+	case 0x180FFBF4:
+		BMS_Cell_Volt[56] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[57] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[58] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[59] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[15] = 0x01;
+		break;
+	case 0x1810FBF4:
+		BMS_Cell_Volt[60] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[61] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[62] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[63] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[16] = 0x01;
+		break;
+	case 0x1811FBF4:
+		BMS_Cell_Volt[64] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[65] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[66] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[67] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[17] = 0x01;
+		break;
+	case 0x1812FBF4:
+		BMS_Cell_Volt[68] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[69] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[70] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[71] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[18] = 0x01;
+		break;
+	case 0x1813FBF4:
+		BMS_Cell_Volt[72] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[73] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[74] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[75] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[19] = 0x01;
+		break;
+	case 0x1814FBF4:
+		BMS_Cell_Volt[76] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[77] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[78] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[79] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[20] = 0x01;
+		break;
+	case 0x1815FBF4:
+		BMS_Cell_Volt[80] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[81] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[82] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[83] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[21] = 0x01;
+		break;
+	case 0x1816FBF4:
+		BMS_Cell_Volt[84] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[85] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[86] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[87] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[22] = 0x01;
+		break;
+	case 0x1817FBF4:
+		BMS_Cell_Volt[88] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[89] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[90] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[91] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[23] = 0x01;
+		break;
+	case 0x1818FBF4:
+		BMS_Cell_Volt[92] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[93] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[94] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[95] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[24] = 0x01;
+		break;
+	case 0x1819FBF4:
+		BMS_Cell_Volt[96] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[97] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[98] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[99] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[25] = 0x01;
+		break;
+	case 0x181AFBF4:
+		BMS_Cell_Volt[100] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[101] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[102] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[103] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[26] = 0x01;
+		break;
+	case 0x181BFBF4:
+		BMS_Cell_Volt[104] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[105] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[106] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[107] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[27] = 0x01;
+		break;
+	case 0x181CFBF4:
+		BMS_Cell_Volt[108] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[109] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[110] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[111] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[28] = 0x01;
+		break;
+	case 0x181DFBF4:
+		BMS_Cell_Volt[112] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[113] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[114] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[115] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[29] = 0x01;
+		break;
+	case 0x181EFBF4:
+		BMS_Cell_Volt[116] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[117] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[118] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[119] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[30] = 0x01;
+		break;
+	case 0x181FFBF4:
+		BMS_Cell_Volt[120] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[121] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[122] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[123] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[31] = 0x01;
+		break;
+	case 0x1820FBF4:
+		BMS_Cell_Volt[124] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[125] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[126] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[127] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[32] = 0x01;
+		break;
+	case 0x1821FBF4:
+		BMS_Cell_Volt[128] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[129] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[130] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[131] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[33] = 0x01;
+		break;
+	case 0x1822FBF4:
+		BMS_Cell_Volt[132] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[133] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[134] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[135] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[34] = 0x01;
+		break;
+	case 0x1823FBF4:
+		BMS_Cell_Volt[136] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[137] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[138] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[139] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[35] = 0x01;
+		break;
+	case 0x1824FBF4:
+		BMS_Cell_Volt[140] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[141] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[142] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[143] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[36] = 0x01;
+		break;
+	case 0x1825FBF4:
+		BMS_Cell_Volt[144] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[145] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[146] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[147] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[37] = 0x01;
+		break;
+	case 0x1826FBF4:
+		BMS_Cell_Volt[148] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[149] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[150] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[151] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[38] = 0x01;
+		break;
+	case 0x1827FBF4:
+		BMS_Cell_Volt[152] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[153] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[154] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[155] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[39] = 0x01;
+		break;
+	case 0x1828FBF4:
+		BMS_Cell_Volt[156] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[157] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[158] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[159] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[40] = 0x01;
+		break;
+	case 0x1829FBF4:
+		BMS_Cell_Volt[160] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[161] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[162] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[163] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[41] = 0x01;
+		break;
+	case 0x182AFBF4:
+		BMS_Cell_Volt[164] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[165] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[166] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[167] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[42] = 0x01;
+		break;
+	case 0x182BFBF4:
+		BMS_Cell_Volt[168] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[169] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[170] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[171] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[43] = 0x01;
+		break;
+	case 0x182CFBF4:
+		BMS_Cell_Volt[172] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[173] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[174] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[175] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[44] = 0x01;
+		break;
+	case 0x182DFBF4:
+		BMS_Cell_Volt[176] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[177] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[178] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[179] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[45] = 0x01;
+		break;
+	case 0x182EFBF4:
+		BMS_Cell_Volt[180] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[181] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[182] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[183] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[46] = 0x01;
+		break;
+	case 0x182FFBF4:
+		BMS_Cell_Volt[184] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[185] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[186] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[187] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[47] = 0x01;
+		break;
+	case 0x1830FBF4:
+		BMS_Cell_Volt[188] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[189] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[190] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[191] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[48] = 0x01;
+		break;
+	case 0x1831FBF4:
+		BMS_Cell_Volt[192] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[193] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[194] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[195] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[49] = 0x01;
+		break;
+	case 0x1832FBF4:
+		BMS_Cell_Volt[196] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[197] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[198] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[199] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[50] = 0x01;
+		break;
+	case 0x1833FBF4:
+		BMS_Cell_Volt[200] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[201] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[202] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[203] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[51] = 0x01;
+		break;
+	case 0x1834FBF4:
+		BMS_Cell_Volt[204] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[205] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[206] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[207] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[52] = 0x01;
+		break;
+	case 0x1835FBF4:
+		BMS_Cell_Volt[208] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[209] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[210] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[211] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[53] = 0x01;
+		break;
+	case 0x1836FBF4:
+		BMS_Cell_Volt[212] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[213] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[214] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[215] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[54] = 0x01;
+		break;
+	case 0x1837FBF4:
+		BMS_Cell_Volt[216] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[217] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[218] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[219] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[55] = 0x01;
+		break;
+	case 0x1838FBF4:
+		BMS_Cell_Volt[220] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[221] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[222] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[223] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[56] = 0x01;
+		break;
+	case 0x1839FBF4:
+		BMS_Cell_Volt[224] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[225] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[226] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[227] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[57] = 0x01;
+		break;
+	case 0x183AFBF4:
+		BMS_Cell_Volt[228] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[229] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[230] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[231] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[58] = 0x01;
+		break;
+	case 0x183BFBF4:
+		BMS_Cell_Volt[232] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[233] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[234] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[235] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[59] = 0x01;
+		break;
+	case 0x183CFBF4:
+		BMS_Cell_Volt[236] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[237] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[238] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[239] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[60] = 0x01;
+		break;
+	case 0x183DFBF4:
+		BMS_Cell_Volt[240] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[241] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[242] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[243] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[61] = 0x01;
+		break;
+	case 0x183EFBF4:
+		BMS_Cell_Volt[244] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[245] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[246] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[247] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[62] = 0x01;
+		break;
+	case 0x183FFBF4:
+		BMS_Cell_Volt[248] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[249] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[250] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[251] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[63] = 0x01;
+		break;
+	case 0x1840FBF4:
+		BMS_Cell_Volt[252] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[253] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[254] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[255] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[64] = 0x01;
+		break;
+	case 0x1841FBF4:
+		BMS_Cell_Volt[256] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[257] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[258] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[259] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[65] = 0x01;
+		break;
+	case 0x1842FBF4:
+		BMS_Cell_Volt[260] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[261] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[262] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[263] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[66] = 0x01;
+		break;
+	case 0x1843FBF4:
+		BMS_Cell_Volt[264] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[265] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[266] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[267] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[67] = 0x01;
+		break;
+	case 0x1844FBF4:
+		BMS_Cell_Volt[268] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[269] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[270] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[271] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[68] = 0x01;
+		break;
+	case 0x1845FBF4:
+		BMS_Cell_Volt[272] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[273] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[274] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[275] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[69] = 0x01;
+		break;
+	case 0x1846FBF4:
+		BMS_Cell_Volt[276] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[277] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[278] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[279] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[70] = 0x01;
+		break;
+	case 0x1847FBF4:
+		BMS_Cell_Volt[280] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[281] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[282] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[283] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[71] = 0x01;
+		break;
+	case 0x1848FBF4:
+		BMS_Cell_Volt[284] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[285] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[286] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[287] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[72] = 0x01;
+		break;
+	case 0x1849FBF4:
+		BMS_Cell_Volt[288] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[289] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[290] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[291] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[73] = 0x01;
+		break;
+	case 0x184AFBF4:
+		BMS_Cell_Volt[292] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[293] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[294] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[295] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[74] = 0x01;
+		break;
+	case 0x184BFBF4:
+		BMS_Cell_Volt[296] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[297] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[298] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[299] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[75] = 0x01;
+		break;
+	case 0x184CFBF4:
+		BMS_Cell_Volt[300] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[301] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[302] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[303] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[76] = 0x01;
+		break;
+	case 0x184DFBF4:
+		BMS_Cell_Volt[304] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[305] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[306] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[307] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[77] = 0x01;
+		break;
+	case 0x184EFBF4:
+		BMS_Cell_Volt[308] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[309] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[310] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[311] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[78] = 0x01;
+		break;
+	case 0x184FFBF4:
+		BMS_Cell_Volt[312] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[313] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[314] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[315] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[79] = 0x01;
+		break;
+	case 0x1850FBF4:
+		BMS_Cell_Volt[316] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[317] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[318] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[319] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[80] = 0x01;
+		break;
+	case 0x1851FBF4:
+		BMS_Cell_Volt[320] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[321] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[322] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[323] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[81] = 0x01;
+		break;
+	case 0x1852FBF4:
+		BMS_Cell_Volt[324] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[325] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[326] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[327] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[82] = 0x01;
+		break;
+	case 0x1853FBF4:
+		BMS_Cell_Volt[328] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[329] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[330] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[331] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[83] = 0x01;
+		break;
+	case 0x1854FBF4:
+		BMS_Cell_Volt[332] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[333] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[334] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[335] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[84] = 0x01;
+		break;
+	case 0x1855FBF4:
+		BMS_Cell_Volt[336] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[337] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[338] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[339] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[85] = 0x01;
+		break;
+	case 0x1856FBF4:
+		BMS_Cell_Volt[340] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[341] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[342] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[343] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[86] = 0x01;
+		break;
+	case 0x1857FBF4:
+		BMS_Cell_Volt[344] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[345] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[346] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[347] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[87] = 0x01;
+		break;
+	case 0x1858FBF4:
+		BMS_Cell_Volt[348] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[349] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[350] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[351] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[88] = 0x01;
+		break;
+	case 0x1859FBF4:
+		BMS_Cell_Volt[352] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[353] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[354] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[355] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[89] = 0x01;
+		break;
+	case 0x185AFBF4:
+		BMS_Cell_Volt[356] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[357] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[358] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[359] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[90] = 0x01;
+		break;
+	case 0x185BFBF4:
+		BMS_Cell_Volt[360] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[361] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[362] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[363] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[91] = 0x01;
+		break;
+	case 0x185CFBF4:
+		BMS_Cell_Volt[364] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[365] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[366] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[367] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[92] = 0x01;
+		break;
+	case 0x185DFBF4:
+		BMS_Cell_Volt[368] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[369] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[370] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[371] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[93] = 0x01;
+		break;
+	case 0x185EFBF4:
+		BMS_Cell_Volt[372] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[373] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[374] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[375] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[94] = 0x01;
+		break;
+	case 0x185FFBF4:
+		BMS_Cell_Volt[376] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[377] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[378] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[379] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[95] = 0x01;
+		break;
+	case 0x1860FBF4:
+		BMS_Cell_Volt[380] = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_Cell_Volt[381] = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS_Cell_Volt[382] = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS_Cell_Volt[383] = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[96] = 0x01;
+		break;
+	case 0x1881EFF4:
+		BMS11_Fult1_DelTemp = (uint8)(((*(uint8 *)(rawData + 0)) >> 2) & 0x3);
+		BMS11_Fult1_OverTemp = (uint8)(((*(uint8 *)(rawData + 0)) >> 4) & 0x3);
+		BMS11_Fult1_PackOverHVolt = (uint8)(((*(uint8 *)(rawData + 0)) >> 6) & 0x3);
+		BMS11_Fult1_PackLowHVolt = (uint8)(((*(uint8 *)(rawData + 1))) & 0x3);
+		BMS11_Fult1_LowSOC = (uint8)(((*(uint8 *)(rawData + 1)) >> 2) & 0x3);
+		BMS11_Fult1_OverUcell = (uint8)(((*(uint8 *)(rawData + 1)) >> 4) & 0x3);
+		BMS11_Fult1_LowUcell = (uint8)(((*(uint8 *)(rawData + 1)) >> 6) & 0x3);
+		BMS11_Fult1_LowInsRes = (uint8)(((*(uint8 *)(rawData + 2))) & 0x3);
+		BMS11_Fult1_UcellUniformity = (uint8)(((*(uint8 *)(rawData + 2)) >> 2) & 0x3);
+		BMS11_Fult1_OverChg = (uint8)(((*(uint8 *)(rawData + 2)) >> 4) & 0x3);
+		BMS11_Fult1_OverSOC = (uint8)(((*(uint8 *)(rawData + 2)) >> 6) & 0x3);
+		BMS11_Fult1_SOCChangeFast = (uint8)(((*(uint8 *)(rawData + 3))) & 0x1);
+		BMS11_Fult1_BatSysNotMatch = (uint8)(((*(uint8 *)(rawData + 3)) >> 1) & 0x1);
+		BMS11_Fult1_HVILFault = (uint8)(((*(uint8 *)(rawData + 3)) >> 2) & 0x1);
+		BMS11_PackOutsideVolt = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BcuRxFlag[97] = 0x01;
+		break;
+	case 0x1882EFF4:
+		BMS12_Fult2_FaultNum = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS12_Fult2_CellOverDischrg = (uint8)(((*(uint8 *)(rawData + 1))) & 0x1);
+		BMS12_Fult2_CellLowTemp = (uint8)(((*(uint8 *)(rawData + 1)) >> 1) & 0x1);
+		BMS12_Fult2_PackFireWarning = (uint8)(((*(uint8 *)(rawData + 1)) >> 2) & 0x1);
+		BMS12_Fult2_OverDischrgCurr = (uint8)(((*(uint8 *)(rawData + 1)) >> 3) & 0x3);
+		BMS12_Fult2_OverChrgCurrInTheDrive = (uint8)(((*(uint8 *)(rawData + 1)) >> 5) & 0x3);
+		BMS12_Fult2_CurrSensorErr = (uint8)(((*(uint8 *)(rawData + 1)) >> 7) & 0x1);
+		BMS12_Fult2_PowerSupplyErr = (uint8)(((*(uint8 *)(rawData + 2))) & 0x1);
+		BMS12_Fult2_TMSErr = (uint8)(((*(uint8 *)(rawData + 2)) >> 1) & 0x1);
+		BMS12_Fult2_HeatingFilmErr = (uint8)(((*(uint8 *)(rawData + 2)) >> 2) & 0x1);
+		BMS12_Fult2_PackSelfProtect = (uint8)(((*(uint8 *)(rawData + 2)) >> 3) & 0x1);
+		BMS12_Fult2_MainLoopPrechrgErr = (uint8)(((*(uint8 *)(rawData + 2)) >> 4) & 0x1);
+		BMS12_Fult2_AuxLoopPrechrgErr = (uint8)(((*(uint8 *)(rawData + 2)) >> 5) & 0x1);
+		BMS12_Fult2_ChrgInsLowErr = (uint8)(((*(uint8 *)(rawData + 2)) >> 6) & 0x1);
+		BMS12_Fult2_ACANLost = (uint8)(((*(uint8 *)(rawData + 2)) >> 7) & 0x1);
+		BMS12_Fult2_InnerCommunicationErr = (uint8)(((*(uint8 *)(rawData + 3))) & 0x1);
+		BMS12_Fult2_DCDCErr = (uint8)(((*(uint8 *)(rawData + 3)) >> 1) & 0x1);
+		BMS12_Fult2_BranchBreakErr = (uint8)(((*(uint8 *)(rawData + 3)) >> 2) & 0x1);
+		BMS12_Fult2_HeatRelayOpenErr = (uint8)(((*(uint8 *)(rawData + 3)) >> 3) & 0x1);
+		BMS12_Fult2_HeatRelayWeldErr = (uint8)(((*(uint8 *)(rawData + 3)) >> 4) & 0x1);
+		BMS12_Fult2_MainPosRelayOpenErr = (uint8)(((*(uint8 *)(rawData + 3)) >> 5) & 0x1);
+		BMS12_Fult2_MainPosRelayWeldErr = (uint8)(((*(uint8 *)(rawData + 3)) >> 6) & 0x1);
+		BMS12_Fult2_MainNegRelayOpenErr = (uint8)(((*(uint8 *)(rawData + 3)) >> 7) & 0x1);
+		BMS12_Fult2_MainNegRelayWeldErr = (uint8)(((*(uint8 *)(rawData + 4))) & 0x1);
+		BMS12_Fult2_DCChrgPos1RelayOpenErr = (uint8)(((*(uint8 *)(rawData + 4)) >> 1) & 0x1);
+		BMS12_Fult2_DCChrgPos1RelayWeldErr = (uint8)(((*(uint8 *)(rawData + 4)) >> 2) & 0x1);
+		BMS12_Fult2_DCChrgNeg1RelayOpenErr = (uint8)(((*(uint8 *)(rawData + 4)) >> 3) & 0x1);
+		BMS12_Fult2_DCChrgNeg1RelayWeldErr = (uint8)(((*(uint8 *)(rawData + 4)) >> 4) & 0x1);
+		BMS12_Fult2_DCChrgPos2RelayOpenErr = (uint8)(((*(uint8 *)(rawData + 4)) >> 5) & 0x1);
+		BMS12_Fult2_DCChrgPos2RelayWeldErr = (uint8)(((*(uint8 *)(rawData + 4)) >> 6) & 0x1);
+		BMS12_Fult2_DCChrgNeg2RelayOpenErr = (uint8)(((*(uint8 *)(rawData + 4)) >> 7) & 0x1);
+		BMS12_Fult2_DCChrgNeg2RelayWeldErr = (uint8)(((*(uint8 *)(rawData + 5))) & 0x1);
+		BMS12_Fult2_ChrgConnectErr = (uint8)(((*(uint8 *)(rawData + 6)) >> 1) & 0x1);
+		BMS12_ult2_OverDischrgCurrWhenInChrg = (uint8)(((*(uint8 *)(rawData + 6)) >> 2) & 0x1);
+		BMS12_Fult2_OverChrgCurrInTheChrg = (uint8)(((*(uint8 *)(rawData + 6)) >> 3) & 0x1);
+		BMS12_Fult2_ChrgNTCErr = (uint8)(((*(uint8 *)(rawData + 6)) >> 4) & 0x1);
+		BMS12_Fult2_ChrgNTCTempOver = (uint8)(((*(uint8 *)(rawData + 6)) >> 5) & 0x3);
+		BMS12_Fult2_ELockErr = (uint8)(((*(uint8 *)(rawData + 6)) >> 7) & 0x1);
+		BMS12_Fult2_FireDetectorEr = (uint8)(((*(uint8 *)(rawData + 7))) & 0x1);
+		BMS12_Fult2_ContiDischrgCurrOverLoad = (uint8)(((*(uint8 *)(rawData + 7)) >> 1) & 0x3);
+		BMS12_Fult2_SOCDifferErr = (uint8)(((*(uint8 *)(rawData + 7)) >> 3) & 0x1);
+		BMS12_Fult2_ContiChrgCurrOverLoad = (uint8)(((*(uint8 *)(rawData + 7)) >> 4) & 0x3);
+		BcuRxFlag[98] = 0x01;
+		break;
+	case 0x1883EFF4:
+		BMS1_MainPosRelaySt = (uint8)(((*(uint8 *)(rawData + 0))) & 0x3);
+		BMS1_MainNegRelaySt = (uint8)(((*(uint8 *)(rawData + 0)) >> 2) & 0x3);
+		BMS1_PreChgRelaySt = (uint8)(((*(uint8 *)(rawData + 0)) >> 4) & 0x3);
+		BMS1_DCChrgPos1RelaySt = (uint8)(((*(uint8 *)(rawData + 0)) >> 6) & 0x3);
+		BMS1_DCChrgNeg1RelaySt = (uint8)(((*(uint8 *)(rawData + 1))) & 0x3);
+		BMS1_DCChrgPos2RelaySt = (uint8)(((*(uint8 *)(rawData + 1)) >> 2) & 0x3);
+		BMS1_DCChrgNeg2RelaySt = (uint8)(((*(uint8 *)(rawData + 1)) >> 4) & 0x3);
+		BMS1_HeatPosRelaySt = (uint8)(((*(uint8 *)(rawData + 1)) >> 6) & 0x3);
+		BMS1_HeatNegRelaySt = (uint8)(((*(uint8 *)(rawData + 2))) & 0x3);
+		BMS1_SysSts = (uint8)(((*(uint8 *)(rawData + 2)) >> 2) & 0xF);
+		BMS1_Life = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS1_BalanceStatus = (uint8)(((*(uint8 *)(rawData + 4)) >> 2) & 0x1);
+		BMS1_DCChrgConnectSt = (uint8)(((*(uint8 *)(rawData + 4)) >> 3) & 0x3);
+		BMS1_ChrgMode = (uint8)(((*(uint16 *)(rawData + 4)) >> 7) & 0x3);
+		BMS1_ChrgStatus = (uint8)(((*(uint8 *)(rawData + 5)) >> 1) & 0x3);
+		BMS1_HeatingStatus = (uint8)(((*(uint8 *)(rawData + 5)) >> 3) & 0x1);
+		BMS1_CoolingStatus = (uint8)(((*(uint8 *)(rawData + 5)) >> 4) & 0x3);
+		BMS1_RechrgCycels = (uint32)(((*(uint32 *)(rawData + 5)) >> 6) & 0x3FFFF);
+		BcuRxFlag[99] = 0x01;
+		break;
+	case 0x1884EFF4:
+		BMS2_SOC = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS2_SOH = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS2_PackCurrent = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS2_PackInsideVolt = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS2_FaultCode = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS2_FaultLevel = (uint8)(((*(uint8 *)(rawData + 7))) & 0x3);
+		BMS2_RqHVPoerOff = (uint8)(((*(uint8 *)(rawData + 7)) >> 2) & 0x3);
+		BMS2_Life = (uint8)(((*(uint8 *)(rawData + 7)) >> 4) & 0xF);
+		BcuRxFlag[100] = 0x01;
+		break;
+	case 0x1885EFF4:
+		BMS4_PosIsolation = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS4_NegIsolation = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS4_SysInsRes = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS4_InsDetectorSt = (uint8)(((*(uint8 *)(rawData + 6))) & 0x1);
+		BcuRxFlag[101] = 0x01;
+		break;
+	case 0x1886EFF4:
+		BMS8_Max_Temp = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS8_Min_Temp = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS8_Avg_Temp = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS8_MaxTempSysNr = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS8_MaxTempNr = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS8_MinTempSysNr = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS8_MinTempNr = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BcuRxFlag[102] = 0x01;
+		break;
+	case 0x1887EFF4:
+		BMS6_Max_Ucell = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS6_Min_Ucell = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS6_Avg_Ucell = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS6_SOE = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[103] = 0x01;
+		break;
+	case 0x1888EFF4:
+		BMS7_MaxUcellSysNr = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS7_MaxUcellNr = (uint16)(((*(uint16 *)(rawData + 1))) & 0xFFFF);
+		BMS7_MinUcellSysNr = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS7_MinUcellNr = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BcuRxFlag[104] = 0x01;
+		break;
+	case 0x1889EFF4:
+		BMS23_Gun1DCPosTemp = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS23_Gun1DCNegTemp = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS23_Gun2DCPosTemp = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS23_Gun2DCNegTemp = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS23_RemainChgTi = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[105] = 0x01;
+		break;
+	case 0x18A0FBF4:
+		BMS_Cell_TempN[0] = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS_Cell_TempN[1] = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_Cell_TempN[2] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_Cell_TempN[3] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_Cell_TempN[4] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_Cell_TempN[5] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_Cell_TempN[6] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_Cell_TempN[7] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[106] = 0x01;
+		break;
+	case 0x18A1FBF4:
+		BMS_Cell_TempN[8] = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS_Cell_TempN[9] = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_Cell_TempN[10] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_Cell_TempN[11] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_Cell_TempN[12] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_Cell_TempN[13] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_Cell_TempN[14] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_Cell_TempN[15] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[107] = 0x01;
+		break;
+	case 0x18A2FBF4:
+		BMS_Cell_TempN[16] = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS_Cell_TempN[17] = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_Cell_TempN[18] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_Cell_TempN[19] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_Cell_TempN[20] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_Cell_TempN[21] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_Cell_TempN[22] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_Cell_TempN[23] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BMS_Cell_TempN[24] = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS_Cell_TempN[25] = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_Cell_TempN[26] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_Cell_TempN[27] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_Cell_TempN[28] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_Cell_TempN[29] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_Cell_TempN[30] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_Cell_TempN[31] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[108] = 0x01;
+		break;
+	case 0x18A3FBF4:
+		BMS_Cell_TempN[32] = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS_Cell_TempN[33] = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_Cell_TempN[34] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_Cell_TempN[35] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_Cell_TempN[36] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_Cell_TempN[37] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_Cell_TempN[38] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_Cell_TempN[39] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[109] = 0x01;
+		break;
+	case 0x18A4FBF4:
+		BMS_Cell_TempN[40] = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS_Cell_TempN[41] = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_Cell_TempN[42] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_Cell_TempN[43] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_Cell_TempN[44] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_Cell_TempN[45] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_Cell_TempN[46] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_Cell_TempN[47] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[110] = 0x01;
+		break;
+	case 0x18A5FBF4:
+		BMS_Cell_TempN[48] = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS_Cell_TempN[49] = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_Cell_TempN[50] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_Cell_TempN[51] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_Cell_TempN[52] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_Cell_TempN[53] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_Cell_TempN[54] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_Cell_TempN[55] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[111] = 0x01;
+		break;
+	case 0x18A6FBF4:
+		BMS_Cell_TempN[56] = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS_Cell_TempN[57] = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_Cell_TempN[58] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_Cell_TempN[59] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_Cell_TempN[60] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_Cell_TempN[61] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_Cell_TempN[62] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_Cell_TempN[63] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[112] = 0x01;
+		break;
+	case 0x18E1EFF4:
+	{
+		uint8 SN_FrameNo = 0, SN_SysCodeLength;
+		SN_FrameNo = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		SN_SysCodeLength = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS_SN_SysCode[0 + 6 * (SN_FrameNo - 1)] = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS_SN_SysCode[1 + 6 * (SN_FrameNo - 1)] = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS_SN_SysCode[2 + 6 * (SN_FrameNo - 1)] = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS_SN_SysCode[3 + 6 * (SN_FrameNo - 1)] = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS_SN_SysCode[4 + 6 * (SN_FrameNo - 1)] = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS_SN_SysCode[5 + 6 * (SN_FrameNo - 1)] = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[113] = 0x01;
+		BCU_SnMsgFlag = BCU_SnMsgFlag | (1 << (SN_FrameNo - 1));
+		break;
+	}
+	case 0x18E2EFF4:
+		BMS21_RateCap = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS21_RateHVolt = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS21_RatePower = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS21_BattType = (uint8)(((*(uint8 *)(rawData + 6))) & 0xF);
+		BMS21_CoolType = (uint8)(((*(uint8 *)(rawData + 6)) >> 4) & 0x3);
+		BMS21_Manufacture = (uint8)(((*(uint16 *)(rawData + 6)) >> 6) & 0xF);
+		BMS21_ProtocolEditionH = (uint8)(((*(uint8 *)(rawData + 7)) >> 2) & 0x3);
+		BMS21_ProtocolEditionL = (uint8)(((*(uint8 *)(rawData + 7)) >> 4) & 0xF);
+		BcuRxFlag[114] = 0x01;
+		break;
+	case 0x18E3EFF4:
+		BMS9_TotCSCNum = (uint8)(((*(uint8 *)(rawData + 0))) & 0xFF);
+		BMS9_PackTotCellNum = (uint16)(((*(uint16 *)(rawData + 1))) & 0xFFFF);
+		BMS9_PackTotTempNum = (uint8)(((*(uint8 *)(rawData + 3))) & 0xFF);
+		BMS9_HVBranchNum = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS9_SingleHVBranchCellNum = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS9_BattSysNum = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS9_BattSysSeqNum = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[115] = 0x01;
+		break;
+	case 0x18E4EFF4:
+		BMS22_PackAvaiMaxVolt = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS22_PackAvaiMinVolt = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS22_AvaiMaxSOC = (uint8)(((*(uint8 *)(rawData + 4))) & 0xFF);
+		BMS22_AvaiMinSOC = (uint8)(((*(uint8 *)(rawData + 5))) & 0xFF);
+		BMS22_AvaiMaxTemp = (uint8)(((*(uint8 *)(rawData + 6))) & 0xFF);
+		BMS22_AvaiMinTemp = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[116] = 0x01;
+		break;
+	case 0x18FEDAF4:
+		BMS_SoftwareVersion = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS_HardwareVersion = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BcuRxFlag[117] = 0x01;
+		break;
+	case 0x18FF23F4:
+		BMS3_MaxDischgPow = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS3_MaxChgPow = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS3_MaxInstantDischgPow = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS3_MaxiInstantChgPow = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[118] = 0x01;
+		break;
+	case 0x18FF24F4:
+		BMS10_SubSysEncodingLen = (uint8)(((*(uint8 *)(rawData + 1))) & 0xFF);
+		BMS10_SubSysIdx = (uint8)(((*(uint8 *)(rawData + 2))) & 0xFF);
+		BMS10_SubSysErrNum = (uint8)(((*(uint8 *)(rawData + 7))) & 0xFF);
+		BcuRxFlag[119] = 0x01;
+		break;
+	case 0x18FF25F4:
+		BMS5_DischgCurMaxAllw = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS5_ChrgCurMaxAllw = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS5_InstChrgCurMaxAllw = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS5_InstDischrgCurMaxAllw = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[120] = 0x01;
+		break;
+	case 0x18FF30F4:
+		BMS26_Bat_InstantConsume = (uint16)(((*(uint16 *)(rawData + 0))) & 0xFFFF);
+		BMS26_Bat_TotalConsume = (uint16)(((*(uint16 *)(rawData + 2))) & 0xFFFF);
+		BMS26_ChgReqVoltage = (uint16)(((*(uint16 *)(rawData + 4))) & 0xFFFF);
+		BMS26_ChgReqCurrent = (uint16)(((*(uint16 *)(rawData + 6))) & 0xFFFF);
+		BcuRxFlag[121] = 0x01;
+		break;
+	case 0x18FF45F4:
+		BMS28_ReqMode = (uint8)(((((*(uint8 *)(rawData + 0)) >> 0) & 0x3) * 1) + (0));
+		BMS28_HVCmd = (uint8)(((((*(uint8 *)(rawData + 0)) >> 2) & 0x3) * 1) + (0));
+		BMS28_ChgSts = (uint8)(((((*(uint8 *)(rawData + 0)) >> 4) & 0x3) * 1) + (0));
+		BMS28_HVRelaySts = (uint8)(((((*(uint8 *)(rawData + 0)) >> 6) & 0x3) * 1) + (0));
+		BMS28_HVVolt = (uint16)((((((*(uint16 *)(rawData + 1) >> 8) & 0xFF) | ((*(uint16 *)(rawData + 1) << 8) & 0xFF00) >> 0) & 0xFFFF) * 1) + (0));
+		BMS28_SetTemp = (uint8)(((((*(uint8 *)(rawData + 4)) >> 0) & 0xFF) * 1) + (0));
+		BMS28_Life = (uint8)(((((*(uint8 *)(rawData + 6)) >> 0) & 0xFF) * 1) + (0));
+		BMS28_CRC = (uint8)(((((*(uint8 *)(rawData + 7)) >> 0) & 0xFF) * 1) + (0));
+		BcuRxFlag[122] = 0x01;
+		break;
+	case 0x18FFC13A:
+		TMS_WorkStatus = (uint8)(((((*(uint8 *)(rawData + 0)) >> 0) & 0x3) * 1) + (0));
+		TMS_HVRelayST = (uint8)(((((*(uint8 *)(rawData + 0)) >> 2) & 0x3) * 1) + (0));
+		TMS_OutletTemp = (uint8)(((((*(uint8 *)(rawData + 1)) >> 0) & 0xFF) * 1) + (0));
+		TMS_InletTemp = (uint8)(((((*(uint8 *)(rawData + 2)) >> 0) & 0xFF) * 1) + (0));
+		TMS_Version = (uint8)(((((*(uint8 *)(rawData + 3)) >> 0) & 0xFF) * 1) + (0));
+		TMS_ReqPow = (uint16)((((((*(uint16 *)(rawData + 5) >> 8) & 0xFF) | ((*(uint16 *)(rawData + 5) << 8) & 0xFF00) >> 0) & 0xFFFF) * 1) + (0));
+		TMS_ErrCode = (uint8)(((((*(uint8 *)(rawData + 7)) >> 0) & 0x3F) * 1) + (0));
+		TMS_FaultLevel = (uint8)(((((*(uint8 *)(rawData + 7)) >> 6) & 0x3) * 1) + (0));
+		BcuRxFlag[123] = 0x01;
+		break;
+	case 0x18FFD4F4:
+		BMS14_TotalChargeAh = (uint32)(((*(uint32 *)(rawData + 0))) & 0xFFFFFFFF);
+		BMS14_TotalDischargeAh = (uint32)(((*(uint32 *)(rawData + 4))) & 0xFFFFFFFF);
+		BcuRxFlag[124] = 0x01;
+		break;
+	case 0x18FFD5F4:
+		BMS15_TotalChargeKwh = (uint32)(((*(uint32 *)(rawData + 0))) & 0xFFFFFFFF);
+		BMS15_TotalDischargeKwh = (uint32)(((*(uint32 *)(rawData + 4))) & 0xFFFFFFFF);
+		BcuRxFlag[125] = 0x01;
+		break;
+	case 0x18FFD6F4:
+		BMS16_TotalEneryECOChargeAh = (uint32)(((*(uint32 *)(rawData + 0))) & 0xFFFFFFFF);
+		BMS16_TotalEneryECOChargeKwh = (uint32)(((*(uint32 *)(rawData + 4))) & 0xFFFFFFFF);
+		BcuRxFlag[126] = 0x01;
+		break;
+	case 0x18FFD7F4:
+		BMS17_TotalStationChargeAh = (uint32)(((*(uint32 *)(rawData + 0))) & 0xFFFFFFFF);
+		BMS17_TotalStationChargeKwh = (uint32)(((*(uint32 *)(rawData + 4))) & 0xFFFFFFFF);
+		BcuRxFlag[127] = 0x01;
+		break;
+	case 0x18FFD8F4:
+		BMS18_TotalPoleChargeAh = (uint32)(((*(uint32 *)(rawData + 0))) & 0xFFFFFFFF);
+		BMS18_TotalPoleChargeKwh = (uint32)(((*(uint32 *)(rawData + 4))) & 0xFFFFFFFF);
+		BcuRxFlag[128] = 0x01;
+		break;
+	case 0x18FFD9F4:
+		BMS19_SingleChargeAh = (uint32)(((*(uint32 *)(rawData + 0))) & 0xFFFFFFFF);
+		BMS19_SingleChargeKwh = (uint32)(((*(uint32 *)(rawData + 4))) & 0xFFFFFFFF);
+		BcuRxFlag[129] = 0x01;
+		break;
+	default:
+		break;
+	}
+}
+void BcuRxDiagnose(void)//100ms调用一次
+{
+	static uint32 TimeCounter = 0;//ms
+	TimeCounter = TimeCounter + 100; //
+
+	for (uint8 i = 0; i < sizeof(BcuInTable) / 4; i++)
+	{
+		if (BcuRxFlag[i] == 1) // received msg, and clear the error conter
+		{
+			BcuRxErrorCounter[i] = 0;
+			BcuRxFlag[i] = 0;
+			continue;
+		}
+		if (BcuRxErrorCounter[i] < 3)
+		{
+			BcuRxShortError[i] = 0;
+			BcuRxLongError[i] = 0;
+		}
+		else if (BcuRxErrorCounter[i] >= 3 && BcuRxErrorCounter[i] < 13)
+		{
+			BcuRxShortError[i] = 1;
+			BcuRxLongError[i] = 0;
+		}
+		else if (BcuRxErrorCounter[i] >= 13)
+		{
+			BcuRxShortError[i] = 0;
+			BcuRxLongError[i] = 1;
+			BcuRxMsgSetInvalidValue(BcuInTable[i]);
+			BcuRxErrorCounter[i] = 0;
+		}
+		else if (BcuRxErrorCounter[i] == 0xFF)
+		{
+			BcuRxErrorCounter[i] = 0xFE;
+		}
+	}
+
+	if (TimeCounter % 100 == 0) // period <=100ms
+	{
+		BcuRxErrorCounter[99]++; // can msg 0x1883EFF4
+		// if(BcuRxErrorCounter[99]>=13)
+		BcuRxErrorCounter[100]++; // can msg 0x1884EFF4
+		// if(BcuRxErrorCounter[100]>=13)
+		BcuRxErrorCounter[118]++; // can msg 0x18FF23F4
+		// if(BcuRxErrorCounter[118]>=13)
+		BcuRxErrorCounter[120]++; // can msg 0x18FF25F4
+								  // if(BcuRxErrorCounter[120]>=13)
+	}
+	if (TimeCounter % 200 == 0) // period ==200ms
+	{
+		BcuRxErrorCounter[103]++; // can msg 0x1887EFF4
+		// if(BcuRxErrorCounter[103]>=13)
+		// printf("can msg 0x%x lost,cycle time200ms\n",COMInTable[103]);
+		BcuRxErrorCounter[121]++; // can msg 0x18FF30F4
+								  // if(BcuRxErrorCounter[121]>=13)
+								  // printf("can msg 0x%x lost,cycle time200ms\n",COMInTable[121]);
+	}
+	if (TimeCounter % 500 == 0) // period ==500ms
+	{
+		BcuRxErrorCounter[0]++; // can msg 0x1801EFF4
+		// if(BcuRxErrorCounter[0]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[0]);
+		BcuRxErrorCounter[1]++; // can msg 0x1801FBF4
+		// if(BcuRxErrorCounter[1]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[1]);
+		BcuRxErrorCounter[2]++; // can msg 0x1802FBF4
+		// if(BcuRxErrorCounter[2]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[2]);
+		BcuRxErrorCounter[3]++; // can msg 0x1803FBF4
+		// if(BcuRxErrorCounter[3]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[3]);
+		BcuRxErrorCounter[4]++; // can msg 0x1804FBF4
+		// if(BcuRxErrorCounter[4]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[4]);
+		BcuRxErrorCounter[5]++; // can msg 0x1805FBF4
+		// if(BcuRxErrorCounter[5]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[5]);
+		BcuRxErrorCounter[6]++; // can msg 0x1806FBF4
+		// if(BcuRxErrorCounter[6]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[6]);
+		BcuRxErrorCounter[7]++; // can msg 0x1807FBF4
+		// if(BcuRxErrorCounter[7]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[7]);
+		BcuRxErrorCounter[8]++; // can msg 0x1808FBF4
+		// if(BcuRxErrorCounter[8]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[8]);
+		BcuRxErrorCounter[9]++; // can msg 0x1809FBF4
+		// if(BcuRxErrorCounter[9]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[9]);
+		BcuRxErrorCounter[10]++; // can msg 0x180AFBF4
+		// if(BcuRxErrorCounter[10]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[10]);
+		BcuRxErrorCounter[11]++; // can msg 0x180BFBF4
+		// if(BcuRxErrorCounter[11]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[11]);
+		BcuRxErrorCounter[12]++; // can msg 0x180CFBF4
+		// if(BcuRxErrorCounter[12]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[12]);
+		BcuRxErrorCounter[13]++; // can msg 0x180DFBF4
+		// if(BcuRxErrorCounter[13]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[13]);
+		BcuRxErrorCounter[14]++; // can msg 0x180EFBF4
+		// if(BcuRxErrorCounter[14]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[14]);
+		BcuRxErrorCounter[15]++; // can msg 0x180FFBF4
+		// if(BcuRxErrorCounter[15]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[15]);
+		BcuRxErrorCounter[16]++; // can msg 0x1810FBF4
+		// if(BcuRxErrorCounter[16]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[16]);
+		BcuRxErrorCounter[17]++; // can msg 0x1811FBF4
+		// if(BcuRxErrorCounter[17]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[17]);
+		BcuRxErrorCounter[18]++; // can msg 0x1812FBF4
+		// if(BcuRxErrorCounter[18]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[18]);
+		BcuRxErrorCounter[19]++; // can msg 0x1813FBF4
+		// if(BcuRxErrorCounter[19]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[19]);
+		BcuRxErrorCounter[20]++; // can msg 0x1814FBF4
+		// if(BcuRxErrorCounter[20]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[20]);
+		BcuRxErrorCounter[21]++; // can msg 0x1815FBF4
+		// if(BcuRxErrorCounter[21]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[21]);
+		BcuRxErrorCounter[22]++; // can msg 0x1816FBF4
+		// if(BcuRxErrorCounter[22]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[22]);
+		BcuRxErrorCounter[23]++; // can msg 0x1817FBF4
+		// if(BcuRxErrorCounter[23]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[23]);
+		BcuRxErrorCounter[24]++; // can msg 0x1818FBF4
+		// if(BcuRxErrorCounter[24]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[24]);
+		BcuRxErrorCounter[25]++; // can msg 0x1819FBF4
+		// if(BcuRxErrorCounter[25]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[25]);
+		BcuRxErrorCounter[26]++; // can msg 0x181AFBF4
+		// if(BcuRxErrorCounter[26]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[26]);
+		BcuRxErrorCounter[27]++; // can msg 0x181BFBF4
+		// if(BcuRxErrorCounter[27]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[27]);
+		BcuRxErrorCounter[28]++; // can msg 0x181CFBF4
+		// if(BcuRxErrorCounter[28]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[28]);
+		BcuRxErrorCounter[29]++; // can msg 0x181DFBF4
+		// if(BcuRxErrorCounter[29]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[29]);
+		BcuRxErrorCounter[30]++; // can msg 0x181EFBF4
+		// if(BcuRxErrorCounter[30]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[30]);
+		BcuRxErrorCounter[31]++; // can msg 0x181FFBF4
+		// if(BcuRxErrorCounter[31]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[31]);
+		BcuRxErrorCounter[32]++; // can msg 0x1820FBF4
+		// if(BcuRxErrorCounter[32]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[32]);
+		BcuRxErrorCounter[33]++; // can msg 0x1821FBF4
+		// if(BcuRxErrorCounter[33]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[33]);
+		BcuRxErrorCounter[34]++; // can msg 0x1822FBF4
+		// if(BcuRxErrorCounter[34]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[34]);
+		BcuRxErrorCounter[35]++; // can msg 0x1823FBF4
+		// if(BcuRxErrorCounter[35]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[35]);
+		BcuRxErrorCounter[36]++; // can msg 0x1824FBF4
+		// if(BcuRxErrorCounter[36]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[36]);
+		BcuRxErrorCounter[37]++; // can msg 0x1825FBF4
+		// if(BcuRxErrorCounter[37]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[37]);
+		BcuRxErrorCounter[38]++; // can msg 0x1826FBF4
+		// if(BcuRxErrorCounter[38]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[38]);
+		BcuRxErrorCounter[39]++; // can msg 0x1827FBF4
+		// if(BcuRxErrorCounter[39]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[39]);
+		BcuRxErrorCounter[40]++; // can msg 0x1828FBF4
+		// if(BcuRxErrorCounter[40]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[40]);
+		BcuRxErrorCounter[41]++; // can msg 0x1829FBF4
+		// if(BcuRxErrorCounter[41]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[41]);
+		BcuRxErrorCounter[42]++; // can msg 0x182AFBF4
+		// if(BcuRxErrorCounter[42]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[42]);
+		BcuRxErrorCounter[43]++; // can msg 0x182BFBF4
+		// if(BcuRxErrorCounter[43]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[43]);
+		BcuRxErrorCounter[44]++; // can msg 0x182CFBF4
+		// if(BcuRxErrorCounter[44]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[44]);
+		BcuRxErrorCounter[45]++; // can msg 0x182DFBF4
+		// if(BcuRxErrorCounter[45]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[45]);
+		BcuRxErrorCounter[46]++; // can msg 0x182EFBF4
+		// if(BcuRxErrorCounter[46]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[46]);
+		BcuRxErrorCounter[47]++; // can msg 0x182FFBF4
+		// if(BcuRxErrorCounter[47]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[47]);
+		BcuRxErrorCounter[48]++; // can msg 0x1830FBF4
+		// if(BcuRxErrorCounter[48]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[48]);
+		BcuRxErrorCounter[49]++; // can msg 0x1831FBF4
+		// if(BcuRxErrorCounter[49]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[49]);
+		BcuRxErrorCounter[50]++; // can msg 0x1832FBF4
+		// if(BcuRxErrorCounter[50]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[50]);
+		BcuRxErrorCounter[51]++; // can msg 0x1833FBF4
+		// if(BcuRxErrorCounter[51]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[51]);
+		BcuRxErrorCounter[52]++; // can msg 0x1834FBF4
+		// if(BcuRxErrorCounter[52]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[52]);
+		BcuRxErrorCounter[53]++; // can msg 0x1835FBF4
+		// if(BcuRxErrorCounter[53]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[53]);
+		BcuRxErrorCounter[54]++; // can msg 0x1836FBF4
+		// if(BcuRxErrorCounter[54]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[54]);
+		BcuRxErrorCounter[55]++; // can msg 0x1837FBF4
+		// if(BcuRxErrorCounter[55]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[55]);
+		BcuRxErrorCounter[56]++; // can msg 0x1838FBF4
+		// if(BcuRxErrorCounter[56]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[56]);
+		BcuRxErrorCounter[57]++; // can msg 0x1839FBF4
+		// if(BcuRxErrorCounter[57]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[57]);
+		BcuRxErrorCounter[58]++; // can msg 0x183AFBF4
+		// if(BcuRxErrorCounter[58]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[58]);
+		BcuRxErrorCounter[59]++; // can msg 0x183BFBF4
+		// if(BcuRxErrorCounter[59]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[59]);
+		BcuRxErrorCounter[60]++; // can msg 0x183CFBF4
+		// if(BcuRxErrorCounter[60]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[60]);
+		BcuRxErrorCounter[61]++; // can msg 0x183DFBF4
+		// if(BcuRxErrorCounter[61]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[61]);
+		BcuRxErrorCounter[62]++; // can msg 0x183EFBF4
+		// if(BcuRxErrorCounter[62]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[62]);
+		BcuRxErrorCounter[63]++; // can msg 0x183FFBF4
+		// if(BcuRxErrorCounter[63]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[63]);
+		BcuRxErrorCounter[64]++; // can msg 0x1840FBF4
+		// if(BcuRxErrorCounter[64]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[64]);
+		BcuRxErrorCounter[65]++; // can msg 0x1841FBF4
+		// if(BcuRxErrorCounter[65]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[65]);
+		BcuRxErrorCounter[66]++; // can msg 0x1842FBF4
+		// if(BcuRxErrorCounter[66]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[66]);
+		BcuRxErrorCounter[67]++; // can msg 0x1843FBF4
+		// if(BcuRxErrorCounter[67]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[67]);
+		BcuRxErrorCounter[68]++; // can msg 0x1844FBF4
+		// if(BcuRxErrorCounter[68]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[68]);
+		BcuRxErrorCounter[69]++; // can msg 0x1845FBF4
+		// if(BcuRxErrorCounter[69]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[69]);
+		BcuRxErrorCounter[70]++; // can msg 0x1846FBF4
+		// if(BcuRxErrorCounter[70]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[70]);
+		BcuRxErrorCounter[71]++; // can msg 0x1847FBF4
+		// if(BcuRxErrorCounter[71]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[71]);
+		BcuRxErrorCounter[72]++; // can msg 0x1848FBF4
+		// if(BcuRxErrorCounter[72]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[72]);
+		BcuRxErrorCounter[73]++; // can msg 0x1849FBF4
+		// if(BcuRxErrorCounter[73]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[73]);
+		BcuRxErrorCounter[74]++; // can msg 0x184AFBF4
+		// if(BcuRxErrorCounter[74]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[74]);
+		BcuRxErrorCounter[75]++; // can msg 0x184BFBF4
+		// if(BcuRxErrorCounter[75]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[75]);
+		BcuRxErrorCounter[76]++; // can msg 0x184CFBF4
+		// if(BcuRxErrorCounter[76]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[76]);
+		BcuRxErrorCounter[77]++; // can msg 0x184DFBF4
+		// if(BcuRxErrorCounter[77]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[77]);
+		BcuRxErrorCounter[78]++; // can msg 0x184EFBF4
+		// if(BcuRxErrorCounter[78]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[78]);
+		BcuRxErrorCounter[79]++; // can msg 0x184FFBF4
+		// if(BcuRxErrorCounter[79]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[79]);
+		BcuRxErrorCounter[80]++; // can msg 0x1850FBF4
+		// if(BcuRxErrorCounter[80]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[80]);
+		BcuRxErrorCounter[81]++; // can msg 0x1851FBF4
+		// if(BcuRxErrorCounter[81]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[81]);
+		BcuRxErrorCounter[82]++; // can msg 0x1852FBF4
+		// if(BcuRxErrorCounter[82]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[82]);
+		BcuRxErrorCounter[83]++; // can msg 0x1853FBF4
+		// if(BcuRxErrorCounter[83]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[83]);
+		BcuRxErrorCounter[84]++; // can msg 0x1854FBF4
+		// if(BcuRxErrorCounter[84]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[84]);
+		BcuRxErrorCounter[85]++; // can msg 0x1855FBF4
+		// if(BcuRxErrorCounter[85]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[85]);
+		BcuRxErrorCounter[86]++; // can msg 0x1856FBF4
+		// if(BcuRxErrorCounter[86]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[86]);
+		BcuRxErrorCounter[87]++; // can msg 0x1857FBF4
+		// if(BcuRxErrorCounter[87]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[87]);
+		BcuRxErrorCounter[88]++; // can msg 0x1858FBF4
+		// if(BcuRxErrorCounter[88]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[88]);
+		BcuRxErrorCounter[89]++; // can msg 0x1859FBF4
+		// if(BcuRxErrorCounter[89]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[89]);
+		BcuRxErrorCounter[90]++; // can msg 0x185AFBF4
+		// if(BcuRxErrorCounter[90]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[90]);
+		BcuRxErrorCounter[91]++; // can msg 0x185BFBF4
+		// if(BcuRxErrorCounter[91]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[91]);
+		BcuRxErrorCounter[92]++; // can msg 0x185CFBF4
+		// if(BcuRxErrorCounter[92]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[92]);
+		BcuRxErrorCounter[93]++; // can msg 0x185DFBF4
+		// if(BcuRxErrorCounter[93]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[93]);
+		BcuRxErrorCounter[94]++; // can msg 0x185EFBF4
+		// if(BcuRxErrorCounter[94]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[94]);
+		BcuRxErrorCounter[95]++; // can msg 0x185FFBF4
+		// if(BcuRxErrorCounter[95]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[95]);
+		BcuRxErrorCounter[96]++; // can msg 0x1860FBF4
+		// if(BcuRxErrorCounter[96]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[96]);
+		BcuRxErrorCounter[97]++; // can msg 0x1881EFF4
+		// if(BcuRxErrorCounter[97]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[97]);
+		BcuRxErrorCounter[98]++; // can msg 0x1882EFF4
+		// if(BcuRxErrorCounter[98]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[98]);
+		BcuRxErrorCounter[101]++; // can msg 0x1885EFF4
+		// if(BcuRxErrorCounter[101]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[101]);
+		BcuRxErrorCounter[102]++; // can msg 0x1886EFF4
+		// if(BcuRxErrorCounter[102]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[102]);
+		BcuRxErrorCounter[104]++; // can msg 0x1888EFF4
+		// if(BcuRxErrorCounter[104]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[104]);
+		BcuRxErrorCounter[105]++; // can msg 0x1889EFF4
+		// if(BcuRxErrorCounter[105]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[105]);
+		BcuRxErrorCounter[106]++; // can msg 0x18A0FBF4
+		// if(BcuRxErrorCounter[106]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[106]);
+		BcuRxErrorCounter[107]++; // can msg 0x18A1FBF4
+		// if(BcuRxErrorCounter[107]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[107]);
+		BcuRxErrorCounter[108]++; // can msg 0x18A2FBF4
+		// if(BcuRxErrorCounter[108]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[108]);
+		BcuRxErrorCounter[109]++; // can msg 0x18A3FBF4
+		// if(BcuRxErrorCounter[109]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[109]);
+		BcuRxErrorCounter[110]++; // can msg 0x18A4FBF4
+		// if(BcuRxErrorCounter[110]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[110]);
+		BcuRxErrorCounter[111]++; // can msg 0x18A5FBF4
+		// if(BcuRxErrorCounter[111]>=13)
+		// printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[111]);
+		BcuRxErrorCounter[112]++; // can msg 0x18A6FBF4
+								  // if(BcuRxErrorCounter[112]>=13)
+								  // printf("can msg 0x%x lost,cycle time500ms\n",COMInTable[112]);
+	}
+	if (TimeCounter % 1000 == 0) // period ==1000ms
+	{
+		BcuRxErrorCounter[113]++; // can msg 0x18E1EFF4
+		// if(BcuRxErrorCounter[113]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[113]);
+		BcuRxErrorCounter[114]++; // can msg 0x18E2EFF4
+		// if(BcuRxErrorCounter[114]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[114]);
+		BcuRxErrorCounter[115]++; // can msg 0x18E3EFF4
+		// if(BcuRxErrorCounter[115]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[115]);
+		BcuRxErrorCounter[116]++; // can msg 0x18E4EFF4
+		// if(BcuRxErrorCounter[116]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[116]);
+		BcuRxErrorCounter[117]++; // can msg 0x18FEDAF4
+		// if(BcuRxErrorCounter[117]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[117]);
+		BcuRxErrorCounter[119]++; // can msg 0x18FF24F4
+		// if(BcuRxErrorCounter[119]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[119]);
+		BcuRxErrorCounter[122]++; // can msg 0x18FF45F4
+		// if(BcuRxErrorCounter[122]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[122]);
+		BcuRxErrorCounter[123]++; // can msg 0x18FFC13A
+		// if(BcuRxErrorCounter[123]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[123]);
+		BcuRxErrorCounter[124]++; // can msg 0x18FFD4F4
+		// if(BcuRxErrorCounter[124]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[124]);
+		BcuRxErrorCounter[125]++; // can msg 0x18FFD5F4
+		// if(BcuRxErrorCounter[125]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[125]);
+		BcuRxErrorCounter[126]++; // can msg 0x18FFD6F4
+		// if(BcuRxErrorCounter[126]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[126]);
+		BcuRxErrorCounter[127]++; // can msg 0x18FFD7F4
+		// if(BcuRxErrorCounter[127]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[127]);
+		BcuRxErrorCounter[128]++; // can msg 0x18FFD8F4
+		// if(BcuRxErrorCounter[128]>=13)
+		// printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[128]);
+		BcuRxErrorCounter[129]++; // can msg 0x18FFD9F4
+								  // if(BcuRxErrorCounter[129]>=13)
+								  // printf("can msg 0x%x lost,cycle time1000ms\n",COMInTable[129]);
+	}
+	if (TimeCounter % 2000 == 0) // period ==2000ms
+	{
+	}
+	if (TimeCounter % 3000 == 0) // period ==3000ms
+	{
+	}
+	if (TimeCounter % 5000 == 0) // period ==5000ms
+	{
+	}
+}
+void BcuRxMsgSetInvalidValue(uint32 ID)
+{
+	switch (ID)
+	{
+	case 0x1801EFF4:
+		BMS13_ReqVIN = 0xFF;
+		break;
+	case 0x1801FBF4:
+		BMS_Cell_Volt[0] = 0xFFFF;
+		BMS_Cell_Volt[1] = 0xFFFF;
+		BMS_Cell_Volt[2] = 0xFFFF;
+		BMS_Cell_Volt[3] = 0xFFFF;
+		break;
+	case 0x1802FBF4:
+		BMS_Cell_Volt[4] = 0xFFFF;
+		BMS_Cell_Volt[5] = 0xFFFF;
+		BMS_Cell_Volt[6] = 0xFFFF;
+		BMS_Cell_Volt[7] = 0xFFFF;
+		break;
+	case 0x1803FBF4:
+		BMS_Cell_Volt[8] = 0xFFFF;
+		BMS_Cell_Volt[9] = 0xFFFF;
+		BMS_Cell_Volt[10] = 0xFFFF;
+		BMS_Cell_Volt[11] = 0xFFFF;
+		break;
+	case 0x1804FBF4:
+		BMS_Cell_Volt[12] = 0xFFFF;
+		BMS_Cell_Volt[13] = 0xFFFF;
+		BMS_Cell_Volt[14] = 0xFFFF;
+		BMS_Cell_Volt[15] = 0xFFFF;
+		break;
+	case 0x1805FBF4:
+		BMS_Cell_Volt[16] = 0xFFFF;
+		BMS_Cell_Volt[17] = 0xFFFF;
+		BMS_Cell_Volt[18] = 0xFFFF;
+		BMS_Cell_Volt[19] = 0xFFFF;
+		break;
+	case 0x1806FBF4:
+		BMS_Cell_Volt[20] = 0xFFFF;
+		BMS_Cell_Volt[21] = 0xFFFF;
+		BMS_Cell_Volt[22] = 0xFFFF;
+		BMS_Cell_Volt[23] = 0xFFFF;
+		break;
+	case 0x1807FBF4:
+		BMS_Cell_Volt[24] = 0xFFFF;
+		BMS_Cell_Volt[25] = 0xFFFF;
+		BMS_Cell_Volt[26] = 0xFFFF;
+		BMS_Cell_Volt[27] = 0xFFFF;
+		break;
+	case 0x1808FBF4:
+		BMS_Cell_Volt[28] = 0xFFFF;
+		BMS_Cell_Volt[29] = 0xFFFF;
+		BMS_Cell_Volt[30] = 0xFFFF;
+		BMS_Cell_Volt[31] = 0xFFFF;
+		break;
+	case 0x1809FBF4:
+		BMS_Cell_Volt[32] = 0xFFFF;
+		BMS_Cell_Volt[33] = 0xFFFF;
+		BMS_Cell_Volt[34] = 0xFFFF;
+		BMS_Cell_Volt[35] = 0xFFFF;
+		break;
+	case 0x180AFBF4:
+		BMS_Cell_Volt[36] = 0xFFFF;
+		BMS_Cell_Volt[37] = 0xFFFF;
+		BMS_Cell_Volt[38] = 0xFFFF;
+		BMS_Cell_Volt[39] = 0xFFFF;
+		break;
+	case 0x180BFBF4:
+		BMS_Cell_Volt[40] = 0xFFFF;
+		BMS_Cell_Volt[41] = 0xFFFF;
+		BMS_Cell_Volt[42] = 0xFFFF;
+		BMS_Cell_Volt[43] = 0xFFFF;
+		break;
+	case 0x180CFBF4:
+		BMS_Cell_Volt[44] = 0xFFFF;
+		BMS_Cell_Volt[45] = 0xFFFF;
+		BMS_Cell_Volt[46] = 0xFFFF;
+		BMS_Cell_Volt[47] = 0xFFFF;
+		break;
+	case 0x180DFBF4:
+		BMS_Cell_Volt[48] = 0xFFFF;
+		BMS_Cell_Volt[49] = 0xFFFF;
+		BMS_Cell_Volt[50] = 0xFFFF;
+		BMS_Cell_Volt[51] = 0xFFFF;
+		break;
+	case 0x180EFBF4:
+		BMS_Cell_Volt[52] = 0xFFFF;
+		BMS_Cell_Volt[53] = 0xFFFF;
+		BMS_Cell_Volt[54] = 0xFFFF;
+		BMS_Cell_Volt[55] = 0xFFFF;
+		break;
+	case 0x180FFBF4:
+		BMS_Cell_Volt[56] = 0xFFFF;
+		BMS_Cell_Volt[57] = 0xFFFF;
+		BMS_Cell_Volt[58] = 0xFFFF;
+		BMS_Cell_Volt[59] = 0xFFFF;
+		break;
+	case 0x1810FBF4:
+		BMS_Cell_Volt[60] = 0xFFFF;
+		BMS_Cell_Volt[61] = 0xFFFF;
+		BMS_Cell_Volt[62] = 0xFFFF;
+		BMS_Cell_Volt[63] = 0xFFFF;
+		break;
+	case 0x1811FBF4:
+		BMS_Cell_Volt[64] = 0xFFFF;
+		BMS_Cell_Volt[65] = 0xFFFF;
+		BMS_Cell_Volt[66] = 0xFFFF;
+		BMS_Cell_Volt[67] = 0xFFFF;
+		break;
+	case 0x1812FBF4:
+		BMS_Cell_Volt[68] = 0xFFFF;
+		BMS_Cell_Volt[69] = 0xFFFF;
+		BMS_Cell_Volt[70] = 0xFFFF;
+		BMS_Cell_Volt[71] = 0xFFFF;
+		break;
+	case 0x1813FBF4:
+		BMS_Cell_Volt[72] = 0xFFFF;
+		BMS_Cell_Volt[73] = 0xFFFF;
+		BMS_Cell_Volt[74] = 0xFFFF;
+		BMS_Cell_Volt[75] = 0xFFFF;
+		break;
+	case 0x1814FBF4:
+		BMS_Cell_Volt[76] = 0xFFFF;
+		BMS_Cell_Volt[77] = 0xFFFF;
+		BMS_Cell_Volt[78] = 0xFFFF;
+		BMS_Cell_Volt[79] = 0xFFFF;
+		break;
+	case 0x1815FBF4:
+		BMS_Cell_Volt[80] = 0xFFFF;
+		BMS_Cell_Volt[81] = 0xFFFF;
+		BMS_Cell_Volt[82] = 0xFFFF;
+		BMS_Cell_Volt[83] = 0xFFFF;
+		break;
+	case 0x1816FBF4:
+		BMS_Cell_Volt[84] = 0xFFFF;
+		BMS_Cell_Volt[85] = 0xFFFF;
+		BMS_Cell_Volt[86] = 0xFFFF;
+		BMS_Cell_Volt[87] = 0xFFFF;
+		break;
+	case 0x1817FBF4:
+		BMS_Cell_Volt[88] = 0xFFFF;
+		BMS_Cell_Volt[89] = 0xFFFF;
+		BMS_Cell_Volt[90] = 0xFFFF;
+		BMS_Cell_Volt[91] = 0xFFFF;
+		break;
+	case 0x1818FBF4:
+		BMS_Cell_Volt[92] = 0xFFFF;
+		BMS_Cell_Volt[93] = 0xFFFF;
+		BMS_Cell_Volt[94] = 0xFFFF;
+		BMS_Cell_Volt[95] = 0xFFFF;
+		break;
+	case 0x1819FBF4:
+		BMS_Cell_Volt[96] = 0xFFFF;
+		BMS_Cell_Volt[97] = 0xFFFF;
+		BMS_Cell_Volt[98] = 0xFFFF;
+		BMS_Cell_Volt[99] = 0xFFFF;
+		break;
+	case 0x181AFBF4:
+		BMS_Cell_Volt[100] = 0xFFFF;
+		BMS_Cell_Volt[101] = 0xFFFF;
+		BMS_Cell_Volt[102] = 0xFFFF;
+		BMS_Cell_Volt[103] = 0xFFFF;
+		break;
+	case 0x181BFBF4:
+		BMS_Cell_Volt[104] = 0xFFFF;
+		BMS_Cell_Volt[105] = 0xFFFF;
+		BMS_Cell_Volt[106] = 0xFFFF;
+		BMS_Cell_Volt[107] = 0xFFFF;
+		break;
+	case 0x181CFBF4:
+		BMS_Cell_Volt[108] = 0xFFFF;
+		BMS_Cell_Volt[109] = 0xFFFF;
+		BMS_Cell_Volt[110] = 0xFFFF;
+		BMS_Cell_Volt[111] = 0xFFFF;
+		break;
+	case 0x181DFBF4:
+		BMS_Cell_Volt[112] = 0xFFFF;
+		BMS_Cell_Volt[113] = 0xFFFF;
+		BMS_Cell_Volt[114] = 0xFFFF;
+		BMS_Cell_Volt[115] = 0xFFFF;
+		break;
+	case 0x181EFBF4:
+		BMS_Cell_Volt[116] = 0xFFFF;
+		BMS_Cell_Volt[117] = 0xFFFF;
+		BMS_Cell_Volt[118] = 0xFFFF;
+		BMS_Cell_Volt[119] = 0xFFFF;
+		break;
+	case 0x181FFBF4:
+		BMS_Cell_Volt[120] = 0xFFFF;
+		BMS_Cell_Volt[121] = 0xFFFF;
+		BMS_Cell_Volt[122] = 0xFFFF;
+		BMS_Cell_Volt[123] = 0xFFFF;
+		break;
+	case 0x1820FBF4:
+		BMS_Cell_Volt[124] = 0xFFFF;
+		BMS_Cell_Volt[125] = 0xFFFF;
+		BMS_Cell_Volt[126] = 0xFFFF;
+		BMS_Cell_Volt[127] = 0xFFFF;
+		break;
+	case 0x1821FBF4:
+		BMS_Cell_Volt[128] = 0xFFFF;
+		BMS_Cell_Volt[129] = 0xFFFF;
+		BMS_Cell_Volt[130] = 0xFFFF;
+		BMS_Cell_Volt[131] = 0xFFFF;
+		break;
+	case 0x1822FBF4:
+		BMS_Cell_Volt[132] = 0xFFFF;
+		BMS_Cell_Volt[133] = 0xFFFF;
+		BMS_Cell_Volt[134] = 0xFFFF;
+		BMS_Cell_Volt[135] = 0xFFFF;
+		break;
+	case 0x1823FBF4:
+		BMS_Cell_Volt[136] = 0xFFFF;
+		BMS_Cell_Volt[137] = 0xFFFF;
+		BMS_Cell_Volt[138] = 0xFFFF;
+		BMS_Cell_Volt[139] = 0xFFFF;
+		break;
+	case 0x1824FBF4:
+		BMS_Cell_Volt[140] = 0xFFFF;
+		BMS_Cell_Volt[141] = 0xFFFF;
+		BMS_Cell_Volt[142] = 0xFFFF;
+		BMS_Cell_Volt[143] = 0xFFFF;
+		break;
+	case 0x1825FBF4:
+		BMS_Cell_Volt[144] = 0xFFFF;
+		BMS_Cell_Volt[145] = 0xFFFF;
+		BMS_Cell_Volt[146] = 0xFFFF;
+		BMS_Cell_Volt[147] = 0xFFFF;
+		break;
+	case 0x1826FBF4:
+		BMS_Cell_Volt[148] = 0xFFFF;
+		BMS_Cell_Volt[149] = 0xFFFF;
+		BMS_Cell_Volt[150] = 0xFFFF;
+		BMS_Cell_Volt[151] = 0xFFFF;
+		break;
+	case 0x1827FBF4:
+		BMS_Cell_Volt[152] = 0xFFFF;
+		BMS_Cell_Volt[153] = 0xFFFF;
+		BMS_Cell_Volt[154] = 0xFFFF;
+		BMS_Cell_Volt[155] = 0xFFFF;
+		break;
+	case 0x1828FBF4:
+		BMS_Cell_Volt[156] = 0xFFFF;
+		BMS_Cell_Volt[157] = 0xFFFF;
+		BMS_Cell_Volt[158] = 0xFFFF;
+		BMS_Cell_Volt[159] = 0xFFFF;
+		break;
+	case 0x1829FBF4:
+		BMS_Cell_Volt[160] = 0xFFFF;
+		BMS_Cell_Volt[161] = 0xFFFF;
+		BMS_Cell_Volt[162] = 0xFFFF;
+		BMS_Cell_Volt[163] = 0xFFFF;
+		break;
+	case 0x182AFBF4:
+		BMS_Cell_Volt[164] = 0xFFFF;
+		BMS_Cell_Volt[165] = 0xFFFF;
+		BMS_Cell_Volt[166] = 0xFFFF;
+		BMS_Cell_Volt[167] = 0xFFFF;
+		break;
+	case 0x182BFBF4:
+		BMS_Cell_Volt[168] = 0xFFFF;
+		BMS_Cell_Volt[169] = 0xFFFF;
+		BMS_Cell_Volt[170] = 0xFFFF;
+		BMS_Cell_Volt[171] = 0xFFFF;
+		break;
+	case 0x182CFBF4:
+		BMS_Cell_Volt[172] = 0xFFFF;
+		BMS_Cell_Volt[173] = 0xFFFF;
+		BMS_Cell_Volt[174] = 0xFFFF;
+		BMS_Cell_Volt[175] = 0xFFFF;
+		break;
+	case 0x182DFBF4:
+		BMS_Cell_Volt[176] = 0xFFFF;
+		BMS_Cell_Volt[177] = 0xFFFF;
+		BMS_Cell_Volt[178] = 0xFFFF;
+		BMS_Cell_Volt[179] = 0xFFFF;
+		break;
+	case 0x182EFBF4:
+		BMS_Cell_Volt[180] = 0xFFFF;
+		BMS_Cell_Volt[181] = 0xFFFF;
+		BMS_Cell_Volt[182] = 0xFFFF;
+		BMS_Cell_Volt[183] = 0xFFFF;
+		break;
+	case 0x182FFBF4:
+		BMS_Cell_Volt[184] = 0xFFFF;
+		BMS_Cell_Volt[185] = 0xFFFF;
+		BMS_Cell_Volt[186] = 0xFFFF;
+		BMS_Cell_Volt[187] = 0xFFFF;
+		break;
+	case 0x1830FBF4:
+		BMS_Cell_Volt[188] = 0xFFFF;
+		BMS_Cell_Volt[189] = 0xFFFF;
+		BMS_Cell_Volt[190] = 0xFFFF;
+		BMS_Cell_Volt[191] = 0xFFFF;
+		break;
+	case 0x1831FBF4:
+		BMS_Cell_Volt[192] = 0xFFFF;
+		BMS_Cell_Volt[193] = 0xFFFF;
+		BMS_Cell_Volt[194] = 0xFFFF;
+		BMS_Cell_Volt[195] = 0xFFFF;
+		break;
+	case 0x1832FBF4:
+		BMS_Cell_Volt[196] = 0xFFFF;
+		BMS_Cell_Volt[197] = 0xFFFF;
+		BMS_Cell_Volt[198] = 0xFFFF;
+		BMS_Cell_Volt[199] = 0xFFFF;
+		break;
+	case 0x1833FBF4:
+		BMS_Cell_Volt[200] = 0xFFFF;
+		BMS_Cell_Volt[201] = 0xFFFF;
+		BMS_Cell_Volt[202] = 0xFFFF;
+		BMS_Cell_Volt[203] = 0xFFFF;
+		break;
+	case 0x1834FBF4:
+		BMS_Cell_Volt[204] = 0xFFFF;
+		BMS_Cell_Volt[205] = 0xFFFF;
+		BMS_Cell_Volt[206] = 0xFFFF;
+		BMS_Cell_Volt[207] = 0xFFFF;
+		break;
+	case 0x1835FBF4:
+		BMS_Cell_Volt[208] = 0xFFFF;
+		BMS_Cell_Volt[209] = 0xFFFF;
+		BMS_Cell_Volt[210] = 0xFFFF;
+		BMS_Cell_Volt[211] = 0xFFFF;
+		break;
+	case 0x1836FBF4:
+		BMS_Cell_Volt[212] = 0xFFFF;
+		BMS_Cell_Volt[213] = 0xFFFF;
+		BMS_Cell_Volt[214] = 0xFFFF;
+		BMS_Cell_Volt[215] = 0xFFFF;
+		break;
+	case 0x1837FBF4:
+		BMS_Cell_Volt[216] = 0xFFFF;
+		BMS_Cell_Volt[217] = 0xFFFF;
+		BMS_Cell_Volt[218] = 0xFFFF;
+		BMS_Cell_Volt[219] = 0xFFFF;
+		break;
+	case 0x1838FBF4:
+		BMS_Cell_Volt[220] = 0xFFFF;
+		BMS_Cell_Volt[221] = 0xFFFF;
+		BMS_Cell_Volt[222] = 0xFFFF;
+		BMS_Cell_Volt[223] = 0xFFFF;
+		break;
+	case 0x1839FBF4:
+		BMS_Cell_Volt[224] = 0xFFFF;
+		BMS_Cell_Volt[225] = 0xFFFF;
+		BMS_Cell_Volt[226] = 0xFFFF;
+		BMS_Cell_Volt[227] = 0xFFFF;
+		break;
+	case 0x183AFBF4:
+		BMS_Cell_Volt[228] = 0xFFFF;
+		BMS_Cell_Volt[229] = 0xFFFF;
+		BMS_Cell_Volt[230] = 0xFFFF;
+		BMS_Cell_Volt[231] = 0xFFFF;
+		break;
+	case 0x183BFBF4:
+		BMS_Cell_Volt[232] = 0xFFFF;
+		BMS_Cell_Volt[233] = 0xFFFF;
+		BMS_Cell_Volt[234] = 0xFFFF;
+		BMS_Cell_Volt[235] = 0xFFFF;
+		break;
+	case 0x183CFBF4:
+		BMS_Cell_Volt[236] = 0xFFFF;
+		BMS_Cell_Volt[237] = 0xFFFF;
+		BMS_Cell_Volt[238] = 0xFFFF;
+		BMS_Cell_Volt[239] = 0xFFFF;
+		break;
+	case 0x183DFBF4:
+		BMS_Cell_Volt[240] = 0xFFFF;
+		BMS_Cell_Volt[241] = 0xFFFF;
+		BMS_Cell_Volt[242] = 0xFFFF;
+		BMS_Cell_Volt[243] = 0xFFFF;
+		break;
+	case 0x183EFBF4:
+		BMS_Cell_Volt[244] = 0xFFFF;
+		BMS_Cell_Volt[245] = 0xFFFF;
+		BMS_Cell_Volt[246] = 0xFFFF;
+		BMS_Cell_Volt[247] = 0xFFFF;
+		break;
+	case 0x183FFBF4:
+		BMS_Cell_Volt[248] = 0xFFFF;
+		BMS_Cell_Volt[249] = 0xFFFF;
+		BMS_Cell_Volt[250] = 0xFFFF;
+		BMS_Cell_Volt[251] = 0xFFFF;
+		break;
+	case 0x1840FBF4:
+		BMS_Cell_Volt[252] = 0xFFFF;
+		BMS_Cell_Volt[253] = 0xFFFF;
+		BMS_Cell_Volt[254] = 0xFFFF;
+		BMS_Cell_Volt[255] = 0xFFFF;
+		break;
+	case 0x1841FBF4:
+		BMS_Cell_Volt[256] = 0xFFFF;
+		BMS_Cell_Volt[257] = 0xFFFF;
+		BMS_Cell_Volt[258] = 0xFFFF;
+		BMS_Cell_Volt[259] = 0xFFFF;
+		break;
+	case 0x1842FBF4:
+		BMS_Cell_Volt[260] = 0xFFFF;
+		BMS_Cell_Volt[261] = 0xFFFF;
+		BMS_Cell_Volt[262] = 0xFFFF;
+		BMS_Cell_Volt[263] = 0xFFFF;
+		break;
+	case 0x1843FBF4:
+		BMS_Cell_Volt[264] = 0xFFFF;
+		BMS_Cell_Volt[265] = 0xFFFF;
+		BMS_Cell_Volt[266] = 0xFFFF;
+		BMS_Cell_Volt[267] = 0xFFFF;
+		break;
+	case 0x1844FBF4:
+		BMS_Cell_Volt[268] = 0xFFFF;
+		BMS_Cell_Volt[269] = 0xFFFF;
+		BMS_Cell_Volt[270] = 0xFFFF;
+		BMS_Cell_Volt[271] = 0xFFFF;
+		break;
+	case 0x1845FBF4:
+		BMS_Cell_Volt[272] = 0xFFFF;
+		BMS_Cell_Volt[273] = 0xFFFF;
+		BMS_Cell_Volt[274] = 0xFFFF;
+		BMS_Cell_Volt[275] = 0xFFFF;
+		break;
+	case 0x1846FBF4:
+		BMS_Cell_Volt[276] = 0xFFFF;
+		BMS_Cell_Volt[277] = 0xFFFF;
+		BMS_Cell_Volt[278] = 0xFFFF;
+		BMS_Cell_Volt[279] = 0xFFFF;
+		break;
+	case 0x1847FBF4:
+		BMS_Cell_Volt[280] = 0xFFFF;
+		BMS_Cell_Volt[281] = 0xFFFF;
+		BMS_Cell_Volt[282] = 0xFFFF;
+		BMS_Cell_Volt[283] = 0xFFFF;
+		break;
+	case 0x1848FBF4:
+		BMS_Cell_Volt[284] = 0xFFFF;
+		BMS_Cell_Volt[285] = 0xFFFF;
+		BMS_Cell_Volt[286] = 0xFFFF;
+		BMS_Cell_Volt[287] = 0xFFFF;
+		break;
+	case 0x1849FBF4:
+		BMS_Cell_Volt[288] = 0xFFFF;
+		BMS_Cell_Volt[289] = 0xFFFF;
+		BMS_Cell_Volt[290] = 0xFFFF;
+		BMS_Cell_Volt[291] = 0xFFFF;
+		break;
+	case 0x184AFBF4:
+		BMS_Cell_Volt[292] = 0xFFFF;
+		BMS_Cell_Volt[293] = 0xFFFF;
+		BMS_Cell_Volt[294] = 0xFFFF;
+		BMS_Cell_Volt[295] = 0xFFFF;
+		break;
+	case 0x184BFBF4:
+		BMS_Cell_Volt[296] = 0xFFFF;
+		BMS_Cell_Volt[297] = 0xFFFF;
+		BMS_Cell_Volt[298] = 0xFFFF;
+		BMS_Cell_Volt[299] = 0xFFFF;
+		break;
+	case 0x184CFBF4:
+		BMS_Cell_Volt[300] = 0xFFFF;
+		BMS_Cell_Volt[301] = 0xFFFF;
+		BMS_Cell_Volt[302] = 0xFFFF;
+		BMS_Cell_Volt[303] = 0xFFFF;
+		break;
+	case 0x184DFBF4:
+		BMS_Cell_Volt[304] = 0xFFFF;
+		BMS_Cell_Volt[305] = 0xFFFF;
+		BMS_Cell_Volt[306] = 0xFFFF;
+		BMS_Cell_Volt[307] = 0xFFFF;
+		break;
+	case 0x184EFBF4:
+		BMS_Cell_Volt[308] = 0xFFFF;
+		BMS_Cell_Volt[309] = 0xFFFF;
+		BMS_Cell_Volt[310] = 0xFFFF;
+		BMS_Cell_Volt[311] = 0xFFFF;
+		break;
+	case 0x184FFBF4:
+		BMS_Cell_Volt[312] = 0xFFFF;
+		BMS_Cell_Volt[313] = 0xFFFF;
+		BMS_Cell_Volt[314] = 0xFFFF;
+		BMS_Cell_Volt[315] = 0xFFFF;
+		break;
+	case 0x1850FBF4:
+		BMS_Cell_Volt[316] = 0xFFFF;
+		BMS_Cell_Volt[317] = 0xFFFF;
+		BMS_Cell_Volt[318] = 0xFFFF;
+		BMS_Cell_Volt[319] = 0xFFFF;
+		break;
+	case 0x1851FBF4:
+		BMS_Cell_Volt[320] = 0xFFFF;
+		BMS_Cell_Volt[321] = 0xFFFF;
+		BMS_Cell_Volt[322] = 0xFFFF;
+		BMS_Cell_Volt[323] = 0xFFFF;
+		break;
+	case 0x1852FBF4:
+		BMS_Cell_Volt[324] = 0xFFFF;
+		BMS_Cell_Volt[325] = 0xFFFF;
+		BMS_Cell_Volt[326] = 0xFFFF;
+		BMS_Cell_Volt[327] = 0xFFFF;
+		break;
+	case 0x1853FBF4:
+		BMS_Cell_Volt[328] = 0xFFFF;
+		BMS_Cell_Volt[329] = 0xFFFF;
+		BMS_Cell_Volt[330] = 0xFFFF;
+		BMS_Cell_Volt[331] = 0xFFFF;
+		break;
+	case 0x1854FBF4:
+		BMS_Cell_Volt[332] = 0xFFFF;
+		BMS_Cell_Volt[333] = 0xFFFF;
+		BMS_Cell_Volt[334] = 0xFFFF;
+		BMS_Cell_Volt[335] = 0xFFFF;
+		break;
+	case 0x1855FBF4:
+		BMS_Cell_Volt[336] = 0xFFFF;
+		BMS_Cell_Volt[337] = 0xFFFF;
+		BMS_Cell_Volt[338] = 0xFFFF;
+		BMS_Cell_Volt[339] = 0xFFFF;
+		break;
+	case 0x1856FBF4:
+		BMS_Cell_Volt[340] = 0xFFFF;
+		BMS_Cell_Volt[341] = 0xFFFF;
+		BMS_Cell_Volt[342] = 0xFFFF;
+		BMS_Cell_Volt[343] = 0xFFFF;
+		break;
+	case 0x1857FBF4:
+		BMS_Cell_Volt[344] = 0xFFFF;
+		BMS_Cell_Volt[345] = 0xFFFF;
+		BMS_Cell_Volt[346] = 0xFFFF;
+		BMS_Cell_Volt[347] = 0xFFFF;
+		break;
+	case 0x1858FBF4:
+		BMS_Cell_Volt[348] = 0xFFFF;
+		BMS_Cell_Volt[349] = 0xFFFF;
+		BMS_Cell_Volt[350] = 0xFFFF;
+		BMS_Cell_Volt[351] = 0xFFFF;
+		break;
+	case 0x1859FBF4:
+		BMS_Cell_Volt[352] = 0xFFFF;
+		BMS_Cell_Volt[353] = 0xFFFF;
+		BMS_Cell_Volt[354] = 0xFFFF;
+		BMS_Cell_Volt[355] = 0xFFFF;
+		break;
+	case 0x185AFBF4:
+		BMS_Cell_Volt[356] = 0xFFFF;
+		BMS_Cell_Volt[357] = 0xFFFF;
+		BMS_Cell_Volt[358] = 0xFFFF;
+		BMS_Cell_Volt[359] = 0xFFFF;
+		break;
+	case 0x185BFBF4:
+		BMS_Cell_Volt[360] = 0xFFFF;
+		BMS_Cell_Volt[361] = 0xFFFF;
+		BMS_Cell_Volt[362] = 0xFFFF;
+		BMS_Cell_Volt[363] = 0xFFFF;
+		break;
+	case 0x185CFBF4:
+		BMS_Cell_Volt[364] = 0xFFFF;
+		BMS_Cell_Volt[365] = 0xFFFF;
+		BMS_Cell_Volt[366] = 0xFFFF;
+		BMS_Cell_Volt[367] = 0xFFFF;
+		break;
+	case 0x185DFBF4:
+		BMS_Cell_Volt[368] = 0xFFFF;
+		BMS_Cell_Volt[369] = 0xFFFF;
+		BMS_Cell_Volt[370] = 0xFFFF;
+		BMS_Cell_Volt[371] = 0xFFFF;
+		break;
+	case 0x185EFBF4:
+		BMS_Cell_Volt[372] = 0xFFFF;
+		BMS_Cell_Volt[373] = 0xFFFF;
+		BMS_Cell_Volt[374] = 0xFFFF;
+		BMS_Cell_Volt[375] = 0xFFFF;
+		break;
+	case 0x185FFBF4:
+		BMS_Cell_Volt[376] = 0xFFFF;
+		BMS_Cell_Volt[377] = 0xFFFF;
+		BMS_Cell_Volt[378] = 0xFFFF;
+		BMS_Cell_Volt[379] = 0xFFFF;
+		break;
+	case 0x1860FBF4:
+		BMS_Cell_Volt[380] = 0xFFFF;
+		BMS_Cell_Volt[381] = 0xFFFF;
+		BMS_Cell_Volt[382] = 0xFFFF;
+		BMS_Cell_Volt[383] = 0xFFFF;
+		break;
+	case 0x1881EFF4:
+		BMS11_Fult1_DelTemp = 0xFF;
+		BMS11_Fult1_OverTemp = 0xFF;
+		BMS11_Fult1_PackOverHVolt = 0xFF;
+		BMS11_Fult1_PackLowHVolt = 0xFF;
+		BMS11_Fult1_LowSOC = 0xFF;
+		BMS11_Fult1_OverUcell = 0xFF;
+		BMS11_Fult1_LowUcell = 0xFF;
+		BMS11_Fult1_LowInsRes = 0xFF;
+		BMS11_Fult1_UcellUniformity = 0xFF;
+		BMS11_Fult1_OverChg = 0xFF;
+		BMS11_Fult1_OverSOC = 0xFF;
+		BMS11_Fult1_SOCChangeFast = 0xFF;
+		BMS11_Fult1_BatSysNotMatch = 0xFF;
+		BMS11_Fult1_HVILFault = 0xFF;
+		BMS11_PackOutsideVolt = 0xFFFF;
+		break;
+	case 0x1882EFF4:
+		BMS12_Fult2_FaultNum = 0xFF;
+		BMS12_Fult2_CellOverDischrg = 0xFF;
+		BMS12_Fult2_CellLowTemp = 0xFF;
+		BMS12_Fult2_PackFireWarning = 0xFF;
+		BMS12_Fult2_OverDischrgCurr = 0xFF;
+		BMS12_Fult2_OverChrgCurrInTheDrive = 0xFF;
+		BMS12_Fult2_CurrSensorErr = 0xFF;
+		BMS12_Fult2_PowerSupplyErr = 0xFF;
+		BMS12_Fult2_TMSErr = 0xFF;
+		BMS12_Fult2_HeatingFilmErr = 0xFF;
+		BMS12_Fult2_PackSelfProtect = 0xFF;
+		BMS12_Fult2_MainLoopPrechrgErr = 0xFF;
+		BMS12_Fult2_AuxLoopPrechrgErr = 0xFF;
+		BMS12_Fult2_ChrgInsLowErr = 0xFF;
+		BMS12_Fult2_ACANLost = 0xFF;
+		BMS12_Fult2_InnerCommunicationErr = 0xFF;
+		BMS12_Fult2_DCDCErr = 0xFF;
+		BMS12_Fult2_BranchBreakErr = 0xFF;
+		BMS12_Fult2_HeatRelayOpenErr = 0xFF;
+		BMS12_Fult2_HeatRelayWeldErr = 0xFF;
+		BMS12_Fult2_MainPosRelayOpenErr = 0xFF;
+		BMS12_Fult2_MainPosRelayWeldErr = 0xFF;
+		BMS12_Fult2_MainNegRelayOpenErr = 0xFF;
+		BMS12_Fult2_MainNegRelayWeldErr = 0xFF;
+		BMS12_Fult2_DCChrgPos1RelayOpenErr = 0xFF;
+		BMS12_Fult2_DCChrgPos1RelayWeldErr = 0xFF;
+		BMS12_Fult2_DCChrgNeg1RelayOpenErr = 0xFF;
+		BMS12_Fult2_DCChrgNeg1RelayWeldErr = 0xFF;
+		BMS12_Fult2_DCChrgPos2RelayOpenErr = 0xFF;
+		BMS12_Fult2_DCChrgPos2RelayWeldErr = 0xFF;
+		BMS12_Fult2_DCChrgNeg2RelayOpenErr = 0xFF;
+		BMS12_Fult2_DCChrgNeg2RelayWeldErr = 0xFF;
+		BMS12_Fult2_ChrgConnectErr = 0xFF;
+		BMS12_ult2_OverDischrgCurrWhenInChrg = 0xFF;
+		BMS12_Fult2_OverChrgCurrInTheChrg = 0xFF;
+		BMS12_Fult2_ChrgNTCErr = 0xFF;
+		BMS12_Fult2_ChrgNTCTempOver = 0xFF;
+		BMS12_Fult2_ELockErr = 0xFF;
+		BMS12_Fult2_FireDetectorEr = 0xFF;
+		BMS12_Fult2_ContiDischrgCurrOverLoad = 0xFF;
+		BMS12_Fult2_SOCDifferErr = 0xFF;
+		BMS12_Fult2_ContiChrgCurrOverLoad = 0xFF;
+		break;
+	case 0x1883EFF4:
+		BMS1_MainPosRelaySt = 0xFF;
+		BMS1_MainNegRelaySt = 0xFF;
+		BMS1_PreChgRelaySt = 0xFF;
+		BMS1_DCChrgPos1RelaySt = 0xFF;
+		BMS1_DCChrgNeg1RelaySt = 0xFF;
+		BMS1_DCChrgPos2RelaySt = 0xFF;
+		BMS1_DCChrgNeg2RelaySt = 0xFF;
+		BMS1_HeatPosRelaySt = 0xFF;
+		BMS1_HeatNegRelaySt = 0xFF;
+		BMS1_SysSts = 0xFF;
+		BMS1_Life = 0xFF;
+		BMS1_BalanceStatus = 0xFF;
+		BMS1_DCChrgConnectSt = 0xFF;
+		BMS1_ChrgMode = 0xFF;
+		BMS1_ChrgStatus = 0xFF;
+		BMS1_HeatingStatus = 0xFF;
+		BMS1_CoolingStatus = 0xFF;
+		BMS1_RechrgCycels = 0xFFFFFFFF;
+		break;
+	case 0x1884EFF4:
+		BMS2_SOC = 0xFF;
+		BMS2_SOH = 0xFF;
+		BMS2_PackCurrent = 0xFFFF;
+		BMS2_PackInsideVolt = 0xFFFF;
+		BMS2_FaultCode = 0xFF;
+		BMS2_FaultLevel = 0xFF;
+		BMS2_RqHVPoerOff = 0xFF;
+		BMS2_Life = 0xFF;
+		break;
+	case 0x1885EFF4:
+		BMS4_PosIsolation = 0xFFFF;
+		BMS4_NegIsolation = 0xFFFF;
+		BMS4_SysInsRes = 0xFFFF;
+		BMS4_InsDetectorSt = 0xFF;
+		break;
+	case 0x1886EFF4:
+		BMS8_Max_Temp = 0xFF;
+		BMS8_Min_Temp = 0xFF;
+		BMS8_Avg_Temp = 0xFF;
+		BMS8_MaxTempSysNr = 0xFF;
+		BMS8_MaxTempNr = 0xFF;
+		BMS8_MinTempSysNr = 0xFF;
+		BMS8_MinTempNr = 0xFF;
+		break;
+	case 0x1887EFF4:
+		BMS6_Max_Ucell = 0xFFFF;
+		BMS6_Min_Ucell = 0xFFFF;
+		BMS6_Avg_Ucell = 0xFFFF;
+		BMS6_SOE = 0xFFFF;
+		break;
+	case 0x1888EFF4:
+		BMS7_MaxUcellSysNr = 0xFF;
+		BMS7_MaxUcellNr = 0xFFFF;
+		BMS7_MinUcellSysNr = 0xFF;
+		BMS7_MinUcellNr = 0xFFFF;
+		break;
+	case 0x1889EFF4:
+		BMS23_Gun1DCPosTemp = 0xFF;
+		BMS23_Gun1DCNegTemp = 0xFF;
+		BMS23_Gun2DCPosTemp = 0xFF;
+		BMS23_Gun2DCNegTemp = 0xFF;
+		BMS23_RemainChgTi = 0xFFFF;
+		break;
+	case 0x18A0FBF4:
+		BMS_Cell_TempN[0] = 0xFF;
+		BMS_Cell_TempN[1] = 0xFF;
+		BMS_Cell_TempN[2] = 0xFF;
+		BMS_Cell_TempN[3] = 0xFF;
+		BMS_Cell_TempN[4] = 0xFF;
+		BMS_Cell_TempN[5] = 0xFF;
+		BMS_Cell_TempN[6] = 0xFF;
+		BMS_Cell_TempN[7] = 0xFF;
+		break;
+	case 0x18A1FBF4:
+		BMS_Cell_TempN[8] = 0xFF;
+		BMS_Cell_TempN[9] = 0xFF;
+		BMS_Cell_TempN[10] = 0xFF;
+		BMS_Cell_TempN[11] = 0xFF;
+		BMS_Cell_TempN[12] = 0xFF;
+		BMS_Cell_TempN[13] = 0xFF;
+		BMS_Cell_TempN[14] = 0xFF;
+		BMS_Cell_TempN[15] = 0xFF;
+		break;
+	case 0x18A2FBF4:
+		BMS_Cell_TempN[16] = 0xFF;
+		BMS_Cell_TempN[17] = 0xFF;
+		BMS_Cell_TempN[18] = 0xFF;
+		BMS_Cell_TempN[19] = 0xFF;
+		BMS_Cell_TempN[20] = 0xFF;
+		BMS_Cell_TempN[21] = 0xFF;
+		BMS_Cell_TempN[22] = 0xFF;
+		BMS_Cell_TempN[23] = 0xFF;
+		BMS_Cell_TempN[24] = 0xFF;
+		BMS_Cell_TempN[25] = 0xFF;
+		BMS_Cell_TempN[26] = 0xFF;
+		BMS_Cell_TempN[27] = 0xFF;
+		BMS_Cell_TempN[28] = 0xFF;
+		BMS_Cell_TempN[29] = 0xFF;
+		BMS_Cell_TempN[30] = 0xFF;
+		BMS_Cell_TempN[31] = 0xFF;
+		break;
+	case 0x18A3FBF4:
+		BMS_Cell_TempN[32] = 0xFF;
+		BMS_Cell_TempN[33] = 0xFF;
+		BMS_Cell_TempN[34] = 0xFF;
+		BMS_Cell_TempN[35] = 0xFF;
+		BMS_Cell_TempN[36] = 0xFF;
+		BMS_Cell_TempN[37] = 0xFF;
+		BMS_Cell_TempN[38] = 0xFF;
+		BMS_Cell_TempN[39] = 0xFF;
+		break;
+	case 0x18A4FBF4:
+		BMS_Cell_TempN[40] = 0xFF;
+		BMS_Cell_TempN[41] = 0xFF;
+		BMS_Cell_TempN[42] = 0xFF;
+		BMS_Cell_TempN[43] = 0xFF;
+		BMS_Cell_TempN[44] = 0xFF;
+		BMS_Cell_TempN[45] = 0xFF;
+		BMS_Cell_TempN[46] = 0xFF;
+		BMS_Cell_TempN[47] = 0xFF;
+		break;
+	case 0x18A5FBF4:
+		BMS_Cell_TempN[48] = 0xFF;
+		BMS_Cell_TempN[49] = 0xFF;
+		BMS_Cell_TempN[50] = 0xFF;
+		BMS_Cell_TempN[51] = 0xFF;
+		BMS_Cell_TempN[52] = 0xFF;
+		BMS_Cell_TempN[53] = 0xFF;
+		BMS_Cell_TempN[54] = 0xFF;
+		BMS_Cell_TempN[55] = 0xFF;
+		break;
+	case 0x18A6FBF4:
+		BMS_Cell_TempN[56] = 0xFF;
+		BMS_Cell_TempN[57] = 0xFF;
+		BMS_Cell_TempN[58] = 0xFF;
+		BMS_Cell_TempN[59] = 0xFF;
+		BMS_Cell_TempN[60] = 0xFF;
+		BMS_Cell_TempN[61] = 0xFF;
+		BMS_Cell_TempN[62] = 0xFF;
+		BMS_Cell_TempN[63] = 0xFF;
+		break;
+	case 0x18E1EFF4:
+		break;
+	case 0x18E2EFF4:
+		BMS21_RateCap = 0xFFFF;
+		BMS21_RateHVolt = 0xFFFF;
+		BMS21_RatePower = 0xFFFF;
+		BMS21_BattType = 0xFF;
+		BMS21_CoolType = 0xFF;
+		BMS21_Manufacture = 0xFF;
+		BMS21_ProtocolEditionH = 0xFF;
+		BMS21_ProtocolEditionL = 0xFF;
+		break;
+	case 0x18E3EFF4:
+		BMS9_TotCSCNum = 0xFF;
+		BMS9_PackTotCellNum = 0xFFFF;
+		BMS9_PackTotTempNum = 0xFF;
+		BMS9_HVBranchNum = 0xFF;
+		BMS9_SingleHVBranchCellNum = 0xFF;
+		BMS9_BattSysNum = 0xFF;
+		BMS9_BattSysSeqNum = 0xFF;
+		break;
+	case 0x18E4EFF4:
+		BMS22_PackAvaiMaxVolt = 0xFFFF;
+		BMS22_PackAvaiMinVolt = 0xFFFF;
+		BMS22_AvaiMaxSOC = 0xFF;
+		BMS22_AvaiMinSOC = 0xFF;
+		BMS22_AvaiMaxTemp = 0xFF;
+		BMS22_AvaiMinTemp = 0xFF;
+		break;
+	case 0x18FEDAF4:
+		BMS_SoftwareVersion = 0xFFFF;
+		BMS_HardwareVersion = 0xFFFF;
+		break;
+	case 0x18FF23F4:
+		BMS3_MaxDischgPow = 0xFFFF;
+		BMS3_MaxChgPow = 0xFFFF;
+		BMS3_MaxInstantDischgPow = 0xFFFF;
+		BMS3_MaxiInstantChgPow = 0xFFFF;
+		break;
+	case 0x18FF24F4:
+		BMS10_SubSysEncodingLen = 0xFF;
+		BMS10_SubSysIdx = 0xFF;
+		BMS10_SubSysErrNum = 0xFF;
+		break;
+	case 0x18FF25F4:
+		BMS5_DischgCurMaxAllw = 0xFFFF;
+		BMS5_ChrgCurMaxAllw = 0xFFFF;
+		BMS5_InstChrgCurMaxAllw = 0xFFFF;
+		BMS5_InstDischrgCurMaxAllw = 0xFFFF;
+		break;
+	case 0x18FF30F4:
+		BMS26_Bat_InstantConsume = 0xFFFF;
+		BMS26_Bat_TotalConsume = 0xFFFF;
+		BMS26_ChgReqVoltage = 0xFFFF;
+		BMS26_ChgReqCurrent = 0xFFFF;
+		break;
+	case 0x18FF45F4:
+		BMS28_ReqMode = 0xFF;
+		BMS28_HVCmd = 0xFF;
+		BMS28_ChgSts = 0xFF;
+		BMS28_HVRelaySts = 0xFF;
+		BMS28_HVVolt = 0xFFFF;
+		BMS28_SetTemp = 0xFF;
+		BMS28_Life = 0xFF;
+		BMS28_CRC = 0xFF;
+		break;
+	case 0x18FFC13A:
+		TMS_WorkStatus = 0xFF;
+		TMS_HVRelayST = 0xFF;
+		TMS_OutletTemp = 0xFF;
+		TMS_InletTemp = 0xFF;
+		TMS_Version = 0xFF;
+		TMS_ReqPow = 0xFFFF;
+		TMS_ErrCode = 0xFF;
+		TMS_FaultLevel = 0xFF;
+		break;
+	case 0x18FFD4F4:
+		BMS14_TotalChargeAh = 0xFFFFFFFF;
+		BMS14_TotalDischargeAh = 0xFFFFFFFF;
+		break;
+	case 0x18FFD5F4:
+		BMS15_TotalChargeKwh = 0xFFFFFFFF;
+		BMS15_TotalDischargeKwh = 0xFFFFFFFF;
+		break;
+	case 0x18FFD6F4:
+		BMS16_TotalEneryECOChargeAh = 0xFFFFFFFF;
+		BMS16_TotalEneryECOChargeKwh = 0xFFFFFFFF;
+		break;
+	case 0x18FFD7F4:
+		BMS17_TotalStationChargeAh = 0xFFFFFFFF;
+		BMS17_TotalStationChargeKwh = 0xFFFFFFFF;
+		break;
+	case 0x18FFD8F4:
+		BMS18_TotalPoleChargeAh = 0xFFFFFFFF;
+		BMS18_TotalPoleChargeKwh = 0xFFFFFFFF;
+		break;
+	case 0x18FFD9F4:
+		BMS19_SingleChargeAh = 0xFFFFFFFF;
+		BMS19_SingleChargeKwh = 0xFFFFFFFF;
+		break;
+	default:
+		break;
+	}
+}

+ 17 - 0
src/AppTaskCan.h

@@ -0,0 +1,17 @@
+/*
+ * AppTaskCan.h
+ *
+ *  Created on: 2022Äê2ÔÂ13ÈÕ
+ *      Author: QiXiang_CHENJIE
+ */
+
+#ifndef APPTASKCAN_H_
+#define APPTASKCAN_H_
+#include "hal_adapter.h"
+#include "AppGlobalVar.h"
+#include "AppFuncLib.h"
+void BcuDecodeFunction(uint32 ID, uint8 *rawData);
+void BcuRxDiagnose(void);
+void BcuRxMsgSetInvalidValue(uint32 ID);
+void CanTask(void *pvParameters);
+#endif /* APPTASKCAN_H_ */

+ 158 - 0
src/AppTaskGps.c

@@ -0,0 +1,158 @@
+/*
+ * AppTaskGps.c
+ *
+ *  Created on: 2022年2月16日
+ *      Author: QiXiang_CHENJIE
+ */
+#include "AppTaskGps.h"
+void strdel(char *str, char c);
+uint32 location_handle(char *in1);
+void GpsDataDecode(uint8 *msg);
+void GpsTask(void *pvParameters)
+{
+	(void)pvParameters;
+	GpsDataQueueHandle = xQueueCreate(1, sizeof(GPSInfo));//长度为1才可以允许覆写
+	Dio_WriteChannel(DioConf_DioChannel_PTD1_GPIO_OUT_MCU_GPS_POW_EN, STD_ON);//GPS开机
+	uint16 pReadLen = 0;
+	while(1)
+	{
+		vTaskDelay(pdMS_TO_TICKS(100));
+		memset(RX_Buffer[UART_LPUART2],0x00,sizeof(RX_Buffer[UART_LPUART2]));
+		UART_Receive_Data(UART_LPUART2,RX_Buffer[UART_LPUART2],&pReadLen,1000);
+		if(pReadLen>0)
+		{
+			GpsDataDecode(RX_Buffer[UART_LPUART2]);
+		}
+	}
+}
+void GpsDataDecode(uint8 *msg)
+{
+	//char temp[] = "$GNRMC,082626.000,A,2939.91801,N,10637.09500,E,0.543,30.254,261120,,,A,V*17";
+	char *p = NULL;
+	char  *p2 = NULL;
+	const char *delim = "\n";
+	GPSInfo GpsInfoData;
+	uint8 index = 0;
+	char *databuffer[20];
+	uint32 speedtemp;
+	uint32 latitude;
+	uint32 longitude;
+	uint16 direction;
+	memset((uint8 *)&GpsInfoData, 0x00, sizeof(GPSInfo));
+	p = strtok(msg, delim); //将信息进行分割
+	p2 = strtok(NULL, delim);
+	p = strtok(p, ","); //只取第1行的信息RMC
+	//p = strtok(temp,",");//模拟测试
+	if (strcmp(p, "$GNRMC") == 0)
+	{
+		index = 0;
+		while (p)
+		{
+			databuffer[index] = p;
+			p = strtok(NULL, ",");
+			index++;
+		}
+		if (index > 5 && strcmp(databuffer[2], "A") == 0)
+		{
+			GpsInfoData.locateMark = 0x01; //有效,东经,北纬写定
+			strdel(databuffer[3], '.');
+			strdel(databuffer[5], '.');
+			strdel(databuffer[7], '.');
+			speedtemp = atol(databuffer[7]) * 1852 / 1e5; //节换算单位,1节=1.852km每小时
+			GpsInfoData.speed[0] = (speedtemp >> 8) & 0xFF;
+			GpsInfoData.speed[1] = speedtemp & 0xFF;
+			latitude = location_handle(databuffer[3]);
+			GpsInfoData.latitude[0] = latitude >> 24;
+			GpsInfoData.latitude[1] = latitude >> 16;
+			GpsInfoData.latitude[2] = latitude >> 8;
+			GpsInfoData.latitude[3] = latitude;
+			longitude = location_handle(databuffer[5]);
+			GpsInfoData.longitude[0] = longitude >> 24;
+			GpsInfoData.longitude[1] = longitude >> 16;
+			GpsInfoData.longitude[2] = longitude >> 8;
+			GpsInfoData.longitude[3] = longitude;
+			if (speedtemp >= 50) //大于5km/h才输出方位
+			{
+				direction = atol(databuffer[8]);
+				GpsInfoData.direction[0] = direction >> 8;
+				GpsInfoData.direction[1] = direction;
+			}
+			else
+			{
+				GpsInfoData.direction[0] = 0xff;
+				GpsInfoData.direction[1] = 0xff;
+			}
+//			if (speedtemp >= 30 && speedtemp <= 1500 && BattWorkStateDelay == 0x01)
+//			{
+//				AppDataInfo.appDataModify = true;
+//				AppDataInfo.AccMileage = speedtemp / 36 + AppDataInfo.AccMileage;
+//				if (AppDataInfo.AccMileage >= 0xfffffffe)
+//				{
+//					AppDataInfo.AccMileage = 0;
+//				}
+//			}累计里程的累加
+		}
+//		GpsInfoData.AccMileage[0] = AppDataInfo.AccMileage >> 24;
+//		GpsInfoData.AccMileage[1] = AppDataInfo.AccMileage >> 16;
+//		GpsInfoData.AccMileage[2] = AppDataInfo.AccMileage >> 8;
+//		GpsInfoData.AccMileage[3] = AppDataInfo.AccMileage;
+	}
+	p2 = strtok(p2, ","); //只取第2行的信息GGA
+	memset(databuffer, 0x30, 20);
+	if (strcmp(p2, "$GNGGA") == 0)
+	{
+		index = 0;
+		while (p2)
+		{
+			databuffer[index] = p2;
+			p2 = strtok(NULL, ",");
+			index++;
+		}
+		if (index > 9 && (strcmp(databuffer[6], "1") == 0 || strcmp(databuffer[6], "2") == 0))
+		{
+			GpsInfoData.satelliteNum = atol(databuffer[7]); //卫星数目写入
+			strdel(databuffer[9], '.');
+			uint16 alt = 0;
+			alt = atol(databuffer[9]) / 10 + 1000;
+			GpsInfoData.altitude[0] = alt >> 8; //海拔
+			GpsInfoData.altitude[1] = alt;
+			strdel(databuffer[2], '.');
+			strdel(databuffer[4], '.');
+			latitude = location_handle(databuffer[2]);
+			GpsInfoData.latitude[0] = latitude >> 24;
+			GpsInfoData.latitude[1] = latitude >> 16;
+			GpsInfoData.latitude[2] = latitude >> 8;
+			GpsInfoData.latitude[3] = latitude;
+			longitude = location_handle(databuffer[4]);
+			GpsInfoData.longitude[0] = longitude >> 24;
+			GpsInfoData.longitude[1] = longitude >> 16;
+			GpsInfoData.longitude[2] = longitude >> 8;
+			GpsInfoData.longitude[3] = longitude;
+		}
+	}
+	xQueueOverwrite(GpsDataQueueHandle,(uint8 *)&GpsInfoData);
+}
+void strdel(char *str, char c)
+{
+	char *p = str;
+	while (*str)
+	{
+		if (*str != c)
+			*p++ = *str;
+		str++;
+	}
+	*p = '\0';
+}
+uint32 location_handle(char *in1)
+{
+	uint32 location_temp;
+	uint32 location_degree;
+	uint32 location_min;
+	location_temp = atol(in1);
+	location_degree = location_temp / (1e7);
+	location_degree = location_degree * (1e6);
+	location_min = location_temp - location_degree * 10;
+	location_min = location_min / 6;
+	location_temp = location_degree + location_min;
+	return location_temp;
+}

+ 26 - 0
src/AppTaskGps.h

@@ -0,0 +1,26 @@
+/*
+ * AppTaskGps.h
+ *
+ *  Created on: 2022Äê2ÔÂ16ÈÕ
+ *      Author: QiXiang_CHENJIE
+ */
+
+#ifndef APPTASKGPS_H_
+#define APPTASKGPS_H_
+#include "hal_adapter.h"
+#include "AppGlobalVar.h"
+#include "AppFuncLib.h"
+void GpsTask(void *pvParameters);
+typedef struct _GPSInfo
+{
+	uint8 locateMark;
+	uint8 satelliteNum;
+	uint8 direction[2];
+	uint8 speed[2];
+	uint8 altitude[2];
+	uint8 latitude[4];
+	uint8 longitude[4];
+	uint8 AccMileage[4];
+} GPSInfo;
+
+#endif /* APPTASKGPS_H_ */

+ 471 - 57
src/AppTaskUart1.c

@@ -3,7 +3,7 @@
  * @Date         : 2022-02-10 11:43:56
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-02-11 16:28:49
+ * @LastEditTime : 2022-02-14 15:50:00
  * @Description  : file content
  * @FilePath     : \S32K146_4G\src\AppTaskUart1.c
  */
@@ -22,10 +22,10 @@ const ATCmdFunc Atcmdfunc[] = {
 	{AT_CSQ, "AT+CSQ\r\n", at_callbackFunc},
 	{AT_NETOPEN, "AT+NETOPEN\r\n", at_callbackFunc},
 	{AT_CGIP, "AT+CDNSGIP=", at_callbackFunc},
-	{AT_CONNECT, "AT+CIPOPEN=0,\"TCP\",\"120.26.68.165\",14319\r\n", at_callbackFunc},
+	//{AT_CONNECT, "AT+CIPOPEN=0,\"TCP\",\"120.26.68.165\",14319\r\n", at_callbackFunc},
+	{AT_CONNECT, "AT+CIPOPEN=", at_callbackFunc},
 	{AT_CONNECTCHK, "AT+CIPOPEN?\r\n", at_callbackFunc},
 	{AT_SEND, "AT+CIPSEND=", at_callbackFunc},
-	{AT_GETTIME,"AT+CCLK?\r\n",at_callbackFunc},
 	{AT_DISCON, "AT+CIPCLOSE=0\r\n", at_callbackFunc},
 	{AT_NETCLOSE, "AT+NETCLOSE\r\n", at_callbackFunc}};
 
@@ -35,6 +35,8 @@ void InitFunc(void);
 sint8 TcpConnectFunc(sint8 *ConnectId);
 sint8 TcpDataSendFunc(sint8 ConnectId);
 sint8 TcpRegisterChkFunc(void);
+void TcpDataEncode(UTC8TimeType UTC8TimeTcp,uint8 DataIdx, uint8 **PtrSendAddr,uint16 *SendLen);
+void GetUtc8Time(UTC8TimeType *UTC8TimeTcp);
 static void AtcmdTransmit(sint8 CmdIdx, uint8 *SetValuePtr, uint16 SetValueLen, sint8 *retFunc);
 void Uart_4G_Task(void *pvParameters)
 {
@@ -56,15 +58,19 @@ void Uart_4G_Task(void *pvParameters)
 		case PROCESS_TCP_IDLE: //空闲状态
 		{
 			Dio_FlipChannel(DioConf_DioChannel_PTE0_GPIO_OUT_MCU_LED1);
-			vTaskDelay(pdMS_TO_TICKS(1000));
+			vTaskDelay(pdMS_TO_TICKS(10));
 			if (SocketId < 0)
 			{
 				PROC_TCP_STATE_SWITCH(PROCESS_TCP_REGCHK);
 			}
-			else
+			else if(TimerCounter%1000==0)
 			{
 				PROC_TCP_STATE_SWITCH(PROCESS_TCP_SEND);
 			}
+			else if(TimerCounter%100==0)
+			{
+				PROC_TCP_STATE_SWITCH(PROCESS_TCP_RECV);
+			}
 			break;
 		}
 		case PROCESS_TCP_ATSYS:
@@ -116,7 +122,7 @@ void Uart_4G_Task(void *pvParameters)
 		{
 			sint8 SendRet = -1;
 			SendRet = TcpDataSendFunc(SocketId);
-			if(SendRet==0)
+			if (SendRet == 0)
 			{
 				PROC_TCP_STATE_SWITCH(PROCESS_TCP_IDLE);
 			}
@@ -127,8 +133,9 @@ void Uart_4G_Task(void *pvParameters)
 			}
 			break;
 		}
-		case PROCESS_TCP_RECV: //网络数据接收(不应采用定时调用),空闲状态下即可接收
+		case PROCESS_TCP_RECV: //网络数据接收,100ms空闲状态下即可接收
 		{
+			PROC_TCP_STATE_SWITCH(PROCESS_TCP_IDLE);
 			break;
 		}
 		case PROCESS_TCP_HEART: //心跳包发送
@@ -141,7 +148,10 @@ void Uart_4G_Task(void *pvParameters)
 		}
 		case PROCESS_TCP_ERROR: //错误状态
 		{
+			Dio_WriteChannel(DioConf_DioChannel_PTA7_GPIO_OUT_MCU_4G_PWRKEY, STD_OFF);
+			vTaskDelay(pdMS_TO_TICKS(100));
 			PROC_TCP_STATE_SWITCH(PROCESS_TCP_IDLE);
+			Dio_WriteChannel(DioConf_DioChannel_PTA7_GPIO_OUT_MCU_4G_PWRKEY, STD_ON);
 			break;
 		}
 		}
@@ -150,28 +160,43 @@ void Uart_4G_Task(void *pvParameters)
 sint8 TcpDataSendFunc(sint8 ConnectId)
 {
 	sint8 outValue = -1;
-	char *pSendData = "Hello World!";
-	uint8 DataSendLen = 0;
-	DataSendLen = mstrlen(pSendData);
-
-	//数据准备完成,下面开始发送
+	uint8 *pSendData = NULL;
+	uint16 DataSendLen = 0;
 	sint8 ATRet = -1;
-
-	//AtcmdTransmit(AT_GETTIME, NULL, 0, &ATRet);4G模块的时间获取
 	uint8 ReadLen = 0;
+	UTC8TimeType TcpTimeUtc8;
+	uint8 DataSendIdx = 0;
+	static uint32 TcpSendTimeCounter = 0;
+	GetUtc8Time(&TcpTimeUtc8);//时间获取
+	//TcpSendTimeCounter++;
+	TcpSendTimeCounter = 1;
+	memcpy(TcpbattSN,defaultSn,17);
+	if(TcpSendTimeCounter == 1)
+	{
+		DataSendIdx = GpsMsg;//版本信息发送
+	}
+	else if(TcpSendTimeCounter%10==0)
+	{
+		DataSendIdx = TruckBattMsg;//电池信息发送
+	}
+	else if((TcpSendTimeCounter-1)%30==0)
+	{
+		DataSendIdx = TruckVehiMsg;//车辆信息发送
+	}
+	else if((TcpSendTimeCounter-2)%30==0)
+	{
+		DataSendIdx = TruckAcclMsg;//累计信息发送
+	}
+	else
+	{
+		DataSendIdx = 0;//不发送,返回正确
+		return 0;
+	}
+	TcpDataEncode(TcpTimeUtc8,DataSendIdx,&pSendData,&DataSendLen);//数据组包,malloc申请在里面,pSendData指向申请的地址
+	//数据准备完成,下面开始发送
 	char AtCmdSend[10] = {0};
 	uint8 AtCmdSendTotalLen = 0;
-	sprintf(AtCmdSend,"%d,%d\r\n",ConnectId,DataSendLen);//此处需要优化
-//	Myitoa(ConnectId, Strtemp, 10);
-//	memcpy(AtCmdSend, Strtemp, mstrlen(Strtemp));
-//	AtCmdSendTotalLen = AtCmdSendTotalLen + mstrlen(Strtemp);
-//	memcpy(AtCmdSend + AtCmdSendTotalLen, (char *)(","), 1);
-//	AtCmdSendTotalLen = AtCmdSendTotalLen + 1;
-//	memset(Strtemp, 0x00, sizeof(Strtemp));
-//	Myitoa(DataSendLen, Strtemp, 10);
-//	memcpy(AtCmdSend + AtCmdSendTotalLen, Strtemp, mstrlen(Strtemp));
-//	AtCmdSendTotalLen = AtCmdSendTotalLen + mstrlen(Strtemp);
-//	memcpy(AtCmdSend + AtCmdSendTotalLen, CRLF, mstrlen(CRLF));
+	sprintf(AtCmdSend, "%d,%d\r\n", ConnectId, DataSendLen); //此处需要优化
 	AtCmdSendTotalLen = mstrlen(AtCmdSend);
 	AtcmdTransmit(AT_SEND, AtCmdSend, AtCmdSendTotalLen, &ATRet);
 	if (ATRet == 0)
@@ -183,6 +208,11 @@ sint8 TcpDataSendFunc(sint8 ConnectId)
 			outValue = 0;
 		}
 	}
+	if(pSendData!=NULL)
+	{
+		vPortFree(pSendData);
+	}
+	pSendData = NULL;
 	return outValue;
 }
 sint8 TcpConnectFunc(sint8 *ConnectId)
@@ -196,10 +226,24 @@ sint8 TcpConnectFunc(sint8 *ConnectId)
 		{
 		case 0: // AT指令同步
 		{
-			AtcmdTransmit(AT_CMD_TEST, NULL, 0, &ATRet);
-			if (ATRet == 0)
+			char *ATCmdSend = (char *)("ATE0\r\n");
+			uint8 ATCmdSendLen = mstrlen(ATCmdSend);
+			uint8 ReadLen = 0;
+			memset(RX_Buffer[UART_LPUART1], 0x00, sizeof(RX_Buffer[UART_LPUART1]));
+			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, ATCmdSendLen, RX_Buffer[UART_LPUART1], &ReadLen, 1000 * 10);
+			uint8 *retptr = NULL;
+			if (ReadLen > 0)
 			{
-				ConnectStep++;
+				retptr = (uint8 *)strstr((char *)RX_Buffer[UART_LPUART1], (char *)("OK"));
+				if (retptr)
+				{
+					ConnectStep++;
+				}
+				else
+				{
+					ChkState = -ConnectStep;
+					return ChkState;
+				}
 			}
 			else
 			{
@@ -233,6 +277,7 @@ sint8 TcpConnectFunc(sint8 *ConnectId)
 			else
 			{
 				ConnectStep++;
+				*ConnectId = 0;
 			}
 			break;
 		}
@@ -258,7 +303,11 @@ sint8 TcpConnectFunc(sint8 *ConnectId)
 		}
 		case 4: //创建连接
 		{
-			AtcmdTransmit(AT_CONNECT, NULL, 0, &ATRet);
+			char AtCmdSend[20] = {0};
+			uint8 AtCmdSendTotalLen = 0;
+			sprintf(AtCmdSend, "%d,\"TCP\",%s,%d\r\n", *ConnectId, WebSiteIp,WebSitePort); //此处需要优化
+			AtCmdSendTotalLen = mstrlen(AtCmdSend);
+			AtcmdTransmit(AT_CONNECT, AtCmdSend, AtCmdSendTotalLen, &ATRet);
 			if (ATRet == 0)
 			{
 				ConnectStep++;
@@ -313,21 +362,7 @@ sint8 TcpRegisterChkFunc(void)
 			}
 			break;
 		}
-		case 2: // ICCID获取
-		{
-			AtcmdTransmit(AT_GETICCID, NULL, 0, &ATRet);
-			if (ATRet == 0)
-			{
-				RegChkStep++;
-			}
-			else
-			{
-				ChkState = -RegChkStep;
-				return ChkState;
-			}
-			break;
-		}
-		case 3:
+		case 2:
 		{
 			AtcmdTransmit(AT_CGREG, NULL, 0, &ATRet); //驻网检查,返回值1和5是驻网成功
 			if (ATRet == 1 || ATRet == 5)
@@ -424,6 +459,44 @@ void InitFunc(void)
 			}
 			break;
 		}
+		case 3: // 打开时间自动更新
+		{
+			ATCmdSend = (char *)("AT+CTZU=1\r\n");
+			ATCmdSendLen = mstrlen(ATCmdSend);
+			memset(RX_Buffer[UART_LPUART1], 0x00, sizeof(RX_Buffer[UART_LPUART1]));
+			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, ATCmdSendLen, RX_Buffer[UART_LPUART1], &ReadLen, 1000 * 10);
+			uint8 *retptr = NULL;
+			if (ReadLen > 0)
+			{
+				retptr = (uint8 *)strstr((char *)RX_Buffer[UART_LPUART1], (char *)("OK"));
+				if (retptr)
+				{
+					_4G_InitStep++;
+				}
+				else
+				{
+					_4G_InitStep = 0;
+				}
+			}
+			else
+			{
+				_4G_InitStep = 0;
+			}
+			break;
+		}
+		case 4: // ICCID获取
+		{
+			AtcmdTransmit(AT_GETICCID, NULL, 0, &ATRet);
+			if (ATRet == 0)
+			{
+				_4G_InitStep++;
+			}
+			else
+			{
+				_4G_InitStep = 0;
+			}
+			break;
+		}
 		default:
 		{
 			return;
@@ -434,15 +507,14 @@ void InitFunc(void)
 }
 static void AtcmdTransmit(sint8 CmdIdx, uint8 *SetValuePtr, uint16 SetValueLen, sint8 *retFunc)
 {
-	uint8 *ATCmdRead;
 	uint16 ReadLen = 0;
 	uint8 *PtrATCmdSend = NULL;
 	uint8 ATCmdFixedLen = 0;
 	uint16 ATCmdTotalLen = 0;
 	ATCmdFixedLen = mstrlen(Atcmdfunc[CmdIdx].str);
 	ATCmdTotalLen = ATCmdFixedLen + SetValueLen;
-	PtrATCmdSend = malloc(ATCmdTotalLen);
-	memset(PtrATCmdSend, 0x00, ATCmdTotalLen);
+	PtrATCmdSend = malloc(ATCmdTotalLen+1);
+	memset(PtrATCmdSend, 0x00, ATCmdTotalLen+1);
 	memcpy(PtrATCmdSend, Atcmdfunc[CmdIdx].str, ATCmdFixedLen);
 	if (SetValuePtr != NULL)
 	{
@@ -450,10 +522,10 @@ static void AtcmdTransmit(sint8 CmdIdx, uint8 *SetValuePtr, uint16 SetValueLen,
 	}
 	memset(RX_Buffer[UART_LPUART1], 0x00, sizeof(RX_Buffer[UART_LPUART1]));
 	UART_Query_Data(UART_LPUART1, UART_LPUART1, PtrATCmdSend, ATCmdTotalLen, RX_Buffer[UART_LPUART1], &ReadLen, 1000 * 100);
-	ATCmdRead = RX_Buffer[UART_LPUART1];
-	*retFunc = Atcmdfunc[CmdIdx].cb(PtrATCmdSend, ATCmdRead, CmdIdx, ReadLen);
+	*retFunc = Atcmdfunc[CmdIdx].cb(PtrATCmdSend, RX_Buffer[UART_LPUART1], CmdIdx, ReadLen);
 	if (PtrATCmdSend != NULL)
 	{
+		memset(PtrATCmdSend, 0x00, ATCmdTotalLen+1);
 		free(PtrATCmdSend);
 	}
 	PtrATCmdSend = NULL;
@@ -491,7 +563,7 @@ sint8 at_callbackFunc(char *PSendStr, char *pReadStr, uint8 CmdIdx, uint16 pRead
 	{
 		if (retptr)
 		{
-			retptr = (uint8 *)strstr((char *)pReadStr, (char *)("ICCID"));
+			retptr = (uint8 *)strstr((char *)pReadStr, (char *)("ICCID:"));
 			if (retptr)
 			{
 				memcpy(IccidNum, retptr + 7, 20);
@@ -504,7 +576,7 @@ sint8 at_callbackFunc(char *PSendStr, char *pReadStr, uint8 CmdIdx, uint16 pRead
 	{
 		if (retptr)
 		{
-			retptr = (uint8 *)strstr((char *)pReadStr, (char *)("CGREG"));
+			retptr = (uint8 *)strstr((char *)pReadStr, (char *)("CGREG:"));
 			if (retptr)
 			{
 				uint8 RegN = 0;
@@ -564,8 +636,11 @@ sint8 at_callbackFunc(char *PSendStr, char *pReadStr, uint8 CmdIdx, uint16 pRead
 	{
 		if (retptr)
 		{
-			retptr = (uint8 *)strstr((char *)pReadStr, (char *)("CIPOPEN"));
-			SocketId = CharToHex(*(retptr + 9));
+			retptr = (uint8 *)strstr((char *)pReadStr, (char *)("CIPOPEN:"));
+			if(retptr)
+			{
+				SocketId = CharToHex(*(retptr + 9));
+			}
 			OutValue = 0;
 		}
 		break;
@@ -579,15 +654,354 @@ sint8 at_callbackFunc(char *PSendStr, char *pReadStr, uint8 CmdIdx, uint16 pRead
 		}
 		break;
 	}
-	case AT_GETTIME:
+	default:
+		break;
+	}
+	return OutValue;
+}
+void TcpDataEncode(UTC8TimeType UTC8TimeTcp,uint8 DataIdx, uint8 **PtrSendAddr,uint16 *SendLen)
+{
+	uint8 *SendBuffer = NULL;
+	switch (DataIdx)
+	{
+	case 0x82:
 	{
-		if(retptr)
+		GPSInfo GpsRecvData;
+		GPSMsgtoTcpType GpsToTcpInfo;
+		*SendLen = sizeof(GpsToTcpInfo);
+		SendBuffer = pvPortMalloc(*SendLen);
+		uint16 tac = 0;
+		uint32 cellId = 0;
+		uint8 DataLen = (uint16)sizeof(GpsToTcpInfo.gpsInfo);
+		GpsToTcpInfo.startSymbol[0] = TCP_START_SYM1;
+		GpsToTcpInfo.startSymbol[1] = TCP_START_SYM2;
+		GpsToTcpInfo.cmdSymbol = TCP_CMD_SYM;
+		GpsToTcpInfo.ansSymbol = TCP_ANS_SYM;
+		memcpy(GpsToTcpInfo.SN, TcpbattSN, BATT_SN_LEN);
+		GpsToTcpInfo.encryptMethod = TCP_ENCPT_DISABLE; // not encrypt
+		GpsToTcpInfo.dataLength[0] = (DataLen >> 8) & 0xFF;
+		GpsToTcpInfo.dataLength[1] = DataLen & 0xFF;
+		GpsToTcpInfo.gpsInfo.sendTimeUTC[0] = (UTC8TimeTcp.year) & 0xFF; // year
+		GpsToTcpInfo.gpsInfo.sendTimeUTC[1] = UTC8TimeTcp.month & 0xFF;           // month
+		GpsToTcpInfo.gpsInfo.sendTimeUTC[2] = UTC8TimeTcp.day & 0xFF;             // day
+		GpsToTcpInfo.gpsInfo.sendTimeUTC[3] = UTC8TimeTcp.hour & 0xFF;            // hour
+		GpsToTcpInfo.gpsInfo.sendTimeUTC[4] = UTC8TimeTcp.minute & 0xFF;          // mins
+		GpsToTcpInfo.gpsInfo.sendTimeUTC[5] = UTC8TimeTcp.second & 0xFF;          // sec
+		GpsToTcpInfo.gpsInfo.msgMark = DataIdx;
+		GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[0] = (UTC8TimeTcp.year ) & 0xFF; // year
+		GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[1] = UTC8TimeTcp.month & 0xFF;           // month
+		GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[2] = UTC8TimeTcp.day & 0xFF;             // day
+		GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[3] = UTC8TimeTcp.hour & 0xFF;            // hour
+		GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[4] = UTC8TimeTcp.minute & 0xFF;          // mins
+		GpsToTcpInfo.gpsInfo.msgCollectionTimeUTC[5] = UTC8TimeTcp.second & 0xFF;
+		if (xQueueReceive(GpsDataQueueHandle,&GpsRecvData,0)== pdPASS)
+		{
+			memcpy((uint8 *)&GpsToTcpInfo.gpsInfo.GpsInfoData, (uint8 *)&GpsRecvData, sizeof(GPSInfo));
+		}
+		else
+		{
+			memset((uint8 *)&GpsToTcpInfo.gpsInfo.GpsInfoData, 0x00, sizeof(GPSInfo));
+		}
+		GpsToTcpInfo.gpsInfo.Tac[0] = tac >> 8;
+		GpsToTcpInfo.gpsInfo.Tac[1] = tac & 0xFF;
+		GpsToTcpInfo.gpsInfo.CellID[0] = cellId >> 24;
+		GpsToTcpInfo.gpsInfo.CellID[0] = cellId >> 16;
+		GpsToTcpInfo.gpsInfo.CellID[0] = cellId >> 8;
+		GpsToTcpInfo.gpsInfo.CellID[0] = cellId;
+		uint16 xyzDatacahce[3] = {0};
+		memcpy(xyzDatacahce, xyzData, 3);
+		for (uint8 i = 0; i < 3; i++)
+		{
+			if (xyzDatacahce[i] > 0x8000) // 数据为负
+			{
+				xyzDatacahce[i] = (uint16)((uint16)(~(xyzDatacahce[i])) + 1);
+				xyzDatacahce[i] = 20000U - xyzDatacahce[i];
+			}
+			else
+			{
+				xyzDatacahce[i] = xyzDatacahce[i] + 20000U;
+			}
+		}
+		GpsToTcpInfo.gpsInfo.xData[0] = xyzDatacahce[0] >> 8;
+		GpsToTcpInfo.gpsInfo.xData[1] = xyzDatacahce[0];
+		GpsToTcpInfo.gpsInfo.yData[0] = xyzDatacahce[1] >> 8;
+		GpsToTcpInfo.gpsInfo.yData[1] = xyzDatacahce[1];
+		GpsToTcpInfo.gpsInfo.zData[0] = xyzDatacahce[2] >> 8;
+		GpsToTcpInfo.gpsInfo.zData[1] = xyzDatacahce[2];
+		GpsToTcpInfo.CRC = bcc_chk((uint8 *)&GpsToTcpInfo, sizeof(GPSMsgtoTcpType) - 1);
+		memcpy(SendBuffer,&GpsToTcpInfo,sizeof(GpsToTcpInfo));
+		break;
+	}
+	case 0x86:
+	{
+		VersionMsgtoTcpType VerMsgToTcpInfo;
+		*SendLen = sizeof(VersionMsgtoTcpType);
+		SendBuffer = pvPortMalloc(*SendLen);
+		uint16 DataLen = 0;
+		DataLen = (uint16)sizeof(VerMsgToTcpInfo.VerInfo);
+		VerMsgToTcpInfo.startSymbol[0] = TCP_START_SYM1;
+		VerMsgToTcpInfo.startSymbol[1] = TCP_START_SYM2;
+		VerMsgToTcpInfo.cmdSymbol = TCP_CMD_SYM;
+		VerMsgToTcpInfo.ansSymbol = TCP_ANS_SYM;
+		memcpy(VerMsgToTcpInfo.SN, TcpbattSN, BATT_SN_LEN);
+		VerMsgToTcpInfo.encryptMethod = TCP_ENCPT_DISABLE; //not encrypt
+		VerMsgToTcpInfo.dataLength[0] = (DataLen >> 8) & 0xFF;
+		VerMsgToTcpInfo.dataLength[1] = DataLen & 0xFF;
+		VerMsgToTcpInfo.VerInfo.sendTimeUTC[0] = (UTC8TimeTcp.year) & 0xFF; //year
+		VerMsgToTcpInfo.VerInfo.sendTimeUTC[1] = UTC8TimeTcp.month & 0xFF;           //month
+		VerMsgToTcpInfo.VerInfo.sendTimeUTC[2] = UTC8TimeTcp.day & 0xFF;             //day
+		VerMsgToTcpInfo.VerInfo.sendTimeUTC[3] = UTC8TimeTcp.hour & 0xFF;            //hour
+		VerMsgToTcpInfo.VerInfo.sendTimeUTC[4] = UTC8TimeTcp.minute & 0xFF;          //mins
+		VerMsgToTcpInfo.VerInfo.sendTimeUTC[5] = UTC8TimeTcp.second & 0xFF;          //sec
+		VerMsgToTcpInfo.VerInfo.msgMark = DataIdx;
+		VerMsgToTcpInfo.VerInfo.msgCollectionTimeUTC[0] = (UTC8TimeTcp.year) & 0xFF; //year
+		VerMsgToTcpInfo.VerInfo.msgCollectionTimeUTC[1] = UTC8TimeTcp.month & 0xFF;           //month
+		VerMsgToTcpInfo.VerInfo.msgCollectionTimeUTC[2] = UTC8TimeTcp.day & 0xFF;             //day
+		VerMsgToTcpInfo.VerInfo.msgCollectionTimeUTC[3] = UTC8TimeTcp.hour & 0xFF;            //hour
+		VerMsgToTcpInfo.VerInfo.msgCollectionTimeUTC[4] = UTC8TimeTcp.minute & 0xFF;          //mins
+		VerMsgToTcpInfo.VerInfo.msgCollectionTimeUTC[5] = UTC8TimeTcp.second & 0xFF;
+		memcpy(VerMsgToTcpInfo.VerInfo.ICCID, IccidNum, 20);
+		memcpy(VerMsgToTcpInfo.VerInfo.IMEI, ImeiNum, 15);
+		VerMsgToTcpInfo.VerInfo.BMSHwVersion[0] = 0;
+		VerMsgToTcpInfo.VerInfo.BMSHwVersion[1] = 0;
+		VerMsgToTcpInfo.VerInfo.BMSSwVersion[0] = 0;
+		VerMsgToTcpInfo.VerInfo.BMSSwVersion[1] = 0;
+		VerMsgToTcpInfo.VerInfo.BMSSwVersion[2] = 0;
+		VerMsgToTcpInfo.VerInfo.BMSSwVersion[3] = 0;
+		VerMsgToTcpInfo.VerInfo.HwVersion[0] = (HWVERSION >> 8) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.HwVersion[1] = (HWVERSION)&0xFF;
+		VerMsgToTcpInfo.VerInfo.BLVersion[0] = (BLSWVERSION >> 24) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.BLVersion[1] = (BLSWVERSION >> 16) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.BLVersion[2] = (BLSWVERSION >> 8) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.BLVersion[3] = (BLSWVERSION)&0xFF;
+		VerMsgToTcpInfo.VerInfo.DRVVersion[0] = (DRVSWVERSION >> 24) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.DRVVersion[1] = (DRVSWVERSION >> 16) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.DRVVersion[2] = (DRVSWVERSION >> 8) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.DRVVersion[3] = (DRVSWVERSION)&0xFF;
+		VerMsgToTcpInfo.VerInfo.APPVersion[0] = (APPSWVERSION >> 24) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.APPVersion[1] = (APPSWVERSION >> 16) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.APPVersion[2] = (APPSWVERSION >> 8) & 0xFF;
+		VerMsgToTcpInfo.VerInfo.APPVersion[3] = (APPSWVERSION)&0xFF;
+		VerMsgToTcpInfo.VerInfo.BmsType = BMS_MANUFACTURE;
+		VerMsgToTcpInfo.VerInfo.BmsInfo = BMS_INFO;
+		VerMsgToTcpInfo.VerInfo.DataModuleType = DATA_MODULE_TYPE;
+		VerMsgToTcpInfo.CRC = bcc_chk((uint8 *)&VerMsgToTcpInfo, sizeof(VerMsgToTcpInfo) - 1);
+		memcpy(SendBuffer,&VerMsgToTcpInfo,sizeof(VersionMsgtoTcpType));
+		break;
+	}
+	case 0x90:
+	{
+		*SendLen = 0x52;
+		 SendBuffer = pvPortMalloc(*SendLen);
+		*(SendBuffer + 0) = TCP_START_SYM1;
+		*(SendBuffer + 1) = TCP_START_SYM2;
+		*(SendBuffer + 2) = TCP_CMD_SYM;
+		*(SendBuffer + 3) = TCP_ANS_SYM;
+		memcpy(SendBuffer + 4, TcpbattSN, BATT_SN_LEN);
+		*(SendBuffer + 0x15) = (TCP_ENCPT_DISABLE & 0xFF); // uint8	TCP_ENCPT_DISABLE
+		uint16 DataLen = 0x39;							   // 57
+		*(SendBuffer + 0x16) = ((DataLen >> 8) & 0xFF);	   // uint16	DataLen
+		*(SendBuffer + 0x17) = (DataLen & 0xFF);
+		*(SendBuffer + 0x18) = ((UTC8TimeTcp.year) & 0xFF); // uint8	year
+		*(SendBuffer + 0x19) = (UTC8TimeTcp.month & 0xFF);		   // uint8	month
+		*(SendBuffer + 0x1A) = (UTC8TimeTcp.day & 0xFF);		   // uint8	day
+		*(SendBuffer + 0x1B) = (UTC8TimeTcp.hour & 0xFF);		   // uint8	hour
+		*(SendBuffer + 0x1C) = (UTC8TimeTcp.minute & 0xFF);		   // uint8	minute
+		*(SendBuffer + 0x1D) = (UTC8TimeTcp.second & 0xFF);		   // uint8	second
+		*(SendBuffer + 0x1E) = (DataIdx & 0xFF);				   // uint8	BATTMSG
+		*(SendBuffer + 0x1F) = ((UTC8TimeTcp.year) & 0xFF); // uint8	year
+		*(SendBuffer + 0x20) = (UTC8TimeTcp.month & 0xFF);		   // uint8	month
+		*(SendBuffer + 0x21) = (UTC8TimeTcp.day & 0xFF);		   // uint8	day
+		*(SendBuffer + 0x22) = (UTC8TimeTcp.hour & 0xFF);		   // uint8	hour
+		*(SendBuffer + 0x23) = (UTC8TimeTcp.minute & 0xFF);		   // uint8	minute
+		*(SendBuffer + 0x24) = (UTC8TimeTcp.second & 0xFF);		   // uint8	second
+		memcpy(SendBuffer + 0x25, VIN, 17);
+		*(SendBuffer + 0x36) = (vehicleStatus & 0xFF);		 // uint8	整车状态
+		*(SendBuffer + 0x37) = (bmsHVOn & 0xFF);			 // uint8	bms上高压指令
+		*(SendBuffer + 0x38) = (currentGearPosition & 0xFF); // uint8	当前档位
+		*(SendBuffer + 0x39) = (parkingBreakStatus & 0xFF);	 // uint8	手刹信号
+		*(SendBuffer + 0x3A) = (breakingStatus & 0xFF);		 // uint8	制动开关
+		*(SendBuffer + 0x3B) = ((ODO >> 24) & 0xFF);		 // uint32	总里程
+		*(SendBuffer + 0x3C) = ((ODO >> 16) & 0xFF);
+		*(SendBuffer + 0x3D) = ((ODO >> 8) & 0xFF);
+		*(SendBuffer + 0x3E) = (ODO & 0xFF);
+		*(SendBuffer + 0x3F) = (dcdcWorkStatus & 0xFF);			// uint8 DCDC状态
+		*(SendBuffer + 0x40) = (numOfChrgableSubsys & 0xFF);	// uint8	可充电子系统数
+		*(SendBuffer + 0x41) = (chrgableSubsysCode & 0xFF);		// uint8	可充电储能子系统号
+		*(SendBuffer + 0x42) = (BMS8_MaxTempSysNr & 0xFF);		// uint8	最高温度子系统号 精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x43) = (BMS8_MaxTempNr & 0xFF);			// uint8	最高温度探针单体代号 精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x44) = (BMS8_MinTempSysNr & 0xFF);		// uint8	最低温度子系统号 精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x45) = (BMS8_MinTempNr & 0xFF);			// uint8	最低温度探针子系统代号 精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x46) = (BMS7_MaxUcellSysNr & 0xFF);		// uint8	最高电压电池子系统号 精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x47) = ((BMS7_MaxUcellNr >> 8) & 0xFF); // uint16	最高电压电池单体代号 精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x48) = (BMS7_MaxUcellNr & 0xFF);
+		*(SendBuffer + 0x49) = (BMS7_MinUcellSysNr & 0xFF);		// uint8	最低电压电池子系统号 精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x4A) = ((BMS7_MinUcellNr >> 8) & 0xFF); // uint16	最低电压电池单体代号 精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x4B) = (BMS7_MinUcellNr & 0xFF);
+		*(SendBuffer + 0x4C) = (ebcStatus & 0xFF); // uint8 换电控制器状态
+		*(SendBuffer + 0x4D) = (uint8)((ebcAskHVOn & 0x01) | ((ebcAskHVOff & 0x01) << 1) | ((retainLockSignal & 0x01) << 3) | ((dischargeLockSignal & 0x01) << 5) | ((chargeLockSignal & 0x01) << 6));
+		*(SendBuffer + 0x4E) = (chargeFlag & 0xFF);		 // uint8 充电标志位
+		*(SendBuffer + 0x4F) = ((vcuDCVol >> 8) & 0xFF); // uint16 电机直流母线电压
+		*(SendBuffer + 0x50) = (vcuDCVol & 0xFF);
+		*(SendBuffer + 0x51) = bcc_chk(SendBuffer, 0x51);
+		break;
+	}
+	case 0x91:
+	{
+		*SendLen = 0x54 + 384 * 2 + 64;
+		SendBuffer = pvPortMalloc(*SendLen);
+		*(SendBuffer + 0) = TCP_START_SYM1;
+		*(SendBuffer + 1) = TCP_START_SYM2;
+		*(SendBuffer + 2) = TCP_CMD_SYM;
+		*(SendBuffer + 3) = TCP_ANS_SYM;
+		memcpy(SendBuffer + 4, TcpbattSN, BATT_SN_LEN);
+		*(SendBuffer + 0x15) = (TCP_ENCPT_DISABLE & 0xFF); // uint8	TCP_ENCPT_DISABLE
+		uint16 DataLen = 0x3B + 384 * 2 + 64;
+		*(SendBuffer + 0x16) = ((DataLen >> 8) & 0xFF); // uint16	DataLen
+		*(SendBuffer + 0x17) = (DataLen & 0xFF);
+		*(SendBuffer + 0x18) = ((UTC8TimeTcp.year) & 0xFF); // uint8	year
+		*(SendBuffer + 0x19) = (UTC8TimeTcp.month & 0xFF);		   // uint8	month
+		*(SendBuffer + 0x1A) = (UTC8TimeTcp.day & 0xFF);		   // uint8	day
+		*(SendBuffer + 0x1B) = (UTC8TimeTcp.hour & 0xFF);		   // uint8	hour
+		*(SendBuffer + 0x1C) = (UTC8TimeTcp.minute & 0xFF);		   // uint8	minute
+		*(SendBuffer + 0x1D) = (UTC8TimeTcp.second & 0xFF);		   // uint8	second
+		*(SendBuffer + 0x1E) = (DataIdx & 0xFF);				   // uint8	BATTMSG
+		*(SendBuffer + 0x1F) = ((UTC8TimeTcp.year) & 0xFF); // uint8	year
+		*(SendBuffer + 0x20) = (UTC8TimeTcp.month & 0xFF);		   // uint8	month
+		*(SendBuffer + 0x21) = (UTC8TimeTcp.day & 0xFF);		   // uint8	day
+		*(SendBuffer + 0x22) = (UTC8TimeTcp.hour & 0xFF);		   // uint8	hour
+		*(SendBuffer + 0x23) = (UTC8TimeTcp.minute & 0xFF);		   // uint8	minute
+		*(SendBuffer + 0x24) = (UTC8TimeTcp.second & 0xFF);		   // uint8	second
+		*(SendBuffer + 0x25) = (CSQValue & 0xFF);					   // uint8	csq
+		*(SendBuffer + 0x26) = (BMS1_SysSts & 0xFF);			   // uint8	电池管理系统工作状态,0-初始化 1-自检完成允许上电 2-运行状态 3-高压切断 4-故障状态,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x27) = (BMS1_DCChrgConnectSt & 0xFF);	   // uint8	直流充电枪连接状态,0-未连接 1-单枪连接 2-双枪连接 3-无效,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x28) = (BMS2_FaultLevel & 0xFF);		   // uint8	当前最高故障等级,0-正常 1-1级 轻微故障 2-2级 较严重故障 3-3级 最严重故障,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x29) = (BMS2_FaultCode & 0xFF);			   // uint8	故障码,见BMS_ErrCode,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x2A) = (BMS2_RqHVPoerOff & 0xFF);		   // uint8	BMS下高压请求,0-无效 1-请求下高压 2-不请求下高压 3-无效,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x2B) = (BMS1_ChrgStatus & 0xFF);		   // uint8	充电状态,0-未充电 1-充电中 2-充电已完成 3-充电错误故障,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x2C) = (BMS2_SOC & 0xFF);				   // uint8	电池包SOC 精度_0.4,偏移量_0,单位_*(SendBuffer+0x2D)	=	(BMS2_SOH&0xFF);		//uint8	电池包SOH 精度_0.4,偏移量_0,单位_*(SendBuffer+0x2E)	=	((BMS2_PackInsideVolt>>8)&0xFF);		//uint16	电池包内侧电压 精度_0.1,偏移量_0,单位_V
+		*(SendBuffer + 0x2D) = (BMS2_SOH /25/10) & 0xFF;			   // SOH 精度1%
+		*(SendBuffer + 0x2E) = (BMS2_PackInsideVolt >> 8) & 0xFF;  //电池包总电压
+		*(SendBuffer + 0x2F) = (BMS2_PackInsideVolt & 0xFF);
+		*(SendBuffer + 0x30) = ((BMS2_PackCurrent >> 8) & 0xFF); // uint16	电池包总电流,充电为负值,放电为正值 精度_0.1,偏移量_-1000,单位_A
+		*(SendBuffer + 0x31) = (BMS2_PackCurrent & 0xFF);
+		*(SendBuffer + 0x32) = ((BMS4_SysInsRes >> 8) & 0xFF); // uint16	系统绝缘电阻 精度_1,偏移量_0,单位_KΩ
+		*(SendBuffer + 0x33) = (BMS4_SysInsRes & 0xFF);
+		*(SendBuffer + 0x34) = (BMS1_MainPosRelaySt & 0xFF);		// uint8	主正继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x35) = (BMS1_PreChgRelaySt & 0xFF);			// uint8	预充继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x36) = (BMS1_MainNegRelaySt & 0xFF);		// uint8	主负继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x37) = (BMS1_DCChrgPos1RelaySt & 0xFF);		// uint8	直流充正继电器1状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x38) = (BMS1_DCChrgNeg1RelaySt & 0xFF);		// uint8	直流充负继电器1状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x39) = (BMS1_DCChrgPos2RelaySt & 0xFF);		// uint8	直流充正继电器2状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x3A) = (BMS1_DCChrgNeg2RelaySt & 0xFF);		// uint8	直流充负继电器2状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x3B) = (BMS1_HeatPosRelaySt & 0xFF);		// uint8	加热正继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+		*(SendBuffer + 0x3C) = (BMS1_HeatNegRelaySt & 0xFF);		// uint8	加热负继电器状态,0-预留 1-断开 2-吸合  ,精度_1,偏移量_0,单位_
+
+		*(SendBuffer + 0x50) = ((BMS9_PackTotCellNum >> 8) & 0xFF); // uint16	PACK中单体电芯的总数目
+		*(SendBuffer + 0x51) = (BMS9_PackTotCellNum & 0xFF);
+		for (uint16 index = 0; index < BMS9_PackTotCellNum; index++)
 		{
-			OutValue = 0;
+			*(SendBuffer + 0x52 + index * 2) = ((BMS_Cell_Volt[index] >> 8) & 0xFF);
+			*(SendBuffer + 0x52 + index * 2 + 1) = ((BMS_Cell_Volt[index]) & 0xFF);
 		}
+		*(SendBuffer + 0x352) = (BMS9_PackTotTempNum & 0xFF); //  uint8	PACK中电芯温度点(探针)的总数目
+		memcpy(SendBuffer + 0x353, BMS_Cell_TempN, BMS9_PackTotTempNum);
+		*(SendBuffer + 0x393) = bcc_chk(SendBuffer, 0x393);
+		break;
+	}
+	case 0x92:
+	{
+		*SendLen = 0x4E;
+		 SendBuffer = pvPortMalloc(*SendLen);
+		*(SendBuffer + 0) = TCP_START_SYM1;
+		*(SendBuffer + 1) = TCP_START_SYM2;
+		*(SendBuffer + 2) = TCP_CMD_SYM;
+		*(SendBuffer + 3) = TCP_ANS_SYM;
+		memcpy(SendBuffer + 4, TcpbattSN, BATT_SN_LEN);
+		*(SendBuffer + 0x15) = (TCP_ENCPT_DISABLE & 0xFF); // uint8	TCP_ENCPT_DISABLE
+		uint16 DataLen = 0x35;
+		*(SendBuffer + 0x16) = ((DataLen >> 8) & 0xFF); // uint16	DataLen
+		*(SendBuffer + 0x17) = (DataLen & 0xFF);
+		*(SendBuffer + 0x18) = ((UTC8TimeTcp.year) & 0xFF);	 // uint8	year
+		*(SendBuffer + 0x19) = (UTC8TimeTcp.month & 0xFF);			 // uint8	month
+		*(SendBuffer + 0x1A) = (UTC8TimeTcp.day & 0xFF);			 // uint8	day
+		*(SendBuffer + 0x1B) = (UTC8TimeTcp.hour & 0xFF);			 // uint8	hour
+		*(SendBuffer + 0x1C) = (UTC8TimeTcp.minute & 0xFF);			 // uint8	minute
+		*(SendBuffer + 0x1D) = (UTC8TimeTcp.second & 0xFF);			 // uint8	second
+		*(SendBuffer + 0x1E) = (DataIdx & 0xFF);					 // uint8
+		*(SendBuffer + 0x1F) = ((UTC8TimeTcp.year) & 0xFF);	 // uint8	year
+		*(SendBuffer + 0x20) = (UTC8TimeTcp.month & 0xFF);			 // uint8	month
+		*(SendBuffer + 0x21) = (UTC8TimeTcp.day & 0xFF);			 // uint8	day
+		*(SendBuffer + 0x22) = (UTC8TimeTcp.hour & 0xFF);			 // uint8	hour
+		*(SendBuffer + 0x23) = (UTC8TimeTcp.minute & 0xFF);			 // uint8	minute
+		*(SendBuffer + 0x24) = (UTC8TimeTcp.second & 0xFF);			 // uint8	second
+		*(SendBuffer + 0x25) = ((BMS14_TotalChargeAh >> 24) & 0xFF); // uint32	累积充入Ah 数 精度_0.1,偏移量_0,单位_Ah
+		*(SendBuffer + 0x26) = ((BMS14_TotalChargeAh >> 16) & 0xFF);
+		*(SendBuffer + 0x27) = ((BMS14_TotalChargeAh >> 8) & 0xFF);
+		*(SendBuffer + 0x28) = (BMS14_TotalChargeAh & 0xFF);
+		*(SendBuffer + 0x29) = ((BMS14_TotalDischargeAh >> 24) & 0xFF); // uint32	累积放出Ah 数 精度_0.1,偏移量_0,单位_Ah
+		*(SendBuffer + 0x2A) = ((BMS14_TotalDischargeAh >> 16) & 0xFF);
+		*(SendBuffer + 0x2B) = ((BMS14_TotalDischargeAh >> 8) & 0xFF);
+		*(SendBuffer + 0x2C) = (BMS14_TotalDischargeAh & 0xFF);
+		*(SendBuffer + 0x2D) = ((BMS15_TotalChargeKwh >> 24) & 0xFF); // uint32	累计充入kWh 数 精度_0.1,偏移量_0,单位_KWh
+		*(SendBuffer + 0x2E) = ((BMS15_TotalChargeKwh >> 16) & 0xFF);
+		*(SendBuffer + 0x2F) = ((BMS15_TotalChargeKwh >> 8) & 0xFF);
+		*(SendBuffer + 0x30) = (BMS15_TotalChargeKwh & 0xFF);
+		*(SendBuffer + 0x31) = ((BMS15_TotalDischargeKwh >> 24) & 0xFF); // uint32	累计放出kWh 数 精度_0.1,偏移量_0,单位_KWh
+		*(SendBuffer + 0x32) = ((BMS15_TotalDischargeKwh >> 16) & 0xFF);
+		*(SendBuffer + 0x33) = ((BMS15_TotalDischargeKwh >> 8) & 0xFF);
+		*(SendBuffer + 0x34) = (BMS15_TotalDischargeKwh & 0xFF);
+		*(SendBuffer + 0x35) = ((BMS16_TotalEneryECOChargeAh >> 24) & 0xFF); // uint32	累计动能回馈充入Ah 数 精度_0.1,偏移量_0,单位_Ah
+		*(SendBuffer + 0x36) = ((BMS16_TotalEneryECOChargeAh >> 16) & 0xFF);
+		*(SendBuffer + 0x37) = ((BMS16_TotalEneryECOChargeAh >> 8) & 0xFF);
+		*(SendBuffer + 0x38) = (BMS16_TotalEneryECOChargeAh & 0xFF);
+		*(SendBuffer + 0x39) = ((BMS16_TotalEneryECOChargeKwh >> 24) & 0xFF); // uint32	累计动能回馈充入kWh 数 精度_0.1,偏移量_0,单位_KWh
+		*(SendBuffer + 0x3A) = ((BMS16_TotalEneryECOChargeKwh >> 16) & 0xFF);
+		*(SendBuffer + 0x3B) = ((BMS16_TotalEneryECOChargeKwh >> 8) & 0xFF);
+		*(SendBuffer + 0x3C) = (BMS16_TotalEneryECOChargeKwh & 0xFF);
+		*(SendBuffer + 0x3D) = ((BMS17_TotalStationChargeAh >> 24) & 0xFF); // uint32	累计换电站充入Ah 数 精度_0.1,偏移量_0,单位_Ah
+		*(SendBuffer + 0x3E) = ((BMS17_TotalStationChargeAh >> 16) & 0xFF);
+		*(SendBuffer + 0x3F) = ((BMS17_TotalStationChargeAh >> 8) & 0xFF);
+		*(SendBuffer + 0x40) = (BMS17_TotalStationChargeAh & 0xFF);
+		*(SendBuffer + 0x41) = ((BMS17_TotalStationChargeKwh >> 24) & 0xFF); // uint32	累计换电站充入kWh 数 精度_0.1,偏移量_0,单位_KWh
+		*(SendBuffer + 0x42) = ((BMS17_TotalStationChargeKwh >> 16) & 0xFF);
+		*(SendBuffer + 0x43) = ((BMS17_TotalStationChargeKwh >> 8) & 0xFF);
+		*(SendBuffer + 0x44) = (BMS17_TotalStationChargeKwh & 0xFF);
+		*(SendBuffer + 0x45) = ((BMS18_TotalPoleChargeAh >> 24) & 0xFF); // uint32	累计插枪充电充入Ah 数 精度_0.1,偏移量_0,单位_Ah
+		*(SendBuffer + 0x46) = ((BMS18_TotalPoleChargeAh >> 16) & 0xFF);
+		*(SendBuffer + 0x47) = ((BMS18_TotalPoleChargeAh >> 8) & 0xFF);
+		*(SendBuffer + 0x48) = (BMS18_TotalPoleChargeAh & 0xFF);
+		*(SendBuffer + 0x49) = ((BMS18_TotalPoleChargeKwh >> 24) & 0xFF); // uint32	累计插枪充电充入kWh 数 精度_0.1,偏移量_0,单位_KWh
+		*(SendBuffer + 0x4A) = ((BMS18_TotalPoleChargeKwh >> 16) & 0xFF);
+		*(SendBuffer + 0x4B) = ((BMS18_TotalPoleChargeKwh >> 8) & 0xFF);
+		*(SendBuffer + 0x4C) = (BMS18_TotalPoleChargeKwh & 0xFF);
+		*(SendBuffer + 0x4D) = bcc_chk(SendBuffer, 0x4D);
+		break;
 	}
 	default:
 		break;
 	}
-	return OutValue;
+	*PtrSendAddr = SendBuffer;
+}
+void GetUtc8Time(UTC8TimeType *UTC8TimeTcp)
+{
+	char *AtCmdAsk = (char *)("AT+CCLK?\r\n");
+	uint8 AtCmdLen = mstrlen(AtCmdAsk);
+	uint8 ReadLen = 0;
+	uint8 *retptr = NULL;
+	memset(RX_Buffer[UART_LPUART1], 0x00, sizeof(RX_Buffer[UART_LPUART1]));
+	UART_Query_Data(UART_LPUART1, UART_LPUART1, AtCmdAsk,AtCmdLen , RX_Buffer[UART_LPUART1], &ReadLen, 1000 * 10);
+	if(ReadLen>0)
+	{
+		if ((uint8 *)strstr((char *)RX_Buffer[UART_LPUART1], (char *)("OK")))
+		{
+			retptr = (uint8 *)strstr((char *)RX_Buffer[UART_LPUART1], (char *)("+CCLK:"));
+			UTC8TimeTcp->year = CharToHex(*(retptr + 8))*10+CharToHex(*(retptr + 9));
+			UTC8TimeTcp->month = CharToHex(*(retptr + 11))*10+CharToHex(*(retptr + 12));
+			UTC8TimeTcp->day = CharToHex(*(retptr + 14))*10+CharToHex(*(retptr + 15));
+			UTC8TimeTcp->hour = CharToHex(*(retptr + 17))*10+CharToHex(*(retptr + 18));
+			UTC8TimeTcp->minute = CharToHex(*(retptr + 20))*10+CharToHex(*(retptr + 21));
+			UTC8TimeTcp->second = CharToHex(*(retptr + 23))*10+CharToHex(*(retptr + 24));
+		}
+	}
 }

+ 75 - 2
src/AppTaskUart1.h

@@ -3,7 +3,7 @@
  * @Date         : 2022-02-10 11:44:08
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-02-11 10:44:55
+ * @LastEditTime : 2022-02-14 15:48:07
  * @Description  : file content
  * @FilePath     : \S32K146_4G\src\AppTaskUart1.h
  */
@@ -19,7 +19,81 @@
 #include "hal_adapter.h"
 #include "AppFunclib.h"
 #include "AppGlobalVar.h"
+#include "AppTaskGps.h"
 #define CRLF "\r\n"
+#define BATT_SN_LEN 17
+#define TCP_START_SYM1 0x23
+#define TCP_START_SYM2 0x23
+#define TCP_CMD_SYM 0x02   //实时信息上报是0x02
+#define TCP_HEART_SYM 0x07 //心跳包标志
+#define TCP_ANS_SYM 0xFE
+#define TCP_ENCPT_ENABLE 0x00
+#define TCP_ENCPT_DISABLE 0x01
+#define GpsMsg (0x82)
+#define VerMsg (0x86)
+#define TruckBattMsg (0x91)
+#define TruckVehiMsg (0x90)
+#define TruckAcclMsg (0x92)
+typedef struct _GPSInfoType
+{
+	uint8 sendTimeUTC[6];
+	uint8 msgMark;
+	uint8 msgCollectionTimeUTC[6];
+	GPSInfo GpsInfoData;
+	uint8 Tac[2];
+	uint8 CellID[4];
+	uint8 xData[2];
+	uint8 yData[2];
+	uint8 zData[2];
+} GPSInfoType;
+typedef struct GPSMsgtoTcpType
+{
+	uint8 startSymbol[2];
+	uint8 cmdSymbol;
+	uint8 ansSymbol;
+	uint8 SN[BATT_SN_LEN];
+	uint8 encryptMethod;
+	uint8 dataLength[2];
+	GPSInfoType gpsInfo;
+	uint8 CRC;
+} GPSMsgtoTcpType;
+typedef struct _VerInfoType
+{
+	uint8	sendTimeUTC[6];
+	uint8	msgMark;
+	uint8	msgCollectionTimeUTC[6];
+	uint8	ICCID[20];
+	uint8	IMEI[15];
+	uint8	BMSHwVersion[2];
+	uint8	BMSSwVersion[4];
+	uint8	HwVersion[2];
+	uint8	BLVersion[4];
+	uint8	DRVVersion[4];
+	uint8	APPVersion[4];
+	uint8	BmsType;
+	uint8	BmsInfo;
+	uint8   DataModuleType;
+}VerInfoType;
+typedef struct VersionMsgtoTcpType
+{
+	uint8 	startSymbol[2];
+	uint8	cmdSymbol;
+	uint8	ansSymbol;
+	uint8	SN[BATT_SN_LEN];
+	uint8	encryptMethod;
+	uint8	dataLength[2];
+	VerInfoType VerInfo;
+	uint8	CRC;
+}VersionMsgtoTcpType;
+typedef struct UTC8Time_Type
+{
+    uint8 year;
+    uint8 month;
+    uint8 day;
+    uint8 hour;
+    uint8 minute;
+    uint8 second;
+} UTC8TimeType;
 typedef enum
 {
     AT_CMD_TEST = 0,
@@ -32,7 +106,6 @@ typedef enum
     AT_CONNECT,
     AT_CONNECTCHK,
     AT_SEND,
-	AT_GETTIME,
     AT_DISCON,
     AT_NETCLOSE,
 } ATCmd;

+ 9 - 9
src/hal_adapter.c

@@ -7,7 +7,7 @@
 #include "hal_adapter.h"
 #include "AppGlobalVar.h"
 
- uint8_t __attribute__((section(".non_cacheable_data"))) RX_Buffer[UART_CH_MAX_CONFIG][BUFFER_SIZE];
+ uint8_t __attribute__((section(".non_cacheable_data"))) RX_Buffer[3][BUFFER_SIZE];
  uint32_t bufferIdx[3] = {0};
  Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint8 *txBuffer, uint32 sendLength, uint8 *rxBuffer, uint16 *rxlen,uint32 T_timeout)
  {
@@ -196,13 +196,13 @@
      if (event == LPUART_UART_IP_EVENT_RX_FULL)
      {
          /* The reception stops when receiving idle is detected or the buffer is full */
-         if (bufferIdx[hwInstance] <= (BUFFER_SIZE - DMA_SIZE))
-         {
-             /* Update the buffer index and the rx buffer */
-        	 bufferIdx[hwInstance] += DMA_SIZE;
-         	Uart_SetBuffer(hwInstance,&RX_Buffer[hwInstance][bufferIdx[hwInstance]],DMA_SIZE,UART_RECEIVE);
-             //Lpuart_Uart_Ip_SetRxBuffer(hwInstance, &RX_Buffer[bufferIdx], DMA_SIZE);
-         }
+		 if (bufferIdx[hwInstance] <= (BUFFER_SIZE - DMA_SIZE))
+		 {
+			 /* Update the buffer index and the rx buffer */
+			 bufferIdx[hwInstance] += DMA_SIZE;
+			Uart_SetBuffer(hwInstance,&RX_Buffer[hwInstance][bufferIdx[hwInstance]],DMA_SIZE,UART_RECEIVE);
+			 //Lpuart_Uart_Ip_SetRxBuffer(hwInstance, &RX_Buffer[bufferIdx], DMA_SIZE);
+		 }
      }
      if (event == LPUART_UART_IP_EVENT_ERROR)
      {
@@ -332,7 +332,7 @@
      // should put the msg into message queue
      canRxMsg_Buff = Can_GetMsgInfo(Mailbox->CanId, PduInfoPtr->SduLength, PduInfoPtr->SduDataPtr);
      xQueueSendFromISR(CanRecvQueueHandle,&canRxMsg_Buff,&xHigherPriorityTaskWoken);
-//     xQueueSend(CanRecvQueueHandle,&canRxMsg_Buff,1000);
+     xQueueSend(CanRecvQueueHandle,&canRxMsg_Buff,1000);
  }
 
  void CanIf_CurrentIcomConfiguration(uint8 ControllerId, IcomConfigIdType ConfigurationId, IcomSwitch_ErrorType Error)

+ 3 - 2
src/hal_adapter.h

@@ -47,9 +47,10 @@
  #define TJA1153_START_ID (uint32_t)(0x555u)
  #define TJA1153_CONFIG_ID (uint32_t)(0x18DA00F1u)
 
- #define BUFFER_SIZE 200
+ #define BUFFER_SIZE 1000
  #define DMA_SIZE 20
- extern uint8_t RX_Buffer[UART_CH_MAX_CONFIG][BUFFER_SIZE];
+ extern uint8_t RX_Buffer[3][BUFFER_SIZE];
+// extern uint8 GpsBufferGet[GPSBUFFER_SIZE];
  Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint8 *txBuffer, uint32 sendLength, uint8 *rxBuffer, uint16 *rxlen,uint32 T_timeout);
  Std_ReturnType UART_Send_Data(uint8 transChannel, const uint8 *txBuffer, uint32 sendLength, uint32 T_timeout);
  Std_ReturnType UART_Receive_Data(uint8 recvChannel, uint8 *rxBuffer,uint16 *rxlen, sint32 T_timeout);

+ 4 - 0
src/main.c

@@ -51,6 +51,7 @@
 #include "Lpuart_Uart_Ip.h"
 
 #include "AppTaskUart1.h"
+#include "AppTaskCan.h"
 int main(void)
 {
 	volatile int exit_code = 0;
@@ -126,8 +127,11 @@ int main(void)
 	//	Dio_WriteChannel(DioConf_DioChannel_PTB4_GPIO_OUT_MCU_RS485_EN,STD_ON);
 	// Dio_WriteChannel(DioConf_DioChannel_PTB18_GPIO_OUT_MCU_4G_RESET,STD_OFF);
 	// DioConf_DioChannel_PTB18_GPIO_OUT_MCU_4G_RESET
+	IP_LPUART1->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART2->CTRL |= LPUART_CTRL_ILT(1);
 	xTaskCreate(Uart_4G_Task, (const char *const)"Uart_4G_Task", 256 + 64, (void *)0, main_TASK_PRIORITY, NULL);
+	xTaskCreate(CanTask, (const char *const)"CanTask", 256, (void *)0, main_TASK_PRIORITY + 1, NULL);
+	xTaskCreate(GpsTask, (const char *const)"GpsTask", 256, (void *)0, main_TASK_PRIORITY + 2, NULL);
 	vTaskStartScheduler();
 	for (;;)
 	{