I have used the SDK for starting the DMA and the serial rx.
I used the same guidelines as in the edma spi example. It works fine for the first
round. But I need to be circularly updating the buffer endlessly. How to modify for?
The code is attached.
Update . I see I receive a TCDn_DLASTSGA error. The address of the descriptor is fine. I don t know...
Original Attachment has been moved to: DMA.c.zip
Thank You for the help. I need to understand more. In the RM at page 503/504 I read when the scatter gather is enabled TCDn_CSR[ESG] = 1, the DMA_TCDn_DLASTSGA is referring to the TDC next to be loaded in the channel itself. The TCDn_DLASTSGA is pointing to the software TCD already used for the first iteration of the service, but now is no more good. So I need to have a clear vision of it is happening. I fluently depend on DMA on this application.
Somewhere I remember there is a code for handling the double buffering with DMA and ADC, probably for the KwikStik, if You drop a link for the app note I am interested.
The TCDn_DLASTSGA or TCDn_SLASTSGA must be set to [-(minus) buffer length in bytes] when using a circular buffer.
If you are using no displacement at either the source or destination set TCDn_SLASTSGA or TCDn_DLASTSGA = 0 [you may find some devices don't reset this value to 0 and that then causes an error when the mode is enabled, if it is not specifically initialised by code].