MCUXpresso SDK API Reference Manual  Rev 2.12.1
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
CMC: Core Mode Controller Driver

Overview

The MCUXpresso SDK provides a peripheral driver for the Core Mode Controller (CMC) module of MCUXpresso SDK devices. The CMC module sequences the CPU and associated logic through the different operating modes.

API function are provided to config the system for working in a dedicated power mode. For entering different power modes of different power domains, CMC_EnterLowPowerMode() function accepts different parameters. For entering the same power modes of different power domains, invoke CMC_GlobalEnterLowPowerMode() function.

Data Structures

struct  cmc_reset_pin_config_t
 CMC reset pin configuration. More...
 
struct  cmc_power_domain_config_t
 power mode configuration for each power domain. More...
 

Enumerations

enum  _cmc_power_mode_protection {
  kCMC_AllowSleepMode = 0x1UL,
  kCMC_AllowDeepSleepMode = 0x2UL,
  kCMC_AllowPowerDownMode = 0x4UL,
  kCMC_AllowDeepPowerDownMode = 0x8UL,
  kCMC_AllowAllLowPowerModes = 0xFUL
}
 CMC power mode Protection enumeration. More...
 
enum  _cmc_wakeup_sources {
  kCMC_WakeupFromResetInterruptOrPowerDown,
  kCMC_WakeupFromDebugReuqest = CMC_CKSTAT_WAKEUP(1U << 1U),
  kCMC_WakeupFromInterrupt = CMC_CKSTAT_WAKEUP(1U << 2U),
  kCMC_WakeupFromDMAWakeup = CMC_CKSTAT_WAKEUP(1U << 3U),
  kCMC_WakeupFromWUURequest = CMC_CKSTAT_WAKEUP(1U << 4U),
  kCMC_WakeupFromBusMaster = CMC_CKSTAT_WAKEUP(1U << 5U)
}
 Wake up sources from the previous low power mode entry. More...
 
enum  _cmc_system_reset_interrupt_enable {
  kCMC_PinResetInterruptEnable = CMC_SRIE_PIN_MASK,
  kCMC_DAPResetInterruptEnable = CMC_SRIE_DAP_MASK,
  kCMC_LowPowerAcknowledgeTimeoutResetInterruptEnable,
  kCMC_Watchdog0ResetInterruptEnable = CMC_SRIE_WDOG0_MASK,
  kCMC_SoftwareResetInterruptEnable = CMC_SRIE_SW_MASK,
  kCMC_LockupResetInterruptEnable = CMC_SRIE_LOCKUP_MASK,
  kCMC_Watchdog1ResetInterruptEnable = CMC_SRIE_WDOG1_MASK
}
 System Reset Interrupt enable enumeration. More...
 
enum  _cmc_system_reset_interrupt_flag {
  kCMC_PinResetInterruptFlag = CMC_SRIF_PIN_MASK,
  kCMC_DAPResetInterruptFlag = CMC_SRIF_DAP_MASK,
  kCMC_LowPowerAcknowledgeTimeoutResetFlag,
  kCMC_Watchdog0ResetInterruptFlag = CMC_SRIF_WDOG0_MASK,
  kCMC_SoftwareResetInterruptFlag = CMC_SRIF_SW_MASK,
  kCMC_LockupResetInterruptFlag = CMC_SRIF_LOCKUP_MASK,
  kCMC_Watchdog1ResetInterruptFlag = CMC_SRIF_WDOG1_MASK
}
 CMC System Reset Interrupt Status flag. More...
 
enum  _cmc_system_sram_arrays {
  kCMC_SRAMBank0 = 1U << 0U,
  kCMC_SRAMBank1 = 1U << 1U,
  kCMC_SRAMBank2 = 1U << 2U,
  kCMC_SRAMBank3 = 1U << 3U,
  kCMC_SRAMBank4 = 1U << 4U,
  kCMC_SRAMBank5 = 1U << 5U,
  kCMC_SRAMBank6 = 1U << 6U,
  kCMC_SRAMBank7 = 1U << 7U
}
 CMC System SRAM arrays low power mode enable enumeration. More...
 
