2025-11-26 12:02 PM
I am trying to develop I2S master using the NUCLEO-L433RC-P, but struggling to achieve a master clock speed for 48kHz playback.
The I2S audio is working (using a MAX98357A I2S amplifier) and the master clock speed needs to be 12.88MHz (i.e. 48kHz x 256). But with my current clock configuration it is 18.285MHz, so the playback speed is too fast.
I tried entering 12.888MHz as the SAI clock speed to resolve the configuration and it came up with the configuration below, but with this configuration my code does not run....
Is it possible to achieve 48kHz playback using the internal RC oscillators, or do I have to use the HSE ?
2025-11-27 8:08 AM
Sure it's possible. Here is one such clock configuration using MSI as the base.
No error, exact frequency. 12.288 Mhz (not 12.88 or 12.888).
2025-11-27 8:51 AM
Thanks TDK
Your configuration does indeed generate the 12.888MHz, but the knock on effect is that the overall processor clock is drastically reduced.
I usually run the processor at 80MHz, but with you configuration it drops to 38.4MHz so the processor runs much slower for other tasks.
The best I could do was to set MSI to 8MHz to achieve 12.571Mhz for the I2S clock (I was trying to do this with the 8MHz HSE, but got it working with 8MHz MSI)....