MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Common Driver

Overview

The MCUXpresso SDK provides a driver for the common module of MCUXpresso SDK devices.

Files

file  fsl_power.h
 

Macros

#define MAKE_STATUS(group, code)   ((((group)*100) + (code)))
 Construct a status code value from a group and code number. More...
 
#define MAKE_VERSION(major, minor, bugfix)   (((major) << 16) | ((minor) << 8) | (bugfix))
 Construct the version number for drivers. More...
 
#define DEBUG_CONSOLE_DEVICE_TYPE_NONE   0U
 No debug console. More...
 
#define DEBUG_CONSOLE_DEVICE_TYPE_UART   1U
 Debug console base on UART. More...
 
#define DEBUG_CONSOLE_DEVICE_TYPE_LPUART   2U
 Debug console base on LPUART. More...
 
#define DEBUG_CONSOLE_DEVICE_TYPE_LPSCI   3U
 Debug console base on LPSCI. More...
 
#define DEBUG_CONSOLE_DEVICE_TYPE_USBCDC   4U
 Debug console base on USBCDC. More...
 
#define DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM   5U
 Debug console base on USBCDC. More...
 
#define DEBUG_CONSOLE_DEVICE_TYPE_IUART   6U
 Debug console base on i.MX UART. More...
 
#define DEBUG_CONSOLE_DEVICE_TYPE_VUSART   7U
 Debug console base on LPC_USART. More...
 
#define ARRAY_SIZE(x)   (sizeof(x) / sizeof((x)[0]))
 Computes the number of elements in an array. More...
 
#define SWDIO_GPIO_PIN   23U
 SWDIO pin is used as wakeup source, in order to provide better debug experience.
 
#define MAKE_PD_BITS(reg, slot)   ((reg << 8) | slot)
 Power name used for POWER_EnablePD/POWER_DisablePD. More...
 

Typedefs

typedef int32_t status_t
 Type used for all status and error return values. More...
 
typedef void(* p_POWER_RegisterWakeupEntry )(uint32_t ram_addr)
 Register address to bootloader. More...
 

Enumerations

enum  _status_groups {
  kStatusGroup_Generic = 0,
  kStatusGroup_FLASH = 1,
  kStatusGroup_LPSPI = 4,
  kStatusGroup_FLEXIO_SPI = 5,
  kStatusGroup_DSPI = 6,
  kStatusGroup_FLEXIO_UART = 7,
  kStatusGroup_FLEXIO_I2C = 8,
  kStatusGroup_LPI2C = 9,
  kStatusGroup_UART = 10,
  kStatusGroup_I2C = 11,
  kStatusGroup_LPSCI = 12,
  kStatusGroup_LPUART = 13,
  kStatusGroup_SPI = 14,
  kStatusGroup_XRDC = 15,
  kStatusGroup_SEMA42 = 16,
  kStatusGroup_SDHC = 17,
  kStatusGroup_SDMMC = 18,
  kStatusGroup_SAI = 19,
  kStatusGroup_MCG = 20,
  kStatusGroup_SCG = 21,
  kStatusGroup_SDSPI = 22,
  kStatusGroup_FLEXIO_I2S = 23,
  kStatusGroup_FLEXIO_MCULCD = 24,
  kStatusGroup_FLASHIAP = 25,
  kStatusGroup_FLEXCOMM_I2C = 26,
  kStatusGroup_I2S = 27,
  kStatusGroup_IUART = 28,
  kStatusGroup_CSI = 29,
  kStatusGroup_SDRAMC = 35,
  kStatusGroup_POWER = 39,
  kStatusGroup_ENET = 40,
  kStatusGroup_PHY = 41,
  kStatusGroup_TRGMUX = 42,
  kStatusGroup_SMARTCARD = 43,
  kStatusGroup_LMEM = 44,
  kStatusGroup_QSPI = 45,
  kStatusGroup_DMA = 50,
  kStatusGroup_EDMA = 51,
  kStatusGroup_DMAMGR = 52,
  kStatusGroup_FLEXCAN = 53,
  kStatusGroup_LTC = 54,
  kStatusGroup_FLEXIO_CAMERA = 55,
  kStatusGroup_LPC_SPI = 56,
  kStatusGroup_LPC_USART = 57,
  kStatusGroup_DMIC = 58,
  kStatusGroup_SDIF = 59,
  kStatusGroup_SPIFI = 60,
  kStatusGroup_OTP = 61,
  kStatusGroup_MCAN = 62,
  kStatusGroup_CAAM = 63,
  kStatusGroup_ECSPI = 64,
  kStatusGroup_USDHC = 65,
  kStatusGroup_ESAI = 69,
  kStatusGroup_FLEXSPI = 70,
  kStatusGroup_MMDC = 71,
  kStatusGroup_MICFIL = 72,
  kStatusGroup_SDMA = 73,
  kStatusGroup_NOTIFIER = 98,
  kStatusGroup_DebugConsole = 99,
  kStatusGroup_ApplicationRangeStart = 100
}
 Status group numbers. More...
 
