add soft solution for esp32 eco3 live lock issue

This commit is contained in:
Li Shuai
2020-06-05 06:04:18 +00:00
committed by bot
parent 55b319e1ae
commit 72f583dfa7
6 changed files with 345 additions and 3 deletions
+6
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
+4
View File
@@ -406,6 +406,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();
+7
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