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);
}
- What's the point of writing REG_SYNCVALUE1 and then immediately overwriting it? Is this something necessary to get the bit synchronizer up and running right or something?
- It looks like you can add multiple sync words by also writing to REG_SYNCVALUE2, REG_SYNCVALUE3, etc. What impact does using sync words have on the range of the RFM69Ws?
- I'm assuming whatever sync words I choose will need to match on both by transmitter and receiver RFM69W modules?
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