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!