How do you define "wrong data from DMA"? What you describe seems correct, and there is no limit in the DMA which you should see (apart from each TD limited to 4095 bytes per transfer, but you use only 256). Do you reset each TD after each transfer is done?
There are a number of AppNotes about PSoC5 and DMA, did you read them?
Thank you for your reply.
"apart from each TD limited to 4095 bytes per transfer, but you use only 256" - I see the wrong data after 16 blocks of 256 (16x256=4096), due to this fact I think that I reach transfer count of it max value (4095).
The only "TD reset" that I do after each transfer is done it's only disable and enable again of the DMA channel ( "CyDmaChDisable(DMA_1_Chan);" and "CyDmaChEnable(DMA_1_Chan, 1);").
I think that this procedure doesn't restarts transfer counter.
What is the correct procedure to reset the TD?
Yes, I have read all the AppNotes.
1 of 1 people found this helpful
Its about the transferCount set in the TD. It should not matter that you execute the TD multiple times in sequence.
When I understand you correct you have two TDs, chained, and each of them is responsible for filling one buffer. This is explained in AN 52705, chapter 10. Whats important is that you set the DMA channel to 'preserve TD', so the TDs get reloaded when they are executed the next time.