2025-02-19 11:30 AM - edited 2025-03-03 6:54 AM
I have a system that I am migrating from a part with more RAM to the STM32H733. I already have external FLASH set up and operating well but the amount of RAM available for heap is anemic for future growth.
The external flash is running on the OCTOSPI in quad-spi mode to save on pins. The goal would be to not add many if any pins for external PSRAM and use chip select to move between the two spaces.
It looks from the docs like this is doable, there are examples on other micros in this doc https://www.st.com/resource/en/application_note/an5050-getting-started-with-octospi-hexadecaspi-and-xspi-interface-on-stm32-mcus-stmicroelectronics.pdf and the H733 documentation talks about external Flash options with OCTOSPI.
What I am wary of is trying to memory map on both peripherals using the same pins for the heap while executing code out of our external flash. Our application is not super intensive but we do have a display to animate and such so the throughput can't be terrible.
Is this only practical with OCTOSPI1 for one and OCTOSPI2 for the other? Or can we make it work with the chip select on OCTOSPI2 controlling which chip we are mapped to?
Anyone done the same or have advice on optimizing this?
2025-02-19 1:09 PM
On closer examination it looks like the configuration in Figure 7 page 24 would work for us, mutiplexing between flash and ram.. though their example does not show a PSRAM usage.. The time based multiplexing has to be a hit to speed of course, but with cashing and such not sure how much.
2025-03-03 1:36 AM
Hello @AJone.5,
The STM32H533 has only one OCTOSPI interface. So, the multiplexed mode isn’t supported.
As mentioned in AN5050 the multiplexed mode is only available on STM32L4P5xx/Q5xx, STM32H7A3xx/7B3xx, STM32H7B0xx, STM32H72xxx/73xxx, STM32U5F9xx/5G7xx/5G9xx, STM32U595xx/599xx/5A5xx/5A9xx, STM32U575xx/585xx, and STM32N6xx devices.
If you want to connect two external memories to one OCTOSPI interface, I advice you to take a look AN5050 precisely Figure 12. Connecting two memories to an Octo-SPI interface and this FAQ: How to connect two quad-SPI memories using only one OCTOSPI - STMicroelectronics Community.
I hope this help you.
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-03-03 6:54 AM
A Typo, our processor is the H733 so it does support two OCTOSPI and we are indeed planning on using the setup in Figure 12. What I am still not sure on is how much this will impact our access speeds if both external memories are memory mapped and being used for a file system on one side and RAM access on the other simultaneously.