aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F0xx/hal_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32F0xx/hal_lld.c')
-rw-r--r--os/hal/platforms/STM32F0xx/hal_lld.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32F0xx/hal_lld.c b/os/hal/platforms/STM32F0xx/hal_lld.c
index 401afe7e3..1e7a83e36 100644
--- a/os/hal/platforms/STM32F0xx/hal_lld.c
+++ b/os/hal/platforms/STM32F0xx/hal_lld.c
@@ -29,6 +29,10 @@
#include "ch.h"
#include "hal.h"
+/* TODO: LSEBYP like in F3.*/
+/* TODO: LSEDRV like in F3.*/
+/* TODO: PREDIV like in F3.*/
+
/*===========================================================================*/
/* Driver exported variables. */
/*===========================================================================*/
@@ -142,7 +146,13 @@ void stm32_clock_init(void) {
#if STM32_HSE_ENABLED
/* HSE activation.*/
+#if defined(STM32_HSE_BYPASS)
+ /* HSE Bypass.*/
+ RCC->CR |= RCC_CR_HSEON | RCC_CR_HSEBYP;
+#else
+ /* No HSE Bypass.*/
RCC->CR |= RCC_CR_HSEON;
+#endif
while (!(RCC->CR & RCC_CR_HSERDY))
; /* Waits until HSE is stable. */
#endif