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.

CC1200: confused random part by LBT algorithm

Part Number: CC1200

Hello,

im confused with the LBT implementation. The problem i have is, that the random part is always the same, the time is constantly 5ms after an jammer on the air is gone.

The following settings in accordance to the LBT algorithm and RSSI are made:

CC120X_SYNC_CFG0              =  0x03

CC120X_SYNC_CFG1              =  0x40

CC120X_AGC_CFG1                =  0x11

CC120X_AGC_CFG0                =  0x94

CC120X_AGC_GAIN_ADJUST = 0x9D

CC120X_AGC_REF                   = 0x25

CC120X_AGC_CS_THR            = 0xA2

CC120X_PKT_CFG2                  = 0x10

CC120X_RNDGEN                     = 0xFF

CC120X_IOCFG3                       = 0x4F

CC120X_IOCFG2                       = 0x59

As you can see:

green = CCA Status by IOCFG3

yellow = PA by IOCFG2

What am i doing wrong here?

Thanks in advance.

  • Hi,

    Can you explain in more detail how you want it to behave?

  • Hi, 

    as described in the User Guide SWRU346B chapter 6.12 paragraph b. I expected, that after the occupied channel is getting free, the pseudo random time tps varies. Within my configuration it doesnt do that. i got always the same fixed time of 5ms.

  • I am not able to reproduce what you are seeing.

    Please try to test this with standard settings from SmartRF Studio. I used the 38.4 kbps settings, and made the modifications shown below:

    // Address Config = No address check 
    // Bit Rate = 38.4 
    // Carrier Frequency = 867.999878 
    // Deviation = 19.989014 
    // Device Address = 0 
    // Manchester Enable = false 
    // Modulation Format = 2-GFSK 
    // Packet Bit Length = 0 
    // Packet Length = 255 
    // Packet Length Mode = Variable 
    // RX Filter BW = 104.166667 
    // Symbol rate = 38.4 
    // Whitening = false 
    
    static const registerSetting_t preferredSettings[]= 
    {
      {CC120X_IOCFG2,            0x58},// LNA
      {CC120X_IOCFG0,            0x59},// PA
      {CC120X_IOCFG3,            17},  // CS
      {CC120X_SYNC_CFG1,         0xA9},
      {CC120X_MODCFG_DEV_E,      0x0B},
      {CC120X_PREAMBLE_CFG0,     0x8A},
      {CC120X_IQIC,              0xC8},
      {CC120X_CHAN_BW,           0x10},
      {CC120X_MDMCFG1,           0x42},
      {CC120X_MDMCFG0,           0x05},
      {CC120X_SYMBOL_RATE2,      0x8F},
      {CC120X_SYMBOL_RATE1,      0x75},
      {CC120X_SYMBOL_RATE0,      0x10},
      {CC120X_AGC_REF,           0x27},
      {CC120X_AGC_CS_THR,        0xEE},
      {CC120X_AGC_CFG1,          0x11},
      {CC120X_AGC_CFG0,          0x94},
      {CC120X_FIFO_CFG,          0x00},
      {CC120X_FS_CFG,            0x12},
      {CC120X_PKT_CFG2,          0x10},// LBT
      {CC120X_PKT_CFG0,          0x20},
      {CC120X_PKT_LEN,           0xFF},
      {CC120X_IF_MIX_CFG,        0x1C},
      {CC120X_TOC_CFG,           0x03},
      {CC120X_MDMCFG2,           0x02},
      {CC120X_FREQ2,             0x56},
      {CC120X_FREQ1,             0xCC},
      {CC120X_FREQ0,             0xCC},
      {CC120X_IF_ADC1,           0xEE},
      {CC120X_IF_ADC0,           0x10},
      {CC120X_FS_DIG1,           0x07},
      {CC120X_FS_DIG0,           0xAF},
      {CC120X_FS_CAL1,           0x40},
      {CC120X_FS_CAL0,           0x0E},
      {CC120X_FS_DIVTWO,         0x03},
      {CC120X_FS_DSM0,           0x33},
      {CC120X_FS_DVC0,           0x17},
      {CC120X_FS_PFD,            0x00},
      {CC120X_FS_PRE,            0x6E},
      {CC120X_FS_REG_DIV_CML,    0x1C},
      {CC120X_FS_SPARE,          0xAC},
      {CC120X_FS_VCO0,           0xB5},
      {CC120X_IFAMP,             0x09},
      {CC120X_XOSC5,             0x0E},
      {CC120X_XOSC1,             0x03},
      {CC120X_RNDGEN,            0xFF},// Enable Random number generator
    };

    I tested 3 times, and for all 3 cases I got different intervals (5, 7.5, and 5.5 ms)

    My test code i below:

    void main(void) {
    
        // Initialize MCU and peripherals
        initMCU();
    
        // Write radio registers
        registerConfig();
    
        createPacket(txBuffer);
    
        // Write packet to TX FIFO
        cc120xSpiWriteTxFifo(txBuffer, sizeof(txBuffer));
        
        trxSpiCmdStrobe(CC120X_SRX);
        
        // Wait for radio CS to be valid before strobing STX
        do{
          cc120xSpiReadReg(CC120X_RSSI0, &rssi0, 1);
        } while ((rssi0 & 0x02) != 0x02);
          
        trxSpiCmdStrobe(CC120X_STX);
        
        while(1);
    }

    BR

    Siri

  • Hello Siri, thx for supporting me. I have tested youre code above and it works well on my machine as long as i do not use the eWOR functionality.  I can see that as soon as the eWor Timer is activated, the CC120X_RNDGEN Register is freezed. What can i do here?  

  • I cannot answer this without knowing exactly what you do in your code. Are you replacing the SRX strobe with the SWOR? That will not work, as the radio will need to be in RX to be able to evaluate if the channel is available or not.

    If you are simply using WOR mode for RX, and then use regular RX mode before TX (to evaluate the channel), please provide me with enough if so for me to reproduce what you are seeing.

    Siri

  • Hello,

    as default the eWor Timer is activated by the SWOR command and my system waits for smartPreamble Packets. When i have something to send in between, i start the LBT in more or less the same way as shown in youre code above... Then i see that the RNDGEN is not producing any random numbers and i get always the same timing between the CARRIER_SENSE and the PA ... Instead, when im not using the SWOR command, everything works fine with the LBT Algortihm.

    Its also reproduceable with the trxEB and youre code above with one more line, just before the trxSpiCmdStrobe(CC120X_SRX) i inserted the trxSpiCmdStrobe(CC120X_SWOR). The CC120X_RNDGEN is not producing any more random numbers, it looks like freezed.

    Turning back on the CC120X_RNDGEN each time before LBT helps to get the pseudo random listening time back to work as expected!

    Alex

  • It seems like the RNDGEN is disabled when you are using WOR. In addition, the RFEND_CFG0 register made some problems for me.

    I tested my code with WOR registers exported from SmartRF Studio and LBT enabled like in my previous post.

    To get the LBT behave correctly, I had to re-enable RNDGEN before starting normal RX, and I also had to set RFEND_CFG0 back to 0x00 (is 0x09 when using WOR):

    void main(void) {
    
        // Initialize MCU and peripherals
        initMCU();
    
        // Write radio registers
        registerConfig();
    
        createPacket(txBuffer);
    
        // Write packet to TX FIFO
        cc120xSpiWriteTxFifo(txBuffer, sizeof(txBuffer));
        
        trxSpiCmdStrobe(CC120X_SCAL);
        
        trxSpiCmdStrobe(CC120X_SWOR);
        
        waitMs(1000);
        
        writeByte = 0x00;
        cc120xSpiWriteReg(CC120X_RFEND_CFG0, &writeByte, 1);
        
        writeByte = 0xFF;
        cc120xSpiWriteReg(CC120X_RNDGEN, &writeByte, 1);
     
        trxSpiCmdStrobe(CC120X_SRX);
        
        // Wait for radio CS to be valid before strobing STX
        do{
          cc120xSpiReadReg(CC120X_RSSI0, &rssi0, 1);
        } while ((rssi0 & 0x02) != 0x02);
          
        trxSpiCmdStrobe(CC120X_STX);
        
        while(1);
    }

    BR

    Siri