DMA linked list on LCP1769

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DMA linked list on LCP1769

438 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pauls on Thu Mar 15 09:15:52 MST 2012
[FONT=Arial]Hello[/FONT]

[FONT=Arial]I have my SSP/DMA linked list transfer working on my LPC1769 demo board. Ready for when I get the real target on the LPLC1777, when the electical boys do thir stuff :rolleyes:.[/FONT]

[FONT=Arial]I have SSP0 master connected to SSP1 slave, so I can test the SSP/DMA links out and its working OK :).[/FONT]

[FONT=Arial]I want so send a status message back over the SSP from the slave to the master but when I try this :eek:[/FONT]

[FONT=Arial]I get blocked at the following line in the send :-[/FONT]

[B][COLOR=#7f0055][COLOR=#7f0055][FONT=Arial]while[/FONT][/COLOR][/COLOR][/B][FONT=Arial] ( (LPC_SSP1->[COLOR=#0000c0][COLOR=#0000c0]SR[/COLOR][/COLOR] & (SSPSR_BSY|SSPSR_RNE)) != SSPSR_RNE );[/FONT]

[FONT=Arial]I can get passed this blocking if I send just after the SSP's are initialised or after the first DMA transmit, but after or during the linked list items, I just get blocked with the Receive FIFO Not Empty.[/FONT]

[FONT=Arial]I have tryed to to free the recieve fifo with LPC_SSP1->[COLOR=#0000c0][COLOR=#0000c0]ICR[/COLOR][/COLOR] , but that did not work.[/FONT]

[FONT=Arial]Has any one seen this one before?[/FONT]

[FONT=Arial]I did find the first linked list item is actualy controls the second DMA transfer, the standard config contols the first one :confused:.[/FONT]

[FONT=Arial]Thanks[/FONT]

[FONT=Arial]Paul S[/FONT]
0 Kudos
2 Replies

351 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Tue Mar 20 09:59:06 MST 2012

Quote: pauls

So you need a DMA channel for each SSP tx and SSP rx


and I think that is even stated in the user manual somewhere.
At least I remember reading something like this and I can also explain why:

each peripheral has DMA signals going to and from the DMA engine. TX and RX channels have different signals to state that the either the peripheral has data or accepts data (this is the DMA request/response interface shown in the user manual)
In the DMA engine you connect to one channel of the peripheral at a time.
Section "31.4.2.3 DMA request connections" also shows this (there are separate DMACSREQ and DMACBREQ signals for the Tx and Rx of each peripheral.

And now I also remember how I concluded that you cannot mix Tx and Rx on one channel. In "31.6.5.1 Linked List items" there is a note: "[I]Note: The DMACCxConfig DMA channel Configuration Register is not part of the linked list item.[/I]"
and since the configuration register determines to which channel you connect ...

Regards,[INDENT]Rob
[/INDENT]
0 Kudos

351 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pauls on Tue Mar 20 06:59:33 MST 2012
OK I have solved this one :D.

We had to get the logic analyser out :eek:, thanks [FONT=Calibri]electrical [/FONT]guys.

Don't try and send raw ssp data from the slave with only one DMA channel.

You have to create a new DMA channel for the SSP slave tx and and in my case use the linked list item to select the data I wanted to send back eg status data on how much memory left/used in my transfers.

Enabling the SSP DMA on both tx and rx.

So you need a DMA channel for each SSP tx and SSP rx ;).

Paul S

Still waiting for those electical guys :rolleyes:
0 Kudos