cancel
Showing results for 
Search instead for 
Did you mean: 

slow boot from Bank2 STM32L4

Micha K
Associate
Posted on March 29, 2017 at 17:05

Hi everyone,

I want to use the dualbank boot and upgrade mechanism as described in AN4767 with my STM32L476.

Toggling the booting bank with the BFB2 flag works fine.

Unfortunately, I observed that the booting process takes considerably longer when BFB2 flag is set.

I know that when the BFB2 flag is set the system memory bootloader evaluates the contents of the

Bank2 and changes the memory aliasing. But does this task really needs 20ms extra?

I developed a small binary which only sets a GPIO PIN to high in the main().

I measured the time between Power up and GPIO manipulation with an oszilloscope and the following setups:

Bank1Bank2BFB2time

binary-012,1ms (boots from bank1)

-binary132,2ms (boots from bank2)

binary-132,2ms (boots from bank1)

for all: Boot0 = 0 Boot1 =1 (independent of RDP level)

As you can see the booting process needs 20ms extra when BFB2 is set.

Is this amount of time reasonable?

Is there anything else I have to consider?

A short booting time is very important for my application.

Thank you very much for your help,

Best regards,

Micha

#l4 #dual-boot
1 REPLY 1
Christophe MARIN
Associate II

Hi Micha,

So sorry I cannot answer your question, and even more for I'm asking you another question. I'm currently struggling hard with the dual bank boot on the same chip (stm32L476), and wanted to know if you're setting the BFB2 by an external tool (St-Link or anything else) or directly thru the applicative firmware running in the stm32 ? In such a case, can you provide the code source for changing the BFB2 bit, as I'm trying to implement that feature on my project, with no success so far... (St documentation really misses clarity about that feature).