1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Only erase RTC RAM if sleep mode doesn't look valid (#619)

Source: http://esp8266.ru/forum/threads/mem-check-fail.168/#post-7354
This commit is contained in:
Ivan Grokhotkov 2015-08-05 08:39:34 -04:00
parent 5cbaa57af9
commit e02932fcdd

View File

@ -261,7 +261,10 @@ void user_rf_pre_init() {
// *((volatile uint32_t*) 0x60000710) = 0; // *((volatile uint32_t*) 0x60000710) = 0;
volatile uint32_t* rtc_reg = (volatile uint32_t*) 0x60001000; volatile uint32_t* rtc_reg = (volatile uint32_t*) 0x60001000;
rtc_reg[30] = 0; if((rtc_reg[24] >> 16) > 4) {
rtc_reg[24] &= 0xFFFF;
rtc_reg[30] = 0;
}
system_set_os_print(0); system_set_os_print(0);
__run_user_rf_pre_init(); __run_user_rf_pre_init();