MCUXpresso SDK API Reference Manual  Rev 2.12.1
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
SPC: System Power Control driver

Overview

The MCUXpresso SDK provides a peripheral driver for the System Power Control (SPC) module of MCUXpresso SDK devices. The SPC module contains and controls two LDOs and one DCDC used for regulating System Core.

API functions are provided to configure on-chip regulators in active mode and low power modes. For Active modes, SPC_ConfigActiveModeRegulators() function accepts different parameters to config the voltage level and drive strength for each on-chip regulator. For Active mode, Some APIs also provided individually to config each on-chip regulator's voltage level and drive strength. For low power modes, SPC_ConfigLowPowerModeRegulators() function accepts different parameters to config the voltage level and drive strength for each on-chip regulator. For low power mode, some APIs also provided individually to config each on-chip regulator's voltage level and driver strength. For gating each Voltage detector for each voltage domain, there are also some APIs provided.

Data Structures

struct  spc_lowpower_request_config_t
 Low Power Request output pin configuration. More...
 
struct  spc_intergrated_power_switch_config_t
 Integrated power switch configuration. More...
 
struct  spc_active_mode_core_ldo_option_t
 Core LDO regulator options in Active mode. More...
 
struct  spc_active_mode_sys_ldo_option_t
 System LDO regulator options in Active mode. More...
 
struct  spc_active_mode_dcdc_option_t
 DCDC regulator options in Active mode. More...
 
struct  spc_lowpower_mode_core_ldo_option_t
 Core LDO regulator options in Low Power mode. More...
 
struct  spc_lowpower_mode_sys_ldo_option_t
 System LDO regulator options in Low Power mode. More...
 
struct  spc_lowpower_mode_dcdc_option_t
 DCDC regulator options in Low Power mode. More...
 
struct  spc_voltage_detect_option_t
 CORE/SYS/IO VDD Voltage Detect options. More...
 
struct  spc_dcdc_burst_config_t
 DCDC Burst configuration. More...
 
struct  spc_core_voltage_detect_config_t
 Core Voltage Detect configuration. More...
 
struct  spc_system_voltage_detect_config_t
 System Voltage Detect Configuration. More...
 
struct  spc_io_voltage_detect_config_t
 IO Voltage Detect Configuration. More...
 
struct  spc_active_mode_regulators_config_t
 Active mode configuration. More...
 
struct  spc_lowpower_mode_regulators_config_t
 Low Power Mode configuration. More...
 

Enumerations

enum  {
  kStatus_SPC_Busy,
  kStatus_SPC_DCDCLowDriveStrengthIgnore,
  kStatus_SPC_DCDCPulseRefreshModeIgnore,
  kStatus_SPC_SYSLDOOverDriveVoltageFail,
  kStatus_SPC_SYSLDOLowDriveStrengthIgnore,
  kStatus_SPC_CORELDOLowDriveStrengthIgnore,
  kStatus_SPC_CORELDOVoltageWrong = MAKE_STATUS(kStatusGroup_SPC, 7U),
  kStatus_SPC_CORELDOVoltageSetFail = MAKE_STATUS(kStatusGroup_SPC, 8U),
  kStatus_SPC_BandgapModeWrong = MAKE_STATUS(kStatusGroup_SPC, 6U)
}
 SPC status enumeration. More...
 
enum  _spc_voltage_detect_flags {
  kSPC_IOVDDHighVoltageDetectFlag = SPC_VD_STAT_IOVDD_HVDF_MASK,
  kSPC_SystemVDDHighVoltageDetectFlag = SPC_VD_STAT_SYSVDD_HVDF_MASK,
  kSPC_CoreVDDHighVoltageDetectFlag = SPC_VD_STAT_COREVDD_HVDF_MASK,
  kSPC_IOVDDLowVoltageDetectFlag = SPC_VD_STAT_IOVDD_LVDF_MASK,
  kSPC_SystemVDDLowVoltageDetectFlag = SPC_VD_STAT_SYSVDD_LVDF_MASK,
  kSPC_CoreVDDLowVoltageDetectFlag = SPC_VD_STAT_COREVDD_LVDF_MASK
}
 Voltage Detect Status Flags. More...
 
enum  _spc_power_domains {
  kSPC_MAINPowerDomainRetain = 1UL << 16U,
  kSPC_WAKEPowerDomainRetain = 1UL << 17U,
  kSPC_2P4GPowerDoaminRetain = 1UL << 18U
}
 SPC power domain isolation status. More...
 
enum  spc_power_domain_id_t {
  kSPC_PowerDomain0 = 0U,
  kSPC_PowerDomain1 = 1U,
  kSPC_PowerDomain2 = 2U
}
 The enumeration of spc power domain, the connected power domain is chip specfic, please refer to chip's RM for details. More...
 
enum  spc_power_domain_low_power_mode_t {
  kSPC_SleepWithSYSClockRunning = 0U,
  kSPC_SleepWithSysClockOff = 1U,
  kSPC_DeepSleepSysClockOff = 2U,
  kSPC_PowerDownWithSysClockOff = 4U,
  kSPC_DeepPowerDownWithSysClockOff = 8U
}
 The enumeration of Power domain's low power mode. More...
 
enum  spc_lowpower_request_pin_polarity_t {
  kSPC_HighTruePolarity = 0x0U,
  kSPC_LowTruePolarity = 0x1U
}
 SPC low power request output pin polarity. More...
 
enum  spc_lowpower_request_output_override_t {
  kSPC_LowPowerRequestNotForced = 0x0U,
  kSPC_LowPowerRequestReserved = 0x1U,
  kSPC_LowPowerRequestForcedLow = 0x2U,
  kSPC_LowPowerRequestForcedHigh = 0x3U
}
 SPC low power request output override. More...
 
enum  spc_bandgap_mode_t {
  kSPC_BandgapDisabled = 0x0U,
  kSPC_BandgapEnabledBufferDisabled = 0x1U,
  kSPC_BandgapEnabledBufferEnabled = 0x2U,
  kSPC_BandgapReserved = 0x3U
}
 SPC Bandgap mode enumeration in Active mode or Low Power mode. More...
 
enum  spc_dcdc_voltage_level_t {
  kSPC_DCDC_LowUnderVoltage = 0x0U,
  kSPC_DCDC_MidVoltage = 0x1U,
  kSPC_DCDC_NormalVoltage = 0x2U,
  kSPC_DCDC_SafeModeVoltage = 0x3U
}
 DCDC regulator voltage level enumeration in Active mode or Low Power Mode. More...
 
enum  spc_dcdc_drive_strength_t {
  kSPC_DCDC_PulseRefreshMode = 0x0U,
  kSPC_DCDC_LowDriveStrength = 0x1U,
  kSPC_DCDC_NormalDriveStrength = 0x2U,
  kSPC_DCDC_Reserved = 0x3U
}
 DCDC regulator Drive Strength enumeration in Active mode or Low Power Mode. More...
 
enum  spc_sys_ldo_voltage_level_t {
  kSPC_SysLDO_NormalVoltage = 0x0U,
  kSPC_SysLDO_OverDriveVoltage = 0x1U
}
 SYS LDO regulator voltage level enumeration in Active mode. More...
 
enum  spc_sys_ldo_drive_strength_t {
  kSPC_SysLDO_LowDriveStrength = 0x0U,
  kSPC_SysLDO_NormalDriveStrength = 0x1U
}
 SYS LDO regulator Drive Strength enumeration in Active mode or Low Power mode. More...
 
enum  spc_core_ldo_voltage_level_t {
  kSPC_CoreLDO_UnderDriveVoltage = 0x0U,
  kSPC_CoreLDO_MidDriveVoltage = 0x1U,
  kSPC_CoreLDO_NormalVoltage = 0x2U,
  kSPC_CoreLDO_SafeModeVoltage = 0x3U
}
 Core LDO regulator voltage level enumeration in Active mode or Low Power mode. More...
 
