STM32 OTA programming using ESP8266 WIFI module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-06 7:36 PM
I want to programming my STM32 MCU using OTA programming MCU is connected to SWD or UART with WIFI module for communicate but i don't know how can i do it?
- Labels:
-
Bootloader
-
Wifi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-06 10:14 PM
First option is to toggle boot / reset pins using EPS8266 and then use STM's system bootloader.
Second option is to make your own bootloader. Most reliable approach would be
- Placing custom bootloader in sector 0, enabling write protection for sector 0
- After power up bootloader waits for special command for a short time period <1sec, if command is not received and sector 1 is not erased, automatically run user application from sector 1
- ESP8266 provides wireless access to STM's UART
For custom bootloader, flash utility needs to send commands over UART to
- Reset from user application
- Stop bootloader from loading user application
- Write bytes through UART, performing check sum calculation, error correction, etc.
- Reboot command after reset
Hypothetical example:
sending reset command 0x55 0x00
Sleep(100) - bootloader starts
preventing bootloader from loading user app 0x55 0x01
writing block of data 0x55 [addr] [length] [data bytes] [crc32]
if crc32 is not equal to calculated checksum on stm32 side, then re-send block of data
sending reset command 0x55 0x00
bootloader waits <1sec, nothing received, sector 1 have valid data, jumping to user app at sector 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-12-06 10:49 PM
STM32 BOOT method used on an Arduino board vis a Murata LoRa module with an L072/82 part.
https://github.com/arduino-libraries/MKRWAN/tree/master/examples/MKRWANFWUpdate_standalone
Up vote any posts that you find helpful, it shows what's working..
