wdttb
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
xwdttb_gwdt_example.c File Reference

Overview

This file contains a example for using the Generic Watchdog Timer hardware and driver.

Note

None

MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 sne 03/04/19 Initial release for Generic Watchdog Timer. 5.0 sne 01/31/20 Removed compare value registers write while configuring Generic watchdog window. 5.7 sb 07/12/23 Added support for system device-tree flow. 5.9 ht 07/22/24 Add support for peripheral tests in SDT flow. 5.10 ht 10/28/24 Fix compilation warnings in SDT flow peripheral tests. 5.11 bkv 07/08/25 Fixed GCC Warnings. 5.12 vlt 12/18/25 Update Doxygen comments to include SDT flow details.

 
#include "xparameters.h"
#include "xwdttb.h"

Functions

int GWdtTbExample (XWdtTb *WdtTbInstancePtr, UINTPTR BaseAddress)
 This function tests the functioning of the Generic watch dog Timer Feature in Polled mode In this function polls up to First window completion, once we reached to generic_wdt_interrupt point it will Refresh. More...
 

Function Documentation

int GWdtTbExample ( XWdtTb WdtTbInstancePtr,
UINTPTR  BaseAddress 
)

This function tests the functioning of the Generic watch dog Timer Feature in Polled mode In this function polls up to First window completion, once we reached to generic_wdt_interrupt point it will Refresh.

In this function once we reach to Second window time out point It means generating generic_wdt_reset ,We are going to Refresh.

Parameters
WdtTbInstancePtris a pointer to the instance of XWdtTb driver.
BaseAddresscontains the base address of the device
Returns
  • XST_SUCCESS, in window, there is no bad event.
  • XST_FAILURE, otherwise.
Note
In XSCT/classic flow, DeviceId is used to look up the device configuration.

References XWdtTb_Config::BaseAddr, XWdtTb_CfgInitialize(), XWdtTb_IsGenericWdtFWExpired(), XWdtTb_IsWdtExpired(), XWdtTb_LookupConfig(), XWdtTb_RestartWdt(), XWdtTb_SelfTest(), XWdtTb_SetGenericWdtWindow(), XWdtTb_Start(), and XWdtTb_Stop().