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.

TPS65982: ADC formula in the Firmware UG doesn't match Host Interface Utility

Part Number: TPS65982

If I use the host interface utility to read the temperature of the ADC I get a number such as 0.318750V. It is labeled as a 'Raw Value'. After looking at the formula in Section 13.1 of the Firmware UsersGuide I have determined that this RawValue is the ADC code * 1.2 / 1024, not 1023 as the formula says.  I.E., using the number above, with 1024 you get an ADC value of 272; with 1023 the result is 271.7 for the ADC code, clearly incorrect. Using 1023 in the formula doesn't make a lot of difference with the temperature reading, 31.04deg vs 30.94deg with 1024, especially considering that the accuracy is 8 deg C, but 1024 should be used in the formulas for the ADC readings for the current and voltages. Yes, it is only a ~0.1% error but I noticed this when I was trying to figure out what the real ADC value was by working backwards with the formula.

  • Hey Warren,

    Thank you for informing us of this. I will look into it and let you know once we have an update.

    Thank you,
    Eric
  • Hi Eric;  Has there been an update on this value?

  • Hey Warren, David,

    The tool uses the incorrect divider value of 1024, the correct divider value is in the firmware users guide and it should be 1023. We will update this value in the tool and it will be released with the next revision of the tool.

    Thank you,
    Eric
  • Ok, that makes sense. I'm assuming then that the VBUS value is also using 25*(ADCval *1.2)/1023.
    I did notice something interesting. If I don't have any voltage on VBUS and look at I2C traffic or read register 9 after the HI tool does an ADC read of VBUS I always see a 00 01. This translates to the 'error value' of 0.029297 instead of using 1023 which gives 0.029326.
    However, I never see a 00 00 with the VBUS ADC channel. I looked at some others and the currents can read as 00 00, and the GPIO channels can read as 00 00. In looking at the TPS65982 datasheet, Table6, it seems like the voltage readings that don't ever give 00 00 are the ones that have 'BUFFERED' = No. This is just an interesting thing I noticed because I could never get a VBUS reading of 0.000V from the HI tool. Maybe 'BUFFERED' adds an offset of 1. Anyway, thanks for letting me know what was going on. I will use the 1023 in the formulas.