Hi
I am designing a Receiver incorporating CC1101 as my RF chip to support different types of legacy transmitter devices . This receiver will replace our legacy receivers.
The receiver CC1101's details are as follows:
ASK/OOK
304MHz
10KBaud
162KHz Bandwidth ( I tried with minimum and maximum as well)
Manchester Enabled
Packet Handler - (Off) Sync and Preamble Off
- Synchronous Serial with with data on GDO2 and clock on GDO0
- No address chekcing
- Infinite packet length
Whitening: off
Some may ask why I turn off packet handling, preamble/sync: Reason for this is the project(receiver) needs to support legacy transmitter devices which implements its own 2 byte flagging system. It does not send preamble and sync.
I already tested with different legacy devices if I can consistently pick up the data in <5 meters range . I can pick up the data consistently except for 1 legacy device. Sometimes I missed the event even if range is quite close. Power is not an issue because when I successfully receive the data on the same device, power still very high -40dBm.
I investigated further while running on debug and I found out that during the time I miss the event, there were 3 scenarios that might happen.
Before I go into the problems, let me quickly explain the protocol I am implemented:
1st byte (Flag1 - 0xAA)
2nd byte (Flag2 - 0xAB)
3rd byte - Message tpye
4th-6th byte - ID
7th-8th byte - Status
9th-10th byte - CRC
The legacy device that is having intermittent result implements the same protocol as other transmitter devices which are working fine. Now the 3 scenarios I encountered during the time I miss the packet are:
1. Message byte and 1st byte of ID is garbage, the rest are intact even the CRC
Example:
What I expect:
0xAA 0xAB 0x80 0x12 0x34 0x56 0x78 0x90 0xDD 0xBB
What I receive
0xAA 0xAB 0x7d 0x01 0x34 0x56 0x78 0x90 0xDD 0xBB
2. Bit Shift (CC1101 is giving out extra bits)
Flag bytes are correct. After the 2 flag bytes I am suppose to get the message type. However there are cases where in I received extra bits. I will illustrate below to further explain:
What I expect:
0xAA 0xAB 0x80 0x12 0x34 ....
0b10000000 0b00010010 0b00110100
What I get
0xAA 0xAB 0x20 0x04 0x8D
0b00100000 0b00000100 0b10001101
If you remove the 2 extra bits and move, you will get the data that I expect.
3. Totally garbage data
For the 3 scenario I mentioned above, it happens 1 at a time randomly. The most frequent is number 3. As this is synchronous, data reception is bit-banged in the MCU. The program is ok as I tested with other devices. Also I compare what I receive with the one I captured in Oscilloscope. The resulting bit-banged data is matching with that of what the CC1101 is sending serially (captured in scope).
I also tried normal mode on PKT_FORMAT. I polled the CC1101 via SPI every 10 ms to check if their is data. I encountered the same problem explained above with the collected data.
As mentioned above, we have legacy receivers as well. The problematic legacy transmitter works consistently with the legacy receiver. Unfortunately, I cannot investigate further on how the legacy receiver is handling the packets as it is a very old technology (designed 20 yrs ago: implements analog devices for its RF circuit).
So I am clueless on what is happening and why is CC1101 gives out extra bits or garbage data only for this specific legacy transmitter. I can understand if I cannot receive the data correctly at all. However, it is intermittent, sometimes the data are intact.
Any inputs or pointers on my problem will be greatly appreciated.
Thanks a lot!