Skip to main content
Associate
Dec 3, 2024 9:29 AM UTC
Solved

launching the stm32g0 USART Bootloader without hardware reset

Hello guys,

 

I am working on project to update the STM32G070 over the air. So basically I receive the binary on ESP32 and then forward the binary over UART to the STM32. I have used pattern 11 to enter the USART Bootloader of the STM32. Then sending the 0x7F to get in synchronization with the STM32.

By only controlling the BOOT0 Pin I cannot enter the USART Bootloader. By pulling the NRST Pin and the BOOT0 Pin I can enter the USART Bootloader successfully . So is it possible to enter the USART Bootloader without hardware reset ??

This topic has been closed for replies.
Uwe Bonnes
Uwe BonnesBest answer
Chief
Dec 3, 2024 12:33 PM UTC

In both cases you need some code in your runtime programm to detect the reboot request on the UART and act accordingly.

4 replies

gbm
Super User
Dec 3, 2024 9:40 AM UTC

Surely, it is possible. The topic was discussed multiple times in this forum - please use search function. Also, read AN2606 document.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Associate
Dec 3, 2024 10:31 AM UTC

I have read the AN2606 but I can't find any bytes causes the reset. So my Idea is to send a byte which is responsible for the reset. e.g. 0x7F is for synchronization 

Uwe Bonnes
Chief
Dec 3, 2024 9:41 AM UTC

You can try to deinitialize everything, set MEM_MODE to system bootloader and jump to the booloader code.

I prefer to set some memory pattern and  trigger reset. As Startup code I first check for  reset by the CPU and the pattern and in that case set MEM_MODE to system bootloader and jump to the booloader code.

Uwe Bonnes
Uwe BonnesBest answer
Chief
Dec 3, 2024 12:33 PM UTC

In both cases you need some code in your runtime programm to detect the reboot request on the UART and act accordingly.