This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

qestion

Can I test watch dog time out function when debug mode?

  • Yes, but you probably don't want to. If you have a chip where the watchdog continues even during a break, your normal debug sessions will fail because of false watchdog resets while you are busy reading the code and thinking about what you expect it to do.

    You normally run the debugger with the watchdog turned off. For live tests, you test with the watchdog enabled and expect that you get zero watchdog resets. When explicitly testing the watchdog, you add a version of the software that intentionally stops kicking the watchdog - maybe after a fixed time or after receiving a specific command - and you then validate that you get the recover you expected. Best is if you can deactivate the watchdog kicks at any time. An example is to read an input pin - when the pin toggles, you stop kicking. Then you can do many runs where the watchdog kick is stopped at random times.