MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
GPC: General Power Controller Driver

Overview

The MCUXpresso SDK provides a peripheral driver for the General Power Controller (GPC) module of MCUXpresso SDK devices.

API functions are provided to configure the system about working in dedicated power mode. There are mainly about enabling the power for memory, enabling the wakeup sources for Partial Sleep mode, and power up/down operations.

Typical use case

  1. Enable the wakeup source for Partial Sleep (PSLEEP) mode. In PSLEEP mode, HP domain is powered down, while LP domain remains powered on. Therefore, peripherals in LP domain can wakeup the system from PSLEEP mode via interrupts. In PSLEEP mode, system clocks are stopped and peripheral clocks of LP domain can be optionally on. LP domain peripherals can generate interrupt either asynchronously or need its peripheral clock on, depending on what kind of wakeup event is expected. Using the API of "GPC_EnablePartialSleepWakeupSource()" can enable the corresponding module as a wakeup source of PSLEEP mode. When the MCU exits from the PSLEEP mode, the API of "GPC_GetPartialSleepWakeupFlag()" can be used to check if the expected event occurs. However, to clear the wakeup flags, the user has to clear the interrupt status of the corresponding wakeup module.
  2. Power up/down sequence. After the power up/down request, the power of HP domain would not be ready immediately, it would wait for a few delay so that the voltage is stable. Then switch the power of HP domain by hardware. To set the delay time, the driver privodes the API of "GPC_ConfigPowerUpSequence()" and "GPC_ConfigPowerDownSequence()".

Data Structures

struct  _gpc_tran_step_config
 Configuration for GPC transition step. More...
 

Typedefs

typedef enum
_gpc_cm_standby_mode_status 
gpc_cm_standby_mode_status_t
 CPU standby mode status. More...
 
typedef enum _gpc_cm_tran_step gpc_cm_tran_step_t
 CPU mode transition step in sleep/wakeup sequence. More...
 
typedef enum
_gpc_tran_step_counter_mode 
gpc_tran_step_counter_mode_t
 Step counter work mode. More...
 
typedef enum _gpc_sp_tran_step gpc_sp_tran_step_t
 GPC set point transition steps. More...
 
typedef enum _gpc_cpu_mode gpc_cpu_mode_t
 CPU mode. More...
 
typedef struct
_gpc_tran_step_config 
gpc_tran_step_config_t
 Configuration for GPC transition step. More...
 
typedef enum _gpc_cm_wakeup_sp_sel gpc_cm_wakeup_sp_sel_t
 CPU wakeup sequence setpoint options. More...
 
typedef enum _gpc_stby_tran_step gpc_stby_tran_step_t
 GPC standby mode transition steps. More...
 
typedef enum _gpc_cpu_domain_name gpc_cpu_domain_name_t
 GPC CPU domain name, used to select the CPU domain.
 

Enumerations

enum  {
  kGPC_CM_EventWakeupRequest,
  kGPC_CM_DebugWakeupRequest
}
 _gpc_cm_non_irq_wakeup_request GPC Non-IRQ wakeup request. More...
 
enum  {
  kGPC_SetPoint0 = 1UL << 0UL,
  kGPC_SetPoint1 = 1UL << 1UL,
  kGPC_SetPoint2 = 1UL << 2UL,
  kGPC_SetPoint3 = 1UL << 3UL,
  kGPC_SetPoint4 = 1UL << 4UL,
  kGPC_SetPoint5 = 1UL << 5UL,
  kGPC_SetPoint6 = 1UL << 6UL,
  kGPC_SetPoint7 = 1UL << 7UL,
  kGPC_SetPoint8 = 1UL << 8UL,
  kGPC_SetPoint9 = 1UL << 9UL,
  kGPC_SetPoint10 = 1UL << 10UL,
  kGPC_SetPoint11 = 1UL << 11UL,
  kGPC_SetPoint12 = 1UL << 12UL,
  kGPC_SetPoint13 = 1UL << 13UL,
  kGPC_SetPoint14 = 1UL << 14UL,
  kGPC_SetPoint15 = 1UL << 15UL
}
 
enum  
 _gpc_cm_interrupt_status_flag
 
enum  _gpc_cm_standby_mode_status {
  kGPC_CM_SleepBusy,
  kGPC_CM_WakeupBusy
}
 CPU standby mode status. More...
 