enum  _cmc_system_reset_sources {
  kCMC_WakeUpReset,
  kCMC_PORReset = CMC_SRS_POR_MASK,
  kCMC_LVDReset = CMC_SRS_LVD_MASK,
  kCMC_HVDReset = CMC_SRS_HVD_MASK,
  kCMC_WarmReset = CMC_SRS_WARM_MASK,
  kCMC_FatalReset = CMC_SRS_FATAL_MASK,
  kCMC_PinReset = CMC_SRS_PIN_MASK,
  kCMC_DAPReset = CMC_SRS_DAP_MASK,
  kCMC_ResetTimeout = CMC_SRS_RSTACK_MASK,
  kCMC_LowPowerAcknowledgeTimeoutReset,
  kCMC_SCGReset = CMC_SRS_SCG_MASK,
  kCMC_Watchdog0Reset = CMC_SRS_WDOG0_MASK,
  kCMC_SoftwareReset = CMC_SRS_SW_MASK,
  kCMC_LockUoReset = CMC_SRS_LOCKUP_MASK,
  kCMC_Watchdog1Reset = CMC_SRS_WDOG1_MASK,
  kCMC_SecurityViolationReset = CMC_SRS_SECVIO_MASK
}
 System reset sources enumeration. More...
 
enum  cmc_core_clock_gate_status_t {
  kCMC_CoreClockNotGated = 0U,
  kCMC_CoreClockGated = 1U
}
 Indicate the core clock was gated. More...
 
enum  cmc_clock_mode_t {
  kCMC_GateNoneClock = 0x00U,
  kCMC_GateCoreClock = 0x01U,
  kCMC_GateCorePlatformClock = 0x03U,
  kCMC_GateAllSystemClocks = 0x07U,
  kCMC_GateAllSystemClocksEnterLowPowerMode
}
 CMC clock mode enumeration. More...
 
enum  cmc_low_power_mode_t {
  kCMC_ActiveMode = 0x0U,
  kCMC_SleepMode = 0x1U,
  kCMC_DeepSleepMode = 0x3U,
  kCMC_PowerDownMode = 0x7U,
  kCMC_DeepPowerDown = 0xFU
}
 CMC power mode enumeration. More...
 

Driver version

#define FSL_CMC_DRIVER_VERSION   (MAKE_VERSION(2, 2, 1))
 CMC driver version 2.2.1. More...
 

CLOCK mode configuration.

void CMC_SetClockMode (CMC_Type *base, cmc_clock_mode_t mode)
 Sets clock mode. More...
 
static void CMC_LockClockModeSetting (CMC_Type *base)
 Locks the clock mode setting. More...
 

Gets/Clears the Clock Mode, the wake up source, the Reset source.

static cmc_core_clock_gate_status_t CMC_GetCoreClockGatedStatus (CMC_Type *base)
 Gets the core clock gated status. More...
 
static void CMC_ClearCoreClockGatedStatus (CMC_Type *base)
 Clears the core clock gated status. More...
 
static uint8_t CMC_GetWakeupSource (CMC_Type *base)
 Gets the Wakeup Source. More...
 
static cmc_clock_mode_t CMC_GetClockMode (CMC_Type *base)
 Gets the Clock mode. More...
 
static uint32_t CMC_GetSystemResetStatus (CMC_Type *base)
 Gets the System reset status. More...
 
static uint32_t CMC_GetStickySystemResetStatus (CMC_Type *base)
 Gets the sticky system reset status since the last WAKE Cold Reset. More...
 
static void CMC_ClearStickySystemResetStatus (CMC_Type *base, uint32_t mask)
 Clears the sticky system reset status flags. More...
 
