Initialize the timer. Configure
timer mode as one-shot down counting and enable the interrupt.
Determine the watchdog timeout
window. This parameter is the starting point for deciding the dog feed
frequency. In this example, we choose the watchdog timeout window = 1s.
Determine the output valid
voltage. This parameter is to connect monitored device reset pins. In this
example, we choose the reset valid voltage is low. In this case, when feeding
fails, the M0 is going to output low level signal.
Configure the timer clock
frequency. The equation Fclock= Sysclock/Timer clock prescaler* timeout.
Set watchdog-triggered signal,
which is the flag to decide whether to start the watchdog function.