PM APIs

[中文]

Important

The PM API v1.0 is the lastest stable PM APIs.

PM Interface

The BK PM Driver supports following logical PM interfaces:

  • BK enter different sleep mode interface

  • BK clock control interface

  • BK power control interface

PM API Categories

Most of PM APIs can be categoried as:

  • Common APIs The common APIs are frequently-used.

  • Specific APIs. The specific APIs are used in specific configuration.

Common PM APIs:
Specific APIs:

Programing Principle

Important

Here is some general principle for pm API users:
  • Enter deep sleep and low voltage ,it only need call the “Common PM APIs”,if you want to call the Specific APIs,please contact us in case of make issue.

  • Use BK_ERR_CHECK to check the return value of the pm API

  • If you are not sure how to use pm APIs, study the pm used guide example code first.

  • If you are not sure how to initialize some fields of config struct, use the default configuration macro to use the config first and then set application specific fields

User Development Model

pm interface detail

API Reference

Header File

Functions

bk_err_t bk_pm_module_lv_sleep_state_clear(pm_dev_id_e module)

clear the lv sleep state

clear the lv sleep state

Attention

  • This API is used to clear the lv sleep state

Parameters

-module:module – name

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_module_lv_sleep_state_set()

set the lv sleep state

set the lv sleep state

Attention

  • This API is used to set the lv sleep state

Parameters

-void

Returns

  • BK_OK: succeed

  • others: other errors.

uint64_t bk_pm_module_lv_sleep_state_get(pm_dev_id_e module)

get the lv sleep state

get the lv sleep state

Attention

  • This API is used to get the lv sleep state

Parameters

-module:module – name

Returns

  • module_lv_sleep_state

pm_wakeup_source_e bk_pm_deep_sleep_wakeup_source_get()

get wakeup source from deepsleep

get wakeup source from deepsleep

Attention

  • This API is used to get wakeup source from deepsleep

Parameters

-void

Returns

  • wakeup source(0x0:WAKEUP SOURCE OF GPIO;0x1:WAKEUP SOURCE OF RTC;0x2:WAKEUP SOURCE OF WIFI OR BT;0x4:WAKEUP SOURCE OF TOUCHED;0x5:NONE WAKEUP_SOURCE)

bk_err_t bk_pm_exit_low_vol_wakeup_source_clear()

clear wakeup source of exiting low voltage process

clear wakeup source of exit low voltage

Attention

  • This API is used to clear wakeup source of exiting low voltage process

Parameters

-void

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_exit_low_vol_wakeup_source_set()

set and save wakeup source of exiting low voltage

set and save wakeup source of exiting low voltage

Attention

  • This API is used to set and save wakeup source of exiting low voltage

Parameters

-0x0:close – cp1 auto power down feature ;0x1:open cp1 auto power down feature

Returns

  • BK_OK: succeed

  • others: other errors.

pm_wakeup_source_e bk_pm_exit_low_vol_wakeup_source_get()

get wakeup source of exiting low voltage

get wakeup source of exiting low voltage

Attention

  • This API is used to get wakeup source of exiting low voltage

Parameters

-void

Returns

  • wakeup source(0x0:WAKEUP SOURCE OF GPIO;0x1:WAKEUP SOURCE OF RTC;0x2:WAKEUP SOURCE OF WIFI OR BT;0x4:WAKEUP SOURCE OF TOUCHED;0x5:NONE WAKEUP_SOURCE)

pm_mem_auto_ctrl_e bk_pm_mem_auto_power_down_state_get()

get memory auto power down flag

get memory auto power down flag

Attention

  • This API is used to get memory auto power down flag

Parameters

-void

Returns

  • memory auto power down flag(PM_MEM_AUTO_CTRL_DISABLE:disable memory auto power down feature ;PM_MEM_AUTO_CTRL_ENABLE:enable memory auto power down feature)

bk_err_t bk_pm_mem_auto_power_down_state_set(pm_mem_auto_ctrl_e value)

memory auto power down flag set

set memory auto power down flag

Attention

  • This API is used to set memory auto power down flag

Parameters