enum  _generic_status
 Generic status return codes. More...
 
enum  power_mode_t {
  kPmActive,
  kPmSleep,
  kPmPowerDown0,
  kPmPowerDown1
}
 Power modes. More...
 
enum  SYSCON_RSTn_t {
  kFC0_RST_SHIFT_RSTn = 0,
  kFC1_RST_SHIFT_RSTn = 1,
  kFC2_RST_SHIFT_RSTn = 2,
  kFC3_RST_SHIFT_RSTn = 3,
  kTIM0_RST_SHIFT_RSTn = 4,
  kTIM1_RST_SHIFT_RSTn = 5,
  kTIM2_RST_SHIFT_RSTn = 6,
  kTIM3_RST_SHIFT_RSTn = 7,
  kSCT0_RST_SHIFT_RSTn = 8,
  kWDT_RST_SHIFT_RSTn = 9,
  kUSB_RST_SHIFT_RSTn = 10,
  kGPIO_RST_SHIFT_RSTn = 11,
  kRTC_RST_SHIFT_RSTn = 12,
  kADC_RST_SHIFT_RSTn = 13,
  kDAC_RST_SHIFT_RSTn = 14,
  kCS_RST_SHIFT_RSTn = 15,
  kFSP_RST_SHIFT_RSTn = 16,
  kDMA_RST_SHIFT_RSTn = 32,
  kPINT_RST_SHIFT_RSTn = 32,
  kMUX_RST_SHIFT_RSTn = 32,
  kQDEC0_RST_SHIFT_RSTn = 19,
  kQDEC1_RST_SHIFT_RSTn = 20,
  kSPIFI_RST_SHIFT_RSTn = 22,
  kCAL_RST_SHIFT_RSTn = 25,
  kCPU_RST_SHIFT_RSTn = 26,
  kBLE_RST_SHIFT_RSTn = 27,
  kFLASH_RST_SHIFT_RSTn = 28,
  kDP_RST_SHIFT_RSTn = 29,
  kREG_RST_SHIFT_RSTn = 30,
  kREBOOT_RST_SHIFT_RSTn = 31
}
 Enumeration for peripheral reset control bits. More...
 
enum  reset_source_t {
  kRESET_SrcPowerOn,
  kRESET_SrcBrownDown,
  kRESET_SrcExternalPin,
  kRESET_SrcWatchDog,
  kRESET_SrcLockUp,
  kRESET_SrcReboot,
  kRESET_SrcCpuSystem,
  kRESET_SrcWakeUp,
  kRESET_SrcCpuSoftware
}
 Reset source. More...
 

Functions

static status_t EnableIRQ (IRQn_Type interrupt)
 Enable specific interrupt. More...
 
static status_t DisableIRQ (IRQn_Type interrupt)
 Disable specific interrupt. More...
 
