MCUXpresso SDK API Reference Manual: GPC: General Power Controller Driver

| MCUXpresso SDK API Reference Manual Rev 2.11.1 NXP Semiconductors

- Main Page
- Related Pages
- API Reference

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Macros | Enumerations | Functions
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 STOP modes, and power up/down operations for various peripherals.

## Macros
#define | GPC_PCG_TIME_SLOT_TOTAL_NUMBER GPC_SLT_CFG_PU_COUNT
| Total number of the timeslot.

## Enumerations
enum | _gpc_lpm_mode { kGPC_RunMode = 0U, kGPC_WaitMode = 1U, kGPC_StopMode = 2U }
| GPC LPM mode definition. More...
enum | _gpc_pgc_ack_sel { kGPC_DummyPGCPowerUpAck = GPC_PGC_ACK_SEL_DUMMY_PGC_PUP_ACK_MASK, kGPC_VirtualPGCPowerUpAck = GPC_PGC_ACK_SEL_VIRTUAL_PGC_PUP_ACK_MASK, kGPC_DummyPGCPowerDownAck = GPC_PGC_ACK_SEL_DUMMY_PGC_PDN_ACK_MASK, kGPC_VirtualPGCPowerDownAck = GPC_PGC_ACK_SEL_VIRTUAL_PGC_PDN_ACK_MASK, kGPC_NocPGCPowerUpAck = GPC_PGC_ACK_SEL_NOC_PGC_PUP_ACK, kGPC_NocPGCPowerDownAck = GPC_PGC_ACK_SEL_NOC_PGC_PDN_ACK }
| PGC ack signal selection. More...
enum | _gpc_standby_count { kGPC_StandbyCounter4CkilClk = 0U, kGPC_StandbyCounter8CkilClk = 1U, kGPC_StandbyCounter16CkilClk = 2U, kGPC_StandbyCounter32CkilClk = 3U, kGPC_StandbyCounter64CkilClk = 4U, kGPC_StandbyCounter128CkilClk = 5U, kGPC_StandbyCounter256CkilClk = 6U, kGPC_StandbyCounter512CkilClk = 7U }
| Standby counter which GPC will wait between PMIC_STBY_REQ negation and assertion of PMIC_READY. More...

## Functions
static void | GPC_AllowIRQs (GPC_Type *base)
| Allow all the IRQ/Events within the charge of GPC. More...
static void | GPC_DisallowIRQs (GPC_Type *base)
| Disallow all the IRQ/Events within the charge of GPC. More...
static uint32_t | GPC_GetLpmMode (GPC_Type *base)
| Get current LPM mode. More...
void | GPC_EnableIRQ (GPC_Type *base, uint32_t irqId)
| Enable the IRQ. More...
void | GPC_DisableIRQ (GPC_Type *base, uint32_t irqId)
| Disable the IRQ. More...
bool | GPC_GetIRQStatusFlag (GPC_Type *base, uint32_t irqId)
| Get the IRQ/Event flag. More...
static void | GPC_DsmTriggerMask (GPC_Type *base, bool enable)
| Mask the DSM trigger. More...
static void | GPC_WFIMask (GPC_Type *base, bool enable)
| Mask the WFI. More...
static void | GPC_SelectPGCAckSignal (GPC_Type *base, uint32_t mask)
| Select the PGC ACK signal. More...
static void | GPC_PowerDownRequestMask (GPC_Type *base, bool enable)
| Power down request to virtual PGC mask or not. More...
static void | GPC_PGCMapping (GPC_Type *base, uint32_t mask)
| PGC CPU Mapping. More...
static void | GPC_TimeSlotConfigureForPUS (GPC_Type *base, uint8_t slotIndex, uint32_t value)
| Time slot configure. More...
void | GPC_EnterWaitMode (GPC_Type *base, gpc_lpm_config_t *config)
| Enter WAIT mode. More...
void | GPC_EnterStopMode (GPC_Type *base, gpc_lpm_config_t *config)
| Enter STOP mode. More...
void | GPC_Init (GPC_Type *base, uint32_t powerUpSlot, uint32_t powerDownSlot)
| GPC init function. More...

## Driver version
#define | FSL_GPC_DRIVER_VERSION (MAKE_VERSION(2, 2, 0))
| GPC driver version 2.2.0. More...

## Macro Definition Documentation

#define FSL_GPC_DRIVER_VERSION (MAKE_VERSION(2, 2, 0))

## Enumeration Type Documentation

enum _gpc_lpm_mode

Enumerator
kGPC_RunMode | run mode
kGPC_WaitMode | wait mode
kGPC_StopMode | stop mode

enum _gpc_pgc_ack_sel