enum  spc_core_ldo_drive_strength_t {
  kSPC_CoreLDO_LowDriveStrength = 0x0U,
  kSPC_CoreLDO_NormalDriveStrength = 0x1U
}
 CORE LDO VDD regulator Drive Strength enumeration in Low Power mode. More...
 
enum  spc_low_voltage_level_select_t {
  kSPC_LowVoltageNormalLevel = 0x0U,
  kSPC_LowVoltageSafeLevel = 0x1U
}
 System/IO VDD Low-Voltage Level Select. More...
 

Driver version

#define FSL_SPC_DRIVER_VERSION   (MAKE_VERSION(2, 1, 1))
 SPC driver version 2.1.1. More...
 

SPC Status

uint8_t SPC_GetPeriphIOIsolationStatus (SPC_Type *base)
 Gets Isolation status for each power domains. More...
 
static void SPC_ClearPeriphIOIsolationFlag (SPC_Type *base)
 Clears peripherals and I/O pads isolation flags for each power domains. More...
 
static bool SPC_GetBusyStatusFlag (SPC_Type *base)
 Gets SPC busy status flag. More...
 
static bool SPC_CheckLowPowerReqest (SPC_Type *base)
 Checks system low power request. More...
 
static void SPC_ClearLowPowerRequest (SPC_Type *base)
 Clears system low power request, set SPC in active mode. More...
 
static bool SPC_CheckPowerSwitchState (SPC_Type *base)
 Checks power switch state. More...
 
spc_power_domain_low_power_mode_t SPC_GetPowerDomainLowPowerMode (SPC_Type *base, spc_power_domain_id_t powerDomainId)
 Gets selected power domain's requested low power mode. More...
 
static bool SPC_CheckPowerDomainLowPowerRequest (SPC_Type *base, spc_power_domain_id_t powerDomainId)
 Checks power domain's low power request. More...
 
static void SPC_ClearPowerDomainLowPowerRequestFlag (SPC_Type *base, spc_power_domain_id_t powerDomainId)
 Clears selected power domain's low power request flag. More...
 

Low Power Request configuration.

void SPC_SetLowPowerRequestConfig (SPC_Type *base, const spc_lowpower_request_config_t *config)
 Configs Low power request output pin. More...
 

Smart Power Switch Control Interfaces

static void SPC_SoftwareGatePowerSwitch (SPC_Type *base, bool gate)
 Gates/Un-gates power switch in software mode. More...
 
static void SPC_PowerModeControlPowerSwitch (SPC_Type *base)
 Gates power switch at low power modes entry, and un-gates power switch at low power mode wakeup. More...
 

Wake up configuration.

static void SPC_SetWakeUpValue (SPC_Type *base, uint32_t data)
 Set the address of the function/image to be executed if chip wake from power down or deep power down mode. More...
 
static uint32_t SPC_GetWakeUpValue (SPC_Type *base)
 Gets back the WakeUp value. More...
 

Active Mode configuration.

static spc_core_ldo_voltage_level_t SPC_GetActiveModeCoreLDOVDDVoltageLevel (SPC_Type *base)
 Gets CORE LDO VDD Regulator Voltage level. More...
 
static spc_bandgap_mode_t SPC_GetActiveModeBandgapMode (SPC_Type *base)
 Gets the Bandgap mode in Active mode. More...
 
static uint32_t SPC_GetActiveModeVoltageDetectStatus (SPC_Type *base)
 Gets all voltage detectors status in Active mode. More...
 
void SPC_SetActiveModeIntegratedPowerSwitchConfig (SPC_Type *base, const spc_intergrated_power_switch_config_t *config)
 Configs Integrated power switch in active mode. More...
 
status_t SPC_SetActiveModeBandgapModeConfig (SPC_Type *base, spc_bandgap_mode_t mode)
 Configs Bandgap mode in Active mode. More...
 
static void SPC_EnableActiveModeCMPBandgapBuffer (SPC_Type *base, bool enable)
 Enables/Disable the CMP Bandgap Buffer in Active mode. More...
 
static void SPC_SetActiveModeVoltageTrimDelay (SPC_Type *base, uint16_t delay)
 Sets the delay when the regulators change voltage level in Active mode. More...
 
status_t SPC_SetActiveModeRegulatorsConfig (SPC_Type *base, const spc_active_mode_regulators_config_t *config)
 Configs regulators in Active mode. More...
 

Low Power mode configuration.

void SPC_SetLowPowerModeIntegratedPowerSwitchConfig (SPC_Type *base, const spc_intergrated_power_switch_config_t *config)
 Configs Integrated power switch in Low Power mode. More...
 
static
spc_core_ldo_drive_strength_t 
SPC_GetLowPowerCoreLDOVDDDriveStrength (SPC_Type *base)
 Gets CORE LDO VDD Drive Strength for Low Power modes. More...
 
static spc_core_ldo_voltage_level_t SPC_GetLowPowerCoreLDOVDDVoltageLevel (SPC_Type *base)
 Gets the CORE LDO VDD Regulator Voltage Level for Low Power modes. More...
 
static spc_bandgap_mode_t SPC_GetLowPowerModeBandgapMode (SPC_Type *base)
 Gets the Bandgap mode in Low Power mode. More...
 
static uint32_t SPC_GetLowPowerModeVoltageDetectStatus (SPC_Type *base)
 Gets the status of all voltage detectors in Low Power mode. More...
 
static void SPC_EnableLowPowerModeLowPowerIREF (SPC_Type *base, bool enable)
 Enables/Disables Low Power IREF in low power modes. More...
 
status_t SPC_SetLowPowerModeBandgapmodeConfig (SPC_Type *base, spc_bandgap_mode_t mode)
 Configs Bandgap mode in Low Power mode. More...
 
static void SPC_EnableLowPowerModeCMPBandgapBufferMode (SPC_Type *base, bool enable)
 Enables/Disables CMP Bandgap Buffer. More...
 
static void SPC_EnableLowPowerModeCoreVDDInternalVoltageScaling (SPC_Type *base, bool enable)
 Enables/Disables CORE VDD IVS(Internal Voltage Scaling) in low power modes. More...
 
static void SPC_SetLowPowerWakeUpDelay (SPC_Type *base, uint16_t delay)
 Sets the delay when exit the low power modes. More...
 
status_t SPC_SetLowPowerModeRegulatorsConfig (SPC_Type *base, const spc_lowpower_mode_regulators_config_t *config)
 Configs regulators in Low Power mode. More...
 

Voltage Detect Status.

static uint8_t SPC_GetVoltageDetectStatusFlag (SPC_Type *base)
 Get Voltage Detect Status Flags. More...
 
static void SPC_ClearVoltageDetectStatusFlag (SPC_Type *base, uint8_t mask)
 Clear Voltage Detect Status Flags. More...
 

Voltage Detect configuration for Core voltage domain.

void SPC_SetCoreVoltageDetectConfig (SPC_Type *base, const spc_core_voltage_detect_config_t *config)
 Configs CORE voltage detect options. More...
 
static void SPC_LockCoreVoltageDetectResetSetting (SPC_Type *base)
 Locks Core voltage detect reset setting. More...
 
static void SPC_UnlockCoreVoltageDetectResetSetting (SPC_Type *base)
 Unlocks Core voltage detect reset setting. More...
 
status_t SPC_EnableActiveModeCoreHighVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the Core High Voltage Detector in Active mode. More...
 
status_t SPC_EnableActiveModeCoreLowVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the Core Low Voltage Detector in Active mode. More...
 
status_t SPC_EnableLowPowerModeCoreHighVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the Core High Voltage Detector in Low Power mode. More...
 
status_t SPC_EnableLowPowerModeCoreLowVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the Core Low Voltage Detector in Low Power mode. More...
 

Voltage detect configuration for System Voltage domain.

void SPC_SetSystemVDDLowVoltageLevel (SPC_Type *base, spc_low_voltage_level_select_t level)
 Set system VDD Low-voltage level selection. More...
 
