You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v5.3.1
Espressif SoC revision.
ESP32-S3 (QFN56) (revision v0.1)
Operating System used.
macOS
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-DevKitC-1 v1.0
Power Supply used.
USB
What is the expected behavior?
mmap flash reads should return correct data
What is the actual behavior?
mmap read returns garbage randomly. Turning off PSRAM XIP (CONFIG_SPIRAM_FETCH_INSTRUCTIONS & CONFIG_SPIRAM_RODATA) seems to avoid the issue. Perhaps because when PSRAM XIP is enabled (aka SPI_FLASH_CACHE_NO_DISABLE) the regular flash APIs use mutex locking, but the MMAP APIs disable the cache?
This bug was initially discovered when a call to esp_ota_set_boot_partition() (which uses MMAP flash reads) failed while another thread was writing to to a different partition.
github-actionsbot
changed the title
Writing flash data with PSRAM XIP enabled causes MMAP flash read errors
Writing flash data with PSRAM XIP enabled causes MMAP flash read errors (IDFGH-14084)
Nov 15, 2024
Answers checklist.
IDF version.
v5.3.1
Espressif SoC revision.
ESP32-S3 (QFN56) (revision v0.1)
Operating System used.
macOS
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-DevKitC-1 v1.0
Power Supply used.
USB
What is the expected behavior?
mmap flash reads should return correct data
What is the actual behavior?
mmap read returns garbage randomly. Turning off PSRAM XIP (CONFIG_SPIRAM_FETCH_INSTRUCTIONS & CONFIG_SPIRAM_RODATA) seems to avoid the issue. Perhaps because when PSRAM XIP is enabled (aka SPI_FLASH_CACHE_NO_DISABLE) the regular flash APIs use mutex locking, but the MMAP APIs disable the cache?
Steps to reproduce.
main.c.txt
Debug Logs.
More Information.
partitions_example.csv
sdkconfig.txt
The text was updated successfully, but these errors were encountered: