Skip to main content
Visitor II
March 12, 2024
Question

Creating a professional Firmware update scheme for STM32

  • March 12, 2024
  • 7 replies
  • 3584 views

I'm working with a commercial-grade food-service product that uses the STM32L073 in conjunction with an android tablet connected over UART or Bluetooth. For our next-gen product, we're investigating methods to economically implement firmware updates on a fleet of a few thousand units. The one major factor is that we have limited resources (one part-time firmware developer with no filesystem or bootloader experience, along with a part-time electrical engineer), so maximizing implementation speed is key. We have the following options we are exploring for firmware updates:

 

1. Currently the only method implemented to perform firmware updates is using a ST-Link Programmer. Our issues with this setup is that:

  • requires the user open up the product
  • requires the user plug the ST link onto the pcb (electrically risky)
  • Requires a laptop
  • ST-Link can be lost
  • anyone can flash unofficial firmware

2. Switch to an STM32WB:

  • Seems to require either a laptop or phone with the propriety ST app
  • anyone can flash unofficial firmware
  • Requires porting firmware/pcb to STM32WB

3. Switch to Golioth IoT Platform (replace the ST board)

  • Requires porting code to new platform
  • Requires fleet management
  • Expensive

4. Flash Drive:

  • Requires bootloader / file system implementation for which I've struggled to find examples. Presumably requires a significant amount of development time.
  • anyone can flash unofficial firmware

5. SD card:

  • Requires bootloader / file system implementation for which I've struggled to find examples.
  • SD card readers are less common than usb ports.
  • anyone can flash unofficial firmware

 

Which of these 4 options would you recommend committing to for this next generation product, and what resources can I refer to help understand the implementation? Thanks!

 

    This topic has been closed for replies.

    7 replies

    Super User
    March 12, 2024

    we have limited resources (one part-time firmware developer with no filesystem or bootloader experience, along with a part-time electrical engineer)

    You can try to find help for your project here

    Also, instead of owning a laptop and other equipment, you can rent it.

    Graduate II
    March 12, 2024

    Surely a boot loader written with some thought can authenticate the firmware image so random/unofficial firmware don't get loaded. There's a) encryption, and b) public/private elliptical curve signing methods that will fit in STM32

    Not sure of the SDIO and USB-HOST type support in L07x parts.

    Delivery via chip/dongle that plugs in the device is something that's viable. Cheap/simple stand-alone flasher.

    Super User
    March 12, 2024

    Simple micro-SD adapter with UART interface, a.k.a "Openlog Serial Data Logger".

    on ebay (and many similar) 

    STM32 can use this to read files from a SD card. The UART connector has to be designed. It is slow (~ 115200) but dirt cheap and easy to program.

     

    Graduate II
    March 12, 2024

    The OpenLager uses an STM32F411 (512KB Flash)

    https://store.myairbot.com/openlager.html

    https://newbeedrone.com/products/newbeedrone-f411-openlager

    https://github.com/d-ronin/openlager

     

    For pushing updates via AN3155 (STM32 UART Protocol Loader) one can take a look at the update mechanism in the Arduino MKR WAN1300 github repo

    Super User
    March 12, 2024

    The OpenLager firmware on github looks like only logger.

    Many openloggers sold on ebay have the sparkfun firmware, it can read existing files from SD and has many interesting options.

     

    Super User
    March 14, 2024

    >  STM32L073 in conjunction with an android tablet connected over UART or Bluetooth

    So, can't the update be delivered from that tablet via the UART connection? Isn't the Bluetooth just a BT-to-UART module connected to STM32 via UART too?

    If both answers are yes, then on STM32 side it's the same problem set as with any UART-based bootloader, and we can then discuss them as such; and then you would also need to provide the software counterpart on the tablet side.

    JW

    Super User
    March 15, 2024

    Bluetooth UART (HC-05 or newer BLE BM-70) is a viable idea. But wireless may need extra certification effort and security considerations.

     

    Super User
    March 15, 2024

    As I understand it, it's already part of the product (although I don't know in what way exactly).

    JW

    Super User
    March 15, 2024

    @waclawek.jan That's the point. I believed too that sellers of such modules have all formalities settled, but, as always, better check this with a lawyer ((  For food delivery it may pass easily.