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: corrupted packets

Part Number: CC1200

Hi,

I have a scenario, where I want cc1200 to only be in reception mode and receive all the packets in air, much like smart RF. I have the same register settings as smart RF.

But, in certain cases where the interval between consecutive packets is very less and they are from different sources, I observe that around 10% of the packets are received with error, few bits/bytes mismatched.

what might cause this issue? does it require some fine tuning? which areas should I look into to resolve this issue? Is there an example code for the smart RF functionality, which i can refer to? 

I need a software point of view to fix this error

  • Hi Aratrika,

    since you mention that the packet loss occurs when the interval between packets is small and they are from different transmitters, it seems that the packets are overlapping/colliding and causing the packet errors. 

    What happens if you have the CC1200 running in reception mode using smart RF and your custom hardware at the same time, do you see about the same packet loss in smartRF studio and you custom hardware?

    Can you use listen before talk on the transmitter side to reduce the possibility of packets colliding?

  • 1. If i keep smart RF and custom hardware in reception mode ... i dont see corrupted packets in smart RF

    2. LBT is already enabled in the transmitters

  • Hi Aratrika,

    Could you share your code and the register settings?

  • CC1200_documents.txt
    //Interrupt Handler
    void InterruptHandler(void) 
    {
        const uint8 MARC_STATE_STATUS_BITS_MASK = 0x1FU;
        //Marc State Status = RX FIFO Error constant
        const uint8 MARC_STATE_RX_FIFO_ERROR = 0x11U;
        uint8 u8SPIRegAccessResp;
       
        cc120xSpiReadReg(CC1200_MARCSTATE,&u8SPIRegAccessResp);
    
        if((u8SPIRegAccessResp & MARC_STATE_STATUS_BITS_MASK) == MARC_STATE_RX_FIFO_ERROR)
        {
            trxSpiCmdStrobe(CC1200_SFRX);
            trxSpiCmdStrobe(CC1200_SFTX);
            trxSpiCmdStrobe(CC1200_SIDLE);
            DelayuSec(150);
            trxSpiCmdStrobe(CC1200_SRX);
        }
        else
        {
            ReceiveData();   
        }
    }
    
    
    
    
    void ReceiveData(void)
    {   
       uint8 i =0;
       uint8 RFBuffer[128];
       uint8 rxBytes = 0U;
       
       //Read number of bytes in RX FIFO
       cc120xSpiReadReg(CC1200_NUM_RXBYTES, &rxBytes,1);
       
       if(rxBytes != 0)
       {
          cc120xSpiReadRxFifo(RFBuffer, rxBytes);
          //Select and enable Reception mode
          RxModeSelect();
       } 
    }
    
    void RxModeSelect() 
    {
       uint8 val =0;
       trxSpiCmdStrobe(CC1200_SRX);
       DelayuSec(50);
       cc120xSpiReadReg(CC1200_MARCSTATE,&val,1);         
       while(((val & 0x1f) != 0x0d) && (Retry_Count < 10))
       {
          cc120xSpiReadReg(CC1200_MARCSTATE,&val,1);
          trxSpiCmdStrobe(CC1200_SFRX);
          trxSpiCmdStrobe(CC1200_SFTX);
          trxSpiCmdStrobe(CC1200_SIDLE);
    	  DelayuSec(150);
          trxSpiCmdStrobe(CC1200_SRX);
    	  Retry_Count++;
       };
    }
    
    void main(void)
    {
       RxModeSelect();
       while(1)
       {
       
       }
    
    }
    hi,

    Below are the settings:

    {CC1200_IOCFG2, 0x06},
    {CC1200_SYNC3, 0xF0},
    {CC1200_SYNC2, 0xCC},
    {CC1200_SYNC1, 0xF0},
    {CC1200_SYNC0, 0xCC},
    {CC1200_SYNC_CFG1, 0xA8},
    {CC1200_SYNC_CFG0, 0x13},
    {CC1200_DEVIATION_M, 0x68},
    {CC1200_MODCFG_DEV_E, 0x04},
    {CC1200_DCFILT_CFG, 0x26},
    {CC1200_PREAMBLE_CFG0, 0x8A},
    {CC1200_PREAMBLE_CFG1, 0x34},
    {CC1200_IQIC, 0x00},
    {CC1200_CHAN_BW, 0x82},
    {CC1200_MDMCFG1, 0x42},
    {CC1200_MDMCFG0, 0x05},
    {CC1200_SYMBOL_RATE2, 0x7F},
    {CC1200_SYMBOL_RATE1, 0x75},
    {CC1200_SYMBOL_RATE0, 0x10},
    {CC1200_AGC_REF, 0x2A},
    {CC1200_AGC_CS_THR, 0x01},
    {CC1200_AGC_CFG1, 0x16},
    {CC1200_AGC_CFG0, 0x84},
    {CC1200_SETTLING_CFG, 0x0B},
    {CC1200_FIFO_CFG, 0x00},
    {CC1200_FS_CFG, 0x12},
    {CC1200_PKT_CFG2, 0x00},
    {CC1200_PKT_CFG1, 0x00},
    {CC1200_PKT_CFG0, 0x20},
    {CC1200_PA_CFG0, 0xFE},
    {CC1200_PA_CFG1, 0x7F},
    {CC1200_PKT_LEN, 0xFF},
    {CC1200_IF_MIX_CFG, 0x18},
    {CC1200_TOC_CFG, 0x03},
    {CC1200_MDMCFG2, 0x00},
    {CC1200_FREQ2, 0x5B},
    {CC1200_FREQ1, 0x99},
    {CC1200_FREQ0, 0x99},
    {CC1200_IF_ADC1, 0xEE},
    {CC1200_IF_ADC0, 0x10},
    {CC1200_FS_DIG1, 0x07},
    {CC1200_FS_DIG0, 0x5A},
    {CC1200_FS_CAL1, 0x40},
    {CC1200_FS_CAL0, 0x0E},
    {CC1200_FS_DIVTWO, 0x03},
    {CC1200_FS_DSM0, 0x33},
    {CC1200_FS_DVC0, 0x17},
    {CC1200_FS_PFD, 0x00},
    {CC1200_FS_PRE, 0x6E},
    {CC1200_FS_REG_DIV_CML, 0x1C},
    {CC1200_FS_SPARE, 0xAC},
    {CC1200_FS_VCO0, 0xB5},
    {CC1200_IFAMP, 0x0D},
    {CC1200_XOSC5, 0x0E},
    {CC1200_XOSC1, 0x03}

  • Hi Aratrika,

    Could you please review, implement and test in your platform with the CC120x_easy_link_rx.c file found in CC120X Software Examples.

    We would like to confirm if you still see or don't see the issue using the example code.

  • hi

    i checked with the example code you provided/ i still have the same issue