mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
spi_flash: don't call vTaskDelay in non-os context
Fixes regression in core dump, when a crash happens in interrupt context.
This commit is contained in:
@@ -372,7 +372,9 @@ esp_err_t IRAM_ATTR esp_flash_erase_region(esp_flash_t *chip, uint32_t start, ui
|
||||
no_yield_time_us += (esp_timer_get_time() - start_time_us);
|
||||
if (no_yield_time_us / 1000 >= CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS) {
|
||||
no_yield_time_us = 0;
|
||||
vTaskDelay(CONFIG_SPI_FLASH_ERASE_YIELD_TICKS);
|
||||
if (chip->os_func->yield) {
|
||||
chip->os_func->yield(chip->os_func_data);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user