Hello,
We've a design/arch question about the performance of nRF52840 device (dongle/EVK).
In our system, we've a PC connected to a PTX that communicates with multiple PRXs (via ESB), collect data and send it back to the PC (via cdc_acm, ACK + Payload). Our objective is to measure latency (how much time from the moment the PC requests data until it gets the data from all the PRXs devices).
I'm currently testing packets of 128 bytes (payload, not considering the protocol overhead) and I get the following results:
Wifi (transmit to ACK): ~0.97ms
UART Latency (response time from uart_irq_tx_enable until the callback is reached): ~0.36ms
Round-trip (on PC side, from request to reception of the PRXs payloads): ~1ms + ~1ms for each PRX device

The test case was performed as follows:

- PC requests PTX to collect data from all the PRXs
- PC start to measure time
- PTX parses the command
- Performs the following for each connected device:
- PTX sends to each PRX a request
- PRX reply ACK+Payload
- PTX copies the data to a buffer and trigger the UART IRQ
- PTX UART callback is triggered (after delay of ~0.36ms)
- PTX UART send serial Data to PC
- PC measure time and plot it to the graph
Questions:
- Is the writing/reading from UART a blocking function call (esb_read_rx_payload/uart_fifo_fill)? What about ESB (esb_write_payload)?
- or the buffer is copied somewhere else and the tx/rx is done in parallel?
- Are the results plausible (~6ms for my example to retrieve data from all 4 RX devices)?
- Any suggestion/technique to reduce this latency? (perhaps invert the roles, so the device connected to the PC will be PRX and remaining devices PTX ?)
Thank you in advance for your time,
