mbed library sources. Supersedes mbed-src. RTC working even after reset

Fork of mbed-dev by mbed official

Files at this revision

API Documentation at this revision

Comitter:
olympux
Date:
Wed Sep 28 20:59:47 2016 +0000
Parent:
147:30b64687e01f
Commit message:
RTC working

Changed in this revision

targets/hal/TARGET_STM/TARGET_STM32F1/rtc_api.c Show annotated file Show diff for this revision Revisions of this file
diff -r 30b64687e01f -r 161ebc35dc3a targets/hal/TARGET_STM/TARGET_STM32F1/rtc_api.c
--- a/targets/hal/TARGET_STM/TARGET_STM32F1/rtc_api.c	Fri Sep 16 16:24:25 2016 +0100
+++ b/targets/hal/TARGET_STM/TARGET_STM32F1/rtc_api.c	Wed Sep 28 20:59:47 2016 +0000
@@ -31,6 +31,8 @@
 
 #if DEVICE_RTC
 
+#define DEVICE_RTC_LSI 1
+
 #include "mbed_error.h"
 
 static int rtc_inited = 0;
@@ -66,8 +68,8 @@
     HAL_PWR_EnableBkUpAccess();
 
     // Reset Backup domain
-    __HAL_RCC_BACKUPRESET_FORCE();
-    __HAL_RCC_BACKUPRESET_RELEASE();
+    //__HAL_RCC_BACKUPRESET_FORCE();
+    //__HAL_RCC_BACKUPRESET_RELEASE();
 	
 	// Enable LSI clock
 	RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI | RCC_OSCILLATORTYPE_LSE;