void SPC_SetSystemVoltageDetectConfig (SPC_Type *base, const spc_system_voltage_detect_config_t *config)
 Configs SYS voltage detect options. More...
 
static void SPC_LockSystemVoltageDetectResetSetting (SPC_Type *base)
 Lock System voltage detect reset setting. More...
 
static void SPC_UnlockSystemVoltageDetectResetSetting (SPC_Type *base)
 Unlock System voltage detect reset setting. More...
 
status_t SPC_EnableActiveModeSystemHighVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the System High Voltage Detector in Active mode. More...
 
status_t SPC_EnableActiveModeSystemLowVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disable the System Low Voltage Detector in Active mode. More...
 
status_t SPC_EnableLowPowerModeSystemHighVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the System High Voltage Detector in Low Power mode. More...
 
status_t SPC_EnableLowPowerModeSystemLowVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the System Low Voltage Detector in Low Power mode. More...
 

Voltage detect configuration for IO voltage domain.

void SPC_SetIOVDDLowVoltageLevel (SPC_Type *base, spc_low_voltage_level_select_t level)
 Set IO VDD Low-Voltage level selection. More...
 
void SPC_SetIOVoltageDetectConfig (SPC_Type *base, const spc_io_voltage_detect_config_t *config)
 Configs IO voltage detect options. More...
 
static void SPC_LockIOVoltageDetectResetSetting (SPC_Type *base)
 Lock IO Voltage detect reset setting. More...
 
static void SPC_UnlockIOVoltageDetectResetSetting (SPC_Type *base)
 Unlock IO voltage detect reset setting. More...
 
status_t SPC_EnableActiveModeIOHighVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the IO High Voltage Detector in Active mode. More...
 
status_t SPC_EnableActiveModeIOLowVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the IO Low Voltage Detector in Active mode. More...
 
status_t SPC_EnableLowPowerModeIOHighVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the IO High Voltage Detector in Low Power mode. More...
 
status_t SPC_EnableLowPowerModeIOLowVoltageDetect (SPC_Type *base, bool enable)
 Enables/Disables the IO Low Voltage Detector in Low Power mode. More...
 

External Voltage domains configuration.

void SPC_SetExternalVoltageDomainsConfig (SPC_Type *base, uint8_t lowPowerIsoMask, uint8_t IsoMask)
 Configs external voltage domains. More...
 
static uint8_t SPC_GetExternalDomainsStatus (SPC_Type *base)
 Gets External Domains status. More...
 

Set CORE LDO Regulator.

static void SPC_EnableCoreLDORegulator (SPC_Type *base, bool enable)
 Enable/Disable Core LDO regulator. More...
 
static void SPC_PullDownCoreLDORegulator (SPC_Type *base, bool pulldown)
 Enable/Disable the CORE LDO Regulator pull down in Deep Power Down. More...
 
status_t SPC_SetActiveModeCoreLDORegulatorConfig (SPC_Type *base, const spc_active_mode_core_ldo_option_t *option)
 Configs Core LDO VDD Regulator in Active mode. More...
 
status_t SPC_SetLowPowerModeCoreLDORegulatorConfig (SPC_Type *base, const spc_lowpower_mode_core_ldo_option_t *option)
 Configs CORE LDO Regulator in low power mode. More...
 

Set System LDO Regulator.

static void SPC_EnableSystemLDORegulator (SPC_Type *base, bool enable)
 Enable/Disable System LDO regulator. More...
 
static void SPC_EnableSystemLDOSinkFeature (SPC_Type *base, bool sink)
 Enable/Disable current sink feature of System LDO Regulator. More...
 
status_t SPC_SetActiveModeSystemLDORegulatorConfig (SPC_Type *base, const spc_active_mode_sys_ldo_option_t *option)
 Configs System LDO VDD Regulator in Active mode. More...
 
status_t SPC_SetLowPowerModeSystemLDORegulatorConfig (SPC_Type *base, const spc_lowpower_mode_sys_ldo_option_t *option)
 Configs System LDO regulator in low power modes. More...
 

Set DCDC Regulator.

static void SPC_EnableDCDCRegulator (SPC_Type *base, bool enable)
 Enable/Disable DCDC Regulator. More...
 
void SPC_SetDCDCBurstConfig (SPC_Type *base, spc_dcdc_burst_config_t *config)
 Config DCDC Burst options. More...
 
void SPC_SetDCDCRefreshCount (SPC_Type *base, uint16_t count)
 Set the count value of the reference clock. More...
 
status_t SPC_SetActiveModeDCDCRegulatorConfig (SPC_Type *base, const spc_active_mode_dcdc_option_t *option)
 Configs DCDC VDD Regulator in Active mode. More...
 
status_t SPC_SetLowPowerModeDCDCRegulatorConfig (SPC_Type *base, const spc_lowpower_mode_dcdc_option_t *option)
 Configs DCDC VDD Regulator in Low power modes. More...
 

Data Structure Documentation

struct spc_lowpower_request_config_t

Data Fields

bool enable
 Low Power Request Output enable. More...
 
spc_lowpower_request_pin_polarity_t polarity
 Low Power Request Output pin polarity select. More...
 
spc_lowpower_request_output_override_t override
 Low Power Request Output Override. More...
 

Field Documentation

bool spc_lowpower_request_config_t::enable
spc_lowpower_request_pin_polarity_t spc_lowpower_request_config_t::polarity
spc_lowpower_request_output_override_t spc_lowpower_request_config_t::override
struct spc_intergrated_power_switch_config_t
Note
Legacy structure, will be removed.

Data Fields

bool wakeup
 Assert an output pin to un-gate the integrated power switch. More...
 
bool sleep
 Assert an output pin to power gate the intergrated power switch. More...
 

Field Documentation

bool spc_intergrated_power_switch_config_t::wakeup
bool spc_intergrated_power_switch_config_t::sleep
struct spc_active_mode_core_ldo_option_t

Data Fields

spc_core_ldo_voltage_level_t CoreLDOVoltage
 Core LDO Regulator Voltage Level selection in Active mode. More...
 

Field Documentation

spc_core_ldo_voltage_level_t spc_active_mode_core_ldo_option_t::CoreLDOVoltage
struct spc_active_mode_sys_ldo_option_t

Data Fields

spc_sys_ldo_voltage_level_t SysLDOVoltage
 System LDO Regulator Voltage Level selection in Active mode. More...
 
spc_sys_ldo_drive_strength_t SysLDODriveStrength
 System LDO Regulator Drive Strength selection in Active mode. More...
 

Field Documentation

spc_sys_ldo_voltage_level_t spc_active_mode_sys_ldo_option_t::SysLDOVoltage
spc_sys_ldo_drive_strength_t spc_active_mode_sys_ldo_option_t::SysLDODriveStrength
struct spc_active_mode_dcdc_option_t

Data Fields

spc_dcdc_voltage_level_t DCDCVoltage
 DCDC Regulator Voltage Level selection in Active mode. More...
 
spc_dcdc_drive_strength_t DCDCDriveStrength
 DCDC VDD Regulator Drive Strength selection in Active mode. More...
 

Field Documentation

spc_dcdc_voltage_level_t spc_active_mode_dcdc_option_t::DCDCVoltage
spc_dcdc_drive_strength_t spc_active_mode_dcdc_option_t::DCDCDriveStrength
struct spc_lowpower_mode_core_ldo_option_t

Data Fields

spc_core_ldo_voltage_level_t CoreLDOVoltage
 Core LDO Regulator Voltage Level selection in Low Power mode. More...
 
spc_core_ldo_drive_strength_t CoreLDODriveStrength
 Core LDO Regulator Drive Strength selection in Low Power mode.
 

Field Documentation

spc_core_ldo_voltage_level_t spc_lowpower_mode_core_ldo_option_t::CoreLDOVoltage
struct spc_lowpower_mode_sys_ldo_option_t

Data Fields

spc_sys_ldo_drive_strength_t SysLDODriveStrength
 System LDO Regulator Drive Strength selection in Low Power mode. More...
 