static uint32_t DisableGlobalIRQ (void)
 Disable the global IRQ. More...
 
static void EnableGlobalIRQ (uint32_t primask)
 Enaable the global IRQ. More...
 
uint32_t InstallIRQHandler (IRQn_Type irq, uint32_t irqHandler)
 install IRQ handler More...
 
void EnableDeepSleepIRQ (IRQn_Type interrupt)
 Enable specific interrupt for wake-up from deep-sleep mode. More...
 
void DisableDeepSleepIRQ (IRQn_Type interrupt)
 Disable specific interrupt for wake-up from deep-sleep mode. More...
 
void POWER_WritePmuCtrl1 (SYSCON_Type *base, uint32_t mask, uint32_t value)
 Work around for PMU_CTRL1's hardware issue. More...
 
void POWER_EnablePD (pd_bit_t en)
 Enable power down. More...
 
void POWER_DisablePD (pd_bit_t en)
 Disable power down. More...
 
void POWER_EnableDCDC (bool flag)
 Enable or disable DC-DC. More...
 
void POWER_EnableADC (bool flag)
 Enable or disable ADC power. More...
 
void POWER_LatchIO (void)
 Latch the output status and level of GPIO during power down. More...
 
void POWER_RestoreIO (void)
 Restore the gpio output control registers and take over controll of gpio pads. More...
 
void POWER_EnableSwdWakeup (void)
 Configure the SWDIO to gpio and as wakeup source before power down. More...
 
void POWER_RestoreSwd (void)
 Recover swdio's pin-mux configuration that swd access is availale after waking up from power down.
 
bool POWER_GpioActiveRequest (void)
 Check if any wake io is active.
 
void POWER_PreEnterLowPower (void)
 Prepares to enter stop modes. More...
 
void POWER_PostExitLowPower (void)
 Recovers after wake up from stop modes. More...
 
void POWER_EnterSleep (void)
 Make the chip enter sleep mode.
 
void POWER_EnterPowerDown (uint32_t exclude_from_pd)
 Make the chip enter power down mode. More...
 
void POWER_Init (void)
 @ brief Init of power management unit.
 
static void RESET_SetPeripheralReset (reset_ip_name_t peripheral)
 Assert reset to peripheral. More...
 
static void RESET_ClearPeripheralReset (reset_ip_name_t peripheral)
 Clear reset to peripheral. More...
 
static void RESET_PeripheralReset (reset_ip_name_t peripheral)
 Reset peripheral module. More...
 
static void RESET_SetDmaPintImputMuxReset (void)
 Reset DMA, PINT and InputMux module.
 
reset_source_t RESET_GetResetSource (void)
 This function is used to get the CPU start up source. More...
 
static void RESET_ClearResetSource (void)
 Clear the reset source.
 

Min/max macros

#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 

UINT16_MAX/UINT32_MAX value

#define UINT16_MAX   ((uint16_t)-1)
 
#define UINT32_MAX   ((uint32_t)-1)
 

Timer utilities

#define USEC_TO_COUNT(us, clockFreqInHz)   (uint64_t)((uint64_t)us * clockFreqInHz / 1000000U)
 Macro to convert a microsecond period to raw count value.
 
#define COUNT_TO_USEC(count, clockFreqInHz)   (uint64_t)((uint64_t)count * 1000000U / clockFreqInHz)
 Macro to convert a raw count value to microsecond.
 
#define MSEC_TO_COUNT(ms, clockFreqInHz)   (uint64_t)((uint64_t)ms * clockFreqInHz / 1000U)
 Macro to convert a millisecond period to raw count value.
 
#define COUNT_TO_MSEC(count, clockFreqInHz)   (uint64_t)((uint64_t)count * 1000U / clockFreqInHz)
 Macro to convert a raw count value to millisecond.
 

Alignment variable definition macros

#define SDK_ALIGN(var, alignbytes)   var
 
