RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures | Enumerator | Variables
Wdog

Data Structures

struct  _wdog_work_mode
 Defines WDOG work mode. More...
 
struct  _wdog_config
 Describes WDOG configuration structure. More...
 

Variables

bool _wdog_work_mode::enableWait
 
bool _wdog_work_mode::enableStop
 
bool _wdog_work_mode::enableDebug
 
bool _wdog_config::enableWdog
 
wdog_work_mode_t _wdog_config::workMode
 
bool _wdog_config::enableInterrupt
 
uint16_t _wdog_config::timeoutValue
 
uint16_t _wdog_config::interruptTimeValue
 
bool _wdog_config::softwareResetExtension
 
bool _wdog_config::enablePowerDown
 
bool _wdog_config::enableTimeOutAssert
 

Refresh sequence

enum  _wdog_interrupt_enable { kWDOG_InterruptEnable = WDOG_WICR_WIE_MASK }
 WDOG interrupt configuration structure, default settings all disabled. More...
 
enum  _wdog_status_flags {
  kWDOG_RunningFlag = WDOG_WCR_WDE_MASK , kWDOG_PowerOnResetFlag = WDOG_WRSR_POR_MASK , kWDOG_TimeoutResetFlag = WDOG_WRSR_TOUT_MASK , kWDOG_SoftwareResetFlag = WDOG_WRSR_SFTW_MASK ,
  kWDOG_InterruptFlag = WDOG_WICR_WTIS_MASK
}
 WDOG status flags. More...
 
typedef struct _wdog_work_mode wdog_work_mode_t
 Defines WDOG work mode.
 
typedef struct _wdog_config wdog_config_t
 Describes WDOG configuration structure.
 
#define WDOG_REFRESH_KEY   (0xAAAA5555U)
 

WDOG Initialization and De-initialization.

void WDOG_GetDefaultConfig (wdog_config_t *config)
 Initializes the WDOG configuration structure.
 
void WDOG_Init (WDOG_Type *base, const wdog_config_t *config)
 Initializes the WDOG.
 
void WDOG_Deinit (WDOG_Type *base)
 Shuts down the WDOG.
 
uint16_t WDOG_GetStatusFlags (WDOG_Type *base)
 Gets the WDOG all reset status flags.
 
void WDOG_ClearInterruptStatus (WDOG_Type *base, uint16_t mask)
 Clears the WDOG flag.
 
void WDOG_Refresh (WDOG_Type *base)
 Refreshes the WDOG timer.
 

Driver version

#define FSL_WDOG_DRIVER_VERSION   (MAKE_VERSION(2, 1, 1))
 Defines WDOG driver version.
 

Detailed Description

Enumeration Type Documentation

◆ _wdog_interrupt_enable

WDOG interrupt configuration structure, default settings all disabled.

This structure contains the settings for all of the WDOG interrupt configurations.

Enumerator
kWDOG_InterruptEnable 

WDOG timeout generates an interrupt before reset

◆ _wdog_status_flags

WDOG status flags.

This structure contains the WDOG status flags for use in the WDOG functions.

Enumerator
kWDOG_RunningFlag 

Running flag, set when WDOG is enabled

kWDOG_PowerOnResetFlag 

Power On flag, set when reset is the result of a powerOnReset

kWDOG_TimeoutResetFlag 

Timeout flag, set when reset is the result of a timeout

kWDOG_SoftwareResetFlag 

Software flag, set when reset is the result of a software

kWDOG_InterruptFlag 

interrupt flag,whether interrupt has occurred or not

Function Documentation

◆ WDOG_ClearInterruptStatus()

void WDOG_ClearInterruptStatus ( WDOG_Type base,
uint16_t  mask 
)

Clears the WDOG flag.

This function clears the WDOG status flag.

This is an example for clearing the interrupt flag.

WDOG_ClearStatusFlags(wdog_base,KWDOG_InterruptFlag);
Parameters
baseWDOG peripheral base address
maskThe status flags to clear. The parameter could be any combination of the following values. kWDOG_TimeoutFlag

brief Clears the WDOG flag.

This function clears the WDOG status flag.

This is an example for clearing the interrupt flag. code WDOG_ClearStatusFlags(wdog_base,KWDOG_InterruptFlag); endcode param base WDOG peripheral base address param mask The status flags to clear. The parameter could be any combination of the following values. kWDOG_TimeoutFlag

◆ WDOG_Deinit()

void WDOG_Deinit ( WDOG_Type base)

Shuts down the WDOG.

This function shuts down the WDOG. Watchdog Enable bit is a write one once only bit. It is not possible to clear this bit by a software write, once the bit is set. This bit(WDE) can be set/reset only in debug mode(exception).

brief Shuts down the WDOG.

This function shuts down the WDOG. Watchdog Enable bit is a write one once only bit. It is not possible to clear this bit by a software write, once the bit is set. This bit(WDE) can be set/reset only in debug mode(exception).

◆ WDOG_GetDefaultConfig()

void WDOG_GetDefaultConfig ( wdog_config_t config)

