Terminating DMA

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jofic_334026
Level 3
Level 3
First like received

I'm using the PSoC 5LP to overlay pixels on a 8-bit parallel (BT.656) video stream. I need to synchronize my DMA with the vertical sync signal embedded in the video stream.  I'm using one DMA channel with four TD's.  What is the proper way to reset the entire chain?  Currently, I have the vertical sync signal generating an interrupt.  Here is the ISR:

   

CY_ISR(SYNC_ISR)

   

{

   

     CyDmaChSetRequest(DMA1_Chan, CY_DMA_CPU_TERM_CHAIN);   // Terminate the entire chain of TD's

   

     while(CyDmaChGetRequest(DMA1_Chan));                                               // Wait for the request to be processed.

   

     CyDmaChEnable(DMA1_Chan, 1);                                                              // Re-enable the DMA channel.

   

}

0 Likes
1 Solution
jofic_334026
Level 3
Level 3
First like received

Well, I guess I'll answer my own question since no one else is.

   

In addition to the code I previously posted I needed to include "CyDmaChSetInitialTd(DMA1_Chan, DMA1_TD[0])" prior to re-enabling the DMA channel.

View solution in original post

0 Likes
2 Replies
jofic_334026
Level 3
Level 3
First like received

Well, I guess I'll answer my own question since no one else is.

   

In addition to the code I previously posted I needed to include "CyDmaChSetInitialTd(DMA1_Chan, DMA1_TD[0])" prior to re-enabling the DMA channel.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Thank you for keeping us informed. I would never have thought of that beforehand!

   

 

   

Bob

0 Likes