2025-04-30 12:46 AM
Dear Sir/Madam,
Good day~
I am currently using STM32F439ZI for the purpose of developing BMS.
However, the code size exceed the internal Flash capacity, which is 2MB.
To address this, I intend to add an external Flash (MXIC:MX25L25645G).
May I know whether the external Flash can connect to any of the six SPIs available on the STM32F439ZI?
or there are specific SPIs for interfacing with external Flash?
Any guidance would be appreciated.
Vince
Solved! Go to Solution.
2025-04-30 1:45 AM
From the data sheet of this flash, it has compatibility mode with simple SPI. Then yes it should work with any of SPIs of STM32F4, but will be quite slow.
2025-04-30 1:45 AM
From the data sheet of this flash, it has compatibility mode with simple SPI. Then yes it should work with any of SPIs of STM32F4, but will be quite slow.
2025-04-30 1:49 AM
Well, it's a bit confusing for me that on the one hand you use a STM32F439 with hardware-accelerated AES (STM32F429 is generally the same, but without H/W AES) and then want to connect an external flash for code that can be read freely via the SPI bus.
But regardless of this, SPI cannot be memory-mapped on the family of STM32F4, so code must first be copied to internal RAM before it can be executed. Newer families of STM32 like e.g. STM32H563 provide Quad- or Octo-SPI which can be memory-mapped.
Regards
/Peter
2025-04-30 2:45 AM
Necessity is mother of invention )) In this situation we split some code to small overlays, loaded (and decrypted) from external flash and run in the RAM.
2025-04-30 3:29 AM
Dear Pavel,
Thank you for your prompt reply.
I have been searching through the STM32F439ZI datasheet for compatibility information, but I couldn't find any clues, appreciate your help.
Vince
2025-04-30 3:43 AM
Dear Peter,
Thank you for your response.
I have been using the STM32F439 for a while now, so it might not be ideal to switch to a newer STM32 family at this stage.
However, for the next revision, the newer families would be a good solution, as they offer memory-mapped capabilities and faster data transmission.
I will keep your suggestion in mind, thank you so much.
Vince