This example uses a push button event to simulate a deadlock in program so as to demonstrate how watchdog timer works.
This package can be used with SAM evaluation kits.
At first, the example configures the pins of LED and Console UART, enables the watchdog timer, and then prints some information via UART. Before user presses the push button that the information mentions, the LED keeps blinking and the counter of the watchdog timer is restarted before any fault of the watchdog timer occurs (the interrupt in this case). The example enters a deadlock status after user presses the push button and it causes that the counter will not be restarted until a fault occurs (the interrupt). In the interrupt handler, the counter is restarted.