Zephyr AXI WDT Driver Support
This page gives an overview of the AXI WDT Zephyr driver which is available as part of the zephyr-amd repo.
HW Features
AXI Timebase Watchdog Timer
Connects as a 32-bit slave on a AXI4-Lite interface
Programmable watchdog timer width
Watchdog timer with selectable timeout period and interrupt
Configurable WDT enable:
enable-afterorenable-repeatedlyOne 32-bit free-running timebase counter with rollover interrupt-dual control register
Configurable windowing mode with the following features:
Window Watchdog capability
Program Sequence Monitoring (PSM)
Second Sequence Timer (SST)
Fail counter (FC)
For more details refer: PG128-axi-timebase-wdt
Design Notes
N/A
Implementation
Features Supported
Driver supports only timebase feature.
Missing Features
Window Watchdog Mode is not supported.
Second Sequence timer is not supported.
Program sequence monitor is not supported.
Fail counter (FC) is not supported.
Known Issues
N/A
Limitations
N/A
Kernel Configuration
CONFIG_WATCHDOG=y CONFIG_WDT_XILINX_AXI=y CONFIG_WDT_XILINX_AXI_HWINFO_API=y
Device Tree
clk100: clock { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <100000000>; }; axi_timebase_wdt_0: watchdog@41a00000 { compatible = "xlnx,axi-timebase-wdt-3.0" , "xlnx,xps-timebase-wdt-1.00.a";reg = <0x41a00000 0x10000>; clocks = <&clk100>; xlnx,wdt-enable-once = <0x1>; status = "okay"; xlnx,wdt-interval = <0x1e>; };
Driver Stack Size
TBA
Example Tests
Test Name |
Example Source |
Description |
|---|---|---|
Watchdog Example |
zephyr/samples/drivers/watchdog/ |
This example demonstrates how to use the watchdog driver API. A typical use case for a watchdog is that the board is restarted in case some piece of code is kept in an infinite loop. |
Code Coverage
TBA
Performance Metric
TBA
Mainline Status
https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/watchdog/wdt_xilinx_axi.c
The preceding features are mainlined as of 18-March-2025
Driver Source Path
drivers/watchdog/wdt_xilinx_axi.c
Misra C Report
Per coding guidelines of zephyr (subset of MISRA-C)
Misra-C Rule |
Severity |
Actual File Violations |
Kernel Utility Violations |
|---|---|---|---|
HIS_COMF |
8 |
0 |
|
HIS_GOTO |
4 |
0 |
|
HIS_RETURN |
3 |
0 |
|
MISRA C-2012 Directive 4.6 |
Advisory |
16 |
0 |
MISRA C-2012 Directive 4.8 |
Advisory |
0 |
7 |
MISRA C-2012 Directive 4.9 |
Advisory |
0 |
3 |
MISRA C-2012 Rule 1.2 |
Advisory |
0 |
10 |
MISRA C-2012 Rule 10.1 |
Required |
23 |
6 |
MISRA C-2012 Rule 10.3 |
Required |
5 |
0 |
MISRA C-2012 Rule 10.4 |
Required |
27 |
0 |
MISRA C-2012 Rule 11.5 |
11 |
0 |
|
MISRA C-2012 Rule 11.8 |
Required |
0 |
6 |
MISRA C-2012 Rule 11.9 |
Required |
4 |
0 |
MISRA C-2012 Rule 12.1 |
Advisory |
10 |
0 |
MISRA C-2012 Rule 14.3 |
Required |
4 |
0 |
MISRA C-2012 Rule 14.4 |
Required |
3 |
0 |
MISRA C-2012 Rule 15.1 |
9 |
0 |
|
MISRA C-2012 Rule 15.4 |
0 |
3 |
|
MISRA C-2012 Rule 15.5 |
3 |
0 |
|
MISRA C-2012 Rule 2.4 |
3 |
0 |
|
MISRA C-2012 Rule 2.7 |
Advisory |
1 |
0 |
MISRA C-2012 Rule 20.10 |
0 |
1 |
|
MISRA C-2012 Rule 20.12 |
0 |
3 |
|
MISRA C-2012 Rule 21.2 |
6 |
0 |
|
MISRA C-2012 Rule 5.8 |
3 |
0 |
|
MISRA C-2012 Rule 5.9 |
0 |
4 |
|
MISRA C-2012 Rule 8.13 |
0 |
3 |
|
MISRA C-2012 Rule 8.4 |
1 |
0 |
|
MISRA C-2012 Rule 8.6 |
0 |
1 |
|
MISRA C-2012 Rule 8.7 |
3 |
1 |
|
Total violations |
147 |
48 |