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.
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.
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
Hi,
Thanks for your reply.
Firstly, I'd like to suggest you consider the below approach to implementing the Ping Pong transfer.
Second, there's a scatter_gather demo in the SDK library, and you can refer to it for details.
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.
-------------------------------------------------------------------------------
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.