custom nrf board turning off in between dfu ota update partition swap

hey i am using a custom nrf52840 board and i keep my device on by setting a gpio pin high and device turns off as soon as it sets to low .

during ota update when the bootloader switches the partition device resets hence the pin is pulled low and the ota fails on verification stage

please tell me a method such that either i can keep this pin high during swap or swap the partition during next reboot stage.

Parents
  • I assume the GPIO is enabling the power supply so that when the GPIO is not longer in a high state, the power supply will switch off? In that case, you need an external pullup resistor on the GPIO. When the device is reset, all GPIOs will be disconnected so you need something external to set the logic level.

  • yes you got it right gpio is enabling the power supply

    but the problem is that we cant change anything in the hardware since its already up for production

    hence kindly tell me a way so that either i can set the gpio high even during partition switching or can switch the partition during the device reboot that is when device turned off mannually by the user 

  • manav555 said:
    hence kindly tell me a way so that either i can set the gpio high even during partition switching or can switch the partition during the device reboot that is when device turned off mannually by the user 

    There's no way to change this behaviour. When the device is reset, all GPIOs will be set to the default state, disabled, and not change untill after the power on reset is finished. You will need an external pull up resistor here, no way around that. 

  • I just want to swap the partition only when device is turned off and than turned on

    means not reset and swap automaticlly as soon as ota is pushed instead wait for the device to be reseted by the user mannually than swap the partition please tell me how to do that

Reply Children
Related