- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
We are using DMA for our project. The DMA works well after the power up of the board. We have the expected behavior.
Currently we are not able to stop and restart correctly the DMAs.
We have a start / stop functions, it seems works. However all "restart" of the DMA seems don't begin with the TD0. The DMA seems starts with another TD (may be the latest used).
How we can force to use the TD0 when we restart DMA?
regards,
Robin.
Solved! Go to Solution.
- Labels:
-
PSOC5 LP MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @RoBO_1287886 ,
I believe that you are terminating the DMA Channel either using the terminate HW signal or by calling CyDmaChDisable() API. To restart the channel, you should be calling the CyDmaChEnable() API. However, this API will not reset the TD pointer to TD[0] and the execution will start from the TD where it left. To restart the DMA channel from TD[0], you need to call CyDmaChSetInitialTd() and set the initial TD to TD[0]. This will restart the DMA channel from TD[0].
Example Snippet:
if(event)
{
//Terminate DMA
//Perform additional actions
CyDmaChSetInitialTd(DMA_Chan, DMA_TD[0]); //This resets the TD to TD[0]
CyDmaChEnable(DMA_Chan,1); // Restart the channel
}
Let us know if this works at your end.
Bragadeesh
- Tags:
- it works