Some questions about NCS DFU target library

Hello,

I've got some questions regarding the use of DFU target library. I get my update data from the UART and like to use a setup with two partitions on my device. Is this generally possible with the library?

The dfu_target_init() function has the img_num argument. does this relate to the partition number?

Do I have to select which partition to use? If yes how would I do this?

If a firmware update was succesful and dfu_target_done(true) and dfu_target_schedule_update(0) are called does the reboot to actually run the new firmware need to be done manually?

Thanks in advance!

Parents
  • Hi David

    Could you tell me a bit regarding your application

    Which version of the SDK are you using?

    Which device are you using? There are some differences between for example the 52 series and the 53 series hench my question. 

    I've got some questions regarding the use of DFU target library. I get my update data from the UART and like to use a setup with two partitions on my device. Is this generally possible with the library?

    With two partitions, are you referring to two partitions for the your application where one is the current application and one is for the new one like described here?  If so yes it is possible, you will find an exercise here that walk you through setting it up

    The dfu_target_init() function has the img_num argument. does this relate to the partition number?

    The img_num reefers to if the image is for the application core or the network core if you have a multi image build. 

    If a firmware update was succesful and dfu_target_done(true) and dfu_target_schedule_update(0) are called does the reboot to actually run the new firmware need to be done manually?

    If they are successful you should be running the new image after a reboot

    Regards

    Runar

  • Hi Runar,

    thanks for your response.

    Which version of the SDK are you using?

    nRF Connect SDK v2.0.2

    Which device are you using?

    nRF52840

    With two partitions, are you referring to two partitions for the your application where one is the current application and one is for the new one like described here?

    Yes, this is what I mean. Two partitions for the application. I already looked into this lesson and found it very helpful but the configuration in the exercise is a bit different than mine. The exercise uses mcumgr protocol and not the DFU target library.

    The img_num reefers to if the image is for the application core or the network core if you have a multi image build. 

    Ok, that's good to know.

    Is the selection of the right partition to flash the new firmware, done automatically under the hood in the DFU target library or do I have to write this my self?

    Best regards
    David

  • db_lw said:

    Is the selection of the right partition to flash the new firmware, done automatically under the hood in the DFU target library or do I have to write this my self?

    I'ts the bootloader task to copy it the to correct spot. You can have a look at this sample a coworker of mine made. The image number is set to 0 so the image will be sent to the secondary slot as it should be

    Regards

    Runardfu_target_test.zip

Reply Children
Related