cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a watchdog?

LTing
Associate II

My touchgfx task is often frozen. I need to add a watchdog to the touchgfx task. When the task is frozen, the system can restart automatically.

How to add a watchdog in Touchgfx task?

​Thanks.

3 REPLIES 3
Ozone
Lead

The watchdog will not resolve your problem.

It is supposed as a measure of last resort. I would try to find the causal bug first.

The "freeze" - and it's causes - depend on your target and application. You can try to start the investigation from the fault handler side, like investigating the SCB register values if we speak about a Cortex M.

The "watchdog" depends on your target as well. Check the datasheet / reference manual.

HP
Senior III

@Ozone​ is right - the watchdog is a last resort if you can't fail gracefully. However, I would implement the watchdog in a separate task so you don't have to edit the graphics task. the only purpose that task will have is to reset the timer.

JimFouch
Associate III

If the error/lockup is in your GUI code, I'd try running in Visual Studio as simulator and put brake points in near the area of the lockup and walk through the code to find the issue.

It's one of the most powerful features of how they have ToughGFX setup.