The STM32 chip collects audio data with the following audio parameters: a sampling frequency of 44 kHz, a sampling precision of 16 bits, and a single channel. The STM32 chip transmits the data to the Nordic 5340 via SPIM (SPI Master mode), while the Nordic 5340 receives the data in SPIS (SPI Slave mode) and then sends it out through the network.
Through testing, it has been confirmed that there are no issues with the audio sampling process, the transmission side of the STM32, or the network transmission side of the Nordic 5340. However, when the Nordic 5340 operates as an SPI Slave, it periodically experiences choppiness and delays: approximately once per second, there is a reception delay of more than 20 ms. This delay leads to packet loss and ultimately results in choppy audio playback.