This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to determine if a DFU update has started when rebooting?

I have a situation with the devices my company builds. From what I understand, they've been designed with a small flaw, which causes them to sometimes get stuck and require a hard reboot when (among other things) a certain service is running and a DFU update starts. Even worse, the production cards cannot be hard rebooted!

In order to avoid this situation, I have been tasked with creating an app that uses the technical solution of sending a command to stop the service (and the other things) before an update is attempted. However, in the case that an update is going on and the app dies (crash, user killed it, system reclaimed resources and killed it...), I'm stuck.

Is there any way I could check if the device is currently already in DFU mode, and get the current progress, without actually building a controller, which requires starting a firmware update, which might brick a non-dfu'ed device?

From what Aleksander said in a previous question I asked (https://devzone.nordicsemi.com/f/nordic-q-a/35930/reset-in-nordic-connect-versus-dfu-library-ios), I'm afraid my only option is to write down the DFUxxxxxxx identifier to disk, and when the app restarts check if I find it around, but I do hope there is a better solution I'm not aware of.

  • Hi, 

    Still, your description is pretty hard to understand, both in the previous case and this case. 

    You need to describe to us, with step by step, what your problem is , how you recreate it.

    We have a fail safe timer that if the DFU update is terminated in the middle and if there isn't a re-connection the bootloader will simply reset. After it reset, it would either enter the original application (if you are doing dual bank update) or enter bootloader mode again waiting. 

    Our current app should be able to support continual DFU update if it's interrupted in the middle of transmitting data. You can also modify it to start a fresh  as well. 

    But you would need to explain us what exactly the situation when your device can be bricked. 

Related