Initializes the WDOG configuration structure.

This function initializes the WDOG configuration structure to default values. The default values are as follows.

wdogConfig->enableWdog = true;
wdogConfig->workMode.enableWait = true;
wdogConfig->workMode.enableStop = false;
wdogConfig->workMode.enableDebug = false;
wdogConfig->enableInterrupt = false;
wdogConfig->enablePowerdown = false;
wdogConfig->resetExtension = flase;
wdogConfig->timeoutValue = 0xFFU;
wdogConfig->interruptTimeValue = 0x04u;
Parameters
configPointer to the WDOG configuration structure.
See also
wdog_config_t

brief Initializes the WDOG configuration structure.

This function initializes the WDOG configuration structure to default values. The default values are as follows. code wdogConfig->enableWdog = true; wdogConfig->workMode.enableWait = true; wdogConfig->workMode.enableStop = false; wdogConfig->workMode.enableDebug = false; wdogConfig->enableInterrupt = false; wdogConfig->enablePowerdown = false; wdogConfig->resetExtension = flase; wdogConfig->timeoutValue = 0xFFU; wdogConfig->interruptTimeValue = 0x04u; endcode

param config Pointer to the WDOG configuration structure. see wdog_config_t

◆ WDOG_GetStatusFlags()

uint16_t WDOG_GetStatusFlags ( WDOG_Type base)

Gets the WDOG all reset status flags.

This function gets all reset status flags.

uint16_t status;
status = WDOG_GetStatusFlags (wdog_base);
uint16_t WDOG_GetStatusFlags(WDOG_Type *base)
Gets the WDOG all reset status flags.
Definition: fsl_wdog.c:162
Parameters
baseWDOG peripheral base address
Returns
State of the status flag: asserted (true) or not-asserted (false).
See also
_wdog_status_flags
  • true: a related status flag has been set.
  • false: a related status flag is not set.

brief Gets the WDOG all reset status flags.

This function gets all reset status flags.

code uint16_t status; status = WDOG_GetStatusFlags (wdog_base); endcode param base WDOG peripheral base address return State of the status flag: asserted (true) or not-asserted (false).see _wdog_status_flags

  • true: a related status flag has been set.
  • false: a related status flag is not set.

◆ WDOG_Init()

void WDOG_Init ( WDOG_Type base,
const wdog_config_t config 
)

Initializes the WDOG.

This function initializes the WDOG. When called, the WDOG runs according to the configuration.

This is an example.

config.timeoutValue = 0xffU;
config->interruptTimeValue = 0x04u;
WDOG_Init(wdog_base,&config);
void WDOG_Init(WDOG_Type *base, const wdog_config_t *config)
Initializes the WDOG.
Definition: fsl_wdog.c:104
void WDOG_GetDefaultConfig(wdog_config_t *config)
Initializes the WDOG configuration structure.
Definition: fsl_wdog.c:68
Describes WDOG configuration structure.
Definition: fsl_wdog.h:41
Definition: deflate.c:114
Parameters
baseWDOG peripheral base address
configThe configuration of WDOG

brief Initializes the WDOG.

This function initializes the WDOG. When called, the WDOG runs according to the configuration.

This is an example. code wdog_config_t config; WDOG_GetDefaultConfig(&config); config.timeoutValue = 0xffU; config->interruptTimeValue = 0x04u; WDOG_Init(wdog_base,&config); endcode

param base WDOG peripheral base address param config The configuration of WDOG

◆ WDOG_Refresh()

void WDOG_Refresh ( WDOG_Type base)

Refreshes the WDOG timer.

This function feeds the WDOG. This function should be called before the WDOG timer is in timeout. Otherwise, a reset is asserted.

Parameters
baseWDOG peripheral base address

brief Refreshes the WDOG timer.

This function feeds the WDOG. This function should be called before the WDOG timer is in timeout. Otherwise, a reset is asserted.

param base WDOG peripheral base address

Variable Documentation

◆ enableDebug

bool _wdog_work_mode::enableDebug

continue or suspend WDOG in debug mode

◆ enableInterrupt

bool _wdog_config::enableInterrupt

Enables or disables WDOG interrupt

◆ enablePowerDown

bool _wdog_config::enablePowerDown

power down enable bit

◆ enableStop

bool _wdog_work_mode::enableStop

continue or suspend WDOG in stop mode

◆ enableTimeOutAssert

bool _wdog_config::enableTimeOutAssert

Enable WDOG_B timeout assertion.

◆ enableWait

bool _wdog_work_mode::enableWait

continue or suspend WDOG in wait mode

◆ enableWdog

bool _wdog_config::enableWdog

Enables or disables WDOG

◆ interruptTimeValue

uint16_t _wdog_config::interruptTimeValue

Interrupt count timeout value

◆ softwareResetExtension

bool _wdog_config::softwareResetExtension

software reset extension

◆ timeoutValue

uint16_t _wdog_config::timeoutValue

Timeout value

◆ workMode

wdog_work_mode_t _wdog_config::workMode

Configures WDOG work mode in debug stop and wait mode