stm32: Allow a board to configure the HSE in bypass mode.
To use HSE bypass mode the board should define:
#define MICROPY_HW_CLK_USE_BYPASS (1)
If this is not defined, or is defined to 0, then HSE oscillator mode is
used.
This commit is contained in:
@@ -369,7 +369,7 @@ STATIC void OTG_CMD_WKUP_Handler(PCD_HandleTypeDef *pcd_handle) {
|
||||
/* Configures system clock after wake-up from STOP: enable HSE, PLL and select
|
||||
PLL as system clock source (HSE and PLL are disabled in STOP mode) */
|
||||
|
||||
__HAL_RCC_HSE_CONFIG(RCC_HSE_ON);
|
||||
__HAL_RCC_HSE_CONFIG(MICROPY_HW_CLK_HSE_STATE);
|
||||
|
||||
/* Wait till HSE is ready */
|
||||
while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
|
||||
|
||||
Reference in New Issue
Block a user