-PM_MEM_AUTO_CTRL_DISABLE:disable – memory auto power down feature ;PM_MEM_AUTO_CTRL_ENABLE:enable memory auto power down feature

Returns

  • BK_OK: succeed

  • others: other errors.

uint32_t bk_pm_cp1_auto_power_down_state_get()

get cp1 auto power down flag

get cp1 auto power down flag

Attention

  • This API is used to get cp1 auto power down flag

Parameters

-void

Returns

  • cp1 auto power down flag(0x0:close cp1 auto power down feature ;0x1:open cp1 auto power down feature)

bk_err_t bk_pm_cp1_auto_power_down_state_set(uint32_t value)

cp1 auto power down flag set

set cp1 auto power down flag

Attention

  • This API is used to set cp1 auto power down flag

Parameters

-0x0:close – cp1 auto power down feature ;0x1:open cp1 auto power down feature

Returns

  • BK_OK: succeed

  • others: other errors.

uint32_t bk_pm_cp1_boot_flag_get()

get cpu1 boot flag

get cpu1 boot flag(ready or not ready)

Attention

  • This API is used to get cpu1 boot flag(ready or not ready)

Parameters

-void

Returns

  • the flag of cpu1 boot flag (0x0:cpu1 not boot ready;0x1:cpu1 boot ready)

bk_err_t bk_pm_rosc_calibration(pm_rosc_cali_mode_e rosc_cali_mode, uint32_t cali_interval)

rosc calibration

rosc calibration

Attention

  • This API is used to calibrate rosc

Parameters

-rosc_cali_mode:0x1:rosc – calibrate manual; 0x0:rosc calibrate auto -cali_interval: 0x0:0.25s;0x1:0.5s;0x2:0.75s;0x3:1.0s;0x4:1.25s;0x5:1.5s;0x6:1.75s;0x7:2s;

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_external_ldo_ctrl(uint32_t value)

using the gpio to control the external ldo

control the external ldo

Attention

  • This API is used to use the specific gpio(define in GPIO_CTRL_LDO_OUTPUT_HIGH_MAP or GPIO_CTRL_LDO_OUTPUT_LOW_MAP in gpio_map.h) control the external ldo

Parameters

-value:0x1:output – high; 0x0:output low

Returns

  • BK_OK: succeed

  • others: other errors.

uint32_t bk_pm_phy_cali_state_get()

get the state of phy calibration

get the state of phy calibration

Attention

  • This API is used to get the state of phy calibration

Parameters

-void

Returns

  • the state of phy calibration(0x1:have calibration;0x0:not calibration)

bool bk_pm_phy_reinit_flag_get()

get the flag of phy reinit part1

get the flag of phy reinit part1

Attention

  • This API is used to get the flag of phy reinit part1

Parameters

-void

Returns

  • the flag of phy reinit part1 (True:have part1;false:not do it)

void bk_pm_phy_reinit_flag_clear()

clear the flag of phy reinit part1

clear the flag of phy reinit part1

Attention

  • This API is used to clear the flag of phy reinit part1

Parameters

-void

Returns

-void

uint32_t bk_pm_wakeup_from_lowvol_consume_time_get()

get the consume time from lowvol wakeup

the consume time from lowvol wakeup

Attention

  • This API is used to get the consume time from lowvol wakeup

Parameters

-void

Returns

  • the consume time of wakeup from lowvol

bk_err_t bk_pm_sleep_register_cb(pm_sleep_mode_e sleep_mode, pm_dev_id_e dev_id, pm_cb_conf_t *enter_config, pm_cb_conf_t *exit_config)

register sleep mode(low voltage and deepsleep) config

register sleep config(include callback function and parameter)

Attention

  • This API is used to register low voltage and deepsleep config

Parameters

-sleep_mode:low – voltage or deepsleep mode -dev_id:dev id -enter_config:enter sleep config -exit_config:exit sleep config

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_sleep_unregister_cb(pm_sleep_mode_e sleep_mode, pm_dev_id_e dev_id, bool enter_cb, bool exit_cb)

unregister sleep mode(low voltage and deepsleep) config

unregister sleep config(include callback function and parameter)

Attention

  • This API is used to unregister low voltage and deepsleep config

Parameters

