cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431 Bootloader

Stefano1
Associate II

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 

 

 

 

 

7 REPLIES 7
TDK
Super User

Is it powered? Correct orientation? VCAP pin voltage correct if present?

Perhaps show the schematic and a picture of the setup.

If you feel a post has answered your question, please click "Accept as Solution".
Stefano1
Associate II

This is the schematich

schematic.pngconfig.png

Chip receives on PC5 and transmits on PC4 (USART1).

Boot0(pin) manually set high before reset.

 

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

If you feel a post has answered your question, please click "Accept as Solution".

I tried with PC4 and PC5 (USART1).
Considering I'm using STM32G431RB, which pins should I use?

TDK
Super User

> 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?

If you feel a post has answered your question, please click "Accept as Solution".

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?

 

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:

TDK_0-1750699356379.png

 

If you feel a post has answered your question, please click "Accept as Solution".