ChibiOS_17.6.3
This function was called from a thread, but the stack trace shows the chSysLockFromISR() was called:
Code: Select all
syssts_t chSysGetStatusAndLockX(void) {
syssts_t sts = port_get_irq_status();
if (port_irq_enabled(sts)) {
if (port_is_isr_context()) {
chSysLockFromISR();
}
else {
chSysLock();
}
}
return sts;
}
The stack trace:
Code: Select all
Thread #18 268439824 (Name: control_loop, State: CURRENT) (Suspended : Signal : SIGINT:Interrupt)
chSysHalt() at chsys.c:206 0x8026c64
_dbg_check_lock_from_isr() at chdebug.c:179 0x80251f6
chSysLockFromISR() at chsys.h:418 0x8026ac8
chSysGetStatusAndLockX() at chsys.c:371 0x8026ca2
osalSysGetStatusAndLockX() at osal.h:544 0x802a3f0
rtc_lld_get_time() at hal_rtc_lld.c:376 0x802a8e6
rtcGetTime() at hal_rtc.c:129 0x802a3dc
...
_port_thread_start() at chcoreasm_v7m.S:119 0x80003ae
How can I fix this?
Regards,
Vladimir