Skip to main content
Associate III
January 13, 2024
Question

STM32G491KCU6: Unable to program via UART1

  • January 13, 2024
  • 2 replies
  • 3417 views

Hello,

I'm trying to program G491KCU6 board via UART1 and I'm not able to connect to st-programmer. I don't know whether the board is actually entering Boot0 or not. I have PB8 with 10K to GND and I pull it up during connection to enter Boot0. Below is the schematic. Any recommendations? My serial to USB converter shows Rx LED ON when I try to enter Boot0.

MallikarjunSE_0-1705136656649.png

 

This topic has been closed for replies.

2 replies

AScha.3
Super User
January 13, 2024

Hi,

> I pull it up during connection to enter Boot0

You have to set boot0->hi and then reset/start cpu ; boot0 is only checked after a reset by cpu.

Did you keep to this ?

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate III
January 13, 2024

Hello,

I'm powering the board with boot0 at high. Do I need to hit reset after that? 

Thank you! 

AScha.3
Super User
January 13, 2024

No - thats ok.

But you can try extra reset - just to be sure...

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

USART1 bootloader on STM32G49x is on PA9/PA10 per AN2606. You're not connecting to those pins.

TDK_0-1705160182478.png

 

No, there's no way to change what pins the bootloader supports. You'll need to respin the board or program it with a different method.

 

Programming/debugging over SWD is the best method.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate III
January 13, 2024

Thanks for the reply. I tried UART2 for the same. Couldn't get it to work. 

SWD method works. Wish UART method worked too. 

TDK
January 13, 2024

> I tried UART2 for the same. Couldn't get it to work. 

You aren't using the USART2 pins supported by the bootloader either.

TDK_0-1705172463985.png

> Wish UART method worked too. 

Can't just wish. You have to connect to the right pins.

Read AN2606 for bootloader functionality. SWD is not part of the bootloader so will work regardless, as long as those pins aren't reassigned in the program.

https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

 

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