Field Documentation

spc_sys_ldo_drive_strength_t spc_lowpower_mode_sys_ldo_option_t::SysLDODriveStrength
struct spc_lowpower_mode_dcdc_option_t

Data Fields

spc_dcdc_voltage_level_t DCDCVoltage
 DCDC Regulator Voltage Level selection in Low Power mode. More...
 
spc_dcdc_drive_strength_t DCDCDriveStrength
 DCDC VDD Regulator Drive Strength selection in Low Power mode. More...
 

Field Documentation

spc_dcdc_voltage_level_t spc_lowpower_mode_dcdc_option_t::DCDCVoltage
spc_dcdc_drive_strength_t spc_lowpower_mode_dcdc_option_t::DCDCDriveStrength
struct spc_voltage_detect_option_t

Data Fields

bool HVDInterruptEnable
 CORE/SYS/IO VDD High Voltage Detect interrupt enable. More...
 
bool HVDResetEnable
 CORE/SYS/IO VDD High Voltage Detect reset enable. More...
 
bool LVDInterruptEnable
 CORE/SYS/IO VDD Low Voltage Detect interrupt enable. More...
 
bool LVDResetEnable
 CORE/SYS/IO VDD Low Voltage Detect reset enable. More...
 

Field Documentation

bool spc_voltage_detect_option_t::HVDInterruptEnable
bool spc_voltage_detect_option_t::HVDResetEnable
bool spc_voltage_detect_option_t::LVDInterruptEnable
bool spc_voltage_detect_option_t::LVDResetEnable
struct spc_dcdc_burst_config_t

Data Fields

bool sofwareBurstRequest
 Enable/Disable DCDC Software Burst Request. More...
 
bool externalBurstRequest
 Enable/Disable DCDC External Burst Request. More...
 
bool stabilizeBurstFreq
 Enable/Disable DCDC frequency stabilization. More...
 
uint8_t freq
 The frequency of the current burst. More...
 

Field Documentation

bool spc_dcdc_burst_config_t::sofwareBurstRequest
bool spc_dcdc_burst_config_t::externalBurstRequest
bool spc_dcdc_burst_config_t::stabilizeBurstFreq
uint8_t spc_dcdc_burst_config_t::freq
struct spc_core_voltage_detect_config_t

Data Fields

spc_voltage_detect_option_t option
 Core VDD Voltage Detect option. More...
 

Field Documentation

spc_voltage_detect_option_t spc_core_voltage_detect_config_t::option
struct spc_system_voltage_detect_config_t

Data Fields

spc_voltage_detect_option_t option
 System VDD Voltage Detect option. More...
 
spc_low_voltage_level_select_t level
 System VDD low-voltage selection. More...
 

Field Documentation

spc_voltage_detect_option_t spc_system_voltage_detect_config_t::option
spc_low_voltage_level_select_t spc_system_voltage_detect_config_t::level
struct spc_io_voltage_detect_config_t

Data Fields

spc_voltage_detect_option_t option
 IO VDD Voltage Detect option. More...
 
spc_low_voltage_level_select_t level
 IO VDD Low-voltage level selection. More...
 

Field Documentation

spc_voltage_detect_option_t spc_io_voltage_detect_config_t::option
spc_low_voltage_level_select_t spc_io_voltage_detect_config_t::level
struct spc_active_mode_regulators_config_t
struct spc_lowpower_mode_regulators_config_t

Macro Definition Documentation

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

Enumeration Type Documentation

anonymous enum
Enumerator
kStatus_SPC_Busy 

The SPC instance is busy executing any type of power mode transition.

kStatus_SPC_DCDCLowDriveStrengthIgnore 

DCDC Low drive strength setting be ignored for LVD/HVD enabled.

kStatus_SPC_DCDCPulseRefreshModeIgnore 

DCDC Pulse Refresh Mode drive strength setting be ignored for LVD/HVD enabled.

kStatus_SPC_SYSLDOOverDriveVoltageFail 

SYS LDO regulate to Over drive voltage failed for SYS LDO HVD must be disabled.

kStatus_SPC_SYSLDOLowDriveStrengthIgnore 

SYS LDO Low driver strength setting be ignored for LDO LVD/HVD enabled.

kStatus_SPC_CORELDOLowDriveStrengthIgnore 

CORE LDO Low driver strength setting be ignored for LDO LVD/HVD enabled.

kStatus_SPC_CORELDOVoltageWrong 

Core LDO voltage is wrong.

kStatus_SPC_CORELDOVoltageSetFail 

Core LDO voltage set fail.

kStatus_SPC_BandgapModeWrong 

Selected Bandgap Mode wrong.

Enumerator
kSPC_IOVDDHighVoltageDetectFlag 

IO VDD High-Voltage detect flag.

kSPC_SystemVDDHighVoltageDetectFlag 

System VDD High-Voltage detect flag.

kSPC_CoreVDDHighVoltageDetectFlag 

Core VDD High-Voltage detect flag.

kSPC_IOVDDLowVoltageDetectFlag 

IO VDD Low-Voltage detect flag.

kSPC_SystemVDDLowVoltageDetectFlag 

System VDD Low-Voltage detect flag.

kSPC_CoreVDDLowVoltageDetectFlag 

Core VDD Low-Voltage detect flag.

Enumerator
kSPC_MAINPowerDomainRetain 

Peripherals and IO pads retain in MAIN Power Domain.

kSPC_WAKEPowerDomainRetain 

Peripherals and IO pads retain in WAKE Power Domain.

kSPC_2P4GPowerDoaminRetain 

Peripherals and IO pads retion in 2.4G Power Domain.

Enumerator
kSPC_PowerDomain0 

Power domain0, the connected power domain is chip specific.

kSPC_PowerDomain1 

Power domain1, the connected power domain is chip specific.

kSPC_PowerDomain2 

Power domain2, the connected power domain is chip specific.

Enumerator
kSPC_SleepWithSYSClockRunning 

Power domain request SLEEP mode with SYS clock running.

kSPC_SleepWithSysClockOff 

Power domain request SLEEP mode with SYS clock off.

kSPC_DeepSleepSysClockOff 

Power domain request DEEP SLEEP mode with SYS clock off.

kSPC_PowerDownWithSysClockOff 

Power domain request POWER DOWN mode with SYS clock off.

kSPC_DeepPowerDownWithSysClockOff 

Power domain request DEEP POWER DOWN mode with SYS clock off.

Enumerator
kSPC_HighTruePolarity 

Control the High Polarity of the Low Power Reqest Pin.

kSPC_LowTruePolarity 

Control the Low Polarity of the Low Power Reqest Pin.

Enumerator
kSPC_LowPowerRequestNotForced 

Not Forced.

kSPC_LowPowerRequestReserved 

Reserved.

kSPC_LowPowerRequestForcedLow 

Forced Low (Ignore LowPower request output polarity setting.)

kSPC_LowPowerRequestForcedHigh 

Forced High (Ignore LowPower request output polarity setting.)

Enumerator
kSPC_BandgapDisabled 

Bandgap disabled.

kSPC_BandgapEnabledBufferDisabled 

Bandgap enabled with Buffer disabled.

kSPC_BandgapEnabledBufferEnabled 

Bandgap enabled with Buffer enabled.

kSPC_BandgapReserved 

Reserved.

Enumerator
kSPC_DCDC_LowUnderVoltage 

DCDC VDD Regulator regulate to Low Under Voltage.

kSPC_DCDC_MidVoltage 

DCDC VDD Regulator regulate to Mid Voltage.

kSPC_DCDC_NormalVoltage 

DCDC VDD Regulator regulate to Normal Voltage.

kSPC_DCDC_SafeModeVoltage 

DCDC VDD Regulator regulate to Safe-Mode Voltage.

Enumerator
kSPC_DCDC_PulseRefreshMode 

DCDC VDD Regulator Drive Strength set to Pulse Refresh Mode.

This enum member is only useful for Low Power Mode config.

