cancel
Showing results for 
Search instead for 
Did you mean: 

I2S clock on STM32F303 stuck at 8MHz in CubeMX?

David Koster
Associate II

I'm trying to get I2S working on an STM32F303CBTx, but am having trouble configuring the pheripheral in STM32CubeMX.

In the reference manual I read:

9.2.12 I2S clock (only in STM32F303xB/C/D/E, STM32F358xC and STM32F398xE)

The I2S clock can be either the System clock or an external clock provided on I2S_CKIN pin. The selection of the I2S clock source is performed using bit 23 (I2SSRC) of RCC_CFGR register.

However, with the system clock configured to 72MHz, I still get the following error trying to set the audio frequency to 48kHz:

With this I2S Clock (8.0MHz), the divider value (0) is too low to obtain the desired Audio Frequency. The I2S Clock must be higher than (21.504 MHz).

Am I doing something wrong here, am I missing something, or is STM32CubeMX wrong on the clock speeds?

Thanks!

- David

1 REPLY 1

> Am I doing something wrong here, am I missing something, or is STM32CubeMX wrong on the clock speeds?

Try to set it to a sample rate which would correspond to the 8MHz (i.e. 5.3kHz), compile and run it and check, what's the result.

Or dump Cube/CubeMX and write code on which you can rely.

JW