Showing results for 
Search instead for 
Did you mean: 

Performing OTA on STM32F103C8T6 using ESP



I am looking for some guidance on my project. It would be great if someone could help me out.

I am trying to perform OTA on STM32F103C8T6 using ESP. 

The ESP and STM communicate over UART. Here the binary is downloaded by the ESP from a server and, further, it will send the binary to the STM. The STM is responsible for writing it to the application partition using a custom bootloader and booting up the newly written binary.

From the above-mentioned process, I am able to perform all the initial steps of downloading the file, transferring it over UART and writing it to flash. But when it comes to booting the new application, it's not working for me. I have also configured the vector table and application address correctly for the application.

Do anyone of you have an idea where I might be lacking?


Could you please share with me the codes you wrote for ESP?

Not sure, but a workable implementation for the STM32 AN3155 protocol is illustrated in the Arduino MRK WAN 1300 board that has a Murata LoRa module with an STM32L072 chip inside.

Basically you want control of the NRST and BOOT0 [..1] pins, and the UART [PA9/PA10] per AN2606, using those to initiate entry into the ROM based system loader, and then execution of your code.

For debugging the OP's original question, you would probably want to validate the written content against the PC side ELF, HEX or BIN, cross check content via SWD/JTAG with STM32 Cube Programmer. Add early signs-of-life out via a GPIO in Reset Handler to confirm it starts properly out of reset, and if it subsequently enters Error Handler or Hard Fault Handler. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..