aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-04-07 10:57:46 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-04-07 10:57:46 +0000
commit5c4430d5c8b27ae1440df218067ed7326817d529 (patch)
tree2e8404d1b98e6cf40c255e5e7d6463c8413ab27b /os
parent351b7594ff60e537134ad16d3d6b6cb2b8bf4ced (diff)
downloadChibiOS-5c4430d5c8b27ae1440df218067ed7326817d529.tar.gz
ChibiOS-5c4430d5c8b27ae1440df218067ed7326817d529.tar.bz2
ChibiOS-5c4430d5c8b27ae1440df218067ed7326817d529.zip
Fixed bug #399.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5564 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/STM32F1xx/hal_lld.c8
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