S32 SDK
Power Management Controller (PMC)

Detailed Description

This module covers the functionality of the Power Management Controller (PMC) peripheral.

PMC HAL provides the API for reading and writing register bit-fields belonging to the PMC module.

Data Structures

struct  pmc_lpo_clock_config_t
 PMC LPO configuration. More...
 
struct  pmc_config_t
 PMC configure structure. More...
 

Enumerations

enum  pmc_int_select_t { PMC_INT_LOW_VOLT_DETECT, PMC_INT_LOW_VOLT_WARN }
 Power management control interrupts Implements pmc_int_select_t_Class. More...
 

Power Management Controller Control APIs

void PMC_HAL_SetLowVoltIntCmd (PMC_Type *const baseAddr, const pmc_int_select_t intSelect, const bool enable)
 Enables/Disables the low voltage-related interrupts. More...
 
void PMC_HAL_SetLowVoltIntAckCmd (PMC_Type *const baseAddr, const pmc_int_select_t intSelect)
 Acknowledges the low voltage-related interrupts. More...
 
bool PMC_HAL_GetLowVoltIntFlag (const PMC_Type *const baseAddr, const pmc_int_select_t intSelect)
 Gets the flag for the low voltage-related interrupts. More...
 
static void PMC_HAL_SetLowVoltDetectResetCmd (PMC_Type *const baseAddr, const bool enable)
 Low-Voltage Detect Hardware Reset Enable/Disable (write once) More...
 
static void PMC_HAL_SetBiasMode (PMC_Type *const baseAddr, const bool enable)
 Enables/Disables the Bias. More...
 
static void PMC_HAL_SetLpoMode (PMC_Type *const baseAddr, const bool enable)
 Enables/Disables the Low Power Oscillator. More...
 
static bool PMC_HAL_GetLpoMode (const PMC_Type *const baseAddr)
 Gets the Low Power Oscillator status. More...
 
static uint8_t PMC_HAL_GetRegulatorStatus (const PMC_Type *const baseAddr)
 Gets the Regulator regulation status. More...
 
static uint8_t PMC_HAL_GetLpoStatus (const PMC_Type *const baseAddr)
 Gets the Low Power Oscillator status. More...
 
static void PMC_HAL_SetLpoTrimValue (PMC_Type *const baseAddr, const int8_t decimalValue)
 Low Power Oscillator Trimming Value. More...
 

Enumeration Type Documentation

Power management control interrupts Implements pmc_int_select_t_Class.

Enumerator
PMC_INT_LOW_VOLT_DETECT 

Low Voltage Detect Interrupt

PMC_INT_LOW_VOLT_WARN 

Low Voltage Warning Interrupt

Definition at line 52 of file pmc_hal.h.

Function Documentation

bool PMC_HAL_GetLowVoltIntFlag ( const PMC_Type *const  baseAddr,
const pmc_int_select_t  intSelect 
)

Gets the flag for the low voltage-related interrupts.

This function gets the flag for the low voltage detection, warning, etc. interrupts

Parameters
[in]baseAddrBase address for current PMC instance.
[in]intSelectinterrupt select
Returns
status Current low voltage interrupt flag
  • true: Low-Voltage Interrupt flag is set
  • false: Low-Voltage Interrupt flag is not set

Definition at line 117 of file pmc_hal.c.

static bool PMC_HAL_GetLpoMode ( const PMC_Type *const  baseAddr)
inlinestatic

Gets the Low Power Oscillator status.

This function gets the Low Power Oscillator status.

Parameters
[in]baseAddrBase address for current PMC instance.
Returns
value LPO status false - LPO is disabled true - LPO is enabled Implements PMC_HAL_GetLpoMode_Activity

Definition at line 199 of file pmc_hal.h.

static uint8_t PMC_HAL_GetLpoStatus ( const PMC_Type *const  baseAddr)
inlinestatic

Gets the Low Power Oscillator status.

This function provides the current status of the Low Power Oscillator.

Parameters
[in]baseAddrBase address for current PMC instance.
Returns
value LPO status 0 - Low power oscillator in low phase. 1 - Low power oscillator in high phase. Implements PMC_HAL_GetLpoStatus_Activity

Definition at line 238 of file pmc_hal.h.

static uint8_t PMC_HAL_GetRegulatorStatus ( const PMC_Type *const  baseAddr)
inlinestatic

Gets the Regulator regulation status.

This function provides the current status of the internal voltage regulator.

Parameters
[in]baseAddrBase address for current PMC instance.
Returns
value Regulation status 0 - Regulator is in low power mode or transition to/from. 1 - Regulator is in full performance mode. Implements PMC_HAL_GetRegulatorStatus_Activity

Definition at line 219 of file pmc_hal.h.

static void PMC_HAL_SetBiasMode ( PMC_Type *const  baseAddr,
const bool  enable 
)
inlinestatic

Enables/Disables the Bias.

This function enables/disables the Bias.

Parameters
[in]baseAddrBase address for current PMC instance.
[in]enableenable/disable the Bias. Implements PMC_HAL_SetBiasMode_Activity

Definition at line 162 of file pmc_hal.h.

static void PMC_HAL_SetLowVoltDetectResetCmd ( PMC_Type *const  baseAddr,
const bool  enable 
)
inlinestatic

Low-Voltage Detect Hardware Reset Enable/Disable (write once)

This function enables/disables the hardware reset for the low voltage detection. When enabled, if the LVDF (Low Voltage Detect Flag) is set, a hardware reset occurs. This setting is a write-once-only. Any additional writes are ignored.

Parameters
[in]baseAddrBase address for current PMC instance.
[in]enableenable/disable the LVD hardware reset Implements PMC_HAL_SetLowVoltDetectResetCmd_Activity

Definition at line 144 of file pmc_hal.h.

void PMC_HAL_SetLowVoltIntAckCmd ( PMC_Type *const  baseAddr,
const pmc_int_select_t  intSelect 
)

Acknowledges the low voltage-related interrupts.

This function acknowledges the low voltage detection, warning, etc. interrupts

Parameters
[in]baseAddrBase address for current PMC instance.
[in]intSelectinterrupt select

Definition at line 84 of file pmc_hal.c.

void PMC_HAL_SetLowVoltIntCmd ( PMC_Type *const  baseAddr,
const pmc_int_select_t  intSelect,
const bool  enable 
)

Enables/Disables the low voltage-related interrupts.

This function enables the low voltage detection, warning, etc. interrupts.

Parameters
[in]baseAddrBase address for current PMC instance.
[in]intSelectinterrupt select
[in]enableenable/disable the interrupt

Definition at line 50 of file pmc_hal.c.

static void PMC_HAL_SetLpoMode ( PMC_Type *const  baseAddr,
const bool  enable 
)
inlinestatic

Enables/Disables the Low Power Oscillator.

This function enables/disables the Low Power Oscillator.

Parameters
[in]baseAddrBase address for current PMC instance.
[in]enableenable/disable the Low Power Oscillator. Implements PMC_HAL_SetLpoMode_Activity

Definition at line 179 of file pmc_hal.h.

static void PMC_HAL_SetLpoTrimValue ( PMC_Type *const  baseAddr,
const int8_t  decimalValue 
)
inlinestatic

Low Power Oscillator Trimming Value.

This function sets the trimming value for the low power oscillator

Parameters
[in]baseAddrBase address for current PMC instance.
[in]valueTrimming value Implements PMC_HAL_SetLpoTrimValue_Activity

Definition at line 254 of file pmc_hal.h.