-sleep_mode:low – voltage or deepsleep mode -dev_id:dev id -enter_cb:whether unregister the enter call back -exit_cb:whether unregister the exit call back

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_light_sleep_register_cb(pm_cb_conf_t *enter_config, pm_cb_conf_t *exit_config)

register light sleep config

register light sleep config(include callback function and parameter)

Attention

  • This API is used to register light sleep config

Parameters

-enter_config:enter – light sleep config -exit_config:exit light sleep config

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_light_sleep_unregister_cb(bool enter_cb, bool exit_cb)

unregister light sleep callback

unregister light sleep callback(enter light sleep callback and exit light sleep callback)

Attention

  • This API is used to unregister light sleep callback

Parameters

-enter_cb:whether – unregister the enter call back -exit_cb:whether unregister the exit call back

Returns

  • BK_OK: succeed

  • others: other errors.

int32 bk_pm_module_power_state_get(pm_power_module_name_e module)

get power domain of module state

get the power domain state

Attention

  • This API is used to get the power domain state

Parameters

-module:module – name

Returns

-the state of power domain state

pm_cpu_freq_e bk_pm_module_current_cpu_freq_get(pm_dev_id_e module)

get the cpu frequency of the module vote

get the module voting cpu frequency

Attention

  • This API is used to get the module voting cpu frequency

Parameters

-module:module – id

Returns

  • the cpu frequency of the module vote

pm_cpu_freq_e bk_pm_current_max_cpu_freq_get()

get the current max and used cpu frequency

select the cpu frequency

Attention

  • This API is used to get the current max and used cpu frequency

Parameters

-void

Returns

  • get the current max and used cpu frequency

bk_err_t bk_pm_module_vote_cpu_freq(pm_dev_id_e module, pm_cpu_freq_e cpu_freq)

vote cpu frequency

select the cpu frequency

Attention

  • This API is used to vote ,then select the cpu frequency

Parameters

-module:module – id;cpu_freq:cpu frequency(320M,240M,120M,26M)

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_clock_ctrl(pm_dev_clk_e module, pm_dev_clk_pwr_e clock_state)

clock ctrl

enable or disable dev clock

Attention

  • This API is used to enable or disable dev clock

Parameters

-module:device – id;clock_state:PM_CLK_CTRL_PWR_DOWN or PM_CLK_CTRL_PWR_DOWN

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_lp_vol_set(uint32_t lp_vol)

lp voltage set

set the lp voltage

Attention

  • This API is used to set lp voltage when enter low voltage

Parameters

-uint32_t:0x0:0.6v;0x1:0.7v;0x2:0.8v;0x3:0.9v;0x4:1.0v;0x5:1.1v;0x6:1.2v;0x7:1.3v;

Returns

  • BK_OK: succeed

  • others: other errors.

uint32_t bk_pm_lp_vol_get()

lp voltage get

get the lpo voltage

Attention

  • This API is used to get lpo voltage value

Parameters

-void

Returns

  • the lp voltage value

bk_err_t bk_pm_rf_tx_vol_set(uint32_t tx_vol)

rf tx voltage set

set the tx voltage of RF

Attention

  • This API is used to set tx voltage of RF

Parameters

-uint32_t:0x0:1.25v;0x1:1.3v;0x2:1.35v;0x3:1.4v;0x4:1.45v;0x5:1.5v;0x6:1.55v;0x7:1.6v;

Returns

  • BK_OK: succeed

  • others: other errors.

uint32_t bk_pm_rf_tx_vol_get()

rf tx voltage get

get the tx voltage of RF

Attention

  • This API is used to get tx voltage value of RF

Parameters

-void

Returns

  • the tx voltage value

bk_err_t bk_pm_rf_rx_vol_set(uint32_t rx_vol)

rf rx voltage set

set the rx voltage of RF

Attention

  • This API is used to set rx voltage of RF

Parameters

-uint32_t:0x0:1.25v;0x1:1.3v;0x2:1.35v;0x3:1.4v;0x4:1.45v;0x5:1.5v;0x6:1.55v;0x7:1.6v;

Returns

  • BK_OK: succeed

  • others: other errors.

uint32_t bk_pm_rf_rx_vol_get()

