Skip to main content
Firmware Stable

Charge port (CHG)

The charge port is the secondary BMS port connected to the charger. The CHG port is opened by the state machine when a charger is detected and charging conditions are met.

info

All mentioned variables are located in folder /driver/chg/.

Readings

StateUnitDescription
ichgfAFiltered current through CHG port
uchgfVFiltered voltage at the CHG port

Protection parameters

ParameterUnitDescription
ichgshrtACharge short circuit current threshold - current from the battery through the CHG port (0 to disable). When exceeded, the ports are turned off and the BMS enters PROTECT with reason 0x0004 (Shortcut on CHG). (BMS1 only)
ichgshrtpACharge short circuit current to the battery (0 to disable). When exceeded, the ports are turned off and the BMS enters PROTECT with reason 0x0008 (Shortcut on CHG to battery). (BMS1 only)

Every short circuit event increments the shortcut_counter permanent. When the counter exceeds the max_shortcuts parameter, the BMS enters the permanent ERROR state.

Charge blocking

The BMS can block charging under certain conditions. The reason for blocking is indicated by the bitwise state chg_blocked (located in /driver/chg/).

chg_blocked valueReasonCondition
0NoneCharging is allowed
1Time hysteresisA previous charge block was cleared less than chg_reconnect_time ago - the BMS waits before reconnecting the charger
2OvervoltageThe BMS is in the OVERVOLTAGE state - a cell voltage is above cellMaxVoltage. See cell voltage limitation.
4OvercurrentThe CHG port current exceeded the configured charge current limit

Any active block reason (re)arms the reconnect timer - charging stays blocked at least chg_reconnect_time after the cause disappears.

note

Charging is also blocked when the battery temperature is outside the minChg/maxChg charging limits - the BMS then enters the CHG_OVERTEMP state. See charging temperature limits.

Charge block configuration

info

Configuration parameters are located in folder /driver/chg/chg_block/.

ParameterUnitDescription
chg_reconnect_timesTime to wait after charge block cleared before re-enabling charging

CHG port current limiter

The CHG port has its own current limiter that limits the maximum current through the charge port independently of the pack current limiter. When active, it sets bit 512 in the limit word. (BMS1 only)

info

Limiter parameters are located in folder /driver/chg/limiter/.

ParameterUnitDescription
ichgPosACHG port maximum output current
ichgPosDecdelta ACHG port output current limit slope (0 to disable)
ichgNegDecdelta ACHG port input current limit slope (0 to disable)
ichgNegACHG port maximum input current