This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2500: After reading RXBYTES the next command issued gets a strange STATUS word

Part Number: CC2500

Hi!

After checking the amount of data in the RX-FIFO using the RXBYTES word the status word returned by the next spi transaction indicates data in the RX-FIFO even though the RXBYTES command showed that the fifo was empty. After a few additional spi-transactions the status word works as expected again. Is this expected behavior?

Using a bus listener the transactions are as follows:

MOSI                                                 MISO

0xFB                                      0x10

0x00                                      0x00

0xFB                                      0x10

0x00                                      0x00

0x3D                                      0x1F  //This is the unexpected STATUS

0x06                                      0x1F

0x06                                      0x1F

0xFB                                      0x10 //Status back to normal

0x00                                      0x00

Best Regards

/Torkel Hambraeus

  • Hi,

    I will get back to you asap.
  • I found the problem. The information was actually in the data sheet. The status shows either the tx-fifo or the rx-fifo depending on the r/w bit in the spi transfer.

    Quote from cc2500 data sheet page 23

    "The last four bits (3:0) in the status byte contains FIFO_BYTES_AVAILABLE. For read operations (the R/W bit in the header byte is
    set to 1), the FIFO_BYTES_AVAILABLE field contains the number of bytes available for Bits reading from the RX FIFO. For write
    operations (the R/W bit in the header byte is set to 0), the FIFO_BYTES_AVAILABLE field contains the number of bytes that can be
    written to the TX FIFO."

    Regards

    /Torkel Hambraeus