STM32H7A3xG 1MB Flash Programming Issue – memory map inconsistency
Hello,
I am investigating a Flash programming issue on an STM32H7A/B device with 1 MB Flash (Device ID 0x480, Rev X). STM32CubeProgrammer v2.21.0 treats the internal Flash as a continuous range 0x08000000–0x080FFFFF.
Adresses such as 0x08080000, 0x080C0000 and 0x080FFE00 are programmed successfully and code placed there executes correctly, even though these addresses appear to be outside the documented Bank1/Bank2 address ranges in RM0455 Table 15.
However, the HAL/CMSIS headers define FLASH_BANK2_BASE as 0x08100000, so IS_FLASH_PROGRAM_ADDRESS_BANK1(0x08080000) returns true and HAL_FLASH_Program() uses CR1/SR1 for that address. Programming 0x08080000 this way results in ECC problems when the location is read back. Could you please clarify the correct Bank1/Bank2 mapping for the 1 MB STM32H7A/B devices, whether 0x08080000 should be programmed through CR1/SR1 or CR2/SR2, and whether this is a known HAL/CMSIS issue?
This is currently blocking our bootloader/FUOTA implementation, so a quick clarification or workaround would be greatly appreciated.
I believe it is a related issue: STM32CubeProgrammer: STM32H7A3xG Bank 2 address mismatch | Community
STM32CubeProgrammer: v2.22.0
STM32CubeIDE: v2.0.0
