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

Simple Method to call bootloader from Applicaton

Hello, 

I am using my own board with the NRF52832 device.

I currently have a NRF DFU bootloader programmed and soft device. I used it to download my own App using the NRF connect utility and the application is working.

The application needs a method to invoke the bootloader from an internal command.

I have read on the forums and am a little confused. 

I found this: https://devzone.nordicsemi.com/f/nordic-q-a/12606/jumping-to-bootloader-from-the-application/47861#47861

Is this all I need to do to get the bootloader to re-activate from my App?

-TimW

  • Hi Tim, 

    Have you tried our buttonless application ? It's located at \examples\ble_peripheral\ble_app_buttonless_dfu. 

    Basically you would need to the retention RAM GPREGRET a magic word (0xB1) and then trigger a reset. 
    Please have a look at  ble_dfu_buttonless_bootloader_start_finalize() function in ble_dfu.c in the buttonless project. 

    and function dfu_enter_check() in nrf_bootloader.c in the bootloader project. I assume you are using SDK v15.x

  • Yes,

    When I call ble_dfu_buttonless_bootloader_start_finalize() and reset, my app reboots to itself.

    Could it be that I don't have the bootloader address set in 0xFF8 of the MBR?

  • Have you tried to test the DFU bootloader ? Please make sure you fully know how to use it before testing with the buttonless. 

    I have a step by step guide here that you may want to have a look. 

  • Yes I am using the secure bootloader to load my Application successfully. (I have generated my own keys as well). My problem is, when triggered, my application does not re-enter the bootloader. Instead it just reboots back to the application.

    Here is the simple code I wrote in main that successfully gets called when I want to restart the boot loader.. but the bootloader doesn't start:

    ----------------------------------------------------------------------------------------------------------------------------

    Also.. I halted the App and read the memory:

    Here is what is in 0xff8 = 72000 (the bootloader starting address (vectors)

    Is this correct?

    like wise I know the secure bootloader is still there  as shown HERE:

    What am I not seeing??

    ---------------------------------------------------------------------------------------------------------------------------

  •  Also, I have successfully created the ButtonLess application and loaded it from the secure bootloader using the bluetooth nrfutil. 

    Question: What action do I take with the bluetooth app to reboot the bootloader?

    The info suggests that I write a 01 to a characteristic.. which characteristic?

    Here is my screen:

Related