wdttb
Vitis Drivers API Documentation
Overview

Data Structures

struct  XWdtTb_Config
 This typedef contains configuration information for the device. More...
 
struct  XWdtTb
 The XWdtTb driver instance data. More...
 

Macros

#define XWDTTB_H
 by using protection macros More...
 
#define XWDTTB_HW_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XWT_GW_WR_MASK   0x00000001U
 Enable Generic Watchdog Warm Reset Register. More...
 
#define XWT_GWRR_MASK   0x00000001U
 Generic watchdog Refresh Register. More...
 
#define XWT_MAX_SELFTEST_LOOP_COUNT   0x00010000U
 Loopt count. More...
 
#define XWT_FW_COUNT   0x0U
 Fist Window count. More...
 
#define XWT_SW_COUNT   0x10000U
 Second window count. More...
 
#define XWT_GWOR_COUNT   0x00001000U
 Generic Watchdog Offset Regiser. More...
 

Enumerations

enum  XWdtTb_Event { XWDTTB_NO_BAD_EVENT = 0, XWDTTB_RS_KICK_EVENT, XWDTTB_TSR_MM_EVENT, XWDTTB_SEC_WIN_EVENT }
 This typedef contains enumeration of different events in basic mode. More...
 

Functions

s32 XWdtTb_CfgInitialize (XWdtTb *InstancePtr, const XWdtTb_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the AXI Timebase Watchdog Timer core. More...
 
s32 XWdtTb_Initialize (XWdtTb *InstancePtr, u16 DeviceId)
 Initialize a specific legacy/window watchdog timer/timebase instance/driver. More...
 
void XWdtTb_Start (XWdtTb *InstancePtr)
 This function starts the legacy or window watchdog timer. More...
 
s32 XWdtTb_Stop (XWdtTb *InstancePtr)
 This function disables the legacy or window watchdog timer. More...
 
u32 XWdtTb_IsWdtExpired (const XWdtTb *InstancePtr)
 This function checks if the legacy watchdog timer has expired or window watchdog timer either in second window or not in second window. More...
 
u32 XWdtTb_IsGenericWdtFWExpired (const XWdtTb *InstancePtr)
 This function checks if the Generic watchdog timer has First window expired or not. More...
 
void XWdtTb_RestartWdt (const XWdtTb *InstancePtr)
 This function restarts the legacy or window watchdog timer. More...
 
void XWdtTb_AlwaysEnable (const XWdtTb *InstancePtr)
 This function keeps Window Watchdog Timer always enabled. More...
 
void XWdtTb_ClearLastEvent (const XWdtTb *InstancePtr)
 This function clears event(s) that present after system reset. More...
 
void XWdtTb_ClearResetPending (const XWdtTb *InstancePtr)
 This function clears the window watchdog reset pending. More...
 
void XWdtTb_IntrClear (const XWdtTb *InstancePtr)
 This function clears window watchdog timer interrupt (WINT) bit. More...
 
void XWdtTb_SetByteCount (const XWdtTb *InstancePtr, u32 ByteCount)
 This function sets byte count to determine the interrupt assertion point in the second window configuration. More...
 
u32 XWdtTb_GetByteCount (const XWdtTb *InstancePtr)
 This function provides byte count value of the selected byte count in the second window configuration. More...
 
void XWdtTb_SetByteSegment (const XWdtTb *InstancePtr, u32 ByteSegment)
 This function sets byte segment selection to determine the interrupt assertion point in the second window configuration. More...
 
u32 XWdtTb_GetByteSegment (const XWdtTb *InstancePtr)
 This function provides byte segment selection in the second window configuration. More...
 
void XWdtTb_EnableSst (const XWdtTb *InstancePtr)
 This function enables Second Sequence Timer (SST) function. More...
 
void XWdtTb_DisableSst (const XWdtTb *InstancePtr)
 This function disables Second Sequence Timer (SST) function. More...
 
void XWdtTb_EnablePsm (const XWdtTb *InstancePtr)
 This function enables Program Sequence Monitor (PSM) function. More...
 
void XWdtTb_DisablePsm (const XWdtTb *InstancePtr)
 This function disables Program Sequence Monitor (PSM) function. More...
 
void XWdtTb_EnableFailCounter (XWdtTb *InstancePtr)
 This function enables Fail Counter (FC) function. More...
 
void XWdtTb_DisableFailCounter (XWdtTb *InstancePtr)
 This function disables Fail Counter (FC) function. More...
 
void XWdtTb_EnableExtraProtection (const XWdtTb *InstancePtr)
 This function provides extra safeguard against unintentional clear of WEN bit. More...
 
void XWdtTb_DisableExtraProtection (const XWdtTb *InstancePtr)
 This function enables unintentional clear of WEN bit. More...
 
void XWdtTb_SetWindowCount (const XWdtTb *InstancePtr, u32 FirstWinCount, u32 SecondWinCount)
 This function sets the count value for the first and second window. More...
 
void XWdtTb_SetGenericWdtWindow (const XWdtTb *InstancePtr, u32 GWOR_config)
 This function sets the count value for the GWDT_Compare_value_reg0 ,GWDT_Compare_value_reg1 & GWDT_Offset_regs . More...
 
void XWdtTb_SetGenericWdtWindowTimeOut (const XWdtTb *InstancePtr, u32 MilliSeconds)
 This function sets the count value for the GWDT_Offset_regs . More...
 
u32 XWdtTb_ProgramWDTWidth (const XWdtTb *InstancePtr, u32 width)
 This function programs the width of Watchdog Timer. More...
 
u8 XWdtTb_GenAnswer (u8 TokenVal, u8 AnsByteCnt, u8 TokenFdbk)
 This routine generates responses based on input token in QA mode. More...
 
XWdtTb_ConfigXWdtTb_LookupConfig (u16 DeviceId)
 This function returns a reference to an XWdtTb_Config structure based on the core id, DeviceId. More...
 
s32 XWdtTb_SelfTest (const XWdtTb *InstancePtr)
 This function runs a self-test on the timebase or window if enabled. More...
 
s32 XWdtTb_DisableWinWdt (XWdtTb *InstancePtr)
 This function disables Window Watchdog Timer feature. More...
 
void XWdtTb_EnableTimebaseWdt (XWdtTb *InstancePtr)
 This function enables Timebase Watchdog Timer feature. More...
 
s32 XWdtTb_DisableTimebaseWdt (XWdtTb *InstancePtr)
 This function Disable Timebase Watchdog Timer feature. More...
 

Variables

XWdtTb_Config XWdtTb_ConfigTable []
 Configuration table. More...
 
XWdtTb_Config XWdtTb_ConfigTable []
 Configuration table. More...
 

Register offsets for the WWDT core with Generic & windowing

feature with basic mode.

Each register is 32 bits.

#define XWT_MWR_OFFSET   0x0000U
 Master Write Control Register Offset. More...
 
#define XWT_ESR_OFFSET   0x0004U
 Enable & Status Register Offset. More...
 
#define XWT_FCR_OFFSET   0x0008U
 Function Control Register Register Offset. More...
 
#define XWT_FWR_OFFSET   0x000CU
 First Window Configuration Register Offset. More...
 
#define XWT_SWR_OFFSET   0x0010U
 Second Window Configuration Register Offset. More...
 
#define XWT_TSR0_WWDT_OFFSET   0x0018U
 Task Signature Register 0 Offset for WWDT. More...
 
#define XWT_TSR1_WWDT_OFFSET   0x001CU
 Task Signature Register 1 Offset for WWDT. More...
 
#define XWT_STR_WWDT_OFFSET   0x0020U
 Second Sequence Timer Register Offset for WWDT. More...
 
#define XWT_TSR0_OFFSET   0x0014U
 Task Signature Register 0 Offset. More...
 
#define XWT_TSR1_OFFSET   0x0018U
 Task Signature Register 1 Offset. More...
 
#define XWT_STR_OFFSET   0x001CU
 Second Sequence Timer Register Offset. More...
 
#define XWT_SSTWR_OFFSET   0x0014U
 Second Sequence Timer Window Configuration Register Offset. More...
 
#define XWT_TFR_OFFSET   0x0024U
 Token Feedback Register Offset. More...
 
#define XWT_TRR_OFFSET   0x0028U
 Token Response Register offset. More...
 
#define XWT_IENR_OFFSET   0x0030U
 Interrupt Enable Register Offset. More...
 
#define XWT_IDR_OFFSET   0x0034U
 Interrupt Disable Register Offset. More...
 
#define XWT_IMR_OFFSET   0x0038U
 Interrupt Mask Register Offset. More...
 
#define XWT_GWRR_OFFSET   0x1000U
 Generic Watchdog Refresh Register Offset. More...
 
#define XWT_GWCSR_OFFSET   0x2000U
 Generic Watchdog Control and Status Register Offset. More...
 
#define XWT_GWOR_OFFSET   0x2008U
 Generic Watchdog Offset Register Offset. More...
 
#define XWT_GWCVR0_OFFSET   0x2010U
 Generic Watchdog Compare Value Register 0 Offset. More...
 
#define XWT_GWCVR1_OFFSET   0x2014U
 Generic Watchdog Compare Value Register 1 Offset. More...
 
#define XWT_GW_WR_OFFSET   0x2FD0U
 Generic Watchdog Warm Reset Register Offset. More...
 

Register offsets for the AXI Timebase WDT core. Each register is 32

bits.

#define XWT_TWCSR0_OFFSET   0x00U
 Control/Status Register 0 Offset. More...
 
#define XWT_TWCSR1_OFFSET   0x04U
 Control/Status Register 1 Offset. More...
 
#define XWT_TBR_OFFSET   0x08U
 Timebase Register Offset. More...
 

Control/Status Register 0 bits

#define XWT_CSR0_WRS_MASK   0x00000008U
 Reset status Mask. More...
 
#define XWT_CSR0_WDS_MASK   0x00000004U
 Timer state Mask. More...
 
#define XWT_CSR0_EWDT1_MASK   0x00000002U
 Enable bit 1 Mask. More...
 

Control/Status Register 0/1 bits

#define XWT_CSRX_EWDT2_MASK   0x00000001U
 Enable bit 2 Mask. More...
 

Master Write Control bits

#define XWT_MWR_AEN_MASK   0x00000002U
 Always Enable Mask. More...
 
#define XWT_MWR_MWC_MASK   0x00000001U
 Master Write Control Mask. More...
 

Enable & Status Register bits

#define XWT_ESR_LBE_MASK   0x07000000U
 Last Bad Event Mask. More...
 
#define XWT_ESR_FCV_MASK   0x00700000U
 Fail Counter Value Mask. More...
 
#define XWT_ESR_WRP_MASK   0x00020000U
 Watchdog Reset Pending Mask. More...
 
#define XWT_ESR_WINT_MASK   0x00010000U
 Watchdog Interrupt Mask. More...
 
#define XWT_ESR_ACNT_MASK   0x0000C000U
 Answer Count Mask. More...
 
#define XWT_ESR_WSW_MASK   0x00000100U
 Watchdog Second Window Mask. More...
 
#define XWT_TOKEN_VAL_MASK   0x0000003CU
 Token Value Mask. More...
 
#define XWT_ESR_WCFG_MASK   0x00000002U
 Wrong Configuration Mask. More...
 
#define XWT_ESR_WEN_MASK   0x00000001U
 Window WDT Enable Mask. More...
 
#define XWT_ESR_LBE_SHIFT   24U
 Last Bad Event Shift. More...
 
#define XWT_ESR_FCV_SHIFT   20U
 Fail Counter Value Shift. More...
 
#define XWT_ESR_WRP_SHIFT   17U
 Watchdog Reset Pending Shift. More...
 
#define XWT_ESR_WINT_SHIFT   16U
 Watchdog Interrupt Shift. More...
 
#define XWT_ESR_ACNT_SHIFT   14U
 Watchdog Answer Cnt Shift. More...
 
#define XWT_ESR_WSW_SHIFT   8U
 Watchdog Second Window Shift. More...
 
#define XWT_ESR_TOKENVAL_SHIFT   2U
 Token Value Shift. More...
 
#define XWT_ESR_WCFG_SHIFT   1U
 Wrong Configuration Shift. More...
 

Function Control Register bits

#define XWT_FCR_SBC_MASK   0x0000FF00U
 Selected Byte Count Mask. More...
 
#define XWT_FCR_BSS_MASK   0x000000C0U
 Byte Segment Selection Mask. More...
 
#define XWT_FCR_SSTE_MASK   0x00000010U
 Second Sequence Timer Enable Mask. More...
 
#define XWT_FCR_PSME_MASK   0x00000008U
 Program Sequence Monitor Enable Mask. More...
 
#define XWT_FCR_FCE_MASK   0x00000004U
 Fail Counter Enable Mask. More...
 
#define XWT_FCR_WM_MASK   0x00000002U
 Window WDT Mode Mask. More...
 
#define XWT_FCR_WDP_MASK   0x00000001U
 Window WDT Disable Protection Mask. More...
 
#define XWT_FCR_SBC_SHIFT   8U
 Selected Byte Count Shift. More...
 
#define XWT_FCR_BSS_SHIFT   6U
 Byte Segment Selection Shift. More...
 
#define XWT_FCR_SSTE_SHIFT   4U
 Second Sequence Timer Enable Shift. More...
 
#define XWT_FCR_WM_SHIFT   1U
 Window WDT Mode Shift. More...
 

Token feedback register bits

#define XWT_TFR_FDBK_MASK   0x00000F00U
 feedback bit More...
 
#define XWT_TFR_SEED_MASK   0x0000000FU
 seed bit More...
 
#define XWT_TFR_FDBK_SHIFT   8U
 feedback bit shift More...
 

Token response register bits

#define XWT_TRR_ANS_MASK   0x000000FFU
 ANS bit. More...
 

Generic Watchdog Control and Status Register bits

#define XWT_GWCSR_GWEN_MASK   0x00000001U
 Watchdog enable bit. More...
 
#define XWT_GWCSR_GWS1_MASK   0x00000002U
 Generic_wdt_interrupt bit. More...
 
#define XWT_GWCSR_GWS2_MASK   0x00000004U
 Generic_wdt_reset bit. More...
 

Macro Definition Documentation

#define XWDTTB_H

by using protection macros

#define XWDTTB_HW_H_

Prevent circular inclusions by using protection macros.

#define XWT_CSR0_EWDT1_MASK   0x00000002U
#define XWT_CSR0_WDS_MASK   0x00000004U
#define XWT_CSR0_WRS_MASK   0x00000008U
#define XWT_CSRX_EWDT2_MASK   0x00000001U
#define XWT_ESR_ACNT_MASK   0x0000C000U

Answer Count Mask.

#define XWT_ESR_ACNT_SHIFT   14U

Watchdog Answer Cnt Shift.

#define XWT_ESR_FCV_MASK   0x00700000U

Fail Counter Value Mask.

Referenced by XWdtTb_DisableWinWdt().

#define XWT_ESR_FCV_SHIFT   20U

Fail Counter Value Shift.

Referenced by XWdtTb_DisableWinWdt().

#define XWT_ESR_LBE_MASK   0x07000000U

Last Bad Event Mask.

Referenced by XWdtTb_ClearLastEvent(), and XWdtTb_SelfTest().

#define XWT_ESR_LBE_SHIFT   24U

Last Bad Event Shift.

Referenced by XWdtTb_SelfTest().

#define XWT_ESR_OFFSET   0x0004U
#define XWT_ESR_TOKENVAL_SHIFT   2U

Token Value Shift.

#define XWT_ESR_WCFG_MASK   0x00000002U

Wrong Configuration Mask.

#define XWT_ESR_WCFG_SHIFT   1U

Wrong Configuration Shift.

#define XWT_ESR_WEN_MASK   0x00000001U

Window WDT Enable Mask.

Referenced by XWdtTb_DisableWinWdt(), and XWdtTb_SelfTest().

#define XWT_ESR_WINT_MASK   0x00010000U

Watchdog Interrupt Mask.

Referenced by XWdtTb_IntrClear().

#define XWT_ESR_WINT_SHIFT   16U

Watchdog Interrupt Shift.

#define XWT_ESR_WRP_MASK   0x00020000U

Watchdog Reset Pending Mask.

Referenced by XWdtTb_ClearResetPending().

#define XWT_ESR_WRP_SHIFT   17U

Watchdog Reset Pending Shift.

#define XWT_ESR_WSW_MASK   0x00000100U
#define XWT_ESR_WSW_SHIFT   8U

Watchdog Second Window Shift.

Referenced by XWdtTb_ClearLastEvent(), XWdtTb_DisableWinWdt(), XWdtTb_IntrClear(), and XWdtTb_IsWdtExpired().

#define XWT_FCR_BSS_MASK   0x000000C0U

Byte Segment Selection Mask.

Referenced by XWdtTb_GetByteSegment(), and XWdtTb_SetByteSegment().

#define XWT_FCR_BSS_SHIFT   6U

Byte Segment Selection Shift.

Referenced by XWdtTb_GetByteSegment(), and XWdtTb_SetByteSegment().

#define XWT_FCR_FCE_MASK   0x00000004U

Fail Counter Enable Mask.

Referenced by XWdtTb_DisableFailCounter(), and XWdtTb_EnableFailCounter().

#define XWT_FCR_PSME_MASK   0x00000008U

Program Sequence Monitor Enable Mask.

Referenced by XWdtTb_DisablePsm(), and XWdtTb_EnablePsm().

#define XWT_FCR_SBC_MASK   0x0000FF00U

Selected Byte Count Mask.

Referenced by XWdtTb_GetByteCount(), and XWdtTb_SetByteCount().

#define XWT_FCR_SBC_SHIFT   8U

Selected Byte Count Shift.

Referenced by XWdtTb_GetByteCount(), and XWdtTb_SetByteCount().

#define XWT_FCR_SSTE_MASK   0x00000010U

Second Sequence Timer Enable Mask.

Referenced by XWdtTb_DisableSst(), and XWdtTb_EnableSst().

#define XWT_FCR_SSTE_SHIFT   4U

Second Sequence Timer Enable Shift.

#define XWT_FCR_WDP_MASK   0x00000001U

Window WDT Disable Protection Mask.

Referenced by XWdtTb_DisableExtraProtection(), and XWdtTb_EnableExtraProtection().

#define XWT_FCR_WM_MASK   0x00000002U

Window WDT Mode Mask.

Referenced by XWdtTb_DisableWinWdt(), and XWdtTb_IntrClear().

#define XWT_FCR_WM_SHIFT   1U

Window WDT Mode Shift.

#define XWT_FW_COUNT   0x0U

Fist Window count.

Referenced by XWdtTb_SelfTest().

#define XWT_FWR_OFFSET   0x000CU

First Window Configuration Register Offset.

Referenced by XWdtTb_SelfTest(), and XWdtTb_SetWindowCount().

#define XWT_GW_WR_MASK   0x00000001U

Enable Generic Watchdog Warm Reset Register.

Referenced by XWdtTb_CfgInitialize().

#define XWT_GW_WR_OFFSET   0x2FD0U

Generic Watchdog Warm Reset Register Offset.

Referenced by XWdtTb_CfgInitialize().

#define XWT_GWCSR_GWEN_MASK   0x00000001U

Watchdog enable bit.

Referenced by XWdtTb_SelfTest().

#define XWT_GWCSR_GWS1_MASK   0x00000002U

Generic_wdt_interrupt bit.

Referenced by XWdtTb_IsGenericWdtFWExpired().

#define XWT_GWCSR_GWS2_MASK   0x00000004U

Generic_wdt_reset bit.

Referenced by XWdtTb_IsWdtExpired().

#define XWT_GWCSR_OFFSET   0x2000U

Generic Watchdog Control and Status Register Offset.

Referenced by XWdtTb_IsGenericWdtFWExpired(), XWdtTb_IsWdtExpired(), and XWdtTb_SelfTest().

#define XWT_GWCVR0_OFFSET   0x2010U

Generic Watchdog Compare Value Register 0 Offset.

#define XWT_GWCVR1_OFFSET   0x2014U

Generic Watchdog Compare Value Register 1 Offset.

#define XWT_GWOR_COUNT   0x00001000U

Generic Watchdog Offset Regiser.

Referenced by XWdtTb_SelfTest().

#define XWT_GWOR_OFFSET   0x2008U

Generic Watchdog Offset Register Offset.

Referenced by XWdtTb_SelfTest(), XWdtTb_SetGenericWdtWindow(), and XWdtTb_SetGenericWdtWindowTimeOut().

#define XWT_GWRR_MASK   0x00000001U

Generic watchdog Refresh Register.

Referenced by XWdtTb_RestartWdt().

#define XWT_GWRR_OFFSET   0x1000U

Generic Watchdog Refresh Register Offset.

Referenced by XWdtTb_RestartWdt(), and XWdtTb_SelfTest().

#define XWT_IDR_OFFSET   0x0034U

Interrupt Disable Register Offset.

#define XWT_IENR_OFFSET   0x0030U

Interrupt Enable Register Offset.

#define XWT_IMR_OFFSET   0x0038U

Interrupt Mask Register Offset.

#define XWT_MAX_SELFTEST_LOOP_COUNT   0x00010000U

Loopt count.

Referenced by XWdtTb_SelfTest().

#define XWT_MWR_AEN_MASK   0x00000002U

Always Enable Mask.

Referenced by XWdtTb_AlwaysEnable().

#define XWT_MWR_MWC_MASK   0x00000001U

Master Write Control Mask.

#define XWT_MWR_OFFSET   0x0000U

Master Write Control Register Offset.

Referenced by XWdtTb_AlwaysEnable(), XWdtTb_ProgramWDTWidth(), and XWdtTb_SelfTest().

#define XWT_SSTWR_OFFSET   0x0014U

Second Sequence Timer Window Configuration Register Offset.

#define XWT_STR_OFFSET   0x001CU

Second Sequence Timer Register Offset.

Referenced by WinWdtTbExample().

#define XWT_STR_WWDT_OFFSET   0x0020U

Second Sequence Timer Register Offset for WWDT.

Referenced by WinWdtTbExample().

#define XWT_SW_COUNT   0x10000U

Second window count.

Referenced by XWdtTb_SelfTest().

#define XWT_SWR_OFFSET   0x0010U

Second Window Configuration Register Offset.

Referenced by XWdtTb_SelfTest(), and XWdtTb_SetWindowCount().

#define XWT_TBR_OFFSET   0x08U

Timebase Register Offset.

Referenced by XWdtTb_SelfTest().

#define XWT_TFR_FDBK_MASK   0x00000F00U

feedback bit

#define XWT_TFR_FDBK_SHIFT   8U

feedback bit shift

#define XWT_TFR_OFFSET   0x0024U

Token Feedback Register Offset.

#define XWT_TFR_SEED_MASK   0x0000000FU

seed bit

#define XWT_TOKEN_VAL_MASK   0x0000003CU

Token Value Mask.

#define XWT_TRR_ANS_MASK   0x000000FFU

ANS bit.

#define XWT_TRR_OFFSET   0x0028U

Token Response Register offset.

#define XWT_TSR0_OFFSET   0x0014U

Task Signature Register 0 Offset.

Referenced by WinWdtTbExample().

#define XWT_TSR0_WWDT_OFFSET   0x0018U

Task Signature Register 0 Offset for WWDT.

Referenced by WinWdtTbExample().

#define XWT_TSR1_OFFSET   0x0018U

Task Signature Register 1 Offset.

Referenced by WinWdtTbExample().

#define XWT_TSR1_WWDT_OFFSET   0x001CU

Task Signature Register 1 Offset for WWDT.

Referenced by WinWdtTbExample().

#define XWT_TWCSR0_OFFSET   0x00U
#define XWT_TWCSR1_OFFSET   0x04U

Control/Status Register 1 Offset.

Referenced by XWdtTb_DisableTimebaseWdt(), XWdtTb_EnableTimebaseWdt(), and XWdtTb_LowLevelExample().

Enumeration Type Documentation

This typedef contains enumeration of different events in basic mode.

Enumerator
XWDTTB_NO_BAD_EVENT 

No bad event.

XWDTTB_RS_KICK_EVENT 

Restart kick or disable attempt in first window.

XWDTTB_TSR_MM_EVENT 

TSR mismatch.

XWDTTB_SEC_WIN_EVENT 

Second window overflow.

Function Documentation

void XWdtTb_AlwaysEnable ( const XWdtTb InstancePtr)

This function keeps Window Watchdog Timer always enabled.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
This must be called before Window WDT is enabled. Once Window WDT is enabled, it can only be disabled by applying reset.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_MWR_AEN_MASK, and XWT_MWR_OFFSET.

s32 XWdtTb_CfgInitialize ( XWdtTb InstancePtr,
const XWdtTb_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the AXI Timebase Watchdog Timer core.

This function must be called prior to using the core. Initialization of the core includes setting up the instance data and ensuring the hardware is in a quiescent state.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
CfgPtrpoints to the configuration structure associated with the AXI Timebase Watchdog Timer core.
EffectiveAddris the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
  • XST_SUCCESS if initialization was successful.
  • XST_DEVICE_IS_STARTED if the device has already been started.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb_Config::Clock, XWdtTb::Config, XWdtTb_Config::DeviceId, XWdtTb::EnableFailCounter, XWdtTb::EnableWinMode, XWdtTb_Config::EnableWinWdt, XWdtTb_Config::IsPl, XWdtTb::IsReady, XWdtTb::IsStarted, XWdtTb_Config::MaxCountWidth, XWdtTb_Config::SstCountWidth, XWdtTb_WriteReg, XWT_GW_WR_MASK, and XWT_GW_WR_OFFSET.

Referenced by GWdtIntrExample(), GWdtTbExample(), GWdtTbSelfTestExample(), WdtTbExample(), WdtTbIntrExample(), WdtTbSelfTestExample(), WinWdtIntrExample(), and WinWdtTbExample().

void XWdtTb_ClearLastEvent ( const XWdtTb InstancePtr)

This function clears event(s) that present after system reset.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
Event can be cleared by applying reset to the core followed by writing 111. Writing any other pattern has no effect.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_ESR_LBE_MASK, XWT_ESR_OFFSET, XWT_ESR_WSW_MASK, XWT_ESR_WSW_SHIFT, and XWT_ONE.

void XWdtTb_ClearResetPending ( const XWdtTb InstancePtr)

This function clears the window watchdog reset pending.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_ESR_OFFSET, and XWT_ESR_WRP_MASK.

Referenced by WinWdtTbExample().

void XWdtTb_DisableExtraProtection ( const XWdtTb InstancePtr)

This function enables unintentional clear of WEN bit.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
This function must be called before Window WDT start/enable or after Window WDT stop/disable.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_OFFSET, and XWT_FCR_WDP_MASK.

Referenced by WinWdtTbExample().

void XWdtTb_DisableFailCounter ( XWdtTb InstancePtr)

This function disables Fail Counter (FC) function.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
This function must be called before Window WDT start/enable or after Window WDT stop/disable.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableFailCounter, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_FCE_MASK, and XWT_FCR_OFFSET.

Referenced by WinWdtIntrExample(), and WinWdtTbExample().

void XWdtTb_DisablePsm ( const XWdtTb InstancePtr)

This function disables Program Sequence Monitor (PSM) function.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
This function must be called before Window WDT start/enable or after Window WDT stop/disable.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_OFFSET, and XWT_FCR_PSME_MASK.

Referenced by WinWdtIntrExample(), and WinWdtTbExample().

void XWdtTb_DisableSst ( const XWdtTb InstancePtr)

This function disables Second Sequence Timer (SST) function.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
This function must be called before Window WDT start/enable or after Window WDT stop/disable.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_OFFSET, and XWT_FCR_SSTE_MASK.

Referenced by WinWdtIntrExample(), and WinWdtTbExample().

s32 XWdtTb_DisableTimebaseWdt ( XWdtTb InstancePtr)

This function Disable Timebase Watchdog Timer feature.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
  • XST_SUCESS, if Timebase WDT feature is disabled.
  • XST_FAILURE, if Timebase WDT feature is not disabled.
Note
This will Disable Timebase Watchdog Timer.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::IsStarted, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_CSR0_EWDT1_MASK, XWT_CSRX_EWDT2_MASK, XWT_TWCSR0_OFFSET, XWT_TWCSR1_OFFSET, and XWT_ZERO.

Referenced by XWdtTb_Stop().

s32 XWdtTb_DisableWinWdt ( XWdtTb InstancePtr)

This function disables Window Watchdog Timer feature.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
  • XST_SUCESS, if Window WDT feature is disabled.
  • XST_FAILURE, if Window WDT feature is not disabled. Refer note section for the reasons.
Note
  • Disabling watchdog in first window duration is considered as bade event. It can only be disabled in the second window duration.
  • If fail counter is enabled, watchdog can be disabled only when fail counter is zero.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableFailCounter, XWdtTb::EnableWinMode, XWdtTb::IsStarted, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_ESR_FCV_MASK, XWT_ESR_FCV_SHIFT, XWT_ESR_OFFSET, XWT_ESR_WEN_MASK, XWT_ESR_WSW_MASK, XWT_ESR_WSW_SHIFT, XWT_FCR_OFFSET, XWT_FCR_WM_MASK, XWT_ONE, and XWT_ZERO.

Referenced by XWdtTb_Stop().

void XWdtTb_EnableExtraProtection ( const XWdtTb InstancePtr)

This function provides extra safeguard against unintentional clear of WEN bit.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
This function must be called before Window WDT start/enable or after Window WDT stop/disable.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_OFFSET, and XWT_FCR_WDP_MASK.

Referenced by WinWdtTbExample().

void XWdtTb_EnableFailCounter ( XWdtTb InstancePtr)

This function enables Fail Counter (FC) function.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
  • This function must be called before Window WDT start/enable or after Window WDT stop/disable.
  • When fail counter is enabled, reset is generated when fail counter is 7 and another bad event happens.
  • When fail counter is disabled, one bad event triggers reset either immediately when SST is disabled or after SST count delay when SST is enabled.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableFailCounter, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_FCE_MASK, and XWT_FCR_OFFSET.

Referenced by WinWdtTbExample().

void XWdtTb_EnablePsm ( const XWdtTb InstancePtr)

This function enables Program Sequence Monitor (PSM) function.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
  • This function must be called before Window WDT start/enable or after Window WDT stop/disable.
  • PSM enables Task Signature Register comparison. When PSM is enabled, core checks and compares the contents of TSR0 and TSR1 registers at the restart kick/disablement of Window WDT in second window. If they match, no effect. If they do not match, reset is generated either immediately when SST is disabled or after SST count delay when SST is enabled.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_OFFSET, and XWT_FCR_PSME_MASK.

Referenced by WinWdtTbExample().

void XWdtTb_EnableSst ( const XWdtTb InstancePtr)

This function enables Second Sequence Timer (SST) function.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
  • This function must be called before Window WDT start/enable or after Window WDT stop/disable.
  • SST provides additional time to software by delaying the inevitable window watchdog reset generation by SST count (SC) delay. This is an independent function and can be enabled in any mode w/ or w/o other options.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_OFFSET, and XWT_FCR_SSTE_MASK.

Referenced by WinWdtTbExample().

void XWdtTb_EnableTimebaseWdt ( XWdtTb InstancePtr)

This function enables Timebase Watchdog Timer feature.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
This will Start the Timebase Watchdog timer.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::IsStarted, 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 XWdtTb_Start().

u8 XWdtTb_GenAnswer ( u8  TokenVal,
u8  AnsByteCnt,
u8  TokenFdbk 
)

This routine generates responses based on input token in QA mode.

Parameters
TokenVal: Token value read from TVAL
AnsByteCnt: Byte on which response is generated
TokenFdbk,:Token feedback value read from TFR
Returns
Response byte (calculated based on logic given WWDT architecture)
Note
None.
u32 XWdtTb_GetByteCount ( const XWdtTb InstancePtr)

This function provides byte count value of the selected byte count in the second window configuration.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
Byte count value of the selected byte count in the second window configuration.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWT_FCR_OFFSET, XWT_FCR_SBC_MASK, and XWT_FCR_SBC_SHIFT.

u32 XWdtTb_GetByteSegment ( const XWdtTb InstancePtr)

This function provides byte segment selection in the second window configuration.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
Byte segment selection value as
  • 0 = Second window byte 0 selected.
  • 1 = Second window byte 1 selected.
  • 2 = Second window byte 2 selected.
  • 3 = Second window byte 3 selected.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWT_FCR_BSS_MASK, XWT_FCR_BSS_SHIFT, and XWT_FCR_OFFSET.

s32 XWdtTb_Initialize ( XWdtTb InstancePtr,
u16  DeviceId 
)

Initialize a specific legacy/window watchdog timer/timebase instance/driver.

This function must be called before other functions of the driver are called.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
DeviceIdis the unique id of the device controlled by this XWdtTb instance. Passing in a device id associates the generic XWdtTb instance to a specific device, as chosen by the caller or application developer.
Returns
  • XST_SUCCESS if initialization was successful
  • XST_DEVICE_IS_STARTED if the device has already been started
  • XST_DEVICE_NOT_FOUND if the configuration for device ID was not found
Note
None.

References XWdtTb::Config, XWdtTb::EnableFailCounter, XWdtTb::EnableWinMode, XWdtTb::IsReady, XWdtTb::IsStarted, and XWdtTb_LookupConfig().

void XWdtTb_IntrClear ( const XWdtTb InstancePtr)

This function clears window watchdog timer interrupt (WINT) bit.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_ESR_OFFSET, XWT_ESR_WINT_MASK, XWT_ESR_WSW_MASK, XWT_ESR_WSW_SHIFT, XWT_FCR_OFFSET, XWT_FCR_WM_MASK, and XWT_ONE.

Referenced by WinWdtIntrExample(), and WinWdtTbExample().

u32 XWdtTb_IsGenericWdtFWExpired ( const XWdtTb InstancePtr)

This function checks if the Generic watchdog timer has First window expired or not.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
  • TRUE, if the Generic watchdog timer First window has expired.
  • FALSE if the Generic watchdog is not expired First window.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb_ReadReg, XWT_GWCSR_GWS1_MASK, and XWT_GWCSR_OFFSET.

Referenced by GWdtTbExample().

u32 XWdtTb_IsWdtExpired ( const XWdtTb InstancePtr)

This function checks if the legacy watchdog timer has expired or window watchdog timer either in second window or not in second window.

This function is used for polled mode in legacy watchdog timer.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
  • TRUE, if the legacy watchdog timer has expired or window watchdog timer is not in second window.
  • FALSE if the legacy watchdog is not expired or window watchdog is in second window.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_Config::IsPl, XWdtTb::IsReady, XWdtTb_ReadReg, XWT_CSR0_WDS_MASK, XWT_CSR0_WRS_MASK, XWT_ESR_OFFSET, XWT_ESR_WSW_MASK, XWT_ESR_WSW_SHIFT, XWT_GWCSR_GWS2_MASK, XWT_GWCSR_OFFSET, and XWT_TWCSR0_OFFSET.

Referenced by GWdtTbExample(), and WdtTbExample().

XWdtTb_Config * XWdtTb_LookupConfig ( u16  DeviceId)

This function returns a reference to an XWdtTb_Config structure based on the core id, DeviceId.

The return value will refer to an entry in the device configuration table defined in the xwdttb_g.c file.

Parameters
DeviceIdis the unique core ID of the XWdtTb core for the lookup operation.
Returns
XWdtTb_LookupConfig returns a reference to a config record in the configuration table (in xwdttb_g.c) corresponding to DeviceId, or NULL if no match is found.
Note
None.

References XWdtTb_ConfigTable.

Referenced by GWdtIntrExample(), GWdtTbExample(), GWdtTbSelfTestExample(), WdtTbExample(), WdtTbIntrExample(), WdtTbSelfTestExample(), WinWdtIntrExample(), WinWdtTbExample(), and XWdtTb_Initialize().

u32 XWdtTb_ProgramWDTWidth ( const XWdtTb InstancePtr,
u32  width 
)

This function programs the width of Watchdog Timer.

Parameters
InstancePtr- InstancePtr is a pointer to the XWdtTb instance to be worked on.
width- width of the Watchdog Timer.
Returns
  • XST_SUCESS, if window mode is disabled and the width is programmed correctly.
  • XST_FAILURE, if Window mode is enabled or if the width is not in the range of 8-31
Note
  • This function is applicable only when the window mode is disabled.
  • This function should be called before starting the timer. Valid values for the width are 8-31. Programming any other value returns failure.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_WriteReg, XWT_END_VALUE, XWT_MWR_OFFSET, and XWT_START_VALUE.

void XWdtTb_RestartWdt ( const XWdtTb InstancePtr)

This function restarts the legacy or window watchdog timer.

An application needs to call this function periodically to keep the timer from asserting the reset output.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_Config::IsPl, XWdtTb::IsReady, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_CSR0_WDS_MASK, XWT_CSR0_WRS_MASK, XWT_ESR_OFFSET, XWT_ESR_WSW_MASK, XWT_GWRR_MASK, XWT_GWRR_OFFSET, and XWT_TWCSR0_OFFSET.

Referenced by GWdtTbExample(), WdtTbExample(), WinWdtIntrExample(), and WinWdtTbExample().

s32 XWdtTb_SelfTest ( const XWdtTb InstancePtr)

This function runs a self-test on the timebase or window if enabled.

Timebase test verifies that the timebase is incrementing. The watchdog timer is not tested due to the time required to wait for the watchdog timer to expire. The time consumed by this test is dependent on the system clock and the configuration of the dividers in for the input clock of the timebase.

Window test verifies that the windowing feature does not generate bad event after enabling window feature with first and second window count. It disables window feature immediately.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
  • XST_SUCCESS if self-test was successful.
  • XST_WDTTB_TIMER_FAILED if the timebase is not incrementing.
  • XST_FAILURE if self-test was failed.
Note
None.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_Config::IsPl, XWdtTb::IsReady, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_ESR_LBE_MASK, XWT_ESR_LBE_SHIFT, XWT_ESR_OFFSET, XWT_ESR_WEN_MASK, XWT_ESR_WSW_MASK, XWT_FW_COUNT, XWT_FWR_OFFSET, XWT_GWCSR_GWEN_MASK, XWT_GWCSR_OFFSET, XWT_GWOR_COUNT, XWT_GWOR_OFFSET, XWT_GWRR_OFFSET, XWT_MAX_SELFTEST_LOOP_COUNT, XWT_MWR_OFFSET, XWT_SW_COUNT, XWT_SWR_OFFSET, and XWT_TBR_OFFSET.

Referenced by GWdtIntrExample(), GWdtTbExample(), GWdtTbSelfTestExample(), WdtTbExample(), WdtTbIntrExample(), WdtTbSelfTestExample(), WinWdtIntrExample(), and WinWdtTbExample().

void XWdtTb_SetByteCount ( const XWdtTb InstancePtr,
u32  ByteCount 
)

This function sets byte count to determine the interrupt assertion point in the second window configuration.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
ByteCountspecifies the selected byte count value to be set in the second window configuration.
Returns
None.
Note
  • This function must be called before Window WDT start/enable or after Window WDT stop/disable.
  • This function must be used along with XWdtTb_SetByteSegment.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_OFFSET, XWT_FCR_SBC_MASK, and XWT_FCR_SBC_SHIFT.

Referenced by WinWdtIntrExample(), and WinWdtTbExample().

void XWdtTb_SetByteSegment ( const XWdtTb InstancePtr,
u32  ByteSegment 
)

This function sets byte segment selection to determine the interrupt assertion point in the second window configuration.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
ByteSegmentspecifies the byte segment selected.
  • 0 = Second window byte 0 selected.
  • 1 = Second window byte 1 selected.
  • 2 = Second window byte 2 selected.
  • 3 = Second window byte 3 selected.
Returns
None.
Note
  • This function must be called before Window WDT start/enable or after Window WDT stop/disable.
  • This function must be used along with XWdtTb_SetByteCount.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_ReadReg, XWdtTb_WriteReg, XWT_FCR_BSS_MASK, XWT_FCR_BSS_SHIFT, XWT_FCR_OFFSET, and XWT_MAX_BYTE_SEGMENT.

Referenced by WinWdtIntrExample(), and WinWdtTbExample().

void XWdtTb_SetGenericWdtWindow ( const XWdtTb InstancePtr,
u32  GWOR_config 
)

This function sets the count value for the GWDT_Compare_value_reg0 ,GWDT_Compare_value_reg1 & GWDT_Offset_regs .

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
GWOR_configspecifies the GWDT_Offset_reg count value.
Returns
None.
Note
This function must be called before Window WDT start/enable or after Window WDT stop/disable.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb_WriteReg, and XWT_GWOR_OFFSET.

Referenced by GWdtIntrExample(), and GWdtTbExample().

void XWdtTb_SetGenericWdtWindowTimeOut ( const XWdtTb InstancePtr,
u32  MilliSeconds 
)

This function sets the count value for the GWDT_Offset_regs .

Parameters
InstancePtrpointer to the XWdtTb instance to be worked on.
MilliSecondsGWDT count value in milliseconds.
Returns
None.
Note
This function must be called before Window WDT start/enable or after Window WDT stop/disable.

References XWdtTb_Config::BaseAddr, XWdtTb_Config::Clock, XWdtTb::Config, XWdtTb_WriteReg, XWT_GWOR_OFFSET, XWT_KILO_HZ, and XWT_MAX_TIMEOUT.

void XWdtTb_SetWindowCount ( const XWdtTb InstancePtr,
u32  FirstWinCount,
u32  SecondWinCount 
)

This function sets the count value for the first and second window.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
FirstWinCountspecifies the first window count value.
SecondWinCountspecifies the second window count value.
Returns
None.
Note
This function must be called before Window WDT start/enable or after Window WDT stop/disable.
  • For first window, it is recommended that minimum non-zero value should be 15 or more.
  • For second window, minimum value should be sufficiently large to complete required AXILite write transactions at system level.
  • Setting second window count value to zero causes wrong configuration and disables Window WDT feature by clearing WEN bit irrespective of WDP settings.

References XWdtTb_Config::BaseAddr, XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_WriteReg, XWT_FWR_OFFSET, and XWT_SWR_OFFSET.

Referenced by WinWdtIntrExample(), and WinWdtTbExample().

void XWdtTb_Start ( XWdtTb InstancePtr)

This function starts the legacy or window watchdog timer.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
None.
Note
  • For legacy, the Timebase is reset to 0 when the Watchdog Timer is started. The Timebase is always incrementing.
  • For window, this generates first kick and starts the first window. This step auto clears MWC bit to make address space read only.

References XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_Config::IsPl, XWdtTb::IsReady, and XWdtTb_EnableTimebaseWdt().

Referenced by GWdtIntrExample(), GWdtTbExample(), WdtTbExample(), WdtTbIntrExample(), WinWdtIntrExample(), and WinWdtTbExample().

s32 XWdtTb_Stop ( XWdtTb InstancePtr)

This function disables the legacy or window watchdog timer.

It is the caller's responsibility to disconnect the interrupt handler of the watchdog timer from the interrupt source, typically an interrupt controller, and disable the interrupt in the interrupt controller.

Parameters
InstancePtris a pointer to the XWdtTb instance to be worked on.
Returns
  • XST_SUCCESS if the legacy/window watchdog was stopped successfully.
  • XST_NO_FEATURE if disable is not supported in legacy watchdog timer.
  • XST_FAILURE if the window watchdog timer cannot be stopped.
Note
  • For legacy, the hardware configuration controls this functionality. If it is not allowed by the hardware the failure will be returned and the timer will continue without interruption.

References XWdtTb::Config, XWdtTb::EnableWinMode, XWdtTb_Config::IsPl, XWdtTb::IsReady, XWdtTb_DisableTimebaseWdt(), and XWdtTb_DisableWinWdt().

Referenced by GWdtIntrExample(), GWdtTbExample(), GWdtTbSelfTestExample(), WdtTbExample(), WdtTbIntrExample(), WinWdtIntrExample(), and WinWdtTbExample().

Variable Documentation

XWdtTb_Config XWdtTb_ConfigTable[]
Initial value:
=
{
{
XPAR_WDTTB_0_DEVICE_ID,
XPAR_WDTTB_0_BASEADDR,
XPAR_WDTTB_0_ENABLE_WINDOW_WDT,
XPAR_WDTTB_0_MAX_COUNT_WIDTH,
XPAR_WDTTB_0_SST_COUNT_WIDTH,
XPAR_WDTTB_0_IS_PL
}
}

Configuration table.

Referenced by XWdtTb_LookupConfig().

XWdtTb_Config XWdtTb_ConfigTable[]

Configuration table.

Referenced by XWdtTb_LookupConfig().