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

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

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

1,086 Views
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 Kudos
2 Replies

642 Views
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 Kudos

642 Views
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 Kudos