mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/ledc_use_rtc8m_or_xtal_lightsleep_v4.3' into 'release/v4.3'
backport v4.3: support RTC8M and XTAL power domain in light sleep mode See merge request espressif/esp-idf!15362
This commit is contained in:
commit
0e0e298322
@ -194,9 +194,11 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
|
|||||||
REG_CLR_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
REG_CLR_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
||||||
}
|
}
|
||||||
//Keep the RTC8M_CLK on in light_sleep mode if the ledc low-speed channel is clocked by RTC8M_CLK.
|
//Keep the RTC8M_CLK on in light_sleep mode if the ledc low-speed channel is clocked by RTC8M_CLK.
|
||||||
if (!cfg.deep_slp && GET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_DIG_CLK8M_EN_M)) {
|
if (!cfg.int_8m_pd_en && GET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_DIG_CLK8M_EN_M)) {
|
||||||
REG_CLR_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PD);
|
REG_CLR_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PD);
|
||||||
REG_SET_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
REG_SET_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
||||||
|
} else {
|
||||||
|
REG_CLR_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable VDDSDIO control by state machine */
|
/* enable VDDSDIO control by state machine */
|
||||||
|
@ -90,9 +90,11 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
|
|||||||
|
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_MONITOR, RTC_CNTL_DBG_ATTEN_MONITOR_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_MONITOR, RTC_CNTL_DBG_ATTEN_MONITOR_DEFAULT);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_BIAS_SLEEP_MONITOR, RTC_CNTL_BIASSLP_MONITOR_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_BIAS_SLEEP_MONITOR, RTC_CNTL_BIASSLP_MONITOR_DEFAULT);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_BIAS_SLEEP_DEEP_SLP, RTC_CNTL_BIASSLP_SLEEP_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_BIAS_SLEEP_DEEP_SLP,
|
||||||
|
(!cfg.deep_slp && cfg.xtal_fpu) ? RTC_CNTL_BIASSLP_SLEEP_ON : RTC_CNTL_BIASSLP_SLEEP_DEFAULT);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_PD_CUR_MONITOR, RTC_CNTL_PD_CUR_MONITOR_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_PD_CUR_MONITOR, RTC_CNTL_PD_CUR_MONITOR_DEFAULT);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_PD_CUR_DEEP_SLP, RTC_CNTL_PD_CUR_SLEEP_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_PD_CUR_DEEP_SLP,
|
||||||
|
(!cfg.deep_slp && cfg.xtal_fpu) ? RTC_CNTL_PD_CUR_SLEEP_ON : RTC_CNTL_PD_CUR_SLEEP_DEFAULT);
|
||||||
if (cfg.deep_slp) {
|
if (cfg.deep_slp) {
|
||||||
REGI2C_WRITE_MASK(I2C_ULP, I2C_ULP_IR_FORCE_XPD_CK, 0);
|
REGI2C_WRITE_MASK(I2C_ULP, I2C_ULP_IR_FORCE_XPD_CK, 0);
|
||||||
CLEAR_PERI_REG_MASK(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU);
|
CLEAR_PERI_REG_MASK(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU);
|
||||||
@ -113,7 +115,18 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
|
|||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DG_VDD_DRV_B_SLP, RTC_CNTL_DG_VDD_DRV_B_SLP_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DG_VDD_DRV_B_SLP, RTC_CNTL_DG_VDD_DRV_B_SLP_DEFAULT);
|
||||||
SET_PERI_REG_MASK(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU);
|
SET_PERI_REG_MASK(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU);
|
||||||
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_DG_WRAP_PD_EN);
|
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_DG_WRAP_PD_EN);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_DEEP_SLP, RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_DEEP_SLP,
|
||||||
|
cfg.int_8m_pd_en ? RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_DEFAULT : RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_NODROP);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Keep the RTC8M_CLK on in light_sleep mode if the ledc low-speed channel is clocked by RTC8M_CLK.
|
||||||
|
if (!cfg.int_8m_pd_en && GET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_DIG_CLK8M_EN_M)) {
|
||||||
|
CLEAR_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PD);
|
||||||
|
SET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
||||||
|
SET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_NOGATING);
|
||||||
|
} else {
|
||||||
|
CLEAR_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
||||||
|
CLEAR_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_NOGATING);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable VDDSDIO control by state machine */
|
/* enable VDDSDIO control by state machine */
|
||||||
@ -126,8 +139,8 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
|
|||||||
REG_SET_FIELD(RTC_CNTL_SLP_REJECT_CONF_REG, RTC_CNTL_DEEP_SLP_REJECT_EN, cfg.deep_slp_reject);
|
REG_SET_FIELD(RTC_CNTL_SLP_REJECT_CONF_REG, RTC_CNTL_DEEP_SLP_REJECT_EN, cfg.deep_slp_reject);
|
||||||
REG_SET_FIELD(RTC_CNTL_SLP_REJECT_CONF_REG, RTC_CNTL_LIGHT_SLP_REJECT_EN, cfg.light_slp_reject);
|
REG_SET_FIELD(RTC_CNTL_SLP_REJECT_CONF_REG, RTC_CNTL_LIGHT_SLP_REJECT_EN, cfg.light_slp_reject);
|
||||||
|
|
||||||
/* gating XTAL clock */
|
REG_SET_FIELD(RTC_CNTL_OPTIONS0_REG, RTC_CNTL_XTL_FORCE_PU, cfg.xtal_fpu);
|
||||||
REG_CLR_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_XTAL_GLOBAL_FORCE_NOGATING);
|
REG_SET_FIELD(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_XTAL_GLOBAL_FORCE_NOGATING, cfg.xtal_fpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtc_sleep_low_init(uint32_t slowclk_period)
|
void rtc_sleep_low_init(uint32_t slowclk_period)
|
||||||
|
@ -99,9 +99,11 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
|
|||||||
|
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_MONITOR, RTC_CNTL_DBG_ATTEN_MONITOR_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_MONITOR, RTC_CNTL_DBG_ATTEN_MONITOR_DEFAULT);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_BIAS_SLEEP_MONITOR, RTC_CNTL_BIASSLP_MONITOR_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_BIAS_SLEEP_MONITOR, RTC_CNTL_BIASSLP_MONITOR_DEFAULT);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_BIAS_SLEEP_DEEP_SLP, RTC_CNTL_BIASSLP_SLEEP_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_BIAS_SLEEP_DEEP_SLP,
|
||||||
|
(!cfg.deep_slp && cfg.xtal_fpu) ? RTC_CNTL_BIASSLP_SLEEP_ON : RTC_CNTL_BIASSLP_SLEEP_DEFAULT);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_PD_CUR_MONITOR, RTC_CNTL_PD_CUR_MONITOR_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_PD_CUR_MONITOR, RTC_CNTL_PD_CUR_MONITOR_DEFAULT);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_PD_CUR_DEEP_SLP, RTC_CNTL_PD_CUR_SLEEP_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_PD_CUR_DEEP_SLP,
|
||||||
|
(!cfg.deep_slp && cfg.xtal_fpu) ? RTC_CNTL_PD_CUR_SLEEP_ON : RTC_CNTL_PD_CUR_SLEEP_DEFAULT);
|
||||||
if (cfg.deep_slp) {
|
if (cfg.deep_slp) {
|
||||||
CLEAR_PERI_REG_MASK(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU);
|
CLEAR_PERI_REG_MASK(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_DEEP_SLP, RTC_CNTL_DBG_ATTEN_DEEPSLEEP_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_DEEP_SLP, RTC_CNTL_DBG_ATTEN_DEEPSLEEP_DEFAULT);
|
||||||
@ -113,7 +115,16 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
|
|||||||
} else {
|
} else {
|
||||||
SET_PERI_REG_MASK(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU);
|
SET_PERI_REG_MASK(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU);
|
||||||
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_DG_WRAP_PD_EN);
|
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_DG_WRAP_PD_EN);
|
||||||
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_DEEP_SLP, RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_DEFAULT);
|
REG_SET_FIELD(RTC_CNTL_BIAS_CONF_REG, RTC_CNTL_DBG_ATTEN_DEEP_SLP,
|
||||||
|
cfg.int_8m_pd_en ? RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_DEFAULT : RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_NODROP);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Keep the RTC8M_CLK on in light_sleep mode if the ledc low-speed channel is clocked by RTC8M_CLK.
|
||||||
|
if (!cfg.int_8m_pd_en && GET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_DIG_CLK8M_EN_M)) {
|
||||||
|
REG_CLR_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PD);
|
||||||
|
REG_SET_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
||||||
|
} else {
|
||||||
|
REG_CLR_BIT(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable VDDSDIO control by state machine */
|
/* enable VDDSDIO control by state machine */
|
||||||
@ -127,6 +138,8 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
|
|||||||
|
|
||||||
REG_SET_FIELD(RTC_CNTL_SLP_REJECT_CONF_REG, RTC_CNTL_DEEP_SLP_REJECT_EN, cfg.deep_slp_reject);
|
REG_SET_FIELD(RTC_CNTL_SLP_REJECT_CONF_REG, RTC_CNTL_DEEP_SLP_REJECT_EN, cfg.deep_slp_reject);
|
||||||
REG_SET_FIELD(RTC_CNTL_SLP_REJECT_CONF_REG, RTC_CNTL_LIGHT_SLP_REJECT_EN, cfg.light_slp_reject);
|
REG_SET_FIELD(RTC_CNTL_SLP_REJECT_CONF_REG, RTC_CNTL_LIGHT_SLP_REJECT_EN, cfg.light_slp_reject);
|
||||||
|
|
||||||
|
REG_SET_FIELD(RTC_CNTL_OPTIONS0_REG, RTC_CNTL_XTL_FORCE_PU, cfg.xtal_fpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtc_sleep_low_init(uint32_t slowclk_period)
|
void rtc_sleep_low_init(uint32_t slowclk_period)
|
||||||
|
@ -49,7 +49,10 @@ typedef enum {
|
|||||||
ESP_PD_DOMAIN_RTC_SLOW_MEM, //!< RTC slow memory
|
ESP_PD_DOMAIN_RTC_SLOW_MEM, //!< RTC slow memory
|
||||||
ESP_PD_DOMAIN_RTC_FAST_MEM, //!< RTC fast memory
|
ESP_PD_DOMAIN_RTC_FAST_MEM, //!< RTC fast memory
|
||||||
ESP_PD_DOMAIN_XTAL, //!< XTAL oscillator
|
ESP_PD_DOMAIN_XTAL, //!< XTAL oscillator
|
||||||
|
#if SOC_PM_SUPPORT_CPU_PD
|
||||||
ESP_PD_DOMAIN_CPU, //!< CPU core
|
ESP_PD_DOMAIN_CPU, //!< CPU core
|
||||||
|
#endif
|
||||||
|
ESP_PD_DOMAIN_RTC8M, //!< Internal 8M oscillator
|
||||||
ESP_PD_DOMAIN_VDDSDIO, //!< VDD_SDIO
|
ESP_PD_DOMAIN_VDDSDIO, //!< VDD_SDIO
|
||||||
ESP_PD_DOMAIN_MAX //!< Number of domains
|
ESP_PD_DOMAIN_MAX //!< Number of domains
|
||||||
} esp_sleep_pd_domain_t;
|
} esp_sleep_pd_domain_t;
|
||||||
|
@ -154,7 +154,13 @@ typedef struct {
|
|||||||
} sleep_config_t;
|
} sleep_config_t;
|
||||||
|
|
||||||
static sleep_config_t s_config = {
|
static sleep_config_t s_config = {
|
||||||
.pd_options = { ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO },
|
.pd_options = {
|
||||||
|
ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO,
|
||||||
|
#if SOC_PM_SUPPORT_CPU_PD
|
||||||
|
ESP_PD_OPTION_AUTO,
|
||||||
|
#endif
|
||||||
|
ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO
|
||||||
|
},
|
||||||
.ccount_ticks_record = 0,
|
.ccount_ticks_record = 0,
|
||||||
.sleep_time_overhead_out = DEFAULT_SLEEP_OUT_OVERHEAD_US,
|
.sleep_time_overhead_out = DEFAULT_SLEEP_OUT_OVERHEAD_US,
|
||||||
.wakeup_triggers = 0
|
.wakeup_triggers = 0
|
||||||
@ -1312,15 +1318,11 @@ static uint32_t get_power_down_flags(void)
|
|||||||
if (s_config.cpu_pd_mem == NULL) {
|
if (s_config.cpu_pd_mem == NULL) {
|
||||||
s_config.pd_options[ESP_PD_DOMAIN_CPU] = ESP_PD_OPTION_ON;
|
s_config.pd_options[ESP_PD_DOMAIN_CPU] = ESP_PD_OPTION_ON;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (s_config.pd_options[ESP_PD_DOMAIN_CPU] != ESP_PD_OPTION_ON) {
|
|
||||||
s_config.pd_options[ESP_PD_DOMAIN_CPU] = ESP_PD_OPTION_ON;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (s_config.pd_options[ESP_PD_DOMAIN_XTAL] == ESP_PD_OPTION_AUTO) {
|
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||||
s_config.pd_options[ESP_PD_DOMAIN_XTAL] = ESP_PD_OPTION_OFF;
|
s_config.pd_options[ESP_PD_DOMAIN_XTAL] = ESP_PD_OPTION_OFF;
|
||||||
}
|
#endif
|
||||||
|
|
||||||
const char *option_str[] = {"OFF", "ON", "AUTO(OFF)" /* Auto works as OFF */};
|
const char *option_str[] = {"OFF", "ON", "AUTO(OFF)" /* Auto works as OFF */};
|
||||||
ESP_LOGD(TAG, "RTC_PERIPH: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_PERIPH]]);
|
ESP_LOGD(TAG, "RTC_PERIPH: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_PERIPH]]);
|
||||||
@ -1348,10 +1350,12 @@ static uint32_t get_power_down_flags(void)
|
|||||||
pd_flags |= RTC_SLEEP_PD_CPU;
|
pd_flags |= RTC_SLEEP_PD_CPU;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (s_config.pd_options[ESP_PD_DOMAIN_RTC8M] != ESP_PD_OPTION_ON) {
|
||||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
pd_flags |= RTC_SLEEP_PD_INT_8M;
|
||||||
|
}
|
||||||
|
if (s_config.pd_options[ESP_PD_DOMAIN_XTAL] != ESP_PD_OPTION_ON) {
|
||||||
pd_flags |= RTC_SLEEP_PD_XTAL;
|
pd_flags |= RTC_SLEEP_PD_XTAL;
|
||||||
#endif
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VDD_SDIO power domain shall be kept on during the light sleep
|
* VDD_SDIO power domain shall be kept on during the light sleep
|
||||||
|
@ -493,6 +493,7 @@ typedef struct rtc_sleep_config_s {
|
|||||||
uint32_t rtc_slowmem_pd_en : 1; //!< power down RTC slow memory
|
uint32_t rtc_slowmem_pd_en : 1; //!< power down RTC slow memory
|
||||||
uint32_t rtc_peri_pd_en : 1; //!< power down RTC peripherals
|
uint32_t rtc_peri_pd_en : 1; //!< power down RTC peripherals
|
||||||
uint32_t wifi_pd_en : 1; //!< power down WiFi
|
uint32_t wifi_pd_en : 1; //!< power down WiFi
|
||||||
|
uint32_t int_8m_pd_en : 1; //!< Power down Internal 8M oscillator
|
||||||
uint32_t rom_mem_pd_en : 1; //!< power down main RAM and ROM
|
uint32_t rom_mem_pd_en : 1; //!< power down main RAM and ROM
|
||||||
uint32_t deep_slp : 1; //!< power down digital domain
|
uint32_t deep_slp : 1; //!< power down digital domain
|
||||||
uint32_t wdt_flashboot_mod_en : 1; //!< enable WDT flashboot mode
|
uint32_t wdt_flashboot_mod_en : 1; //!< enable WDT flashboot mode
|
||||||
@ -513,6 +514,7 @@ typedef struct rtc_sleep_config_s {
|
|||||||
*
|
*
|
||||||
* @param RTC_SLEEP_PD_x flags combined using bitwise OR
|
* @param RTC_SLEEP_PD_x flags combined using bitwise OR
|
||||||
*/
|
*/
|
||||||
|
#define is_dslp(pd_flags) ((pd_flags) & RTC_SLEEP_PD_DIG)
|
||||||
#define RTC_SLEEP_CONFIG_DEFAULT(sleep_flags) { \
|
#define RTC_SLEEP_CONFIG_DEFAULT(sleep_flags) { \
|
||||||
.lslp_mem_inf_fpu = 0, \
|
.lslp_mem_inf_fpu = 0, \
|
||||||
.rtc_mem_inf_fpu = 0, \
|
.rtc_mem_inf_fpu = 0, \
|
||||||
@ -521,13 +523,18 @@ typedef struct rtc_sleep_config_s {
|
|||||||
.rtc_slowmem_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_SLOW_MEM) ? 1 : 0, \
|
.rtc_slowmem_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_SLOW_MEM) ? 1 : 0, \
|
||||||
.rtc_peri_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_PERIPH) ? 1 : 0, \
|
.rtc_peri_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_PERIPH) ? 1 : 0, \
|
||||||
.wifi_pd_en = 0, \
|
.wifi_pd_en = 0, \
|
||||||
|
.int_8m_pd_en = is_dslp(sleep_flags) ? 1 : ((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? 1 : 0, \
|
||||||
.rom_mem_pd_en = 0, \
|
.rom_mem_pd_en = 0, \
|
||||||
.deep_slp = ((sleep_flags) & RTC_SLEEP_PD_DIG) ? 1 : 0, \
|
.deep_slp = ((sleep_flags) & RTC_SLEEP_PD_DIG) ? 1 : 0, \
|
||||||
.wdt_flashboot_mod_en = 0, \
|
.wdt_flashboot_mod_en = 0, \
|
||||||
.dig_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
.dig_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
||||||
.dig_dbias_slp = RTC_CNTL_DBIAS_0V90, \
|
.dig_dbias_slp = is_dslp(sleep_flags) ? RTC_CNTL_DBIAS_0V90 \
|
||||||
|
: !((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? RTC_CNTL_DBIAS_1V10 \
|
||||||
|
: RTC_CNTL_DBIAS_0V90, \
|
||||||
.rtc_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
.rtc_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
||||||
.rtc_dbias_slp = RTC_CNTL_DBIAS_0V90, \
|
.rtc_dbias_slp = is_dslp(sleep_flags) ? RTC_CNTL_DBIAS_0V90 \
|
||||||
|
: !((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? RTC_CNTL_DBIAS_1V10 \
|
||||||
|
: RTC_CNTL_DBIAS_0V90, \
|
||||||
.lslp_meminf_pd = 1, \
|
.lslp_meminf_pd = 1, \
|
||||||
.vddsdio_pd_en = ((sleep_flags) & RTC_SLEEP_PD_VDDSDIO) ? 1 : 0, \
|
.vddsdio_pd_en = ((sleep_flags) & RTC_SLEEP_PD_VDDSDIO) ? 1 : 0, \
|
||||||
.xtal_fpu = ((sleep_flags) & RTC_SLEEP_PD_XTAL) ? 0 : 1 \
|
.xtal_fpu = ((sleep_flags) & RTC_SLEEP_PD_XTAL) ? 0 : 1 \
|
||||||
@ -540,6 +547,7 @@ typedef struct rtc_sleep_config_s {
|
|||||||
#define RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU BIT(4) //!< RTC FAST and SLOW memories are automatically powered up and down along with the CPU
|
#define RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU BIT(4) //!< RTC FAST and SLOW memories are automatically powered up and down along with the CPU
|
||||||
#define RTC_SLEEP_PD_VDDSDIO BIT(5) //!< Power down VDDSDIO regulator
|
#define RTC_SLEEP_PD_VDDSDIO BIT(5) //!< Power down VDDSDIO regulator
|
||||||
#define RTC_SLEEP_PD_XTAL BIT(6) //!< Power down main XTAL
|
#define RTC_SLEEP_PD_XTAL BIT(6) //!< Power down main XTAL
|
||||||
|
#define RTC_SLEEP_PD_INT_8M BIT(7) //!< Power down Internal 8M oscillator
|
||||||
|
|
||||||
/* Various delays to be programmed into power control state machines */
|
/* Various delays to be programmed into power control state machines */
|
||||||
#define RTC_CNTL_XTL_BUF_WAIT_SLP_US (500)
|
#define RTC_CNTL_XTL_BUF_WAIT_SLP_US (500)
|
||||||
|
@ -114,11 +114,14 @@ extern "C" {
|
|||||||
set sleep_init default param
|
set sleep_init default param
|
||||||
*/
|
*/
|
||||||
#define RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_DEFAULT 3
|
#define RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_DEFAULT 3
|
||||||
|
#define RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_NODROP 0
|
||||||
#define RTC_CNTL_DBG_ATTEN_DEEPSLEEP_DEFAULT 15
|
#define RTC_CNTL_DBG_ATTEN_DEEPSLEEP_DEFAULT 15
|
||||||
#define RTC_CNTL_DBG_ATTEN_MONITOR_DEFAULT 0
|
#define RTC_CNTL_DBG_ATTEN_MONITOR_DEFAULT 0
|
||||||
#define RTC_CNTL_BIASSLP_MONITOR_DEFAULT 0
|
#define RTC_CNTL_BIASSLP_MONITOR_DEFAULT 0
|
||||||
|
#define RTC_CNTL_BIASSLP_SLEEP_ON 0
|
||||||
#define RTC_CNTL_BIASSLP_SLEEP_DEFAULT 1
|
#define RTC_CNTL_BIASSLP_SLEEP_DEFAULT 1
|
||||||
#define RTC_CNTL_PD_CUR_MONITOR_DEFAULT 0
|
#define RTC_CNTL_PD_CUR_MONITOR_DEFAULT 0
|
||||||
|
#define RTC_CNTL_PD_CUR_SLEEP_ON 0
|
||||||
#define RTC_CNTL_PD_CUR_SLEEP_DEFAULT 1
|
#define RTC_CNTL_PD_CUR_SLEEP_DEFAULT 1
|
||||||
#define RTC_CNTL_DG_VDD_DRV_B_SLP_DEFAULT 254
|
#define RTC_CNTL_DG_VDD_DRV_B_SLP_DEFAULT 254
|
||||||
|
|
||||||
@ -639,6 +642,7 @@ typedef struct {
|
|||||||
uint32_t wifi_pd_en : 1; //!< power down WiFi
|
uint32_t wifi_pd_en : 1; //!< power down WiFi
|
||||||
uint32_t bt_pd_en : 1; //!< power down BT
|
uint32_t bt_pd_en : 1; //!< power down BT
|
||||||
uint32_t cpu_pd_en : 1; //!< power down CPU, but not restart when lightsleep.
|
uint32_t cpu_pd_en : 1; //!< power down CPU, but not restart when lightsleep.
|
||||||
|
uint32_t int_8m_pd_en : 1; //!< Power down Internal 8M oscillator
|
||||||
uint32_t dig_peri_pd_en : 1; //!< power down digital peripherals
|
uint32_t dig_peri_pd_en : 1; //!< power down digital peripherals
|
||||||
uint32_t deep_slp : 1; //!< power down digital domain
|
uint32_t deep_slp : 1; //!< power down digital domain
|
||||||
uint32_t wdt_flashboot_mod_en : 1; //!< enable WDT flashboot mode
|
uint32_t wdt_flashboot_mod_en : 1; //!< enable WDT flashboot mode
|
||||||
@ -647,6 +651,7 @@ typedef struct {
|
|||||||
uint32_t rtc_dbias_wak : 5; //!< set bias for RTC domain, in active mode
|
uint32_t rtc_dbias_wak : 5; //!< set bias for RTC domain, in active mode
|
||||||
uint32_t rtc_dbias_slp : 5; //!< set bias for RTC domain, in sleep mode
|
uint32_t rtc_dbias_slp : 5; //!< set bias for RTC domain, in sleep mode
|
||||||
uint32_t vddsdio_pd_en : 1; //!< power down VDDSDIO regulator
|
uint32_t vddsdio_pd_en : 1; //!< power down VDDSDIO regulator
|
||||||
|
uint32_t xtal_fpu : 1; //!< keep main XTAL powered up in sleep
|
||||||
uint32_t deep_slp_reject : 1;
|
uint32_t deep_slp_reject : 1;
|
||||||
uint32_t light_slp_reject : 1;
|
uint32_t light_slp_reject : 1;
|
||||||
} rtc_sleep_config_t;
|
} rtc_sleep_config_t;
|
||||||
@ -659,6 +664,7 @@ typedef struct {
|
|||||||
*
|
*
|
||||||
* @param RTC_SLEEP_PD_x flags combined using bitwise OR
|
* @param RTC_SLEEP_PD_x flags combined using bitwise OR
|
||||||
*/
|
*/
|
||||||
|
#define is_dslp(pd_flags) ((pd_flags) & RTC_SLEEP_PD_DIG)
|
||||||
#define RTC_SLEEP_CONFIG_DEFAULT(sleep_flags) { \
|
#define RTC_SLEEP_CONFIG_DEFAULT(sleep_flags) { \
|
||||||
.lslp_mem_inf_fpu = 0, \
|
.lslp_mem_inf_fpu = 0, \
|
||||||
.rtc_mem_inf_follow_cpu = ((sleep_flags) & RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU) ? 1 : 0, \
|
.rtc_mem_inf_follow_cpu = ((sleep_flags) & RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU) ? 1 : 0, \
|
||||||
@ -668,14 +674,20 @@ typedef struct {
|
|||||||
.wifi_pd_en = ((sleep_flags) & RTC_SLEEP_PD_WIFI) ? 1 : 0, \
|
.wifi_pd_en = ((sleep_flags) & RTC_SLEEP_PD_WIFI) ? 1 : 0, \
|
||||||
.bt_pd_en = ((sleep_flags) & RTC_SLEEP_PD_BT) ? 1 : 0, \
|
.bt_pd_en = ((sleep_flags) & RTC_SLEEP_PD_BT) ? 1 : 0, \
|
||||||
.cpu_pd_en = ((sleep_flags) & RTC_SLEEP_PD_CPU) ? 1 : 0, \
|
.cpu_pd_en = ((sleep_flags) & RTC_SLEEP_PD_CPU) ? 1 : 0, \
|
||||||
|
.int_8m_pd_en = is_dslp(sleep_flags) ? 1 : ((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? 1 : 0, \
|
||||||
.dig_peri_pd_en = ((sleep_flags) & RTC_SLEEP_PD_DIG_PERIPH) ? 1 : 0, \
|
.dig_peri_pd_en = ((sleep_flags) & RTC_SLEEP_PD_DIG_PERIPH) ? 1 : 0, \
|
||||||
.deep_slp = ((sleep_flags) & RTC_SLEEP_PD_DIG) ? 1 : 0, \
|
.deep_slp = ((sleep_flags) & RTC_SLEEP_PD_DIG) ? 1 : 0, \
|
||||||
.wdt_flashboot_mod_en = 0, \
|
.wdt_flashboot_mod_en = 0, \
|
||||||
.dig_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
.dig_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
||||||
.dig_dbias_slp = RTC_CNTL_DBIAS_SLP, \
|
.dig_dbias_slp = is_dslp(sleep_flags) ? RTC_CNTL_DBIAS_SLP \
|
||||||
|
: !((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? RTC_CNTL_DBIAS_1V10 \
|
||||||
|
: RTC_CNTL_DBIAS_SLP, \
|
||||||
.rtc_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
.rtc_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
||||||
.rtc_dbias_slp = RTC_CNTL_DBIAS_SLP, \
|
.rtc_dbias_slp = is_dslp(sleep_flags) ? RTC_CNTL_DBIAS_SLP \
|
||||||
|
: !((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? RTC_CNTL_DBIAS_1V10 \
|
||||||
|
: RTC_CNTL_DBIAS_SLP, \
|
||||||
.vddsdio_pd_en = ((sleep_flags) & RTC_SLEEP_PD_VDDSDIO) ? 1 : 0, \
|
.vddsdio_pd_en = ((sleep_flags) & RTC_SLEEP_PD_VDDSDIO) ? 1 : 0, \
|
||||||
|
.xtal_fpu = is_dslp(sleep_flags) ? 0 : ((sleep_flags) & RTC_SLEEP_PD_XTAL) ? 0 : 1, \
|
||||||
.deep_slp_reject = 1, \
|
.deep_slp_reject = 1, \
|
||||||
.light_slp_reject = 1 \
|
.light_slp_reject = 1 \
|
||||||
};
|
};
|
||||||
@ -690,6 +702,8 @@ typedef struct {
|
|||||||
#define RTC_SLEEP_PD_BT BIT(7) //!< Power down BT
|
#define RTC_SLEEP_PD_BT BIT(7) //!< Power down BT
|
||||||
#define RTC_SLEEP_PD_CPU BIT(8) //!< Power down CPU when in lightsleep, but not restart
|
#define RTC_SLEEP_PD_CPU BIT(8) //!< Power down CPU when in lightsleep, but not restart
|
||||||
#define RTC_SLEEP_PD_DIG_PERIPH BIT(9) //!< Power down DIG peripherals
|
#define RTC_SLEEP_PD_DIG_PERIPH BIT(9) //!< Power down DIG peripherals
|
||||||
|
#define RTC_SLEEP_PD_INT_8M BIT(10) //!< Power down Internal 8M oscillator
|
||||||
|
#define RTC_SLEEP_PD_XTAL BIT(11) //!< Power down main XTAL
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Prepare the chip to enter sleep mode
|
* @brief Prepare the chip to enter sleep mode
|
||||||
|
@ -117,11 +117,14 @@ extern "C" {
|
|||||||
set sleep_init default param
|
set sleep_init default param
|
||||||
*/
|
*/
|
||||||
#define RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_DEFAULT 6
|
#define RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_DEFAULT 6
|
||||||
|
#define RTC_CNTL_DBG_ATTEN_LIGHTSLEEP_NODROP 0
|
||||||
#define RTC_CNTL_DBG_ATTEN_DEEPSLEEP_DEFAULT 15
|
#define RTC_CNTL_DBG_ATTEN_DEEPSLEEP_DEFAULT 15
|
||||||
#define RTC_CNTL_DBG_ATTEN_MONITOR_DEFAULT 0
|
#define RTC_CNTL_DBG_ATTEN_MONITOR_DEFAULT 0
|
||||||
#define RTC_CNTL_BIASSLP_MONITOR_DEFAULT 0
|
#define RTC_CNTL_BIASSLP_MONITOR_DEFAULT 0
|
||||||
|
#define RTC_CNTL_BIASSLP_SLEEP_ON 0
|
||||||
#define RTC_CNTL_BIASSLP_SLEEP_DEFAULT 1
|
#define RTC_CNTL_BIASSLP_SLEEP_DEFAULT 1
|
||||||
#define RTC_CNTL_PD_CUR_MONITOR_DEFAULT 1
|
#define RTC_CNTL_PD_CUR_MONITOR_DEFAULT 1
|
||||||
|
#define RTC_CNTL_PD_CUR_SLEEP_ON 0
|
||||||
#define RTC_CNTL_PD_CUR_SLEEP_DEFAULT 1
|
#define RTC_CNTL_PD_CUR_SLEEP_DEFAULT 1
|
||||||
|
|
||||||
#define APLL_SDM_STOP_VAL_1 0x09
|
#define APLL_SDM_STOP_VAL_1 0x09
|
||||||
@ -654,6 +657,7 @@ typedef struct {
|
|||||||
uint32_t rtc_slowmem_pd_en : 1; //!< power down RTC slow memory
|
uint32_t rtc_slowmem_pd_en : 1; //!< power down RTC slow memory
|
||||||
uint32_t rtc_peri_pd_en : 1; //!< power down RTC peripherals
|
uint32_t rtc_peri_pd_en : 1; //!< power down RTC peripherals
|
||||||
uint32_t wifi_pd_en : 1; //!< power down WiFi
|
uint32_t wifi_pd_en : 1; //!< power down WiFi
|
||||||
|
uint32_t int_8m_pd_en : 1; //!< Power down Internal 8M oscillator
|
||||||
uint32_t deep_slp : 1; //!< power down digital domain
|
uint32_t deep_slp : 1; //!< power down digital domain
|
||||||
uint32_t wdt_flashboot_mod_en : 1; //!< enable WDT flashboot mode
|
uint32_t wdt_flashboot_mod_en : 1; //!< enable WDT flashboot mode
|
||||||
uint32_t dig_dbias_wak : 3; //!< set bias for digital domain, in active mode
|
uint32_t dig_dbias_wak : 3; //!< set bias for digital domain, in active mode
|
||||||
@ -661,6 +665,7 @@ typedef struct {
|
|||||||
uint32_t rtc_dbias_wak : 3; //!< set bias for RTC domain, in active mode
|
uint32_t rtc_dbias_wak : 3; //!< set bias for RTC domain, in active mode
|
||||||
uint32_t rtc_dbias_slp : 3; //!< set bias for RTC domain, in sleep mode
|
uint32_t rtc_dbias_slp : 3; //!< set bias for RTC domain, in sleep mode
|
||||||
uint32_t vddsdio_pd_en : 1; //!< power down VDDSDIO regulator
|
uint32_t vddsdio_pd_en : 1; //!< power down VDDSDIO regulator
|
||||||
|
uint32_t xtal_fpu : 1; //!< keep main XTAL powered up in sleep
|
||||||
uint32_t deep_slp_reject : 1;
|
uint32_t deep_slp_reject : 1;
|
||||||
uint32_t light_slp_reject : 1;
|
uint32_t light_slp_reject : 1;
|
||||||
} rtc_sleep_config_t;
|
} rtc_sleep_config_t;
|
||||||
@ -673,6 +678,7 @@ typedef struct {
|
|||||||
*
|
*
|
||||||
* @param RTC_SLEEP_PD_x flags combined using bitwise OR
|
* @param RTC_SLEEP_PD_x flags combined using bitwise OR
|
||||||
*/
|
*/
|
||||||
|
#define is_dslp(pd_flags) ((pd_flags) & RTC_SLEEP_PD_DIG)
|
||||||
#define RTC_SLEEP_CONFIG_DEFAULT(sleep_flags) { \
|
#define RTC_SLEEP_CONFIG_DEFAULT(sleep_flags) { \
|
||||||
.lslp_mem_inf_fpu = 0, \
|
.lslp_mem_inf_fpu = 0, \
|
||||||
.rtc_mem_inf_follow_cpu = ((sleep_flags) & RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU) ? 1 : 0, \
|
.rtc_mem_inf_follow_cpu = ((sleep_flags) & RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU) ? 1 : 0, \
|
||||||
@ -680,13 +686,21 @@ typedef struct {
|
|||||||
.rtc_slowmem_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_SLOW_MEM) ? 1 : 0, \
|
.rtc_slowmem_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_SLOW_MEM) ? 1 : 0, \
|
||||||
.rtc_peri_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_PERIPH) ? 1 : 0, \
|
.rtc_peri_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_PERIPH) ? 1 : 0, \
|
||||||
.wifi_pd_en = ((sleep_flags) & RTC_SLEEP_PD_WIFI) ? 1 : 0, \
|
.wifi_pd_en = ((sleep_flags) & RTC_SLEEP_PD_WIFI) ? 1 : 0, \
|
||||||
|
.int_8m_pd_en = is_dslp(sleep_flags) ? 1 : ((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? 1 : 0, \
|
||||||
.deep_slp = ((sleep_flags) & RTC_SLEEP_PD_DIG) ? 1 : 0, \
|
.deep_slp = ((sleep_flags) & RTC_SLEEP_PD_DIG) ? 1 : 0, \
|
||||||
.wdt_flashboot_mod_en = 0, \
|
.wdt_flashboot_mod_en = 0, \
|
||||||
.dig_dbias_wak = RTC_CNTL_DIG_DBIAS_1V10, \
|
.dig_dbias_wak = RTC_CNTL_DIG_DBIAS_1V10, \
|
||||||
.dig_dbias_slp = RTC_CNTL_DIG_DBIAS_0V90, \
|
.dig_dbias_slp = is_dslp(sleep_flags) ? RTC_CNTL_DIG_DBIAS_0V90 \
|
||||||
|
: !((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? RTC_CNTL_DIG_DBIAS_1V10 \
|
||||||
|
: !((sleep_flags) & RTC_SLEEP_PD_XTAL) ? RTC_CNTL_DIG_DBIAS_1V10 \
|
||||||
|
: RTC_CNTL_DIG_DBIAS_0V90, \
|
||||||
.rtc_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
.rtc_dbias_wak = RTC_CNTL_DBIAS_1V10, \
|
||||||
.rtc_dbias_slp = RTC_CNTL_DBIAS_1V00, \
|
.rtc_dbias_slp = is_dslp(sleep_flags) ? RTC_CNTL_DBIAS_1V00 \
|
||||||
|
: !((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? RTC_CNTL_DBIAS_1V10 \
|
||||||
|
: !((sleep_flags) & RTC_SLEEP_PD_XTAL) ? RTC_CNTL_DBIAS_1V10 \
|
||||||
|
: RTC_CNTL_DBIAS_1V00, \
|
||||||
.vddsdio_pd_en = ((sleep_flags) & RTC_SLEEP_PD_VDDSDIO) ? 1 : 0, \
|
.vddsdio_pd_en = ((sleep_flags) & RTC_SLEEP_PD_VDDSDIO) ? 1 : 0, \
|
||||||
|
.xtal_fpu = is_dslp(sleep_flags) ? 0 : ((sleep_flags) & RTC_SLEEP_PD_XTAL) ? 0 : 1, \
|
||||||
.deep_slp_reject = 1, \
|
.deep_slp_reject = 1, \
|
||||||
.light_slp_reject = 1 \
|
.light_slp_reject = 1 \
|
||||||
};
|
};
|
||||||
@ -698,6 +712,8 @@ typedef struct {
|
|||||||
#define RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU BIT(4) //!< RTC FAST and SLOW memories are automatically powered up and down along with the CPU
|
#define RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU BIT(4) //!< RTC FAST and SLOW memories are automatically powered up and down along with the CPU
|
||||||
#define RTC_SLEEP_PD_VDDSDIO BIT(5) //!< Power down VDDSDIO regulator
|
#define RTC_SLEEP_PD_VDDSDIO BIT(5) //!< Power down VDDSDIO regulator
|
||||||
#define RTC_SLEEP_PD_WIFI BIT(6)
|
#define RTC_SLEEP_PD_WIFI BIT(6)
|
||||||
|
#define RTC_SLEEP_PD_INT_8M BIT(7) //!< Power down Internal 8M oscillator
|
||||||
|
#define RTC_SLEEP_PD_XTAL BIT(8) //!< Power down main XTAL
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Prepare the chip to enter sleep mode
|
* @brief Prepare the chip to enter sleep mode
|
||||||
|
@ -672,6 +672,8 @@ typedef struct {
|
|||||||
#define RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU BIT(4) //!< RTC FAST and SLOW memories are automatically powered up and down along with the CPU
|
#define RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU BIT(4) //!< RTC FAST and SLOW memories are automatically powered up and down along with the CPU
|
||||||
#define RTC_SLEEP_PD_VDDSDIO BIT(5) //!< Power down VDDSDIO regulator
|
#define RTC_SLEEP_PD_VDDSDIO BIT(5) //!< Power down VDDSDIO regulator
|
||||||
#define RTC_SLEEP_PD_WIFI BIT(6)
|
#define RTC_SLEEP_PD_WIFI BIT(6)
|
||||||
|
#define RTC_SLEEP_PD_INT_8M BIT(10) //!< Power down Internal 8M oscillator
|
||||||
|
#define RTC_SLEEP_PD_XTAL BIT(11) //!< Power down main XTAL
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Prepare the chip to enter sleep mode
|
* @brief Prepare the chip to enter sleep mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user