cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G491KCU6: Unable to program via UART1

MallikarjunSE
Associate III

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

 

7 REPLIES 7
AScha.3
Chief III

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

Hello,

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

Thank you! 

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

Tried.  Not working. Possible to check schematic? If in case I have missed something?

TDK
Guru

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

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

SWD method works. Wish UART method worked too. 

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