taskA is task with the highest pri(5).
ADC interrupt call xTaskNotifyFromISR with portYIELD_FROM_ISR to send notify to taskA. but taskA can’t be wakeup, since ucNotifyState of taskA always is 2.
and the taskA doesn’t seem like a dead loop. the taskA is simple.
ADC interrupt happened per 0.4ms, taskA need about 100us to handle the event .
the bug happened when device run for many times, The probability is very small, it appears randomly。
the lower pri task is still run when the bug happened. taskA call xTaskNotifyWait ,but nerver be blocked no matter ADC interrupt send notify to it.
Did you enable FreeRTOS - stacks and stack overflow checking and defined configASSERT ?
When it comes to this kind of strange effects it’s probably a memory/data corruption.
Which MCU is it and which port and FreeRTOS version do you use ?
Also the interrupt priority might be wrong (depending on the MCU) which should be catched by a configASSERT.
It’s also very helpful to post the relevant code. Otherwise it’s hard to guess what’s going wrong…
mcu is stm32H750, freertos version is 10.4.6。
adc interrupt pri is 6.
stacksize of taskA is 384, the pxtopofstack-pxstack < 384*4 when the issue happened