aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F0xx
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-10-23 20:51:36 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-10-23 20:51:36 +0000
commit7112dfa32e35f35998bf4ab05888317ef5aed59a (patch)
treee67e397e60dafc1f68437b0dba03eb5c2828120e /os/hal/platforms/STM32F0xx
parentefbd7db9789c18e465750646d51a5fab936c5fc6 (diff)
downloadChibiOS-7112dfa32e35f35998bf4ab05888317ef5aed59a.tar.gz
ChibiOS-7112dfa32e35f35998bf4ab05888317ef5aed59a.tar.bz2
ChibiOS-7112dfa32e35f35998bf4ab05888317ef5aed59a.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4777 35acf78f-673a-0410-8e92-d51de3d6d3f4
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.*/