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.

MSPM0G1519: Changing ADC Resolution - First Conversion Wrong

Part Number: MSPM0G1519


Tool/software:

Hello.

I have the ADC (both, doing simultaneous sampling) set to 10 bits, averaging (4),unsigned. External trigger via GPIO event. No FIFO. No DMA. External reference.

This works well.

I then change it to 8 bits, no averaging.

The first conversion after this change is *often* but not always wrong.

With a constant input, see snip, the analogue input is *always* at approx. 230 +-2 LSBs.

Same with other ADC.

Probing the analogue signal on a 'scope, it is always consistent with an ADC 230 value - a 70 LSB step is huge, approx. 90 mV - so I would easily see this.

ADC read looks like:

*ptr8_buffer0++ = (unsigned char) ((DL_ADC12_getMemResult(ADC12_0_INST, DL_ADC12_MEM_IDX_0) ));
*ptr8_buffer1++ = (unsigned char) ((DL_ADC12_getMemResult(ADC12_1_INST, DL_ADC12_MEM_IDX_0) ));

Above is copied to a temp. buffer for debug.

Thanks.