[LPC55S16] DMA done trigger event

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[LPC55S16] DMA done trigger event

1,614件の閲覧回数
matt83
Contributor I

Hi, 

In the current implementation I have one DMA channel (e.g. CH0) triggered by a CTimer match event which is responsible of sending a packet via SPI peripheral. The DMA descriptor is realoaded at the end of the transfer which includes N 32-bits words. This is working fine, each transfer completes as expected reaching out the callback function every N SPI packets.

What I'm trying to do is to trigger another DMA channel (e.g. CH1) using the DMA done event coming from CH0 channel as trigger for CH1. CH1 DMA channel needs to transfer a word coming from an array into a fixed memory location and each transfer must be paced by means of CH0 DMA done event which must also increase the array index.

The trigger is configured as HW falling edge (1 transfer for each edge) and the trigger signals has been verified to be correctly connected between each other by the MUXes. Whit this configuration CH1 is triggered every time a single CH0 DMA transfer is done rather than triggered at the end of CH0 descriptor.

Is that behavior correct? Is it possible to pace the transfer of CH1 every time CH0 descriptor ends?

Am I missing something in the trigger/descriptor configuration?

Note: if I "manually" trigger CH1 by SW (acting on DMA SW trigger register) inside the CH0 callback function, everything works as expected. At each SW trigger the arrays is advanced by 1 word, etc..

Any help/comment is appreciated, thank you!

ラベル(2)
タグ(1)
0 件の賞賛
返信
5 返答(返信)

1,598件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @matt83 

How about use Linked transfers mode, there is demo "dema_linked_transfer" under SDK, and description in UM11295-> 22.5.6 Linked transfers (linked list)

 

BR

Alice

0 件の賞賛
返信

1,562件の閲覧回数
matt83
Contributor I

Thank you for your suggestion,

As far as I understood, the linked transfer acts triggering the DMA transfers as soon as the previous descriptor ends. The new transfer then should proceed paced by its own trigger configuration. What I'm trying to implement instead is to pace the transfer of the second DMA channel with the end of the descriptor of the first one.

Now I have implemented it by means of callback functions but the HW-only solution would be preferred.

Any suggestion?

Thank you

0 件の賞賛
返信

1,523件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @matt83 

1) In linked mode, or Ping-Pong mode, after descriptor A is exhausted, then descriptor B will be processed.

2)The DMA trigger output can be routed to the
trigger input of another channel through the trigger input multiplexing.

So you can also use one trigger output to trigger another channel.

Alice_Yang_0-1705647320439.png

 

BR

Alice

 

0 件の賞賛
返信

1,518件の閲覧回数
matt83
Contributor I

Hello @Alice_Yang ,

This is fine, but as mentioned above, my tests shown that the second DMA channel is triggered every time the first DMA channel transfers a single word rather than the entire descriptor.

That's the reason why I'm trying to understand if something is wrong in my channels configuration.

BR

@matt83 

0 件の賞賛
返信

1,412件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @matt83 

How about sending a simple project that can reproduce your issue on LPCxpresso55s16-evk board?

I can help to check on my side. Or you can also create a private ticket with your project:

https://support.nxp.com/s/?language=en_US 

 

BR

Alice

0 件の賞賛
返信