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:
Ivan Grokhotkov 2016-12-14 14:23:40 +08:00
parent 35115885c5
commit 83184bd52b

View file

@ -18,6 +18,8 @@
#include "sdkconfig.h"
#include "phy.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,
@ -36,6 +38,10 @@ void esp_set_cpu_freq(void)
uart_tx_wait_idle(CONFIG_CONSOLE_UART_NUM);
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;
switch(freq_mhz) {
case 240: