2024-07-29 08:22 PM - last edited on 2024-07-30 04:39 AM by Andrew Neil
Dear community:
I am currently using the STM32H563ZGT6 chip, and my code capacity exceeds 512KByte. When programming through CubeIDE, I can only burn to the 512KByte Flash of Bank1. May I ask if this chip can use Bank1 and Bank2 as a whole (as I have seen other ST series chips on the network that can operate in this way), and if so, how can I configure it?
Thank you.
2024-07-30 04:29 AM - edited 2024-07-30 04:29 AM
Flash is contiguous. You can edit your linker file (*.ld) to reflect the 1 MB available and it should work.
2024-07-30 04:33 AM - edited 2024-07-30 04:33 AM
FWIW, a new project in CubeMX for the STM32H563ZGT6 chip generated code which had the correct flash capacity shown in the linker file.
2024-07-30 04:35 AM
Dear TDK:
The project I created using CubeIDE should not have any issues with link file exceptions, and I have also checked the. ld link file. The size of the Flash space allocation is also 1MByte.
Best Regards!
2024-07-30 04:48 AM
Dear TDK:
The allocation of RAM and Flash in my link file is also the same as yours:
Before raising this question, I searched the Internet for information about Dual Bank. Some STM32 series of chips can be configured with option bytes to choose whether to use Single Bank mode or Dual Bank mode. I roughly searched the manual for STM32H563ZGT6, but haven't found the relevant registers to configure it yet.
Best Regards!
2024-07-30 04:48 AM
Post the full error messages you're getting.
Try to program the file using STM32CubeProgrammer.
It's possible STM32CubeProgrammer has a bug here.
2024-07-30 05:04 AM
Dear TDK:
You can see that my burned file exceeds 512KByte:
I have checked the 'Verify after downloading' option:
As shown below, the verification failed at position 0x08080000:
19:58:07 : ST-LINK SN : 12004500130000504141514E
19:58:07 : ST-LINK FW : V2J36S7
19:58:07 : Board : --
19:58:07 : Voltage : 5.17V
19:58:07 : SWD freq : 4000 KHz
19:58:07 : Connect mode: Normal
19:58:07 : Reset mode : Software reset
19:58:07 : Device ID : 0x484
19:58:07 : Revision ID : --
19:58:07 : Debug in Low Power mode is not supported for this device.
19:58:08 : UPLOADING OPTION BYTES DATA ...
19:58:08 : Bank : 0x00
19:58:08 : Address : 0x40022050
19:58:08 : Size : 112 Bytes
19:58:08 : Bank : 0x01
19:58:08 : Address : 0x40022070
19:58:08 : Size : 16 Bytes
19:58:08 : Bank : 0x02
19:58:08 : Address : 0x40022080
19:58:08 : Size : 16 Bytes
19:58:08 : Bank : 0x03
19:58:08 : Address : 0x400220e0
19:58:08 : Size : 16 Bytes
19:58:08 : Bank : 0x04
19:58:08 : Address : 0x400221e0
19:58:08 : Size : 16 Bytes
19:58:08 : Bank : 0x05
19:58:08 : Address : 0x40022090
19:58:08 : Size : 8 Bytes
19:58:08 : Bank : 0x06
19:58:08 : Address : 0x400220f0
19:58:08 : Size : 8 Bytes
19:58:08 : Bank : 0x07
19:58:08 : Address : 0x400221f0
19:58:08 : Size : 8 Bytes
19:58:08 : Bank : 0x08
19:58:08 : Address : 0x40022060
19:58:08 : Size : 16 Bytes
19:58:08 : Bank : 0x09
19:58:08 : Address : 0x400220f8
19:58:08 : Size : 8 Bytes
19:58:08 : Bank : 0x0a
19:58:08 : Address : 0x400221f8
19:58:08 : Size : 8 Bytes
19:58:08 : UPLOADING ...
19:58:08 : Size : 1024 Bytes
19:58:08 : Address : 0x8000000
19:58:08 : Read progress:
19:58:08 : Data read successfully
19:58:08 : Time elapsed during the read operation is: 00:00:00.009
19:58:15 : Memory Programming ...
19:58:15 : Opening and parsing file: Maxwell_G2_EMS.bin
19:58:15 : File : Maxwell_G2_EMS.bin
19:58:15 : Size : 525.67 KB
19:58:15 : Address : 0x08000000
19:58:15 : Erasing memory corresponding to segment 0:
19:58:15 : Erasing internal memory sectors [0 65]
19:58:15 : Download in Progress:
19:58:20 : File download complete
19:58:20 : Time elapsed during download operation: 00:00:04.235
19:58:20 : Verifying ...
19:58:20 : Read progress:
19:58:23 : Error: Data mismatch found at address 0x08080000 (byte = 0x00 instead of 0xFF)
19:58:23 : Error: Download verification failed
Reading the data at position 0x0807FFFF, it can be seen that the data in the subsequent FLASH is all 0:
Best Regards!
2024-07-30 05:20 AM
Seems like an STM32CubeProgrammer bug. It does download successfully, though. At least it claims as such. Wonder if the flash is correct but it's not being read out correctly. All 0x00 seems unlikely to be real and more likely to be a bug.
Wonder if you could disable the "verification" step and see if it works.
I don't have an H5 board to test unfortunately.
2024-07-30 06:33 PM
Dear TDK:
Thank you very much for your suggestion. I tried to disable the 'verify after download' option, but the result is still the same. I am not sure if it is an issue with the STM32CubeProgrammer.
In addition, I used STM32CubeIDE for simulation debugging, and the console also prompted that the download verification was completed, as shown below:
Downloading 588 bytes @ address 0x08000000 - Verified OK
Downloading 16192 bytes @ address 0x08000250 - Verified OK
Downloading 15952 bytes @ address 0x08004190 - Verified OK
Downloading 16080 bytes @ address 0x08007FE0 - Verified OK
Downloading 16080 bytes @ address 0x0800BEB0 - Verified OK
Downloading 16128 bytes @ address 0x0800FD80 - Verified OK
Downloading 16144 bytes @ address 0x08013C80 - Verified OK
Downloading 16176 bytes @ address 0x08017B90 - Verified OK
Downloading 16160 bytes @ address 0x0801BAC0 - Verified OK
Downloading 16128 bytes @ address 0x0801F9E0 - Verified OK
Downloading 16128 bytes @ address 0x080238E0 - Verified OK
Downloading 16096 bytes @ address 0x080277E0 - Verified OK
Downloading 16176 bytes @ address 0x0802B6C0 - Verified OK
Downloading 16176 bytes @ address 0x0802F5F0 - Verified OK
Downloading 16176 bytes @ address 0x08033520 - Verified OK
Downloading 16240 bytes @ address 0x08037450 - Verified OK
Downloading 16224 bytes @ address 0x0803B3C0 - Verified OK
Downloading 16224 bytes @ address 0x0803F320 - Verified OK
Downloading 16192 bytes @ address 0x08043280 - Verified OK
Downloading 16160 bytes @ address 0x080471C0 - Verified OK
Downloading 16256 bytes @ address 0x0804B0E0 - Verified OK
Downloading 16224 bytes @ address 0x0804F060 - Verified OK
Downloading 16208 bytes @ address 0x08052FC0 - Verified OK
Downloading 16224 bytes @ address 0x08056F10 - Verified OK
Downloading 4544 bytes @ address 0x0805AE70 - Verified OK
Downloading 16352 bytes @ address 0x0805C030 - Verified OK
Downloading 16352 bytes @ address 0x08060010 - Verified OK
Downloading 16352 bytes @ address 0x08063FF0 - Verified OK
Downloading 16352 bytes @ address 0x08067FD0 - Verified OK
Downloading 16352 bytes @ address 0x0806BFB0 - Verified OK
Downloading 16320 bytes @ address 0x0806FF90 - Verified OK
Downloading 16336 bytes @ address 0x08073F50 - Verified OK
Downloading 16336 bytes @ address 0x08077F20 - Verified OK
Downloading 16352 bytes @ address 0x0807BEF0 - Verified OK
Downloading 13760 bytes @ address 0x0807FED0 - Verified OK
Downloading 8 bytes @ address 0x08083490 - Verified OK
Downloading 4 bytes @ address 0x08083498 - Verified OK
Downloading 4 bytes @ address 0x0808349C - Verified OK
Downloading 524 bytes @ address 0x080834A0 - Verified OK
I tried to read the data after 0x08080000 in the debugging window, and the result was the same:
Best Regards!