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

Overview

This file contains a design example using the Xilinx SCU Private Watchdog Timer driver (XScuWdt) and hardware in Timer mode using interrupts.

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.00a sdm 01/15/10 First release 2.5 asa 07/18/23 Added support for system device tree based workflow decouplig flow. Interrupt wrapper support has also been added. 2.5 dp 09/08/23 Update example to stop wdt at end of the test 2.7 vlt 12/29/25 Update Doxygen comments to include SDT flow details. 2.7 ht 02/10/26 Fix unused parameter warnings.

#include "xparameters.h"
#include "xscuwdt.h"
#include "xil_exception.h"
#include "xil_printf.h"
#include "xinterrupt_wrap.h"

Functions

int ScuWdtIntrExample (XScuWdt *WdtInstancePtr, UINTPTR BaseAddress)
 This function tests the functioning of the Scu Private WDT driver and hardware in Timer mode using interrupts. More...
 
int main (void)
 Main function to call the Scu Private Wdt interrupt example. More...
 

Function Documentation

int main ( void  )

Main function to call the Scu Private Wdt interrupt example.

Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
None.

References ScuWdtIntrExample().

int ScuWdtIntrExample ( XScuWdt WdtInstancePtr,
UINTPTR  BaseAddress 
)

This function tests the functioning of the Scu Private WDT driver and hardware in Timer mode using interrupts.

After one expiration of the timeout interval, an interrupt is generated and the Event flag bit is set in the watchdog interrupt status register.

Parameters
WdtInstancePtris a pointer to the instance of XScuWdt driver.
BaseAddresscontains the base address of the device
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
None.

References XScuWdt_Config::BaseAddr, XScuWdt::Config, XScuWdt_Config::IntrId, XScuWdt_Config::IntrParent, XScuWdt_CfgInitialize(), XSCUWDT_CONTROL_IT_ENABLE_MASK, XScuWdt_GetControlReg, XSCUWDT_ISR_EVENT_FLAG_MASK, XSCUWDT_ISR_OFFSET, XScuWdt_IsTimerExpired, XScuWdt_LoadWdt, XScuWdt_LookupConfig(), XScuWdt_RestartWdt, XScuWdt_SelfTest(), XScuWdt_SetControlReg, XScuWdt_SetTimerMode, XScuWdt_Start(), XScuWdt_Stop(), and XScuWdt_WriteReg.

Referenced by main().