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.
Dependents: Freedman_v2 Nucleo_i2c_OLED_BME280_copy
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/rtc_api.c
- Revision:
- 216:577900467c9e
- Parent:
- 174:8bb9f3a33240
- Child:
- 354:e67efb2aab0e
diff -r 83cf97a28428 -r 577900467c9e targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/rtc_api.c
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/rtc_api.c Tue May 27 08:30:06 2014 +0100
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/rtc_api.c Tue May 27 10:00:08 2014 +0100
@@ -90,7 +90,16 @@
}
void rtc_free(void) {
- RCC_DeInit(); // Resets the RCC clock configuration to the default reset state
+ // Reset RTC
+ PWR_RTCAccessCmd(ENABLE); // Enable access to Backup Domain
+ RTC_DeInit();
+ RCC_RTCResetCmd(ENABLE);
+ RCC_RTCResetCmd(DISABLE);
+ // Disable RTC, LSE and LSI clocks
+ RCC_RTCCLKCmd(DISABLE);
+ RCC_LSEConfig(RCC_LSE_OFF);
+ RCC_LSICmd(DISABLE);
+
rtc_inited = 0;
}