static uint8_t CMC_GetResetCount (CMC_Type *base)
 Gets the number of reset sequences completed since the last WAKE Cold Reset. More...
 

Power mode configuration.

void CMC_SetPowerModeProtection (CMC_Type *base, uint32_t allowedModes)
 Configures all power mode protection settings. More...
 
static void CMC_LockPowerModeProtectionSetting (CMC_Type *base)
 Locks the power mode protection. More...
 
static void CMC_SetGlobalPowerMode (CMC_Type *base, cmc_low_power_mode_t lowPowerMode)
 Config the same lowPower mode for all power domain. More...
 
static void CMC_SetMAINPowerMode (CMC_Type *base, cmc_low_power_mode_t lowPowerMode)
 Configures entry into low power mode for the MAIN Power domain. More...
 
static cmc_low_power_mode_t CMC_GetMAINPowerMode (CMC_Type *base)
 Gets the power mode of the MAIN Power domain. More...
 
static void CMC_SetWAKEPowerMode (CMC_Type *base, cmc_low_power_mode_t lowPowerMode)
 Configure entry into low power mode for the WAKE Power domain. More...
 
static cmc_low_power_mode_t CMC_GetWAKEPowerMode (CMC_Type *base)
 Gets the power mode of the WAKE Power domain. More...
 

Reset Pin configuration.

void CMC_ConfigResetPin (CMC_Type *base, const cmc_reset_pin_config_t *config)
 Configure reset pin. More...
 

System Reset Interrupts.

static void CMC_EnableSystemResetInterrupt (CMC_Type *base, uint32_t mask)
 Enable system reset interrupts. More...
 
static void CMC_DisableSystemResetInterrupt (CMC_Type *base, uint32_t mask)
 Disable system reset interrupts. More...
 
static uint32_t CMC_GetSystemResetInterruptFlags (CMC_Type *base)
 Gets System Reset interrupt flags. More...
 
static void CMC_ClearSystemResetInterruptFlags (CMC_Type *base, uint32_t mask)
 Clears System Reset interrupt flags. More...
 

Non Maskable Pin interrupt.

static void CMC_EnableNonMaskablePinInterrupt (CMC_Type *base, bool enable)
 Enable/Disable Non maskable Pin interrupt. More...
 

Boot Configuration.

static uint8_t CMC_GetISPMODEPinLogic (CMC_Type *base)
 Gets the logic state of the ISPMODE_n pin. More...
 
static void CMC_ClearISPMODEPinLogic (CMC_Type *base)
 Clears ISPMODE_n pin state. More...
 
static void CMC_ForceBootConfiguration (CMC_Type *base, bool assert)
 Set the logic state of the BOOT_CONFIGn pin. More...
 

BootROM Status.

static uint32_t CMC_GetBootRomStatus (CMC_Type *base)
 Gets the status information written by the BootROM. More...
 

System SRAM Configuration.

void CMC_PowerOffSRAMAllMode (CMC_Type *base, uint8_t mask)
 Power off the selected system SRAM always. More...
 
static void CMC_PowerOnSRAMAllMode (CMC_Type *base, uint8_t mask)
 Power on SRAM during all mode. More...
 
void CMC_PowerOffSRAMLowPowerOnly (CMC_Type *base, uint8_t mask)
 Power off the selected system SRAM during low power mode only. More...
 
static void CMC_PowerOnSRAMLowPowerOnly (CMC_Type *base, uint8_t mask)
 Power on the selected system SRAM during low power mode only. More...
 

Flash Low Power Mode configuration.

void CMC_ConfigFlashMode (CMC_Type *base, bool wake, bool doze, bool disable)
 Configs the low power mode of the on-chip flash memory. More...
 

Debug Configuration.

static void CMC_EnableDebugOperation (CMC_Type *base, bool enable)
 Enables/Disables debug Operation when the core sleep. More...
 

Low Power modes enter.