#define SDK_SIZEALIGN(var, alignbytes)   ((unsigned int)((var) + ((alignbytes)-1)) & (unsigned int)(~(unsigned int)((alignbytes)-1)))
 Macro to change a value to a given size aligned value.
 

Non-cacheable region definition macros

#define AT_NONCACHEABLE_SECTION(var)   var
 
#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes)   var
 

Driver version

#define FSL_QN9080_POWER_VERSION   (MAKE_VERSION(2, 0, 0))
 QN9080 power version 2.0.0. More...
 

Macro Definition Documentation

#define MAKE_STATUS (   group,
  code 
)    ((((group)*100) + (code)))
#define MAKE_VERSION (   major,
  minor,
  bugfix 
)    (((major) << 16) | ((minor) << 8) | (bugfix))
#define DEBUG_CONSOLE_DEVICE_TYPE_NONE   0U
#define DEBUG_CONSOLE_DEVICE_TYPE_UART   1U
#define DEBUG_CONSOLE_DEVICE_TYPE_LPUART   2U
#define DEBUG_CONSOLE_DEVICE_TYPE_LPSCI   3U
#define DEBUG_CONSOLE_DEVICE_TYPE_USBCDC   4U
#define DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM   5U
#define DEBUG_CONSOLE_DEVICE_TYPE_IUART   6U
#define DEBUG_CONSOLE_DEVICE_TYPE_VUSART   7U
#define ARRAY_SIZE (   x)    (sizeof(x) / sizeof((x)[0]))
#define FSL_QN9080_POWER_VERSION   (MAKE_VERSION(2, 0, 0))
#define MAKE_PD_BITS (   reg,
  slot 
)    ((reg << 8) | slot)

Typedef Documentation

typedef int32_t status_t
typedef void(* p_POWER_RegisterWakeupEntry)(uint32_t ram_addr)

This is an ROM API. The ram function address registered will be stored in a global variable in the reserved ram area for bootloader. After waking up from power down, bootloader will jump to the function registered.

Parameters
ram_addra function address in ram area.

Enumeration Type Documentation

Enumerator
kStatusGroup_Generic 

Group number for generic status codes.

kStatusGroup_FLASH 

Group number for FLASH status codes.

kStatusGroup_LPSPI 

Group number for LPSPI status codes.

kStatusGroup_FLEXIO_SPI 

Group number for FLEXIO SPI status codes.

kStatusGroup_DSPI 

Group number for DSPI status codes.

kStatusGroup_FLEXIO_UART 

Group number for FLEXIO UART status codes.

kStatusGroup_FLEXIO_I2C 

Group number for FLEXIO I2C status codes.

kStatusGroup_LPI2C 

Group number for LPI2C status codes.

kStatusGroup_UART 

Group number for UART status codes.

kStatusGroup_I2C 

Group number for UART status codes.

kStatusGroup_LPSCI 

Group number for LPSCI status codes.

kStatusGroup_LPUART 

Group number for LPUART status codes.

kStatusGroup_SPI 

Group number for SPI status code.

kStatusGroup_XRDC 

Group number for XRDC status code.

kStatusGroup_SEMA42 

Group number for SEMA42 status code.

kStatusGroup_SDHC 

Group number for SDHC status code.

kStatusGroup_SDMMC 

Group number for SDMMC status code.

kStatusGroup_SAI 

Group number for SAI status code.

kStatusGroup_MCG 

Group number for MCG status codes.

kStatusGroup_SCG 

Group number for SCG status codes.

kStatusGroup_SDSPI 

Group number for SDSPI status codes.

kStatusGroup_FLEXIO_I2S 

Group number for FLEXIO I2S status codes.

kStatusGroup_FLEXIO_MCULCD 

Group number for FLEXIO LCD status codes.

kStatusGroup_FLASHIAP 

Group number for FLASHIAP status codes.

kStatusGroup_FLEXCOMM_I2C 

