I am writing my own CC2500 radio libraries using the ez430-rf2500 as a test platform.
When I receive a packet, several bytes are left shifted by one bit. For example, if I send a packet with data 0x0101010101, I might receive 0x0101020101, or send 0x555555 and receive 0xaa55aa.
The interesting part is that I have CRC_AUTOFLUSH=1, so the shift either occurs before transmission or after reception from/to the CC2500.
I initially suspected my SPI configuration on the MSP430 to be the problem, but I connected the SPI pins to a protocol analyzer and that does not seem to be the problem. When transmitting over SPI from MSP430 to CC2500, the data stays intact.
I then thought that maybe it is the CC2500's SPI, so I decided to do a burst read of the CC2500's configuration registers to see if there was any bit-shifting. Unfortunately, this was not the case.
Am I missing something here? If reading the configuration registers works fine, the SPI interface should be working fine. At the same time, if the bits are shifting over-the-air(upon reception or transmisison) the CRC should not check out and the packet should be flushed and never sent over SPI.
I would appreciate any suggestions to what I could check next.
- Alvaro
Here is the capture of the transmission from MSP430 to CC2500 of a packet full of ones.
Here is the capture of the reception from CC2500 to MSP430 of a packet full of ones. (You can see how some are reported as twos)
For reference, the code I used can be seen here:
https://github.com/alvarop/cc430bsn/blob/ez430-rf2500/cc2500test/cc2500test.c
Radio library:
https://github.com/alvarop/cc430bsn/blob/ez430-rf2500/lib/radio_cc2500.c
SPI configuration:
https://github.com/alvarop/cc430bsn/blob/ez430-rf2500/lib/uart_ez430.c