From dc30b7afe9805ef162a147f0edf2b9dc66b1efa8 Mon Sep 17 00:00:00 2001 From: Michael Hasling Date: Mon, 29 Nov 2021 16:45:22 +0000 Subject: [PATCH] Fix initialisation sequence of RTC Initialisation of RTC was wrong for boot from sysreset, and resulted in RTOS with nothing to do in its main thread. This fixes the bug. --- targets/TARGET_Maxim/TARGET_MAX32630/rtc_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/TARGET_Maxim/TARGET_MAX32630/rtc_api.c b/targets/TARGET_Maxim/TARGET_MAX32630/rtc_api.c index aa0a86f76ba..3485f6a73b4 100644 --- a/targets/TARGET_Maxim/TARGET_MAX32630/rtc_api.c +++ b/targets/TARGET_Maxim/TARGET_MAX32630/rtc_api.c @@ -127,10 +127,10 @@ time_t rtc_read(void) //****************************************************************************** void lp_ticker_init(void) { + init_rtc(); RTC_DisableINT(MXC_F_RTC_INTEN_COMP0); NVIC_SetVector(RTC0_IRQn, (uint32_t)lp_ticker_irq_handler); NVIC_EnableIRQ(RTC0_IRQn); - init_rtc(); } //******************************************************************************