aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F0xx
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32F0xx')
-rw-r--r--os/hal/platforms/STM32F0xx/hal_lld.c10
-rw-r--r--os/hal/platforms/STM32F0xx/hal_lld.h2
2 files changed, 11 insertions, 1 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
diff --git a/os/hal/platforms/STM32F0xx/hal_lld.h b/os/hal/platforms/STM32F0xx/hal_lld.h
index 4e64865ab..b8abe4bd5 100644
--- a/os/hal/platforms/STM32F0xx/hal_lld.h
+++ b/os/hal/platforms/STM32F0xx/hal_lld.h
@@ -792,7 +792,7 @@
#elif (STM32_SW == STM32_SW_HSE)
#define STM32_SYSCLK STM32_HSECLK
#else
-#error "invalid STM32_SYSCLK_SW value specified"
+#error "invalid STM32_SW value specified"
#endif
/* Check on the system clock.*/