enum  _gpc_cm_tran_step {
  kGPC_CM_SleepSsar = 0UL,
  kGPC_CM_SleepLpcg = 1UL,
  kGPC_CM_SleepPll = 2UL,
  kGPC_CM_SleepIso = 3UL,
  kGPC_CM_SleepReset = 4UL,
  kGPC_CM_SleepPower = 5UL,
  kGPC_CM_SleepSP = 6UL,
  kGPC_CM_SleepSTBY = 7UL,
  kGPC_CM_WakeupSTBY = 8UL,
  kGPC_CM_WakeupSP = 9UL,
  kGPC_CM_WakeupPower = 10UL,
  kGPC_CM_WakeupReset = 11UL,
  kGPC_CM_WakeupIso = 12UL,
  kGPC_CM_WakeupPll = 13UL,
  kGPC_CM_WakeupLpcg = 14UL,
  kGPC_CM_WakeupSsar = 15UL
}
 CPU mode transition step in sleep/wakeup sequence. More...
 
enum  _gpc_tran_step_counter_mode {
  kGPC_StepCounterDisableMode,
  kGPC_StepCounterDelayMode,
  kGPC_StepCounterIgnoreResponseMode = 2UL,
  kGPC_StepCounterTimeOutMode = 3UL
}
 Step counter work mode. More...
 
enum  _gpc_sp_tran_step {
  kGPC_SP_SsarSave = 0UL,
  kGPC_SP_LpcgOff = 1UL,
  kGPC_SP_GroupDown = 2UL,
  kGPC_SP_RootDown = 3UL,
  kGPC_SP_PllOff = 4UL,
  kGPC_SP_IsoOn = 5UL,
  kGPC_SP_ResetEarly = 6UL,
  kGPC_SP_PowerOff = 7UL,
  kGPC_SP_BiasOff = 8UL,
  kGPC_SP_BandgapPllLdoOff = 9UL,
  kGPC_SP_LdoPre = 10UL,
  kGPC_SP_DcdcDown = 11UL,
  kGPC_SP_DcdcUp = 12UL,
  kGPC_SP_LdoPost = 13UL,
  kGPC_SP_BandgapPllLdoOn = 14UL,
  kGPC_SP_BiasOn = 15UL,
  kGPC_SP_PowerOn = 16UL,
  kGPC_SP_ResetLate = 17UL,
  kGPC_SP_IsoOff = 18UL,
  kGPC_SP_PllOn = 19UL,
  kGPC_SP_RootUp = 20UL,
  kGPC_SP_GroupUp = 21UL,
  kGPC_SP_LpcgOn = 22UL,
  kGPC_SP_SsarRestore = 23UL
}
 GPC set point transition steps. More...
 
enum  _gpc_cpu_mode {
  kGPC_RunMode = 0x0UL,
  kGPC_WaitMode = 0x1UL,
  kGPC_StopMode = 0x2UL,
  kGPC_SuspendMode = 0x3UL
}
 CPU mode. More...
 
enum  _gpc_cm_wakeup_sp_sel {
  kGPC_CM_WakeupSetpoint,
  kGPC_CM_RequestPreviousSetpoint = 1UL
}
 CPU wakeup sequence setpoint options. More...
 
enum  _gpc_stby_tran_step {
  kGPC_STBY_LpcgIn = 0UL,
  kGPC_STBY_PllIn = 1UL,
  kGPC_STBY_BiasIn = 2UL,
  kGPC_STBY_PldoIn = 3UL,
  kGPC_STBY_BandgapIn = 4UL,
  kGPC_STBY_LdoIn = 5UL,
  kGPC_STBY_DcdcIn = 6UL,
  kGPC_STBY_PmicIn = 7UL,
  kGPC_STBY_PmicOut = 8UL,
  kGPC_STBY_DcdcOut = 9UL,
  kGPC_STBY_LdoOut = 10UL,
  kGPC_STBY_BandgapOut = 11UL,
  kGPC_STBY_PldoOut = 12UL,
  kGPC_STBY_BiasOut = 13UL,
  kGPC_STBY_PllOut = 14UL,
  kGPC_STBY_LpcgOut = 15UL
}
 GPC standby mode transition steps. More...
 
enum  _gpc_cpu_domain_name {
  kGPC_CM7Core = 0U,
  kGPC_CM4Core = 1U
}
 GPC CPU domain name, used to select the CPU domain. More...
 
enum  _gpc_memory_power_gate {
  kGPC_MemoryPowerGateL2Cache = GPC_MPCTR_L2_PGE_MASK,
  kGPC_MemoryPowerGateITCM = GPC_MPCTR_ITCM_PGE_MASK,
  kGPC_MemoryPowerGateDTCM = GPC_MPCTR_DTCM_PGE_MASK
}
 Enumeration of the memory power gate control. More...
 
