diff options
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/platforms/STM32F1xx/hal_lld.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32F1xx/hal_lld.c b/os/hal/platforms/STM32F1xx/hal_lld.c index ad13c21f8..eb87a1a84 100644 --- a/os/hal/platforms/STM32F1xx/hal_lld.c +++ b/os/hal/platforms/STM32F1xx/hal_lld.c @@ -204,6 +204,10 @@ void stm32_clock_init(void) { while ((RCC->CFGR & RCC_CFGR_SWS) != (STM32_SW << 2))
; /* Waits selection complete. */
#endif
+
+#if !STM32_HSI_ENABLED
+ RCC->CR &= ~RCC_CR_HSION;
+#endif
#endif /* !STM32_NO_INIT */
}
@@ -285,6 +289,10 @@ void stm32_clock_init(void) { while ((RCC->CFGR & RCC_CFGR_SWS) != (STM32_SW << 2))
;
#endif
+
+#if !STM32_HSI_ENABLED
+ RCC->CR &= ~RCC_CR_HSION;
+#endif
#endif /* !STM32_NO_INIT */
}
#else
|