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.

Concerto ADCs, need help please

I've trying to configure the ADCs in continuous mode, but I need to someone to clarify me some questions,

1. Why in the most examples I found, continuous mode of ADC interruptions, must be disabled in order to obtain max speed? I mean, I don´t understand why, if the intention is that the interrupt triggers the SOCx at the end, what is the proper way then?

2.When accesing to result registry of ADCs structs, this data is allocated on C28 memory, or is accessed trough ACIB, and they are allocated at the Analog Subsystem? Because when i'm try to copy the results to another variable, it takes so long, so I suppose are allocated in Analog Subsystem.

My needs are: the ADCs must performs the conversion continuously as fast as possible, and when my program need, acces to the result registry reading the last conversion performed, it's preferable to no interrupt de processor, I´ve considered the use of the DMA.


Thanks in advance.

  • 1. With the ADC sampling at full speed, an interrupt driven approach is not very efficient because of the interrupt overhead.

    2. You are correct; the ADC results are on the analog subsystem side, so there is some latency when reading the results.

    Do you need to save all the ADC conversion results for processing, or do you only need to read the most recent conversion result?


  • Hello Devin
    In the beginning, I only need the most recent conversion from each channel, but later I will also like to save certain conversions on a buffer, maybe I can use DMA to do it, triggered by a PWM, when accesing both processor and DMA, there is a contest system which will solve it right, or,do I have to be carefull about it?, Anyway, the first I will like to solve is the continuous conversion, using the last result, without interrupt the processor.
    Thanks again.

  • David,

    If you want to read the most recent conversion, I think you will want to do the following:

    *SOC0 triggers ADCINT1 flag (but not an ISR through PIE)

    *ADCINT1 triggers SOC0

    *ADCINT1 in continuous mode

    *At beginning of program, software trigger SOC0

    This should cause the ADC to continuously convert SOC0 without CPU intervention.  You can read the ADC results at any time to get the most recent conversion result.

    The above will certainly work, but I would say that this is not the typical way the ADC is used.  Usually the ADC is triggered periodically on some event (like ePWM compare or CPU timer) or the samples are software forced as needed.

    You should also be able to use the DMA to read these samples at any time, but I think you will want to change your scheme to do this.  Consider that if you use an ePWM to trigger the DMA to read the most recent conversion results, these conversion results will be produced asynchronously to the ePWM driving the DMA, and will therefore have a jitter of up to 1 ADC conversion time.  A better strategy may be to do ePWM -> trigger ADC -> ADCEOC triggers DMA.  In this way, all the ADC samples will be equally spaced in time.