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.

How to distinguish between TX and RX GDO0 interrupts in CC2500?

Other Parts Discussed in Thread: CC2500

I have a CC2500 module interfaced to a Arduino Due. The configuration file was generated with the help of SmartRf studio and I have verified that the module is getting properly configured via SPI.

I have also written code to transmit packets and this has also been verified on Smart RF studio. During transmission,end of a single TX was detected by configuring IOCFG0 = 0x06.

Now I need to incorporate reception of packets also into my code and I have a few queries.

1. Can we do reception also with the same GDO0 pin as an external interrupt? (IOCFG0 = 0x06)

2. If yes how can we know if the interrupt has been triggered by a RX or TX operation?

AN

  • 1) Yes, that is what we normally do in software examples
    2) Not sure I understand the question. The MCU knows if the radio is in Rx or Tx and will be able to handle the interrupt based on this knowledge.
  • Thank you for the quick response!

    "2. If yes how can we know if the interrupt has been triggered by a RX or TX operation?"

    Let me explain what I meant by the above statement.
    Since we are using the same pin as an interrupt for both TX and RX, how can we know which event triggered it?

    Also how can the MCU know about the CC2500's current status. Which register should we read for it?

    Thanks,
    AN
  • You can either be in Tx or in Rx.

    Either you are in a Tx function where the interrupt will mean that the packet is sent and you can send next packet etc.

    Or you are in a Rx routine where you know that an interrupt means a packet received. In your system you need to know if the last you did towards the radio was to send a STX or a SRX. The state could be read from MARCSTATE.