Hello,
I have two nRF52832 (BL652) modules setup and connected through an RF cable. I am feeding the peripheral radio (2x) 174 byte packets every 5 ms. On the central, I am monitoring the receiving of these packets using the RTC clock and tracking the elapsed time between receiving these two packets from the peripheral. I have noticed that often times my latency climbs up to 15 ms, but most of the time it is around 5 ms. Is there a reason for this? I would expect to see some latency due to re-transmission, but not if I am connected through a RF cable.
I am using HVX notification transmissions from the peripheral, and occasionally sending packets from the central using a WRITE_CMD. My connection interval is set to be 7.5 ms, I have my CONN_SUP_TIMEOUT set to 1 second, and my SLAVE_LATENCY set to 0.
I modified the NUS example to where the main routine calls a new HVX transmission if the previous one ended with NRF_ERROR_RESOURCES. Should I move that to an APP_TIMER to give higher priority?
I confused as to why the latency would drift that far. Do I need to have all of the HVX packets loaded with the outgoing data before the beginning of the connection interval? Am I not able to load the HVX buffers with new data after the connection interval is underway? I was hoping that every other CI would have 4 packets of 174 bytes (10ms), and therefore maintain the rate. Should I increase my CI to 15 ms?
As an odd side note, it seemed like I needed to increase NRF_SDH_BLE_GAP_EVENT_LENGTH to a large value (300) as opposed to using 6 like the CI would require. That is the only way to get better latency, otherwise it was around ~30ms.
I would really appreciate some guidance.
Thanks,
Chris