Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by dburke on Sun Aug 24 13:06:04 MST 2014

I already have a test, based on ssp_dma.c that DMAs ethernet packets from EMAC to SSP on loopback and then DMAs the same packet back to EMAC and transmits over ethernet and works fine without errors

One half of my end target is transfer of  ethernet packets to SSP so that is working quite simply as the EMAC supplies the packet length to set up the DMA transfer

The other half is to DMA varying length ethernet packets from SSP to EMAC, The device on SSP doesn't supply a packet length so I need to extract  the packet length from the ethernet frame. I have in mind two solutions

1 Setup DMA config to transfer the header to EMAC memory, read the data packet length and set DMA config to read the correct packet length and run a second DMA. I think I can achieve this reasonably easily.

2 I think it would be more elegant to use a linked list (DMA LLI). This would mean setting up the DMA for the header and packet transfers as two entities. However this would mean as before, DMA the header, read the packet length and set the correct byte transfer count in the DMA control in between the two parts of the linked list items. Is that achievable as there are warnings in the UM not to alter the DMA registers while DMA is active. Does that mean I can't use a linked list or is it feasible because the DMA won't be actually running while updating the count?