cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H563ZI Flash Bank Swap

IanLin
Associate

Hello all,

I am currently developing on the STM32H563ZI and encountered an issue where, when swapping to Bank 2 to erase/write flash, it simultaneously erases the same address in Bank 1. Here are the steps I followed:

  1. Swapped to Bank 2.
  2. Used STM Programmer 2.16.0 to flash a bin file to the address 0x8100000.
  3. Used STM Programmer 2.16.0 again to flash the same bin file to the address 0x8000000.

At this point, the code initially flashed to 0x8100000 was erased. Subsequent tests with writing only a few bytes also resulted in the same situation.

Are there any settings I can adjust to avoid this situation?

Thank you very much!

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @IanLin,

 

Thank you for your feedback. We're working on a fix that will be included in a future release. I'll make sure to keep you informed on the progress. Your understanding is appreciated !

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Maryem
ST Employee

Hello @IanLin ,

 

I've tried to replicate the problem but everything worked fine for me. Can you share your option bytes config and the binary file ?

Thank you in advance !

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Logging output at Level 3 might also be helpful to understand the process / sequences

Try merging the TWO .BIN files into a singular .HEX file and applying that in a SINGLE operation.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Maryem
ST Employee

Hello,

 

Thank you @Tesla DeLorean for the valuable suggestions ! @IanLin This issue will be resolved in an upcoming software release.

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Maryem ,

Thank you for your reply. The swap configuration is as follows:

5.png

Additionally, I performed other tests with similar results.

Steps are as follows:
Step1:Erase all sectors
Step2:Swap_Bank set 1

Step3:Write some bytes to 0x8100000
1.png

 

Step4:Write 4 bytes to 0x8000000

2.png

 

At the same time, the data originally written to 0x8100000 gets erased.

3.png

 

This is the programmer configuration:

4.png

Thank you!

Ian

Hello @IanLin,

 

Thank you for your feedback. We're working on a fix that will be included in a future release. I'll make sure to keep you informed on the progress. Your understanding is appreciated !

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Maryem 

I am also experiencing similar issues with STM32H5 FLASH programming with STCubeProgrammer when BANK_SWAP is enabled.

Could you advise when an update to STCubeProgrammer is expected?

Kind regards,

Simon