wdttb
Vitis Drivers API Documentation
|
This file contains a design example using the low-level driver macros of the Watchdog Timer Timebase driver.
These macros are found in xwdttb_l.h.
None.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00b rpm 04/26/02 First release 1.00b sv 04/26/05 Minor changes to comply to Doxygen and coding guidelines 2.00a ktn 22/10/09 Updated the example to use the HAL APIs/macros. The following macros defined in xwdttb_l.h file have been removed - XWdtTb_mEnableWdt, XWdtTb_mDisbleWdt, XWdtTb_mRestartWdt, XWdtTb_mGetTimebaseReg and XWdtTb_mHasReset. The example is updated to use XWdtTb_ReadReg and XWdtTb_WriteReg macros to achieve the functionality of the macros that were removed. Updated this example to check for Watchdog timer reset condition instead of timer expiry state to avoid a race condition 4.0 sha 02/04/16 Added debug messages. 5.7 sb 07/12/23 Added support for system device-tree flow.
Functions | |
int | XWdtTb_LowLevelExample (u32 WdtTbBaseAddress) |
This function assumes that the reset output of the watchdog timer timebase device is not connected to the reset of the processor. More... | |
int | main (void) |
Main function to call the Wdttb low level example. More... | |
int main | ( | void | ) |
Main function to call the Wdttb low level example.
References XWdtTb_LowLevelExample().
int XWdtTb_LowLevelExample | ( | u32 | WdtTbBaseAddress | ) |
This function assumes that the reset output of the watchdog timer timebase 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. This also assumes the interrupt output is not connected to an interrupt input.
This function checks for Watchdog timer reset condition in two timer expiry state. This function may require some time (seconds or even minutes) to execute because it waits for the watchdog timer to expire.
WdtTbBaseAddress | is the base address of the device. |
References XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_CSR0_EWDT1_MASK, XWT_CSR0_WDS_MASK, XWT_CSR0_WRS_MASK, XWT_CSRX_EWDT2_MASK, XWT_TWCSR0_OFFSET, and XWT_TWCSR1_OFFSET.
Referenced by main().