Hello,
I have two CC1120 radios i.e. A is transmitter with CRC enabled and B is receiver with APPEND_STATUS enabled and PKT_LEN set to 12 i.e. 0x0C. Radio A transmits a fixed length packet of 12 bytes. At the receiver, after PKT_SYNC_RXTX de-asserts, I read the NUM_RXBYTES register to know how many bytes to read from RXFIFO. The first time I read, the NUM_RXBYTES register returns 14 bytes i.e. 12 bytes payload + 2 status bytes, so I read 14 bytes from RXFIFO.
Issue #1:
The first (i.e. Byte[0]) and last (i.e. Byte[13]) bytes were garbage. Byte[1] through Byte[12] were the correct payload sent by the transmitter. I thought Byte[0] through Byte[11] should be the payload, while Byte[12] and Byte[13] are the status bytes, right?
Issue #2:
After I read the RXFIFO, I checked NUM_RXBYTES register again and it returns 1 bytes. I thought NUM_RXBYTES should returns 0 since I already read all 14 bytes from RXFIFO earlier.
Issue #3:
Radio A then sent another 12-byte packet. At the receiver, after PKT_SYNC_RXTX de-asserts, I read NUM_RXBYTES register and it now returns 15 bytes, presumably 14 bytes payload + 1 unknown byte left in the RXFIFO. When I read all 15 bytes from RXFIFO, Byte[0], Byte[1] and Byte[14] were garbage, while Byte[2] through Byte[13] were the correct payload. Again, after I have read RXFIFO and checked NUM_RXBYTES register, it still returns 1 byte. This is repeated for subsequent packets transmitted by radio A.
Question:
1. Why RXFIFO never empties when I have read all data from it?
2. Why I never actually receive status bytes appended at the end of the packet? Instead, I'm getting garbage bytes at the beginning and end of packet.
Appreciate if someone can help me out. Thanks.