void CMC_PreEnterLowPowerMode (void)
 Prepares to enter low power modes. More...
 
void CMC_PostExitLowPowerMode (void)
 Recovers after wake up from low power modes. More...
 
void CMC_GlobalEnterLowPowerMode (CMC_Type *base, cmc_low_power_mode_t lowPowerMode)
 Configs the entry into the same low power mode for each power domains. More...
 
void CMC_EnterLowPowerMode (CMC_Type *base, const cmc_power_domain_config_t *config)
 Configs the entry into different low power modes for each power domains. More...
 

Data Structure Documentation

struct cmc_reset_pin_config_t

Data Fields

bool lowpowerFilterEnable
 Low Power Filter enable. More...
 
bool resetFilterEnable
 Reset Filter enable. More...
 
uint8_t resetFilterWidth
 Width of the Reset Filter. More...
 

Field Documentation

bool cmc_reset_pin_config_t::lowpowerFilterEnable
bool cmc_reset_pin_config_t::resetFilterEnable
uint8_t cmc_reset_pin_config_t::resetFilterWidth
struct cmc_power_domain_config_t

Data Fields

cmc_clock_mode_t clock_mode
 Clock mode for each power domain. More...
 
cmc_low_power_mode_t main_domain
 The low power mode of the MAIN power domain. More...
 
cmc_low_power_mode_t wake_domain
 The low power mode of the WAKE power domain. More...
 

Field Documentation

cmc_clock_mode_t cmc_power_domain_config_t::clock_mode
cmc_low_power_mode_t cmc_power_domain_config_t::main_domain
cmc_low_power_mode_t cmc_power_domain_config_t::wake_domain

Macro Definition Documentation

#define FSL_CMC_DRIVER_VERSION   (MAKE_VERSION(2, 2, 1))

Enumeration Type Documentation

Enumerator
kCMC_AllowSleepMode 

Allow Sleep mode.

kCMC_AllowDeepSleepMode 

Allow Deep Sleep mode.

kCMC_AllowPowerDownMode 

Allow Power Down mode.

kCMC_AllowDeepPowerDownMode 

Allow Deep Power Down mode.

kCMC_AllowAllLowPowerModes 

Allow all low power modes.

Enumerator
kCMC_WakeupFromResetInterruptOrPowerDown 

Wakeup source is reset interrupt, or wake up from [Deep] Power Down.

kCMC_WakeupFromDebugReuqest 

Wakeup source is debug request.

kCMC_WakeupFromInterrupt 

Wakeup source is interrupt.

kCMC_WakeupFromDMAWakeup 

Wakeup source is DMA Wakeup.

kCMC_WakeupFromWUURequest 

Wakeup source is WUU request.

kCMC_WakeupFromBusMaster 

Wakeup source is Bus master.

Enumerator
kCMC_PinResetInterruptEnable 

Pin Reset interrupt enable.

kCMC_DAPResetInterruptEnable 

DAP Reset interrupt enable.

kCMC_LowPowerAcknowledgeTimeoutResetInterruptEnable 

Low Power Acknowledge Timeout Reset interrupt enable.

kCMC_Watchdog0ResetInterruptEnable 

Watchdog 0 Reset interrupt enable.

kCMC_SoftwareResetInterruptEnable 

Software Reset interrupt enable.

kCMC_LockupResetInterruptEnable 

Lockup Reset interrupt enable.

kCMC_Watchdog1ResetInterruptEnable 

Watchdog 1 Reset interrupt enable.

Enumerator
kCMC_PinResetInterruptFlag 

Pin Reset interrupt flag.

kCMC_DAPResetInterruptFlag 

DAP Reset interrupt flag.

kCMC_LowPowerAcknowledgeTimeoutResetFlag 

Low Power Acknowledge Timeout Reset interrupt flag.

kCMC_Watchdog0ResetInterruptFlag 

Watchdog 0 Reset interrupt flag.