enum  _gpc_status_flags { kGPC_PoweredDownFlag = GPC_PGS_PS_MASK }
 GPC flags. More...
 

Driver version

#define FSL_GPC_RIVER_VERSION   (MAKE_VERSION(2, 3, 1))
 GPC driver version 2.3.1. More...
 

CPU mode control

static void GPC_CM_EnableCpuSleepHold (GPC_CPU_MODE_CTRL_Type *base, bool enable)
 
static void GPC_CM_SetNextCpuMode (GPC_CPU_MODE_CTRL_Type *base, gpc_cpu_mode_t mode)
 Set the CPU mode on the next sleep event. More...
 
static gpc_cpu_mode_t GPC_CM_GetCurrentCpuMode (GPC_CPU_MODE_CTRL_Type *base)
 Get current CPU mode. More...
 
static gpc_cpu_mode_t GPC_CM_GetPreviousCpuMode (GPC_CPU_MODE_CTRL_Type *base)
 Get previous CPU mode. More...
 
void GPC_CM_EnableIrqWakeup (GPC_CPU_MODE_CTRL_Type *base, uint32_t irqId, bool enable)
 Enable IRQ wakeup request. More...
 
static void GPC_CM_EnableNonIrqWakeup (GPC_CPU_MODE_CTRL_Type *base, uint32_t mask, bool enable)
 Enable Non-IRQ wakeup request. More...
 
bool GPC_CM_GetIrqWakeupStatus (GPC_CPU_MODE_CTRL_Type *base, uint32_t irqId)
 Get the status of the IRQ wakeup request. More...
 
static bool GPC_CM_GetNonIrqWakeupStatus (GPC_CPU_MODE_CTRL_Type *base, uint32_t mask)
 Get the status of the Non-IRQ wakeup request. More...
 
void GPC_CM_ConfigCpuModeTransitionStep (GPC_CPU_MODE_CTRL_Type *base, gpc_cm_tran_step_t step, const gpc_tran_step_config_t *config)
 Config the cpu mode transition step. More...
 
void GPC_CM_RequestSleepModeSetPointTransition (GPC_CPU_MODE_CTRL_Type *base, uint8_t setPointSleep, uint8_t setPointWakeup, gpc_cm_wakeup_sp_sel_t wakeupSel)
 Request a set point transition before the CPU transfers into a sleep mode. More...
 
void GPC_CM_RequestRunModeSetPointTransition (GPC_CPU_MODE_CTRL_Type *base, uint8_t setPointRun)
 Request a set point transition during run mode. More...
 
static void GPC_CM_SetSetPointMapping (GPC_CPU_MODE_CTRL_Type *base, uint32_t setPoint, uint32_t setpoint_map)
 Set the set point mapping value for each set point. More...
 
void GPC_CM_SetCpuModeSetPointMapping (GPC_CPU_MODE_CTRL_Type *base, gpc_cpu_mode_t mode, uint32_t setpoint_map)
 Set the set point mapping value for each cpu mode. More...
 
void GPC_CM_RequestStandbyMode (GPC_CPU_MODE_CTRL_Type *base, const gpc_cpu_mode_t mode)
 Request the chip into standby mode. More...
 
void GPC_CM_ClearStandbyModeRequest (GPC_CPU_MODE_CTRL_Type *base, const gpc_cpu_mode_t mode)
 Clear the standby mode request. More...
 
static bool GPC_CM_GetStandbyModeStatus (GPC_CPU_MODE_CTRL_Type *base, uint32_t mask)
 Get the status of the CPU standby mode transition. More...
 
static uint32_t GPC_CM_GetInterruptStatusFlags (GPC_CPU_MODE_CTRL_Type *base)
 Get the status flags of the GPC CPU module. More...
 
void GPC_CM_ClearInterruptStatusFlags (GPC_CPU_MODE_CTRL_Type *base, uint32_t mask)
 Clears CPU module interrut status flags. More...
 

Set point request control

static void GPC_SP_SetSetpointPriority (GPC_SET_POINT_CTRL_Type *base, uint32_t setPoint, uint32_t priority)
 Set the priority of set point. More...
 
void GPC_SP_ConfigSetPointTransitionStep (GPC_SET_POINT_CTRL_Type *base, gpc_sp_tran_step_t step, const gpc_tran_step_config_t *config)
 Config the set point transition step. More...
 