rf rx voltage get

get the rx voltage of RF

Attention

  • This API is used to get rx voltage value of RF

Parameters

-void

Returns

  • the rx voltage value

bk_err_t bk_pm_lpo_src_set(pm_lpo_src_e lpo_src)

lpo source set

set the lpo source

Attention

  • This API is used to select 32k source when enter low voltage and deepsleep

Parameters

-lpo_src:0x0:32K – from 26m;0x1:32K from 26m;0x2:32K from ROSC;0x3:32K from ROSC

Returns

  • BK_OK: succeed

  • others: other errors.

pm_lpo_src_e bk_pm_lpo_src_get()

lpo source get

get the lpo source

Attention

  • This API is used to get 32k lpo source

Parameters

void

Returns

-lpo_src:0x0:32K from 26m;0x1:32K from 26m;0x2:32K from ROSC;0x3:32K from ROSC

bk_err_t bk_pm_mcu_pm_ctrl(uint32_t power_state)

mcu pm ctrl

enabel and disable the mcu power manage

Attention

  • This API is used to enabel and disable the mcu power manage

Parameters

-power_state:0x0:enable – the mcu power manage;0x1:disable the mcu power manage

Returns

  • BK_OK: succeed

  • others: other errors.

uint32_t bk_pm_mcu_pm_state_get()

get the mcu power feature state

get the mcu power feature state

Attention

-This API is used to get the mcu power manage feature state(open or close)

Parameters

none

Returns

-mcu power manage state(0x0:enable the mcu power manage;0x1:disable the mcu power manage)

bk_err_t bk_pm_sleep_mode_set(pm_sleep_mode_e sleep_mode)

set sleep mode

set sleep mode.

Attention

  • This API set sleep mode

Parameters

sleep – mode:0x0:NORMAL_SLEEP;0x1:LOW_VOLTAGE;0x2:DEEP_SLEEP;0x3:DEFAULT(if it meet low voltage,enter low voltage,otherwise enter normal sleep);

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_wakeup_source_set(pm_wakeup_source_e wakeup_source, void *source_param)

set wakeup source

set wakeup source(eg.rtc,gpio)

Attention

  • This API set wakeup source,wifi and bt themselves not need set wakup source when in volatage

Parameters

-wakeup_source:wake – up source -source_param: the wakeup source parameter

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_module_vote_sleep_ctrl(pm_sleep_module_name_e module, uint32_t sleep_state, uint32_t sleep_time)

module vote sleep ctrl

other module tell pm module, they have entered sleep.(eg.wifi or bt enter sleep,then call the function ,tell pm it have entered sleep)

Attention

  • This API is used by wifi or bt… let pm module know them(wifi or bt…) enter sleep or exit sleep

  • if all the specific module enter sleep, the mcu will enter low voltage

Parameters

-module:module – name -sleep_state:0x1:enter sleep;0x0:exit sleep -sleep_time: sleep time

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_module_vote_power_ctrl(pm_power_module_name_e module, pm_power_module_state_e power_state)

pm module vote power ctrl

ther module tell pm module, they can enter power on or power off

Attention

  • This API is used for the module power on and power off.

  • if all the specific module power off, the mcu will enter deep sleep

Parameters

-module:module – name -power_state:0x1:power off;0x0:power on

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_pm_suppress_ticks_and_sleep(uint32_t sleep_ticks)

pm suppress ticks and sleep

when the rtos enter idle task and sleep time > 2*(time per tick),it will call the function enter power manager

Attention

  • This API is used for power manager.

Parameters

-sleep_ticks:sleep – time using tick unit

Returns

  • BK_OK: succeed

  • others: other errors.

void bk_pm_enter_sleep()

enter sleep

the function is for adapting harmony os

Attention

  • This API is used for power manager.

Parameters

- – void

Returns

  • void

static inline bk_err_t pm_sleep_vote_init()

sleep vote init

the function is for init the enter low voltage sleep vote

Attention

  • This API is used for init the enter low voltage sleep vote

Parameters

- – void

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t pm_clk_32k_source_switch(pm_lpo_src_e lpo_src)

32k source switch

When the external 32k clock source is enabled, this api used to switch the 32k clock source

