mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +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:
parent
5cbaa57af9
commit
e02932fcdd
@ -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;
|
||||||
|
if((rtc_reg[24] >> 16) > 4) {
|
||||||
|
rtc_reg[24] &= 0xFFFF;
|
||||||
rtc_reg[30] = 0;
|
rtc_reg[30] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
system_set_os_print(0);
|
system_set_os_print(0);
|
||||||
__run_user_rf_pre_init();
|
__run_user_rf_pre_init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user