static uint8_t GPC_SP_GetCurrentSetPoint (GPC_SET_POINT_CTRL_Type *base)
 Get system current setpoint, only valid when setpoint trans not busy. More...
 
static uint8_t GPC_SP_GetPreviousSetPoint (GPC_SET_POINT_CTRL_Type *base)
 Get system previous setpoint, only valid when setpoint trans not busy. More...
 
static uint8_t GPC_SP_GetTargetSetPoint (GPC_SET_POINT_CTRL_Type *base)
 Get target setpoint. More...
 

Standby mode control

void GPC_STBY_ConfigStandbyTransitionStep (GPC_STBY_CTRL_Type *base, gpc_stby_tran_step_t step, const gpc_tran_step_config_t *config)
 Config the standby transition step. More...
 
static void GPC_STBY_ForceCoreRequestStandbyMode (GPC_STBY_CTRL_Type *base, gpc_cpu_domain_name_t cpuName)
 Force selected CPU requesting standby mode. More...
 

Driver version

#define FSL_GPC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 GPC driver version 2.0.0. More...
 

Memory power Control

static void GPC_EnableMemoryGate (GPC_Type *base, uint32_t modules, bool enable)
 Control power for memory. More...
 

Partial sleep source

void GPC_EnablePartialSleepWakeupSource (GPC_Type *base, gpc_wakeup_source_t source, bool enable)
 Enable the modules as wakeup sources of PSLEEP (Partial Sleep) mode. More...
 
bool GPC_GetPartialSleepWakeupFlag (GPC_Type *base, gpc_wakeup_source_t source)
 Get if indicated wakeup module just caused the wakeup event to exit PSLEEP mode. More...
 
static void GPC_EnablePartialSleepMode (GPC_Type *base, bool enable)
 Switch to the Partial Sleep mode. More...
 

Power gate control

static void GPC_ConfigPowerUpSequence (GPC_Type *base, uint32_t sw, uint32_t sw2iso)
 Configure the power up sequence. More...
 
static void GPC_ConfigPowerDownSequence (GPC_Type *base, uint32_t iso, uint32_t iso2w)
 Configure the power down sequence. More...
 
static uint32_t GPC_GetStatusFlags (GPC_Type *base)
 Get the status flags of GPC. More...
 
static void GPC_ClearStatusFlags (GPC_Type *base, uint32_t flags)
 Clear the status flags of GPC. More...
 

Data Structure Documentation

struct _gpc_tran_step_config

Data Fields

uint32_t stepCount
 Step count, which is depended on the value of cntMode. More...
 
gpc_tran_step_counter_mode_t cntMode
 Step counter working mode. More...
 
bool enableStep
 Enable the step. More...
 

Field Documentation

uint32_t _gpc_tran_step_config::stepCount
gpc_tran_step_counter_mode_t _gpc_tran_step_config::cntMode
bool _gpc_tran_step_config::enableStep

Macro Definition Documentation

#define FSL_GPC_RIVER_VERSION   (MAKE_VERSION(2, 3, 1))
#define FSL_GPC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))

Typedef Documentation

Enumeration Type Documentation

anonymous enum
Enumerator
kGPC_CM_EventWakeupRequest 

Event wakeup request.

kGPC_CM_DebugWakeupRequest 

Debug wakeup request.

anonymous enum
Enumerator
kGPC_SetPoint0 

GPC set point 0.

kGPC_SetPoint1 

GPC set point 1.

kGPC_SetPoint2 

GPC set point 2.

kGPC_SetPoint3 

GPC set point 3.

kGPC_SetPoint4 

GPC set point 4.

kGPC_SetPoint5 

GPC set point 5.

kGPC_SetPoint6 

GPC set point 6.

kGPC_SetPoint7 

GPC set point 7.

kGPC_SetPoint8 

GPC set point 8.

kGPC_SetPoint9 

GPC set point 9.

kGPC_SetPoint10 

GPC set point 10.

kGPC_SetPoint11 

GPC set point 11.

kGPC_SetPoint12 

GPC set point 12.

kGPC_SetPoint13 

GPC set point 13.

kGPC_SetPoint14 

GPC set point 14.

kGPC_SetPoint15 

GPC set point 15.

Enumerator
kGPC_CM_SleepBusy 

Indicate the CPU is busy entering standby mode.

kGPC_CM_WakeupBusy 

Indicate the CPU is busy exiting standby mode.

Enumerator
kGPC_CM_SleepSsar 

SSAR (State Save And Restore) sleep step.

