"automatic" DMA re-start after major loop completion (major loop linking on itself)

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

"automatic" DMA re-start after major loop completion (major loop linking on itself)

1,775 次查看
felixb_
Contributor I

Hi All,


I use a FRDM-K64F board with kinetis SDK 2.2. I would like to fill continuously a circular 16 Bytes buffer with ADC data with a first DMA process. I used a second DMA channel triggered by the minor loop of the first DMA in order to change the ADC multiplexer setting after each ADC conversion.


As I need a continuous data acquisition, I linked my first DMA channel (major loop) to itself. After major loop completion, the DMA engine reload the settings, but don’t start by himself. I need to issue a EDMA_StartTransfer command (in the interrupt routine) to restart the first DMA.


My question is : Is that possible to set the DMA engine so that the first DMA re-start automatically, (i.e. without issuing the EDMA_StartTransfer command in the interrupt routine)


Thanks for you answer


Félix

0 项奖励
回复
2 回复数

1,331 次查看
felixb_
Contributor I

Hi Jorge

Thanks for you answer.

- And if I use 2 TCD's linked to each other, either the scatter/gather feature or by using two DMA channels, does the linked DMA re-start by itself ? (or need I to issue also a EDMA_StartTransfer command?).

- Which one of the two solutions needs less ressources (bus occupation, cpu ...)?

0 项奖励
回复

1,331 次查看
jorge_a_vazquez
NXP Employee
NXP Employee

Hi felix B.

No, sorry, but even with a normal DMA configuration, when Major loop happen, then DMA_SERQ_SERQ bit is cleared automatically, EDMA_StartTransfer API is to set this bit again, so you have to enable it in the interrupt handler again if you want it to be continuously.

Hope this information could help you, please let me know if I can help you in any other question related.

Best Regards

Jorge Alcala

0 项奖励
回复