MAX32665 SDK Documentation  0.2
Software Development Kit Overview and API Documentation
Watchdog Timer (WDT)

Modules

 WDT_Registers
 Registers, Bit Masks and Bit Positions for the WDT Peripheral Module.
 

Enumerations

enum  wdt_period_t {
  WDT_PERIOD_2_31 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW31,
  WDT_PERIOD_2_30 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW30,
  WDT_PERIOD_2_29 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW29,
  WDT_PERIOD_2_28 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW28,
  WDT_PERIOD_2_27 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW27,
  WDT_PERIOD_2_26 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW26,
  WDT_PERIOD_2_25 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW25,
  WDT_PERIOD_2_24 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW24,
  WDT_PERIOD_2_23 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW23,
  WDT_PERIOD_2_22 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW22,
  WDT_PERIOD_2_21 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW21,
  WDT_PERIOD_2_20 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW20,
  WDT_PERIOD_2_19 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW19,
  WDT_PERIOD_2_18 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW18,
  WDT_PERIOD_2_17 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW17,
  WDT_PERIOD_2_16 = MXC_S_WDT_CTRL_INT_PERIOD_WDT2POW16
}
 Watchdog period enumeration. More...
 

Functions

int WDT_Init (mxc_wdt_regs_t *wdt, sys_cfg_wdt_t sys_cfg)
 Initialize the Watchdog Timer. More...
 
void WDT_SetIntPeriod (mxc_wdt_regs_t *wdt, wdt_period_t period)
 Set the period of the watchdog interrupt. More...
 
void WDT_SetResetPeriod (mxc_wdt_regs_t *wdt, wdt_period_t period)
 Set the period of the watchdog reset. More...
 
void WDT_Enable (mxc_wdt_regs_t *wdt, int enable)
 Enable the watchdog timer. More...
 
void WDT_EnableInt (mxc_wdt_regs_t *wdt, int enable)
 Enable the watchdog interrupt. More...
 
void WDT_EnableReset (mxc_wdt_regs_t *wdt, int enable)
 Enable the watchdog reset. More...
 
void WDT_ResetTimer (mxc_wdt_regs_t *wdt)
 Reset the watchdog timer. More...
 
int WDT_GetResetFlag (mxc_wdt_regs_t *wdt)
 Get the status of the reset flag. More...
 
void WDT_ClearResetFlag (mxc_wdt_regs_t *wdt)
 Clears the reset flag. More...
 
int WDT_GetIntFlag (mxc_wdt_regs_t *wdt)
 Get the status of the interrupt flag. More...
 
void WDT_ClearIntFlag (mxc_wdt_regs_t *wdt)
 Clears the interrupt flag. More...
 

Detailed Description

Enumeration Type Documentation

◆ wdt_period_t

Used to configure the period of the watchdog interrupt

Enumerator
WDT_PERIOD_2_31 

Period 2^31.

WDT_PERIOD_2_30 

Period 2^30.

WDT_PERIOD_2_29 

Period 2^29.

WDT_PERIOD_2_28 

Period 2^28.

WDT_PERIOD_2_27 

Period 2^27.

WDT_PERIOD_2_26 

Period 2^26.

WDT_PERIOD_2_25 

Period 2^25.

WDT_PERIOD_2_24 

Period 2^24.

WDT_PERIOD_2_23 

Period 2^23.

WDT_PERIOD_2_22 

Period 2^22.

WDT_PERIOD_2_21 

Period 2^21.

WDT_PERIOD_2_20 

Period 2^20.

WDT_PERIOD_2_19 

Period 2^19.

WDT_PERIOD_2_18 

Period 2^18.

WDT_PERIOD_2_17 

Period 2^17.

WDT_PERIOD_2_16 

Period 2^16.

Function Documentation

◆ WDT_Init()

int WDT_Init ( mxc_wdt_regs_t wdt,
sys_cfg_wdt_t  sys_cfg 
)
Parameters
wdtPointer to the watchdog registers
sys_cfgThe system configuration object

◆ WDT_SetIntPeriod()

void WDT_SetIntPeriod ( mxc_wdt_regs_t wdt,
wdt_period_t  period 
)
Parameters
wdtPointer to watchdog registers.
periodEnumeration of the desired watchdog period.

◆ WDT_SetResetPeriod()

void WDT_SetResetPeriod ( mxc_wdt_regs_t wdt,
wdt_period_t  period 
)
Parameters
wdtPointer to watchdog registers.
periodEnumeration of the desired watchdog period.

◆ WDT_Enable()

void WDT_Enable ( mxc_wdt_regs_t wdt,
int  enable 
)
Parameters
wdtPointer to watchdog registers.
enable1 to enable the timer, 0 to disable.

◆ WDT_EnableInt()

void WDT_EnableInt ( mxc_wdt_regs_t wdt,
int  enable 
)
Parameters
wdtPointer to watchdog registers.
enable1 to enable the interrupt, 0 to disable.

◆ WDT_EnableReset()

void WDT_EnableReset ( mxc_wdt_regs_t wdt,
int  enable 
)
Parameters
wdtPointer to watchdog registers.
enable1 to enable the reset, 0 to disable.

◆ WDT_ResetTimer()

void WDT_ResetTimer ( mxc_wdt_regs_t wdt)
Parameters
wdtPointer to watchdog registers.

◆ WDT_GetResetFlag()

int WDT_GetResetFlag ( mxc_wdt_regs_t wdt)
Parameters
wdtPointer to watchdog registers.
Returns
1 if the previous reset was caused by the watchdog, 0 otherwise.

◆ WDT_ClearResetFlag()

void WDT_ClearResetFlag ( mxc_wdt_regs_t wdt)
Parameters
wdtPointer to watchdog registers.

◆ WDT_GetIntFlag()

int WDT_GetIntFlag ( mxc_wdt_regs_t wdt)
Parameters
wdtPointer to watchdog registers.
Returns
1 if the interrupt is pending, 0 otherwise.

◆ WDT_ClearIntFlag()

void WDT_ClearIntFlag ( mxc_wdt_regs_t wdt)
Parameters
wdtPointer to watchdog registers.