
#include "drv_rtc.h"
#include "bsp_flash.h"

#include "soc_calculate.h"
#include "sop_calculate.h"
#include "dido_manager.h"
#include "fault_manager.h"
#include "flash_manager.h"
#include "eeprom_manager.h"

#include "logic_ctrl.h"

#include "kit_debug.h"

typedef enum
{
	kAlarmStart,
	kAlarmBan = kAlarmStart,
	kAlarmWarn,
	kAlarmCut,
	kAlarmUnRel,
	kAlarmEnd,
}AlarmHander;


typedef enum
{
    kACModel_Start, 
	kACModel_Stop = kACModel_Start, 	
	kACMode_InnerLoop,
    kACMode_Cool,
    kACMode_Heat,
    kACMode_Auto,     
    kACMode_Hydrating, 
    kACMode_End,
}ACMode;

static const EepromDataFormat data_format[kEEDataIdx_End] =
{
	STATIC_UNCHECK_MAX_MIN,           0,              0x0000,         0xFFFF, //Boot标志位
	STATIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF, //程序更新时间
	STATIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF, //程序更新时间
	
	STATIC_CHECK,   PARAM_COMBINE(0, 8),	        PARAM_COMBINE(0,1),                         PARAM_COMBINE(255,50),	        //地址编号 + BCU/BMU个数
	STATIC_CHECK,   PARAM_COMBINE(1, kCellType_kLiFePO4),	PARAM_COMBINE(1, kCellType_Start),            PARAM_COMBINE(255, kCellType_End),	//电池类型+温感类型
	STATIC_CHECK,   400,	        0,              0xFFFF,	        //电池总数
	STATIC_CHECK,   400,	        0,              0xFFFF,	        //温感总数
	STATIC_CHECK,   PARAM_COMBINE(35+50,30 + 50),	PARAM_COMBINE(0,0),                         PARAM_COMBINE(255,255),	        //风扇开启温度+风扇关闭温度
	STATIC_CHECK,   PARAM_COMBINE(0+50,0+50),	PARAM_COMBINE(0,0),                             PARAM_COMBINE(255,255),	        //电压故障温度点2_1
    
	STATIC_CHECK,   PARAM_CONVERT(140, 10, 0),    PARAM_CONVERT(1, 10, 0),                    PARAM_CONVERT(2000, 10, 0),       //额定充电电流
	STATIC_CHECK,   PARAM_CONVERT(140, 10, 0),    PARAM_CONVERT(1, 10, 0),                    PARAM_CONVERT(2000, 10, 0),       //额定放电电流
	STATIC_CHECK,   PARAM_CONVERT(100, 10, 0),    PARAM_CONVERT(1, 10, 0),                    PARAM_CONVERT(2000, 10, 0),       //允许并机压差
	STATIC_CHECK,   PARAM_CONVERT(100, 10, 0),    PARAM_CONVERT(1, 10, 0),                    PARAM_CONVERT(2000, 10, 0),       //允许并机电流
	STATIC_CHECK,   PARAM_COMBINE(3, 1),          PARAM_COMBINE(1, 1),                        PARAM_COMBINE(255, 255),	      //高压下电延时+最小在线簇数
	STATIC_CHECK,   PARAM_COMBINE(5, 1),	        PARAM_COMBINE(0, 1),                        PARAM_COMBINE(255, 255),		  //数据存储周期
		
	STATIC_CHECK,   PARAM_COMBINE(0, kR485_115200),	PARAM_COMBINE(0, kR485BaudRateStart), 	PARAM_COMBINE(0x02, kR485BaudRateEnd),	//内部485校验位+内部485波特率	
	STATIC_CHECK,   PARAM_COMBINE(0, kR485_9600),	PARAM_COMBINE(0, kR485BaudRateStart), 	PARAM_COMBINE(0x02, kR485BaudRateEnd),	//外部4852校验位+外部4852波特率
	STATIC_CHECK,   PARAM_COMBINE(0, kR485_9600),	PARAM_COMBINE(0, kR485BaudRateStart), 	PARAM_COMBINE(0x02, kR485BaudRateEnd),	//外部4853校验位+外部4853波特率

	STATIC_CHECK,   PARAM_COMBINE(0, kCAN_250kbps),	PARAM_COMBINE(0,kCanBaudRateStart), 	PARAM_COMBINE(0xff,kCanBaudRateEnd),	//内部can协议+内部can波特率	
	STATIC_CHECK,   PARAM_COMBINE(1, kCAN_250kbps),	PARAM_COMBINE(0,kCanBaudRateStart), 	PARAM_COMBINE(0xff,kCanBaudRateEnd),	//外部can协议+外部can波特率	
    //内部RS485设备地址+内部RS485通讯协议
	STATIC_CHECK,   PARAM_COMBINE(1,0),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff), 
    //外部RS4852设备地址+外部RS4852通讯协议
	STATIC_CHECK,   PARAM_COMBINE(1,0),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff),   
    //外部RS4853设备地址+外部RS4853通讯协议
	STATIC_CHECK,   PARAM_COMBINE(1,0),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff),   
	
	//以太网通讯地址+以太网通讯协议
	STATIC_CHECK,   PARAM_COMBINE(0,0),      				PARAM_COMBINE(0,0),  						PARAM_COMBINE(0xff,0xff), 
	
	STATIC_CHECK,   0,      0,   0xFFFF,		//分流器1矫正增益
	STATIC_CHECK,   0,      0,   0xFFFF, 		//分流器2矫正增益
	//分流器2_1矫正偏置
	STATIC_CHECK,   PARAM_COMBINE(0,0),      PARAM_COMBINE(0,0),      PARAM_COMBINE(255,255), 
	STATIC_CHECK,   1000,  100,  0xFFFF, 		//电流1校准系数
	STATIC_CHECK,   1000,  100,  0xFFFF, 		//电流2校准系数	
	STATIC_CHECK,   1000,  100,  0xFFFF, 		//电压1校准系数
	STATIC_CHECK,   1000,  100,  0xFFFF, 		//电压2校准系数	
	STATIC_CHECK,   PARAM_COMBINE(0,0),      PARAM_COMBINE(0,0),      PARAM_COMBINE(255,255), 	//电流2_1矫正偏置
	STATIC_CHECK,   2500,      10,      5000, 			//霍尔摆幅电压
	STATIC_CHECK,   PARAM_COMBINE(0,75),	        PARAM_COMBINE(0, 10),	                        	PARAM_COMBINE(1, 250),            //充电电流方向+分流器额定电压
	
	STATIC_CHECK,   PARAM_COMBINE(25, 25),	        PARAM_COMBINE(1, 1),	                        PARAM_COMBINE(250, 250),	        //电流传感器1/2量程
	STATIC_CHECK,   PARAM_COMBINE(kCurType_Shunt, kCurType_Shunt),	        PARAM_COMBINE(kCusrTypeStart, kCusrTypeStart),	                        PARAM_COMBINE(kCurTypeEnd, kCurTypeEnd),	            //电流传感器1/2类型( 0分流器1单量程霍尔2双量程3双单量程)
	STATIC_CHECK,   PARAM_COMBINE(0,0),	        PARAM_COMBINE(0, 0),	                        PARAM_COMBINE(1, 1),            //电流传感器1/2方向
	STATIC_CHECK,   PARAM_COMBINE(0,0),	        PARAM_COMBINE(0, 0),	                        PARAM_COMBINE(255,255),         //电流传感器1/2滤波(0.1A/bit)
	STATIC_CHECK,   PARAM_COMBINE(120, 120),	        PARAM_COMBINE(0, 0),	                    PARAM_COMBINE(255,255),         //电流传感器1/2偏移(0.1A/bit)	
	STATIC_CHECK,   PARAM_COMBINE(10,3),	    PARAM_COMBINE(0, 0),	          PARAM_COMBINE(250, 250),	//状态转换电流阈值+状态转换保持时间
	
	//继电器配置
    STATIC_CHECK,   PARAM_COMBINE(kDoType_Negative,kDoType_Positive),	PARAM_COMBINE(kDoType_Start,kDoType_Start),	 PARAM_COMBINE(kDoType_End,kDoType_End), //继电器2_1类型
    STATIC_CHECK,   PARAM_COMBINE(kDoType_Unused,kDoType_Unused),	PARAM_COMBINE(kDoType_Start,kDoType_Start),	 PARAM_COMBINE(kDoType_End,kDoType_End), //继电器4_3类型
	STATIC_CHECK,   PARAM_COMBINE(kDoType_Unused,kDoType_Unused),	PARAM_COMBINE(kDoType_Start,kDoType_Start),	 PARAM_COMBINE(kDoType_End,kDoType_End), //继电器6_5类型
	STATIC_CHECK,   PARAM_COMBINE(kDoType_Unused,kDoType_Unused),	PARAM_COMBINE(kDoType_Start,kDoType_Start),	 PARAM_COMBINE(kDoType_End,kDoType_End), //继电器8_7类型
	
	STATIC_UNCHECK_MAX_MIN, 0xFFFF,      				0x0000,      					0xFFFF,//放电自检故障低位
	STATIC_UNCHECK_MAX_MIN, 0x003F,      				0x0000,      					0xFFFF,//放电自检故障高位
	STATIC_UNCHECK_MAX_MIN, 0xFFFF,      				0x0000,      					0xFFFF,//充电自检故障低位
	STATIC_UNCHECK_MAX_MIN, 0x003F,      				0x0000,      					0xFFFF,//充电自建故障高位
	
	STATIC_CHECK,   PARAM_COMBINE(3,3),		    PARAM_COMBINE(1,0),	        PARAM_COMBINE(50,10), //超时时间(s) + 预充次数
    STATIC_CHECK,   PARAM_COMBINE(0,90),		PARAM_COMBINE(0,10),	    PARAM_COMBINE(2,100), //预充电压类型 + 预充电压百分比
	STATIC_CHECK,   PARAM_COMBINE(90,90),		PARAM_COMBINE(30,50),	    PARAM_COMBINE(100,100), //HV2电压比例+HV1电压比例
    STATIC_CHECK,   PARAM_COMBINE(-10+50,-5+50),	PARAM_COMBINE(0,0),                         PARAM_COMBINE(255,255),	        //加热开启温度+加热关闭温度
		
	STATIC_CHECK,   PARAM_CONVERT(280,10,0),    PARAM_CONVERT(1,10,0),                      PARAM_CONVERT(1190,10,0),       //额定容量(0.1AH/bit,0)
	STATIC_CHECK,   PARAM_CONVERT(140,10,0),    PARAM_CONVERT(1,10,0),                      PARAM_CONVERT(2000,10,0),       //实际容量(0.1AH/bit,0)
    STATIC_CHECK,   PARAM_CONVERT(1280,10,0),    PARAM_CONVERT(50,10,0),                     PARAM_CONVERT(2000,10,0),       //额定总压(0.1A/bit,0)
    STATIC_CHECK,   PARAM_CONVERT(1460,10,0),    PARAM_CONVERT(50,10,0),                     PARAM_CONVERT(2000,10,0),       //请求充电电压(0.1A/bit,0)
	STATIC_CHECK,   2750,                       1500,                        3200, //SOC过放校准电压值(ms)
    STATIC_CHECK,   3600,                       3300,                        4500, //SOC过充校准电压值(ms)


	//放电总压低（高温）(0.1v)  //故障处理 0禁用 1只报警  2切断继电器 3重启释放
	STATIC_CHECK,   PARAM_CONVERT(1140,10,0), 		PARAM_CONVERT(15,10,0),   		PARAM_CONVERT(2000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1180,10,0), 		PARAM_CONVERT(15,10,0),   		PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(1120,10,0), 		PARAM_CONVERT(15,10,0),			PARAM_CONVERT(2000,10,0),	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),		60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1160,10,0), 		PARAM_CONVERT(15,10,0),			PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(1100,10,0), 		PARAM_CONVERT(15,10,0),   		PARAM_CONVERT(2000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1140,10,0), 		PARAM_CONVERT(15,10,0),   		PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//放电总压低（低温）
	STATIC_CHECK,   PARAM_CONVERT(1140,10,0), 		PARAM_CONVERT(15,10,0),   		PARAM_CONVERT(2000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1180,10,0), 		PARAM_CONVERT(15,10,0),   		PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(1120,10,0), 		PARAM_CONVERT(15,10,0),			PARAM_CONVERT(2000,10,0),	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),		60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1160,10,0), 		PARAM_CONVERT(15,10,0),			PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(1100,10,0), 		PARAM_CONVERT(15,10,0),   		PARAM_CONVERT(2000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1140,10,0), 		PARAM_CONVERT(15,10,0),   		PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),	 		        //降流百分比%+故障处理
    //放电单体低（高温）(mV)  
	STATIC_CHECK,   2850,                    		1500,                 		  	3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   2950,                    		1500,                   	   	3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   2800,                    		1500,          		            3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   2900,               	     	1500,                   	    3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   2750,     		                1500,         		            3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),		60000, 						//故障延时
	STATIC_CHECK,   2850,                   		1500,                   	   	3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),	//降流百分比%+故障处理
	//放电单体低（低温）
	STATIC_CHECK,   2850,      			            1500,                      		3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   2950,                    		1500,                     		3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   2800,                    		1500,                      		3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   2900,                    		1500,                      		3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   2750,                    		1500,                      		3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   2850,                    		1500,                      		3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//放电单体高(mV)  
	STATIC_CHECK,   3550,                    		3200,                 		  	4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
	STATIC_CHECK,   3450,                    		3000,                   	   	4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   3600,                    		3200,          		            4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),         		           	FAULT_TICK_CONVERT(100),                	        60000, 	//故障延时
	STATIC_CHECK,   3500,               	     	3000,                   	    4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                   		FAULT_TICK_CONVERT(100),                    	    60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   3650,     		                3200,         		            4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),           		        FAULT_TICK_CONVERT(100),							60000, 	//故障延时
	STATIC_CHECK,   3550,                   		3000,                   	   	4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                    	   	60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理	
	//放电过流（0.1A）
	STATIC_CHECK,   PARAM_CONVERT(166,10,0),		PARAM_CONVERT(10,10,0),			PARAM_CONVERT(5000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(156,10,0),		PARAM_CONVERT(10,10,0),         PARAM_CONVERT(5000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(185,10,0),		PARAM_CONVERT(10,10,0),         PARAM_CONVERT(5000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(175,10,0),		PARAM_CONVERT(10,10,0),         PARAM_CONVERT(5000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(200,10,0),		PARAM_CONVERT(10,10,0),			PARAM_CONVERT(5000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(190,10,0),		PARAM_CONVERT(10,10,0),			PARAM_CONVERT(5000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//放电高温（0.1℃,-50℃）
	STATIC_CHECK,   PARAM_CONVERT(50,10,50),		PARAM_CONVERT(20,10,50),		PARAM_CONVERT(100,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(45,10,50),		PARAM_CONVERT(15,10,50),		PARAM_CONVERT(100,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(55,10,50),		PARAM_CONVERT(20,10,50),		PARAM_CONVERT(100,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(50,10,50),		PARAM_CONVERT(15,10,50),		PARAM_CONVERT(100,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(60,10,50),		PARAM_CONVERT(20,10,50),		PARAM_CONVERT(100,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(55,10,50),		PARAM_CONVERT(15,10,50),		PARAM_CONVERT(100,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//放电低温（0.1℃,-50℃）
	STATIC_CHECK,   PARAM_CONVERT(5,10,50),		PARAM_CONVERT(-30,10,50),		PARAM_CONVERT(10,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(10,10,50),		PARAM_CONVERT(-25,10,50),		PARAM_CONVERT(10,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(0,10,50),		PARAM_CONVERT(-30,10,50),		PARAM_CONVERT(10,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(5,10,50),		PARAM_CONVERT(-25,10,50),		PARAM_CONVERT(10,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(-5,10,50),		PARAM_CONVERT(-30,10,50),		PARAM_CONVERT(10,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),							FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(0,10,50),		PARAM_CONVERT(-25,10,50),		PARAM_CONVERT(10,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//放电压差（mV）
	STATIC_CHECK,   400,                    		20,                      		1500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   350,                    		20,                      		1500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   600,                    		20,                      		1500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   550,                    		20,                      		1500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   1000,                    		20,                      		1500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   950,                    		20,                      		1500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//放电温差（0.1℃）
	STATIC_CHECK,   PARAM_CONVERT(10,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(5,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(15,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(10,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(20,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(15,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//SOC（0.1%）
	STATIC_CHECK,   PARAM_CONVERT(15,100,0),			PARAM_CONVERT(0,100,0),			PARAM_CONVERT(30,100,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(17,100,0),			PARAM_CONVERT(0,100,0),			PARAM_CONVERT(40,100,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(10,100,0),			PARAM_CONVERT(0,100,0),			PARAM_CONVERT(30,100,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(12,100,0),			PARAM_CONVERT(0,100,0),			PARAM_CONVERT(40,100,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(5,100,0),			PARAM_CONVERT(0,100,0),			PARAM_CONVERT(30,100,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(7,100,0),			PARAM_CONVERT(0,100,0),			PARAM_CONVERT(40,100,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理

	//充电总压高(0.1v)  //故障处理 0禁用 1只报警  2切断继电器 3重启释放
	STATIC_CHECK,   PARAM_CONVERT(1420,10,0), 		PARAM_CONVERT(20,10,0),   		PARAM_CONVERT(2000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1380,10,0), 		PARAM_CONVERT(20,10,0),  	 	PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(1440,10,0), 		PARAM_CONVERT(20,10,0),			PARAM_CONVERT(2000,10,0),	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1400,10,0), 		PARAM_CONVERT(20,10,0),			PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(1460,10,0), 		PARAM_CONVERT(20,10,0),  	 	PARAM_CONVERT(2000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                      	 	60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1420,10,0), 		PARAM_CONVERT(20,10,0),   		PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//充电总压高(低温)(0.01v)  //故障处理 0禁用 1只报警  2切断继电器 3重启释放
	STATIC_CHECK,   PARAM_CONVERT(1420,10,0), 		PARAM_CONVERT(20,10,0),   		PARAM_CONVERT(2000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1380,10,0), 		PARAM_CONVERT(20,10,0),  	 	PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(1440,10,0), 		PARAM_CONVERT(20,10,0),			PARAM_CONVERT(2000,10,0),	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1400,10,0), 		PARAM_CONVERT(20,10,0),			PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(1460,10,0), 		PARAM_CONVERT(20,10,0),  	 	PARAM_CONVERT(2000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                      	 	60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1420,10,0), 		PARAM_CONVERT(20,10,0),   		PARAM_CONVERT(2000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//充电单体高(mV)  
	STATIC_CHECK,   3550,                    		3200,                 		  	4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
	STATIC_CHECK,   3450,                    		3000,                   	   	4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   3600,                    		3200,          		            4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),         		           	FAULT_TICK_CONVERT(100),                	        60000, 	//故障延时
	STATIC_CHECK,   3500,               	     	3000,                   	    4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                   		FAULT_TICK_CONVERT(100),                    	    60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   3650,     		                3200,         		            4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),           		        FAULT_TICK_CONVERT(100),							60000, 	//故障延时
	STATIC_CHECK,   3550,                   		3000,                   	   	4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                    	   	60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理	
	//充电单体高(低温)(mV)  
	STATIC_CHECK,   3550,                    		3200,                 		  	4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
	STATIC_CHECK,   3450,                    		3000,                   	   	4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   3600,                    		3200,          		            4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),         		           	FAULT_TICK_CONVERT(100),                	        60000, 	//故障延时
	STATIC_CHECK,   3500,               	     	3000,                   	    4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                   		FAULT_TICK_CONVERT(100),                    	    60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   3650,     		                3200,         		            4500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),           		        FAULT_TICK_CONVERT(100),							60000, 	//故障延时
	STATIC_CHECK,   3550,                   		3000,                   	   	4500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                    	   	60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理	
    //充电单体低
    STATIC_CHECK,   2700,      			            1500,                      		3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   2800,                    		1500,                     		3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   2600,                    		1500,                      		3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   2700,                    		1500,                      		3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   2500,                    		1500,                      		3500, 						//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000, 						//故障延时
	STATIC_CHECK,   2600,                    		1500,                      		3500, 						//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),        60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理   
	//充电过流（0.1A）
	STATIC_CHECK,   PARAM_CONVERT(166,10,0),		PARAM_CONVERT(10,10,0),			PARAM_CONVERT(5000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(156,10,0),		PARAM_CONVERT(10,10,0),         PARAM_CONVERT(5000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(185,10,0),		PARAM_CONVERT(10,10,0),         PARAM_CONVERT(5000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(175,10,0),		PARAM_CONVERT(10,10,0),         PARAM_CONVERT(5000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(200,10,0),		PARAM_CONVERT(10,10,0),			PARAM_CONVERT(5000,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(190,10,0),		PARAM_CONVERT(10,10,0),			PARAM_CONVERT(5000,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//充电高温（0.1℃,-50℃）
	STATIC_CHECK,   PARAM_CONVERT(50,10,50),		PARAM_CONVERT(20,10,50),		PARAM_CONVERT(100,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(45,10,50),		PARAM_CONVERT(15,10,50),		PARAM_CONVERT(100,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(55,10,50),		PARAM_CONVERT(20,10,50),		PARAM_CONVERT(100,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(50,10,50),		PARAM_CONVERT(15,10,50),		PARAM_CONVERT(100,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(60,10,50),		PARAM_CONVERT(20,10,50),		PARAM_CONVERT(100,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(55,10,50),		PARAM_CONVERT(15,10,50),		PARAM_CONVERT(100,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//充电低温（0.1℃,-50℃）
	STATIC_CHECK,   PARAM_CONVERT(5,10,50),		    PARAM_CONVERT(-40,10,50),		PARAM_CONVERT(10,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(10,10,50),		PARAM_CONVERT(-35,10,50),		PARAM_CONVERT(30,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(0,10,50),		    PARAM_CONVERT(-40,10,50),		PARAM_CONVERT(10,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(5,10,50),		   PARAM_CONVERT(-35,10,50),		PARAM_CONVERT(30,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(-5,10,50),		PARAM_CONVERT(-40,10,50),		PARAM_CONVERT(10,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),							FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(0,10,50),		    PARAM_CONVERT(-35,10,50),		PARAM_CONVERT(30,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//充电压差（mV）
	STATIC_CHECK,   400,                    		20,                      		1500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   350,                    		20,                      		1500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   600,                    		20,                      		1500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   550,                    		20,                      		1500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   1000,                    		20,                      		1500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   950,                    		20,                      		1500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//充电温差（0.1℃）
	STATIC_CHECK,   PARAM_CONVERT(10,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(5,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(15,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(10,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(20,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(15,10,0),			PARAM_CONVERT(1,10,0),			PARAM_CONVERT(35,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//绝缘(1Ω/V/bit,偏移量0)
	STATIC_CHECK,   500,                    		10,                      		2500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   600,                    		100,                      		2500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   350,                    		10,                      		2500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   450,                    		100,                      		2500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   200,                    		10,                      		2500, 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   300,                    		100,                      		2500, 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),	//降流百分比%+故障处理
	//T1高温
	STATIC_CHECK,   PARAM_CONVERT(60,10,50),		PARAM_CONVERT(10,10,50),		PARAM_CONVERT(100,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(50,10,50),		PARAM_CONVERT(15,10,50),		PARAM_CONVERT(100,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),	 //降流百分比%+故障处理
	//T1低温
	STATIC_CHECK,   PARAM_CONVERT(-5,10,50),		PARAM_CONVERT(-30,10,50),		PARAM_CONVERT(30,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(-2,10,50),		PARAM_CONVERT(-25,10,50),		PARAM_CONVERT(30,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd), //降流百分比%+故障处理
	//电压排线
    STATIC_CHECK,   1,      1,      1,	 
	STATIC_CHECK,   FAULT_TICK_CONVERT(20000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
    STATIC_CHECK,   0,      0,      0,	 
	STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       	60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),						PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),	//降流百分比%+故障处理
	//温度排线
	STATIC_CHECK,   1,      1,      1,	 
    STATIC_CHECK,   FAULT_TICK_CONVERT(20000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
	STATIC_CHECK,   0,      0,      0,
    STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       	60000,	//释放延时	
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//主从通讯
	STATIC_CHECK,   1,      1,      1000,	 
    STATIC_CHECK,   FAULT_TICK_CONVERT(20000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
	STATIC_CHECK,   0,      0,      0,
    STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                       	60000,	//释放延时	
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),	 //降流百分比%+故障处理
	//供电欠压
	STATIC_CHECK,   90,      50,      300,	 
    STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
	STATIC_CHECK,   120,     50,      300,
    STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       	60000,	//释放延时	
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//供电过压
	STATIC_CHECK,   320,      50,      360,	 
    STATIC_CHECK,   FAULT_TICK_CONVERT(5000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
	STATIC_CHECK,   300,     50,      360,
    STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       	60000,	//释放延时	
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmWarn),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//高压异常
	STATIC_CHECK,   	300,		    			0,	        					1000, //高压异常
    STATIC_CHECK,   FAULT_TICK_CONVERT(15000),                    		FAULT_TICK_CONVERT(100),                  	     	60000, 	//故障延时
	STATIC_CHECK,   	100,     				    0,      						1000,
    STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       	60000,	//释放延时	
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	//指令超时
	STATIC_CHECK,   1,      1,      1000, //指令超时告警值
	STATIC_CHECK,   FAULT_TICK_CONVERT(20000),       FAULT_TICK_CONVERT(100),        60000, 						//指令超时告警延时
	STATIC_CHECK,   0,      0,      0,  //指令超时告警释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(5000),       FAULT_TICK_CONVERT(100),        60000, 						//指令超时告警释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmCut),						PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),	//降流百分比%+故障处理
	
	//DI 2 1策略
	STATIC_CHECK,   PARAM_COMBINE(kDiType_Do2Feedback, kDiType_Do1Feedback),	PARAM_COMBINE(kDiType_Start, kDiType_Start),	 PARAM_COMBINE(kDiType_End, kDiType_End),
	//DI 4 3策略
	STATIC_CHECK,   PARAM_COMBINE(kDiType_Unused, kDiType_Unused),	PARAM_COMBINE(kDiType_Start, kDiType_Start),	 PARAM_COMBINE(kDiType_End, kDiType_End),
	//DI 6 5类型
	STATIC_CHECK,   PARAM_COMBINE(kDiType_Unused, kDiType_Unused),	PARAM_COMBINE(kDiType_Start, kDiType_Start),	 PARAM_COMBINE(kDiType_End, kDiType_End),
	//DI 8 7类型
	STATIC_CHECK,   PARAM_COMBINE(kDiType_Unused, kDiType_Unused),	PARAM_COMBINE(kDiType_Start, kDiType_Start),	 PARAM_COMBINE(kDiType_End, kDiType_End),	
	//DI 10 9类型
	STATIC_CHECK,   PARAM_COMBINE(kDiType_Unused, kDiType_Unused),	PARAM_COMBINE(kDiType_Start, kDiType_Start),	 PARAM_COMBINE(kDiType_End, kDiType_End),

	//DI 2 1类型
	STATIC_CHECK,   PARAM_COMBINE(kDiPolarity_Open,kDiPolarity_Open),PARAM_COMBINE(kDiPolarity_Start, kDiPolarity_Start),	 PARAM_COMBINE(kDiPolarity_End, kDiPolarity_End),
	//DI 4 3类型
	STATIC_CHECK,   PARAM_COMBINE(kDiPolarity_Open,kDiPolarity_Open),PARAM_COMBINE(kDiPolarity_Start, kDiPolarity_Start),	 PARAM_COMBINE(kDiPolarity_End, kDiPolarity_End),
	//DI 6 5类型
	STATIC_CHECK,   PARAM_COMBINE(kDiPolarity_Open,kDiPolarity_Open),PARAM_COMBINE(kDiPolarity_Start, kDiPolarity_Start),	 PARAM_COMBINE(kDiPolarity_End, kDiPolarity_End),
	//DI 8 7类型
	STATIC_CHECK,   PARAM_COMBINE(kDiPolarity_Open,kDiPolarity_Open),PARAM_COMBINE(kDiPolarity_Start, kDiPolarity_Start),	 PARAM_COMBINE(kDiPolarity_End, kDiPolarity_End),
	//DI 10 9类型
	STATIC_CHECK,   PARAM_COMBINE(kDiPolarity_Open,kDiPolarity_Open),PARAM_COMBINE(kDiPolarity_Start, kDiPolarity_Start),	 PARAM_COMBINE(kDiPolarity_End, kDiPolarity_End),


	//DI2 1判定延迟 单位s
	STATIC_CHECK,   PARAM_COMBINE(1,1),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff), 
    //DI4 3判定延迟 单位s
	STATIC_CHECK,   PARAM_COMBINE(1,1),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff),
	//DI6 5判定延迟 单位s
	STATIC_CHECK,   PARAM_COMBINE(1,1),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff), 
    //DI8 7判定延迟 单位s
	STATIC_CHECK,   PARAM_COMBINE(1,1),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff),
	//DI10 9判定延迟 单位s
	STATIC_CHECK,   PARAM_COMBINE(1,1),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff), 
 	
	//充放电转换依据+自主上下电
	STATIC_CHECK,	PARAM_COMBINE(kRunStatusBasis_Cur,kRunCtrl_Cmd),PARAM_COMBINE(kRunStatusBasis_Start,kRunCtrl_Start),	 PARAM_COMBINE(kRunStatusBasis_End,kRunCtrl_End),
	
	//充放电模式选择 + 高压控制策略
	STATIC_CHECK,   PARAM_COMBINE(kChgMode_Start, kDoCtrlStrategy_SameCircuit),      			PARAM_COMBINE(kChgMode_Start,kDoCtrlStrategy_Statrt),      	PARAM_COMBINE(kChgMode_End, kDoCtrlStrategy_End), 		

	

	//绝缘采集周期（高）+ 绝缘采集使能(低)
	STATIC_CHECK,   PARAM_COMBINE(10,0),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff),
	
	//充电末端一档降流点
	STATIC_CHECK,   3450,      0,      4800,
	//充电末端二档降流点
	STATIC_CHECK,   3500,      0,      4800,
	//充电末端二档（高）一档（低）降流系数
	STATIC_CHECK,   PARAM_COMBINE(25,50),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(100,100), 
	STATIC_CHECK,	0,	   0,			5000,		//禁充电压阈值  
	STATIC_CHECK,   3200,      2000,            4500,       //禁充释放电压   
    STATIC_CHECK,	0,	   0,			5000,		//禁放电压阈值  
	STATIC_CHECK,   3100,      2000,            3800,       //禁放释放电压  
	
	//70%容量衰减次数
	STATIC_UNCHECK_MAX_MIN,   3000,      0,      65535,
	//70%容量衰减累计容量
	STATIC_UNCHECK_MAX_MIN,   0xD140,      0,      65535,
	STATIC_UNCHECK_MAX_MIN,   0x0C,      0,      65535,
	
	STATIC_CHECK,   PARAM_COMBINE(0,0),      PARAM_COMBINE(0,0),      PARAM_COMBINE(255,255), //待机休眠时间 + 低压休眠时间		

    STATIC_CHECK,   PARAM_CONVERT(10,10,0),                                             0,                      65535,                      //禁放释放延迟
    STATIC_CHECK,   PARAM_CONVERT(10,10,0),                                             0,                      65535,                      //禁充释放延迟
    STATIC_CHECK,   PARAM_COMBINE(PARAM_CONVERT(2,10,0), PARAM_CONVERT(0,10,0)),	    PARAM_COMBINE(0, 0), 	PARAM_COMBINE(255, 255),	//OCV静置电流(0.1A/bit)+OCV静置时间(0.1h/bit)
    STATIC_CHECK,   PARAM_COMBINE(30, 90),	    PARAM_COMBINE(0, 0), 	PARAM_COMBINE(100, 100),	////OCV禁校下限(1%/bit)+上限(1%/bit)
    STATIC_CHECK,   0,                                                               0,                   5000,                       //强充1电压阈值
    STATIC_CHECK,   0,                                                               0,                   5000,                       //强充2电压阈值
    STATIC_CHECK,   PARAM_COMBINE(5,10),                                                PARAM_COMBINE(0,0),     PARAM_COMBINE(255,255),     //强充2_1请求电流
	

	STATIC_CHECK,   PARAM_COMBINE(4,3),			PARAM_COMBINE(0,0),	    	PARAM_COMBINE(11, 11), //DO2_DO1故障检测源
    STATIC_CHECK,   PARAM_COMBINE(0,0),			PARAM_COMBINE(0,0),	    	PARAM_COMBINE(11, 11), //DO4_DO3故障检测源
    STATIC_CHECK,   PARAM_COMBINE(0,0),			PARAM_COMBINE(0,0),	    	PARAM_COMBINE(11, 11), //DO6_DO5故障检测源
    STATIC_CHECK,   PARAM_COMBINE(0,0),			PARAM_COMBINE(0,0),	    	PARAM_COMBINE(11, 11), //DO8_DO7故障检测源

	STATIC_CHECK,   PARAM_COMBINE(0,0),      				PARAM_COMBINE(0,0),      					PARAM_COMBINE(0xff,0xff),  //SOP表索引 + OCV表索引
	//T2高温
	STATIC_CHECK,   PARAM_CONVERT(60,10,50),		PARAM_CONVERT(10,10,50),		PARAM_CONVERT(100,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),     60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(50,10,50),		PARAM_CONVERT(10,10,50),		PARAM_CONVERT(100,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),     60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),	 //降流百分比%+故障处理
	//T2低温
	STATIC_CHECK,   PARAM_CONVERT(-5,10,50),		PARAM_CONVERT(-30,10,50),		PARAM_CONVERT(30,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),     60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(-2,10,50),		PARAM_CONVERT(-25,10,50),		PARAM_CONVERT(40,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),     60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd), //降流百分比%+故障处理


	STATIC_CHECK,   PARAM_CONVERT(100, 10, 0),    PARAM_CONVERT(1, 10, 0),                      PARAM_CONVERT(2000, 10, 0), 	//额定充电功率
	STATIC_CHECK,   PARAM_CONVERT(100, 10, 0),    PARAM_CONVERT(1, 10, 0),                      PARAM_CONVERT(2000, 10, 0), 	//额定放电功率
	STATIC_CHECK,   kACMode_Auto, 				  kACModel_Start,                               kACMode_End,  							//请求设定空调模式 
	STATIC_CHECK,   PARAM_CONVERT(25,10,50),      				PARAM_CONVERT(-50,10,50),      					PARAM_CONVERT(35,10,50), 		//请求设定空调温度

    STATIC_CHECK,   2950,      0,      4000,     //SOC过放校准平均电压
    STATIC_CHECK,   3450,      1000,   4000,     //SOC过充校准平均电压
	STATIC_CHECK,   20,        1,      255, 	 //2级过流(0.1min/bit)切断延时
    //极柱过温故障1级
	STATIC_CHECK,   PARAM_CONVERT(50,10,50),		PARAM_CONVERT(0,10,50),		PARAM_CONVERT(150,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),    60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(45,10,50),		PARAM_CONVERT(0,10,50),		PARAM_CONVERT(150,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),     60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd), //降流百分比%+故障处理    
	//极柱过温故障2级
	STATIC_CHECK,   PARAM_CONVERT(60,10,50),		PARAM_CONVERT(0,10,50),		PARAM_CONVERT(150,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),    60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(55,10,50),		PARAM_CONVERT(0,10,50),		PARAM_CONVERT(150,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),     60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd), //降流百分比%+故障处理     
	//极柱过温故障3级
	STATIC_CHECK,   PARAM_CONVERT(70,10,50),		PARAM_CONVERT(0,10,50),		PARAM_CONVERT(150,10,50), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),    60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(65,10,50),		PARAM_CONVERT(0,10,50),		PARAM_CONVERT(150,10,50), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),     60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd), //降流百分比%+故障处理     
	//温升故障1级
	STATIC_CHECK,   PARAM_CONVERT(1,10,0),		    PARAM_CONVERT(0,10,0),		PARAM_CONVERT(150,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),    60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(0,10,0),		    PARAM_CONVERT(0,10,0),		PARAM_CONVERT(150,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),     60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd), //降流百分比%+故障处理  
 	//温升故障2级
	STATIC_CHECK,   PARAM_CONVERT(2,10,0),		    PARAM_CONVERT(0,10,0),		PARAM_CONVERT(150,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),    60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(1,10,0),		    PARAM_CONVERT(0,10,0),		PARAM_CONVERT(150,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),     60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd), //降流百分比%+故障处理  
	//温升故障3级
	STATIC_CHECK,   PARAM_CONVERT(3,10,0),		    PARAM_CONVERT(0,10,0),		PARAM_CONVERT(150,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),    60000, 	//故障延时
	STATIC_CHECK,   PARAM_CONVERT(2,10,0),		    PARAM_CONVERT(0,10,0),		PARAM_CONVERT(150,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),       FAULT_TICK_CONVERT(100),     60000,	//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd), //降流百分比%+故障处理      
 	//电池箱过压  
	STATIC_CHECK,   PARAM_CONVERT(177.5,10,0), 		PARAM_CONVERT(16,10,0),   		PARAM_CONVERT(240,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(172.5,10,0), 		PARAM_CONVERT(16,10,0),  	 	PARAM_CONVERT(240,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(180,10,0), 		PARAM_CONVERT(16,10,0),			PARAM_CONVERT(240,10,0),	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(175,10,0), 		PARAM_CONVERT(16,10,0),			PARAM_CONVERT(240,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(182.5,10,0), 		PARAM_CONVERT(16,10,0),  	 	PARAM_CONVERT(240,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                      	 	60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(177.5,10,0), 		PARAM_CONVERT(16,10,0),   		PARAM_CONVERT(240,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
    //电池箱欠压
	STATIC_CHECK,   PARAM_CONVERT(142.5,10,0), 		PARAM_CONVERT(16,10,0),   		PARAM_CONVERT(230,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(147.5,10,0), 		PARAM_CONVERT(16,10,0),  	 	PARAM_CONVERT(230,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(100, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(140,10,0), 		PARAM_CONVERT(16,10,0),			PARAM_CONVERT(230,10,0),	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(145,10,0), 		PARAM_CONVERT(16,10,0),			PARAM_CONVERT(230,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),							60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理
	STATIC_CHECK,   PARAM_CONVERT(137.5,10,0), 		PARAM_CONVERT(16,10,0),  	 	PARAM_CONVERT(230,10,0), 	//故障值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                      	 	60000, 						//故障延时
	STATIC_CHECK,   PARAM_CONVERT(142.5,10,0), 		PARAM_CONVERT(16,10,0),   		PARAM_CONVERT(230,10,0), 	//释放值
	STATIC_CHECK,   FAULT_TICK_CONVERT(3000),                    		FAULT_TICK_CONVERT(100),                       		60000,						//释放延时
	STATIC_CHECK,   PARAM_COMBINE(0, kAlarmBan),	PARAM_COMBINE(0, kAlarmStart),	PARAM_COMBINE(100, kAlarmEnd),//降流百分比%+故障处理     
    //故障次数1
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //故障次数11
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //故障次数21	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //故障次数31
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //故障次数41	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //故障次数51
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //故障次数61	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
    //预留0
	STATIC_UNCHECK_MAX_MIN,   15000,      				0x0000,      					0xFFFF, 		//满充校准总压
    STATIC_UNCHECK_MAX_MIN,   5000,      				0x0000,      					0xFFFF, 		//满放校准总压
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//开关使能
    STATIC_CHECK,           PARAM_COMBINE(0, 1),	    PARAM_COMBINE(0, 1),	        PARAM_COMBINE(1, 0xFF), 		//环境温度检测通道 + 环境温度温感类型	
	STATIC_CHECK,           PARAM_COMBINE(0,20),      	PARAM_COMBINE(0,0),      		PARAM_COMBINE(0xFF,0xFF), 		//分闸断开延时 + Bcu分励断开延时  0.1s
    STATIC_CHECK,           PARAM_COMBINE(0,10),         PARAM_COMBINE(0,0),             PARAM_COMBINE(255,0xFF),        //预留 + 安全链断开延时 0.1s
	STATIC_CHECK,           PARAM_CONVERT(50,10,50),	PARAM_CONVERT(0,10,50),		    PARAM_CONVERT(100,10,50),       //风扇全速温度
    STATIC_CHECK,             10,      				    0x0000,      					0xFFFF, 		//断开继电器电流阈值	 
	STATIC_CHECK,           PARAM_COMBINE(100, 0),      PARAM_COMBINE(0, 0),      		PARAM_COMBINE(100, 100), 		//SOC运行上限 + SOC运行下限
    STATIC_CHECK,             0x0000,      				0x0000,      					0xFFFF, 		//从机采集顺序
    //预留11
	STATIC_CHECK,            PARAM_COMBINE(0, 0),	    PARAM_COMBINE(0, 0),	        PARAM_COMBINE(1, 1), 		//是否存在MSD + MSD极性
    STATIC_CHECK,   		 PARAM_COMBINE(1, 18),	    PARAM_COMBINE(0, 0),            PARAM_COMBINE(4, 32),	    //BMU的Afe数量 + 当前类型AFE支持的最大串数
	STATIC_CHECK,   		 PARAM_COMBINE(0, 9),	    PARAM_COMBINE(0, 0),            PARAM_COMBINE(255, 9),	    //预留 + 当前类型AFE支持的最大NTC串数
	STATIC_CHECK,   		 3200,      				0x0000,      					0xFFFF, 		//均衡开启电压（mv）	      		
    STATIC_CHECK,  			 3000,      				0x0000,      					0xFFFF, 		//均衡关闭电压（mv）	
	STATIC_CHECK,   		 PARAM_COMBINE(20,10),     PARAM_COMBINE(0,0),      		PARAM_COMBINE(0xFF,0xFF), 	//均衡开启压差（mv）+ 均衡关闭压差（mv）
    STATIC_CHECK,   		0,      				    0x0000,      					0xFFFF, 		//均衡路数
	STATIC_CHECK,   		50,      				    0x0000,      					0xFFFF, 		//均衡时间-ms
    STATIC_CHECK,   		PARAM_COMBINE(kDoType_Unused,kDoType_Unused),	PARAM_COMBINE(kDoType_Start,kDoType_Start),	 PARAM_COMBINE(kDoType_End,kDoType_End),//继电器10_9类型	
	STATIC_CHECK,   		PARAM_COMBINE(0,0),			PARAM_COMBINE(0,0),	    	PARAM_COMBINE(11, 11), //DO8_DO7故障检测源		//DO10_DO9故障检测源
    
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC1电压采集有效位置1~16
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC1电压采集有效位置17~32
    STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC2电压采集有效位置1~16
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC2电压采集有效位置17~32
    STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC3电压采集有效位置1~16
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC3电压采集有效位置17~32
    STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC4电压采集有效位置1~16
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC4电压采集有效位置17~32
    STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC1温度采集有效位置1~16
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC1温度采集有效位置17~32
    STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC2温度采集有效位置1~16	
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC2温度采集有效位置17~32
    STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC3温度采集有效位置1~16
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC3温度采集有效位置17~32
    STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC4温度采集有效位置1~16
	STATIC_UNCHECK_MAX_MIN,   0xFFFF,      				0x0000,      					0xFFFF, 		//IC4温度采集有效位置17~32
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //预留41
	STATIC_UNCHECK_MAX_MIN,   PARAM_COMBINE(168, 192),	    PARAM_COMBINE(0, 0),                        PARAM_COMBINE(255, 255),		//网口1IP地址2_1
	STATIC_UNCHECK_MAX_MIN,   PARAM_COMBINE(0, 100),	    PARAM_COMBINE(0, 0),                        PARAM_COMBINE(255, 255),		//网口1IP地址4_3
	STATIC_UNCHECK_MAX_MIN,   PARAM_COMBINE(255, 255),	    PARAM_COMBINE(0, 0),                        PARAM_COMBINE(255, 255),		//网口1子网掩码2_1
	STATIC_UNCHECK_MAX_MIN,   PARAM_COMBINE(0, 255),	    PARAM_COMBINE(0, 0),                        PARAM_COMBINE(255, 255),		//网口1子网掩码4_3
	STATIC_UNCHECK_MAX_MIN,   PARAM_COMBINE(168, 192),	    PARAM_COMBINE(0, 0),                        PARAM_COMBINE(255, 255),		//网口1网关地址2_1
	STATIC_UNCHECK_MAX_MIN,   PARAM_COMBINE(1, 2),	        PARAM_COMBINE(0, 0),                        PARAM_COMBINE(255, 255),		//网口1网关地址4_3
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    
    //Gate0
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //Gate11
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //Gate21
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //Gate31	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //Gate41
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留1
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留2
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留3
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留4	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留5
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留6
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留7
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留8	
	STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留9
    STATIC_UNCHECK_MAX_MIN,   0x0000,      				0x0000,      					0xFFFF, 		//预留10
    //eeeprom
    //soc
	DAYNMIC_CHECK,             0,         	   0,         	   1,		//电池循环次数更新标志
	DAYNMIC_CHECK,             0,         	   0x0000,         0xFFFF,	//电池循环次数
	DAYNMIC_CHECK,             5000,           0,         	   10000,	//SOC
	DAYNMIC_CHECK,             5000,           0,         	   10000,	//SOE
	
    DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	//日充放电累计时间
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,  
    DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF, //累计放电时间
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
    DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
    DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,	//下电时间
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	//reserved1-10
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_CHECK,                     1000,           0x0000,         0xFFFF, //目标电流
	DAYNMIC_CHECK,                     1000,           0x0000,         0xFFFF, //目标电流
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,
	DAYNMIC_UNCHECK_MAX_MIN,           0x0000,         0x0000,         0xFFFF,

	NONE_CHECK,   PARAM_COMBINE(2,2),		PARAM_COMBINE(0,0),	 PARAM_COMBINE(2,2), //继电器强控
	NONE_CHECK,   PARAM_COMBINE(2,2),		PARAM_COMBINE(0,0),	 PARAM_COMBINE(2,2),
	NONE_CHECK,   PARAM_COMBINE(2,2),		PARAM_COMBINE(0,0),	 PARAM_COMBINE(2,2),
	NONE_CHECK,   PARAM_COMBINE(2,2),		PARAM_COMBINE(0,0),	 PARAM_COMBINE(2,2),
	NONE_CHECK,   PARAM_COMBINE(2,2),		PARAM_COMBINE(0,0),	 PARAM_COMBINE(2,2),
};

STATIC_FLASH_INIT(eeprom_flash, 1, 4);
EEPROM_STATIC_INIT_CCM(eeprom_item, data_format, kEEDataIdx_End, &eeprom_flash);

/*********************************************************************************************
1.F4xx系列单片机页分布：16K 16K 16K 16K 64K 128K  128K  128K  128K  128K  128K
2.对于F4xx系列单片机，由于单个page较大，故将主区与校验区放在一个page中
      +-------+-------+-------+-------+-------+-------+-------+-------+-------+
      |       |       |       |       |       |       |       |       |       |
      | 备份区| S主区 |校验区 | S副区 |  校验 | D主区 | D副区 |       |       |
      |（无） |       |       |       |  副区 |       |       |       |       |
      |       |       |       |       |       |       |       |       |       |
               0x4000  0x6000  0x8000  0xA000  0xC000  0x10000 
              |    P1(16K)    |   P2(16K)     |P3(16K)|P4(64K)|
      +-------+-------+-------+-------+-------+-------+-------+-------+-------+

**********************************************************************************************/

void bms_init_eeprom(void)
{  
    if(bsp_eeprom_init(&eeprom_item, 0, 1, 1, APP_CFG_EEPROM_START_ADDR) == false)
    {
        bms_set_fault_level(kFaultCode_Eeprom, kFaultLevel_Third, kFaultHandle_CutNoRelIdx);
    }
}

void bms_pwr_off_save(void)
{
    uint32_t i, cnt = 0, tmp_32u;
    EepromPoData data[15];
//    tmp_32u = bms_get_cycle_flag() | (bms_get_stat_day() << 8);
//    data[cnt++].value = (kEep_StatDay_CycleTimesFlag << 16) | ((uint16_t)tmp_32u);
    data[cnt++].value = (kEep_SOC << 16) | ((uint16_t)bms_get_soc());
//    data[cnt++].value = (kEep_SOE << 16) | ((uint16_t)bms_get_soc());
//    data[cnt++].value = (kEep_CycleTimes << 16) | ((uint16_t)bms_get_cycle());
//    tmp_32u = drv_rtc_get_tick();
//    data[cnt++].value = (kEep_PowerOffTimeL << 16) | ((uint16_t)tmp_32u);
//    data[cnt++].value = (kEep_PowerOffTimeH << 16) | ((uint16_t)(tmp_32u >> 16));
//    
	tmp_32u = bms_get_cycle_flag() | (bms_get_stat_day() << 8);
    data[cnt++].value = (kEep_StatDay_CycleTimesFlag << 16) | ((uint16_t)tmp_32u);
     tmp_32u = bms_get_cumulate_data(kCumulateData_DayDisTime);
    tmp_32u |= bms_get_cumulate_data(kCumulateData_DayChgTime) << 8;
	data[cnt++].value = (kEep_DayChg_DisTime << 16) | ((uint16_t)tmp_32u);
    for(i = 0; i < 10; i++)
    {
        tmp_32u = bms_get_cumulate_data((CumulateData)(kCumulateData_DayDisCap + i));
        data[cnt++].value = ((kEep_DayDisCapL + (i << 1)) << 16) | (uint16_t)tmp_32u;
        data[cnt++].value = ((kEep_DayDisCapH + (i << 1)) << 16) | (uint16_t)(tmp_32u >> 16);
    }
//    data[cnt++].value = (kEep_IsSoftReset << 16) | 0;
    bsp_eeprom_power_off_save_data(data, cnt);
}


void bms_soft_reset_save(SoftReset type, uint8_t *buf, uint16_t len)
{
    uint32_t i, cnt = 0, tmp_32u;
    EepromPoData data[30];
    tmp_32u = bms_get_cycle_flag() | (bms_get_stat_day() << 8);
    data[cnt++].value = (kEep_StatDay_CycleTimesFlag << 16) | ((uint16_t)tmp_32u);
    data[cnt++].value = (kEep_SOC << 16) | ((uint16_t)bms_get_soc());
    data[cnt++].value = (kEep_SOE << 16) | ((uint16_t)bms_get_soc());
    data[cnt++].value = (kEep_CycleTimes << 16) | ((uint16_t)bms_get_cycle());
    tmp_32u = drv_rtc_get_tick();
    data[cnt++].value = (kEep_PowerOffTimeL << 16) | ((uint16_t)tmp_32u);
    data[cnt++].value = (kEep_PowerOffTimeH << 16) | ((uint16_t)(tmp_32u >> 16));
    
    tmp_32u = bms_get_cumulate_data(kCumulateData_DayDisTime);
    tmp_32u |= bms_get_cumulate_data(kCumulateData_DayChgTime) << 8;
	data[cnt++].value = (kEep_DayChg_DisTime << 16) | ((uint16_t)tmp_32u);
    for(i = 0; i < 10; i++)
    {
        tmp_32u = bms_get_cumulate_data((CumulateData)(kCumulateData_DayDisCap + i));
        data[cnt++].value = ((kEep_DayDisCapL + (i << 1)) << 16) | (uint16_t)tmp_32u;
        data[cnt++].value = ((kEep_DayDisCapH + (i << 1)) << 16) | (uint16_t)(tmp_32u >> 16);
    }
    
    data[cnt++].value = (kEep_IsSoftReset << 16) | type | (bms_get_circuit_status(kCircuitType_Main) == kCircuitStatus_On) << 8;
    bsp_eeprom_power_off_save_data(data, cnt);
    
    if((type == kSoftReset_HardFault) && (buf != NULL) && (ARM_WRITE_INT32U(0x08063000) == 0xFFFFFFFF))
    {
        drv_bsp_flash_write_data_u32(0x08063000, buf, len);
    }
}

