LowPowerLab Forum

Hardware support => RF - Range - Antennas - RFM69 library => Topic started by: Tylerlee12 on April 09, 2018, 10:36:35 PM

Title: What's going on with the bit synchronizer and sync values?
Post by: Tylerlee12 on April 09, 2018, 10:36:35 PM
Hi all!

Just starting up with an RFM69W.  In regards to the bit synchronizer, I noticed this library has this code:

https://github.com/nayem-cosmic/RFM69-Library-AVR/blob/f649ef8b25dfb531041cfa5dfca314cf0952b301/RFM9.c#L119

while (readReg(REG_SYNCVALUE1) != 0xaa)
{
writeReg(REG_SYNCVALUE1, 0xaa);
}

while (readReg(REG_SYNCVALUE1) != 0x55)
{
writeReg(REG_SYNCVALUE1, 0x55);
}



Title: Re: What's going on with the bit synchronizer and sync values?
Post by: emjay on April 10, 2018, 06:16:41 AM
1. It is a sanity test that the SPI bus is actually talking to a live RF module - you can see that this code is very early in the init sequence - the test patterns (alternating one/zero) are of course not relevant to later when the module is fully initialised and active.

2. Synch pattern length is more about immunity to noise - the longer the length the less chance that random input bit streams will trigger a false packet decode

3. Yes