Parameters

- – pm_lpo_src_e taget 32k clock source

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t pm_extern32k_register_cb(pm_cb_extern32k_cfg_t *cfg)

register callback function

BT WIFI module registered callback function, used to switch synchronization when switching clock source

Parameters

-pm_cb_extern32k_cfg_t Structure pointer

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t pm_extern32k_unregister_cb(pm_cb_extern32k_cfg_t *cfg)

unregister callback function

Parameters

-pm_cb_extern32k_cfg_t Structure pointer

Returns

  • BK_OK: succeed

  • others: other errors.

Structures

struct gpio_wakeup_param_t
struct rtc_wakeup_param_t
struct system_wakeup_param_t
struct usbplug_wakeup_param_t
struct touch_wakeup_param_t
struct pm_cb_conf_t
struct pm_sleep_cb_t
struct pm_cb_extern32k_cfg_t

Macros

PARAM_DATA_VALID
PM_APP_AUTO_VOTE_ENABLE
PM_APP_AUTO_VOTE_DISENABLE
PM_CP1_AUTO_POWER_DOWN_ENABLE
PM_CP1_AUTO_POWER_DOWN_DISENABLE
pm_wakeup_source_e
PM_WAKEUP_SOURCE_INT_GPIO
PM_WAKEUP_SOURCE_INT_RTC
PM_WAKEUP_SOURCE_INT_TOUCHED
PM_WAKEUP_SOURCE_INT_SYSTEM_WAKE
PM_WAKEUP_SOURCE_INT_WIFI
PM_WAKEUP_SOURCE_INT_BT
PM_WAKEUP_SOURCE_INT_USBPLUG
PM_WAKEUP_SOURCE_INT_NONE
pm_power_module_name_e
PM_POWER_MODULE_NAME_MEM1
PM_POWER_MODULE_NAME_MEM2
PM_POWER_MODULE_NAME_MEM3
PM_POWER_MODULE_NAME_ENCP
PM_POWER_MODULE_NAME_BAKP
PM_POWER_MODULE_NAME_AHBP
PM_POWER_MODULE_NAME_AUDP
PM_POWER_MODULE_NAME_VIDP
PM_POWER_MODULE_NAME_BTSP
PM_POWER_MODULE_NAME_WIFIP_MAC
PM_POWER_MODULE_NAME_PHY
PM_POWER_MODULE_NAME_MEM0
PM_POWER_MODULE_NAME_MEM4
PM_POWER_MODULE_NAME_OFDM
PM_POWER_MODULE_NAME_TCM0_PGEN
PM_POWER_MODULE_NAME_ROM_PGEN
PM_POWER_MODULE_NAME_TCM1_PGEN
PM_POWER_MODULE_NAME_CPU1
PM_POWER_MODULE_NAME_CPU2
PM_POWER_MODULE_NAME_APP
PM_POWER_MODULE_NAME_NONE
PM_POWER_SUB_MODULE_NAME_AUDP_FFT
PM_POWER_SUB_MODULE_NAME_AUDP_SBC
PM_POWER_SUB_MODULE_NAME_AUDP_AUDIO
PM_POWER_SUB_MODULE_NAME_AUDP_I2S
PM_POWER_SUB_MODULE_NAME_VIDP_DMA2D
PM_POWER_SUB_MODULE_NAME_VIDP_YUVBUF
PM_POWER_SUB_MODULE_NAME_VIDP_JPEG_EN
PM_POWER_SUB_MODULE_NAME_VIDP_JPEG_DE
PM_POWER_SUB_MODULE_NAME_VIDP_LCD
PM_POWER_SUB_MODULE_NAME_VIDP_ROTT
PM_POWER_SUB_MODULE_NAME_VIDP_SCAL0
PM_POWER_SUB_MODULE_NAME_VIDP_SCAL1
PM_POWER_SUB_MODULE_NAME_VIDP_H264
PM_POWER_SUB_MODULE_NAME_PHY_BT
PM_POWER_SUB_MODULE_NAME_PHY_WIFI
PM_POWER_SUB_MODULE_NAME_PHY_RF
PM_POWER_SUB_MODULE_NAME_AHBP_CAN
PM_POWER_SUB_MODULE_NAME_AHBP_QSPI
PM_POWER_SUB_MODULE_NAME_AHBP_USB
PM_POWER_SUB_MODULE_NAME_AHBP_PSRAM
PM_POWER_SUB_MODULE_NAME_AHBP_QSPI1
PM_POWER_SUB_MODULE_NAME_AHBP_ENET
PM_POWER_SUB_MODULE_NAME_AHBP_SCR
PM_POWER_SUB_MODULE_NAME_AHBP_LIN
PM_POWER_SUB_MODULE_NAME_BAKP_TIMER1
PM_POWER_SUB_MODULE_NAME_BAKP_UART1
PM_POWER_SUB_MODULE_NAME_BAKP_UART2
PM_POWER_SUB_MODULE_NAME_BAKP_SPI1
PM_POWER_SUB_MODULE_NAME_BAKP_I2C0
PM_POWER_SUB_MODULE_NAME_BAKP_I2C1
PM_POWER_SUB_MODULE_NAME_BAKP_SADC
PM_POWER_SUB_MODULE_NAME_BAKP_PWM1
PM_POWER_SUB_MODULE_NAME_BAKP_PWM0
PM_POWER_SUB_MODULE_NAME_BAKP_TRNG
PM_POWER_SUB_MODULE_NAME_BAKP_IRDA
PM_POWER_SUB_MODULE_NAME_BAKP_SDIO
PM_POWER_SUB_MODULE_NAME_BAKP_COMSEG
PM_POWER_SUB_MODULE_NAME_BAKP_DMA0
PM_POWER_SUB_MODULE_NAME_BAKP_DMA1
PM_POWER_SUB_MODULE_NAME_BAKP_LA
PM_POWER_SUB_MODULE_NAME_BAKP_PM
PM_ENTER_LOW_VOL_MODULES_CONFIG
PM_ENTER_DEEP_SLEEP_MODULES_CONFIG
PM_VOLTAGE_OF_LOW_VOL
PM_LPO_SOURCE
PM_APP_AUTO_VOTE_CTRL
PM_CP1_AUTO_POWER_DOWN_CTRL

