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.

ADC1 value is incorrect on AM437x!



Hi All,

I work on am437x and use Linux 3.12 that from SDK 7.0, there is not adc1 driver.

Referred to tsc_adc driver, I am writing adc1 driver these days. but I am in a trouble now: the value that I read from ADC1_FIFO1DATA is incorrect!

In our design, the reference voltage input of ADC1 is 1.8V. Here are my steps in driver:

1) Configure STEPCONFIG and STEPDELAY registers

2) Enable ADC1 by setting ADC1_CTRL register

3) Enable step by setting ADC1_STEPEN register (start convert)

4) Wait for FIFO threshold interrupt by reading ADC1_IRQSTS_RAW register and check the FIFO1_THR bit

5) Read adc data from the ADCDATA field of ADC1_FIFO1DATA register

6) Clear the event by setting ADC1_IRQSTS.


The adc data is incorrect. for example, even I connect the ADC1_AIN0 terminal to the ground, the adc data should be 0 but I get the 166. And I put 1.8V to this terminal, the adc data should be 4096 but I get the 1836.

It is very strange. Can anyone help this?

Thanks!

Jakebo