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-dev by
Diff: targets/hal/TARGET_STM/TARGET_STM32F0/rtc_api.c
- Revision:
- 34:bb6061527455
- Parent:
- 0:9b334a45a8ff
- Child:
- 48:b854a29e778d
diff -r 7b49ef75af0b -r bb6061527455 targets/hal/TARGET_STM/TARGET_STM32F0/rtc_api.c
--- a/targets/hal/TARGET_STM/TARGET_STM32F0/rtc_api.c	Thu Dec 03 15:15:11 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_STM32F0/rtc_api.c	Mon Dec 07 08:00:11 2015 +0000
@@ -45,6 +45,9 @@
     rtc_inited = 1;
 
     RtcHandle.Instance = RTC;
+	
+    // Check if RTC is already initialized
+    if ((RTC->ISR & RTC_ISR_INITS) ==  RTC_ISR_INITS) return;
 
     // Enable Power clock
     __PWR_CLK_ENABLE();
    