Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Keeping GPIO high state during OTA DFU

I found a few old support tickets mentioning the same topic, but most referred to very old versions of the SDK.

We designed a nRF52840 board with an electronic switch controlled by a GPIO pin. When the device is shipped, the switch is off and the battery disconnected. When the user connects the charger for the first time, the nRF52840 is powered on and sets a GPIO pin high to enable the battery switch. In normal use, when not used the device "sleeps" using system off, woken up by an IMU. If needed, the device can be put in an off state via a control point (switch off), and can reboot only if connected again to the power supply.

Based on the reset behavior below, the DFU process seems to lose the GPIO state, and "kill" the device. The only way to make the OTA DFU work, is to do it while the device is powered by the charger (which is an acceptable workaround).

I was wondering, though, if there is a way to change how the OTA DFU reset works and "jump" from the DFU code into the main code with no reset. We are using the nRF5 SDK 17.1 and cannot use the new Zephyr-based one (we need ANT+ and it was not supported until recently: we don't have time to port all of our existing codebase to the new environment for this project)

Any idea if it's possible to keep a GPIO PIN high during the DFU process?

Parents Reply
  • Hi, 

    Sorry for the slow reply here, but the answer is no. There is no SW fix here,  but in theory the device could "survive" a short time with the pins not driven high if there is enough capacitance, so you could test if the product can survive a short time where the pins are reset. So maybe some customers are lucky and don't need to put it in the charger. 

    The device will reset during DFU so the pins will not keep their state during reset so this issue will happen. Best bet is to just keep it in the charger. 

    Regards,
    Jonathan

Children
Related