WIFI network (ESP8266) upgrade STM32: STM32 download files using http, ping-pong upgrade to support the rollback (WIFI module AT, TCP pass-through mode)

 

 

Realize the function summary

 

BootLoader program:

    If you do not update the flag, then attempts to load the user program.

    If an update flag, STM32 control WIFI module to connect TCP Web server, and then send Get protocol to obtain the program file, written in Flash after the restart!

    Each write switch Flash Flash writing position, and updating the state detection added, failed update a version of the program is running (rollback)

APP user program:

    Every 10S, TCP control WIFI to connect Web server to get the current version of the program, if the version is inconsistent, writes update flag to restart the MCU!

 

Flash configuration:

 

 

 

 

test

Guess you like

Origin www.cnblogs.com/yangfengwu/p/11741692.html