![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the WDOG8 module of MCUXpresso SDK devices.
WDOG8 Initialization and De-initialization | |
void | WDOG8_GetDefaultConfig (wdog8_config_t *config) |
Initializes the WDOG8 configuration structure. More... | |
void | WDOG8_Init (WDOG_Type *base, const wdog8_config_t *config) |
Initializes the WDOG8 module. More... | |
void | WDOG8_Deinit (WDOG_Type *base) |
De-initializes the WDOG8 module. More... | |
WDOG8 functional Operation | |
static void | WDOG8_Enable (WDOG_Type *base) |
Enables the WDOG8 module. More... | |
static void | WDOG8_Disable (WDOG_Type *base) |
Disables the WDOG8 module. More... | |
static void | WDOG8_EnableInterrupts (WDOG_Type *base, uint8_t mask) |
Enables the WDOG8 interrupt. More... | |
static void | WDOG8_DisableInterrupts (WDOG_Type *base, uint8_t mask) |
Disables the WDOG8 interrupt. More... | |
static uint8_t | WDOG8_GetStatusFlags (WDOG_Type *base) |
Gets the WDOG8 all status flags. More... | |
void | WDOG8_ClearStatusFlags (WDOG_Type *base, uint8_t mask) |
Clears the WDOG8 flag. More... | |
static void | WDOG8_SetTimeoutValue (WDOG_Type *base, uint16_t timeoutCount) |
Sets the WDOG8 timeout value. More... | |
static void | WDOG8_SetWindowValue (WDOG_Type *base, uint16_t windowValue) |
Sets the WDOG8 window value. More... | |
static void | WDOG8_Unlock (WDOG_Type *base) |
Unlocks the WDOG8 register written. More... | |
static void | WDOG8_Refresh (WDOG_Type *base) |
Refreshes the WDOG8 timer. More... | |
static uint16_t | WDOG8_GetCounterValue (WDOG_Type *base) |
Gets the WDOG8 counter value. More... | |
void WDOG8_GetDefaultConfig | ( | wdog8_config_t * | config | ) |
This function initializes the WDOG8 configuration structure to default values. The default values are:
config | Pointer to the WDOG8 configuration structure. |
void WDOG8_Init | ( | WDOG_Type * | base, |
const wdog8_config_t * | config | ||
) |
This function initializes the WDOG8. To reconfigure the WDOG8 without forcing a reset first, enableUpdate must be set to true in the configuration.
Example:
base | WDOG8 peripheral base address. |
config | The configuration of the WDOG8. |
void WDOG8_Deinit | ( | WDOG_Type * | base | ) |
This function shuts down the WDOG8. Ensure that the WDOG_CS1.UPDATE is 1, which means that the register update is enabled.
base | WDOG8 peripheral base address. |
|
inlinestatic |
This function writes a value into the WDOG_CS1 register to enable the WDOG8. The WDOG_CS1 register is a write-once register. Ensure that the WCT window is still open and this register has not been written in this WCT while the function is called.
base | WDOG8 peripheral base address. |
|
inlinestatic |
This function writes a value into the WDOG_CS1 register to disable the WDOG8. The WDOG_CS1 register is a write-once register. Ensure that the WCT window is still open and this register has not been written in this WCT while the function is called.
base | WDOG8 peripheral base address |
|
inlinestatic |
This function writes a value into the WDOG_CS1 register to enable the WDOG8 interrupt. The WDOG_CS1 register is a write-once register. Ensure that the WCT window is still open and this register has not been written in this WCT while the function is called.
base | WDOG8 peripheral base address. |
mask | The interrupts to enable. The parameter can be a combination of the following source if defined:
|
|
inlinestatic |
This function writes a value into the WDOG_CS register to disable the WDOG8 interrupt. The WDOG_CS register is a write-once register. Ensure that the WCT window is still open and this register has not been written in this WCT while the function is called.
base | WDOG8 peripheral base address. |
mask | The interrupts to disabled. The parameter can be a combination of the following source if defined:
|
|
inlinestatic |
This function gets all status flags.
Example to get the running flag:
base | WDOG8 peripheral base address |
void WDOG8_ClearStatusFlags | ( | WDOG_Type * | base, |
uint8_t | mask | ||
) |
This function clears the WDOG8 status flag.
Example to clear an interrupt flag:
base | WDOG8 peripheral base address. |
mask | The status flags to clear. The parameter can be any combination of the following values:
|
|
inlinestatic |
This function writes a timeout value into the WDOG_TOVALH/L register. The WDOG_TOVALH/L register is a write-once register. Ensure that the WCT window is still open and this register has not been written in this WCT while the function is called.
base | WDOG8 peripheral base address |
timeoutCount | WDOG8 timeout value, count of WDOG8 clock ticks. |
|
inlinestatic |
This function writes a window value into the WDOG_WINH/L register. The WDOG_WINH/L register is a write-once register. Ensure that the WCT window is still open and this register has not been written in this WCT while the function is called.
base | WDOG8 peripheral base address. |
windowValue | WDOG8 window value. |
|
inlinestatic |
This function unlocks the WDOG8 register written.
Before starting the unlock sequence and following the configuration, disable the global interrupts. Otherwise, an interrupt could effectively invalidate the unlock sequence and the WCT may expire. After the configuration finishes, re-enable the global interrupts.
base | WDOG8 peripheral base address |
|
inlinestatic |
This function feeds the WDOG8. This function should be called before the Watchdog timer is in timeout. Otherwise, a reset is asserted.
base | WDOG8 peripheral base address |
|
inlinestatic |
This function gets the WDOG8 counter value.
base | WDOG8 peripheral base address. |