IntroductionThe watchdog timer can be used to prevent system lockup; for example, when software becomes trapped in a deadlock.
In normal operation, the user restarts the watchdog at regular intervals before the timer counts down to zero.
In cases where the timer does reach zero and the watchdog is enabled, one or a combination of the following signals is
generated: a system reset, an interrupt, or an external signal. The watchdog timeout period and the duration of any output signals are programmable.
For more information, please refer Chapter 14: Timers and clocks in Zynqmp Trmwhich includes links to the official documentation and resource utilization.
The source code for the driver is included with the Vitis Unified Software Platform installation, as well as being available in the Xilinx Github repository.
The driver source code is organized into different folders. The table below shows the scuwdt driver source organization.
|src||Driver source files|
|examples||Example applications that show how to use the driver features|
|doc||Provides the API and data structure details|
|data||Driver .tcl and .mdd file|
For a full list of features supported by this IP, please refer Chapter 14: Timers and clocks in Zynqmp Trm
Controller/Driver features supported
- 32-bit counter that generates an interrupt when it reaches zero
- 8-bit prescaler to enable better control of the interrupt period
- Configurable single-shot or auto-reload modes
- Configurable starting values for the counter
- can be used in watchdog mode or timer mode
Known issues and Limitations
Example ApplicationsRefer to the driver examples directory for various example applications that exercise the different features of the driver. Each application is linked in the table below. The following sections describe the usage and expected output of the various applications. These example applications can be imported into the Vitis IDE from the Board Support Package settings tab.
|Test Name||Example source||Description|
|Polled||xscuwdt_polled_example.c||This example tests the functioning of the Scu Private WDT driver and hardware in Timer mode using polled mode.|
|Interrupt||xscuwdt_intr_example.c||This example tests the functioning of the Scu Private WDT driver and hardware in Timer mode using interrupt mode.|
Example Application Usage