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.

  • \$\begingroup\$ If you use a hardware-based PWM peripheral to feed an external watchdog then your software could crash/lock-up but the hardware-based PWM could continue to run and prevent a watchdog reset. You should use the software to toggle the watchdog signal so that the toggling is more likely to stop when the software crashes. \$\endgroup\$
    – kkrambo
    Commented Feb 7, 2019 at 14:28
  • \$\begingroup\$ @kkrambo - you are right. I will do it in a way that you are suggesting. \$\endgroup\$ Commented Feb 7, 2019 at 18:05
  • \$\begingroup\$ lowpass filter the pwm, then use a window-comparator opamp that can trigger the RST pin. \$\endgroup\$
    – dandavis
    Commented Feb 7, 2019 at 18:44

1 Answer 1


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.

  • \$\begingroup\$ Thanks a lot. This appears to be the exact thing that I needed. You are right that I am not sure about the exact cause of the issue. However I did an EFT test on one of the products and it locked up. Once. Didn't happen again. Also, almost 300 units are deployed at 10-12 sites and we face this issue at 1-2 sites. As such we are assuming it to be more of a hardware fault as compared to firmware fault. While we are working to pin point the issue, I want to have a robust solution for upcoming projects. Jack's page is a great read. \$\endgroup\$ Commented Feb 7, 2019 at 10:06
  • \$\begingroup\$ I have a follow up question - Is reset same as power cycle when it comes to MCU lockups? Is there a chance that reset pin itself won't work and power cycle is the only way to fix the issue? \$\endgroup\$ Commented Feb 7, 2019 at 10:08
  • \$\begingroup\$ @Whiskeyjack No problem, glad that's helpful! As for reset vs power cycle, I would say it should be the same but check your MCU. Transients tend to cause glitches which may crash the software, but are less likely to lock up the hardware so the reset should propagate. \$\endgroup\$
    – awjlogan
    Commented Feb 7, 2019 at 10:15
  • \$\begingroup\$ Is there a chance that EFT/ESD can lock up the watchdog IC itself? \$\endgroup\$ Commented Feb 7, 2019 at 12:00
  • \$\begingroup\$ @Whiskeyjack Without knowing how your uC locks up, hard to say. It's probably a software crash rather than the hardware itself reaching a locked state. If the watchdog is affected by the glitch, then it will likely return to a default state i.e. reset the uC. You can add another layer above it, but you end up at the same point ("who watches the watcher"). \$\endgroup\$
    – awjlogan
    Commented Feb 7, 2019 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.