This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Enter DFU mode battery-powered not working

Hi,

I currently got the DFU mode working with my nrf52832 while it is being connected to the PC using the Particle Debugger.

I use the GPREGRET method and while connected to the PC the device enters the DFU mode as expected by executing this code after a button press:

uint32_t err_code;
err_code = sd_power_gpregret_clr(0, 0xffffffff);
APP_ERROR_CHECK(err_code);
err_code = sd_power_gpregret_set(0, BOOTLOADER_DFU_START);
APP_ERROR_CHECK(err_code);
sd_nvic_SystemReset();

The problem now is, if I disconnect the 10-pin cable, the GPREGRET register is set as expected (I verified this by reading the register again before doing a system reset), but the device seems to not enter the bootloader/DFU mode but instead simply turns off.

Why does it make a difference when having the 10-pin cable connected and not having it connected in terms of being able to enter the DFU mode? Any suggestions?

Further information:
I use the Nordic SDK 17.0.2 and softdevice 7.2.0.

  • Hi Vidar,

    Thanks a lot for your help. Using this knowledge I found out that a pin was configured in the wrong way. A specific gpio pin should have been initialized as output pin and set to one, otherwise my device simply shut down. so I had to adapt my code to deal with that. My problem is solved now.

    Best regards,
    John

  • Ah, the devices was actually shutting down. My assumption was that the FW was entering a "bad state" and got stuck. Thank you for the update.

    Best regards,

    Vidar

Related