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 RSSI Reading

Other Parts Discussed in Thread: MSP430F5510, CC1200

Hello all,

I am working on a transceiver using the CC1200 RF chip together with an MSP430F5510 MCU. I have encountered a problem when trying to read the value of the RSSI1 and RSSI0 registers at reception.The goal is to get a valid RSSI reading of latest received packet.

Following the user guide- I set up IOCFG3 = 0x14, so that an interrupt is received on GPIO3 every time the RSSI is updated. In the ISR function, I read the RSSI1 register ( cc120xSpiReadReg(CC120X_RSSI1,&rssi_value2, 1); ). The value is initially -128 (the default value mentioned in the user guide), which then at reception does get updated, but seems to always be between -30 and -36, regardless of distance from the transmitter.

I am using a CC1200 Evaluation board as a reference RSSI and when it shows a large change in RSSI, the RSSI1 register's value is still around -30. This leads me to believe that I am either reading a wrong register, or reading it in the wrong time.

I added one reading in the ISR for GPIO3 and one in my state machine function, which gets called after an interrupt is received on GPIO2 (after a packet reception, IOCFG2 = 0x06).

Current radio settings are these:

static const registerSetting_t preferredSettings[]=
{
  {CC120X_IOCFG3,              0x14},
  {CC120X_IOCFG2,              0x06},
  {CC120X_IOCFG1,              0x30},
  {CC120X_IOCFG0,              0x3C},
  {CC120X_SYNC3,               0x59},
  {CC120X_SYNC2,               0x3C},
  {CC120X_SYNC1,               0xA9},
  {CC120X_SYNC0,               0x3C},
  {CC120X_SYNC_CFG1,           0x4A},
  {CC120X_SYNC_CFG0,           0x03},
  {CC120X_DEVIATION_M,         0x9A},
  {CC120X_MODCFG_DEV_E,        0x04},
  {CC120X_DCFILT_CFG,          0x5D},
  {CC120X_PREAMBLE_CFG1,       0x10},
  {CC120X_PREAMBLE_CFG0,       0x8F},
  {CC120X_IQIC,                0xCB},
  {CC120X_CHAN_BW,             0x05},
  {CC120X_MDMCFG1,             0x42},
  {CC120X_MDMCFG0,             0x05},
  {CC120X_SYMBOL_RATE2,        0xA9},
  {CC120X_SYMBOL_RATE1,        0x99},
  {CC120X_SYMBOL_RATE0,        0x9A},
  {CC120X_AGC_REF,             0x2D},
  {CC120X_AGC_CS_THR,          0xFF},
  {CC120X_AGC_GAIN_ADJUST,     0x00},
  {CC120X_AGC_CFG3,            0xB1},
  {CC120X_AGC_CFG2,            0x20},
  {CC120X_AGC_CFG1,            0x59},
  {CC120X_AGC_CFG0,            0x43},
  {CC120X_FIFO_CFG,            0x00},
  {CC120X_DEV_ADDR,            0x00},
  {CC120X_SETTLING_CFG,        0x0B},
  {CC120X_FS_CFG,              0x12},
  {CC120X_WOR_CFG1,            0x08},
  {CC120X_WOR_CFG0,            0x21},
  {CC120X_WOR_EVENT0_MSB,      0x00},
  {CC120X_WOR_EVENT0_LSB,      0x00},
  {CC120X_RXDCM_TIME,          0x00},
  {CC120X_PKT_CFG2,            0x00},
  {CC120X_PKT_CFG1,            0x00},
  {CC120X_PKT_CFG0,            0x20},
  {CC120X_RFEND_CFG1,          0x3F},
  {CC120X_RFEND_CFG0,          0x30},
  {CC120X_PA_CFG1,             0x3F},
  {CC120X_PA_CFG0,             0x52},
  {CC120X_ASK_CFG,             0x0F},
  {CC120X_PKT_LEN,             0xFF},
  {CC120X_IF_MIX_CFG,          0x1C},
  {CC120X_FREQOFF_CFG,         0x22},
  {CC120X_TOC_CFG,             0x0B},
  {CC120X_MARC_SPARE,          0x00},
  {CC120X_ECG_CFG,             0x00},
  {CC120X_MDMCFG2,             0x00},
  {CC120X_EXT_CTRL,            0x01},
  {CC120X_RCCAL_FINE,          0x00},
  {CC120X_RCCAL_COARSE,        0x00},
  {CC120X_RCCAL_OFFSET,        0x00},
  {CC120X_FREQOFF1,            0x00},
  {CC120X_FREQOFF0,            0x00},
  {CC120X_FREQ2,               0x56},
  {CC120X_FREQ1,               0xD2},
  {CC120X_FREQ0,               0x5A},
  {CC120X_IF_ADC2,             0x02},
  {CC120X_IF_ADC1,             0xEE},
  {CC120X_IF_ADC0,             0x10},
  {CC120X_FS_DIG1,             0x07},
  {CC120X_FS_DIG0,             0xA0},
  {CC120X_FS_CAL3,             0x00},
  {CC120X_FS_CAL2,             0x20},
  {CC120X_FS_CAL1,             0x40},
  {CC120X_FS_CAL0,             0x0E},
  {CC120X_FS_CHP,              0x28},
  {CC120X_FS_DIVTWO,           0x03},
  {CC120X_FS_DSM1,             0x00},
  {CC120X_FS_DSM0,             0x33},
  {CC120X_FS_DVC1,             0xFF},
  {CC120X_FS_DVC0,             0x17},
  {CC120X_FS_LBI,              0x00},
  {CC120X_FS_PFD,              0x00},
  {CC120X_FS_PRE,              0x6E},
  {CC120X_FS_REG_DIV_CML,      0x14},
  {CC120X_FS_SPARE,            0xAC},
  {CC120X_FS_VCO4,             0x14},
  {CC120X_FS_VCO3,             0x00},
  {CC120X_FS_VCO2,             0x00},
  {CC120X_FS_VCO1,             0x00},
  {CC120X_FS_VCO0,             0xB5},
  {CC120X_GBIAS6,              0x00},
  {CC120X_GBIAS5,              0x02},
  {CC120X_GBIAS4,              0x00},
  {CC120X_GBIAS3,              0x00},
  {CC120X_GBIAS2,              0x10},
  {CC120X_GBIAS1,              0x00},
  {CC120X_GBIAS0,              0x00},
  {CC120X_IFAMP,               0x01},
  {CC120X_LNA,                 0x01},
  {CC120X_RXMIX,               0x01},
  {CC120X_XOSC5,               0x0E},
  {CC120X_XOSC4,               0xA0},
  {CC120X_XOSC3,               0x03},
  {CC120X_XOSC2,               0x04},
  {CC120X_XOSC1,               0x03},
  {CC120X_XOSC0,               0x00},
  {CC120X_ANALOG_SPARE,        0x00},
  {CC120X_PA_CFG3,             0x00},
  {CC120X_WOR_TIME1,           0x00},
  {CC120X_WOR_CAPTURE1,        0x00},
  {CC120X_WOR_CAPTURE0,        0x00},
  {CC120X_BIST,                0x00},
  {CC120X_DCFILTOFFSET_I1,     0x00},
  {CC120X_DCFILTOFFSET_I0,     0x00},
  {CC120X_DCFILTOFFSET_Q1,     0x00},
  {CC120X_DCFILTOFFSET_Q0,     0x00},
  {CC120X_IQIE_I1,             0x00},
  {CC120X_IQIE_I0,             0x00},
  {CC120X_IQIE_Q1,             0x00},
  {CC120X_IQIE_Q0,             0x00},
  {CC120X_RSSI1,               0x80},
  {CC120X_RSSI0,               0x00},
  {CC120X_MARCSTATE,           0x41},
  {CC120X_LQI_VAL,             0x00},
  {CC120X_PQT_SYNC_ERR,        0xFF},
  {CC120X_DEM_STATUS,          0x00},
  {CC120X_FREQOFF_EST1,        0x00},
  {CC120X_FREQOFF_EST0,        0x00},
  {CC120X_AGC_GAIN3,           0x00},
  {CC120X_AGC_GAIN2,           0xD1},
  {CC120X_AGC_GAIN1,           0x00},
  {CC120X_AGC_GAIN0,           0x3F},
  {CC120X_CFM_RX_DATA_OUT,     0x00},
  {CC120X_CFM_TX_DATA_IN,      0x00},
  {CC120X_ASK_SOFT_RX_DATA,    0x30},
  {CC120X_RNDGEN,              0x7F},
  {CC120X_MAGN2,               0x00},
  {CC120X_MAGN1,               0x00},
  {CC120X_MAGN0,               0x00},
  {CC120X_ANG1,                0x00},
  {CC120X_ANG0,                0x00},
  {CC120X_CHFILT_I2,           0x02},
  {CC120X_CHFILT_I1,           0x00},
  {CC120X_CHFILT_I0,           0x00},
  {CC120X_CHFILT_Q2,           0x00},
  {CC120X_CHFILT_Q1,           0x00},
  {CC120X_CHFILT_Q0,           0x00},
  {CC120X_GPIO_STATUS,         0x00},
  {CC120X_FSCAL_CTRL,          0x01},
  {CC120X_PHASE_ADJUST,        0x00},
  {CC120X_PARTNUMBER,          0x20},
  {CC120X_PARTVERSION,         0x10},
  {CC120X_SERIAL_STATUS,       0x00},
  {CC120X_MODEM_STATUS1,       0x10},
  {CC120X_MODEM_STATUS0,       0x00},
  {CC120X_MARC_STATUS1,        0x00},
  {CC120X_MARC_STATUS0,        0x00},
  {CC120X_PA_IFAMP_TEST,       0x00},
  {CC120X_FSRF_TEST,           0x00},
  {CC120X_PRE_TEST,            0x00},
  {CC120X_PRE_OVR,             0x00},
  {CC120X_ADC_TEST,            0x00},
  {CC120X_DVC_TEST,            0x0B},
  {CC120X_ATEST,               0x40},
  {CC120X_ATEST_LVDS,          0x00},
  {CC120X_ATEST_MODE,          0x00},
  {CC120X_XOSC_TEST1,          0x3C},
  {CC120X_XOSC_TEST0,          0x00},
  {CC120X_AES,                 0x00},
  {CC120X_MDM_TEST,            0x00},
  {CC120X_RXFIRST,             0x00},
  {CC120X_TXFIRST,             0x00},
  {CC120X_RXLAST,              0x00},
  {CC120X_TXLAST,              0x00},
  {CC120X_NUM_TXBYTES,         0x00},
  {CC120X_NUM_RXBYTES,         0x00},
  {CC120X_FIFO_NUM_TXBYTES,    0x0F},
  {CC120X_FIFO_NUM_RXBYTES,    0x00},
  {CC120X_RXFIFO_PRE_BUF,      0x00},
  {CC120X_AES_KEY15,           0x00},
  {CC120X_AES_KEY14,           0x00},
  {CC120X_AES_KEY13,           0x00},
  {CC120X_AES_KEY12,           0x00},
  {CC120X_AES_KEY11,           0x00},
  {CC120X_AES_KEY10,           0x00},
  {CC120X_AES_KEY9,            0x00},
  {CC120X_AES_KEY8,            0x00},
  {CC120X_AES_KEY7,            0x00},
  {CC120X_AES_KEY6,            0x00},
  //{CC120X_AES_KEY5,            0x00},
  //{CC120X_AES_KEY4,            0x00},
  //{CC120X_AES_KEY3,            0x00},
  //{CC120X_AES_KEY2,            0x00},
  //{CC120X_AES_KEY1,            0x00},
  //{CC120X_AES_KEY0,            0x00},
  {CC120X_AES_BUFFER15,        0x00},
  {CC120X_AES_BUFFER14,        0x00},
  {CC120X_AES_BUFFER13,        0x00},
  {CC120X_AES_BUFFER12,        0x00},
  {CC120X_AES_BUFFER11,        0x00},
  {CC120X_AES_BUFFER10,        0x00},
  {CC120X_AES_BUFFER9,         0x00},
  {CC120X_AES_BUFFER8,         0x00},
  {CC120X_AES_BUFFER7,         0x00},
  {CC120X_AES_BUFFER6,         0x00},
  //{CC120X_AES_BUFFER5,         0x00},
  //{CC120X_AES_BUFFER4,         0x00},
  //{CC120X_AES_BUFFER3,         0x00},
  //{CC120X_AES_BUFFER2,         0x00},
  //{CC120X_AES_BUFFER1,         0x00},
  //{CC120X_AES_BUFFER0,         0x00},
};
  • Hi

    If you enable append status (PKT_CFG1 = 0x01) The receiver will append two status bytes at the end of the received packet where the RSSI of the received packet is contained in the first byte.

    At what distance are you measuring the -30 to -36 dBm?

  • Hi

    The request from the email is the same, yes. We can continue on here.

    The append status RSSI byte seems a better solution- it reacts better to a change in the received signal's power. It is still inconsistent. So I have my device connected to the evaluation board with a coaxial cable and am sending with the board at different output power levels. I have set the AGC_GAIN_ADJUST register to 0x00, as I'm not sure yet about the value. When I send with an output power of 0dBm I get values around +46 (0x2E) and around -22 (0xEA). Same happens at an output power of -24dBm- results are either around +24  (0x18) or -6 (0xFA).

    I assume the GAIN_ADJUST value should be around -40, but with the random negative values I get I am not sure.

    Best Regards,

    Lachezar

  • Hi

    I assume that the values you are reporting is before any rssi offset. Any way it is very strange that you have suck a large variation (~70 dBm).

    If you set the transmitter in continuous TX so you get a fixed input you can measure. What values do you get then?

  • Hi Martin,

    Firstly, apologies for the delayed response.

    It is correct that I haven't set any offset so far. The aforementioned values are directly from the appended rssi byte.

    As for the Continuous TX- I have set my transmitter to produce a continuous modulated signal in synchronous serial mode. I am not sure what I should be expecting as data, but I receive one byte of data (always 00) and the two appended bytes(RSSI and LQI). Once I start continuously transmitting, I receive only these three bytes. They never update further- I assume because no new data is transmitted to trigger a new appended rssi byte ?

    Once i restart the continuous transmission (without changing any parameters), the RSSI byte updates, but is still very inconsistent- values ranging from 46 to -6 (from the user guide I gathered it's a 2s compliment number?).


    I assume I'm either calculating something wrong or have set one of the register settings for the parameters for the AGC wrong, because in this case the RSSI byte value seems random or at least with a very large error margin.

    Kind Regards

    Lachezar

  • Hi

    Have you connected the devices to SmartRF Studio and checked the RSSI values you get in "Continuous RX"? Try also to use one of the recommended register settings from studio to check if it is related to the register settings or if the device could be damaged.