cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware Update for STM32H7 Series

KAnahar
Associate III

Hi everyone,

I’m working on two different projects, one using STM32H747IIT6 and the other using STM32H723 series. I want to implement a firmware update mechanism for both. Both of them have webserver LWIP interfaces. I can implement update mechanism to webserver.

One of my projects has an SD card slot, while the other does not. Both designs include external flash memory.

I'm looking for guidance on:

  • Best practices for implementing a robust and safe bootloader.
  • Recommended approaches for handling updates with and without an SD card.
  • How to minimize failure risks during firmware flashing.

Any insights or references would be highly appreciated. Thanks!

2 REPLIES 2
EniRot99
Associate III

Hi,

For your use case, a robust and reliable firmware update mechanism can be implemented by following these guidelines:

In your application, implement a dedicated function to securely receive and store the new firmware file in your external flash. This can be efficiently achieved using your existing LWIP webserver interface.

Develop a custom bootloader that:

  • Executes on system startup and checks external flash for new firmware.
  • Verifies the integrity and authenticity of the stored firmware (e.g., CRC checks or cryptographic validation).
  • Writes the validated firmware from external flash into the main MCU application area.
  • Handles rollback scenarios in case the update fails, thus ensuring a safe fallback to a previous stable version.

Best Practices to Ensure Robustness:

  • Always include checksum (CRC, SHA, etc.) or cryptographic signature verification before applying the firmware.
  • Consider using a dual-bank or backup firmware approach, allowing the system to revert to a known good firmware in case of an issue.
  • Ensure the bootloader updates firmware atomically, avoiding partial writes that could lead to system failure.
  • Design your bootloader to handle unexpected resets or power loss during firmware updates gracefully.

By following these tipps, your firmware update process will be both robust and fault-tolerant.

 

LCE
Principal II

Thanks ChatGTP... ;)

 

Do you also have external RAM?

Check the web for lwIP POST examples, that's how I do the file download, first into external (Hyper-) RAM, then I have time to check the file, then to write it to external flash.