Problem was found in ChibiOS/RT 3 (rev.7788): with enabled debug in chconf.h
Code: Select all
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
#define CH_DBG_ENABLE_CHECKS TRUE
#define CH_DBG_ENABLE_ASSERTS TRUE
Interrupt from timer TIM2 (STM32F105) generated after chThdSleepS() calling and before chSysUnlock(), resulting in lock_cnt != 0
See pictures. 1.png, 2.png, 3.png
Please suggest what is the reason and how to fix that. Is this a some sort of bug related to IRQ disable/enable while context switching or something?
Simple code:
Code: Select all
int main(void) {
halInit();
chSysInit();
while (1) chThdSleepMilliseconds(100);
}
Thanks.