Skip to main content
Explorer
May 28, 2025
Question

STM32F103VCT6 UART Bootloader Connection Fails with “Error: Activating device: KO

  • May 28, 2025
  • 1 reply
  • 514 views

 

I’m trying to use the built-in system memory bootloader on an STM32F103VCT6 and download firmware over UART with STM32CubeProgrammer, but I can’t get the tool to connect. I always see this error:

 
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

My setup and procedure:

  1. Hardware

    • MCU: STM32F103VCT6

    • UART pins:

      • PA9 → TX

      • PA10 → RX

    • BOOT0 pulled high to 3.3 V via jumper

    • USB-TTL adapter wired TX↔RX (crossed) & GND common

  2. Boot into system memory

    1. Set BOOT0 = High (3.3 V)

    2. Press and hold RESET (NRST low)

    3. Release RESET (NRST high) and wait ~1 s

    4. (I then move BOOT0 back to Low before connecting—this seemed necessary to power-cycle the logic)

  3. STM32CubeProgrammer UART settings

    • Port: COM ×× (the USB-TTL adapter)

    • Baud rate: 115200

    • Parity: Even

    • Data bits: 8

    • Stop bits: 1

    • RTS / DTR: both low (no hardware flow control)

  4. What happens

    • My user application is definitely not running (no LEDs, no UART output).

    • I click Connect in CubeProgrammer and after a short delay I get the “Activating device: KO” timeout.

  5. What I’ve already verified

    • When I flash via ST-Link in CubeIDE, the application runs fine and UART1 communicates normally with my PC app.

    • My wiring and serial port settings work for the running application.


Question:
What step or configuration am I missing to get the STM32F103VCT6’s UART bootloader to respond? Are there any additional option-byte settings, timing requirements, or hardware details I should check?

Thank you in advance for any advice!

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    May 28, 2025

    Hello,

    If you are connecting with CubeProgrammer over STLINK, there is no issue with RDP so no option byte constraint.

    I suspect an issue with your hardware especially the USB-UART adapter.

    Check if your wiring is correct and you are really using  PA9/PA10 for USART1. Check also using a continuity tester the wiring.

    Check also if the adapter is not broken. Do the loopback test by looping back Tx to Rx and see if it transmits/receives well via hyperterminal.

     

    Explorer
    May 28, 2025

    Hello,

    Thank you for your feedback.

    I only use ST-Link during development and debugging. In my production setup the board is enclosed in a sealed case, so ST-Link cannot be accessed. The only exposed interface is the USB-Mini port via a CP2102 adapter wired to USART1, which is why I’m attempting to use STM32CubeProgrammer over UART.

    When I flash the STM32F103VCT6 with ST-Link, USART1 communicates perfectly with my Windows GUI—so the USART1 hardware must be working correctly.

    Could you please let me know if there are any additional bootloader or UART settings I might have overlooked, or any other configuration steps I should verify beyond what I originally described?

    Thank you!

    Super User
    May 28, 2025

    Did you try the steps suggested by @mƎALLEm ?

    There are no secret settings here. Get everything right as you outlined in your post and it should work, barring RDP 2. Putting BOOT0 back to GND is unnecessary.