mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
app_update: fix intermittent failure with firmware updates
Routine `spi_flash_cache2phys` sometimes return incorrect value, resulting in failure in getting currently running ota partition. This in turn aborts firmware update process.This issue was more prominent with SPIRAM enabled cases. Fix ensures proper cache guards during `spi_flash_cache2phys`, and also for few other similar APIs. In addition, `esp_ota_get_running_partition` has also been optimized to save currently running partition for subsequent invocations. Fixes https://github.com/espressif/esp-idf/issues/2451
This commit is contained in:
@@ -244,15 +244,13 @@ void spi_flash_mmap_dump();
|
||||
/**
|
||||
* @brief get free pages number which can be mmap
|
||||
*
|
||||
* This function will return free page number of the mmu table which can mmap,
|
||||
* when you want to call spi_flash_mmap to mmap an ranger of flash data to Dcache or Icache
|
||||
* memmory region, maybe the size of MMU table will exceed,so if you are not sure the
|
||||
* size need mmap is ok, can call the interface and watch how many MMU table page can be
|
||||
* mmaped.
|
||||
* This function will return number of free pages available in mmu table. This could be useful
|
||||
* before calling actual spi_flash_mmap (maps flash range to DCache or ICache memory) to check
|
||||
* if there is sufficient space available for mapping.
|
||||
*
|
||||
* @param memory memmory type of MMU table free page
|
||||
* @param memory memory type of MMU table free page
|
||||
*
|
||||
* @return number of free pages which can be mmaped
|
||||
* @return number of free pages which can be mmaped
|
||||
*/
|
||||
uint32_t spi_flash_mmap_get_free_pages(spi_flash_mmap_memory_t memory);
|
||||
|
||||
|
Reference in New Issue
Block a user