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 make CC1200 pulse interrupt period longer

Other Parts Discussed in Thread: CC1200

Hi,

I am currently testing CCA with interrupts: http://e2e.ti.com/support/wireless_connectivity/f/156/t/370115.aspx.

I noticed that sometimes I did not register interrupt with AVR. AVR spec says that signal must be high at least 50 ns.

CC1200 userguide tabel 10 says, that pulse interrupt is 2 XOSC periods which is 50 ns if 40 MHz crystal is used. So this is quite tight and I can see with oscilloscope that sometimes G2 signal is high only 20 ns (it takes some time to reach it). Therefore this 50 ns is not guaranteed.

My question is, is there any trick that I could do to make this period longer. My goal is to use CCA with interrupts - I would like to get an interrupt when radio is finished doing CCA [IOCFG2 = 15;].

EDIT:

I was thinking that maybe doing CCA with interrupts is not that important, because CCA seems to finish almost immediately after sending STX. There is only 1.5 us between sending STX and getting CCA done interrupt.

Could you tell me if this will vary in some cases. Should I check anything else besides radio being in RX state while STX is made (RSSI valid, etc..)?

Andres

  • Hi Andres

    It is not possible to extend the pulse period, however if your mcu is not able to catch the pulse you can always poll for the status change by reading the TXONCCA_FAILED bit in MARC_STATUS0.

  • Hi,

    This is what I am doing currently:

    error_t m_do_cca() {
    uint8_t counter = 0;
    uint8_t state = m_get_chip_state();
    if (state == CC_STATE_OFF){
    return EOFF;
    }
    else if (state == CC_STATE_CALIBRATE || state == CC_STATE_SETTLING) {
    // we can only do CCA in RX mode, so check for that
    // if we're idle, calibrating or settling, return ERETRY so the sender will try again
    return ERETRY;
    }
    else if (state == CC_STATE_RXFIFO_OVERFLOW) {
    call Spi.strobe(CC120X_SIDLE);
    call Spi.strobe(CC120X_SFRX);
    return FAIL;
    }
    else if (state == CC_STATE_FSTXON) {
    // radio will go to TX without doing CCA
    }
    else if (state != CC_STATE_RX) {
    return ERETRY;
    }
    // carrier sense not yet valid
    // G2 configured as CARRIER_SENSE_VALID
    if (!call G2.get()) {
    return ERETRY;
    }
    call Spi.strobe(CC120X_STX);
    while (1) {
    state = m_get_chip_state();
    counter++;
    // check if radio is still in RX
    // it means channel is not clear and radio stays in RX
    if (counter >= 5 && state == CC_STATE_RX) {
    return FAIL;
    }
    if (state == CC_STATE_TX) {
    break;
    }
    if (counter >= 15) {
    return FAIL;
    }
    }

    // just to be sure read out radio state to check if CCA was successful or failed
    // 1 - CCA failed, radio stays in RX mode
    // 0 - CCA succeeded, radio goes to TX mode
    if (!(call Spi.readRegister(CC120X_MARC_STATUS0) & (1<<2))) {
    return SUCCESS;
    }
    else {
    // if CCA fails radio stays in RX mode
    return FAIL;
    }
    }

    Assumptions:

    • radio must be in RX state before doing CCA
    • if STX is strobed and radio stays in RX, then channel is busy and MARC_STATUS0 must have set TXONCCA_FAILED bit
    • if STX is strobed and radio changes state to TX, then MARC_STATUS0 TXONCCA_FAILED bit must be 0

     

    Is this correct?

    Andres