Group number for FLEXCOMM I2C status codes.

kStatusGroup_I2S 

Group number for I2S status codes.

kStatusGroup_IUART 

Group number for IUART status codes.

kStatusGroup_CSI 

Group number for CSI status codes.

kStatusGroup_SDRAMC 

Group number for SDRAMC status codes.

kStatusGroup_POWER 

Group number for POWER status codes.

kStatusGroup_ENET 

Group number for ENET status codes.

kStatusGroup_PHY 

Group number for PHY status codes.

kStatusGroup_TRGMUX 

Group number for TRGMUX status codes.

kStatusGroup_SMARTCARD 

Group number for SMARTCARD status codes.

kStatusGroup_LMEM 

Group number for LMEM status codes.

kStatusGroup_QSPI 

Group number for QSPI status codes.

kStatusGroup_DMA 

Group number for DMA status codes.

kStatusGroup_EDMA 

Group number for EDMA status codes.

kStatusGroup_DMAMGR 

Group number for DMAMGR status codes.

kStatusGroup_FLEXCAN 

Group number for FlexCAN status codes.

kStatusGroup_LTC 

Group number for LTC status codes.

kStatusGroup_FLEXIO_CAMERA 

Group number for FLEXIO CAMERA status codes.

kStatusGroup_LPC_SPI 

Group number for LPC_SPI status codes.

kStatusGroup_LPC_USART 

Group number for LPC_USART status codes.

kStatusGroup_DMIC 

Group number for DMIC status codes.

kStatusGroup_SDIF 

Group number for SDIF status codes.

kStatusGroup_SPIFI 

Group number for SPIFI status codes.

kStatusGroup_OTP 

Group number for OTP status codes.

kStatusGroup_MCAN 

Group number for MCAN status codes.

kStatusGroup_CAAM 

Group number for CAAM status codes.

kStatusGroup_ECSPI 

Group number for ECSPI status codes.

kStatusGroup_USDHC 

Group number for USDHC status codes.

kStatusGroup_ESAI 

Group number for ESAI status codes.

kStatusGroup_FLEXSPI 

Group number for FLEXSPI status codes.

kStatusGroup_MMDC 

Group number for MMDC status codes.

kStatusGroup_MICFIL 

Group number for MIC status codes.

kStatusGroup_SDMA 

Group number for SDMA status codes.

kStatusGroup_NOTIFIER 

Group number for NOTIFIER status codes.

kStatusGroup_DebugConsole 

Group number for debug console status codes.

kStatusGroup_ApplicationRangeStart 

Starting number for application groups.

Enumerator
kPmActive 

CPU is executing.

kPmSleep 

CPU clock is gated.

kPmPowerDown0 

Power is shut down except for always on domain, 32k clock and selected wakeup source.

kPmPowerDown1 

Power is shut down except for always on domain and selected wakeup source.

Defines the enumeration for peripheral reset control bits in PRESETCTRL/ASYNCPRESETCTRL registers

Enumerator
kFC0_RST_SHIFT_RSTn 

Flexcomm Interface 0 reset control

kFC1_RST_SHIFT_RSTn 

Flexcomm Interface 1 reset control

kFC2_RST_SHIFT_RSTn 

Flexcomm Interface 2 reset control

kFC3_RST_SHIFT_RSTn 

Flexcomm Interface 3 reset control

kTIM0_RST_SHIFT_RSTn 

CTimer0 reset control

kTIM1_RST_SHIFT_RSTn 

CTimer1 reset control

kTIM2_RST_SHIFT_RSTn 

CTimer2 reset control

kTIM3_RST_SHIFT_RSTn 

CTimer3 reset control

kSCT0_RST_SHIFT_RSTn 

SCTimer/PWM 0 (SCT0) reset control

kWDT_RST_SHIFT_RSTn 

WDT reset control

kUSB_RST_SHIFT_RSTn 

USB reset control

kGPIO_RST_SHIFT_RSTn 