kGPC_CM_SleepLpcg 

LPCG (Low Power Clock Gating) sleep step.

kGPC_CM_SleepPll 

PLL sleep step.

kGPC_CM_SleepIso 

ISO (Isolation) sleep step.

kGPC_CM_SleepReset 

Reset sleep step.

kGPC_CM_SleepPower 

Power sleep step.

kGPC_CM_SleepSP 

Setpoint sleep step.

Note that this step is controlled by setpoint controller.

kGPC_CM_SleepSTBY 

Standby sleep step.

Note that this step is controlled by standby controller.

kGPC_CM_WakeupSTBY 

Standby wakeup step.

Note that this step is controlled by standby controller.

kGPC_CM_WakeupSP 

Setpoint wakeup step.

Note that this step is controlled by setpoint countroller.

kGPC_CM_WakeupPower 

Power wakeup step.

kGPC_CM_WakeupReset 

Reset wakeup step.

kGPC_CM_WakeupIso 

ISO wakeup step.

kGPC_CM_WakeupPll 

PLL wakeup step.

kGPC_CM_WakeupLpcg 

LPCG wakeup step.

kGPC_CM_WakeupSsar 

SSAR wakeup step.

Enumerator
kGPC_StepCounterDisableMode 

Counter disable mode: not use step counter, step completes once receiving step_done.

kGPC_StepCounterDelayMode 

Counter delay mode: delay after receiving step_done, delay cycle number is STEP_CNT.

kGPC_StepCounterIgnoreResponseMode 

Ignore step_done response, the counter starts to count once step begins, when counter reaches STEP_CNT value, the step completes.

kGPC_StepCounterTimeOutMode 

Time out mode, the counter starts to count once step begins, the step completes when either step_done received or counting to STEP_CNT value.

Enumerator
kGPC_SP_SsarSave 

SSAR save step.

kGPC_SP_LpcgOff 

LPCG off step.

kGPC_SP_GroupDown 

Group down step.

kGPC_SP_RootDown 

Root down step.

kGPC_SP_PllOff 

PLL off step.

kGPC_SP_IsoOn 

ISO on.

kGPC_SP_ResetEarly 

Reset early step.

kGPC_SP_PowerOff 

Power off step.

kGPC_SP_BiasOff 

Bias off step.

kGPC_SP_BandgapPllLdoOff 

Bandgap and PLL_LDO off step.

kGPC_SP_LdoPre 

LDO (Low-Dropout) pre step.

kGPC_SP_DcdcDown 

DCDC down step.

kGPC_SP_DcdcUp 

DCDC up step.

kGPC_SP_LdoPost 

LDO post step.

kGPC_SP_BandgapPllLdoOn 

Bandgap and PLL_LDO on step.

kGPC_SP_BiasOn 

Bias on step.

kGPC_SP_PowerOn 

Power on step.

kGPC_SP_ResetLate 

Reset late step.

kGPC_SP_IsoOff 

ISO off step.

kGPC_SP_PllOn 

PLL on step.

kGPC_SP_RootUp 

Root up step.

kGPC_SP_GroupUp 

Group up step.

kGPC_SP_LpcgOn 

LPCG on step.

kGPC_SP_SsarRestore 

SSAR restore step.

Enumerator
kGPC_RunMode 

Stay in RUN mode.

kGPC_WaitMode 

Transit to WAIT mode.

kGPC_StopMode 

Transit to STOP mode.

kGPC_SuspendMode 

Transit to SUSPEND mode.

Enumerator
kGPC_CM_WakeupSetpoint 

Request SP transition to CPU_SP_WAKEUP (param "setPointWakeup" in gpc_cm_sleep_sp_tran_config_t).

kGPC_CM_RequestPreviousSetpoint 

Request SP transition to the set point when the sleep event happens.

Enumerator
kGPC_STBY_LpcgIn 

LPCG in step.

kGPC_STBY_PllIn 

PLL in step.

kGPC_STBY_BiasIn 

Bias in step.

kGPC_STBY_PldoIn 

PLDO in step.

kGPC_STBY_BandgapIn 

Bandgap in step.

kGPC_STBY_LdoIn 

LDO in step.

kGPC_STBY_DcdcIn 

DCDC in step.

kGPC_STBY_PmicIn 

PMIC in step.

kGPC_STBY_PmicOut 

PMIC out step.

kGPC_STBY_DcdcOut 

DCDC out step.

kGPC_STBY_LdoOut 

LDO out step.

kGPC_STBY_BandgapOut 

