cancel
Showing results for 
Search instead for 
Did you mean: 

Swapping banks (STM32F43xx Vs STM32F77xx)

Yuri Andrade Rodrigues
Associate II
Posted on February 15, 2018 at 00:48

Hello everyone,

I have been migrating from STM32F43xx processor to STM32F77xx processor. We have implemented dual bank from F4 processor already, configuring option bytes and swapping the banks using BFB2.

We are using the first sector from each bank with our own bootloader and we jump to the application and swap the bank if needed. As we have the same bootloader in both first sector, it doesn't break when we toggle the

BFB2, and then,

 jump to the second sector the bank (always the same address).

To get a similar configuration, I have configured 

STM32F77xx as dual bank and dual boot (

nDBANK = nDBOOT = 0

) and swap the banks using SWP_FB. However, when I set and reset SWP_FB, it holds the value but doesn't change the banks.

My questions are:

1) Reading RM0410 and AN4826, it looks like that the SWP_FB should behave exactly the same than BFB2. Am I thinking right?

2) Why the bit holds the value but doesn't swap the address? Is this the normal behavior?

3) We could play with the BOOT_ADDx to do the job perhaps, but I read the SWP_FB can be written and read by software. Do I need anything else to be able to use SWP_FB as BFB2?

4) Is possible to get the swapping bank from F7 acting as F4?

Thanks

Best Regards

#stm32f777 #stm32f4 #bfb2 #swp_fb #dual-bank-boot
3 REPLIES 3
Doug Kehn
Senior
Posted on February 15, 2018 at 15:23

My experience is with L4 and F7 and the procedure is different so we just use two different procedures.

1. There is a note in RM0410 that states that it is not recommended write the SWP_FB bit while executing from flash. I wonder if AN4826 is assuming execution is in RAM.

2. I don't know.

3. For F7, I modify BOOT_ADDx to swap bank. BOOT_ADDx can be modified while executing from flash. Again, SWP_FB note in RM0410 steered me away from using SWP_FB.

4. It's possible to get the same end result. I don't believe it's possible to use the exact same code for both families.

Yuri Andrade Rodrigues
Associate II
Posted on February 16, 2018 at 06:02

About the question 2, It was working with nDBANK = 1 and nDBOOT = 0. It is an invalid combination but it worked nDBANK

=nDBOOT

=

0. Something is wrong....

As Tonny has answered in this topic:

https://community.st.com/0D50X00009XkduQSAR

0690X00000609gZQAQ.png

That note breaks the bootloader flow and it doesn't let me use the F7 as I use F4.

I was thinking to use BOOT_ADD0 pointing to my bootloaderand BOOT_ADD1 to the embedded bootloader, and then, I could use BOOT0 pinthe same way that F4 uses.

Doug, as you answered in question 3, in your case you modified BOOT_ADD0, right? Or you got both working with dual bank?

Thanks

Yuri Rodrigues

Posted on February 16, 2018 at 14:22

Yes BOOT_ADD0, sorry.