SetZero / ARMband

STM32MP1 based smartwatch
MIT License
0 stars 0 forks source link

Rsens for Li-Ion charger #2

Open Ihysol opened 1 year ago

Ihysol commented 1 year ago

Li-Ion charger has an inbuilt couloumb counter to subtract power from the digital representation of the battery inside the ic. Rsens is used to measure the flowing currents and subtract the amount accordingly.

The Rsens value MUST also be set in the IC register REG_CC_CNF by following formula:

CC_CNF = (Rsens * Cnom_bat)/49.556

with Rsens in mOhm and Cnom_bat in mAh.

Default value is 395 after POR.

This means IC config must be done once the system is running, or must be equal to the default value. It is also highly dependant on the used Rsens and Cnom_bat values.