Time taken for DFU

Hi All,

I'm using buttonless DFU for upgrading the firmware and my requirement is I would like to know the time taken for complete DFU from my application.

One approach I though of storing RTC time in flash before entering into Boot loader and when it comes back to application taking the difference of current RTC and stored RTC.

Is there any other approach to achieve this.

Regards,

Reedomneck

Parents
  • Hey,

    Could you let me know why you need to know the time take to complete dfu? The time depends on mainly two factors-  the size of the DFU image and the connection parameters between the DFU controller and target. It usually takes about half a minute to complete the process. Are you using the nRF5 SDK? If so, you can read the timer information using the nrf_bootloader_dfu_timer_counter_get().

    Regards,

    Swathy

Reply
  • Hey,

    Could you let me know why you need to know the time take to complete dfu? The time depends on mainly two factors-  the size of the DFU image and the connection parameters between the DFU controller and target. It usually takes about half a minute to complete the process. Are you using the nRF5 SDK? If so, you can read the timer information using the nrf_bootloader_dfu_timer_counter_get().

    Regards,

    Swathy

Children
  • Yes I agree it depends on dfu image size.

    I’ve a requirement to keep track of time that is spent for firmware update. This will be cumulative one where time gets added for each dfu.

    Yes I’m using nrfsdk and what information does this nrf_bootloader_dfu_timer_counter_get() API provides?

    Here is my requirement:

    Ours is battery powered device and we would like to keep track of time that is spent for dfu in

    It’s lifetime.

  • Hey,

    nrf_bootloader_dfu_timer_counter_get() provides you RTC and the method you suggested is the best way to get the timing information. You can use nrf_bootloader_dfu_timer_counter_get() to read the timer counter so that you can store the timing information at the start and at the end of dfu and calculate the difference between the start and the end to get the time taken for dfu application. You can look into Flash Data Storage(FDS) to store the data collected.

    Regards,

    Swathy

Related