MAX32650 Peripheral Driver API
Peripheral Driver API for the MAX32650
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Watchdog Timer (WDT)

Modules

 WDT_Registers
 

Enumerations

enum  mxc_wdt_period_t
 

Functions

int MXC_WDT_Init (mxc_wdt_regs_t *wdt)
 
int MXC_WDT_Shutdown (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_SetIntPeriod (mxc_wdt_regs_t *wdt, mxc_wdt_period_t period)
 
void MXC_WDT_SetResetPeriod (mxc_wdt_regs_t *wdt, mxc_wdt_period_t period)
 
void MXC_WDT_Enable (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_Disable (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_EnableInt (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_EnableReset (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_DisableInt (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_DisableReset (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_ResetTimer (mxc_wdt_regs_t *wdt)
 
int MXC_WDT_GetResetFlag (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_ClearResetFlag (mxc_wdt_regs_t *wdt)
 
int MXC_WDT_GetIntFlag (mxc_wdt_regs_t *wdt)
 
void MXC_WDT_ClearIntFlag (mxc_wdt_regs_t *wdt)
 

Detailed Description

Enumeration Type Documentation

◆ mxc_wdt_period_t

Watchdog period enumeration. Used to configure the period of the watchdog interrupt.

Enumerator
MXC_WDT_PERIOD_2_31 

Period 2^31

MXC_WDT_PERIOD_2_30 

Period 2^30

MXC_WDT_PERIOD_2_29 

Period 2^29

MXC_WDT_PERIOD_2_28 

Period 2^28

MXC_WDT_PERIOD_2_27 

Period 2^27

MXC_WDT_PERIOD_2_26 

Period 2^26

MXC_WDT_PERIOD_2_25 

Period 2^25

MXC_WDT_PERIOD_2_24 

Period 2^24

MXC_WDT_PERIOD_2_23 

Period 2^23

MXC_WDT_PERIOD_2_22 

Period 2^22

MXC_WDT_PERIOD_2_21 

Period 2^21

MXC_WDT_PERIOD_2_20 

Period 2^20

MXC_WDT_PERIOD_2_19 

Period 2^19

MXC_WDT_PERIOD_2_18 

Period 2^18

MXC_WDT_PERIOD_2_17 

Period 2^17

MXC_WDT_PERIOD_2_16 

Period 2^16

Function Documentation

◆ MXC_WDT_ClearIntFlag()

void MXC_WDT_ClearIntFlag ( mxc_wdt_regs_t wdt)

Clears the interrupt flag.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_ClearResetFlag()

void MXC_WDT_ClearResetFlag ( mxc_wdt_regs_t wdt)

Clears the reset flag.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_Disable()

void MXC_WDT_Disable ( mxc_wdt_regs_t wdt)

Disable the watchdog timer.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_DisableInt()

void MXC_WDT_DisableInt ( mxc_wdt_regs_t wdt)

Enable the watchdog interrupt.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_DisableReset()

void MXC_WDT_DisableReset ( mxc_wdt_regs_t wdt)

Enable the watchdog reset.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_Enable()

void MXC_WDT_Enable ( mxc_wdt_regs_t wdt)

Enable the watchdog timer.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_EnableInt()

void MXC_WDT_EnableInt ( mxc_wdt_regs_t wdt)

Enable the watchdog interrupt.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_EnableReset()

void MXC_WDT_EnableReset ( mxc_wdt_regs_t wdt)

Enable the watchdog reset.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_GetIntFlag()

int MXC_WDT_GetIntFlag ( mxc_wdt_regs_t wdt)

Get the status of the interrupt flag.

Parameters
wdtPointer to watchdog registers.
Returns
1 if the interrupt is pending, 0 otherwise.

◆ MXC_WDT_GetResetFlag()

int MXC_WDT_GetResetFlag ( mxc_wdt_regs_t wdt)

Get the status of the reset flag.

Parameters
wdtPointer to watchdog registers.
Returns
1 if the previous reset was caused by the watchdog, 0 otherwise.

◆ MXC_WDT_Init()

int MXC_WDT_Init ( mxc_wdt_regs_t wdt)

Initialize the Watchdog Timer.

Note
On default this function enables WDT peripheral clock. if you wish to manage clock and gpio related things in upper level instead of here. Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. By this flag this function will remove clock and gpio related codes from file.
Parameters
wdtPointer to the watchdog registers, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined.
Returns
See Error Codes for the list of error codes.

◆ MXC_WDT_ResetTimer()

void MXC_WDT_ResetTimer ( mxc_wdt_regs_t wdt)

Reset the watchdog timer.

Parameters
wdtPointer to watchdog registers.

◆ MXC_WDT_SetIntPeriod()

void MXC_WDT_SetIntPeriod ( mxc_wdt_regs_t wdt,
mxc_wdt_period_t  period 
)

Set the period of the watchdog interrupt.

Parameters
wdtPointer to watchdog registers.
periodEnumeration of the desired watchdog period.

◆ MXC_WDT_SetResetPeriod()

void MXC_WDT_SetResetPeriod ( mxc_wdt_regs_t wdt,
mxc_wdt_period_t  period 
)

Set the period of the watchdog reset.

Parameters
wdtPointer to watchdog registers.
periodEnumeration of the desired watchdog period.

◆ MXC_WDT_Shutdown()

int MXC_WDT_Shutdown ( mxc_wdt_regs_t wdt)

Shutdown the Watchdog Timer.

Parameters
wdtPointer to the watchdog registers
Returns
See Error Codes for the list of error codes.