cancel
Showing results for 
Search instead for 
Did you mean: 

launching the stm32g0 USART Bootloader without hardware reset

crisay794266
Visitor

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

4 REPLIES 4
gbm
Lead III

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
Uwe Bonnes
Principal III

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.

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
Principal III

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