Slow (~100ms) NRF24 writes, when receiver is online

Hi,
While pushing the NRF24 radio I've encoutered a strange bug which seems to delay write's significantly (~100ms). Not sure if this is some sort of race condition.
I define retries as two attempts with a gap of 500us.
radio.setRetries(1,1); //delay(microseconds (n+1)*250, count)

To test I've assigned two timers, one before the write loop, one after. Loop serves as a rough signal quality indication.
test1 = millis();
while(ack_rec == false && count < 10)
{
ack_rec = radio.write(serialIN, 5);
count += 1;
}
test2 = millis();

Highlighted in blue is the time difference (ms) from before writing radio data to sending data back across USB [test1], highlighted in red is the time difference (ms) from after writing to sending data back across USB [test2]. Hence ~1 second is used in the write here. More testing showed that a loop of 1 iteration had ~100ms delay, hence delay is cumulative with iterations. Also worth mentioning is that every "slow" response failed to receive any ack.
[ATTACH1]

However in what should be a worst case scenario with receiver unplugged gives a ~35ms delay.
[ATTACH2]

Any ideas what might cause the radio.write to suddenly, and occasionally, take ~100ms per write?
Cheers.

delay.jpg

not_delayed.jpg

delay.jpg

not_delayed.jpg

Anyone had a similar issue?
Also to add that the library is the lastest version of RF24.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.