stm32/powerctrlboot: Support STM32WL system clock from HSE+PLL.

Switches default on the NUCLEO_WL55 board to use the HSE oscillator powered
from PB0_VDDTCXO pin.

Build-time configuration can select from MSI internal oscillator (previous
default), HSE via crystal, or HSE bypass with TCXO powered from PB0_VDDTCXO
pin (new default)

Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
Angus Gratton
2023-08-16 14:11:26 +10:00
committed by Damien George
parent e6cfb77342
commit 2c62adb42c
4 changed files with 74 additions and 2 deletions

View File

@@ -471,8 +471,12 @@
#define MICROPY_HW_RCC_HSI_STATE (RCC_HSI_OFF)
#define MICROPY_HW_RCC_FLAG_HSxRDY (RCC_FLAG_HSERDY)
#if MICROPY_HW_CLK_USE_BYPASS
#if !defined(STM32WL)
#define MICROPY_HW_RCC_HSE_STATE (RCC_HSE_BYPASS)
#else
#define MICROPY_HW_RCC_HSE_STATE (RCC_HSE_BYPASS_PWR)
#endif
#else
#define MICROPY_HW_RCC_HSE_STATE (RCC_HSE_ON)
#endif
#endif