2025-02-09 05:20 AM
Hi,
I have an STM8S103F3P6 based development board & I wanted to know if it would be possible to execute program code from an external flash memory?
Regards,
Aditya.
2025-02-09 07:11 AM
Have you considered different architectures and approaches? Something appropriate to the problem you're attempting to solve..
You can bolt a QSPI flash to these devices and process something in an interpretive / p-code fashion.
External memory buses tend to eat pins, add complication, and are slower than more tightly coupled memories.
It's 2025, perhaps consider some of the small 32-bit ARM devices. You can find devices smaller than the SOIC20 with hundreds of KB of FLASH internally.
2025-02-09 07:16 AM
I might consider something a 32-bit device, I was just wondering if this was an possibility. The p-code idea is nice but not what I'm looking for.
2025-02-09 01:33 PM
I don't recollect there being an external bus interface, perhaps look at the possibility of pulling code sections into RAM, and if you can execute it from there. Apt to be rather limiting
Most of the recent STM32 have QSPI interfaces, and can map up to 256MB of NOR Flash to within the Cortex's 4GB address space, and execute-in-place
Perhaps also look at the RPI Pico implementation, large external NOR Flash, and dual core CM0+
2025-02-09 03:11 PM
https://lujji.github.io/blog/executing-code-from-ram-on-stm8/
https://community.st.com/t5/stm8-mcus/code-execution-from-ram/td-p/495360
https://forum.allaboutcircuits.com/threads/iar-pragma-using-stm8-for-executing-from-the-ram.131592/