1
votes

I'm running out of memory with my STM32F107. Unfortunately is 256kb the maximum size of this MCU and there is no pin compatible alternative.

I found several Flash Modules and I know there are ways to boot from it, but I never done that before and I dont know if its possible with the STMF107.

Have someone tried that? Is SPI fast enough, I read something about QSPI, but the STM doesnt support that.

Here the Datasheet from the STM: https://www.st.com/resource/en/datasheet/cd00220364.pdf

Here the Datasheet from the favorite Flash: https://www.mouser.de/datasheet/2/198/IS25LP032-064-128-463542.pdf

1
What's taking that much flash? In case you are storing lots of constants in flash, then it would make most sense to outsource those to external SPI flash, rather than executable code.Lundin
I don't think an STM32F107 can use an external memory for code. If you really need more than 256kB then you should consider a different MCU. STM32F101 and STM32F103 go up to 1 MB. STM32F2 goes up to 1 MB. STM32F4 goes up to 2 MB.kkrambo
Ok I I feared it - Hardware is ready so switching to an another MCU is not so easy but anyway - I need to optimize Code.guenthernagel

1 Answers

2
votes

The only way you would be able to do this with your microcontroller and that flash is to copy the code into ram and execute it from there. This is not a great solution.

The QSPI interface in some STM32 microcontrollers is different to regular SPI, it has 4 data lines, and is memory mapped, which allows it to be executable, the 'regular' SPI interface has no means for execution of code.