Using 2 SAI as master / slave to reduce latency on Nucleo F756ZG
Hello everyone,
I am currently working on a project on Nucleo F756ZG where I need to :
- Use SAI1A and SAI2B to send audio data at the same time using TDM with 8 slots each
- SAI parameters are 128 bits data frames (so 16 bits per slot)
- Audio frequency 96k
- Master mode
- Use of HAL_SAI_Transmit_DMA to send the data
I managed to configure the SAIs, send and monitor the output data and it is working well but I noticed (an obvious I guess) latency between the payloads of the signals, between the 2 calls of the HAL_SAI_Transmit_DMA function, as you can see on the screenshot (12 us approximately).
I would like to reduce this latency under 1 microsecond if possible. During my experimentations I noticed it was possible to set one SAI as master and the other one as its slave and only call HAL_SAI_Transmit_DMA once, but haven’t managed to make it work for now. Is it really possible ? I am looking for a code example to be sure to setup the SAIs properly.
I can share more details of my code if necessary.
Thanks!

SD pin monitored for SAI1A and SAI2B