kSPC_DCDC_LowDriveStrength 

DCDC VDD regulator Drive Strength set to low.

kSPC_DCDC_NormalDriveStrength 

DCDC VDD regulator Drive Strength set to Normal.

kSPC_DCDC_Reserved 

Reserved.

Enumerator
kSPC_SysLDO_NormalVoltage 

SYS LDO VDD Regulator regulate to Normal Voltage(1.8V).

kSPC_SysLDO_OverDriveVoltage 

SYS LDO VDD Regulator regulate to Over Drive Voltage(2.5V).

Enumerator
kSPC_SysLDO_LowDriveStrength 

SYS LDO VDD regulator Drive Strength set to low.

kSPC_SysLDO_NormalDriveStrength 

SYS LDO VDD regulator Drive Strength set to Normal.

Enumerator
kSPC_CoreLDO_UnderDriveVoltage 

Core LDO VDD regulator regulate to Under Drive Voltage.

kSPC_CoreLDO_MidDriveVoltage 

Core LDO VDD regulator regulate to Mid Drive Voltage.

kSPC_CoreLDO_NormalVoltage 

Core LDO VDD regulator regulate to Normal Voltage.

kSPC_CoreLDO_SafeModeVoltage 

Core LDO VDD regulator regulate to Safe-Mode Voltages.

Enumerator
kSPC_CoreLDO_LowDriveStrength 

Core LDO VDD regulator Drive Strength set to low.

kSPC_CoreLDO_NormalDriveStrength 

Core LDO VDD regulator Drive Strength set to Normal.

Enumerator
kSPC_LowVoltageNormalLevel 

Trip point set to Normal level.

kSPC_LowVoltageSafeLevel 

Trip point set to Safe level.

Function Documentation

uint8_t SPC_GetPeriphIOIsolationStatus ( SPC_Type *  base)

This function gets the status which indicates whether certain peripheral and the IO pads are in a latched state as a result of having been in POWERDOWN mode.

Parameters
baseSPC peripheral base address.
Returns
Current isolation status for each power domains. See _spc_power_domains for details.
static void SPC_ClearPeriphIOIsolationFlag ( SPC_Type *  base)
inlinestatic

This function clears peripherals and I/O pads isolation flags for each power domains. After recovering from the POWERDOWN mode, user must invoke this function to release the I/O pads and certain peripherals to their normal run mode state. Before invoking this function, user must restore chip configuration in particular pin configuration for enabled WUU wakeup pins.

Parameters
baseSPC peripheral base address.
static bool SPC_GetBusyStatusFlag ( SPC_Type *  base)
inlinestatic

This function gets SPC busy status flag. When SPC executing any type of power mode transition in ACTIVE mode or any of the SOC low power mode, the SPC busy status flag is set and this function returns true. When changing CORE LDO voltage level and DCDC voltage level in ACTIVE mode, the SPC busy status flag is set and this function return true.

Parameters
baseSPC peripheral base address.
Returns
Ack busy flag. true - SPC is busy. false - SPC is not busy.
static bool SPC_CheckLowPowerReqest ( SPC_Type *  base)
inlinestatic
Note
Only when all power domains request low power mode entry, the result of this function is true. That means when all power domains request low power mode entry, the SPC regulators will be controlled by LP_CFG register.
Parameters
baseSPC peripheral base address.
Returns
The system low power request check result.
  • true All power domains have requested low power mode and SPC has entered a low power state and power mode configuration are based on the LP_CFG configuration register.
  • false SPC in active mode and ACTIVE_CFG register control system power supply.
static void SPC_ClearLowPowerRequest ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
static bool SPC_CheckPowerSwitchState ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
The state(ON/OFF) of power switch.
  • true Indicates the power switch is ON.
  • false Indicates the power switch is OFF.
spc_power_domain_low_power_mode_t SPC_GetPowerDomainLowPowerMode ( SPC_Type *  base,
spc_power_domain_id_t  powerDomainId 
)
Parameters
baseSPC peripheral base address.
powerDomainIdPower Domain Id, please refer to spc_power_domain_id_t.
Returns
The selected power domain's requested low power mode, please refer to spc_power_domain_low_power_mode_t.
static bool SPC_CheckPowerDomainLowPowerRequest ( SPC_Type *  base,
spc_power_domain_id_t  powerDomainId 
)
inlinestatic
Parameters
baseSPC peripheral base address.
powerDomainIdPower Domain Id, please refer to spc_power_domain_id_t.
Returns
The result of power domain's low power request.
  • true The selected power domain requests low power mode entry.
  • false The selected power domain does not request low power mode entry.
static void SPC_ClearPowerDomainLowPowerRequestFlag ( SPC_Type *  base,
spc_power_domain_id_t  powerDomainId 
)
inlinestatic
Parameters
baseSPC peripheral base address.
powerDomainIdPower Domain Id, please refer to spc_power_domain_id_t.
void SPC_SetLowPowerRequestConfig ( SPC_Type *  base,
const spc_lowpower_request_config_t config 
)

This function config the low power request output pin

Parameters
baseSPC peripheral base address.
configPointer the spc_lowpower_request_config_t structure.
static void SPC_SoftwareGatePowerSwitch ( SPC_Type *  base,
bool  gate 
)
inlinestatic
Parameters
baseSPC peripheral base address.
gateUsed to gate/ungate power switch
  • true The power switch will be gated.
  • false The power switch will be un-gated.
static void SPC_PowerModeControlPowerSwitch ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
static void SPC_SetWakeUpValue ( SPC_Type *  base,
uint32_t  data 
)
inlinestatic
Note
Data written by this function is used by BootROM to quickly retore ARM Core context, or to switch execution to a defined address in Flash/SRAM on WakeUp.
The first word must be SP, and the second word must be PC.
Please remember to calculate the CRC value of the first 48 bytes of image/function and save the result to REGFILE1->REG[0]. The BootROM will check this CRC value, if authenticated successfully then the image/function will be executed.
Parameters
baseSPC peripheral base address.
dataThe address of the function/image to be executed if wakeup from low power mode.
static uint32_t SPC_GetWakeUpValue ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
The WakeUp value.
static spc_core_ldo_voltage_level_t SPC_GetActiveModeCoreLDOVDDVoltageLevel ( SPC_Type *  base)
inlinestatic

This function returns the voltage level of CORE LDO Regulator in Active mode.

Parameters
baseSPC peripheral base address.
Returns
Voltage level of CORE LDO in type of spc_core_ldo_voltage_level_t enumeration.
static spc_bandgap_mode_t SPC_GetActiveModeBandgapMode ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
Bandgap mode in the type of spc_bandgap_mode_t enumeration.
static uint32_t SPC_GetActiveModeVoltageDetectStatus ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
All voltage detectors status in Active mode.
void SPC_SetActiveModeIntegratedPowerSwitchConfig ( SPC_Type *  base,
const spc_intergrated_power_switch_config_t config 
)
Note
Legacy API and will be removed.
Parameters
baseSPC peripheral base address.
configPointer to spc_intergrated_power_switch_config_t pointer.
status_t SPC_SetActiveModeBandgapModeConfig ( SPC_Type *  base,
spc_bandgap_mode_t  mode 
)
Note
In active mode, beacause CORELDO_VDD_DS is reserved and set to Normal, so it is impossible to disable Bandgap in active mode
Parameters
baseSPC peripheral base address.
modeThe Bandgap mode be selected.
Return values
kStatus_SPC_BandgapModeWrongThe Bandgap can not be disabled in active mode.
kStatus_SuccessConfig Bandgap mode in Active power mode successful.
static void SPC_EnableActiveModeCMPBandgapBuffer ( SPC_Type *  base,
bool  enable 
)
inlinestatic
Parameters
baseSPC peripheral base address.
enableEnable/Disable CMP Bandgap buffer. true - Enable Buffer Stored Reference voltage to CMP. false - Disable Buffer Stored Reference voltage to CMP.
static void SPC_SetActiveModeVoltageTrimDelay ( SPC_Type *  base,
uint16_t  delay 
)
inlinestatic
Parameters
baseSPC peripheral base address.
delayThe number of SPC timer clock cycles.
status_t SPC_SetActiveModeRegulatorsConfig ( SPC_Type *  base,
const spc_active_mode_regulators_config_t config 
)

