RTEMS 6.1-rc5
|
Data Structures | |
struct | _wdog_work_mode |
Defines WDOG work mode. More... | |
struct | _wdog_config |
Describes WDOG configuration structure. More... | |
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. | |
enum _wdog_status_flags |
WDOG status flags.
This structure contains the WDOG status flags for use in the WDOG functions.
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.
base | WDOG peripheral base address |
mask | The 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
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).
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.
config | Pointer to the WDOG configuration structure. |
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
uint16_t WDOG_GetStatusFlags | ( | WDOG_Type * | base | ) |
Gets the WDOG all reset status flags.
This function gets all reset status flags.
base | WDOG peripheral base address |
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
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.
base | WDOG peripheral base address |
config | The 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
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.
base | WDOG 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
bool _wdog_work_mode::enableDebug |
continue or suspend WDOG in debug mode
bool _wdog_config::enableInterrupt |
Enables or disables WDOG interrupt
bool _wdog_config::enablePowerDown |
power down enable bit
bool _wdog_work_mode::enableStop |
continue or suspend WDOG in stop mode
bool _wdog_config::enableTimeOutAssert |
Enable WDOG_B timeout assertion.
bool _wdog_work_mode::enableWait |
continue or suspend WDOG in wait mode
bool _wdog_config::enableWdog |
Enables or disables WDOG
uint16_t _wdog_config::interruptTimeValue |
Interrupt count timeout value
bool _wdog_config::softwareResetExtension |
software reset extension
uint16_t _wdog_config::timeoutValue |
Timeout value
wdog_work_mode_t _wdog_config::workMode |
Configures WDOG work mode in debug stop and wait mode