The MCUXpresso SDK provides a peripheral driver for the Wakeup Unit (WUU) module of MCUXpresso SDK devices. The WUU module allows the user to select external pin sources or internal modules as a wake-up source from low power modes.
External wakeup pins configuration
Configures the external wakeup pins' edge detection, wake up event and operate mode. Gets, clears, and checks the wakeup pins' flags. External wakeup pins are accessed by the 'pinIndex', which is started from 0. Please read the Reference Manual for the details.
Internal wakeup modules configuration
Enables the internal wakeup modules, configures the wake up event. Internal wakeup modules are accessed by the 'moduleIndex', which is started from 0. Please read the Reference Manual for the details.
Digital pin filter for external wakeup pin configuration.
Configures the digital pin filters' edge detection, wakeup event wakeup pin and operate mode. Gets, clears, and checks the Pin filter flags. The pin digital filters are accessed by the 'filterIndex', which is started from 1. Please read the Reference Manual for the details.
|
enum | wuu_external_pin_edge_detection_t {
kWUU_ExternalPinDisable = 0x0U,
kWUU_ExternalPinRisingEdge = 0x1U,
kWUU_ExternalPinFallingEdge = 0x2U,
kWUU_ExternalPinAnyEdge = 0x3U
} |
| External WakeUp pin edge detection enumeration. More...
|
|
enum | wuu_external_wakeup_pin_event_t {
kWUU_ExternalPinInterrupt = 0x0U,
kWUU_ExternalPinDMARequest = 0x1U,
kWUU_ExternalPinTriggerEvent = 0x2U
} |
| External input wake up pin event enumeration. More...
|
|
enum | wuu_external_wakeup_pin_mode_t {
kWUU_ExternalPinActiveDSPD = 0x0U,
kWUU_ExternalPinActiveAlways = 0x1U
} |
| External input wake up pin mode enumeration. More...
|
|
enum | wuu_internal_wakeup_module_event_t {
kWUU_InternalModuleInterrupt = 0x0U,
kWUU_InternalModuleDMATrigger = 0x1U
} |
| Internal module wake up event enumeration. More...
|
|
enum | wuu_filter_edge_t {
kWUU_FilterDisabled = 0x0U,
kWUU_FilterPosedgeEnable = 0x1U,
kWUU_FilterNegedgeEnable = 0x2U,
kWUU_FilterAnyEdge = 0x3U
} |
| Pin filter edge enumeration. More...
|
|
enum | wuu_filter_event_t {
kWUU_FilterInterrupt = 0x0U,
kWUU_FilterDMARequest = 0x1U,
kWUU_FilterTriggerEvent = 0x2U
} |
| Pin Filter event enumeration. More...
|
|
enum | wuu_filter_mode_t {
kWUU_FilterActiveDSPD = 0x0U,
kWUU_FilterActiveAlways = 0x1U
} |
| Pin filter mode enumeration. More...
|
|
struct wuu_external_wakeup_pin_config_t |
struct wuu_pin_filter_config_t |
uint32_t wuu_pin_filter_config_t::pinIndex |
Enumerator |
---|
kWUU_ExternalPinDisable |
External input Pin disabled as wake up input.
|
kWUU_ExternalPinRisingEdge |
External input Pin enabled with the rising edge detection.
|
kWUU_ExternalPinFallingEdge |
External input Pin enabled with the falling edge detection.
|
kWUU_ExternalPinAnyEdge |
External input Pin enabled with any change detection.
|
Enumerator |
---|
kWUU_ExternalPinInterrupt |
External input Pin configured as interrupt.
|
kWUU_ExternalPinDMARequest |
External input Pin configured as DMA request.
|
kWUU_ExternalPinTriggerEvent |
External input Pin configured as Trigger event.
|
Enumerator |
---|
kWUU_ExternalPinActiveDSPD |
External input Pin is active only during Deep Sleep/Power Down Mode.
|
kWUU_ExternalPinActiveAlways |
External input Pin is active during all power modes.
|
Enumerator |
---|
kWUU_InternalModuleInterrupt |
Internal modules' interrupt as a wakeup source.
|
kWUU_InternalModuleDMATrigger |
Internal modules' DMA/Trigger as a wakeup source.
|
Enumerator |
---|
kWUU_FilterDisabled |
Filter disabled.
|
kWUU_FilterPosedgeEnable |
Filter posedge detect enabled.
|
kWUU_FilterNegedgeEnable |
Filter negedge detect enabled.
|
kWUU_FilterAnyEdge |
Filter any edge detect enabled.
|
Enumerator |
---|
kWUU_FilterInterrupt |
Filter output configured as interrupt.
|
kWUU_FilterDMARequest |
Filter output configured as DMA request.
|
kWUU_FilterTriggerEvent |
Filter output configured as Trigger event.
|
Enumerator |
---|
kWUU_FilterActiveDSPD |
External input pin filter is active only during Deep Sleep/Power Down Mode.
|
kWUU_FilterActiveAlways |
External input Pin filter is active during all power modes.
|
This function enables/disables the external pin as wakeup input. What's more this function configs pins options, including edge detection wakeup event and operate mode.
- Parameters
-
base | MUU peripheral base address. |
pinIndex | The index of the external input pin. See Reference Manual for the details. |
config | Pointer to wuu_external_wakeup_pin_config_t structure. |
static uint32_t WUU_GetExternalWakeUpPinsFlag |
( |
WUU_Type * |
base | ) |
|
|
inlinestatic |
This function return the external wakeup pin flags.
- Parameters
-
base | WUU peripheral base address. |
- Returns
- Wakeup flags for all external wakeup pins.
static void WUU_ClearExternalWakeUpPinsFlag |
( |
WUU_Type * |
base, |
|
|
uint32_t |
mask |
|
) |
| |
|
inlinestatic |
This function clears external wakeup pins flags based on the mask.
- Parameters
-
base | WUU peripheral base address. |
mask | The mask of Wakeup pin index to be cleared. |
This function configs the internal modules event as the wake up sources.
- Parameters
-
base | WUU peripheral base address. |
moduleIndex | The selected internal module. See the Reference Manual for the details. |
event | Select interrupt or DMA/Trigger of the internal module as the wake up source. |
This function configs Pin filter, including pin select, filer operate mode filer wakeup event and filter edge detection.
- Parameters
-
base | WUU peripheral base address. |
filterIndex | The index of the pin filer. |
config | Pointer to wuu_pin_filter_config_t structure. |
bool WUU_GetPinFilterFlag |
( |
WUU_Type * |
base, |
|
|
uint8_t |
filterIndex |
|
) |
| |
This function gets the pin filter flag.
- Parameters
-
base | WUU peripheral base address. |
filterIndex | A pin filter index, which starts from 1. |
- Returns
- True if the flag is a source of the existing low-leakage power mode.
void WUU_ClearPinFilterFlag |
( |
WUU_Type * |
base, |
|
|
uint8_t |
filterIndex |
|
) |
| |
This function clears the pin filter flag.
- Parameters
-
base | WUU peripheral base address. |
filterIndex | A pin filter index to clear the flag, starting from 1. |
bool WUU_GetExternalWakeupPinFlag |
( |
WUU_Type * |
base, |
|
|
uint32_t |
pinIndex |
|
) |
| |
This function checks the external pin flag to detect whether the MCU is woken up by the specific pin.
param base WUU peripheral base address. param pinIndex A pin index, which starts from 0. return True if the specific pin is a wakeup source.
void WUU_ClearExternalWakeupPinFlag |
( |
WUU_Type * |
base, |
|
|
uint32_t |
pinIndex |
|
) |
| |
This function clears the external wakeup source flag for a specific pin.
param base WUU peripheral base address. param pinIndex A pin index, which starts from 0.