Merge branch 'bugfix/customer_baidu_int_wdt_master' into 'master'

system: add soft solution for esp32 eco3 live lock issue

See merge request espressif/esp-idf!8968
This commit is contained in:
Jiang Jiang Jian
2020-06-17 11:53:25 +08:00
6 changed files with 345 additions and 3 deletions

View File

@@ -4,6 +4,11 @@ menu "ESP32-specific"
# not working so we just hide all items here
visible if IDF_TARGET_ESP32
config ESP32_ECO3_CACHE_LOCK_FIX
bool
default y
depends on !FREERTOS_UNICORE && ESP32_SPIRAM_SUPPORT
choice ESP32_REV_MIN
prompt "Minimum Supported ESP32 Revision"
default ESP32_REV_MIN_0
@@ -19,6 +24,7 @@ menu "ESP32-specific"
bool "Rev 2"
config ESP32_REV_MIN_3
bool "Rev 3"
select ESP_INT_WDT if ESP32_ECO3_CACHE_LOCK_FIX
endchoice
config ESP32_REV_MIN

View File

@@ -407,6 +407,10 @@ void start_cpu0_default(void)
esp_int_wdt_init();
//Initialize the interrupt watch dog for CPU0.
esp_int_wdt_cpu_init();
#else
#if CONFIG_ESP32_ECO3_CACHE_LOCK_FIX
assert(!soc_has_cache_lock_bug() && "ESP32 Rev 3 + Dual Core + PSRAM requires INT WDT enabled in project config!");
#endif
#endif
esp_cache_err_int_init();
esp_crosscore_int_init();

View File

@@ -172,3 +172,10 @@ void esp_chip_info(esp_chip_info_t* out_info)
out_info->features |= CHIP_FEATURE_EMB_FLASH;
}
}
#if CONFIG_ESP32_ECO3_CACHE_LOCK_FIX
inline bool soc_has_cache_lock_bug(void)
{
return (esp_efuse_get_chip_ver() == 3);
}
#endif