imxrt1010 SAI_TransferSendEDMA / SAI_TransferReceiveEDMA can't be used for ping-pong buffers

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imxrt1010 SAI_TransferSendEDMA / SAI_TransferReceiveEDMA can't be used for ping-pong buffers

2,289 次查看
bowerymarc
Contributor V

working through the SAI example and trying to convert to a continuous ping-pong buffer with interrupt at halfway/end points, I find the functions SAI_TransferSendEDMA  and SAI_TransferReceiveEDMA contain code which keeps them from being used for this very common audio processing structure.  In fact, the sad & eDMA drivers can't be made to do this without modification.  Instead, this should be an option in the driver config tool.  Instead, one has to use two TCDs and can't use the modulo feature.

0 项奖励
回复
5 回复数

2,272 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you. Actually, I'm not very clear about your purpose. Whether you want to use the scatter-gather feature of DMA to implement the Ping-Pong transfer. Looking forward to your clarification.

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 项奖励
回复

2,265 次查看
bowerymarc
Contributor V

Hi!

My overall purpose is to have a continuously running ping-pong buffer, with an interrupt at the halfway point and at the end.  Processing the samples will take place in the interrupt routines.

From reading the RT1010 reference manual, which btw is not very clear on this, it seems that the way to do this is use scatter-gather, use modulo mode, and have one TCD block which reloads itself. 

If there is another way to do this, I'm all ears.

Best,

Marc

0 项奖励
回复

2,260 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thanks for your reply.
Firstly, I'd like to suggest you consider the below approach to implementing the Ping Pong transfer.

jeremyzhou_0-1599795257956.png


Second, there's a scatter_gather demo in the SDK library, and you can refer to it for details.

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 项奖励
回复

2,237 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thank you for your reply.
1)So basically what you are saying is that there is no way to use the modulo or half-way interrupt to achieve this? that doesn't seem like an acceptable answer to me.
-- No, I don't think so. Actually, it allows you to enable either half-way or end interrupt during Ping-Pong transfer.
2) The problem I have with the SDK demos is that they don't use the configuration tool, so the code there isn't the same as you get when you use the configuration tool. the sai demo, the scatter-gather demo, and more. already ran into that with 4 or 5 of the SDK examples. they really should be reworked to use the provided tools.
-- Actually, it really needs you to either modify or mix various demos manually to meet your purpose. The configuration tool is incapable of generating such a complicated demo.
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 项奖励
回复

2,252 次查看
bowerymarc
Contributor V

so basically what you are saying is that there is no way to use the modulo or half-way interrupt to achieve this?  that doesn't seem like an acceptable answer to me.

the problem I have with the SDK demos is that they don't use the configuration tool, so the code there isn't the same as you get when you use the configuration tool.  the sai demo, the scatter gather demo, and more.  already ran into that with 4 or 5 of the SDK examples.  they really should be reworked to use the provided tools.  as is they are not helpful.