Max BLE Secure DFU speed for NRF52832 target

What is the theoretical maximum DFU speed that can be reached for a NRF52832 target?

  • The theoretical maximum DFU speed is the same as the theoretical maximum throughput for a Bluetooth Low Energy link. That would be around 1.3MBPS (payload throughput).

    Best regards,

    Edvin

  • I guess that's only taking into account BLE throughput, not writing to flash, overhead etc?

    I'm trying to figure out how long it would take to update say 1000 devices over BLE with a 200 kB image in ideal conditions. So, a first question is: what is the minimum time it takes to transfer this 200 kB image to an NRF52832 based device in ideal conditions?

  • bds said:
    I guess that's only taking into account BLE throughput, not writing to flash, overhead etc?

    That is correct. It does take the BLE overhead into account, but not the flash write, and the swap (in case you have a double bank bootloader) and verification of the new image.

    I can't give an exact answer. Did you test how long it takes to update one device? My guesstimate would be around 30 seconds per device. I could be entirely wrong. Perhaps it is 10 seconds. Perhaps it is 50 seconds. The theoretical minimum is the payload throughput speed of 1.3MBPS + the time it takes to do the flash operations (write and erase). Then you have the processing and verification time, which I guess the DFU master doesn't really need to wait for.

    The question is whether you want to start tweaking parameters inside the bootloader to optimize this. I am not sure exactly what would be the bottleneck. You probably want to force a single bank bootloader (which would probably be the default if your image is 200kB). Sending larger DFU packets (large MTU) will lead to less overhead. Other than that I would say that it takes the time it takes. I have not tested with a 200kB image. 

    Also, what SDK are you using? nRF5 SDK or nRF Connect SDK (NCS)? In NCS you need to do dual banking, so the swap would take some extra time, but again, the DFU Master doesn't strictly need to wait for that to complete.

    Best regards,

    Edvin

  • Doesn't Nordic have any BLE OTA DFU performance test data?

    Our bootloader is based on NRF5 SDK 15.2. I just tested with a 244 kB image, and it took 3 minutes 12 seconds. I used NRF Connect for desktop 3.12.0 with BLE Standalone 4.0.0 and a PCA10040 v1.1.1 NRF52832 dev kit.

  • bds said:

    Doesn't Nordic have any BLE OTA DFU performance test data?

    Not that I am aware of.

    I just did a test with a transfer with an application with size 53660 bytes. Including finding and connecting to the device running the ble_app_buttonless_dfu example, It took 26 seconds, but the application transfer itself only took 9 seconds.

    I used nrfutil to perform the DFU, not nRF Connect for Desktop, and for this test, I used the unmodified bootloader and ble_app_buttonless_dfu example from SDK15.2.0. 

    Can you try to perform the same using nrfutil?

    If you copy the attached text into a .bat file located in SDK15.2.0\examples\dfu\secure_bootloader\pca10040_ble\armgcc\, it should be quite quick to test.

    mkdir files
    make -j9
    make -j9 -C ..\..\..\..\ble_peripheral\ble_app_buttonless_dfu\pca10040\s132\armgcc
    
    del files\buttonless.hex
    copy ..\..\..\..\ble_peripheral\ble_app_buttonless_dfu\pca10040\s132\armgcc\_build\nrf52832_xxaa.hex files\buttonless.hex
    del files\settings.hex
    nrfutil settings generate --family NRF52 --application files\buttonless.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 files\settings.hex
    
    nrfjprog -e
    nrfjprog --program ..\..\..\..\..\components\softdevice\s132\hex\s132_nrf52_6.1.0_softdevice.hex --verify --snr 682324508
    nrfjprog --program _build\nrf52832_xxaa_s132.hex --verify --snr 682324508
    nrfjprog --program files\settings.hex --verify --snr 682324508
    nrfjprog --program files\buttonless.hex --verify --snr 682324508
    nrfjprog --reset --snr 682324508
    
    nrfutil pkg generate --application files\buttonless.hex --application-version 2 --hw-version 52 --sd-req 0xAF --key-file ..\..\..\private.key files\dfu_image.zip
    
    timeout 5
    
    nrfutil dfu ble -pkg files\dfu_image.zip -ic NRF52 -p COM14 -n "Nordic_Buttonless"

    Obviously, replace the serial number with your own target DK, and replace COM14 with the connectivity device (already flashed with the correct firmware if you have used it with nRF Connect for Desktop -> Bluetooth Low Energy).

    Best regards,

    Edvin

Related