DMA and serial

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

DMA and serial

2,337 次查看
pietrodicastri
Senior Contributor II

Good morning..

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.

Thank You

 

 

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

标签 (1)
0 项奖励
回复
2 回复数

2,076 次查看
pietrodicastri
Senior Contributor II

Good morning

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.

Thank You


P.S.

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.

0 项奖励
回复

2,076 次查看
mjbcswitzerland
Specialist V

Hi

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].

Regards

Mark

0 项奖励
回复