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

BLE Background DFU function support

Hi Nordic ,

I have a nRF52840 project development based on SDK 15.3 . Now ,I need to add DFU feature there. we suppose to use background DFU here. we will use long range( coded PHY S8), and long connection parameter . 

form my study ,I can use IOT bootloader example from my bootloader.

but about the DFU function, can you give me the hint and reference for DFU function implement ?

I am not idea on how to save the New fw package during the application status now. Thanks.

Parents
  • Hi Nordic ,

    There are few more questions. 

    1. I want to use different bootloader with same app part for different usage, can I use the UICR file to implement that case?

    2. I used the FDS to save some setting config for my application, will dfu overwrite the setting ? if yes , how to protect the setting.

    Thanks

  • Hello,

    We do not deliver background BLE DFU, but I know that there are other customers that have done similar solutions, so it is possible.

    What you would want to do is to keep the bootloader, but to move the transport of the new image to the application instead of the bootloader, right?

    So you need to implement a service where you can receive the init packet and firmware image generated by nrfutil, and then find out what function in the bootloader that is usually called when the init packet or the image is transferrec. I don't know what that looks like in the IoT SDK bootloader (This is deprecated), but in the normal SDKs, bootloader, look for the nrf_dfu_validation_init_cmd_execute() function, which will validate the image that you have already transferred.

     

    Kawing said:
    1. I want to use different bootloader with same app part for different usage, can I use the UICR file to implement that case?

     I don't understand what you mean by this. 

     

    Kawing said:
    2. I used the FDS to save some setting config for my application, will dfu overwrite the setting ? if yes , how to protect the setting.

     Look for NRF_DFU_APP_DATA_AREA_SIZE in sdk_config.h. Loo kat the description for this definition:

    // <h> Misc DFU settings 
    
    //==========================================================
    // <o> NRF_DFU_APP_DATA_AREA_SIZE - The size (in bytes) of the flash area reserved for application data. 
    // <i> This area is found at the end of the application area, next to the start of
    // <i> the bootloader. This area will not be erased by the bootloader during a
    // <i> firmware upgrade. The size must be a multiple of the flash page size.
    
    #ifndef NRF_DFU_APP_DATA_AREA_SIZE
    #define NRF_DFU_APP_DATA_AREA_SIZE 12288
    #endif

    The FDS pages are always in the end of the application flash area, next to the bootloader. So make sure that this is large enough to cover your FDS pages. By default this is set to 12288 bytes, which is 3*4096, or 3 FDS pages, which is the same that the FDS use by default. If you increase this in your application, remember to increase this in your bootloader as well.

    Best regards,

    Edvin

  • Hi Edvin,

    Thanks for reply, I starting to build the project bootloader , I am using example/iot /bootloader as my BLE project , once I used the nrfjprog to grouping the softdevice and the bootloader , I found there is some problem in this new hex. can you help to checking the issue.

    I using the nRF connect to flash the software to my broad, and I found there is a black zone. and it will fail to flash. there is the log file for the fail flashing.

    Thanks.

      2020-04-15T02_03_48.453Z-log.txt

Reply Children
Related