Device goes into DFU after adding FOTA over Bluetooth

I added FOTA over Bluetooth to my NRF52840 application. Everything works, I can update the application over bluetooth and it runs properly, but after updating if I unplug the dongle and plug it back in the device starts up in DFU mode instead of just starting up my application normally. Any idea why this would occur? Thanks 

Parents
  • Hello, 

    Is this DFU mode (called serial recovery mode in MCUboot) in the nRF5 SDK bootloader that comes pre-programmed on the nRF52840 dongle, or in MCUboot? The only times the pre-programmed bootloader should enter DFU mode are if no valid application is present, or if the PINRESET bit is set in the POWER->RESETREAS register. And are you seeing this on more than one board?

    Driving any of these pins low on the nrf52840 dongle will cause the bootloader to enter dfu mode (indicated by red LED) :

    Ref. https://docs.nordicsemi.com/bundle/ug_nrf52840_dongle/page/UG/nrf52840_Dongle/hw_button_led.html

    Best regards,

    Vidar

  • After I flash it over Bluetooth my application works fine the first time, and I can confirm it's running the updated application, but once I unplug and plug it back in LED2 is flashing. If I open Programmer I see the device show up as Open DFU Bootloader and the contents of the device shows the application still there. Usually I have to press the reset button to get into this mode, but after flashing over Bluetooth it remains in this mode.

    Could there be a condition where the application were able to run a first time but then when disconnecting it and reconnecting it the application isn't considered valid? I have tried calling boot_write_img_confirmed() on startup, but that did not fix it.

    Thanks!

Reply
  • After I flash it over Bluetooth my application works fine the first time, and I can confirm it's running the updated application, but once I unplug and plug it back in LED2 is flashing. If I open Programmer I see the device show up as Open DFU Bootloader and the contents of the device shows the application still there. Usually I have to press the reset button to get into this mode, but after flashing over Bluetooth it remains in this mode.

    Could there be a condition where the application were able to run a first time but then when disconnecting it and reconnecting it the application isn't considered valid? I have tried calling boot_write_img_confirmed() on startup, but that did not fix it.

    Thanks!

Children
Related