/* If you're going to modify this, keep in mind that while the flash caches of the pro and app cpu are separate, the psram cache is  */
void IRAM_ATTR spi_flash_op_block_func(void *arg)
/* If you're going to modify this, keep in mind that while the flash caches of the pro and app cpu are separate, the psram cache is  */
void IRAM_ATTR spi_flash_op_block_func(void *arg)
{
    vTaskSuspendAll();
    esp_intr_noniram_disable();
    uint32_t cpuid = (uint32_t) arg;
    s_flash_op_complete = false;
    s_flash_op_can_start = true;
    while (!s_flash_op_complete) {
    }
    spi_flash_restore_cache(cpuid, s_flash_op_cache_state[cpuid]);
    esp_intr_noniram_enable();
    xTaskResumeAll();
}