Merge branch 'bugfix/deep_sleep_load_not_load_rtc' into 'master'

Fix esp8266 load RTC segment when reset from deep sleep

See merge request sdk/ESP8266_RTOS_SDK!840
This commit is contained in:
Wu Jian Gang
2019-03-15 20:40:23 +08:00
4 changed files with 56 additions and 11 deletions

View File

@ -178,10 +178,17 @@
#define IRAM_SIZE (48 * 1024)
#define FLASH_BASE (0x40200000)
#define FLASH_SIZE (16 * 1024 * 1024)
#define FLASH_SIZE (1 * 1024 * 1024)
#define RTC_SYS_BASE (0x60001000)
#define RTC_SYS_SIZE (0x200)
#define RTC_USER_BASE (0x60001200)
#define RTC_USER_SIZE (0x200)
#define IS_DRAM(a) ((size_t)(a) >= DRAM_BASE && (size_t)(a) < (DRAM_BASE + DRAM_SIZE))
#define IS_IRAM(a) ((size_t)(a) >= IRAM_BASE && (size_t)(a) < (IRAM_BASE + IRAM_SIZE))
#define IS_FLASH(a) ((size_t)(a) >= FLASH_BASE && (size_t)(a) < (FLASH_BASE + FLASH_SIZE))
#define IS_USR_RTC(a) ((size_t)(a) >= RTC_USER_BASE && (size_t)(a) < (RTC_USER_BASE + RTC_USER_SIZE))
#endif //_EAGLE_SOC_H_

View File

@ -15,6 +15,7 @@
#pragma once
#include <stdint.h>
#include <esp_system.h>
#ifdef __cplusplus
extern "C" {
@ -48,6 +49,13 @@ void esp_reset_reason_init(void);
*/
void esp_reset_reason_set_hint(esp_reset_reason_t hint);
/**
* @brief Get reason of last reset but not clear it for next reset
*
* @return See description of esp_reset_reason_t for explanation of each value.
*/
esp_reset_reason_t esp_reset_reason_early(void);
#ifdef __cplusplus
}
#endif