Hi Felix,
I have an application that requires very tight timing to synchronize a periodic signal wirelessly, and I wrote an algorithm that self-measures the time to send/receive packets is able to synchronize 2 Moteino M0s down to <10 uS with the 1.3.0 library.
However, with the new library in the master branch, there is an additional ~3.5ms of latency, and the jitter has increased to about 25 uS. I tracked down the changes that caused this to the sendFrame function:
{
setMode(RF69_MODE_STANDBY); // turn off receiver to prevent reception while filling fifo
while ((readReg(REG_IRQFLAGS1) & RF_IRQFLAGS1_MODEREADY) == 0x00); // wait for ModeReady
//writeReg(REG_DIOMAPPING1, RF_DIOMAPPING1_DIO0_00); // DIO0 is "Packet Sent"
.
.
.
//while (digitalRead(_interruptPin) == 0 && millis() - txStart < RF69_TX_LIMIT_MS); // wait for DIO0 to turn HIGH signalling transmission finish
while ((readReg(REG_IRQFLAGS2) & RF_IRQFLAGS2_PACKETSENT) == 0x00); // wait for PacketSent
setMode(RF69_MODE_STANDBY);
}
I was wondering, what were these changes supposed to do?
*edit*
I fixed the timing in my circuit by re-enabling the DIO0 write at the top; I was using the interrupt to trigger a timer for self-measuring.