cancel
Showing results for 
Search instead for 
Did you mean: 

Quad SPI indirect and memory mapped modes

elucazeau
Visitor

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

1 REPLY 1

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..