spi_flash: fix stale read issue for memory mapped partition

On flash program operation (either erase or write), if corresponding address has
cache mapping present then cache is explicitly flushed (for both pro and app cpu)

Closes https://github.com/espressif/esp-idf/issues/2146
This commit is contained in:
Mahavir Jain
2019-03-08 11:00:49 +05:30
committed by bot
parent dca5ed2263
commit 30d2f13358
4 changed files with 72 additions and 101 deletions

View File

@@ -11,9 +11,9 @@ void spi_flash_init(const char* chip_size, size_t block_size, size_t sector_size
_spi_flash_init(chip_size, block_size, sector_size, page_size, partition_bin);
}
void spi_flash_mark_modified_region(size_t start_addr, size_t length)
bool spi_flash_check_and_flush_cache(size_t start_addr, size_t length)
{
return;
return true;
}
esp_rom_spiflash_result_t esp_rom_spiflash_unlock()
@@ -54,4 +54,4 @@ void spi_flash_disable_interrupts_caches_and_other_cpu_no_os()
void spi_flash_enable_interrupts_caches_no_os()
{
return;
}
}