This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ76952: Interpreting Accumulated charge data from DASTATUS6()

Part Number: BQ76952

Hi,

We are trying to use the accumulated charge data in DASTATUS6() registers and are having trouble decoding the data in userAh. (Specifically with 4 bytes being Integer and 4 bytes being fraction.)

Is there any sample code that shows how to interpret the data bytes 0-7 read from transfer buffer in to the accumulated value.

When I reset with the RESET_PASSQ command, the data from buffer looks like this - "0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x7F". Is this the right data and how does this correspond to the 0.5userAh reset value that is expected on the 4 byte fraction data. Attached image for reference.

Look forward to your assistance.


Best
Amith

  • Hi Amith,

    For the integer portion (bytes 0-3) the data can be a positive or negative number and the bytes are LSB to MSB. In your example above the integer portion is initially zero and the final reading has a value of 1 userAh. 

    The fractional portion is always a positive number between zero and 2^32 (value between zero and one). So a value of 0x7FFFFFFF is ~2^31 and represents 0.5.

    Hope this helps,

    Best regards,

    Matt