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.

MSPM0G3507: Continuous ADC sampling with DMAs

Part Number: MSPM0G3507

Hello,

I am trying to use two DMA channels in a ping-pong fashion to allow for continuous ADC input without dropping any samples.

This is the general idea of what I am trying to do:

Start DMA 0 from ADC to memory block 0. When memory block 0 is full, the ADC should continue using DMA 1 to memory block 1. Interrupt fires when DMA 0 is complete. DMA 1 continues to transfer from ADC to memory block 1. When memory block 1 is full ADC DMA should continue using DMA 0 to memory block 0.

Currently, I am seeing no way to have the ADC access two DMAs to allow for continuous input in the syscfg file. Is there anyway to use two DMA channels in a ping-pong fashion to allow for continuous ADC input without dropping any samples?

Thank you!

  • Hi Sarah,

     I think one DMA is enough, if your sample rate is not too high. As the DMA is on transfer, you can handle the last block. As the other blocking is full, you just change the DMA destination.

    If My understanding is wrong, please tell me.

    B.R.

    Zoey

  • Yes! This works wonderfully! Thank you so much! I do have a second similar question to this: how many clock cycles does it take to do a 12 bit conversion? For the MSP430s it says right in the datasheet that it takes 96 clock cycles however, no where in the MSPM0 datasheet does it say how many clock cycles it takes. Thank you!

  • It depends on your sample windows and CLOCK you set.  

    If 80MHz is used t will takes around 2-3 (Sync) + Sample window + 9(conversion) + 1(written to MEMRESx) clock.