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.

CC1120: Sample code for transmit with CCA

Part Number: CC1120


I'm looking for a sample code that show how to perform a transmit with CCA.

  • HI Siri,

    Thank you. I have already seen this link. But initially I was trying to get CCA_MODE = 011 (Indicates clear channel when RSSI is below threshold and currently not receiving a packet) working. I could not find any sample code for this.

    I have spent time following the EasyLink example to get CCA with LBT working. I am following the same flow in the code, however, I can only get the transmit working if I step through the code via the debugger. At this stage, I am not evening trying to use a jammer. I just want to get the TX working in LBT mode. If I run the code without stepping , the receiving device never gets the packet. Sometimes I see CRC errors on the receiving device.

    Furthermore, the link talks about the issue "transmitter stops working if it received a packet while in RX mode checking if the channel is busy or not". I have added your workaround to set SYNC_THR to 0 while checking the channel. But, I have not been successful yet.
    What is the findings from your designer of the CCA algorithm about this problem? Since this was back in 2014, has this been resolved and if so, what is the solution?

    regards
    Sudesh
  • Hi Siri,

    An update. I have managed to get the easylink example working with CCA LBT. However, what I found was that 2 packets are sent, after which GPIO0 interrupt which I have configured as 0x06, does not fire anymore.

    I had to get this to work, by strobing to idle and flushing the TX FIFO each time, before I write packet to TX FIFO and strobe RX. So, its now working reliably and I used another one our hardware devices to act as a jammer.

    A few things however, I need clarification on:

    1. In LBT mode, the the CC1120 users guide states: 

    "If LBT is enabled (PKT_CFG2.CCA_MODE = 100b) the CC112X will run the algorithm until successful transmission."

    I'm just trying to understand what would happen if channel is jammed for a prolonged period of time such that my application is affected. How can the application become aware that the packet has not been successfully transmitted and the CC1120 LBT algorithm is still trying? I want to be able to know this, and at the higher level, back-off for some and try the TX again. After x number of retries without success, the application may abort and try a different channel for example. The application will manage changing channels.

    2. While the CC1120 LBT algorithm is still running waiting for a clear channel, can the application switch back in RX mode? I assume this obviously can be done, but just wanted to confirm what is the process to switch to RX?

    regards

    Sudesh

  • Hi Sudesh

    If there is a jammer present the radio will try to enter TX until the channel is available. When this happens (channel available) you will have a pulse on TXONCCA_DONE and TXONCCA_FAILED is cleared.
    Since the radio is in RX mode while checking the channel there is no need to re-enter RX mode. If you want to cancel the TX, you will need to strobe IDLE and then strobe RX again.

    BR
    Siri