Enumerator
kGPC_DummyPGCPowerUpAck | dummy power up ack signal
kGPC_VirtualPGCPowerUpAck | virtual pgc power up ack signal
kGPC_DummyPGCPowerDownAck | dummy power down ack signal
kGPC_VirtualPGCPowerDownAck | virtual pgc power down ack signal
kGPC_NocPGCPowerUpAck | NOC power up ack signal.
kGPC_NocPGCPowerDownAck | NOC power.

enum _gpc_standby_count

Enumerator
kGPC_StandbyCounter4CkilClk | 4 ckil clocks
kGPC_StandbyCounter8CkilClk | 8 ckil clocks
kGPC_StandbyCounter16CkilClk | 16 ckil clocks
kGPC_StandbyCounter32CkilClk | 32 ckil clocks
kGPC_StandbyCounter64CkilClk | 64 ckil clocks
kGPC_StandbyCounter128CkilClk | 128 ckil clocks
kGPC_StandbyCounter256CkilClk | 256 ckil clocks
kGPC_StandbyCounter512CkilClk | 512 ckil clocks

## Function Documentation

static void GPC_AllowIRQs | ( | GPC_Type * | base | ) |
| inlinestatic

Parameters

  base | GPC peripheral base address.

static void GPC_DisallowIRQs | ( | GPC_Type * | base | ) |
| inlinestatic

Parameters

  base | GPC peripheral base address.

static uint32_t GPC_GetLpmMode | ( | GPC_Type * | base | ) |
| inlinestatic

Parameters

  base | GPC peripheral base address.

Return values

  lpm | mode, reference _gpc_lpm_mode

void GPC_EnableIRQ | ( | GPC_Type * | base,
|  | uint32_t | irqId
| ) |  |

Parameters

  base | GPC peripheral base address.
  irqId | ID number of IRQ to be enabled, available range is 0-127,reference SOC headerfile IRQn_Type.

void GPC_DisableIRQ | ( | GPC_Type * | base,
|  | uint32_t | irqId
| ) |  |

Parameters

  base | GPC peripheral base address.
  irqId | ID number of IRQ to be disabled, available range is 0-127,reference SOC headerfile IRQn_Type.

bool GPC_GetIRQStatusFlag | ( | GPC_Type * | base,
|  | uint32_t | irqId
| ) |  |

Parameters

  base | GPC peripheral base address.
  irqId | ID number of IRQ to be enabled, available range is 0-127,reference SOC headerfile IRQn_Type.

Returns
  Indicated IRQ/Event is asserted or not.

static void GPC_DsmTriggerMask | ( | GPC_Type * | base,
|  | bool | enable
| ) |  |
| inlinestatic

Parameters

  base | GPC peripheral base address.
  enable | true to enable mask, false to disable mask.

static void GPC_WFIMask | ( | GPC_Type * | base,
|  | bool | enable
| ) |  |
| inlinestatic

Parameters

  base | GPC peripheral base address.
  enable | true to enable mask, false to disable mask.

static void GPC_SelectPGCAckSignal | ( | GPC_Type * | base,
|  | uint32_t | mask
| ) |  |
| inlinestatic

Parameters

  base | GPC peripheral base address.
  mask | reference _gpc_pgc_ack_sel.

static void GPC_PowerDownRequestMask | ( | GPC_Type * | base,
|  | bool | enable
| ) |  |
| inlinestatic

Parameters

  base | GPC peripheral base address.
  enable | true to mask, false to not mask.

static void GPC_PGCMapping | ( | GPC_Type * | base,
|  | uint32_t | mask
| ) |  |
| inlinestatic

Parameters

  base | GPC peripheral base address.
  mask | mask value reference PGC CPU mapping definition.

static void GPC_TimeSlotConfigureForPUS | ( | GPC_Type * | base,
|  | uint8_t | slotIndex,
|  | uint32_t | value
| ) |  |
| inlinestatic

Parameters

  base | GPC peripheral base address.
  slotIndex | time slot index.
  value | value to be configured

void GPC_EnterWaitMode | ( | GPC_Type * | base,
|  | gpc_lpm_config_t * | config
| ) |  |

Parameters

  base | GPC peripheral base address.
  config | lpm mode configurations.

void GPC_EnterStopMode | ( | GPC_Type * | base,
|  | gpc_lpm_config_t * | config
| ) |  |

Parameters

  base | GPC peripheral base address.
  config | lpm mode configurations.

void GPC_Init | ( | GPC_Type * | base,
|  | uint32_t | powerUpSlot,
|  | uint32_t | powerDownSlot
| ) |  |

Parameters

  base | GPC peripheral base address.
  powerUpSlot | power up slot number.
  powerDownSlot | power down slot number.