MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the External Watchdog (EWM) Driver module of MCUXpresso SDK devices.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ewm
Data Structures | |
struct | ewm_config_t |
Data structure for EWM configuration. More... | |
Enumerations | |
enum | ewm_lpo_clock_source_t { kEWM_LpoClockSource0 = 0U, kEWM_LpoClockSource1 = 1U, kEWM_LpoClockSource2 = 2U, kEWM_LpoClockSource3 = 3U } |
Describes EWM clock source. More... | |
enum | _ewm_interrupt_enable_t { kEWM_InterruptEnable = EWM_CTRL_INTEN_MASK } |
EWM interrupt configuration structure with default settings all disabled. More... | |
enum | _ewm_status_flags_t { kEWM_RunningFlag = EWM_CTRL_EWMEN_MASK } |
EWM status flags. More... | |
Driver version | |
#define | FSL_EWM_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
EWM driver version 2.0.1. More... | |
EWM initialization and de-initialization | |
void | EWM_Init (EWM_Type *base, const ewm_config_t *config) |
Initializes the EWM peripheral. More... | |
void | EWM_Deinit (EWM_Type *base) |
Deinitializes the EWM peripheral. More... | |
void | EWM_GetDefaultConfig (ewm_config_t *config) |
Initializes the EWM configuration structure. More... | |
EWM functional Operation | |
static void | EWM_EnableInterrupts (EWM_Type *base, uint32_t mask) |
Enables the EWM interrupt. More... | |
static void | EWM_DisableInterrupts (EWM_Type *base, uint32_t mask) |
Disables the EWM interrupt. More... | |
static uint32_t | EWM_GetStatusFlags (EWM_Type *base) |
Gets all status flags. More... | |
void | EWM_Refresh (EWM_Type *base) |
Services the EWM. More... | |
struct ewm_config_t |
This structure is used to configure the EWM.
Data Fields | |
bool | enableEwm |
Enable EWM module. | |
bool | enableEwmInput |
Enable EWM_in input. | |
bool | setInputAssertLogic |
EWM_in signal assertion state. | |
bool | enableInterrupt |
Enable EWM interrupt. | |
ewm_lpo_clock_source_t | clockSource |
Clock source select. | |
uint8_t | prescaler |
Clock prescaler value. | |
uint8_t | compareLowValue |
Compare low-register value. | |
uint8_t | compareHighValue |
Compare high-register value. | |
#define FSL_EWM_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
enum _ewm_status_flags_t |
void EWM_Init | ( | EWM_Type * | base, |
const ewm_config_t * | config | ||
) |
This function is used to initialize the EWM. After calling, the EWM runs immediately according to the configuration. Note that, except for the interrupt enable control bit, other control bits and registers are write once after a CPU reset. Modifying them more than once generates a bus transfer error.
This is an example.
base | EWM peripheral base address |
config | The configuration of the EWM |
void EWM_Deinit | ( | EWM_Type * | base | ) |
This function is used to shut down the EWM.
base | EWM peripheral base address |
void EWM_GetDefaultConfig | ( | ewm_config_t * | config | ) |
This function initializes the EWM configuration structure to default values. The default values are as follows.
config | Pointer to the EWM configuration structure. |
|
inlinestatic |
This function enables the EWM interrupt.
base | EWM peripheral base address |
mask | The interrupts to enable The parameter can be combination of the following source if defined
|
|
inlinestatic |
This function enables the EWM interrupt.
base | EWM peripheral base address |
mask | The interrupts to disable The parameter can be combination of the following source if defined
|
|
inlinestatic |
This function gets all status flags.
This is an example for getting the running flag.
base | EWM peripheral base address |
void EWM_Refresh | ( | EWM_Type * | base | ) |
This function resets the EWM counter to zero.
base | EWM peripheral base address |