From 5c4430d5c8b27ae1440df218067ed7326817d529 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 7 Apr 2013 10:57:46 +0000 Subject: [PATCH] Fixed bug #399. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5564 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32F1xx/hal_lld.c | 8 ++++++++ readme.txt | 1 + 2 files changed, 9 insertions(+) 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 diff --git a/readme.txt b/readme.txt index 626419d25..6ee12707e 100644 --- a/readme.txt +++ b/readme.txt @@ -89,6 +89,7 @@ ***************************************************************************** *** 2.5.2 *** +- FIX: Fixed STM32F103 HSI configuration (bug #399). - FIX: Fixed patch to allow simulator to be restarted quicker (bug #398). - FIX: Fixed blkDisconnect macro typo (bug #397). - FIX: Fixed STM32 SPI (V2) driver hangs (bug 3608241).