[solved] Electron hard faults when upgrading OTA 0.5.1 to 0.6.0 system firmware

I attempted to upgrade a remote device directly to 0.6.0 and it failed.
(I assumed the device had 0.5.3, but it was 0.5.1).
So, now it shows it is online in the cloud, but my user firmware won’t run and OTA flash of 0.5.3 times out.
I have to do it OTA as the device is in China (!).

How can I recover?

1 Like

One of our firmware engineers, @BDub, should be able to help you out! Sorry for the issue.

1 Like

@gcollins would you PM me your device ID so I can take a look at it’s current state? Then I can provide better instructions on how to upgrade it.

1 Like

I wanted to give an update on what the outcome was here for anyone reading this.


TL,DR; Taken from the 0.6.0 release notes:

Note: You must update your Electron to v0.5.3 first before attempting to use OTA or YModem transfer to update to v0.6.0. If you use DFU over USB, you can update to v0.6.0 directly, but make sure you have installed v1.18.0 of the CLI first.

Or else your device will be stuck in a state of booting into hard fault due to incomplete system firmware dependencies.


The last known module versions after upgrading this 0.5.1 electron to 0.6.0 are:

bootloader: v6 (0.4.8-rc.6)
module 1 (0x08020000): v102 (0.6.0) (system part 2)
module 2 (0x08040000): v15 (0.5.1) (system part 3)
module 3 (0x08060000): none (system part 1)
user: v4

(yes they are out of order now in >= 0.6.0 electron only, on purpose)

Breakdown of the issue

After reproducing this on my unit it was in a state of constant hard fault.

  1. After OTA system part 1 0.6.0, the device would have rejected the image because in actuality this is module 3 and any system prior to 0.5.3 wouldn't know what to do with module 3.

  2. After OTA system part 2 0.6.0, the device would accept it and reboot because it depends on module 3, but any system prior to 0.5.3 wouldn't know about that so it happily applies it thinking it's dependencies are fulfilled.

  3. After OTA system part 3 0.6.0, the device would accept it and reboot because it depends on module 1 being v102 and it's there.

When it reboots, it has module 1 & 2 but not 3 so it hard faults.


How to restore if you should encounter this

Put the device in DFU mode and flash system-part1-0.6.0-electron.bin. After that it should boot again and have v0.6.0 system firmware running.

particle flash --usb system-part1-0.6.0-electron.bin

You can get binaries for 0.6.0 here: Release 0.6.0 Release (Core/Photon/P1/Electron) · particle-iot/device-os · GitHub


Short term resolution

Add logic to Particle Cloud to prevent >= 0.6.0 binaries from being OTA'd to any Electron with system firmware < 0.5.3.

Long term resolution

Instead of just denying an OTA to >= 0.6.0, allow it... but recognize that the system firmware on device is < 0.5.3, and first update it to 0.5.3, then proceed to final firmware version.

3 Likes