MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
LLWU: Low-Leakage Wakeup Unit Driver

Data Structures

struct  llwu_version_id_t
 IP version ID definition. More...
 
struct  llwu_param_t
 IP parameter definition. More...
 
struct  llwu_external_pin_filter_mode_t
 An external input pin filter control structure. More...
 

Enumerations

enum  llwu_external_pin_mode_t {
  kLLWU_ExternalPinDisable = 0U,
  kLLWU_ExternalPinRisingEdge = 1U,
  kLLWU_ExternalPinFallingEdge = 2U,
  kLLWU_ExternalPinAnyEdge = 3U
}
 External input pin control modes. More...
 
enum  llwu_pin_filter_mode_t {
  kLLWU_PinFilterDisable = 0U,
  kLLWU_PinFilterRisingEdge = 1U,
  kLLWU_PinFilterFallingEdge = 2U,
  kLLWU_PinFilterAnyEdge = 3U
}
 Digital filter control modes. More...
 

Driver version

#define FSL_LLWU_DRIVER_VERSION   (MAKE_VERSION(2, 0, 4))
 LLWU driver version. More...
 

Low-Leakage Wakeup Unit Control APIs

static void LLWU_GetVersionId (LLWU_Type *base, llwu_version_id_t *versionId)
 Gets the LLWU version ID. More...
 
static void LLWU_GetParam (LLWU_Type *base, llwu_param_t *param)
 Gets the LLWU parameter. More...
 
void LLWU_SetExternalWakeupPinMode (LLWU_Type *base, uint32_t pinIndex, llwu_external_pin_mode_t pinMode)
 Sets the external input pin source mode. More...
 
bool LLWU_GetExternalWakeupPinFlag (LLWU_Type *base, uint32_t pinIndex)
 Gets the external wakeup source flag. More...
 
void LLWU_ClearExternalWakeupPinFlag (LLWU_Type *base, uint32_t pinIndex)
 Clears the external wakeup source flag. More...
 
static void LLWU_EnableInternalModuleInterruptWakup (LLWU_Type *base, uint32_t moduleIndex, bool enable)
 Enables/disables the internal module source. More...
 
static bool LLWU_GetInternalWakeupModuleFlag (LLWU_Type *base, uint32_t moduleIndex)
 Gets the external wakeup source flag. More...
 
static void LLWU_EnableInternalModuleDmaRequestWakup (LLWU_Type *base, uint32_t moduleIndex, bool enable)
 Enables/disables the internal module DMA wakeup source. More...
 
void LLWU_SetPinFilterMode (LLWU_Type *base, uint32_t filterIndex, llwu_external_pin_filter_mode_t filterMode)
 Sets the pin filter configuration. More...
 
bool LLWU_GetPinFilterFlag (LLWU_Type *base, uint32_t filterIndex)
 Gets the pin filter configuration. More...
 
void LLWU_ClearPinFilterFlag (LLWU_Type *base, uint32_t filterIndex)
 Clears the pin filter configuration. More...
 
#define INTERNAL_WAKEUP_MODULE_FLAG_REG   MF
 

Detailed Description

The MCUXpresso SDK provides a peripheral driver for the Low-Leakage Wakeup Unit (LLWU) module of MCUXpresso SDK devices. The LLWU module allows the user to select external pin sources and internal modules as a wake-up source from low-leakage power modes.

External wakeup pins configurations

Configures the external wakeup pins' working modes, gets, and clears the wake pin flags. External wakeup pins are accessed by the pinIndex, which is started from 1. Numbers of the external pins depend on the SoC configuration.

Internal wakeup modules configurations

Enables/disables the internal wakeup modules and gets the module flags. Internal modules are accessed by moduleIndex, which is started from 1. Numbers of external pins depend the on SoC configuration.

Digital pin filter for external wakeup pin configurations

Configures the digital pin filter of the external wakeup pins' working modes, gets, and clears the pin filter flags. Digital pin filters are accessed by the filterIndex, which is started from 1. Numbers of external pins depend on the SoC configuration.


Data Structure Documentation

struct llwu_version_id_t

Data Fields

uint16_t feature
 A feature specification number. More...
 
uint8_t minor
 The minor version number. More...
 
uint8_t major
 The major version number. More...
 

Field Documentation

uint16_t llwu_version_id_t::feature
uint8_t llwu_version_id_t::minor
uint8_t llwu_version_id_t::major
struct llwu_param_t

Data Fields

uint8_t filters
 A number of the pin filter. More...
 
uint8_t dmas
 A number of the wakeup DMA. More...
 
uint8_t modules
 A number of the wakeup module. More...
 
uint8_t pins
 A number of the wake up pin. More...
 

Field Documentation

uint8_t llwu_param_t::filters
uint8_t llwu_param_t::dmas
uint8_t llwu_param_t::modules
uint8_t llwu_param_t::pins
struct llwu_external_pin_filter_mode_t

