mbed library sources for GR-PEACH rev.B.
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
--- 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; }