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

DFU upgrade

Regarding DFU upgrade, I have the following questions(sdk14.2):
1.nrf52832 will be paired and bound after connecting with the mobile phone, then in the sdk_config.h file NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS is not necessarily set to 1, not set to 1 what will be the consequences?
2. I added buttonless dfu to my program code, but the ble_dfu_buttonless_async_svci_init() function returns the error NRF_ERROR_NO_MEM, I have defined NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS as 1, how do I need to modify it?
3. When debugging the program, I burned the protocol stack and the BootLoader program and debug it in Keil. I can't run it. What are the possible reasons? Should I program the BootLoader program when debugging?

  • Hello,

    1: I recommend setting NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS to 0, since if you for some reason loose the bonding information while you are in DFU mode, then the device is bricked (unless you can erase the chip and reprogram it), so not using bonds while in DFU is recommended, if not security is really important.

    2: again, set NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS to 0 if not needed. Can you try to enable logging, and see if you get some warning regarding RAM start and RAM size? If so, can you try to change the RAM settings accordingly, and see whether the issue persists?

    3: Regarding debugging the ble_app_buttonless_dfu example, please see this post.

     

    Best regards,

    Edvin

  • If nrf52832 is already bound to the phone, can you upgrade it directly to DFU? Or must you manually ignore the bindings in your phone?

  • If you use NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS = 0, then when you enter DFU mode, the device will advertise with a new address = old_address + 1. This is done because the phone will think of it as a new device, and it will do a service discovery, and it will find out that it has the DFU service. So you don't have to remove the bonding data on your phone.

     

    The device will advertise with the advertising name DfuTarg, and you can assume that the address is incremented by 1, so that you know what device to connect to, if you write a custom app for the phone.

     

    Best regards,

    Edvin

  • Buttonless dfu example from the application into the bootloader, the system is not reset, the data in RAM will still be saved, then bootloader dfu completed after entering the new application again, the previous RAM data will be lost? Also, after switching from application to bootloader, does the peripheral need to be reinitialized?

  • You can find some info on the buttonless dfu here.

     

    As you see there, the RAM is retained when you enter DFU mode.

    Since the buttonless DFU doesn't do a softReset, I am not sure what the reset handler of the bootloader does with the peripherals. Have you tested?

     

    BR,

    Edvin

Related