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.
Solved! Go to Solution.
2025-05-06 3:39 AM
Hello @EBotö.1,
Do you mean that you want the log to display that the tool is erasing sector 131?
The tool here maintains consistent address handling, so with SWAP_BANK enabled the address 0x08006000 still point at sector 3 as part of its original logical mapping. regardless of the physical configuration this is the normal behavior of the tool to ensure expected and clear outcomes.
Thanks,
Amine.
2025-05-06 3:39 AM
Hello @EBotö.1,
Do you mean that you want the log to display that the tool is erasing sector 131?
The tool here maintains consistent address handling, so with SWAP_BANK enabled the address 0x08006000 still point at sector 3 as part of its original logical mapping. regardless of the physical configuration this is the normal behavior of the tool to ensure expected and clear outcomes.
Thanks,
Amine.
2025-05-06 9:18 AM
Hi,
I realized I was not running the latest version of STM32CubeProgrammer (I was on 2.16), and it seems like this bug has been corrected from 2.17 and newer. Sorry for the unneccessary noise.
Cheers,
Erik