低功耗模式
概述
深度睡眠模式(deep sleep mode)是 WQ7036 所支持的一种重要的低功耗模式。
所有子电源域都可进入或退出 deep sleep mode。在 deep sleep mode,系统采取如下节电措施:
将电源域标准单元逻辑下电。
将所有 RAM 转入低功耗模式。如不支持该模式,则下电。
将所有 ROM 下电。
应用子系统的 deep sleep mode 等效于芯片级 deep sleep mode。即:当 Bluetooth 处于工作模式中,应用子系统不掉电。当 Bluetooth 处于连接模式(link mode)时,应用子系统在 Bluetooth 掉电后发起芯片级 deep sleep 流程,芯片进入 deep sleep mode,并关闭 DC/DC、LDO、PLL 等。在 deep sleep mode,仅 PMU 供电,芯片进入最小功耗状态。
API 介绍
This section introduces the LPM module's functions and how to use this driver.
Enums
Functions
-
void wq_lpm_pmm_wakeup_rtc_init(void)
This function is to init the function of pmm waking up rtc.
-
void wq_lpm_enter_deepsleep(void)
This function is to let lpm enter deepsleep module.
-
void wq_lpm_exit_deepsleep(void)
Restore sleep state when exit from deepsleep.
-
WQ_RET wq_lpm_set_deepsleep_timer(uint32_t start_rtc, uint32_t time_ms)
This function is to set pmm rtc to wake up source.
- 参数:
start_rtc -- The rtc time sleep start
time_ms -- Total time allow to sleep
-
WQ_RET wq_lpm_set_shutdown_timer(uint32_t start_rtc, uint32_t time_ms)
This function is to set wakeup time from shutdwon mode .
参见
- 参数:
start_rtc -- [in] RTC time when timing starts
time_ms -- [in] Shutdown time in millsecond
- 返回:
WQ_RET
-
void wq_lpm_init(void)
This function is to init lpm module.
-
uint32_t wq_lpm_get_deep_slp_cnt(void)
This function is to get the count of the deep sleep.
- 返回:
uint32_t is the count of the deep sleep.
-
uint32_t wq_lpm_get_perf_mon_cnt(uint8_t value)
This function is to get the count of the performance monitor.
- 参数:
value -- select the monitor.
- 返回:
uint32_t is the count.
-
void wq_lpm_enter_shutdown(void)
This function is to enter the shutdown.
-
void wq_lpm_get_power_domain_status(uint8_t *acore, uint8_t *bcore, uint8_t *dcore, uint8_t *audif)
This function is to get all power domain status.
- 参数:
acore -- is pointer to store ACORE power domain status.
bcore -- is pointer to store BCORE power domain status.
dcore -- is pointer to store DCORE power domain status.
audif -- is pointer to store AUDIO_INF power domain status.
-
uint8_t wq_lpm_get_power_domain_status_with_core(WQ_CORES core)
This function is to get power domain status with core.
- 参数:
core -- is specific cpu core id.
- 返回:
uint8_t The number of core power status 4 — core is power on 8 — core is power off done. *(not 4 or 8) — intermediate status.
-
WQ_RET wq_lpm_set_deepsleep_wakeup_src(WQ_DS_WAKEUP_SRC src, bool enable)
assign wakeup source
- 参数:
src -- the wakeup source assigned
enable -- enable or disable
-
void wq_lpm_set_dcdc_pulse_width(uint8_t pulse_width)
Set all dcdc08, dcdc12, dcdc18 pulse width.
- 参数:
pulse_width -- The pulse width to set, 0 - 15.
-
void wq_lpm_set_shutdown_wakeup_src(WQ_DS_WAKEUP_SRC src, bool enable)
Set wakeup source for full chip shutdown.
参见
WQ_DS_WAKEUP_SRC.
- 参数:
src -- wakeup source
enable -- enable or disable.