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.

CC2538 ADC read saturated values when changing reference

Other Parts Discussed in Thread: CC2538

Hi TI ,

We are using the CC2538 ADC and there seems to be an issue when changing the reference and performing a new sampling.

After start-up, we use the following sequence to probe the pin A.7. (Using driverlib library for ADC)

#include "adc.h"

SOCADCSingleConfigure(SOCADC_12_BIT, SOCADC_REF_AVDD5);

SOCADCSingleStart(SOCADC_AIN7);

while (!SOCADCEndOfCOnversionGet()) {}

value = SOCADCDataGet() >> SOCADC_12_BIT_RSHIFT;

When it is the first time that the ADC is read, the value return is systematically 2047 (saturated).

However, if this sequence is performed twice (while debugging and breaking between each sequence, but not while sampling), then the outcome is what we expect, which is good.

BUT, if I'm not breaking in between the sequences, the value read is still too high and does not stabilize to the actual value...

Also, even if it is not the first value read, but if the voltage reference is changed (let say from AVDD to internal ref), then the same behavior happens and an invalid value is returned.

Is there a special consideration regarding the ADC that we need to take into account before performing a sampling sequence?

Thanks a lot,

Sim