Skip to main content
Visitor II
July 30, 2024
Question

STM32H563ZGT6: Use both Flash banks for 1MB code

  • July 30, 2024
  • 2 replies
  • 1659 views

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.

    This topic has been closed for replies.

    2 replies

    Super User
    July 30, 2024

    Flash is contiguous. You can edit your linker file (*.ld) to reflect the 1 MB available and it should work.

    Super User
    July 30, 2024

    FWIW, a new project in CubeMX for the STM32H563ZGT6 chip generated code which had the correct flash capacity shown in the linker file.

    TDK_0-1722339177877.png

     

    HuijieAuthor
    Visitor II
    July 30, 2024

    Dear TDK:

    The allocation of RAM and Flash in my link file is also the same as yours:

    Huijie_1-1722339611623.png

    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!

    Super User
    July 30, 2024

    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.

    HuijieAuthor
    Visitor II
    July 31, 2024

    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:

    Huijie_3-1722389548777.png

    Huijie_5-1722389580875.png

     

    Best Regards!