In this use case, the WDT is configured for:
- Window mode
- Timeout period of 16 ms
The use case enables the WDT in window mode, and resets it after 10 ms to prevent system reset before window timeout after 8 ms and after time out period of 16 ms.
Setup steps
Prerequisites
For the setup code of this use case to work, the following must be added to the project:
- Busy-Wait Delay Routines
Example code
Add to application initialization:
Workflow
- Set timeout period to 16 cycles or 16 ms:
- Enable WDT:
- Set window period to 8 cycles or 8 ms:
- Enable window mode:
Usage steps
Example code
Add to, e.g., main loop in application C-file:
Workflow
- Wait for 10 ms to not reset the WDT before window timeout:
- Reset the WDT before the timeout period is over to prevent system reset: