wdtps
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Groups Pages
xwdtps_selftest_example.c File Reference

Overview

This file contains a design example using the System Watchdog Timer driver (XWdtPs) and hardware device.

Note

None.

MODIFICATION HISTORY:

 Ver   Who    Date     Changes


1.00a sdm 05/27/11 First release 3.6 sb 06/27/23 Added support for system device-tree flow. 3.8 ht 06/18/24 Modify instance name to avoid multiple definition error. 3.9 vlt 12/18/25 Update Doxygen comments to include SDT flow details.

#include "xparameters.h"
#include "xwdtps.h"
#include "xil_printf.h"

Functions

int WdtPsSelfTestExample (UINTPTR BaseAddress)
 This function does a minimal test on the watchdog timer device and driver as a design example. More...
 
int main (void)
 Main function to call the self test example. More...
 

Function Documentation

int main ( void  )

Main function to call the self test example.

Returns
XST_SUCCESS if successful, XST_FAILURE if unsuccessful
Note
None

References WdtPsSelfTestExample().

int WdtPsSelfTestExample ( UINTPTR  BaseAddress)

This function does a minimal test on the watchdog timer device and driver as a design example.

The purpose of this function is to illustrate how to use the XWdtPs driver.

This function may require some time (seconds or even minutes) to execute because it waits for the watchdog timer to expire.

Parameters
BaseAddresscontains the base address of the device
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
In XSCT/classic flow, DeviceId is used to look up the device configuration.

References XWdtPs_Config::BaseAddress, XWdtPs_CfgInitialize(), XWdtPs_LookupConfig(), and XWdtPs_SelfTest().

Referenced by main().