kCMC_SoftwareResetInterruptFlag 

Software Reset interrupt flag.

kCMC_LockupResetInterruptFlag 

Lock up Reset interrupt flag.

kCMC_Watchdog1ResetInterruptFlag 

Watchdog 1 Reset interrupt flag.

Enumerator
kCMC_SRAMBank0 

Power off SRAM Bank0, please refer to chip's RM for the corresponding SRAM array.

kCMC_SRAMBank1 

Power off SRAM Bank1, please refer to chip's RM for the corresponding SRAM array.

kCMC_SRAMBank2 

Power off SRAM Bank2, please refer to chip's RM for the corresponding SRAM array.

kCMC_SRAMBank3 

Power off SRAM Bank3, please refer to chip's RM for the corresponding SRAM array.

kCMC_SRAMBank4 

Power off SRAM Bank4, please refer to chip's RM for the corresponding SRAM array.

kCMC_SRAMBank5 

Power off SRAM Bank5, please refer to chip's RM for the corresponding SRAM array.

kCMC_SRAMBank6 

Power off SRAM Bank6, please refer to chip's RM for the corresponding SRAM array.

kCMC_SRAMBank7 

Power off SRAM Bank7, please refer to chip's RM for the corresponding SRAM array.

Enumerator
kCMC_WakeUpReset 

The reset caused by a wakeup from Power Down or Deep Power Down mode.

kCMC_PORReset 

The reset caused by power on reset detection logic.

kCMC_LVDReset 

The reset caused by a Low Voltage Detect.

kCMC_HVDReset 

The reset caused by a High voltage Detect.

kCMC_WarmReset 

The last reset source is a warm reset source.

kCMC_FatalReset 

The last reset source is a fatal reset source.

kCMC_PinReset 

The reset caused by the RESET_b pin.

kCMC_DAPReset 

The reset caused by a reset request from the Debug Access port.

kCMC_ResetTimeout 

The reset caused by a timeout or other error condition in the system reset generation.

kCMC_LowPowerAcknowledgeTimeoutReset 

The reset caused by a timeout in low power mode entry logic.

kCMC_SCGReset 

The reset caused by a loss of clock or loss of lock event in the SCG.

kCMC_Watchdog0Reset 

The reset caused by a WatchDog 0 timeout.

kCMC_SoftwareReset 

The reset caused by a software reset request.

kCMC_LockUoReset 

The reset caused by the ARM core indication of a LOCKUP event.

kCMC_Watchdog1Reset 

The reset caused by a WatchDog 1 timeout.

kCMC_SecurityViolationReset 

The reset caused by a Security Violation logic.

Enumerator
kCMC_CoreClockNotGated 

Core clock not gated.

kCMC_CoreClockGated 

Core clock was gated due to low power mode entry.

Enumerator
kCMC_GateNoneClock 

No clock gating.

kCMC_GateCoreClock 

Gate Core clock.

kCMC_GateCorePlatformClock 

Gate Core clock and platform clock.

kCMC_GateAllSystemClocks 

Gate all System clocks, without getting core entering into low power mode.

kCMC_GateAllSystemClocksEnterLowPowerMode 

Gate all System clocks, with core entering into low power mode.

Enumerator
kCMC_ActiveMode 

Select Active mode.

kCMC_SleepMode 

Select Sleep mode when a core executes WFI or WFE instruction.

kCMC_DeepSleepMode 

Select Deep Sleep mode when a core executes WFI or WFE instruction.

kCMC_PowerDownMode 

Select Power Down mode when a core executes WFI or WFE instruction.

kCMC_DeepPowerDown 

Select Deep Power Down mode when a core executes WFI or WFE instruction.

Function Documentation

void CMC_SetClockMode ( CMC_Type *  base,
cmc_clock_mode_t  mode 
)

This function configs the amount of clock gating when the core asserts Sleeping due to WFI, WFE or SLEEPONEXIT.

