You are here

DMA TD status | Cypress Semiconductor

DMA TD status

Summary: 2 Replies, Latest post by pavloven on 04 Aug 2013 02:29 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
MrC's picture
13 posts

Well I've succeeded at getting a ping pong of ADC data working wonderfully using the DMA with two TD's. All the data is loaded into two buffers perfectly.  So how do I tell when each and/or  which TD is finished so I can process the data of one buffer while the other one is filling.  I tried CyDmaChStatus but the results never change. I'm thinking that I'm not using it properly. Can anyone send me a snippet of example code to get the status of a TD?



Mr C

user_49271930's picture
407 posts

I used CyDmaChStatus:
CyDmaChStatus(DMA_Chan,&TD_Num,0); // What TD number is in the processing of
TD_Num = TD_Num&2;
if ( TD_Num)FS_Write(pFile,(uint8*)ADC_sample1,NO_OF_SAMPLES*4); SD_write_Write(0); //recording on SD
if (!TD_Num)FS_Write(pFile,(uint8*)ADC_sample2,NO_OF_SAMPLES*4); SD_write_Write(1);
File with the project here:

Anguel's picture
25 posts

 I have not done this yet but was thinking about using the dma transaction complete signal of each TD to generate an interrupt. Maybe the dma appnote example 5 will give some hints



Log in to post new comments.