2025-01-16 09:22 PM - last edited on 2025-02-10 08:06 AM by Andrew Neil
My firmware application is stored in external NOR flash which is memory mapped using XSPI and then loaded by a bootloader. However I also need to interface with the external NOR flash in command mode so I can e.g. store a filesystem there. I can't switch out of memory mapped mode because then my application can't run. How am I meant to get around this dilemma?
2025-02-10 08:04 AM
Hello @roganmorrow and welcome to the community;
Could you give more details about the external NOR flash memory and the STM32MCUs? Is the external memory supporting the multibank feature?
Are you using the XSPI read-while-write feature and XIP on STM32 MCUs?
Thank you.
Kaouthar
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-02-10 09:30 AM
>>How am I meant to get around this dilemma?
Going to be awkward.
You could make some hard choices.
You can HAL_QSPI_Abort() out of memory mapped mode, but then you'd need to prevent other code from accessing and running from the external memory during that period. Watch for interrupts and threaded execution. Probably not ideal going out-to-lunch for 10's or 100's of milliseconds.
Put read-only portion of the file system on the NOR Flash? Use a RAM-DISK for volatile stuff.
You could put your file system on a more suitable memory like an eMMC, or use another NOR Flash on a SPI bus.