aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2017-07-26 16:49:32 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2017-07-26 16:49:32 +0000
commit4633e54ba996a03d63c3fa3efe7bfb222297a40e (patch)
treefd76c26b2538a868c3a739ff2207d1b8700341cd
parentb263680b98fbb41e939ce62e55916254ece4acc7 (diff)
downloadChibiOS-4633e54ba996a03d63c3fa3efe7bfb222297a40e.tar.gz
ChibiOS-4633e54ba996a03d63c3fa3efe7bfb222297a40e.tar.bz2
ChibiOS-4633e54ba996a03d63c3fa3efe7bfb222297a40e.zip
Fixed Bug #866
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10341 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/STM32/STM32L0xx/hal_lld.h12
-rw-r--r--readme.txt2
2 files changed, 8 insertions, 6 deletions
diff --git a/os/hal/ports/STM32/STM32L0xx/hal_lld.h b/os/hal/ports/STM32/STM32L0xx/hal_lld.h
index 7b7c0e10e..550308803 100644
--- a/os/hal/ports/STM32/STM32L0xx/hal_lld.h
+++ b/os/hal/ports/STM32/STM32L0xx/hal_lld.h
@@ -125,11 +125,11 @@
* @name RCC_CR register bits definitions
* @{
*/
-#define STM32_RTCPRE_MASK (3 << 29) /**< RTCPRE mask. */
-#define STM32_RTCPRE_DIV2 (0 << 29) /**< HSE divided by 2. */
-#define STM32_RTCPRE_DIV4 (1 << 29) /**< HSE divided by 4. */
-#define STM32_RTCPRE_DIV8 (2 << 29) /**< HSE divided by 2. */
-#define STM32_RTCPRE_DIV16 (3 << 29) /**< HSE divided by 16. */
+#define STM32_RTCPRE_MASK (3 << 20) /**< RTCPRE mask. */
+#define STM32_RTCPRE_DIV2 (0 << 20) /**< HSE divided by 2. */
+#define STM32_RTCPRE_DIV4 (1 << 20) /**< HSE divided by 4. */
+#define STM32_RTCPRE_DIV8 (2 << 20) /**< HSE divided by 2. */
+#define STM32_RTCPRE_DIV16 (3 << 20) /**< HSE divided by 16. */
/** @} */
/**
@@ -891,7 +891,7 @@
#elif (STM32_SW == STM32_SW_MSI)
#define STM32_SYSCLK STM32_MSICLK
#elif (STM32_SW == STM32_SW_HSI16)
-#define STM32_SYSCLK STM32_HSI16CLK
+#define STM32_SYSCLK STM32_HSI16DIVCLK
#elif (STM32_SW == STM32_SW_HSE)
#define STM32_SYSCLK STM32_HSECLK
#elif (STM32_SW == STM32_SW_PLL)
diff --git a/readme.txt b/readme.txt
index 64891650e..9b0165163 100644
--- a/readme.txt
+++ b/readme.txt
@@ -89,6 +89,8 @@
*****************************************************************************
*** Next ***
+- HAL: Fixed wrong bit mask in STM32L0 hal lld (bug #866)(backported to
+ 17.6.1 and 16.1.9).
- RT: Fixed misplaced assertion in semaphores code (bug #865)(backported to
17.6.1 and 16.1.9).
- HAL: Fixed STM32 USBv1 fails the state check when USB_USE_WAIT is TRUE