cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration for I2S pass through (from bluetooth receiver to PCM amp) ?

freeflyer
Senior II

I am using an STM32L433 to pass I2S audio from a bluetooth receiver (BT401) to a PCM amplifier (MAX98357A) using DMA.

I have got it working, but there is an issue with the clock.  It plays the audio fine for a few seconds and then there is some interference for a few seconds and this repeats.

I have concluded that its due to the two seperate clocks i.e. the clock in the bluetooth receiver and the clock in the STM32.

The bluetooth receiver is configured to play 48kHz audio but the STM32 is configured to play 49.107kHz.

Even when I configured the STM32 to play 48kHz, the same issue occured but for different durations (assume due to discrepancies between the seperate clocks).

Below is my current architecture...

freeflyer_1-1764537408241.png

I am thinking that the bluetooth receiver and the STM32 need to use a common clock, so need to either change the architecture and/or configuration, but I am not sure what setup I need to achieve this.

The bluetooth receiver can be configured as:

  • I2S master
  • I2S slave
  • It also has a master clock output (12.288MHz for 48khz audio). 

The STM32 SAI blocks can be configure as:

  • Master
  • Master with master clock out
  • Asynchronous slave
  • Synchronous slave

Note that the PCM amp does not require a master clock.

0 REPLIES 0