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.

Getting battery charging current from TPS6507x internal ADC

Other Parts Discussed in Thread: TPS65070

Greetings,

I`m using TPS65070 for a long time and now i want to get a battery charging current from it`s internal ADC. I have a stable routine to get a voltage from SYS pin, the data i have is correct. But when i try to get a current at BAT pin during battery charging it isn`t even close. For example my battery is charging by 130 mA and TPS65070 ADC give fully broken data - from 550 mA to 2200 mA. My routine to get current is:

1) write D5 to <ADCONFIG>;

2) wait until bit 5 of <ADCONFIG> isn`t 1 (till the conversion ends);

3) read <ADRESULT1> then <ADRESULT2> registers, make a full 10 bit data.

4) multiply data with 2250 (scale from <ADCONFIG> table), then divide result on 1024 - for 10 bit`s ADC.

What am i doing wrong?

Best regards,

Vsevolod