Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_fastmem_slowmem_lost_data_bug_v5.1' into 're…
Browse files Browse the repository at this point in the history
…lease/v5.1'

[C3/S3]Fix sleep fast_mem & slow_mem may lost bug (v5.1)

See merge request espressif/esp-idf!29641
  • Loading branch information
jack0c committed Mar 15, 2024
2 parents 4885b77 + 9680d3f commit 9eb22e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/esp_hw_support/port/esp32c3/rtc_sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
}
/* mem force pu */
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_LSLP_MEM_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_FASTMEM_FORCE_LPU);

REG_SET_FIELD(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU, cfg.rtc_regulator_fpu);
if (!cfg.int_8m_pd_en) {
SET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_FORCE_PU);
Expand Down
2 changes: 2 additions & 0 deletions components/esp_hw_support/port/esp32s3/rtc_sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
}
/* mem force pu */
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_LSLP_MEM_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_PWC_REG, RTC_CNTL_FASTMEM_FORCE_LPU);
SET_PERI_REG_MASK(RTC_CNTL_PWC_REG, RTC_CNTL_SLOWMEM_FORCE_LPU);

REG_SET_FIELD(RTC_CNTL_REG, RTC_CNTL_REGULATOR_FORCE_PU, cfg.rtc_regulator_fpu);
if (!cfg.int_8m_pd_en) {
Expand Down

0 comments on commit 9eb22e6

Please sign in to comment.