Type Definitions

typedef int (*pm_cb)(uint64_t sleep_time, void *args)
typedef int (*pm_cb_notify)(void)
typedef int (*pm_cb_extern32k)(pm_sw_step_e sw_step, pm_lpo_src_e lpo_src, pm_cb_notify cb)

Enumerations

enum pm_cp1_auto_ctrl_e

Values:

enumerator PM_CP1_AUTO_CTRL_DISABLE
enumerator PM_CP1_AUTO_CTRL_ENABLE
enum pm_mem_auto_ctrl_e

Values:

enumerator PM_MEM_AUTO_CTRL_DISABLE
enumerator PM_MEM_AUTO_CTRL_ENABLE
enum gpio_trigger_interrupt_type_e

Values:

enumerator GPIO_TRIGGER_INTERRUPE_LEVEL_LOW_ACTIVE
enumerator GPIO_TRIGGER_INTERRUPE_LEVEL_HIGH_ACTIVE
enumerator GPIO_TRIGGER_INTERRUPE_EDGE_RISING
enumerator GPIO_TRIGGER_INTERRUPE_EDGE_FALLING
enum wifi_bt_wakeup_type_e

Values:

enumerator WIFI_WAKEUP
enumerator BT_WAKEUP
enum pm_sleep_mode_e

Values:

enumerator PM_MODE_NORMAL_SLEEP
enumerator PM_MODE_LOW_VOLTAGE
enumerator PM_MODE_DEEP_SLEEP
enumerator PM_MODE_SUPER_DEEP_SLEEP
enumerator PM_MODE_DEFAULT
enum pm_sleep_module_name_e

Values:

