scuwdt: xscuwdt_intr_example.c File Reference

| scuwdt Xilinx SDK 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

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

Parameters

  None. |

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_ISR_EVENT_FLAG_MASK, XSCUWDT_ISR_OFFSET, XScuWdt_IsTimerExpired, XScuWdt_LoadWdt, XScuWdt_LookupConfig(), XScuWdt_RestartWdt, XScuWdt_SelfTest(), XScuWdt_SetTimerMode, XScuWdt_Start(), XScuWdt_Stop(), and XScuWdt_WriteReg.

Referenced by main().