This function provides the method to config all on-chip regulators in active mode.

Parameters
baseSPC peripheral base address.
configPointer to spc_active_mode_regulators_config_t structure.
Return values
kStatus_SuccessConfig regulators in Active power mode successful.
kStatus_SPC_BandgapModeWrongThe bandgap mode setting in Active mode is wrong.
kStatus_SPC_BusyThe SPC instance is busy to execute any type of power mode transition.
kStatus_SPC_CORELDOVoltageWrongThe selected voltage level in active mode is not allowed.
kStatus_SPC_SYSLDOOverDriveVoltageFailFail to regulator to Over Drive Voltage.
kStatus_SPC_SYSLDOLowDriveStrengthIgnoreSet driver strength to Low will be ignored.
kStatus_SPC_DCDCLowDriveStrengthIgnoreSet driver strength to Low will be ignored.
void SPC_SetLowPowerModeIntegratedPowerSwitchConfig ( SPC_Type *  base,
const spc_intergrated_power_switch_config_t config 
)
Note
Legacy API, will be removed.
Parameters
baseSPC peripheral base address.
configPointer to spc_intergrated_power_switch_config_t pointer.
static spc_core_ldo_drive_strength_t SPC_GetLowPowerCoreLDOVDDDriveStrength ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
The CORE LDO's VDD Drive Strength.
static spc_core_ldo_voltage_level_t SPC_GetLowPowerCoreLDOVDDVoltageLevel ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
The CORE LDO VDD Regulator's voltage level.
static spc_bandgap_mode_t SPC_GetLowPowerModeBandgapMode ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
Bandgap mode in the type of spc_bandgap_mode_t enumeration.
static uint32_t SPC_GetLowPowerModeVoltageDetectStatus ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
The status of all voltage detectors in low power mode.
static void SPC_EnableLowPowerModeLowPowerIREF ( SPC_Type *  base,
bool  enable 
)
inlinestatic

This function enables/disables Low Power IREF. Low Power IREF can only get disabled in Deep power down mode. In other low power modes, the Low Power IREF is always enabled.

Parameters
baseSPC peripheral base address.
enableEnable/Disable Low Power IREF. true - Enable Low Power IREF for Low Power modes. false - Disable Low Power IREF for Deep Power Down mode.
status_t SPC_SetLowPowerModeBandgapmodeConfig ( SPC_Type *  base,
spc_bandgap_mode_t  mode 
)

This function configs Bandgap mode in Low Power mode. IF user want to disable Bandgap while keeping any of the Regulator in Normal Driver Strength or if any of the High voltage detectors/Low voltage detectors are kept enabled, the Bandgap mode will be set as Bandgap Enabled with Buffer Disabled.

Note
This API shall be invoked following set HVDs/LVDs and regulators' driver strength.
Parameters
baseSPC peripheral base address.
modeThe Bandgap mode be selected.
Return values
kStatus_SPC_BandgapModeWrongThe bandgap mode setting in Low Power mode is wrong.
kStatus_SuccessConfig Bandgap mode in Low Power power mode successful.
static void SPC_EnableLowPowerModeCMPBandgapBufferMode ( SPC_Type *  base,
bool  enable 
)
inlinestatic

This function gates CMP bandgap buffer. CMP bandgap buffer is automatically disabled and turned off in Deep Power Down mode.

Parameters
baseSPC peripheral base address.
enableEnable/Disable CMP Bandgap buffer. true - Enable Buffer Stored Reference Voltage to CMP. false - Disable Buffer Stored Reference Voltage to CMP.
static void SPC_EnableLowPowerModeCoreVDDInternalVoltageScaling ( SPC_Type *  base,
bool  enable 
)
inlinestatic

This function gates CORE VDD IVS. When enabled, the IVS regulator will scale the external input CORE VDD to a lower voltage level to reduce internal leakage. IVS is invalid in Sleep or Deep power down mode.

Parameters
baseSPC peripheral base address.
enableEnable/Disable IVS. true - enable CORE VDD IVS in Deep Sleep mode or Power Down mode. false - disable CORE VDD IVS in Deep Sleep mode or Power Down mode.
static void SPC_SetLowPowerWakeUpDelay ( SPC_Type *  base,
uint16_t  delay 
)
inlinestatic
Parameters
baseSPC peripheral base address.
delayThe number of SPC timer clock cycles that the SPC waits on exit from low power modes.
status_t SPC_SetLowPowerModeRegulatorsConfig ( SPC_Type *  base,
const spc_lowpower_mode_regulators_config_t config 
)

This function provides the method to config all on-chip regulators in Low Power mode.

Parameters
baseSPC peripheral base address.
configPointer to spc_lowpower_mode_regulators_config_t structure.
Return values
kStatus_SuccessConfig regulators in Low power mode successful.
kStatus_SPC_BandgapModeWrongThe bandgap mode setting in Low Power mode is wrong.
kStatus_SPC_BusyThe SPC instance is busy to execute any type of power mode transition.
kStatus_SPC_CORELDOVoltageWrongThe selected voltage level is wrong.
kStatus_SPC_CORELDOLowDriveStrengthIgnoreSet driver strength to low will be ignored.
#kStatus_SPC_CORELDOVoltageSetFail.Fail to change Core LDO voltage level.
kStatus_SPC_SYSLDOLowDriveStrengthIgnoreSet driver strength to low will be ignored.
kStatus_SPC_DCDCPulseRefreshModeIgnoreSet driver strength to Pulse Refresh mode will be ignored.
kStatus_SPC_DCDCLowDriveStrengthIgnoreSet driver strength to Low Drive Strength will be ignored.
static uint8_t SPC_GetVoltageDetectStatusFlag ( SPC_Type *  base)
inlinestatic
Parameters
baseSPC peripheral base address.
Returns
Voltage Detect Status Flags. See _spc_voltage_detect_flags for details.
static void SPC_ClearVoltageDetectStatusFlag ( SPC_Type *  base,
uint8_t  mask 
)
inlinestatic
Parameters
baseSPC peripheral base address.
maskThe mask of the voltage detect status flags. See _spc_voltage_detect_flags for details.
void SPC_SetCoreVoltageDetectConfig ( SPC_Type *  base,
const spc_core_voltage_detect_config_t config 
)

This function config CORE voltage detect options.

Note
: Setting both the voltage detect interrupt and reset enable will cause interrupt to be generated on exit from reset. If those conditioned is not desired, interrupt/reset so only one is enabled.
Parameters
baseSPC peripheral base address.
configPointer to spc_core_voltage_detect_config_t structure.
static void SPC_LockCoreVoltageDetectResetSetting ( SPC_Type *  base)
inlinestatic

This function locks core voltage detect reset setting. After invoking this function any configuration of Core voltage detect reset will be ignored.

Parameters
baseSPC peripheral base address.
static void SPC_UnlockCoreVoltageDetectResetSetting ( SPC_Type *  base)
inlinestatic

This function unlocks core voltage detect reset setting. If locks the Core voltage detect reset setting, invoking this function to unlock.

Parameters
baseSPC peripheral base address.
status_t SPC_EnableActiveModeCoreHighVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the CORE_LDO high voltage detect is enabled in Active mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low.
Parameters
baseSPC peripheral base address.
enableEnable/Disable Core HVD. true - Enable Core High voltage detector in active mode. false - Disable Core High voltage detector in active mode.
Return values
kStatus_SuccessEnable/Disable Core High Voltage Detect successfully.
status_t SPC_EnableActiveModeCoreLowVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the CORE_LDO low voltage detect is enabled in Active mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low.
Parameters
baseSPC peripheral base address.
enableEnable/Disable Core LVD. true - Enable Core Low voltage detector in active mode. false - Disable Core Low voltage detector in active mode.
Return values
kStatus_SuccessEnable/Disable Core Low Voltage Detect successfully.
status_t SPC_EnableLowPowerModeCoreHighVoltageDetect ( SPC_Type *  base,
bool  enable 
)

