2025-05-28 4:28 AM - last edited on 2025-05-28 4:31 AM by mƎALLEm
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:
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
Boot into system memory
Set BOOT0 = High (3.3 V)
Press and hold RESET (NRST low)
Release RESET (NRST high) and wait ~1 s
(I then move BOOT0 back to Low before connecting—this seemed necessary to power-cycle the logic)
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)
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.
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!
2025-05-28 4:41 AM
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.
2025-05-28 4:57 AM
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!
2025-05-28 6:05 AM
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.
2025-05-28 6:31 AM
I've already suggested to check the hardware and especially that "CP2102" adapter.
You need to check that important hardware part before going ahead ..