I’m implementing a hardware-watchdog functionality on my LPC4078 with freeRTOS V8.2.0. I read many forum entries and searched on google for the best concept. Therefore I created a monitoring task which checks if all observed tasks did set their “I’m still running” - flag in a global variable.
These tasks have a lot of xTaskNotifyWait(), xQueueReceive() and xSemaphoreTake() - calls. Most of them get the parameter “xTicksToWait” as portMAX_DELAY (=0xFFFFFFFF) and maybe will wait for a long time.
How to deal with this in the watchdog concept?
Should I write while-loop around this functions with xTicksToWait=1000ms and trigger watchdog inside these loops?
Or is there a built-in possibility to trigger watchdog in the background inside these waiting functions?
Or is there a way to check clearly that the tasks is waiting in such a function and then skip watchdog check for this task? E.g. in blocked state? Or could block state have a any other meaning? And what if task is with 99,9% propability in blocked state and only for a very short time in running/ready so it would be nearly everytime be ignored (=senseless)?
Would be great if you have some good ideas how to deal with that - thank you!