Watch Dog management in an OS system

In a customized OS, how the watchdog timer must be managed ?
My question is…"if I have in the task A the rloading watchdog functions and the task B is running but for a firmware bugs in a special condition it loops on itself, the watchod will be reloaded the same (from task A)
How it’s possible to avoid this critical condition ?

Thanks in advance…Claudio

1 Like

Can you post code snippets at least pseudo code?

From what I understand, if you got two tasks running, and one loops for some reason (keeping interrupts active), then task switch shall happen and then resume after reloading watch dog.