cancel
Showing results for 
Search instead for 
Did you mean: 

System Bootloader and Retaining the Last GPIO State

SKape
Associate II

I have a problem I can't solve.

In a previous project, I used an STM32L4A6 and set the PC8 and PC9 lines high before entering the system bootloader. After starting the system bootloader, these lines remained high. They were used to maintain power to the device.

In the new project, the MCU was changed to an STM32F446. I used the PD10 and PD12 lines to maintain power after confirming with the AN2606 that they were not being used by the system bootloader. Unfortunately, after starting the bootloader, both lines are reset.

Why does this happen?

1 ACCEPTED SOLUTION

Accepted Solutions
Saket_Om
ST Employee

Hello @SKape 

On the STM32F4 series (including STM32F446), the system bootloader de-initializes all peripherals, including the GPIO ports, when it starts. This means that any GPIO pin states (such as PD10 and PD12 being set high) that were configured by your application code will be reset to their default states as soon as the bootloader takes control. This behavior is different from some other STM32 families, such as the STM32L4 series, where certain GPIO states may be retained.

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.
Saket_Om

View solution in original post

4 REPLIES 4
mfgkw
Senior

Do you use the default bootloader?

AN2606 says in "Table 84.STM32F446xx configuration in system memory boot mode", it uses USART3.

SKape
Associate II

I'm using the system bootloader built into the MCU.
The An2606 says that the 446 system bootloader uses USART3 on PB10/PB11 and USART3 on PC10/PC11.

I'm using the theoretically free PD10 and PD12 lines.

Saket_Om
ST Employee

Hello @SKape 

On the STM32F4 series (including STM32F446), the system bootloader de-initializes all peripherals, including the GPIO ports, when it starts. This means that any GPIO pin states (such as PD10 and PD12 being set high) that were configured by your application code will be reset to their default states as soon as the bootloader takes control. This behavior is different from some other STM32 families, such as the STM32L4 series, where certain GPIO states may be retained.

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.
Saket_Om
SKape
Associate II

Thanks for the reply.

I changed the MCU to L4A6 and everything works fine.

 

Is it possible to find information somewhere in which family the system bootloader de-initializes all peripherals and in which it does not?