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.

TM4C123GH6PM: ADC --> uDMA continuous transfer

Part Number: TM4C123GH6PM

Hi,

I would like to know if there is a way to continuously sample data from ADC using uDMA and place it in a memory location without relying on interrupts or processor to trigger conversion. I have seen a method implemented using scatter gather mode, but it seems like an overkill for such a simple task.

Thanks

  • Hello Ahmed,

    Welcome to the forum.

    There is an example project with continuous ADC conversion triggered with a timer using uDMA in ping-pong mode here:

    https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/647065/2381983

    If you desire the ADC to be continuously triggered, you can simplify this example by changing the call in line 188 to:

        ADCSequenceConfigure(ADC0_BASE, 0u, ADC_TRIGGER_ALWAYS, 0u);
    

    If you desire to have a single RAM location continuously updated as opposed to collecting data in a buffer, you can modify the uDMA to not increment the destination address, and have both the primary and secondary channels write to the same location. You cannot tell the uDMA to do an infinite number of transfers, so you will still have to service an interrupt after the maximum number of transfers (1024) and re-enable the other channel (primary or secondary).