How to know that whether ping is filled first or pong is filled first?

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

cross mob
Roka_4525941
Level 1
Level 1

Hi all,

I am working with psoc5  I have implemented the DMA which transferes data from filter to ping and pong buffers.

DMA ISR is coming everytime but i want to know which buffer is filled first .To do this can i get any code snippet related to DMA ?

and dma has any status registers to read which buffer is filled first?during runtime?

Regards,

Roopa

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Roopa,

Can you let us know if you are using two TD's for one DMA?

In that case the data the will first be transferred to that buffer whose TD has been given in the API:  CyDmaChSetInitialTd(uint8 chHandle, uint8 startTd). This function Sets the initial TD to be executed for the channel when the CyDmaChEnable() function is called.

For more details, please refer to the appnote 'PSoC 3 and PSoC 5 Getting started with DMA': https://www.cypress.com/documentation/application-notes/an52705-psoc-3-and-psoc-5lp-getting-started-...

The appnote comes with an example project that shows how to use multiple TDs with a single channel and chain them to one another. In this example the ADC data is sent to two separate RAM buffers, one after the other, using a single DMA channel and two TDs.

Please feel free to correct me if my undertanding of the situation is not correct.

Best Regards

Ekta

View solution in original post

0 Likes
1 Reply
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Roopa,

Can you let us know if you are using two TD's for one DMA?

In that case the data the will first be transferred to that buffer whose TD has been given in the API:  CyDmaChSetInitialTd(uint8 chHandle, uint8 startTd). This function Sets the initial TD to be executed for the channel when the CyDmaChEnable() function is called.

For more details, please refer to the appnote 'PSoC 3 and PSoC 5 Getting started with DMA': https://www.cypress.com/documentation/application-notes/an52705-psoc-3-and-psoc-5lp-getting-started-...

The appnote comes with an example project that shows how to use multiple TDs with a single channel and chain them to one another. In this example the ADC data is sent to two separate RAM buffers, one after the other, using a single DMA channel and two TDs.

Please feel free to correct me if my undertanding of the situation is not correct.

Best Regards

Ekta

0 Likes