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

NRF52840 Mesh DFU , sdk mesh 3.1

Dear NRF Team:

                          I successfully updated the firmware (blinky_nrf52840_xxAA_s140_6.1.0) according to the Mesh DFU steps.

                          However, the second DFU cannot be performed after this firmware update is completed.

                          I tried to select this updated firmware as the firmware compiled by the example/dfu routine and increased the bank_addr address by a factor of 2.

                          DFU completed after an hour. But the third DFU could not be performed.

                               >> 1>, main.c, 206, ----- Bluetooth Mesh DFU Example -----
                                         <t: 4>, main.c, 215, rom_base 26201
                                         <t: 6>, main.c, 216, rom_end 42B08
                                         <t: 8>, main.c, 217, rom_length 1C907
                                         <t: 10>, main.c, 218, bank_addr 86000
                                         <t: 8770>, serial_handler_prov.c, 267, Generating encryption keypair...

                       But I do not know what rom_base,rom_end  and  bank_addr mean. How should I modify their values to ensure that they can be cycled?

                     

         The mesh DFU supports two modes:

  • side-by-side DFU that transfers the new firmware in the background while the application is running and reports to the application when the transfer is done. The application can then flash the new firmware when ready.
  • bootloader DFU, in which the application is not running and the bootloader takes care of the transfer. This mode is primarily meant as a fallback mechanism, in case the application malfunctions.

         The DFU example included in the nRF SDK for Mesh demonstrates the side-by-side mode DFU.

           How can I select bootloader DFU mode?

  • Hi.

    However, the second DFU cannot be performed after this firmware update is completed.

    Maybe you could elaborate a little bit on what is happening here. Are you seeing any errors or information about why the DFU was unsuccessful?

    I believe that this is caused by the Blinky example not supporting DFU. So after you update to the Blinky FW, you are not able to update it again.

    I tried to select this updated firmware as the firmware compiled by the example/dfu routine and increased the bank_addr address by a factor of 2.

     I'm not quite sure what you mean by this? Could you elaborate?

     

    How can I select bootloader DFU mode?

      It should be possible to do Bootloader DFU. However, you will need to enter bootloader mode, and I assume that would require a button press.
    I will ask our developers about how to enter bootloader DFU, as I'm not 100% sure on how to do it myself.

    Best regards,
    Joakim.

  • Just talked to one of our Mesh developers.

    To enter Bootloader DFU mode, you can run without an application, or you can call the nrf_mesh_dfu_jump_to_bootloader() in nrf_mesh_dfu.h.

    When you receive the NEW_FIRMWARE event, you can call that function. Then the bootloader will run for 10 sec. and switch back if nothing happens.

    Best regards,
    Joakim

  • Example/dfu/src/main.c in the sdk source directory,
    I made a change, this is the original SDK,

       bank_addr = (uint32_t) (rom_end & FLASH_PAGE_MASK) + FLASH_PAGE_SIZE;


    I modified it to:
        bank_addr = ((uint32_t)(rom_end & FLASH_PAGE_MASK) + FLASH_PAGE_SIZE)*2;

    The second DFU cannot be performed without modification. After the modification is completed, it will be fine.

  • Thank you ,i will test it and share results with you

Related