cancel
Showing results for 
Search instead for 
Did you mean: 

STA350BW delay

MRivo.1
Associate

Hello everyone,

I'm working on nucleo-f446re and x-nucleo-cca01m1 demoboard, using last version of FP-AUD-SMARTMIC1 software.

The STM32F4 sends audio data to two speakers through the STA350BW via I2S interface.

The output sampling frequency is 32kHz. I2S MCLK frequency is 1MHz and each sample has 16 bits.

/* Prepare hAudioOut handle */
      mx_i2s_config.AudioFreq    = AudioOutCtx[Instance].SampleRate;
      mx_i2s_config.CPOL         = I2S_CPOL_LOW;
      mx_i2s_config.DataFormat   = I2S_DATAFORMAT_16B;
      mx_i2s_config.MCLKOutput   = I2S_MCLKOUTPUT_ENABLE;
      mx_i2s_config.Mode         = I2S_MODE_MASTER_TX;
      mx_i2s_config.Standard     = I2S_STANDARD_PHILIPS;
      
#if (!defined(USE_STM32F0XX_NUCLEO) && !defined(USE_STM32L0XX_NUCLEO))
      mx_i2s_config.ClockSource  = I2S_CLOCK_PLL;
#endif

Initially the I2S buffer is empty. After a while, the buffer is filled with data and speakers reproduce an audio signal different than zero.

In the image below, the blue line represents the I2S SD, and the purple one represents the output analog signal from STA350BW to one of the two speaker.

0693W000008yD1iQAE.png 

There is a constant delay between start of I2S transmission and start of audio reproduction.

The delay is approximately 600/650 us.

Each sample should take 16us to be transmitted (16 bit - 1MHz).

Delay seems to be caused mainly by the STA350BW (default register configuration).

Is it possible to reduce this delay? Is there any default filtering configuration which may cause it?

Thanks for support

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
0 REPLIES 0