Skip to main content
Visitor II
June 21, 2025
Solved

Write to flash while running from the same flash.

  • June 21, 2025
  • 1 reply
  • 386 views

I am implementing a dual-bank-like firmware architecture on the STM32WLE5CCU6 microcontroller, which does not natively support true dual-bank flash. In this setup, I need to write data to a region of the internal Flash memory that is part of the same memory space from which the code is currently executing. I would like to understand how Flash write operations can be safely performed in such a scenario—specifically, how to write to a different section of the same Flash memory while code execution continues from another region within that same Flash.

Best answer by STTwo-32

Hello @jackiee 

While writing/erasing into Flash bank then there is not possible to perform any else operation from the same bank (read, execute). But read/execute operation is possible from another bank (if this bank is not under write/erase operation).

Best Regards.

STTwo-32

1 reply

STTwo-32
STTwo-32Best answer
Technical Moderator
August 4, 2025

Hello @jackiee 

While writing/erasing into Flash bank then there is not possible to perform any else operation from the same bank (read, execute). But read/execute operation is possible from another bank (if this bank is not under write/erase operation).

Best Regards.

STTwo-32