When the SPIS (SPI Slave) of Nordic 5340 receives data from the SPIM (SPI Master) of STM32, one data packet is delayed by 20 milliseconds every second, which causes voice stuttering.

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.
Parents
  • The STM32 uses SPIM (SPI Master mode) with a communication frequency of 25 MHz. According to what the FAE (Field Application Engineer) told me, the maximum frequency supported by Nordic's SPIS (SPI Slave mode) is 8 MHz.
    For the Nordic 5340, I am using the NCS (nRF Connect SDK) version 2.5.0. Initially, I used the spi_transceive_signal function to receive data packets, but encountered issues. The FAE then advised me to try the nrfx SPI driver instead. Following this suggestion, I implemented the data reception using a combination of functions from the nrfx_spis.h header file. However, the reception delay issue still persists.
Reply
  • The STM32 uses SPIM (SPI Master mode) with a communication frequency of 25 MHz. According to what the FAE (Field Application Engineer) told me, the maximum frequency supported by Nordic's SPIS (SPI Slave mode) is 8 MHz.
    For the Nordic 5340, I am using the NCS (nRF Connect SDK) version 2.5.0. Initially, I used the spi_transceive_signal function to receive data packets, but encountered issues. The FAE then advised me to try the nrfx SPI driver instead. Following this suggestion, I implemented the data reception using a combination of functions from the nrfx_spis.h header file. However, the reception delay issue still persists.
Children
No Data
Related