AXI Watchdog Timer standalone driver

AXI Watchdog Timer standalone driver



This page gives an overview of the bare-metal driver support for AXI Watchdog Timer.

Table of Contents

Introduction


This page gives an overview of Axi Watchdog timer driver /Window watchdog timer which is available as part of the Xilinx Vivado and SDK distribution.

The Xilinx® LogiCORE? IP AXI4-Lite Timebase Watchdog Timer (WDT) is a 32-bit peripheral that provides a 32-bit free-running
timebase and watchdog timer.

For more information, please refer  AXI_Timebase_Wdt_Doc

Same Driver supports for  Versal and Versal Gen 2 platform , and supports Generic watchdog and window watchdog features.

For more information, please refer Chapter 59: System Watchdog Timer Versal Trm which includes links to the official documentation and resource utilization. 

Driver Sources

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. 

Driver

Path in vitis

Path in Git Hub

Driver

Path in vitis

Path in Git Hub

wdttb

<Vitis Install Directory>/data/embedded/XilinxProcessorIPLib/drivers/wdttb

https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/wdttb

Note: To view the sources for a particular release, use the rel-version tag in github.  For example, for the 2020.1 release, the proper version of the code is: https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/wdttb

The driver source code is organized into different folders. The table below shows the wdttb driver source organization.

Directory

Description

Directory

Description

src

Driver source files, make and cmakelists file

examples

Example applications that show how to use the driver features

doc

Provides the API and data structure details

data

Driver .tcl , .mdd and .yaml files

Note: AMD Xilinx embeddedsw build flow is changed from 2023.2 release to adapt to the new system device tree based flow. For further information, refer to the wiki page Porting embeddedsw components to system device tree (SDT) based flow - Xilinx Wiki - Confluence (atlassian.net).

The .yaml(in data folder) and CMakeLists.txt(in src folder) files are needed for the System Device Tree based flow. The Driver .tcl and .mdd files are for the older build flow which will be deprecated in the future.



Driver Implementation

For a full list of features supported by this IP, please refer AXI_Timebase_Wdt_Doc

For a full list of features supported by this IP, please refer 59: System Watchdog Timer Versal Trm

Note: There are differences in the peripheral definitions and canonical definitions for AXI_TIMEBASE_WDT and PS WWDT peripherals between the XSCT/classic flow and the SDT flow. For SDT flow, the properties like xlnx,max-count-width, xlnx,enable-window-wdt, xlnx,sst-count-width are required only for Axi Timebase WDT when window is enabled. These properties return 0 when driver for PS WWDT is created. Similarly, xlnx,wdt-clk-freq-hz is required only for PS WWDT. It returns 0 when driver for Axi Timebase WDT is created.

Features

Driver Supported Features

The Axi watchdog timer Standalone driver support the below things.
All Controller Features supported.

WWDT Driver support:

  • Supports Generic Watch dog timer and polled and interrupt mode window watch dog feature.

  • Q&A mode not implemented.

Known Issues and Limitations

  • None



Example Applications

Refer 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.

Links to Examples

Examples Path:

https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/wdttb/examples



Example source

Description

Example source

Description

xwdttb_low_level_example.c

This example checks for Watchdog timer reset condition in two timer expiry state

xwdttb_selftest_example.c

This example does a minimal test on the watchdog timer timebase device and drive

xwdttb_example.c

This example tests the functioning of the TimeBase WatchDog Timer module in the polled mode

xwdttb_intr_example.c

This example tests the functioning of the TimeBase WatchDog Timer module in the interrupt mode

xwdttb_winwdt_example.c

This exampletests the functioning of the TimeBase WatchDog Timer module with window feature in the polled mode.

xwdttb_winwdt_intr_example.c

This example tests the functioning of the TimeBase WatchDog Timer module with window feature in the interrupt mode.

xwdttb_gwdt_selftest_example.c

This example does a minimal test on Generic watchdog timer device

xwdttb_gwdt_example.c

This example tests the functioning of the Generic watch dog Timer Feature in Polled mode

xwdttb_gwdt_intr_example.c

This example tests the functioning of the Generic watch dog Timer Feature in interrupt mode



Example Application Usage

WDTTB examples



Expected Output

xwdttb_low_level_example.c OUTPUT: Successfully ran WDTTB low level example. xwdttb_selftest_example.c OUTPUT: Successfully ran WDTTB self test example. xwdttb_example.c OUTPUT: Restart kick 1 ......................... Restart kick 2 ......................... Successfully ran WDTTB example xwdttb_intr_example.c OUTPUT: Successfully ran Window WDT interrupt example. xwdttb_winwdt_example.c OUTPUT: Restart kick 1 ......................... Restart kick 2 ......................... Successfully ran Window WDT example. xwdttb_winwdt_intr_example.c OUTPUT: Successfully ran Window WDT interrupt example. xwdttb_gwdt_selftest_example.c OUTPUT: Successfully ran GWDT self test example xwdttb_gwdt_example.c OUTPUT: Self test completed ................................................................................................................................. Refresh kick1 ................................................................................................................ Refresh kick2 ................................................................................................................ Refresh kick3 ................................................................................................................................................................................................................................................ Generic watchdog second window expired xwdttb_gwdt_intr_example.c OUTPUT: Successfully ran GWDT interrupt example



ChangeLog

2025.1

https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2025.1/doc/ChangeLog#L453

2024.2

https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2024.2/doc/ChangeLog#L135

2024.1

https://github.com/Xilinx/embeddedsw/blob/xilinx_v2024.1/doc/ChangeLog#L396

2023.2

https://github.com/Xilinx/embeddedsw/blob/xilinx_v2023.2/doc/ChangeLog#L618

2023.1

None

Related Links











© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy