Skip to main content
Firmware Stable

Diagnostic

info
  • Only BMS1 have RTC clock. Use sync_time.cmd command to synchronize the time between PC and BMS. (Avaliable in cmd folder in the SWTools)
  • You can set the time also for BMS3, but the internal oscilator is not as precise as the RTC clock and the time will drift.

To print debug information, you can use the wtf command in the term. The command will print the debug information in the terminal, this is example output:

BMS#>wtf

== BMS info ==
Error: 0
State: STBY

== Baterry info ==
Voltage: 50.26 [V]
Current: -0.02 [A]

Cell min voltage: 3614 [mV]
Cell max voltage: 3625 [mV]
Cell diff voltage: 11 [mV]

Temperature batt: 22.5 [C]
Temperature BMS: 28.5 [C]

= Best state =
SOC: 31 [%]

= Balancer state =
NONE

= Switch state =
Ports: 0

= Limiter state =
Cell voltage MIN

= Wake source log =
1 - CAN
1 - CAN
4096 - BTN

= Protect/uv/ov source log =
2 - Shortcut
2 - Shortcut
2 - Shortcut

= Fail/error source log =
0 - NONE
0 - NONE
0 - NONE

= MCU reset reason =
SWrst

tip

If you call wtf 6, you will print the debug information for 6 logs in the past. There are 20 logs stored in the BMS.

Understanding the wtf output

SectionMeaning
BMS infoCurrent error code (hw_error, see hardware status) and current state (short printed name)
Battery infoPack voltage/current and min/max cell voltages, battery and BMS temperatures
Best stateState of charge estimation
Balancer stateDecoded balState - see balancing states
Switch stateState of the ports (bit 1: DSC on, bit 2: CHG on)
Limiter stateDecoded limit word - what is currently limiting the current, see limitation
Wake source logDecoded wakeSources history - see sleep and wake
Protect/uv/ov source logDecoded protectLog permanent - why the BMS entered the PROTECT/UV/OV state, see PROTECT state
Fail/error source logDecoded errorLog permanent - why the BMS entered the FAIL/ERROR state, see FAIL/ERROR state
MCU reset reasonDecoded RCC_CSR state - why the MCU was last reset (SWrst: software reset, POR/PDR: power-on reset, IWDG/WWDG: watchdog, NRST: reset pin, Low-power)

BMS Log Messages

This is description of the log messages. The messages are printed in the terminal when they happen. You can also see the log messages by

|2022-02-16 12:03:47 IDLE Shortcut| [err| drv: 0, bal: 0] [44% 51.8600V 0.0A, min: 3723mV 21C, max: 3742mV 21C]

The log line contains the following fields:

FieldExampleMeaning
Timestamp2022-02-16 12:03:47Time of the event (see the RTC note above)
StateIDLEState of the BMS at the moment of the event (short name)
EventShortcutWhat happened - a decoded protect/error reason or a named event
drvdrv: 0Driver error code at the time of the event
balbal: 0Balancer error code at the time of the event
SOC, voltage, current44% 51.8600V 0.0AState of charge, pack voltage and pack current
min / maxmin: 3723mV 21CLowest/highest cell voltage and battery temperature at the time of the event