Kinetis SDK v.2.0 API Reference Manual
Rev. 0
NXP Semiconductors
|
The KSDK provides a Peripheral driver for the Low-Leakage Wakeup Unit (LLWU) module of Kinetis 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.
Configures the external wakeup pins' working modes, gets and clears the wake pin flags. External wakeup pins are accessed by pinIndex
which is started from 1. Numbers of external pins depend on the SoC configuration.
Enables/disables the internal wakeup modules, and gets the modules flags. Internal modules are accessed by moduleIndex
which is started from 1. Numbers of external pins depend the on SoC configuration.
Configures the digital pin filter of the external wakeup pins' working modes, gets and clears the pin filter flags. Digital pins filters are accessed by filterIndex
which is started from 1. Numbers of external pins depends on the SoC configuration.
Data Structures | |
struct | llwu_external_pin_filter_mode_t |
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, 1)) |
LLWU driver version 2.0.1. More... | |
Low-Leakage Wakeup Unit Control APIs | |
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... | |
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) |
Clear the pin filter configuration. More... | |
struct llwu_external_pin_filter_mode_t |
Data Fields | |
uint32_t | pinIndex |
Pin number. | |
llwu_pin_filter_mode_t | filterMode |
Filter mode. | |
#define FSL_LLWU_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
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.
base | LLWU peripheral base address. |
pinIndex | pin index which to be enabled as external wakeup source, start from 1. |
pinMode | pin configuration mode defined in 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 woke up by the specific pin.
base | LLWU peripheral base address. |
pinIndex | pin index, start from 1. |
void LLWU_ClearExternalWakeupPinFlag | ( | LLWU_Type * | base, |
uint32_t | pinIndex | ||
) |
This function clears the external wakeup source flag for a specific pin.
base | LLWU peripheral base address. |
pinIndex | pin index, start from 1. |
void LLWU_SetPinFilterMode | ( | LLWU_Type * | base, |
uint32_t | filterIndex, | ||
llwu_external_pin_filter_mode_t | filterMode | ||
) |
This function sets the pin filter configuration.
base | LLWU peripheral base address. |
filterIndex | pin filter index which used to enable/disable the digital filter, start from 1. |
filterMode | filter mode configuration |
bool LLWU_GetPinFilterFlag | ( | LLWU_Type * | base, |
uint32_t | filterIndex | ||
) |
This function gets the pin filter flag.
base | LLWU peripheral base address. |
filterIndex | pin filter index, start from 1. |
void LLWU_ClearPinFilterFlag | ( | LLWU_Type * | base, |
uint32_t | filterIndex | ||
) |
This function clear the pin filter flag.
base | LLWU peripheral base address. |
filterIndex | pin filter index which to be clear the flag, start from 1. |