enumerator PM_SLEEP_MODULE_NAME_I2C1
enumerator PM_SLEEP_MODULE_NAME_SPI_1
enumerator PM_SLEEP_MODULE_NAME_UART1
enumerator PM_SLEEP_MODULE_NAME_PWM_1
enumerator PM_SLEEP_MODULE_NAME_TIMER_1
enumerator PM_SLEEP_MODULE_NAME_SARADC
enumerator PM_SLEEP_MODULE_NAME_AUDP
enumerator PM_SLEEP_MODULE_NAME_VIDP
enumerator PM_SLEEP_MODULE_NAME_BTSP
enumerator PM_SLEEP_MODULE_NAME_WIFIP_MAC
enumerator PM_SLEEP_MODULE_NAME_WIFI_PHY
enumerator PM_SLEEP_MODULE_NAME_TIMER_2
enumerator PM_SLEEP_MODULE_NAME_APP
enumerator PM_SLEEP_MODULE_NAME_OTP
enumerator PM_SLEEP_MODULE_NAME_I2S_1
enumerator PM_SLEEP_MODULE_NAME_USB_1
enumerator PM_SLEEP_MODULE_NAME_CAN
enumerator PM_SLEEP_MODULE_NAME_PSRAM
enumerator PM_SLEEP_MODULE_NAME_QSPI_1
enumerator PM_SLEEP_MODULE_NAME_QSPI_2
enumerator PM_SLEEP_MODULE_NAME_SDIO
enumerator PM_SLEEP_MODULE_NAME_AUXS
enumerator PM_SLEEP_MODULE_NAME_LOG
enumerator PM_SLEEP_MODULE_NAME_AT
enumerator PM_SLEEP_MODULE_NAME_I2C2
enumerator PM_SLEEP_MODULE_NAME_UART2
enumerator PM_SLEEP_MODULE_NAME_UART3
enumerator PM_SLEEP_MODULE_NAME_WDG
enumerator PM_SLEEP_MODULE_NAME_TIMER_3
enumerator PM_SLEEP_MODULE_NAME_APP1
enumerator PM_SLEEP_MODULE_NAME_CPU1
enumerator PM_SLEEP_MODULE_NAME_APP3
enumerator PM_SLEEP_MODULE_NAME_MAX
enum pm_power_module_state_e

Values:

enumerator PM_POWER_MODULE_STATE_ON
enumerator PM_POWER_MODULE_STATE_OFF
enumerator PM_POWER_MODULE_STATE_NONE
enum pm_module_name_e

Values:

enumerator PM_MODULE_NAME_WIFI
enumerator PM_MODULE_NAME_BT
enumerator PM_MODULE_NAME_NONE
enum pm_lpo_src_e

Values:

enumerator PM_LPO_SRC_DIVD
enumerator PM_LPO_SRC_X32K
enumerator PM_LPO_SRC_ROSC
enumerator PM_LPO_SRC_DEFAULT
enum pm_dev_clk_e

Values:

enumerator PM_CLK_ID_I2C1
enumerator PM_CLK_ID_SPI_1
enumerator PM_CLK_ID_UART1
enumerator PM_CLK_ID_PWM_1
enumerator PM_CLK_ID_TIMER_1
enumerator PM_CLK_ID_SARADC
enumerator PM_CLK_ID_IRDA
enumerator PM_CLK_ID_EFUSE
enumerator PM_CLK_ID_I2C2
enumerator PM_CLK_ID_SPI_2
enumerator PM_CLK_ID_UART2
enumerator PM_CLK_ID_UART3
enumerator PM_CLK_ID_PWM_2
enumerator PM_CLK_ID_TIMER_2
enumerator PM_CLK_ID_TIMER_3
enumerator PM_CLK_ID_OTP
enumerator PM_CLK_ID_I2S_1
enumerator PM_CLK_ID_USB_1
enumerator PM_CLK_ID_CAN
enumerator PM_CLK_ID_PSRAM
enumerator PM_CLK_ID_QSPI_1
enumerator PM_CLK_ID_QSPI_2
enumerator PM_CLK_ID_SDIO
enumerator PM_CLK_ID_AUXS
enumerator PM_CLK_ID_BTDM
enumerator PM_CLK_ID_XVR
enumerator PM_CLK_ID_MAC
enumerator PM_CLK_ID_PHY
enumerator PM_CLK_ID_JPEG
enumerator PM_CLK_ID_DISP
enumerator PM_CLK_ID_AUDIO
enumerator PM_CLK_ID_WDG_CPU
enumerator PM_CLK_ID_NONE
enum pm_dev_clk_pwr_e

