deep sleep: RTC fast memory may be disconnected after deep sleep wakeup
This adds a workaround for a bug that following deep sleep wakeup, ISO (bus isolation) signal may be set for RTC fast memory. We set FORCE_NOISO bit in RTC_CNTL_PWC_REG until we find out what is causing ISO signal to be set.
This commit is contained in:
parent
35115885c5
commit
83184bd52b
|
@ -18,6 +18,8 @@
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "phy.h"
|
#include "phy.h"
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
|
#include "soc/soc.h"
|
||||||
|
#include "soc/rtc_cntl_reg.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is not exposed as an API at this point,
|
* This function is not exposed as an API at this point,
|
||||||
|
@ -36,6 +38,10 @@ void esp_set_cpu_freq(void)
|
||||||
uart_tx_wait_idle(CONFIG_CONSOLE_UART_NUM);
|
uart_tx_wait_idle(CONFIG_CONSOLE_UART_NUM);
|
||||||
|
|
||||||
rtc_init_lite(XTAL_AUTO);
|
rtc_init_lite(XTAL_AUTO);
|
||||||
|
// work around a bug that RTC fast memory may be isolated
|
||||||
|
// from the system after rtc_init_lite
|
||||||
|
SET_PERI_REG_MASK(RTC_CNTL_PWC_REG, RTC_CNTL_FASTMEM_FORCE_NOISO_M);
|
||||||
|
|
||||||
cpu_freq_t freq = CPU_80M;
|
cpu_freq_t freq = CPU_80M;
|
||||||
switch(freq_mhz) {
|
switch(freq_mhz) {
|
||||||
case 240:
|
case 240:
|
||||||
|
|
Loading…
Reference in a new issue