aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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