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

Secure bootloader & buttonless dfu

Hi all,


We are trying to use buttonless dfu for actual products.

We already finished testing dfu using \nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10056_ble example with nrf52840_xxaa_s140.hex binary.

We followed "Getting started with Nordic's Secure DFU bootloader, a step by step guide" post to create above final merged binary. (used button4 for testing)


However, once we migrate \examples\ble_peripheral\ble_app_buttonless_dfu into our main ble app project and create final merge binary, we get an unexpected symptom.

Can we use both secure bootloader and buttonless dfu mode?

If not, how can we make our own bootloader for buttonless dfu?

In addition, do we need an extra configuration to use buttonless dfu?

Please share us your opinion.
Thank you

Parents
  • Hi Jsmoon, 

    Please clarify that you can do buttonless DFU using our example ble_app_buttonless_dfu  (no merging with your app). Please follow the instruction in the blog and in the SDK on how to test buttonless DFU. 

    Be aware that you still need the bootloader when you use buttonless. 

  • Thank you for your reply.

    Let me clarify exactly what we want to do.

    We will use our own secure_bootloader as we mentioned above for now.

    Then we are going to add following functions into app project:

     sd_power_gpregret_clr(0, 0xffffffff);
     sd_power_gpregret_set(0, BOOTLOADER_DFU_START);
     nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_DFU);

    Once we enter a value through uart port the above routine will be executed.

    However, right after download using J-Link the device boot as DFU mode.

    If we have missing points please let me know.

    Thank you

Reply
  • Thank you for your reply.

    Let me clarify exactly what we want to do.

    We will use our own secure_bootloader as we mentioned above for now.

    Then we are going to add following functions into app project:

     sd_power_gpregret_clr(0, 0xffffffff);
     sd_power_gpregret_set(0, BOOTLOADER_DFU_START);
     nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_DFU);

    Once we enter a value through uart port the above routine will be executed.

    However, right after download using J-Link the device boot as DFU mode.

    If we have missing points please let me know.

    Thank you

Children
  • Please clarify if you have tested our ble_app_buttonless_dfu  ? Please don't start with your application before you test the example with our bootloader. 

    You need to generate bootloader setting so that the bootloader knows (after you flash with Jlink) that there is a valid application so it won't stay in DFU mode. 

    If you don't generate bootloader setting (and flash it) you would need to do a normal DFU for the buttonless application first, and then you can test the buttonless feature. 

Related