2024-12-04 09:50 AM
Hello Community,
I have a NOR Flash memory connected to my MCU (STM32U585) by QUAD-SPI. I plan to use the indirect mode, for erasing and programming the contents of the flash, in one context of my program. And in another context, exclusive of the other, use memory mapped mode to exploit the data already programmed in the flash.
I understand that indirect mode and memory mapped mode are exclusive. I do not expect to use the two modes at the same time. But I would like to have confirmation that it is possible to switch back and forth from indirect to memory mapped mode, whenever necessary.
Thanks.
Eric Lucazeau
2024-12-04 09:56 AM
You can HAL_OSPI_Abort() out of Memory Mapped Mode.
Memory Mapped mode basically uses a "Read Command" template where the MCU/Peripheral fill in the "Address" parameter on-the-fly. Once you stop it doing this you can access the device normallly. Direct access, within the primary MCU memory space will then fault
Writing and Erasing are both very slow, asymmetrically compared to the optimization for the Reading, which is assumed to be the primary mode of operation.