Parameters
baseCMC peripheral base address.
modeSystem clock mode.
static void CMC_LockClockModeSetting ( CMC_Type *  base)
inlinestatic

After invoking this function, any clock mode setting will be blocked.

Parameters
baseCMC peripheral base address.
static cmc_core_clock_gate_status_t CMC_GetCoreClockGatedStatus ( CMC_Type *  base)
inlinestatic

This function get the status to indicate whether the core clock is gated. The core clock gated status can be cleared by software.

Parameters
baseCMC peripheral base address.
Returns
The status to indicate whether the core clock is gated.
static void CMC_ClearCoreClockGatedStatus ( CMC_Type *  base)
inlinestatic

This function clear clock status flag by software.

Parameters
baseCMC peripheral base address.
static uint8_t CMC_GetWakeupSource ( CMC_Type *  base)
inlinestatic

This function gets the Wakeup sources from the previous low power mode entry.

Parameters
baseCMC peripheral base address.
Returns
The Wakeup sources from the previous low power mode entry. See _cmc_wakeup_sources for details.
static cmc_clock_mode_t CMC_GetClockMode ( CMC_Type *  base)
inlinestatic

This function gets the clock mode of the previous low power mode entry.

Parameters
baseCMC peripheral base address.
Returns
The Low Power status.
static uint32_t CMC_GetSystemResetStatus ( CMC_Type *  base)
inlinestatic

This function returns the system reset status. Those status updates on every MAIN Warm Reset to indicate the type/source of the most recent reset.

Parameters
baseCMC peripheral base address.
Returns
The most recent system reset status. See _cmc_system_reset_sources for details.
static uint32_t CMC_GetStickySystemResetStatus ( CMC_Type *  base)
inlinestatic

This function gets all source of system reset that have generated a system reset since the last WAKE Cold Reset, and that have not been cleared by software.