Data Fields

uint32_t pinIndex
 A pin number.
 
llwu_pin_filter_mode_t filterMode
 Filter mode.
 

Macro Definition Documentation

#define FSL_LLWU_DRIVER_VERSION   (MAKE_VERSION(2, 0, 4))

Enumeration Type Documentation

Enumerator
kLLWU_ExternalPinDisable 

Pin disabled as a wakeup input.

kLLWU_ExternalPinRisingEdge 

Pin enabled with the rising edge detection.

kLLWU_ExternalPinFallingEdge 

Pin enabled with the falling edge detection.

kLLWU_ExternalPinAnyEdge 

Pin enabled with any change detection.

Enumerator
kLLWU_PinFilterDisable 

Filter disabled.

kLLWU_PinFilterRisingEdge 

Filter positive edge detection.

kLLWU_PinFilterFallingEdge 

Filter negative edge detection.

kLLWU_PinFilterAnyEdge 

Filter any edge detection.

Function Documentation

static void LLWU_GetVersionId ( LLWU_Type *  base,
llwu_version_id_t versionId 
)
inlinestatic

This function gets the LLWU version ID, including the major version number, the minor version number, and the feature specification number.

Parameters
baseLLWU peripheral base address.
versionIdA pointer to the version ID structure.
static void LLWU_GetParam ( LLWU_Type *  base,
llwu_param_t param 
)
inlinestatic

This function gets the LLWU parameter, including a wakeup pin number, a module number, a DMA number, and a pin filter number.

Parameters
baseLLWU peripheral base address.
paramA pointer to the LLWU parameter structure.
void LLWU_SetExternalWakeupPinMode ( LLWU_Type *  base,
uint32_t  pinIndex,
llwu_external_pin_mode_t  pinMode 
)

This function sets the external input pin source mode that is used as a wake up source.

Parameters
baseLLWU peripheral base address.
pinIndexA pin index to be enabled as an external wakeup source starting from 1.
pinModeA pin configuration mode defined in the llwu_external_pin_modes_t.
bool LLWU_GetExternalWakeupPinFlag ( LLWU_Type *  base,
uint32_t  pinIndex 
)

This function checks the external pin flag to detect whether the MCU is woken up by the specific pin.

Parameters
baseLLWU peripheral base address.
pinIndexA pin index, which starts from 1.
Returns
True if the specific pin is a wakeup source.
void LLWU_ClearExternalWakeupPinFlag ( LLWU_Type *  base,
uint32_t  pinIndex 
)

This function clears the external wakeup source flag for a specific pin.

Parameters
baseLLWU peripheral base address.
pinIndexA pin index, which starts from 1.
static void LLWU_EnableInternalModuleInterruptWakup ( LLWU_Type *  base,
uint32_t  moduleIndex,
bool  enable 
)
inlinestatic

This function enables/disables the internal module source mode that is used as a wake up source.

Parameters
baseLLWU peripheral base address.
moduleIndexA module index to be enabled as an internal wakeup source starting from 1.
enableAn enable or a disable setting
static bool LLWU_GetInternalWakeupModuleFlag ( LLWU_Type *  base,
uint32_t  moduleIndex 
)
inlinestatic

This function checks the external pin flag to detect whether the system is woken up by the specific pin.

Parameters
baseLLWU peripheral base address.
moduleIndexA module index, which starts from 1.
Returns
True if the specific pin is a wake up source.
static void LLWU_EnableInternalModuleDmaRequestWakup ( LLWU_Type *  base,
uint32_t  moduleIndex,
bool  enable 
)
inlinestatic

This function enables/disables the internal DMA that is used as a wake up source.

Parameters
baseLLWU peripheral base address.
moduleIndexAn internal module index which is used as a DMA request source, starting from 1.
enableEnable or disable the DMA request source
void LLWU_SetPinFilterMode ( LLWU_Type *  base,
uint32_t  filterIndex,
llwu_external_pin_filter_mode_t  filterMode 
)

This function sets the pin filter configuration.

Parameters
baseLLWU peripheral base address.
filterIndexA pin filter index used to enable/disable the digital filter, starting from 1.
filterModeA filter mode configuration
bool LLWU_GetPinFilterFlag ( LLWU_Type *  base,
uint32_t  filterIndex 
)

This function gets the pin filter flag.

Parameters
baseLLWU peripheral base address.
filterIndexA pin filter index, which starts from 1.
Returns
True if the flag is a source of the existing low-leakage power mode.
void LLWU_ClearPinFilterFlag ( LLWU_Type *  base,
uint32_t  filterIndex 
)

This function clears the pin filter flag.

Parameters
baseLLWU peripheral base address.
filterIndexA pin filter index to clear the flag, starting from 1.