From 992722df2ac6cc9d91631f6050b8496d10d45a9a Mon Sep 17 00:00:00 2001 From: bcostm Date: Tue, 10 Oct 2017 16:42:08 +0200 Subject: [PATCH] Initialize State variable --- targets/TARGET_STM/rtc_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/targets/TARGET_STM/rtc_api.c b/targets/TARGET_STM/rtc_api.c index 3be15602c6..fe6239177e 100644 --- a/targets/TARGET_STM/rtc_api.c +++ b/targets/TARGET_STM/rtc_api.c @@ -64,6 +64,7 @@ void rtc_init(void) HAL_PWR_EnableBkUpAccess(); RtcHandle.Instance = RTC; + RtcHandle.State = HAL_RTC_STATE_RESET; #if !RTC_LSI RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;