MPC5748G, eDMA, memory to memory transfer

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5748G, eDMA, memory to memory transfer

899 Views
shifeiqian
Contributor II

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,

155359_155359.pngpastedImage_0.png

155390_155390.pngpastedImage_1.png

Why is the project suspended, and the following warnings are showed?

155391_155391.pngpastedImage_2.png

2. In main.c, if TESTMODE=eDMA_LoopTransfer_Mode, when I step into the following codes in edma.c,

155392_155392.pngpastedImage_3.png

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?

155393_155393.pngpastedImage_4.png

3. In main.c, when TESTMODE=eDMA_ScatterGather_Mode, when I step into the following codes in edma.c,

155394_155394.pngpastedImage_5.png

Again the programme will stop at EDMA_HAL_TriggerChannelStart(&EDMA, chnState->channel) in edma.c, and shows the following warnings, why is that?

155395_155395.pngpastedImage_6.png

155396_155396.pngpastedImage_7.png

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

Labels (1)
0 Kudos
1 Reply

392 Views
petervlna
NXP Employee
NXP Employee

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

0 Kudos