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.

ADC continuous mode sampling

Other Parts Discussed in Thread: TMS320F28035

In piccolo (tms320f28035), if I configure the adc for continuous conversion and keep picking up the sample from the soc's AdcRegs.ADCRSULT register without checking or caring tor the busy flags, in background of the application, will I always get the "VALID LAST CONVERTED" adc sample every time and all the time?

Am I correct in my assumptions:

1. AdcRegs.ADCRSULT register remains in tact with the last converted sample and is not used as scratchpad by hardware while ad converter is busy converting to get the next update.

2. Even if there is a clash between the result update by the hardware and register read by the application, it will do no damage to the data read by application, as the operation is atomic (it is only a word length read operation) .

To be precise, my question is about the data integrity of the AdcRegs.ADCRSULT register compared to the actual (last or present) converted ad value, in this mode.

I hope to get a definitive answer.

 

Thanks in advance.

 

Sayee

 

  • Sayee,

    You are correct, data integrity is maintained in the result registers regardless of update time from ADC module.  The only risk is that you would get the last converted value in this case vs the most recent if you were hitting on a cycle too early.

    Best,

    Matthew

  • Matthew,

    Thanks for the confirmation.

    As an extension of the thought, is there a way to temporarily suspend the adc engine (to prevent updates) until the application processes a snapshot of all results and make the adc engine continue just from where it stopped, without any resets and retaining the state.

    will ADCENABLE bit do that?     AdcRegs.ADCCTL1.bit.ADCENABLE = 1;      // Enable ADC

    Is that instantaneous or cause any delay?

    Thanks again.
    sayee