cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a professional Firmware update scheme for STM32

tam
Associate

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!

 

10 REPLIES 10
Pavel A.
Evangelist III

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.

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.

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

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.

 

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

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

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.

 

Well the d-Ronin guys haven't touched it in 8 years, but the hardware can be disabused to other applications, and the firmware for them delivered as a .BIN.

Yeah the software's not feature rich, but it's designed for very high speed data streams and uses 4-bit SDIO w/DMA

GHI Electronics had some ALFAT related products.  https://docs.ghielectronics.com/hardware/filesystem/intro.html

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

>  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

Pavel A.
Evangelist III

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

 

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

JW