MPC5748G, eDMA, ScatterGather Mode

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5748G, eDMA, ScatterGather Mode

498 Views
shifeiqian
Contributor II

Dear Sir or Mandam,

 

I have some problem while configuring mpc5748g, eDMA, scatter/gather mode, attached is my problem.

In the following code in edma.c,

155459_155459.pngpastedImage_0.png

with the increase of the variable i, pDMA->TCD[channel].CITER.ELINKNO.B.CITER is always 2, and pDMA->TCD[channel].BITER.ELINKNO.B.BITER is always 18, they don't change with the increase of i.

155460_155460.pngpastedImage_1.png

The buffer to ben sent is dmaSampleBuffer "'This buffer is transferred via eDMA requests'\r\n", and when the programme ends, the receive buffer is only buffer "This buffer".

155461_155461.pngpastedImage_2.png

Could you please help me to find out what's wrong with my programme? How to make the receive buffer the same with dmaSample "'This buffer is transferred via eDMA requests'\r\n"?

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

235 Views
petervlna
NXP Employee
NXP Employee

Hi,

Citter and Bitter are usually configured to same value before the start of eDMA.

As soon as you start eDMA transfer citter decrement by 1 for each major interation count.

When all major loops are completed and S/G mode is active the eDMA will load new configuration from DLAST_SGA.

Have in mind that S/G configuration must be 32-bit aligned.

If you Citter is not changing with start of DMA transfer you must have an incorrect configuration of DMA.

Check the Error Status Register (DMA_ES) for more details on faults.

Peter

0 Kudos