summaryrefslogtreecommitdiff
path: root/ports/stm32/stm32_it.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/stm32/stm32_it.c')
-rw-r--r--ports/stm32/stm32_it.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ports/stm32/stm32_it.c b/ports/stm32/stm32_it.c
index 0f2be4c68..004e0f974 100644
--- a/ports/stm32/stm32_it.c
+++ b/ports/stm32/stm32_it.c
@@ -329,13 +329,16 @@ STATIC void OTG_CMD_WKUP_Handler(PCD_HandleTypeDef *pcd_handle) {
/* Reset SLEEPDEEP bit of Cortex System Control Register */
SCB->SCR &= (uint32_t)~((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
- /* 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) */
+ /* Configures system clock after wake-up from STOP: enable HSE/HSI, PLL and select
+ PLL as system clock source (HSE/HSI and PLL are disabled in STOP mode) */
- __HAL_RCC_HSE_CONFIG(MICROPY_HW_CLK_HSE_STATE);
+ __HAL_RCC_HSE_CONFIG(MICROPY_HW_RCC_HSE_STATE);
+ #if MICROPY_HW_CLK_USE_HSI
+ __HAL_RCC_HSI_ENABLE();
+ #endif
- /* Wait till HSE is ready */
- while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
+ /* Wait till HSE/HSI is ready */
+ while(__HAL_RCC_GET_FLAG(MICROPY_HW_RCC_FLAG_HSxRDY) == RESET)
{}
/* Enable the main PLL. */