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: DMA is not operate

Genius 3186 points
Part Number: MSPM0G3507

Tool/software:

Hi,

May I ask about MSPM0G DMA?

I want to copy ADC data to SRAM.

I set DMA as this (for debug, set trigger software)

    //DMA trigger is internal, Trigger select (Trigger Mapping can see in Datasheet)
    DMA->DMATRIG[0].DMATCTL |= DMA_DMATCTL_DMATINT_INTERNAL | (DMA_DMATCTL_DMATSEL_MASK & 0); // ADC0 :23
    // word(32-bit) transfer, source address no-change, destination address no-change, repeat single transfer mode
    DMA->DMACHAN[0].DMACTL |= DMA_DMACTL_DMASRCWDTH_WORD | DMA_DMACTL_DMASRCINCR_UNCHANGED | DMA_DMACTL_DMADSTINCR_UNCHANGED | DMA_DMACTL_DMATM_RPTSNGL;

    // source address
    DMA->DMACHAN[0].DMASA |= (0x40000000 + 0x1280); //(unsigned int)(&(ADC0->ULLMEM.MEMRES[0]));
    // Destination Address
    DMA->DMACHAN[0].DMADA |= 0x20203000;//(unsigned int)(&DMA0_ADC0_0);
    // DMA channel size
    DMA->DMACHAN[0].DMASZ |= (DMA_DMASZ_SIZE_MASK & 0x000F ); // F word

    DMA->DMACHAN[0].DMACTL |= DMA_DMACTL_DMAREQ_REQUEST | DMA_DMACTL_DMAEN_ENABLE; // DMA start and enable

In main loop, it do         DMA->DMACHAN[0].DMACTL |= DMA_DMACTL_DMAREQ_REQUEST | DMA_DMACTL_DMAEN_ENABLE; // DMA start,enable

for software trigger.

But Destination memory is not changed.

To:

from:

It was same as if set trigger  as ADC' DMA event.

Could you let me know what wrong?

Thanks,

GR

  • Hi GR,

    I would suggest looking at the adc12_max_freq_dma example on resource explorer to see how to configure the DMA and the ADC and see if it matches with what you did. I also recommend keeping the DMA destination width and source width the same i.e. transferring word to word instead of word to byte.

    Please let me know if the example doesn't clarify things for you.

    Best,

    Fabrice.

  • Hi Fabrice,

    Thanks for your information.

    In my reserch with competiting the adc12_max_freq_dma project,

    I missread that DMA's DMATCTL.DMATINT register "internal" means MSPM0's internal.

    If I set this as external, It was works.

    Best regards,

    GR