Tool/software:
Hello everyone,
I am new to this forum, so please excuse me if the formatting and writing do not follow all the rules.
I am working with an ESP32 (MCU) to read and write the BQ76952 via I2C.
I am trying to read the current measured through a 0.2 mOhm shunt.
UserA = 1mA
CC Gain = 37.842 (7.5684 / (Rsense in mΩ))
CC Capacity = 11,286,816.14007876
REG18 = 29222
To do this, I am using a very simple library https://github.com/fotherja/BQ76952/blob/main/src/BQ76952.cpp :
I am able to read the 32-bit CC2 value using the subcommand 0x0075 DASTATUS5(). If I am not mistaken, the Offset and CC_Gain do not apply to this value.
However, I am unable to read the “Current()” command 0x3A (16 bits). It returns “-32767”.
Do you have any idea where this might be coming from? Are there other registers that need to be configured to enable the 16-bit current measurement 0x3A?
Translated with DeepL.com (free version)