| scuwdt Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
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

## Functions
int | ScuWdtIntrExample (XScuGic *IntcInstancePtr, XScuWdt *WdtInstancePtr, u16 WdtDeviceId, u16 WdtIntrId)
| 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 | ( | XScuGic * | IntcInstancePtr,
|  | XScuWdt * | WdtInstancePtr,
|  | u16 | WdtDeviceId,
|  | u16 | WdtIntrId
| ) |  |

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

  IntcInstancePtr | is a pointer to the instance of the XScuGic driver.
  WdtInstancePtr | is a pointer to the instance of XScuWdt driver.
  WdtDeviceId | is the Device ID of the XScuWdt device.
  WdtIntrId | is the Interrupt Id of the XScuWdt device.

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE.

Note
  None.

References XScuWdt_Config::BaseAddr, XScuWdt::Config, 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().