wdttb
Vitis Drivers API Documentation
|
This file contains a design example using the Watchdog Timer Timebase (XWdtTb) driver with window feature.
The WDTTB core will be generated either in legacy or window feature.
None
MODIFICATION HISTORY:
Ver Who Date Changes
4.0 sha 02/04/16 First release. 4.4 sne 03/04/19 Added support for Versal. 4.5 sne 09/27/19 Updated example file to support AXI Timebase WDT and WWDT. 5.0 sne 03/11/20 Added XWdtTb_ConfigureWDTMode api to configure mode. 5.7 sb 07/12/23 Added support for system device-tree flow.
Macros | |
#define | WDTTB_FW_COUNT 31 |
Number of clock cycles for first window. More... | |
#define | WDTTB_SW_COUNT 0x01110000 |
Number of clock cycles for second window. More... | |
#define | WDTTB_BYTE_COUNT 154 |
Selected byte count. More... | |
#define | WDTTB_BYTE_SEGMENT 2 |
Byte segment selected. More... | |
#define | WDTTB_SST_COUNT 0x00011000 |
Number of clock cycles for Second sequence Timer. More... | |
Functions | |
int | WinWdtTbExample (u16 DeviceId) |
This function tests the functioning of the TimeBase WatchDog Timer module with window feature in the polled mode. More... | |
int | main (void) |
Main function to call the example.This function is not included if the example is generated from the TestAppGen test tool. More... | |
#define WDTTB_BYTE_COUNT 154 |
Selected byte count.
Referenced by WinWdtTbExample().
#define WDTTB_BYTE_SEGMENT 2 |
Byte segment selected.
Referenced by WinWdtTbExample().
#define WDTTB_FW_COUNT 31 |
Number of clock cycles for first window.
Referenced by WinWdtTbExample().
#define WDTTB_SST_COUNT 0x00011000 |
Number of clock cycles for Second sequence Timer.
Referenced by WinWdtTbExample().
#define WDTTB_SW_COUNT 0x01110000 |
Number of clock cycles for second window.
Referenced by WinWdtTbExample().
int main | ( | void | ) |
Main function to call the example.This function is not included if the example is generated from the TestAppGen test tool.
int WinWdtTbExample | ( | u16 | DeviceId | ) |
This function tests the functioning of the TimeBase WatchDog Timer module with window feature in the polled mode.
In window, this function polls interrupt programmed point in second window, checks the interrupt bit is set. If the bit is set clears the bit and restart the watchdog timer. If bit is not cleared before overflowing the second window, the watchdog timer resets.
This function may require some time (seconds or even minutes) to execute because it waits for the watchdog timer to expire.
DeviceId | is the XPAR_<WDTB_instance>_DEVICE_ID value from xparameters.h. |
References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb_Config::IsPl, WDTTB_BYTE_COUNT, WDTTB_BYTE_SEGMENT, WDTTB_FW_COUNT, WDTTB_SST_COUNT, WDTTB_SW_COUNT, XWdtTb_CfgInitialize(), XWdtTb_ClearResetPending(), XWdtTb_DisableExtraProtection(), XWdtTb_DisableFailCounter(), XWdtTb_DisablePsm(), XWdtTb_DisableSst(), XWdtTb_EnableExtraProtection(), XWdtTb_EnableFailCounter(), XWdtTb_EnablePsm(), XWdtTb_EnableSst(), XWdtTb_IntrClear(), XWdtTb_LookupConfig(), XWDTTB_NO_BAD_EVENT, XWdtTb_ReadReg, XWdtTb_RestartWdt(), XWdtTb_SelfTest(), XWdtTb_SetByteCount(), XWdtTb_SetByteSegment(), XWdtTb_SetWindowCount(), XWdtTb_Start(), XWdtTb_Stop(), XWdtTb_WriteReg, XWT_STR_OFFSET, XWT_STR_WWDT_OFFSET, XWT_TSR0_OFFSET, XWT_TSR0_WWDT_OFFSET, XWT_TSR1_OFFSET, XWT_TSR1_WWDT_OFFSET, and XWT_WWDT.