Values:

enumerator PM_CLK_CTRL_PWR_DOWN
enumerator PM_CLK_CTRL_PWR_UP
enum pm_dev_id_e

Values:

enumerator PM_DEV_ID_I2C1
enumerator PM_DEV_ID_SPI_1
enumerator PM_DEV_ID_UART1
enumerator PM_DEV_ID_WDG
enumerator PM_DEV_ID_TIMER_1
enumerator PM_DEV_ID_SARADC
enumerator PM_DEV_ID_IRDA
enumerator PM_DEV_ID_EFUSE
enumerator PM_DEV_ID_I2C2
enumerator PM_DEV_ID_SPI_2
enumerator PM_DEV_ID_UART2
enumerator PM_DEV_ID_UART3
enumerator PM_DEV_ID_PWM_2
enumerator PM_DEV_ID_TIMER_2
enumerator PM_DEV_ID_TIMER_3
enumerator PM_DEV_ID_TOUCH
enumerator PM_DEV_ID_I2S_1
enumerator PM_DEV_ID_USB_1
enumerator PM_DEV_ID_CAN
enumerator PM_DEV_ID_PSRAM
enumerator PM_DEV_ID_QSPI_1
enumerator PM_DEV_ID_QSPI_2
enumerator PM_DEV_ID_SDIO
enumerator PM_DEV_ID_AUXS
enumerator PM_DEV_ID_BTDM
enumerator PM_DEV_ID_WPAS
enumerator PM_DEV_ID_MAC
enumerator PM_DEV_ID_PHY
enumerator PM_DEV_ID_JPEG
enumerator PM_DEV_ID_DISP
enumerator PM_DEV_ID_AUDIO
enumerator PM_DEV_ID_RTC
enumerator PM_DEV_ID_GPIO
enumerator PM_DEV_ID_DECODER
enumerator PM_DEV_ID_LIN
enumerator PM_DEV_ID_PWM_1
enumerator PM_DEV_ID_OTP_AHB
enumerator PM_DEV_ID_OTP_APB
enumerator PM_DEV_ID_SHANHAI
enumerator PM_DEV_ID_KEY
enumerator PM_DEV_ID_DEFAULT
enumerator PM_DEV_ID_MAX
enum pm_cpu_freq_e

Values:

enumerator PM_CPU_FRQ_26M
enumerator PM_CPU_FRQ_60M
enumerator PM_CPU_FRQ_80M
enumerator PM_CPU_FRQ_120M
enumerator PM_CPU_FRQ_240M
enumerator PM_CPU_FRQ_320M
enumerator PM_CPU_FRQ_480M
enumerator PM_CPU_FRQ_DEFAULT
enum pm_rosc_cali_mode_e

Values:

enumerator PM_ROSC_CALI_AUTO
enumerator PM_ROSC_CALI_MANUAL
enumerator PM_ROSC_CALI_STOP
enum pm_cb_priority_e

Values:

enumerator PM_CB_PRIORITY_0
enumerator PM_CB_PRIORITY_1
enumerator PM_CB_PRIORITY_2
enumerator PM_CB_PRIORITY_3
enumerator PM_CB_PRIORITY_MAX
enum pm_cb_module_e

Values:

enumerator PM_32K_MODULE_BT
enumerator PM_32K_MODULE_WIFI
enumerator PM_32K_MODULE_MAX
enum pm_sw_step_e

Values:

enumerator PM_32K_STEP_BEGIN
enumerator PM_32K_STEP_FINISH
enum pm_low_vol_voltage_e

Values:

enumerator PM_LOW_VOL_VOLTAGE_0_6
enumerator PM_LOW_VOL_VOLTAGE_0_7
enumerator PM_LOW_VOL_VOLTAGE_0_8
enumerator PM_LOW_VOL_VOLTAGE_0_9
enumerator PM_LOW_VOL_VOLTAGE_1_0
enumerator PM_LOW_VOL_VOLTAGE_1_1
enumerator PM_LOW_VOL_VOLTAGE_1_2
enumerator PM_LOW_VOL_VOLTAGE_1_3