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

Multi packets in SDK 7.2.0 bootloader

Hi, We are doing DFU updates through a nrf51422 dongle (data passing from UART to BLE), using our own code, based on the multilink central example.

The DFU peripherals are nrf51822, s110 7.0.0, SDK 7.2.0. The central unit is nrf51422 dongle, s130 3.0.0, SDK 12.2.0.

We are trying to achieve maximum throughput by using multiple packets per connection interval (@ 7.5 ms interval). It works fine when using a single packet and even two packets per interval, but when increasing to 3 or more, packets seem to get lost, even though TX_COMPLETE event is triggered.

Based on the peripheral SD and SDK, are they suppose to support such throughput?

EDIT: I can't seem to find a way to attach the sniffer trace file. The form allows me to select a file, but doesn't seem to do anything with the file I choose.

Try this link.

This is a trace with a 12 packet notifiaction and 4 packets per connection interval (connection interval set at ~18sec). I stopped it brutally at the middle since it was very slow. The 4 sec breaks are the time we wait for a notification on the central side.

  • Hi Hung, We've managed to get things working at 11.25 ms and 6 packets per interval, but we had to change the flash sequence. Instead of writing each packet to flash, we are storing them in a temp buffer and writing all of them in a single request at the end of the interval. Each flash operation (with pstorage) has a lot of overhead, so writing each packet separately was very slow. For now, it seems that what's holding us back is the UART on the central side. Is there a more efficient module other than uart fifo? maybe one that can work with chunks of data instead of byte-byte?

  • I see, we do have the buffer to store the incoming data, but we write each packet to flash separately. I assume to avoid the CPU being halted for long time (CPU is halted when doing flash writing).

    I don't think we have anything better than uart fifo. On nRF51 the CPU have to feed the UART peripheral on byte-byte basis. On nRF52 we have UARTE which has EasyDMA so the UARTE can access the memory directly.

  • Hi Hung,

    We had to implement our own UART handling on the central side in order to have better UART throughput and avoid UART activity during radio events (this caused some collisions appaerntly).

    Eventually, after optimization on both sides, we managed to get a throughput of ~10KBps.

    Thanks for your help!

Related