SPI_FLASH_ERASE_YIELD_DURATION_MS and CONFIG_SPI_FLASH_ERASE_YIELD_TICKS
Posted: Thu Jan 04, 2024 12:02 am
Can someone explain what SPI_FLASH_ERASE_YIELD_DURATION_MS and CONFIG_SPI_FLASH_ERASE_YIELD_TICKS do? The descriptions from docs.espressif.com are not worded very well and almost sound exactly the same. Is CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS the amount of time passed to vTaskDelay() at the end of a call to esp_partition_erase_range()? How is CONFIG_SPI_FLASH_ERASE_YIELD_TICKS any different?
and the comments there seem to require a deeper understanding of the entire SPI flash component.
I've also looked at the source inCONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS
Duration of erasing to yield CPUs (ms)
Found in: Component config > SPI Flash driver > CONFIG_SPI_FLASH_YIELD_DURING_ERASE
If a duration of one erase command is large then it will yield CPUs after finishing a current command.
Default value:
20
CONFIG_SPI_FLASH_ERASE_YIELD_TICKS
CPU release time (tick) for an erase operation
Found in: Component config > SPI Flash driver > CONFIG_SPI_FLASH_YIELD_DURING_ERASE
Defines how many ticks will be before returning to continue a erasing.
Default value:
1
Code: Select all
components/spi_flash/spi_flash_os_func_app.c