GPIO reset control

kRTC_RST_SHIFT_RSTn 

RTC reset control

kADC_RST_SHIFT_RSTn 

ADC reset control

kDAC_RST_SHIFT_RSTn 

DAC reset control

kCS_RST_SHIFT_RSTn 

Capacitive Sense reset control

kFSP_RST_SHIFT_RSTn 

FSP reset control

kDMA_RST_SHIFT_RSTn 

(Do not execute reset as default)DMA reset control

kPINT_RST_SHIFT_RSTn 

(Do not execute reset as default)Pin interrupt (PINT) reset control

kMUX_RST_SHIFT_RSTn 

(Do not execute reset as default)Input mux reset control

kQDEC0_RST_SHIFT_RSTn 

QDEC0 reset control

kQDEC1_RST_SHIFT_RSTn 

QDEC1 reset control

kSPIFI_RST_SHIFT_RSTn 

SPIFI reset control

kCAL_RST_SHIFT_RSTn 

Calibration reset control

kCPU_RST_SHIFT_RSTn 

CPU reset control

kBLE_RST_SHIFT_RSTn 

BLE reset control

kFLASH_RST_SHIFT_RSTn 

Flash reset control

kDP_RST_SHIFT_RSTn 

Data path reset control

kREG_RST_SHIFT_RSTn 

Retention register reset control

kREBOOT_RST_SHIFT_RSTn 

Reboot reset control

Enumerator
kRESET_SrcPowerOn 

Power on reset

kRESET_SrcBrownDown 

Brown down reset

kRESET_SrcExternalPin 

External pin reset

kRESET_SrcWatchDog 

Watch dog reset

kRESET_SrcLockUp 

Lock up reset

kRESET_SrcReboot 

Reboot reset

kRESET_SrcCpuSystem 

CPU system reset

kRESET_SrcWakeUp 

Wake up reset

kRESET_SrcCpuSoftware 

CPU software reset

Function Documentation

static status_t EnableIRQ ( IRQn_Type  interrupt)
inlinestatic

Enable LEVEL1 interrupt. For some devices, there might be multiple interrupt levels. For example, there are NVIC and intmux. Here the interrupts connected to NVIC are the LEVEL1 interrupts, because they are routed to the core directly. The interrupts connected to intmux are the LEVEL2 interrupts, they are routed to NVIC first then routed to core.

This function only enables the LEVEL1 interrupts. The number of LEVEL1 interrupts is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.

Parameters
interruptThe IRQ number.
Return values
kStatus_SuccessInterrupt enabled successfully
kStatus_FailFailed to enable the interrupt
static status_t DisableIRQ ( IRQn_Type  interrupt)
inlinestatic

Disable LEVEL1 interrupt. For some devices, there might be multiple interrupt levels. For example, there are NVIC and intmux. Here the interrupts connected to NVIC are the LEVEL1 interrupts, because they are routed to the core directly. The interrupts connected to intmux are the LEVEL2 interrupts, they are routed to NVIC first then routed to core.

This function only disables the LEVEL1 interrupts. The number of LEVEL1 interrupts is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.

Parameters
interruptThe IRQ number.
Return values
kStatus_SuccessInterrupt disabled successfully
kStatus_FailFailed to disable the interrupt
static uint32_t DisableGlobalIRQ ( void  )
inlinestatic

Disable the global interrupt and return the current primask register. User is required to provided the primask register for the EnableGlobalIRQ().

Returns
Current primask value.
static void EnableGlobalIRQ ( uint32_t  primask)
inlinestatic

Set the primask register with the provided primask value but not just enable the primask. The idea is for the convinience of integration of RTOS. some RTOS get its own management mechanism of primask. User is required to use the EnableGlobalIRQ() and DisableGlobalIRQ() in pair.

