Relationship between packet size and DLE

Hi,

I have a nrf5340dk configured as a NUS peripheral, it collects some sensor data, packs it into a 138 byte buffer and sends it to the central.

On the central side there is a nrf52840 USB dongle connected to a Windows 10 PC communicating via Blatann library.

The system starts the stream with the following steps:

  1. Central connects to the peripheral
  2. Central negotiates the following parameters with the peripheral: 247 MTU, 2Mphy, 7.5ms connection interval
  3. Central waits for negotiation to finish, discovers peripherals UART service and sends a command to start streaming
  4. Peripheral initiates a 1khz timer that collects the data, packs it into a buffer and sends it to central. A timestamp is part of that buffer that is used to detect any discrepancies between the time the packets were sampled and received on central
  5. Central parses and profiles those packets, and after some determined amount of time it will send a command to stop the stream to the peripheral and it will display a graph of all the profiled packets

The aim is to have the "Timestamp average" field to be as close as possible to 1000 μs and a good throughput needs to be achieved for that to be so.

 

What I observed that that DLE size needs to be pretty specific for that throughput to be properly matched.

For example, when I set DLE to 251 I get:

But if I set it to 150 I get exactly what I expect (about ~30 μs discrepancy due to profiler precision and other factors)

Then if I set it to a lower value, in this case 120, I get a falloff again


In another example, sending a 27 byte buffer at 1khz with 251 DLE yields this result

But when I set DLE to 27 I get better results


My question is, what is the proper relationship between transmitted packet size and negotiated DLE size for best throughput?

Parents Reply Children
No Data
Related