Dear Sir or Mandam,
I have encountered some problem while configuring MPC5748G eDMA module, attached is my test project. I'd like to realize a single block memory-to-peripheral transfer, loop memory-to-memory transfer and scatter/gather memory-to-memory transfer.
1. In main.c, if TESTMODE=eDMA_SingleBlock_Mode, when I step into EDMA_HAL_TriggerChannelStart(pDMA, chnState->channel) in edma.c,
Why is the project suspended, and the following warnings are showed?
2. In main.c, if TESTMODE=eDMA_LoopTransfer_Mode, when I step into the following codes in edma.c,
each time EDMA_HAL_TriggerChannelStart(struct DMA_tag *pDMA, edma_channel_indicator_t channel) is executed, TCD[channel].CITER.ELINKNO.B.CITER will decrease by 1. However, after 6 loops TCD[channel].CITER.ELINKNO.B.CITER goes back to 6 rather than 0, and again my project is suspended and the following warnings are showed. Why is that?
3. In main.c, when TESTMODE=eDMA_ScatterGather_Mode, when I step into the following codes in edma.c,
Again the programme will stop at EDMA_HAL_TriggerChannelStart(&EDMA, chnState->channel) in edma.c, and shows the following warnings, why is that?
Could you please help me to find out what's the problem and give me some suggestions to remove the mistakes?
Thank you very much for your help!
Yours sincerely,
QIAN Shifei
Original Attachment has been moved to: mpc5748g_Z4_1.zip
Hi,
I am not familiar with the compiler you are using, but I can explain it on my exmaple made in GHS compiler.
Using simple memory transfers with DMA is quite easy.
You can follow my example for DMA configuration described in this link:
Example MPC5744P DMA multiple minor transfers
As soon as you manage to configure DMA to transfer data successfully (according to the example) we can continue with Scatter/gather mode.
Peter