2024-12-03 01:29 AM
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 ??
2024-12-03 01:40 AM
Surely, it is possible. The topic was discussed multiple times in this forum - please use search function. Also, read AN2606 document.
2024-12-03 01:41 AM
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.
2024-12-03 02:31 AM
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
2024-12-03 04:33 AM
In both cases you need some code in your runtime programm to detect the reboot request on the UART and act accordingly.