Audio glitches on SAI slave sub-blocks (STM32H7)
Hi all,
I am using the SAI peripheral on the STM32H753 and I have it set-up as follows:
SAI2A - Master TX, asynchronous
SAI2B - Slave RX, synchronous with sub-block A
SAI3A - Slave TX, synchronous with SAI2
SAI3B - Slave RX, synchronous with SAI2
(SAI2 SYNCOUT has been set to SAI_SYNCEXT_OUTBLOCKA_ENABLE)
Audio from SAI2A is clean.
Audio from all other SAI sub-blocks has glitches as shown below.
Audio 1 - Source signal
Audio 2 - Output from SAI2B
I am using the simplified initialization mode using HAL_SAI_InitProtocol() with number of slots set to 2 and data size at 32 bits.
I am starting all the slave sub-blocks before starting the master. I have also tried adding a delay between starting the slaves and the master, but it didn't make a difference to the behaviour.
I am using circular DMA to transfer audio to/from the SAI sub-blocks and I have disabled D-Cache for the SRAM section which contains the DMA buffers.
SAI FIFO thresholds are currently set to SAI_FIFOTHRESHOLD_EMPTY, but I have also tried other FIFO levels (half/full) and it has not made a difference to the behaviour.
I appreciate any thoughts on the setup and possible explanations for the behaviour.
Thank you