Parameters
primaskvalue of primask register to be restored. The primask value is supposed to be provided by the DisableGlobalIRQ().
uint32_t InstallIRQHandler ( IRQn_Type  irq,
uint32_t  irqHandler 
)
Parameters
irqIRQ number
irqHandlerIRQ handler address
Returns
The old IRQ handler address
void EnableDeepSleepIRQ ( IRQn_Type  interrupt)

Enable the interrupt for wake-up from deep sleep mode. Some interrupts are typically used in sleep mode only and will not occur during deep-sleep mode because relevant clocks are stopped. However, it is possible to enable those clocks (significantly increasing power consumption in the reduced power mode), making these wake-ups possible.

Note
This function also enables the interrupt in the NVIC (EnableIRQ() is called internally).
Parameters
interruptThe IRQ number.
void DisableDeepSleepIRQ ( IRQn_Type  interrupt)

Disable the interrupt for wake-up from deep sleep mode. Some interrupts are typically used in sleep mode only and will not occur during deep-sleep mode because relevant clocks are stopped. However, it is possible to enable those clocks (significantly increasing power consumption in the reduced power mode), making these wake-ups possible.

Note
This function also disables the interrupt in the NVIC (DisableIRQ() is called internally).
Parameters
interruptThe IRQ number.
void POWER_WritePmuCtrl1 ( SYSCON_Type *  base,
uint32_t  mask,
uint32_t  value 
)

Refer to Errata PMU.1.

void POWER_EnablePD ( pd_bit_t  en)

Note that enabling the bit powers down the peripheral

Parameters
enany value defined by enum
void POWER_DisablePD ( pd_bit_t  en)

Note that disabling the bit powers up the peripheral

Parameters
enany value defined by enum
void POWER_EnableDCDC ( bool  flag)
Parameters
flagtrue to enable the DC-DC, false to disable.
void POWER_EnableADC ( bool  flag)
Parameters
flagtrue to enable the ADC power, false to disable.
void POWER_LatchIO ( void  )

During power down, GPIO registers at GPIOA_BASE and GPIOB_BASE will get lost, and GPIO controller loses control of the pads. This result in uncetain level on pads during power down. Use this function to capture the current GPIO output status and level to always-on registers, SYSCON->PIO_CAP_OUT0/1 and SYSCON->PIO_CAP_OE0/1, and hand over control of pads to these always-on registers.

void POWER_RestoreIO ( void  )

Should be called in pair with POWER_LatchIO().

void POWER_EnableSwdWakeup ( void  )

By using this, the chip can be waked up by swd debugger from power down.

void POWER_PreEnterLowPower ( void  )

This function should be called before entering low power modes.

void POWER_PostExitLowPower ( void  )

This function should be called after wake up from low power modes. It is used with POWER_PreEnterLowPower.

void POWER_EnterPowerDown ( uint32_t  exclude_from_pd)

If 32k clock source is on before calling this, the chip will go to power down 0. If 32k clock source is turned off before this, the chip will go to power down 1.

Parameters
exclude_from_pdwhen entering power down, leave the modules indicated by exclude_from_pd on.
static void RESET_SetPeripheralReset ( reset_ip_name_t  peripheral)
inlinestatic

Asserts reset signal to specified peripheral module.

Parameters
peripheralAssert reset to this peripheral. The enum argument contains encoding of reset register and reset bit position in the reset register.
Note
The peripheral will be in reset state until function RESET_ClearPeripheralReset(...) called.
static void RESET_ClearPeripheralReset ( reset_ip_name_t  peripheral)
inlinestatic

Clears reset signal to specified peripheral module, allows it to operate.

Parameters
peripheralClear reset to this peripheral. The enum argument contains encoding of reset register and reset bit position in the reset register.
static void RESET_PeripheralReset ( reset_ip_name_t  peripheral)
inlinestatic

Reset peripheral module.

Parameters
peripheralPeripheral to reset. The enum argument contains encoding of reset register and reset bit position in the reset register.
reset_source_t RESET_GetResetSource ( void  )
Returns
Reset source reset_source_t