2020-08-28 09:23 AM
Hi :)
This is related to my other post (https://community.st.com/s/question/0D53W00000EcBvNSAV/sai-no-signal-on-mclk-pin) but I thought it would be more organised to make two posts since the question is different.
How do I get the best audio clock accuracy using the separate SAI PLL without fiddling manually with all the values?
The SAI clock should be one of these, or as close as possible to be accurate:
I tried just entering the value in CubeMX but clearly it is not possible to get exactly those values so CubeMX cannot manage.
What I would like ideally is a simple way to say I want fs=44.1kHz audio freq for ex and then the tool tries to get a SAI clock as close as possible as one of the possible frequencies (128fs, 256fs, etc.).
I actually found the perfect tool - exactly what I'm describing - but it is for the I2S and not the SAI which uses different master clocks. (for those interested, the tool is an excel sheet: https://www.st.com/resource/en/application_note/dm00039457-clock-configuration-tool-for-stm32f40xx41xx427x437x-microcontrollers-stmicroelectronics.pdf )
My question to you: how do you do it, you just fiddle manually with the values until you get something close?
Thanks
Simon
2020-09-09 01:32 AM
Sorry for the late reply :)
Yes a MIDI gadget - even though MIDI is more like a "bonus" in my case, I just thought why not adding the fonctionality when all it takes is one UART TX line on the MCU and few resistors :) Error of 0.16% is more than ok so perfect!
About the tool I will see I might give it a go, I'll make a new post if I do ;)
2020-09-09 02:05 AM
Looking forward to it :)
JW