wdtps: xwdtps_polled_example.c File Reference

| wdtps Xilinx SDK Drivers API Documentation

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

Functions
xwdtps_polled_example.c File Reference

## Overview

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

This function assumes that the reset output of the Watchdog timer device is not connected to the reset of the processor.

Note

None.

MODIFICATION HISTORY:

      Ver   Who    Date     Changes

      1.00a ecm/jz 01/15/10 First release
    *

## Functions
int | WdtPsPolledExample (u16 DeviceId)
| This function does a minimal test on the System Watchdog Timer device and driver as a design example. More...
int | main (void)
| Main function to call the Wdt polled mode example. More...

## Function Documentation

int main | ( | void |  | ) |

Main function to call the Wdt polled mode example.

Parameters

  None |

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful

Note
  None

References WdtPsPolledExample().

int WdtPsPolledExample | ( | u16 | DeviceId | ) |

This function does a minimal test on the System 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 assumes that the reset output of the Watchdog timer device is not connected to the reset of the processor. The function allows the Watchdog Timer to timeout such that a reset will occur if it is connected. If the interrupt output is connected to an interrupt input, the user must handle the interrupts appropriately if the output is enabled.

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

Parameters

  DeviceId | is the unique device id of the device.

Returns
  XST_SUCCESS if successful, otherwise XST_FAILURE.

Note
  None.

References XWdtPs_Config::BaseAddress, XWDTPS_CCR_PSCALE_0008, XWdtPs_CfgInitialize(), XWDTPS_CLK_PRESCALE, XWDTPS_COUNTER_RESET, XWdtPs_DisableOutput(), XWdtPs_IsWdtExpired, XWdtPs_LookupConfig(), XWDTPS_RESET_SIGNAL, XWdtPs_RestartWdt, XWdtPs_SetControlValue(), and XWdtPs_Start().

Referenced by main().