Quantcast
Channel: Power management forum - Recent Threads
Viewing all articles
Browse latest Browse all 35901

BQ25883: /BQ25882 How to read ADC values

$
0
0

Part Number: BQ25883

Hi,

I'm using the bq2588x linux driver, but I'm havin difficulties understanding the ADC voltage and current readings coming out of the bq2588x_update_status function. If I understand correctly, these functions should report in mV and mA quantities, but I'm getting values in the KV and KA range that do not match at all with the testing conditions. I have already spotted a programming mistake where all values coming out of the chip are multiplied by 256 because the LSB multiplication factor should be 1, not 256 as defined in the header. LSB of the low byte of an ADc register is always is 1mV or 1mA, not 256mV/mA as defined in datasheet. But then still I'm getting values I cannot match with what I'm seeing on the bench. The datasheet mentions I can set the precision of the ADC between 12 and 15 bits. Does that mean the mV/mA of the LSB changes accordingly? i.e with 15 bits precision LSB is 1/8mV while with 12 bits precision LSB is 1mV? This is not mentioned in the ADC register descriptions.

Datasheet does also mention that ADC values are in signed 2-s complement words, while the driver all converts them to u16. Could that also be causing wrong readings?

 


Viewing all articles
Browse latest Browse all 35901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>