When strobing TX while in RX mode, the radio will enter TX state if the channel is
clear (the CCA signal is set). How a clear channel is defined depends on the CCA
mode setting (MCSM1.CCA_MODE).

For the 4 different CCA modes, CS and CCA will be asserted as follows:

CCA_MODE = 00        CCA_MODE = 01

CS  |  Receiving  |  CCA    CS  |  Receiving  |  CCA
----------------------------    ----------------------------
0    |  0              |  1        0     |  0              |  1
0    |  1              |  1        0     |  1              |  1
1    |  0              |  1        1     |  0              |  0
1    |  1              |  1        1     |  1              |  0
----------------------------    ----------------------------


CCA_MODE = 10         CCA_MODE = 11

CS  |  Receiving  |  CCA    CS  |  Receiving  |  CCA
----------------------------    ----------------------------
0     |  0              |  1        0     |  0              |  1
0     |  1              |  0        0     |  1              |  0
1     |  0              |  1        1     |  0              |  0
1     |  1              |  0        1     |  1              |  0
----------------------------    ----------------------------

Note:
CS = Carrier Sense. This signal is set when the RSSI is above threshold
Receiving means that the radio is currently receiving a packet.

If the channel is not clear when issuing the STX strobe, no data will be sent and
the radio will continue to stay in RX state. The application must manually try to
send the packet again, by issuing another STX strobe.

It is important to note that the radio must stay in RX for a little while before the
RSSI is valid (if STX is strobed before the RSSI is valid, the packet will not be
sent). DN505 explains how the RSSI Response time (the time it takes before the
RSSI is valid) can be estimated. Have in mind that this estimation will only be
valid for weak signals. For stronger signals, the RSSI response time will be longer
and the application should add some margins. To avoid too much overhead when
waiting fro the RSSI to be valid, there is an indirect method of checking if the RSSI
is valid.

RSSI Valid  |  Signal on the air above RSSI threshold  |  CS  |  CCA
-------------------------------------------------------------------------------
0                |  0                                                        |  0     |  0
0                |  1                                                        |  0     |  0
1                |  0                                                        |  0     |  1
1                |  1                                                        |  1     |  0
------------------------------------------------------------------------------

The CS flag will only be asserted if the RSSI is valid and there is a signal on the
air stronger than the programmed RSSI threshold. The CCA flag will only be
asserted if there are no signal on the air above RSSI threshold (CS  = 0) and the
RSSI is valid. This means that if CS = 1 or CCA = 1, we know that the RSSI is
valid. This can help in reducing the overhead when waiting to strobe TX.

Assume a data rate is 10 kBaud (CC2500). From DN505 one can see that for weak
signals, the RSSI response time is ~250 us. Testing has showed that for stronger
signals (- 50 dBm), the response time is ~380 us. When adding some margins one
should wait for example 500 us after RX mode is entered BEFORE trying  to strobe
STX.

A transmit using CCA can then be implemented as follows:

1) Strobe SRX
2) Wait for RX mode to be entered (poll MARCSTATE)
3) Wait 500 us for RSSI to be valid (in this wait function one can check to see if
    CS or CCA is being asserted. If they are, one can break from this function as it
    is not necessary to wait any longer)
4) Strobe STX
5) Check that the packet is being sent.

    This can be done in 3 different ways:
    a) Poll MARCSTATE to see if the radio enters TX state
    b) Wait for the packet sent signal (IOCFGn=0x06) to be asserted. Since this
        signal also can indicate that a packet has been received (if the channel was
        not clear and the radio continued in RX state), one should now read the
        TXBYTE status register to check if the packet is still in the TXFIFO.
    c) Wait for a PA_PD signal (IOCFGn=0x1B) to be asserted. This should happen
        about 782/fRef us after the STX strobe has been issued (fRef is the
        reference frequency for the synthesizer in MHz)