fix psram crash

This commit is contained in:
MicroDev 2023-03-02 11:50:12 +05:30 committed by Scott Shawcroft
parent 7b9c87e432
commit 242a720593
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
3 changed files with 3 additions and 11 deletions

View File

@ -44,7 +44,6 @@
#else
#define esp_himem_reserved_area_size() (0)
#endif
bool ok_to_reserve_psram = true;
size_t reserved_psram = DEFAULT_RESERVED_PSRAM;
#endif
@ -63,9 +62,6 @@ bool common_hal_espidf_set_reserved_psram(size_t amount) {
if (!esp_psram_is_initialized()) {
return false;
}
if (!ok_to_reserve_psram) {
return false;
}
if (amount > psram_size_usable()) {
return false;
}
@ -113,11 +109,7 @@ size_t common_hal_espidf_get_total_psram(void) {
intptr_t common_hal_espidf_get_psram_start(void) {
#ifdef CONFIG_SPIRAM
if (esp_psram_is_initialized()) {
#ifdef CONFIG_IDF_TARGET_ESP32
return SOC_EXTRAM_DATA_LOW;
#else
return SOC_EXTRAM_DATA_HIGH - psram_size_usable();
#endif
}
#endif
return 0;
@ -126,7 +118,7 @@ intptr_t common_hal_espidf_get_psram_start(void) {
intptr_t common_hal_espidf_get_psram_end(void) {
#ifdef CONFIG_SPIRAM
if (esp_psram_is_initialized()) {
return common_hal_espidf_get_psram_start() + psram_size_usable();
return SOC_EXTRAM_DATA_LOW + psram_size_usable();
}
#endif
return 0;

View File

@ -61,7 +61,7 @@ CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y
# Hardware Abstraction Layer (HAL) and Low Level (LL)
#
# CONFIG_HAL_ASSERTION_DISABLE is not set
# CONFIG_HAL_ASSERTION_SILIENT is not set
# CONFIG_HAL_ASSERTION_SILENT is not set
# CONFIG_HAL_ASSERTION_ENABLE is not set
CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2
# end of Hardware Abstraction Layer (HAL) and Low Level (LL)

View File

@ -6,7 +6,7 @@ CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
CONFIG_ESP_IPC_TASK_STACK_SIZE=1536
CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384
CONFIG_ESP_TASK_WDT=n
CONFIG_ESP_TASK_WDT_INIT=n
CONFIG_ESP_TLS_SERVER=y