2025-05-02 4:22 AM
Hi,
I'm using a 2MB flash version of STM32U585x MCU and noticed that when the bank swap bit is set in OB, the wrong page will be erased if I edit flash using the "Memory & file editing". It seems like the page to be erased doesn't take the bank swap bit into consideration.
To elaborate a bit: If bank swap is disabled and I edit some memory at e.g. 0x08006000, it will correctly erase page 3 before writing the new data. But if I have bank swap bit set, and edit the memory at 0x08006000 it will still erase page 3 before writing even though it should be erasing page 3+128 since it's this page that is now available at 0x08006000.
This had me very confused before I understood what was happening.