Bandgap out step.

kGPC_STBY_PldoOut 

PLDO out step.

kGPC_STBY_BiasOut 

Bias out step.

kGPC_STBY_PllOut 

PLL out step.

kGPC_STBY_LpcgOut 

LPCG out step.

Enumerator
kGPC_CM7Core 

CM7 core.

kGPC_CM4Core 

CM4 core.

Once the clock gate is enabled, the responding part would be powered off and contents are not retained in Partial SLEEP mode.

Enumerator
kGPC_MemoryPowerGateL2Cache 

L2 Cache Power Gate.

kGPC_MemoryPowerGateITCM 

ITCM Power Gate Enable.

kGPC_MemoryPowerGateDTCM 

DTCM Power Gate Enable.

Enumerator
kGPC_PoweredDownFlag 

Power status.

HP domain was powered down for the previous power down request.

Function Documentation

static void GPC_CM_SetNextCpuMode ( GPC_CPU_MODE_CTRL_Type *  base,
gpc_cpu_mode_t  mode 
)
inlinestatic

This function configures the CPU mode that the CPU core will transmit to on next sleep event.

Note
This API must be called each time before entering sleep.
Parameters
baseGPC CPU module base address.
modeThe CPU mode that the core will transmit to, refer to "gpc_cpu_mode_t".
static gpc_cpu_mode_t GPC_CM_GetCurrentCpuMode ( GPC_CPU_MODE_CTRL_Type *  base)
inlinestatic
Parameters
baseGPC CPU module base address.
Returns
The current CPU mode, in type of gpc_cpu_mode_t.
static gpc_cpu_mode_t GPC_CM_GetPreviousCpuMode ( GPC_CPU_MODE_CTRL_Type *  base)
inlinestatic
Parameters
baseGPC CPU module base address.
Returns
The previous CPU mode, in type of gpc_cpu_mode_t.
void GPC_CM_EnableIrqWakeup ( GPC_CPU_MODE_CTRL_Type *  base,
uint32_t  irqId,
bool  enable 
)

This function enables the IRQ request which can wakeup the CPU platform.

Parameters
baseGPC CPU module base address.
irqIdID of the IRQ, accessible range is 0-255.
enableEnable the IRQ request or not.
static void GPC_CM_EnableNonIrqWakeup ( GPC_CPU_MODE_CTRL_Type *  base,
uint32_t  mask,
bool  enable 
)
inlinestatic

This function enables the non-IRQ request which can wakeup the CPU platform.

