Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_STM32L1/rtc_api.c
- Revision:
- 522:aee49fe30179
- Parent:
- 496:543871686697
- Child:
- 568:08b2e7b6bab9
--- a/targets/hal/TARGET_STM/TARGET_STM32L1/rtc_api.c Thu Apr 23 08:30:10 2015 +0100
+++ b/targets/hal/TARGET_STM/TARGET_STM32L1/rtc_api.c Thu Apr 23 09:15:08 2015 +0100
@@ -86,8 +86,14 @@
__HAL_RCC_RTC_ENABLE();
RtcHandle.Init.HourFormat = RTC_HOURFORMAT_24;
+#ifdef TARGET_MOTE_L152RC
+ /* SubSecond resolution of 16384Hz */
+ RtcHandle.Init.AsynchPrediv = 1;
+ RtcHandle.Init.SynchPrediv = (rtc_freq / 2) - 1;
+#else
RtcHandle.Init.AsynchPrediv = 127;
RtcHandle.Init.SynchPrediv = (rtc_freq / 128) - 1;
+#endif
RtcHandle.Init.OutPut = RTC_OUTPUT_DISABLE;
RtcHandle.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH;
RtcHandle.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN;
