This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU loading on startup

Hello,

I’m able flash my code to the nRf52832 with no problem. At this point all is well. The problem occurs when I power down the device and then power up. On power up, for reasons I can’t locate, the device immediately goes into DFU mode instead of booting up the program. To make things even more confusing, after powering up and going into DFU mode, after 4 minutes and 40 seconds, the device starts to work normally. 

I have re-burned the bootloader and re-flashed the program but the problem persists.
Any insight would be greatly appreciated.
Best regards,
Craig H.
Parents
  • Hi Craig, 

    When you power on the chip, the bootloader will check if it should enter DFU mode or not. There are several methods to enter DFU mode, and you can configure them in sdk_config.h. The different methods are documented here. If none of these methods have been used to activate DFU mode, the bootloader will check if the application is valid, and if it's valid, the bootloader will start the app.

    There is an inactivity timer used when you activate and enter DFU mode, and then you have the configured amount of ms to start the DFU, before the bootloader exits DFU mode, and tries to start the app again. When the DFU mode is entered, the inactivity timer is started. On timer expiration, the bootloader resets. The inactivity timer is restarted on any DFU activity. The inactivity timeout is by default set to NRF_BL_DFU_INACTIVITY_TIMEOUT_MS

    See the DFU mode documentation. 

    Here's the default setting from sdk_config.h:

    // <i> If 0, no inactivity timer will be used. Values 1-99 are invalid.

    #ifndef NRF_BL_DFU_INACTIVITY_TIMEOUT_MS
    #define NRF_BL_DFU_INACTIVITY_TIMEOUT_MS 120000

    Regards,
    Amanda

Reply
  • Hi Craig, 

    When you power on the chip, the bootloader will check if it should enter DFU mode or not. There are several methods to enter DFU mode, and you can configure them in sdk_config.h. The different methods are documented here. If none of these methods have been used to activate DFU mode, the bootloader will check if the application is valid, and if it's valid, the bootloader will start the app.

    There is an inactivity timer used when you activate and enter DFU mode, and then you have the configured amount of ms to start the DFU, before the bootloader exits DFU mode, and tries to start the app again. When the DFU mode is entered, the inactivity timer is started. On timer expiration, the bootloader resets. The inactivity timer is restarted on any DFU activity. The inactivity timeout is by default set to NRF_BL_DFU_INACTIVITY_TIMEOUT_MS

    See the DFU mode documentation. 

    Here's the default setting from sdk_config.h:

    // <i> If 0, no inactivity timer will be used. Values 1-99 are invalid.

    #ifndef NRF_BL_DFU_INACTIVITY_TIMEOUT_MS
    #define NRF_BL_DFU_INACTIVITY_TIMEOUT_MS 120000

    Regards,
    Amanda

Children
Related