issue with repeated eDMA receive within interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

issue with repeated eDMA receive within interrupt

1,889 Views
avbot
Contributor III

Can I safely use SPDIF_TransferSendEDMA within the eDMA callback interrupt?

Or is there a more basic way to trigger the same sized transfer over and over within the callback?

It seems that a lot of what SPDIF_TransferSendEDMA is redundant if essentially all the setup is the same each call.

Note: we cant use SPDIF_TransferSendEDMA  within non-interrupt context for performance reasons.

 

0 Kudos
Reply
4 Replies

1,878 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Can I safely use SPDIF_TransferSendEDMA within the eDMA callback interrupt?
Or is there a more basic way to trigger the same sized transfer over and over within the callback?
-- In my opinion, I'd highly recommend you to use the scatter-gather feature to configure the DMA to prepare the next transfer automatically, then you can activate the DMA easily in the callback function when completing the previous DMA transfer.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,872 Views
avbot
Contributor III

Thanks Jeremy, can you please help advise how to make scattergather work?
I am first trying on the Rx side and tried to modify SPDIF_TransferReceiveEDMA and then calling it once to make a perpetual scatter gather. But it still only triggers the interrupt once. Here is what I have tried..

>make SPDIF_XFER_QUEUE_SIZE=1 so that next TCD is same as one just sent.
>set scattergather mode like this on each of left and right.
handle->dmaRightHandle->base->TCD[handle->dmaLeftHandle->channel].DLAST_SGA = handle->dmaRightHandle->base->TCD[handle->dmaLeftHandle->channel].DLAST_SGA; //self
handle->dmaRightHandle->base->TCD[handle->dmaRightHandle->channel].CSR = DMA_CSR_ESG_MASK | DMA_CSR_INTMAJOR_MASK;

Please help. Thanks!

0 Kudos
Reply

1,861 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) Can you please help advise how to make scatter-gather work?
-- To provide the fastest possible support, I'd highly recommend you to refer to the scatter_gather demo (~\driver_examples\edma\scatter_gather) in the SDK library
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,858 Views
avbot
Contributor III

Hi Jeremy, I have reviewed that reference (and the other eDMA references) in great detail.
It does not directly apply because it is a one shot demo. What the confusion is for me as I have tried to get across in my post is how to make it continuous. Its not obvious from the comments in the code how to do this.
I would really appreciate if you can provide specific advice on this. Project is waiting for this solution so hoping you can assist soon. Thanks!

0 Kudos
Reply