|
@@ -18,6 +18,8 @@
|
|
|
#define ALLOW_POWER_DOWN 1 //disable power down for debug
|
|
#define ALLOW_POWER_DOWN 1 //disable power down for debug
|
|
|
#define ALLOW_5238_BALANCE 1
|
|
#define ALLOW_5238_BALANCE 1
|
|
|
#define IGNORE_DISCHARGER_LOW_VOL 0 //ºöÂԷŵçǷѹ
|
|
#define IGNORE_DISCHARGER_LOW_VOL 0 //ºöÂԷŵçǷѹ
|
|
|
|
|
+extern uint32_t bsp_get_rst_reson(void);
|
|
|
|
|
+
|
|
|
static void _current_notify(void);
|
|
static void _current_notify(void);
|
|
|
static void _voltage_notify(void);
|
|
static void _voltage_notify(void);
|
|
|
static void _temperature_notify(void);
|
|
static void _temperature_notify(void);
|
|
@@ -103,6 +105,7 @@ void bms_state_log(void){
|
|
|
state_debug("ml5238 cali: %d\n", ml5238_cali_count);
|
|
state_debug("ml5238 cali: %d\n", ml5238_cali_count);
|
|
|
state_debug("ps charger mask:in %d, %d\n", _bms_state.ps_charger_mask, _bms_state.ps_charger_in);
|
|
state_debug("ps charger mask:in %d, %d\n", _bms_state.ps_charger_mask, _bms_state.ps_charger_in);
|
|
|
state_debug("open dfet %d - %d - %d - %d\n", open_dfet, open_dfet_failt, close_dfet_reson, close_dfet_no_hall);
|
|
state_debug("open dfet %d - %d - %d - %d\n", open_dfet, open_dfet_failt, close_dfet_reson, close_dfet_no_hall);
|
|
|
|
|
+ state_debug("Reset Reson 0x%x\n", bsp_get_rst_reson());
|
|
|
#if 0
|
|
#if 0
|
|
|
state_debug("Charging: %d\n", _bms_state.charging);
|
|
state_debug("Charging: %d\n", _bms_state.charging);
|
|
|
state_debug("WorkMode %d\n", _bms_state.work_mode);
|
|
state_debug("WorkMode %d\n", _bms_state.work_mode);
|