mbed library sources. Supersedes mbed-src. Fixed broken STM32F1xx RTC on rtc_api.c
Dependents: Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay
Fork of mbed-dev by
Diff: targets/TARGET_Freescale/TARGET_KLXX/rtc_api.c
- Revision:
- 175:af195413fb11
- Parent:
- 149:156823d33999
diff -r b96e65c34a4d -r af195413fb11 targets/TARGET_Freescale/TARGET_KLXX/rtc_api.c --- a/targets/TARGET_Freescale/TARGET_KLXX/rtc_api.c Mon Oct 02 15:33:19 2017 +0100 +++ b/targets/TARGET_Freescale/TARGET_KLXX/rtc_api.c Wed Oct 11 12:45:49 2017 +0100 @@ -26,7 +26,7 @@ // select RTC clock source SIM->SOPT1 &= ~SIM_SOPT1_OSC32KSEL_MASK; - + // Enable external crystal source if clock source is 32KHz if (extosc_frequency()==32768) { SIM->SOPT1 |= SIM_SOPT1_OSC32KSEL(OSC32KCLK); @@ -104,11 +104,6 @@ // disable counter RTC->SR &= ~RTC_SR_TCE_MASK; - // we do not write 0 into TSR - // to avoid invalid time - if (t == 0) - t = 1; - // write seconds RTC->TSR = t;