Toyomasa Watarai / mbed-dev

Fork of mbed-dev by mbed official

Revision:
34:bb6061527455
Parent:
4:4a8e88c1ef9e
Child:
48:b854a29e778d
diff -r 7b49ef75af0b -r bb6061527455 targets/hal/TARGET_STM/TARGET_STM32F7/rtc_api.c
--- a/targets/hal/TARGET_STM/TARGET_STM32F7/rtc_api.c	Thu Dec 03 15:15:11 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_STM32F7/rtc_api.c	Mon Dec 07 08:00:11 2015 +0000
@@ -40,7 +40,7 @@
     RCC_OscInitTypeDef RCC_OscInitStruct;
     uint32_t rtc_freq = 0;
 
-    if(RTC->ISR == 7) {     // RTC initialization and status register (RTC_ISR), cold start (with no backup domain power) RTC reset value
+    if((RTC->ISR & RTC_ISR_INITS) ==  RTC_ISR_INITS) {     // RTC initialization and status register (RTC_ISR), cold start (with no backup domain power) RTC reset value
 
         RtcHandle.Instance = RTC;