2023-06-16 10:30 AM
I'm working on the SAI part to read the ICS4342MIC through I2S protocol, and looking for a way to stream a large amount of data from the microphone to the hyper ram (in memory mapped mode). The current available feature of the HAL_SAI_Receive_DMA function only allows me to use the circular mode on a single large buffer, unable to update the hyper ram pointer in the descriptor, and require the CPU to do the memcpy for each interrupts. Would there be any other ways to setup the DMA for the SAI to have the CPU only update the hyperRam pointers in the descriptors ?
2023-06-18 05:34 AM
I think the problem is with HAL rather than the stm32 itself.
HAL is a great way to learn how to do the simple things. But it does not cover many of the capabilities of the stm32U5. And in some ways that makes the next steps in the learning-cure more steep.
The Reference Manual describes a mode where GPDMA can have a linked-list of descriptors. So it should be possible for the DMA to automatically move to the next block of memory. I haven't studied it sufficiently deeply to know how to do it - that's not a family I use. I guess it's a step or two beyond stm32f7 where there were two descriptors with automatic toggle between them; the cpu just had to update one while the other was busy.
2023-06-18 06:21 AM
maybe you could change the buffer (128KB size) after each access - where you want to store all data after...3 or 5 accesses ????
so: usual way: circular buffer, 2 parts, half and full callbacks, and move or consume data there.
this works continuous - or you have better idea ?