## HAL Power Modes Data Structures Type Documentation

### RetentionRegCfg_t

Location: power_modes.h:287

Sleep Mode retention regulator configuration.

A structure that is used within the LowPowerModeCfg_t configuration structure to set the power retention regulator settings (i.e trimming values) desired for the application when using Sleep Mode.

Data Fields

Type | Name | Description
--- | --- | ---
uint8_t | vddm_ret_trim | VDDM retention trimming value; use VDDM_RETENTION_TRIM_[MINIMUM | TYPICAL | MAXIMUM].
uint8_t | vddt_ret | VDDT baseband timer regulator retention; use VDDT_RETENTION_[ENABLE | DISABLE].
uint8_t | vddacs_ret_trim | VDDACS retention trimming value; use VDDACS_RETENTION_TRIM_[MINIMUM | TYPICAL | MAXIMUM].
uint8_t | vddc_ret_trim | VDDC retention trimming value; use VDDC_RETENTION_TRIM_[MINIMUM | TYPICAL | MAXIMUM].
uint8_t | vddc_ret_en | VDDC core digital regulator retention; use VDDC_RETENTION_[ENABLE | DISABLE].

### StandbyTrimCfg_t

Location: power_modes.h:308

Standby Mode retention regulator configuration.

A structure that is used within the LowPowerModeCfg_t configuration structure to set the regulator settings (i.e. trimming values) desired for the application when using Standby Mode.

Data Fields

Type | Name | Description
--- | --- | ---
uint8_t | vddc_standby_trim | VDDC standby trimming value; use 0x00 to 0x3F.
uint8_t | vddm_standby_trim | VDDM standby trimming value; use 0x00 to 0x3F.

### ClockCfg_t

Location: power_modes.h:319

Run Mode clock configuration.

A structure that is used to set the clock frequencies for the system to use while in Run Mode.

Data Fields

Type | Name | Description
--- | --- | ---
uint32_t | systemclk_freq | System clock frequency value.
uint32_t | uartclk_freq | UART clock frequency derived from system clock.
uint32_t | sensorclk_freq | Sensor clock frequency value.
uint32_t | userclk_freq | User clock frequency.

### LowPowerModeCfg_t

Location: power_modes.h:360

Power Mode configuration.

A structure that is used to set the desired configuration for entering and exiting a low-power mode. Includes the following: => Wakeup sources as set in the ACS_WAKEUP_CFG register. => Boot configuration as set in the ACS_BOOT_CFG register. BOOT_CUSTOM should only used in Sleep Mode with memory retention. => The Bluetooth present flag that indicates if the application is using the Bluetooth Low-Energy stack. => The DMA channel to use when entering/exiting a low-power mode. Only used if Sleep or Standby Mode is used with the Bluetooth present flag is set. => Power Mode that the system should enter when called upon. See PowerMode_t for details on available modes. => Retention type that should be used if entering Sleep Mode. => Clock configuration used to reconfigure the clocks after wake up. => Power retention regulator configuration used to update the ACS_VDDRET_CTRL register trim values. Only used in Sleep Mode. => Configuration used to update the standby voltage trim trim in the ACS_VDDM_CTRL and ACS_VDDC_CTRL registers. Only used in Standby Mode. => Pointers to user-defined functions that are used to save and restore the configuration for the peripherals (e.g. GPIO, LSAD, GPIO interrupts) used by the application. => A pointer to a user-defined function that the system will resume execution after waking up. Only used in Sleep Mode with memory retention.

Data Fields

Type | Name | Description
--- | --- | ---
uint32_t | wakeup_cfg | Use any combination of WAKEUP_DELAY_[1 | 2 | 4 | ... | 128], WAKEUP_DCDC_OVERLOAD_[ENABLE | DISABLE], WAKEUP_GPIO*_[RISING | FALLING], WAKEUP_GPIO*_[ENABLE | DISABLE], WAKEUP_FIFO_[ENABLE | DISABLE], WAKEUP_RTC_OVERFLOW_[ENABLE | DISABLE].
uint32_t | boot_cfg | Use BOOT_CUSTOM, BOOT_FLASH_XTAL_DISABLE, BOOT_FLASH_XTAL_DEFAULT_TRIM, BOOT_FLASH_XTAL_CUSTOM_TRIM.
bool | ble_present_flag | Indicate if Bluetooth stack is present.
uint8_t | dma_channel_rf | Use a value from 0 to 3.
PowerMode_t | power_mode | Use RUN_MODE, IDLE_MODE, STANDBY_MODE, SLEEP_MODE.
RetentionType_t | retention_type | Use NO_RETENTION, MEMORY_RETENTION, CORE_RETENTION.
ClockCfg_t | clock_cfg | Clock configuration.
RetentionRegCfg_t | vddret_ctrl | Sleep retention regulator configuration.
StandbyTrimCfg_t | standby_trim | Standby trim configuration.
AppPeripheralFunc_t | p_save_peripherals | Pointer to save configuration function.
AppPeripheralFunc_t | p_restore_peripherals | Pointer to reconfiguration function.
AppResumeAddress_t | p_app_resume | Function pointer to resume address.