Electronic – Way to reset an MCU when it’s GPIO output becomes constant HIGH or LOW instead of a low frequency PWM

microcontrollerwatchdog

In one of our projects, we are observing MCU hanging up supposedly due to EFT. WDT is not helping. The only way to get the device into working condition is to reset the MCU by reset pin or power cycle.

Resetting/power cycle is not the most convenient way of solving this issue. I have an idea which can solve the issue but I am not sure how to implement it or whether a standard IC exists that can do the job. This IC should not be an MCU because this IC itself can hang.

Idea is to generate a low frequency PWM by toggling a GPIO which is then fed to a circuit/IC. The circuit/IC resets the MCU if it doesn't receive a PWM. I specifically need a PWM instead of constant HIGH/LOW because when the system hangs, the PIN can either get stuck to a HIGH or a LOW position.

Best Answer

First thing to do is to try and make your circuit more robust to the transients. It sounds like you are not sure if this is even the trigger for the lock ups, so it's worth pinning down the problem. It could just as well be a firmware problem.

As a watchdog IC, something like a TI TPS3813 would be suitable. This has a window watchdog, which you have to 'kick' within a fixed time window. The trigger is edge sensitive, so it doesn't matter if the MCU locks up high or low.

A good read on watchdog timers can be found at Jack Ganssle's page.