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 CRC & LQI

Other Parts Discussed in Thread: CC1120

Hi,

as i want to read out the packet after it is completely received (falling edge of PKT_SYNC_RXTX), i don't want to waste space in in RX FIFO for RSSI + LQI + CRC (APPEND_STATUS = 0). But i don't manage to read out the correct CRC + LQI value (it always returns 0). What is the correct way to check CRC? When to read out the RSSI_VAL register?

Regards

Ulf

  • Hi Ulf

    Set APPEND_STATUS = 0 so that the status bytes are not appended to the RXFIFO. The RSSI can be read from the RSSI1 register after sync has been detected. The value is available in the register until RX is re-started. The CRC can be read from the LQI_VAL register after a falling edge on PKT_SYNC_RXTX. You can also output the CRCV signal (PKT_CRC_OK) on a GPIO pin and use this to interrupt the MCU. You must then make sure that CRC_AUTOFLUSH is enabled.

    BR

    Siri

  • Hi Siri,

    i guess my problem was that RXOFF_MODE was RX, that means that when i entered the IRQ (PKT_SYNC_RXTX) the radio was in RX again -> the LQI + RSSI were both invalid!

    With regard to the register MODEM_STATUS1: can you confirm that SYNC_FOUND de-asserts as soon as i start FIFO read-out (not when SRX strobe is issued as written in the user manual?)

    Regards

    Ulf

  • Hi Ulf

    I am pretty sure that the user guide is correct but I am not able to test this today as I do not have the HW I need available.

    Remember that if you are using RXOFF_MODE = RX, RX is restarted automatically (internal SRX strobe) once a packet has been received and the SYNC_FOUND bit will be de-asserted. It is likely that this happens at the same time as you start reading your first received packet from the FIFO.

    You can do a test where you do not read the FIFO after a packet has been received. Hopefully you will see that as soon as RX is re-started, the signal is de-asserted.

    If this is not the case, please let me know and I will look into this when I am back in the office.

    BR

    Siri

  • Siri,

    thanks, it was my mistake. MODEM_STATUS1.SYNC_FOUND works as expected.

    Regards

    Ulf

  • Hi Siri,
    I am also working with RSSI and LQI on CC1120 and I get a problem that need your help.
    As you mention above, LQI can read out from LQI_VAL registry, but I can't, I use this funtion:

    cc112xSpiReadReg(CC112X_LQI_VAL ,&lqi, 1);

    it always returns 0 at all time ! This is my receive data : 

    last_data=0xAA ;   // it's correct
    1st_appended=0x81  // CRC=1 and LQI=1 (at 1m distance) ??
    2nd_appended= 54;  // RSSI
    lqi=0x00;          // read out from LQI_VAL

    Is "LQI=1" result suitable at 1m distance ? Could you show why both LQI values are not the same ?
    Give you my setting and need your help , thank you !

    {CC112X_IOCFG3,            0xB0 },  //GPIO3 IO Pin Configuration
    {CC112X_IOCFG2,            0x06 },  //GPIO2 IO Pin Configuration
    {CC112X_IOCFG1,            0xB0 },  //GPIO1 IO Pin Configuration
    {CC112X_IOCFG0,            0x06 },  //GPIO0 IO Pin Configuration
    {CC112X_SYNC_CFG1,         0x0B },  //Sync Word Detection Configuration Reg. 1
    {CC112X_DCFILT_CFG,        0x1C },  //Digital DC Removal Configuration
    {CC112X_IQIC,              0xC6 },  //Digital Image Channel Compensation Configuration
    {CC112X_MDMCFG0,           0x05 },  //General Modem Parameter Configuration Reg. 0
    {CC112X_AGC_REF,           0x20 },  //AGC Reference Level Configuration
    {CC112X_AGC_CS_THR,        0x19 },  //Carrier Sense Threshold Configuration
    {CC112X_AGC_CFG1,          0xA9 },  //Automatic Gain Control Configuration Reg. 1
    {CC112X_AGC_CFG0,          0xCF },  //Automatic Gain Control Configuration Reg. 0
    {CC112X_FIFO_CFG,          0x00 },  //FIFO Configuration
    {CC112X_SETTLING_CFG,      0x03 },  //Frequency Synthesizer Calibration and Settling Con..
    {CC112X_FS_CFG,            0x1A },  //Frequency Synthesizer Configuration
    {CC112X_PKT_CFG0,          0x20 },  //Packet Configuration Reg. 0
    {CC112X_PKT_LEN,           0xFF },  //Packet Length Configuration
    {CC112X_IF_MIX_CFG,        0x00 },  //IF Mix Configuration
    {CC112X_FREQOFF_CFG,       0x22 },  //Frequency Offset Correction Configuration
    {CC112X_FREQ2,             0x69 },  //Frequency Configuration [23:16]
    {CC112X_FREQ1,             0xA0 },  //Frequency Configuration [15:8]
    {CC112X_FS_DIG0,           0x5F },  //Frequency Synthesizer Digital Reg. 0
    {CC112X_FS_CAL1,           0x40 },  //Frequency Synthesizer Calibration Reg. 1
    {CC112X_FS_CAL0,           0x0E },  //Frequency Synthesizer Calibration Reg. 0
    {CC112X_FS_DIVTWO,         0x03 },  //Frequency Synthesizer Divide by 2
    {CC112X_FS_DSM0,           0x33 },  //FS Digital Synthesizer Module Configuration Reg. 0
    {CC112X_FS_DVC0,           0x17 },  //Frequency Synthesizer Divider Chain Configuration ..
    {CC112X_FS_PFD,            0x50 },  //Frequency Synthesizer Phase Frequency Detector Con..
    {CC112X_FS_PRE,            0x6E },  //Frequency Synthesizer Prescaler Configuration
    {CC112X_FS_REG_DIV_CML,    0x14 },  //Frequency Synthesizer Divider Regulator Configurat..
    {CC112X_FS_SPARE,          0xAC },  //Frequency Synthesizer Spare
    {CC112X_FS_VCO0,           0xB4 },  //FS Voltage Controlled Oscillator Configuration Reg..
    {CC112X_XOSC5,             0x0E },  //Crystal Oscillator Configuration Reg. 5
    {CC112X_XOSC1,             0x03 },  //Crystal Oscillator Configuration Reg. 1
    };




  • Hi

    The first appended byte in the FIFO is the RSSI and the second is the CRC and LQI.

    I did several tests with SmartRF Studio where I both read out the status bytes from the FIFO (I used RF Device commands) and from the LQI_VAL register and the LQI was always the same. I talked to one of our mode designers and he said that the value will be 0 in most cases (and sometimes 1). To see other values you need to operate close to the sensitivity limit.

    BR

    Siri