flash_mmap: restore interrupt and cache before err return
This commit is contained in:
parent
9debc7248a
commit
4f3ddbb299
1 changed files with 1 additions and 0 deletions
|
@ -157,6 +157,7 @@ esp_err_t IRAM_ATTR spi_flash_mmap_pages(const int *pages, size_t page_count, sp
|
||||||
uint32_t region_addr; // base address of memory region
|
uint32_t region_addr; // base address of memory region
|
||||||
get_mmu_region(memory,®ion_begin,®ion_size,®ion_addr);
|
get_mmu_region(memory,®ion_begin,®ion_size,®ion_addr);
|
||||||
if (region_size < page_count) {
|
if (region_size < page_count) {
|
||||||
|
spi_flash_enable_interrupts_caches_and_other_cpu();
|
||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
}
|
}
|
||||||
// The following part searches for a range of MMU entries which can be used.
|
// The following part searches for a range of MMU entries which can be used.
|
||||||
|
|
Loading…
Reference in a new issue