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

Want tbootloader to enter DFU mode for a few seconds each time device is reset

Hello,

   1- we are using button-less secure bootloader.

   2- Have successfully download our application image to the target via nRF Connect mobile App.

   3- When target is reset, our application loads and runs as expected.

   4- Can also put the target in DFU mode, using our phone app and repeaet the process and update our application image.

Question1:

Is there a way for the bootloader to first boot into DFU mode each and every time target board is reset , wait for let's say ten seconds, and if no DFU process is initiated, to then run the application?

Question 2:

Is there a way to set the transmit power level for DFU process?

Thanks,

Mano

Parents
  • Hi Mano,

    Is there a way for the bootloader to first boot into DFU mode each and every time target board is reset , wait for let's say ten seconds, and if no DFU process is initiated, to then run the application?

    You can set NRF_BL_DFU_INACTIVITY_TIMEOUT_MS in the sdk_config.h. 

     

    Is there a way to set the transmit power level for DFU process?

     The bootloader does not have the configuration for BLE TX power setting. See this answer.

    -Amanda H. 

  • Hi Amanda,

       Thanks again for your help.

    I started experimenting with  NRF_BL_DFU_INACTIVITY_TIMEOUT_MS, but this isn't the same as what I was after.

    A- What this timeout does, is if user requests to enter DFU mode and boot loader enters DFU mode, but user fails to start the DFU for a given # of ms, then the boot loader will exit DFU mode and boot the application. By default this value is set to two minutes in the sdk_config.h

    B- What I am asking is a different use case, where boot loader "always" enters DFU mode, regardless of if DFU is requested by the user or not, then waits for N seconds, and if no DFU activity, boots the application. They are similar, but have a fundamental difference.

    In use case A, user requested a DFU entry, but in B, DFU is the default boot up.

    Appreciate any input you may have.

    Best,

    Mano

Reply
  • Hi Amanda,

       Thanks again for your help.

    I started experimenting with  NRF_BL_DFU_INACTIVITY_TIMEOUT_MS, but this isn't the same as what I was after.

    A- What this timeout does, is if user requests to enter DFU mode and boot loader enters DFU mode, but user fails to start the DFU for a given # of ms, then the boot loader will exit DFU mode and boot the application. By default this value is set to two minutes in the sdk_config.h

    B- What I am asking is a different use case, where boot loader "always" enters DFU mode, regardless of if DFU is requested by the user or not, then waits for N seconds, and if no DFU activity, boots the application. They are similar, but have a fundamental difference.

    In use case A, user requested a DFU entry, but in B, DFU is the default boot up.

    Appreciate any input you may have.

    Best,

    Mano

Children
  • Hi Mano, 

    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.

    The inactivity timer is 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. 

    See the DFU mode documentation. 

    Regards,
    Amanda 

Related