cancel
Showing results for 
Search instead for 
Did you mean: 

Bank Swap

DCtech
Associate II

There is a point that confuses me, I am reading from the datasheet, but I wanted to ask some questions.

For stm32f4, there is FB_MODE bit in the SYSCFG register (8th bit), if the FB_MODE bit is 0, the address 0x08000000 becomes BANK1, if it is 1, the address 0x08000000 refers to BANK2.

When using dual bank, we write all new data to 0x08100000 address every time.

For example, FB_MODE bit is 0, 0x08000000 address is bank 1, that is the part where my current code is, so 0x08100000 address is bank 2, I wrote the new code to bank 2, then I set the FB_MODE bit to 1 and swapped the bank. So the code which is new one, I wrote to 0x08100000 is now at 0x08000000 after bank swap?

Am I understanding correctly, can you help?

1 REPLY 1
TDK
Guru

Yes, that's how it works.

If you feel a post has answered your question, please click "Accept as Solution".