From 86aa16bea61da8a8d156a7a928902a0bf4c85b73 Mon Sep 17 00:00:00 2001 From: T S Date: Sat, 7 Nov 2015 12:03:12 +0100 Subject: stmhal: Implement delayed RTC initialization with LSI fallback. If RTC is already running at boot then it's left alone. Otherwise, RTC is started at boot but startup function returns straight away. RTC startup is then finished the first time it is used. Fallback to LSI if LSE fails to start in a certain time. Also included: MICROPY_HW_CLK_LAST_FREQ hold pyb.freq() parameters in RTC backup reg MICROPY_HW_RTC_USE_US option to present datetime sub-seconds in microseconds MICROPY_HW_RTC_USE_CALOUT option to enable RTC calibration output CLK_LAST_FREQ and RTC_USE_CALOUT are enabled for PYBv1.0. --- stmhal/diskio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'stmhal/diskio.c') diff --git a/stmhal/diskio.c b/stmhal/diskio.c index a15dce1aa..8c8c8ee15 100644 --- a/stmhal/diskio.c +++ b/stmhal/diskio.c @@ -279,6 +279,7 @@ DWORD get_fattime ( void ) { + rtc_init_finalise(); RTC_TimeTypeDef time; RTC_DateTypeDef date; HAL_RTC_GetTime(&RTCHandle, &time, FORMAT_BIN); -- cgit v1.2.3