2025-06-23 6:17 AM
Hello , I'm using STM32G431RB, and I am trying to flash the MCU via UART1 using PA9 and PA10 pins but I can't make it work ..
I get an error like "Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... "
Serial port configuration = 9600 8e1 (but it's the same thing with other baudrates)
i'm using STM32Cube Programmer , also I followed the instructions in AN2606 , the application note states that it should follow pattern 15 , as far as I can view the option bytes using the onboard ST-Link:
BOOT_LOCK(bit) = unchecked
Boot0(pin) = manually set high
nBoot1(bit) = checked
Boot0_SW(bit) = checked
The chip is mounted on a new PCB without any other connections than PA9, PA10, RCC_OSC_IN, RCC_OSC_OUT and Serial Wire for debugging.
Can someone help me?
Thanks to everyone in advance
2025-06-23 6:37 AM
Is it powered? Correct orientation? VCAP pin voltage correct if present?
Perhaps show the schematic and a picture of the setup.
2025-06-23 8:03 AM
This is the schematich
Chip receives on PC5 and transmits on PC4 (USART1).
Boot0(pin) manually set high before reset.
2025-06-23 8:21 AM
> I'm using STM32G431RB, and I am trying to flash the MCU via UART1 using PA9 and PA10 pins but I can't make it work ..
PA9/PA10 don't appear to be connected to anything in the schematic.
Schematic shows an X on some pins but not others which seems suspicious.
> Chip receives on PC5 and transmits on PC4 (USART1).
So are you using PC4/PC5 or PA9/PA10? The bootloader does not support PC4/PC5.
2025-06-23 8:44 AM
I tried with PC4 and PC5 (USART1).
Considering I'm using STM32G431RB, which pins should I use?
2025-06-23 8:50 AM
> Considering I'm using STM32G431RB, which pins should I use?
Since PA9/PA10 are supported by the bootloader, you should use PA9/PA10.
Why does your opening post say you are using PA9/PA10 if you are not using them?
2025-06-23 9:45 AM
I said PA9 and PA10 by mistake.
The chip uses UART1 on PC4 and PC5 to communicate with another peripheral and it works perfectly.
It uses a lot of I/O, SPI and I²C.
The application note for the an2606 says I can use USART1, USART2, USART3, ... this fooled me.
Can I use only PA9 and PA10?
2025-06-23 10:23 AM
Only the pins listed in AN2606 are supported. In the case of USART1, only PA9/PA10 are supported. You cannot use PC4/PC5.
Here is the relevant table in AN2606 for your chip: