2022-04-29 12:17 PM
Hello,
Today, I'm using the MX25LM51245GXDI00 external flash memory on the demoboard B-U585I-IOT02A to store some data and to retrieve them using STM32CubeProgrammer.
In order to do it, after erasing a sector (4K bytes), I configure OCTOSPI2 (dedicated to the flash memory) to memory mapped mode and write a page (256 bytes). Then I have to switch off memory mapped mode and turn it on again after in order to be able to write another page (even if it is in the same sector than previous). So it's quite weird for me, especially that when I'm using cubeProgrammer, I only have to configure the flash memory to memory mapped mode only once to be able to read all external flash memory.
Moreover, I've implemented OCTOSPI1 to use with external PSRAM memory APS6408L‑3OB‑BA and for this memory, I can switch octospi1 to memory mapped mode only once in order to be able to write and read all addresses in SRAM.
So my question is the following : Is it mandatory to turn on and off the memory mapped for each page programmation for external NOR flash, or is there a way to simply turn on memory mapped only once and be able to write several consecutive pages ?
I've tried to find the answer on Github but I've not been able today to find an answer to my question.
Thank you very much for your time,
Solved! Go to Solution.
2022-05-01 09:53 AM
Well it seems I just figured it out the reason why I was forced to turn on then off memory mapped. I completely forgot that write enable cannot be set with memory mapping mode. Which is not the case for SRAM.
2022-05-01 09:53 AM
Well it seems I just figured it out the reason why I was forced to turn on then off memory mapped. I completely forgot that write enable cannot be set with memory mapping mode. Which is not the case for SRAM.