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: BQ76952 STM32 Current read

Part Number: BQ76952

Dear TI team,

I am trying to read the current from bq76952 to stm32 microcontroller , as per your given reference code  we able to read the positive current by following function:-

float BQ769x2_ReadCurrent() // Reads PACK current

{

DirectCommands(CC2Current, 0x00, R);

return (RX_data[1]*256 + RX_data[0]); // current is reported in mA

}

and after some testing I found that,

during discharging(negative current) -> 65535 to 0 , we get counts and substrate that by the 65535 then we get the -ve current

during charging(positive current) -> 0 to 65535 , similarly we get counts , substrate that by the 65535 then we get +ve current

I have try all possible try from my side but not get the solution for the same please help me to overcome this porblem

thank and Regards

  • Hi Arjun,

    In the example code RX_data is an unsigned char type, so you may need to add some additional conversions to get the data into a float type. The example code for this function also returns as an unsigned short, not a float.

    See below, taken from Section 4.3 of the TRM. This may give you some additional insight on how the data is reported.

    Regards,

    Max Verboncoeur