Kinetis eDMA channel linking

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

Kinetis eDMA channel linking

1,070 次查看
JBM
Contributor V

I'm working on a custom/proprietary parallel interface using a K64FN.  To transfer data, I have to deassert a control bit, write data to a bus, then reassert a control bit.  I was wondering if I can use DMA channel linking to do the deassertion (write to PCOR for the port), link to another DMA channel to write 16 bits to data bus (PDOR for PORTDt), link to a third DMA channel to assert the control bit.  Of course, I would want to do this in a major loop for N 16-bit words.

This would require three linked DMA channels - can this be done?  All the examples I've seen show linking two channels.  Are there any examples that show linking more than two channels?

Is there a better way to do something like this?  Is this a good use of the scatter/gather functionality?  If so, how do you stop the scatter/gather operation after N 16-bit words?

The control bit is on PORTE and the data bits are all of PORTD if that matters.  There is some other port setup required before and after the data transfers, but that can be done outside of DMA.  The source and data widths are the same - 16 bits.  The source is a buffer in memory.  The destination address is constant - PORTD.

标记 (3)
0 项奖励
回复
1 回复

1,027 次查看
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @JBM 

 

Thank you so much for reaching us in our community and thank you so much for your patience.

 

Regarding your questions, the first one, yes, you can link three DMA channels. The second one, there are not examples for linking three channels, but essentially, you can implement this third DMA channel linking by using the SDK example and taking the necessary to have it done.

 

Lastly, I can suggest you to implement it by using the examples, there are other ways of course, but the best way is always use the SDK example as a base to start to develop new functionalities. All our SDK examples are carefully developed and as well done as possible.

 

Hope the information provided is helpful, please let me know if you have more questions.

 

Thank you.
Best Regards.
Pablo Avalos.

0 项奖励
回复