Skip to content

Commit dc30b7a

Browse files
committed
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.
1 parent c41145c commit dc30b7a

File tree

1 file changed

+1
-1
lines changed
  • targets/TARGET_Maxim/TARGET_MAX32630

1 file changed

+1
-1
lines changed

targets/TARGET_Maxim/TARGET_MAX32630/rtc_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ time_t rtc_read(void)
127127
//******************************************************************************
128128
void lp_ticker_init(void)
129129
{
130+
init_rtc();
130131
RTC_DisableINT(MXC_F_RTC_INTEN_COMP0);
131132
NVIC_SetVector(RTC0_IRQn, (uint32_t)lp_ticker_irq_handler);
132133
NVIC_EnableIRQ(RTC0_IRQn);
133-
init_rtc();
134134
}
135135

136136
//******************************************************************************

0 commit comments

Comments
 (0)