cancel
Showing results for 
Search instead for 
Did you mean: 

Would it be possible to run code that is partly written in internal flash and partly written in external flash?

Auloedus
Associate II

Hi everyone!

Quick question: this is my platform.

  • STM32F4 main controller
  • external QSPI flash

I'm currently using FreeRTOS with TouchGFX so the external flash stores the graphical resources. In case I run out of memory, could I run some of the code (the "excess" code) in external memory by modifying the linker file appropriately? Obviously I'll have performance issues because I would have to fetch code from the QSPI, but would it be feasible in a theoretical way at least?

Many thanks to all! :)

1 ACCEPTED SOLUTION

Accepted Solutions

Yes, you can use both.

You would however need to get the external interface up and running early, and all the code dependencies and call trees that would be needed to bring up the interface would need to be in internal flash. One route would be for a small loader app to bring up the pins, clocks and interfaces first, check the integrity, and then transfer control to the app code, which could be split amongst the memories available to the processor.

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

View solution in original post

4 REPLIES 4

Which STM32F4?

Probably all models which support QSPI allow also code execution from it, if it's configured to memory mapped mode, but you can confirm this by reading the QUAD-SPI chapter in your model's datasheet.

JW

Auloedus
Associate II

Thanks waclawek.jan!

The involved P/N is the STM32F469.

I've already written the driver for the external QSPI flash memory and I use it for TouchGFX's graphical resources.

Just to be sure that I've explained myself well and that we're on the same page: my intention would be to extend the code "beyond" the internal flash memory, so to use both the internal and the esternal QSPI for the code segments, simultaneously.

Thanks a lot! :)

Yes, you can use both.

You would however need to get the external interface up and running early, and all the code dependencies and call trees that would be needed to bring up the interface would need to be in internal flash. One route would be for a small loader app to bring up the pins, clocks and interfaces first, check the integrity, and then transfer control to the app code, which could be split amongst the memories available to the processor.

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

Thank you very much Tesla DeLorean and waclawek.jan!

Have a nice day!