2021-06-05 01:03 PM
Based on Reference Manual of the STM32H742IG (RM0433 Rev 7; Table 16.), Flash memory for 1MB devices is divided in two banks with address ranges 0x800000-0x807FFFF and 0x810000-0x817FFFF. There is 512kB gap between them.
As a test i have created a project in the CubeIDE (1.6.1 with H7 package 1.9.0) for STM32H742IG with big byte array. Generated binary file is without a gap. For example, array addresses fall to this gap.
From listing:
t = img_map[642000];
80002de: 4a05 ldr r2, [pc, #20] ; (80002f4 <main+0x1c>)
80002e0: 4b05 ldr r3, [pc, #20] ; (80002f8 <main+0x20>)
80002e2: 4413 add r3, r2
80002e4: 781b ldrb r3, [r3, #0]
80002f4: 08001838 .word 0x08001838
80002f8: 0009cbd0 .word 0x0009cbd0
img_map[642000] is at address 0x809E408 (in gap between banks).
So, is there a gap between banks, and code should handle this? Or there is no gap, and RM is wrong? Or am i miss something?
Regards,
Slavo T.
2021-06-05 01:22 PM
If you have a chip onhand, can you use STM32CubeProgrammer to read memory from those locations and verify the RM is correct? Seems way odd to have FLASH memory with a gap in the middle. I would guess the RM is wrong, but can't verify it and could be wrong.
2021-06-05 01:31 PM
FWIW, this table is new in the rev7 manual.
Also, CubeMX generated code thinks the 1MB is contiguous:
> FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
2021-06-05 02:46 PM
Maybe link script generated by Cube for H742 is wrong (copied from H743 which has no gap).
Maybe H742 actually has 1 MB in one of two banks, like some H750's have more than 128K flash, but the extra flash is not guaranteed to work.
Do not try to access it in production code.
--pa
2021-06-05 03:03 PM
2021-06-05 04:11 PM
So, finally i wired up device. And it doesn't help at all, because my device is 2MB. I am able write different values (and then read them) to 0x8000000, 0x8080000, 0x8100000, 0x8180000 addresses.
Seems, i must ask support of STM.
2021-06-07 01:58 AM
Just a note - H743 devices with 1MB are also with gap (Table 16. Flash memory organization on STM32H742xG/743xG devices).
2021-06-22 12:09 AM
So, there is an answer from STM - "There is a gap and the 2 banks are not contiguous."
2021-06-29 03:01 AM
Hi All,
Thanks for raising the point,
It will be internally checked, I'll keep you posted.
Khouloud
2023-02-15 10:23 AM
Dear ST employees,
can you give us an update on this?
Kind regards