Lowest latency on nRF52840

Hello,

I want to build a wireless mouse with the highest possible refresh rate. I'm considering using an nRF52840 dongle. How often can packets be sent from one nRF52840 to another? I see that bluetooth low latency allows for a 1ms delay. Using 2.4, can packets be sent more frequently? If so, what is the limit? Can I speed this up using a different chip?

  • Hello,

    I'm not from Nordic, so they may have a more official answer to this, but I can weigh in.

    If you don't care about using any of the features of Bluetooth (pairing, low power consumption, compatibility with a wide range of devices, etc.), and you just want to send data over as fast as possible, it is theoretically possible to send your data over Proprietary 2.4GHz at the radio's data rate of 2Mbps with the nRF52840.  The nRF54 series of chips can go up to 4Mbps when using Proprietary 2.4GHz.

    Some back of the napkin calculations:

    10 bytes are required for overhead (preamble, address, packet control, CRC).  I'll assume there are like 16 bytes of real data that you want to send.

    (26 bytes * 8 bits per bytes) / 2Mbps = 0.104 milliseconds per packet
    (26 bytes * 8 bits per bytes) / 4Mbps = 0.052 milliseconds per packet

    The Radio can be set up to transmit back to back packets, using DMA to access the data, so while the radio is transmitting the current packet, the micro could be loading the data in for the next packet.  This is assuming that the transmitter device's Radio will never be switched to receive mode or disabled, since those operations take some time.  This is also assuming that it is ok to "lose" some packets since there is no guaranteed delivery of a Proprietary 2.4GHz transmission.  All of this to say though, the Radio peripheral is definitely not going to be the thing slowing you down. 

    In reality though, you are likely going to be slowed down by the other parts of the system. I don't know what IC that you are interfacing with to get your mouse data from, but the process of acquiring that data, processing it, and prepping it for RF transfer will likely be the limiting factor here. 

  • Hello,

    If you want interoperability with other vendors Bluetooth Low Energy (BLE) is the way to go, normally shortest is 7.5ms.

    If it's Nordic BLE in both ends, then it can support LLPM mode, which reduce it to 1ms. You can read more about it here:
    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/llpm/README.html 

    If it's Nordic proprietary in both ends, then you can use ESB, which will reduce it further (likely in the 250us range with no packet loss):
    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/esb/index.html 

    It's theoretically possible to go even lower by working directly on the hardware, but the closer you work to the hardware, the more likely the development time will increase, since you need to solve security, pairing, quality of service etc.

    Kenneth

  • For Bluetooth look at SCI, Short Connection Intervals. Came with the November update of the Bluetooth spec and allows for shorter CI than 1ms. Some support in the main branch of nRF Connect SDK today.

Related