2020-09-03 04:48 AM
Im using a STM32L412KB for the first time and Im a little confused about the clock options. I can't seem to change the clock speed (input frequency) in cubeIDE, it's always stuck on 8MHz. However I notice there is an internal oscillator - does this mean I don't have to use an external crystal? This would be very good for my design, but I'm not sure - what are the disadvantages of using an internal oscillator?
Solved! Go to Solution.
2020-09-03 07:40 AM
As I recall this L4 has a MSI clock sources as well as the HSI, and the MSI starts the part.
The MSI can be trimmed via the LSE (32.768 KHz) crystal.
Things like CAN and USB need an accurate clock source, as do things like radio/networking applications. If you have an existing clock source, like a TCXO, you can use that in many cases.
2020-09-03 07:00 AM
If you're talking about the crystal clock speed, you need to enable it under RCC settings before you can change the value.
You can use the internal oscillator (HSI). The drawback is that it's less accurate.
2020-09-03 07:40 AM
As I recall this L4 has a MSI clock sources as well as the HSI, and the MSI starts the part.
The MSI can be trimmed via the LSE (32.768 KHz) crystal.
Things like CAN and USB need an accurate clock source, as do things like radio/networking applications. If you have an existing clock source, like a TCXO, you can use that in many cases.
2020-09-04 02:06 AM
The L412K has no HSE OSC_IN/OSC_OUT pins. But is has LSE OSC32 pins and you can use a 32768 Hz crystal or oscillatot to (PLL?) control MSI.
But the datasheets could be more specific about what the LSE controll of MSI can achieve.