This function enables/disables the Core High Voltage Detector. If enabled the Core High Voltage detector. The Bandgap mode in low power mode must be programmed so that Bandgap is enabled.

Note
If the CORE_LDO high voltage detect is enabled in Low Power mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in low power mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable Core HVD. true - Enable Core High voltage detector in low power mode. false - Disable Core High voltage detector in low power mode.
Return values
kStatus_SuccessEnable/Disable Core High Voltage Detect in low power mode successfully.
status_t SPC_EnableLowPowerModeCoreLowVoltageDetect ( SPC_Type *  base,
bool  enable 
)

This function enables/disables the Core Low Voltage Detector. If enabled the Core Low Voltage detector. The Bandgap mode in low power mode must be programmed so that Bandgap is enabled.

Note
If the CORE_LDO low voltage detect is enabled in Low Power mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Low Power mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable Core HVD. true - Enable Core Low voltage detector in low power mode. false - Disable Core Low voltage detector in low power mode.
Return values
kStatus_SuccessEnable/Disable Core Low Voltage Detect in low power mode successfully.
void SPC_SetSystemVDDLowVoltageLevel ( SPC_Type *  base,
spc_low_voltage_level_select_t  level 
)

This function selects the system VDD low-voltage level. Changing system VDD low-voltage level must be done after disabling the System VDD low voltage reset and interrupt.

Parameters
baseSPC peripheral base address.
levelSystem VDD Low-Voltage level selection.
void SPC_SetSystemVoltageDetectConfig ( SPC_Type *  base,
const spc_system_voltage_detect_config_t config 
)

This function config SYS voltage detect options.

Note
: Setting both the voltage detect interrupt and reset enable will cause interrupt to be generated on exit from reset. If those conditioned is not desired, interrupt/reset so only one is enabled.
Parameters
baseSPC peripheral base address.
configPointer to spc_system_voltage_detect_config_t structure.
static void SPC_LockSystemVoltageDetectResetSetting ( SPC_Type *  base)
inlinestatic

This function locks system voltage detect reset setting. After invoking this function any configuration of System Voltage detect reset will be ignored.

Parameters
baseSPC peripheral base address.
static void SPC_UnlockSystemVoltageDetectResetSetting ( SPC_Type *  base)
inlinestatic

This function unlocks system voltage detect reset setting. If locks the System voltage detect reset setting, invoking this function to unlock.

Parameters
baseSPC peripheral base address.
status_t SPC_EnableActiveModeSystemHighVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the System_LDO high voltage detect is enabled in Active mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Active mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable System HVD. true - Enable System High voltage detector in active mode. false - Disable System High voltage detector in active mode.
Return values
kStatus_SuccessEnable/Disable System High Voltage Detect successfully.
status_t SPC_EnableActiveModeSystemLowVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the System_LDO low voltage detect is enabled in Active mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Active mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable System LVD. true - Enable System Low voltage detector in active mode. false - Disable System Low voltage detector in active mode.
Return values
kStatus_SuccessEnable/Disable the System Low Voltage Detect successfully.
status_t SPC_EnableLowPowerModeSystemHighVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the System_LDO high voltage detect is enabled in Low Power mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Low Power mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable System HVD. true - Enable System High voltage detector in low power mode. false - Disable System High voltage detector in low power mode.
Return values
kStatus_SuccessEnable/Disable System High Voltage Detect in low power mode successfully.
status_t SPC_EnableLowPowerModeSystemLowVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the System_LDO low voltage detect is enabled in Low Power mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Low Power mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable System HVD. true - Enable System Low voltage detector in low power mode. false - Disable System Low voltage detector in low power mode.
Return values
kStatus_SuccessEnables System Low Voltage Detect in low power mode successfully.
void SPC_SetIOVDDLowVoltageLevel ( SPC_Type *  base,
spc_low_voltage_level_select_t  level 
)

This function selects the IO VDD Low-voltage level. Changing IO VDD low-voltage level must be done after disabling the IO VDD low voltage reset and interrupt.

Parameters
baseSPC peripheral base address.
levelIO VDD Low-voltage level selection.
void SPC_SetIOVoltageDetectConfig ( SPC_Type *  base,
const spc_io_voltage_detect_config_t config 
)

This function config IO voltage detect options.

Note
: Setting both the voltage detect interrupt and reset enable will cause interrupt to be generated on exit from reset. If those conditioned is not desired, interrupt/reset so only one is enabled.
Parameters
baseSPC peripheral base address.
configPointer to spc_voltage_detect_config_t structure.
static void SPC_LockIOVoltageDetectResetSetting ( SPC_Type *  base)
inlinestatic

This function locks IO voltage detect reset setting. After invoking this function any configuration of system voltage detect reset will be ignored.

Parameters
baseSPC peripheral base address.
static void SPC_UnlockIOVoltageDetectResetSetting ( SPC_Type *  base)
inlinestatic

This function unlocks IO voltage detect reset setting. If locks the IO voltage detect reset setting, invoking this function to unlock.

Parameters
baseSPC peripheral base address.
status_t SPC_EnableActiveModeIOHighVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the IO high voltage detect is enabled in Active mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Active mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable IO HVD. true - Enable IO High voltage detector in active mode. false - Disable IO High voltage detector in active mode.
Return values
kStatus_SuccessEnable/Disable IO High Voltage Detect successfully.
status_t SPC_EnableActiveModeIOLowVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the IO low voltage detect is enabled in Active mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Active mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable IO LVD. true - Enable IO Low voltage detector in active mode. false - Disable IO Low voltage detector in active mode.
Return values
kStatus_SuccessEnable IO Low Voltage Detect successfully.
status_t SPC_EnableLowPowerModeIOHighVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the IO high voltage detect is enabled in Low Power mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Low Power mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable IO HVD. true - Enable IO High voltage detector in low power mode. false - Disable IO High voltage detector in low power mode.
Return values
kStatus_SuccessEnable IO High Voltage Detect in low power mode successfully.
status_t SPC_EnableLowPowerModeIOLowVoltageDetect ( SPC_Type *  base,
bool  enable 
)
Note
If the IO low voltage detect is enabled in Low Power mode, please note that the bandgap must be enabled and the drive strength of each regulator must not set to low in Low Power mode.
Parameters
baseSPC peripheral base address.
enableEnable/Disable IO LVD. true - Enable IO Low voltage detector in low power mode. false - Disable IO Low voltage detector in low power mode.
Return values
kStatus_SuccessEnable/Disable IO Low Voltage Detect in low power mode successfully.
void SPC_SetExternalVoltageDomainsConfig ( SPC_Type *  base,
uint8_t  lowPowerIsoMask,
uint8_t  IsoMask 
)

This function configs external voltage domains isolation.

Parameters
baseSPC peripheral base address.
lowPowerIsoMaskThe mask of external domains isolate enable during low power mode. Please read the Reference Manual for the Bitmap.
IsoMaskThe mask of external domains isolate. Please read the Reference Manual for the Bitmap.
static uint8_t SPC_GetExternalDomainsStatus ( SPC_Type *  base)
inlinestatic

This function configs external voltage domains status.

