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 Children
No Data
Related