Skip to main content
Explorer
December 4, 2024
Solved

Quad SPI indirect and memory mapped modes

  • December 4, 2024
  • 1 reply
  • 1007 views

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

This topic has been closed for replies.
Best answer by Tesla DeLorean

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.

1 reply

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
December 4, 2024

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..