Parameters
baseSPC peripheral base address.
Returns
The status of each external domain.
static void SPC_EnableCoreLDORegulator ( SPC_Type *  base,
bool  enable 
)
inlinestatic
Note
The CORE LDO enable bit is write-once.
Parameters
baseSPC peripheral base address.
enableEnable/Disable CORE LDO Regulator. true - Enable CORE LDO Regulator. false - Disable CORE LDO Regulator.
static void SPC_PullDownCoreLDORegulator ( SPC_Type *  base,
bool  pulldown 
)
inlinestatic
Note
This function only useful when enabled the CORE LDO Regulator.
Parameters
baseSPC peripheral base address.
pulldownEnable/Disable CORE LDO pulldown in Deep Power Down mode. true - CORE LDO Regulator will discharge in Deep Power Down mode. false - CORE LDO Regulator will not discharge in Deep Power Down mode.
status_t SPC_SetActiveModeCoreLDORegulatorConfig ( SPC_Type *  base,
const spc_active_mode_core_ldo_option_t option 
)
Note
If any voltage detect feature is enabled in Active mode, then CORE_LDO's drive strength must not set to low.
Core VDD level for the Core LDO low power regulator can only be changed when CORELDO_VDD_DS is normal
Parameters
baseSPC peripheral base address.
optionPointer to the spc_active_mode_core_ldo_option_t structure.
Return values
kStatus_SuccessConfig Core LDO regulator in Active power mode successful.
kStatus_SPC_BusyThe SPC instance is busy to execute any type of power mode transition.
kStatus_SPC_CORELDOLowDriveStrengthIgnoreIf any voltage detect enabled, core_ldo's drive strength can not set to low.
kStatus_SPC_CORELDOVoltageWrongThe selected voltage level in active mode is not allowed.
status_t SPC_SetLowPowerModeCoreLDORegulatorConfig ( SPC_Type *  base,
const spc_lowpower_mode_core_ldo_option_t option 
)

This function configs CORE LDO Regulator in Low Power mode. If CORE LDO VDD Drive Strength is set to Normal, the CORE LDO VDD regulator voltage level in Active mode must be equal to the voltage level in Low power mode. And the Bandgap must be programmed to select bandgap enabled. Core VDD voltage levels for the Core LDO low power regulator can only be changed when the CORE LDO Drive Strength set as Normal.

Parameters
baseSPC peripheral base address.
optionPointer to the spc_lowpower_mode_core_ldo_option_t structure.
Return values
kStatus_SuccessConfig Core LDO regulator in power mode successfully.
kStatus_SPC_BusyThe SPC instance is busy to execute any type of power mode transition.
kStatus_SPC_CORELDOLowDriveStrengthIgnoreSet driver strength to low will be ignored.
#kStatus_SPC_CORELDOVoltageSetFail.Fail to change Core LDO voltage level.
static void SPC_EnableSystemLDORegulator ( SPC_Type *  base,
bool  enable 
)
inlinestatic
Note
The SYSTEM LDO enable bit is write-once.
Parameters
baseSPC peripheral base address.
enableEnable/Disable System LDO Regulator. true - Enable System LDO Regulator. false - Disable System LDO Regulator.
static void SPC_EnableSystemLDOSinkFeature ( SPC_Type *  base,
bool  sink 
)
inlinestatic
Parameters
baseSPC peripheral base address.
sinkEnable/Disable current sink feature. true - Enable current sink feature of System LDO Regulator. false - Disable current sink feature of System LDO Regulator.
status_t SPC_SetActiveModeSystemLDORegulatorConfig ( SPC_Type *  base,
const spc_active_mode_sys_ldo_option_t option 
)

This function configs System LDO VDD Regulator in Active mode. If System LDO VDD Drive Strength is set to Normal, the Bandgap mode in Active mode must be programmed to a value that enables the bandgap. If any voltage detects are kept enabled, configuration to set System LDO VDD drive strength to low will be ignored. If select System LDO VDD Regulator voltage level to Over Drive Voltage, the Drive Strength of System LDO VDD Regulator must be set to Normal otherwise the regulator Drive Strength will be forced to Normal. If select System LDO VDD Regulator voltage level to Over Drive Voltage, the High voltage detect must be disabled. Otherwise it will be fail to regulator to Over Drive Voltage.

Parameters
baseSPC peripheral base address.
optionPointer to the spc_active_mode_sys_ldo_option_t structure.
Return values
kStatus_SuccessConfig System LDO regulator in Active power mode successful.
kStatus_SPC_BusyThe SPC instance is busy to execute any type of power mode transition.
kStatus_SPC_SYSLDOOverDriveVoltageFailFail to regulator to Over Drive Voltage.
kStatus_SPC_SYSLDOLowDriveStrengthIgnoreSet driver strength to Low will be ignored.
status_t SPC_SetLowPowerModeSystemLDORegulatorConfig ( SPC_Type *  base,
const spc_lowpower_mode_sys_ldo_option_t option 
)

This function configs System LDO regulator in low power modes. If System LDO VDD Regulator Drive strength is set to normal, bandgap mode in low power mode must be programmed to a value that enables the Bandgap. If any High voltage detectors or Low Voltage detectors are kept enabled, configuration to set System LDO Regulator drive strength as Low will be ignored.

Parameters
baseSPC peripheral base address.
optionPointer to spc_lowpower_mode_sys_ldo_option_t structure.
Return values
kStatus_SuccessConfig System LDO regulator in Low Power Mode successfully.
kStatus_SPC_BusyThe SPC instance is busy to execute any type of power mode transition.
kStatus_SPC_SYSLDOLowDriveStrengthIgnoreSet driver strength to low will be ignored.
static void SPC_EnableDCDCRegulator ( SPC_Type *  base,
bool  enable 
)
inlinestatic
Note
The DCDC enable bit is write-once.
Parameters
baseSPC peripheral base address.
enableEnable/Disable DCDC Regulator. true - Enable DCDC Regulator. false - Disable DCDC Regulator.
void SPC_SetDCDCBurstConfig ( SPC_Type *  base,
spc_dcdc_burst_config_t config 
)
Parameters
baseSPC peripheral base address.
configPointer to spc_dcdc_burst_config_t structure.
void SPC_SetDCDCRefreshCount ( SPC_Type *  base,
uint16_t  count 
)

This function set the count value of the reference clock to control the frequency of dcdc refresh when dcdc is configured in Pulse Refresh mode.

Parameters
baseSPC peripheral base address.
countThe count value, 16 bit width.
status_t SPC_SetActiveModeDCDCRegulatorConfig ( SPC_Type *  base,
const spc_active_mode_dcdc_option_t option 
)

This function configs DCDC VDD Regulator in Active mode. If DCDDC VDD Drive Strength is set to Normal, the Bandgap mode in Active mode must be programmed to a value that enable the bandgap. If any voltage detects are kept enabled, configuration to set DCDC VDD drive strength to low will be ignored. When switching DCDC from low drive strength to Normal driver strength, make sure the DCDC high VDD LVL setting to the same level that was set prior to switching the DCDC to low drive strength.

Parameters
baseSPC peripheral base address.
optionPointer to the spc_active_mode_dcdc_option_t structure.
Return values
kStatus_SuccessConfig DCDC regulator in Active power mode successful.
kStatus_SPC_BusyThe SPC instance is busy to execute any type of power mode transition.
kStatus_SPC_DCDCLowDriveStrengthIgnoreSet driver strength to Low will be ignored.
status_t SPC_SetLowPowerModeDCDCRegulatorConfig ( SPC_Type *  base,
const spc_lowpower_mode_dcdc_option_t option 
)

This function configs DCDC VDD Regulator in Low Power modes. If DCDC VDD Drive Strength is set to Normal, the Bandgap mode in Low Power mode must be programmed to a value that enables the Bandgap. If any of voltage detectors are kept enabled, configuration to set DCDC VDD Drive Strength to Low or Pulse mode will be ignored. In Deep Power Down mode, DCDC regulator is always turned off.

Parameters
baseSPC peripheral base address.
optionPointer to the spc_lowpower_mode_dcdc_option_t structure.
Return values
kStatus_SuccessConfig DCDC regulator in low power mode successfully.
kStatus_SPC_BusyThe SPC instance is busy to execute any type of power mode transition.
kStatus_SPC_DCDCPulseRefreshModeIgnoreSet driver strength to Pulse Refresh mode will be ignored.
kStatus_SPC_DCDCLowDriveStrengthIgnoreSet driver strength to Low Drive Strength will be ignored.