HSI oscillator is actually used as main clock source by PLL mux.
But if the user needs to use the USB, it is not recommended to use the HSI as it is not precise enough and stable to achieve proper 48 Mhz USB operation.
A solution would be to use external HSE, but none can be mounted in zest cores.
Another solution is to use internal MSI RC clock. Thanks to the mounted LSE (Low Speed External) clock of 32.768kHz, "the MSI
frequency can be automatically trimmed by hardware to reach an accuracy better than ±0.25 %". This is called "Auto calibration [by PLL]" and "must be enabled to reach a stable 48 MHz" for USB operation.
At 30 °C, the HSI16 oscillator has an accuracy of ± 0.5 % and the MSI oscillator has an accuracy of ± 0.6 %. So, by using LSE clock, MSI can achieve an accuracy of ± 0.25 %, better than normal HSI operation.
See these documents for more information:
STM32L4A6 datasheet (DS11584 Rev 14) part 3.12 about clock and startup.
Application note AN4736 about internal RC oscillators calibration (focuses only on the user trimming, not LSE mode).
STM32L4A6 reference manual (RM0351) part 6.2.3 about MSI clock.
By using the MSI clock, we can provide both stable sources for USB 48 MHz clock and SYSCLK max speed 80 Mhz clock (using PLL).
Default MSI value is 4MHz (range 6). By keeping this value, we can assure:
a low frequency drift over VDD, from -0.8% to 0.7% (see datasheet table 59).
a low power consumption of max 15uA (see datasheet table 59).
The MSI must be set in PLL-mode by setting the MSIPLLEN bit in the Clock control register (RCC_CR) so it can automatically calibrate itself thanks to the LSE.
Proposed clock configuration for the STM32L4A6RGT6:
Side Note (RDE): LSE drive capability (LSEDRV) should be increased if LSE do not start (because of STM32 internal problems with the drive amplifier).
HSI oscillator is actually used as main clock source by PLL mux.
But if the user needs to use the USB, it is not recommended to use the HSI as it is not precise enough and stable to achieve proper 48 Mhz USB operation.
A solution would be to use external HSE, but none can be mounted in zest cores.
Another solution is to use internal MSI RC clock. Thanks to the mounted LSE (Low Speed External) clock of 32.768kHz, "the MSI frequency can be automatically trimmed by hardware to reach an accuracy better than ±0.25 %". This is called "Auto calibration [by PLL]" and "must be enabled to reach a stable 48 MHz" for USB operation.
At 30 °C, the HSI16 oscillator has an accuracy of ± 0.5 % and the MSI oscillator has an accuracy of ± 0.6 %. So, by using LSE clock, MSI can achieve an accuracy of ± 0.25 %, better than normal HSI operation.
See these documents for more information:
By using the MSI clock, we can provide both stable sources for USB 48 MHz clock and SYSCLK max speed 80 Mhz clock (using PLL).
Default MSI value is 4MHz (range 6). By keeping this value, we can assure:
The MSI must be set in PLL-mode by setting the MSIPLLEN bit in the Clock control register (RCC_CR) so it can automatically calibrate itself thanks to the LSE.
Proposed clock configuration for the STM32L4A6RGT6:
Side Note (RDE): LSE drive capability (LSEDRV) should be increased if LSE do not start (because of STM32 internal problems with the drive amplifier).