Parameters
baseCMC peripheral base address.
Returns
System reset status that have not been cleared by software. See _cmc_system_reset_sources for details.
static void CMC_ClearStickySystemResetStatus ( CMC_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseCMC peripheral base address.
maskBitmap of the sticky system reset status to be cleared.
static uint8_t CMC_GetResetCount ( CMC_Type *  base)
inlinestatic
Parameters
baseCMC peripheral base address.
Returns
The number of reset sequences.
void CMC_SetPowerModeProtection ( CMC_Type *  base,
uint32_t  allowedModes 
)

This function configures the power mode protection settings for supported power modes. This should be done before set the lowPower mode for each power doamin.

The allowed lowpower modes are passed as bit map. For example, to allow Sleep and DeepSleep, use CMC_SetPowerModeProtection(CMC_base, kCMC_AllowSleepMode|kCMC_AllowDeepSleepMode). To allow all low power modes, use CMC_SetPowerModeProtection(CMC_base, kCMC_AllowAllLowPowerModes).

Parameters
baseCMC peripheral base address.
allowedModesBitmaps of the allowed power modes. See _cmc_power_mode_protection for details.
static void CMC_LockPowerModeProtectionSetting ( CMC_Type *  base)
inlinestatic

This function locks the power mode protection. After invoking this function, any power mode protection setting will be ignored.

Parameters
baseCMC peripheral base address.
static void CMC_SetGlobalPowerMode ( CMC_Type *  base,
cmc_low_power_mode_t  lowPowerMode 
)
inlinestatic

This function configures the same low power mode for MAIN power domian and WAKE power domain.

Parameters
baseCMC peripheral base address.
lowPowerModeThe desired lowPower mode. See cmc_low_power_mode_t for details.
static void CMC_SetMAINPowerMode ( CMC_Type *  base,
cmc_low_power_mode_t  lowPowerMode 
)
inlinestatic

This function configures the low power mode for the MAIN power domian, when the core executes WFI/WFE instruction. The available lowPower modes are defined in the cmc_low_power_mode_t.

Parameters
baseCMC peripheral base address.
lowPowerModeThe desired lowPower mode. See cmc_low_power_mode_t for details.
static cmc_low_power_mode_t CMC_GetMAINPowerMode ( CMC_Type *  base)
inlinestatic
Parameters
baseCMC peripheral base address.
Returns
The power mode of MAIN Power domain. See cmc_low_power_mode_t for details.
static void CMC_SetWAKEPowerMode ( CMC_Type *  base,
cmc_low_power_mode_t  lowPowerMode 
)
inlinestatic

This function configures the low power mode for the WAKE power domian, when the core executes WFI/WFE instruction. The available lowPower mode are defined in the cmc_low_power_mode_t.

Note
The lowPower Mode for the WAKE domain must not be configured to a lower power mode than any other power domain.
Parameters
baseCMC peripheral base address.
lowPowerModeThe desired lowPower mode. See cmc_low_power_mode_t for details.
static cmc_low_power_mode_t CMC_GetWAKEPowerMode ( CMC_Type *  base)
inlinestatic
Parameters
baseCMC peripheral base address.
Returns
The power mode of WAKE Power domain. See cmc_low_power_mode_t for details.
void CMC_ConfigResetPin ( CMC_Type *  base,
const cmc_reset_pin_config_t config 
)

This function configures reset pin. When enabled, the low power filter is enabled in both Active and Low power modes, the reset filter is only enabled in Active mode. When both filers are enabled, they operate in series.

Parameters
baseCMC peripheral base address.
configPointer to the reset pin config structure.
static void CMC_EnableSystemResetInterrupt ( CMC_Type *  base,
uint32_t  mask 
)
inlinestatic

This function enables the system reset interrupts. The assertion of non-fatal warm reset can be delayed for 258 cycles of the 32K_CLK clock while an enabled interrupt is generated. Then Software can perform a graceful shutdown or abort the non-fatal warm reset provided the pending reset source is cleared by resetting the reset source and then clearing the pending flag.

Parameters
baseCMC peripheral base address.
maskSystem reset interrupts. See _cmc_system_reset_interrupt_enable for details.
static void CMC_DisableSystemResetInterrupt ( CMC_Type *  base,
uint32_t  mask 
)
inlinestatic

This function disables the system reset interrupts.

Parameters
baseCMC peripheral base address.
maskSystem reset interrupts. See _cmc_system_reset_interrupt_enable for details.
static uint32_t CMC_GetSystemResetInterruptFlags ( CMC_Type *  base)
inlinestatic

This function returns the System reset interrupt flags.

Parameters
baseCMC peripheral base address.
Returns
System reset interrupt flags. See _cmc_system_reset_interrupt_flag for details.
static void CMC_ClearSystemResetInterruptFlags ( CMC_Type *  base,
uint32_t  mask 
)
inlinestatic

This function clears system reset interrupt flags. The pending reset source can be cleared by resetting the source of the reset and then clearing the pending flags.

Parameters
baseCMC peripheral base address.
maskSystem Reset interrupt flags. See _cmc_system_reset_interrupt_flag for details.
static void CMC_EnableNonMaskablePinInterrupt ( CMC_Type *  base,
bool  enable 
)
inlinestatic
Parameters
baseCMC peripheral base address.
enableEnable or disable Non maskable pin interrupt. true - enable Non-maskable pin interrupt. false - disable Non-maskable pin interupt.
static uint8_t CMC_GetISPMODEPinLogic ( CMC_Type *  base)
inlinestatic

This function returns the logic state of the ISPMODE_n pin on the last negation of RESET_b pin.

Parameters
baseCMC peripheral base address.
Returns
The logic state of the ISPMODE_n pin on the last negation of RESET_b pin.
static void CMC_ClearISPMODEPinLogic ( CMC_Type *  base)
inlinestatic
Parameters
baseCMC peripheral base address.
static void CMC_ForceBootConfiguration ( CMC_Type *  base,
bool  assert 
)
inlinestatic

This function force the logic state of the Boot_Confign pin to assert on next system reset.

Parameters
baseCMC peripheral base address.
assertAssert the corresponding pin or not. true - Assert corresponding pin on next system reset. false - No effect.
static uint32_t CMC_GetBootRomStatus ( CMC_Type *  base)
inlinestatic
Parameters
baseCMC peripheral base address.
Returns
The status information written by the BootROM.
void CMC_PowerOffSRAMAllMode ( CMC_Type *  base,
uint8_t  mask 
)

This function power off the selected system SRAM always. The SRAM arrays should not be accessed while they are shut down. SRAM array contents are not retained if they are powered off.

Parameters
baseCMC peripheral base address.
maskBitmap of the SRAM arrays to be powered off all modes. See _cmc_system_sram_arrays for details. Check Reference Manual for the SRAM region and mask bit relationship.
static void CMC_PowerOnSRAMAllMode ( CMC_Type *  base,
uint8_t  mask 
)
inlinestatic
Parameters
baseCMC peripheral base address.
maskBitmap of the SRAM arrays to be powered on all modes. See _cmc_system_sram_arrays for details. Check Reference Manual for the SRAM region and mask bit relationship.
void CMC_PowerOffSRAMLowPowerOnly ( CMC_Type *  base,
uint8_t  mask 
)

This function power off the selected system SRAM only during low power mode. SRAM array contents are not retained if they are power off.

Parameters
baseCMC peripheral base address.
maskBitmap of the SRAM arrays to be power off during low power mode only. See _cmc_system_sram_arrays for details. Check Reference Manual for the SRAM region and mask bit relationship.
static void CMC_PowerOnSRAMLowPowerOnly ( CMC_Type *  base,
uint8_t  mask 
)
inlinestatic

This function power on the selected system SRAM. The SRAM arrray contents are retained in low power modes.

Parameters
baseCMC peripheral base address.
maskBitmap of the SRAM arrays to be power on during low power mode only. See _cmc_system_sram_arrays for details. Check Reference Manual for the SRAM region and mask bit relationship.
void CMC_ConfigFlashMode ( CMC_Type *  base,
bool  wake,
bool  doze,
bool  disable 
)

This function configs the low power mode of the on-chip flash memory.

Parameters
baseCMC peripheral base address.
waketrue: Flash will exit low power state during the flash memory accesses. false: No effect.
dozetrue: Flash is disabled while core is sleeping false: No effect.
disabletrue: Flash memory is placed in low power state. false: No effect.
static void CMC_EnableDebugOperation ( CMC_Type *  base,
bool  enable 
)
inlinestatic

This function configs what happens to debug when core sleeps.

Parameters
baseCMC peripheral base address.
enableEnable or disable Debug when Core is sleeping. true - Debug remains enabled when the core is sleeping. false - Debug is disabled when the core is sleeping.
void CMC_PreEnterLowPowerMode ( void  )

This function should be called before entering low power modes.

void CMC_PostExitLowPowerMode ( void  )

This function should be called after wake up from low power modes. This function should be used with CMC_PreEnterLowPowerMode()

void CMC_GlobalEnterLowPowerMode ( CMC_Type *  base,
cmc_low_power_mode_t  lowPowerMode 
)

This function provides the feature to entry into the same low power mode for each power domains. Before invoking this function, please ensure the selected power mode have been allowed.

Parameters
baseCMC peripheral base address.
lowPowerModeThe low power mode to be entered. See cmc_low_power_mode_t for the details.
void CMC_EnterLowPowerMode ( CMC_Type *  base,
const cmc_power_domain_config_t config 
)

This function provides the feature to entry into different low power modes for each power domains. Before invoking this function please ensure the selected modes are allowed.

Parameters
baseCMC peripheral base address.
configPointer to the cmc_power_domain_config_t structure.