![]() |
wdttb
Xilinx SDK Drivers API Documentation
|
This file contains a design example using the TimeBase Watchdog Timer Device (WdtTb) driver and hardware device using interrupt mode (for the WDT interrupt).
This example assumes that the reset output of the WdtTb device is not connected to the reset of the processor. This example will not return if the interrupts are not working.
MODIFICATION HISTORY:
Ver Who Date Changes
4.0 sha 02/04/16 First release
Macros | |
#define | WIN_WDT_SW_COUNT 0xF00000 |
Number of clock cycles for second window. More... | |
#define | WIN_WDT_SBC_COUNT 16 |
Selected byte count. More... | |
#define | WIN_WDT_BSS_COUNT 2 |
Byte segment selected. More... | |
Functions | |
int | WinWdtIntrExample (INTC *IntcInstancePtr, XWdtTb *WdtTbInstancePtr, u16 WdtTbDeviceId, u16 WdtTbIntrId) |
This function tests the functioning of the Window Watchdog Timer in the interrupt mode. More... | |
int | main (void) |
Main function to call the WdtTb interrupt example. More... | |
#define WIN_WDT_BSS_COUNT 2 |
Byte segment selected.
#define WIN_WDT_SBC_COUNT 16 |
Selected byte count.
#define WIN_WDT_SW_COUNT 0xF00000 |
Number of clock cycles for second window.
int main | ( | void | ) |
Main function to call the WdtTb interrupt example.
None. |
References WinWdtIntrExample().
int WinWdtIntrExample | ( | INTC * | IntcInstancePtr, |
XWdtTb * | WdtTbInstancePtr, | ||
u16 | WdtTbDeviceId, | ||
u16 | WdtTbIntrId | ||
) |
This function tests the functioning of the Window Watchdog Timer in the interrupt mode.
This function waits for interrupt programmed point in second window. If the interrupt has occurred, interrupt handler sets a flag and restarts the timer. This function then clears the interrupt, flag and waits for second interrupt to occur and continue waiting for second interrupt as mentioned above.
This function assumes that the reset output of the Window Watchdog Timer is not connected to the reset of the processor. The function allows the Window Watchdog Timer to timeout such that a reset will occur if it is connected.
IntcInstancePtr | is a pointer to the instance of the INTC driver. |
WdtTbInstancePtr | is a pointer to the instance of WdtTb driver. |
WdtTbDeviceId | is the Device ID of the WdtTb Device and is typically XPAR_<WDTTB_instance>_DEVICE_ID value from xparameters.h. |
WdtTbIntrId | is the Interrupt Id of the WatchDog and is typically XPAR_<INTC_instance>_<WDTTB_instance>_WDT_ INTERRUPT_VEC_ID value from xparameters.h. |
References XWdtTb_Initialize(), and XWdtTb_SelfTest().
Referenced by main().