cancel
Showing results for 
Search instead for 
Did you mean: 

CubeProgrammer UART Bootloader Error

JUker
Associate II

Using STM32F412RGT6 on a board I've developed.

having a problem using bootloader via UART (using CubeProgrammer).

Following all described in AN2606.

In my application, I'm using bootloader via UART1 (PA9, PA10).

BOOT0 is High, BOOT1 is low while attempt to enter bootloader state.

Board powered on.

Choosing the UART in CubeProgrammer and selecting "connect"

Get error:

"Error activating device: KO.

Please verify the boot mode configuration and check the serial port configuration"

After disconnecting all other pins of the MCU, excluding power, SWD, RST, UART1 - CubeProgrammer works !!! :beaming_face_with_smiling_eyes: 

Start reconnecting all the pins I've disconnected, one at a time, in order to figure out which pin is the problematic one.

Turns out that when PA12 is reconnected CubeProgrammer once again won't go into Bootloader.

In my board PA12 is used as a UART (UART6_RX) to an external device.

This external device is powered-off at the stage of trying to enter Bootloader.

How does PA12 influence the bootloader process?

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Petr DAVID
ST Employee

Hello JUker,

the PA12 is associated with DFU bootloader. It is possible, that this could be the problem as maybe the external device could confuse the bootloader into assuming the USB cable is connected. I would try if the problem will be solved if there will be some default value at the time of the starting the bootloader. For example you could held it high. Please click on Select as Best if my reply fully answered your question. This will help other users with the same problem to find the solution faster!

View solution in original post

2 REPLIES 2
Petr DAVID
ST Employee

Hello JUker,

the PA12 is associated with DFU bootloader. It is possible, that this could be the problem as maybe the external device could confuse the bootloader into assuming the USB cable is connected. I would try if the problem will be solved if there will be some default value at the time of the starting the bootloader. For example you could held it high. Please click on Select as Best if my reply fully answered your question. This will help other users with the same problem to find the solution faster!

JUker
Associate II

Thanks Petr,

You're absolutely right.

I've noticed that the HSE started running, which indicates that the DFU is running via USB or CAN.

I've isolated PA12 from the external device, using a 3-state-buffer, powered from the external device power-source, thus when the external device is powered-off, PA12 is in high impedance when entering Bootloader mode.

Works excellent now!!