aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-04-17 09:37:59 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-04-17 09:37:59 +0000
commit7ff77cde76baacf00fbfff68da625ad72f7c50f2 (patch)
treec054b0701bddbdacb0b5699ad6e2e1ce67afbf0a /os/hal
parentdbe04e034f0ac652cc1500012b7fec3828bab712 (diff)
downloadChibiOS-7ff77cde76baacf00fbfff68da625ad72f7c50f2.tar.gz
ChibiOS-7ff77cde76baacf00fbfff68da625ad72f7c50f2.tar.bz2
ChibiOS-7ff77cde76baacf00fbfff68da625ad72f7c50f2.zip
Fixed bug #583.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7900 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/ports/STM32/STM32L1xx/hal_lld.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/STM32L1xx/hal_lld.h b/os/hal/ports/STM32/STM32L1xx/hal_lld.h
index 36a772b91..f3e9bfd08 100644
--- a/os/hal/ports/STM32/STM32L1xx/hal_lld.h
+++ b/os/hal/ports/STM32/STM32L1xx/hal_lld.h
@@ -478,9 +478,15 @@
/* LSI related checks.*/
#if STM32_LSI_ENABLED
#else /* !STM32_LSI_ENABLED */
-#if STM32_RTCCLK == STM32_LSICLK
-#error "required LSI clock is not enabled"
+
+#if STM32_MCOSEL == STM32_MCOSEL_LSI
+#error "LSI not enabled, required by STM32_MCOSEL"
+#endif
+
+#if STM32_RTCSEL == STM32_RTCSEL_LSI
+#error "LSI not enabled, required by STM32_RTCSEL"
#endif
+
#endif /* !STM32_LSI_ENABLED */
/* LSE related checks.*/
@@ -492,9 +498,15 @@
#error "STM32_LSECLK outside acceptable range (1...1000kHz)"
#endif
#else /* !STM32_LSE_ENABLED */
-#if STM32_RTCCLK == STM32_LSECLK
-#error "required LSE clock is not enabled"
+
+#if STM32_MCOSEL == STM32_MCOSEL_LSE
+#error "LSE not enabled, required by STM32_MCOSEL"
+#endif
+
+#if STM32_RTCSEL == STM32_RTCSEL_LSE
+#error "LSE not enabled, required by STM32_RTCSEL"
#endif
+
#endif /* !STM32_LSE_ENABLED */
/* PLL related checks.*/