Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

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.

MSPM0G3519: MSPM0G3519: ADC DMA configuration for 14-channel

Part Number: MSPM0G3519

Hi Team,

We are using the MSPM0G3519 MCU in our system with a total of 14 ADC channels configured as follows:

ADC12_0: 7 channels
ADC12_1: 7 channels

Currently, ADC values are read every 500 ms using the ADC_GetRawValue(x, y) API. This implementation works correctly, and all channel values are read as expected.

To reduce CPU overhead, we are trying to use DMA to transfer the ADC conversion results directly into RAM. However, the transferred data is not reliable. Some channels occasionally contain 0, even for inputs that are constant (for example, a fixed input voltage), where a zero value is not expected.

Current DMA configuration is:

DMA sample count: 7
DMA trigger: MEM6 result loaded interrupt
Address mode: Fixed Address → Block Address
Automatic enable: Disabled
Source length: Half Word (16-bit)
Destination length: Half Word (16-bit)
Transfer size: 7
Transfer mode: Repeat Block

Settings: Settings.txt 
Recorded ADC data: DMA_Buffer.csv 
Init,
/* ------------ ADC0 DMA ---------------- */
DL_DMA_setSrcAddr(DMA, DMA_CH0_CHAN_ID, DL_ADC12_getFIFOAddress(ADC12_0_INST));
DL_DMA_setDestAddr(DMA, DMA_CH0_CHAN_ID, (uint32_t)adc0_dma_buffer);
DL_DMA_enableChannel(DMA, DMA_CH0_CHAN_ID);
/* ------------ ADC1 DMA ---------------- */
DL_DMA_setSrcAddr(DMA, DMA_CH1_CHAN_ID, DL_ADC12_getFIFOAddress(ADC12_1_INST));
DL_DMA_setDestAddr(DMA, DMA_CH1_CHAN_ID, (uint32_t)adc1_dma_buffer);
DL_DMA_enableChannel(DMA, DMA_CH1_CHAN_ID);

Our expectation is that, after a 7-channel conversion sequence completes, DMA transfers the seven 16-bit ADC results into a RAM buffer.

We would like to clarify the following:

  1. Does the MSPM0G3519 ADC support DMA transfers for a 7-channel conversion sequence directly into RAM?
  2. If so, what is the recommended DMA configuration for this use case?
  3. Is MEM6 result loaded the correct DMA trigger, or should a different ADC event be used?
  4. Are there any additional ADC or DMA settings required to reliably transfer a repeated multi-channel conversion sequence?

Thanks & Regards,
Earnest Abraham

  • Hi Earnest,

    Yes, the MSPM0G3519 supports DMA transfers for a seven-channel ADC sequence. The likely problem is using the ADC FIFO with seven 16-bit DMA transfers. FIFO data is packed in pairs, so an odd seven-sample sequence can cause misalignment, zeros, or shifted channel data.

    Recommended configuration:

    • Disable ADC FIFO.
    • Configure MEM0 through MEM6.
    • Use MEM6 result loaded as the DMA trigger.
    • Set ADC DMA sample count and DMA transfer size to 7.
    • Use MEMRES0 as the DMA source and increment through MEMRES6.
    • Increment the destination into a uint16_t[7] buffer.
    • Process the buffer only after DMA completion.

    For measurements every 500 ms, trigger one ADC sequence per interval rather than using continuous repeat mode.

    If FIFO must remain enabled, use 32-bit DMA transfers and add an eighth dummy conversion so the samples remain pair-aligned. Hope this helps!

    -Brian