Parameters
baseGPC CPU module base address.
maskNon-IRQ type, refer to "_gpc_cm_non_irq_wakeup_request".
enableEnable the Non-IRQ request or not.
bool GPC_CM_GetIrqWakeupStatus ( GPC_CPU_MODE_CTRL_Type *  base,
uint32_t  irqId 
)
Parameters
baseGPC CPU module base address.
irqIdID of the IRQ, accessible range is 0-255.
Returns
Indicate the IRQ request is asserted or not.
static bool GPC_CM_GetNonIrqWakeupStatus ( GPC_CPU_MODE_CTRL_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseGPC CPU module base address.
maskNon-IRQ type, refer to "_gpc_cm_non_irq_wakeup_request".
Returns
Indicate the Non-IRQ request is asserted or not.
void GPC_CM_ConfigCpuModeTransitionStep ( GPC_CPU_MODE_CTRL_Type *  base,
gpc_cm_tran_step_t  step,
const gpc_tran_step_config_t config 
)
Note
This function can not config the setpoint sleep/wakeup operation for those operation is controlled by setpoint control. This funcion can not config the standby sleep/wakeup too, because those operation is controlled by standby controlled.
Parameters
baseGPC CPU module base address.
stepstep type, refer to "gpc_cm_tran_step_t".
configtransition step configuration, refer to "gpc_tran_step_config_t".
void GPC_CM_RequestSleepModeSetPointTransition ( GPC_CPU_MODE_CTRL_Type *  base,
uint8_t  setPointSleep,
uint8_t  setPointWakeup,
gpc_cm_wakeup_sp_sel_t  wakeupSel 
)

This function triggers the set point transition during a CPU Sleep/wakeup event and selects which one the CMC want to transfer to.

Parameters
baseGPC CPU module base address.
setPointSleepThe set point CPU want the system to transit to on next CPU platform sleep sequence.
setPointWakeupThe set point CPU want the system to transit to on next CPU platform wakeup sequence.
wakeupSelSelect the set point transition on the next CPU platform wakeup sequence.
void GPC_CM_RequestRunModeSetPointTransition ( GPC_CPU_MODE_CTRL_Type *  base,
uint8_t  setPointRun 
)

This function triggers the set point transition and selects which one the CMC want to transfer to.

Parameters
baseGPC CPU module base address.
setPointRunThe set point CPU want the system to transit in the run mode.
static void GPC_CM_SetSetPointMapping ( GPC_CPU_MODE_CTRL_Type *  base,
uint32_t  setPoint,
uint32_t  setpoint_map 
)
inlinestatic

This function configures which set point is allowed after current set point. If there are multiple setpoints, use:

* setpoint_map = kGPC_SetPoint0 | kGPC_SetPoint1 | ... | kGPC_SetPoint15;
*
Parameters
baseGPC CPU module base address.
setPointSet point index, available range is 0-15.
setpoint_mapMap value of the set point. Refer to "_gpc_setpoint_map".
void GPC_CM_SetCpuModeSetPointMapping ( GPC_CPU_MODE_CTRL_Type *  base,
gpc_cpu_mode_t  mode,
uint32_t  setpoint_map 
)

This function configures which set point is allowed when CPU enters RUN/WAIT/STOP/SUSPEND. If there are multiple setpoints, use:

* setpoint_map = kGPC_SetPoint0 | kGPC_SetPoint1 | ... | kGPC_SetPoint15;
*
Parameters
baseGPC CPU module base address.
modeCPU mode. Refer to "gpc_cpu_mode_t".
setpoint_mapMap value of the set point. Refer to "_gpc_setpoint_map".
void GPC_CM_RequestStandbyMode ( GPC_CPU_MODE_CTRL_Type *  base,
const gpc_cpu_mode_t  mode 
)
Parameters
baseGPC CPU module base address.
modeCPU mode. Refer to "gpc_cpu_mode_t".
void GPC_CM_ClearStandbyModeRequest ( GPC_CPU_MODE_CTRL_Type *  base,
const gpc_cpu_mode_t  mode 
)
Parameters
baseGPC CPU module base address.
modeCPU mode. Refer to "gpc_cpu_mode_t".
static bool GPC_CM_GetStandbyModeStatus ( GPC_CPU_MODE_CTRL_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseGPC CPU module base address.
maskStandby mode transition status mask, refer to "gpc_cm_standby_mode_status_t".
Returns
Indicate the CPU's standby transition status.
static uint32_t GPC_CM_GetInterruptStatusFlags ( GPC_CPU_MODE_CTRL_Type *  base)
inlinestatic
Parameters
baseGPC CPU module base address.
Returns
The OR'ed value of status flags.
void GPC_CM_ClearInterruptStatusFlags ( GPC_CPU_MODE_CTRL_Type *  base,
uint32_t  mask 
)
Parameters
baseGPC CPU module base address.
maskThe interrupt status flags to be cleared. Should be the OR'ed value of _gpc_cm_interrupt_status_flag.
static void GPC_SP_SetSetpointPriority ( GPC_SET_POINT_CTRL_Type *  base,
uint32_t  setPoint,
uint32_t  priority 
)
inlinestatic

This function will configure the priority of the set point. If the result of API GPC_SP_GetAllowedSetPointMap() has more than one valid bit, high priority set point will be taken.

Parameters
baseGPC Setpoint controller base address.
setPointSet point index, available range is 0-15.
priorityPriority level, available range is 0-15.
void GPC_SP_ConfigSetPointTransitionStep ( GPC_SET_POINT_CTRL_Type *  base,
gpc_sp_tran_step_t  step,
const gpc_tran_step_config_t config 
)
Parameters
baseGPC Setpoint controller base address.
stepstep type, refer to "gpc_sp_tran_step_t".
configtransition step configuration, refer to "gpc_tran_step_config_t".
static uint8_t GPC_SP_GetCurrentSetPoint ( GPC_SET_POINT_CTRL_Type *  base)
inlinestatic
Parameters
baseGPC Setpoint controller base address.
Returns
The current setpoint number, range from 0 to 15.
static uint8_t GPC_SP_GetPreviousSetPoint ( GPC_SET_POINT_CTRL_Type *  base)
inlinestatic
Parameters
baseGPC Setpoint controller base address.
Returns
The previous setpoint number, range from 0 to 15.
static uint8_t GPC_SP_GetTargetSetPoint ( GPC_SET_POINT_CTRL_Type *  base)
inlinestatic
Parameters
baseGPC Setpoint controller base address.
Returns
The target setpoint number, range from 0 to 15.
void GPC_STBY_ConfigStandbyTransitionStep ( GPC_STBY_CTRL_Type *  base,
gpc_stby_tran_step_t  step,
const gpc_tran_step_config_t config 
)
Parameters
baseGPC standby controller base address.
stepstep type, refer to "gpc_stby_tran_step_t".
configtransition step configuration, refer to "gpc_tran_step_config_t".
static void GPC_STBY_ForceCoreRequestStandbyMode ( GPC_STBY_CTRL_Type *  base,
gpc_cpu_domain_name_t  cpuName 
)
inlinestatic
Parameters
baseGPC standby controller base address.
cpuNameThe CPU name, refer to gpc_cpu_domain_name_t.
static void GPC_EnableMemoryGate ( GPC_Type *  base,
uint32_t  modules,
bool  enable 
)
inlinestatic
Parameters
baseGPC peripheral base address.
modulesMask value for Modules to be operated, see to _gpc_memory_power_gate.
enableEnable the power or not.
void GPC_EnablePartialSleepWakeupSource ( GPC_Type *  base,
gpc_wakeup_source_t  source,
bool  enable 
)

In PSLEEP mode, HP domain is powered down, while LP domain remains powered on so peripherals in LP domain can wakeup the system from PSLEEP mode via interrupts. In PSLEEP mode, system clocks are stopped and peripheral clocks of LP domain can be optionally on. LP domain peripherals can generate interrupt either asynchronously or need its peripheral clock on, depending on what kind of wakeup event is expected. Refer to the corresponding module description about what kind of interrupts are supported by the module.

Parameters
baseGPC peripheral base address.
sourceWakeup source for responding module, see to gpc_wakeup_source_t.
enableEnable the wakeup source or not.
bool GPC_GetPartialSleepWakeupFlag ( GPC_Type *  base,
gpc_wakeup_source_t  source 
)

This function returns if the responding wakeup module just caused the MCU to exit PSLEEP mode. In hardware level, the flags of wakeup source are read only and will be cleared by cleaning the interrupt status of the corresponding wakeup module.

Parameters
baseGPC peripheral base address.
sourceWakeup source for responding module, see to gpc_wakeup_source_t.
Return values
true- Indicated wakeup flag is asserted.
false- Indicated wakeup flag is not asserted.
static void GPC_EnablePartialSleepMode ( GPC_Type *  base,
bool  enable 
)
inlinestatic

This function controls if the system will enter Partial SLEEP mode or remain in STOP mode.

Parameters
baseGPC peripheral base address.
enableEnable the gate or not.
static void GPC_ConfigPowerUpSequence ( GPC_Type *  base,
uint32_t  sw,
uint32_t  sw2iso 
)
inlinestatic

There will be two steps for power up sequence:

  • After a power up request, GPC waits for a number of IP BUS clocks equal to the value of SW before turning on the power of HP domain. SW must not be programmed to zero.
  • After GPC turnning on the power of HP domain, it waits for a number of IP BUS clocks equal to the value of SW2ISO before disable the isolation of HP domain. SW2ISO must not be programmed to zero.
Parameters
baseGPC peripheral base address.
swCount of IP BUS clocks before disabling the isolation of HP domain.
sw2isoCount of IP BUS clocks before turning on the power of HP domain.
static void GPC_ConfigPowerDownSequence ( GPC_Type *  base,
uint32_t  iso,
uint32_t  iso2w 
)
inlinestatic

There will be two steps for power down sequence:

  • After a power down request, the GPC waits for a number of IP BUS clocks equal to the value of ISO before it enables the isolation of HP domain. ISO must not be programmed to zero.
  • After HP domain is isolated, GPC waits for a number of IPG BUS clocks equal to the value of ISO2SW before it turning off the power of HP domain. ISO2SW must not be programmed to zero.
Parameters
baseGPC peripheral base address.
isoCount of IP BUS clocks before it enables the isolation of HP domain.
iso2wCount of IP BUS clocks before it turning off the power of HP domain.
static uint32_t GPC_GetStatusFlags ( GPC_Type *  base)
inlinestatic
Parameters
baseGPC peripheral base address.
Returns
Mask value of flags, see to _gpc_status_flags.
static void GPC_ClearStatusFlags ( GPC_Type *  base,
uint32_t  flags 
)
inlinestatic
Parameters
baseGPC peripheral base address.
flagsMask value of flags to be cleared, see to _gpc_status_flags.