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.

RSSI Register Interpretation calculation formula explanation

hi

Can anybody please help me in understanding the formula used for converting RSSI register value into RSSI_dBm ,I`m using CC1110 in a custom hardware ;

UINT8 rssi_dec;

INT16 rssi_dBm;

UINT8 rssi_offset = 72;

rssi_dec = RSSI;                    //For CC1110 SOC

if (rssi_dec >= 128)

{rssi_dBm = (INT16)((INT16)( rssi_dec - 256) / 2) - rssi_offset;} //negative value

else

{rssi_dBm = (rssi_dec / 2) - rssi_offset;.

Here why are we using the terms  (rssi_dec - 256)/ 2 and  (rssi_dec / 2)  ? Is this the correct way to read RSSI in cc1110 ?

  • That's doing two's complement to int16 conversation.
  • My code do not produce RSSI Values less than -80dBm obtained using the above formula is there any error in reading method or should I check hardware?(Custom HW)



    //RF Settings
    PKTCTRL1 = 0x00; // No address check. Append status bytes.
    PKTCTRL0 = 0x44; // Variable packet length. Use CRC. Enable whitening
    PKTLEN = 0x55; //64 old before fixed packet 85 packets
    // Filter BW, data rate.

    // Filter BW, data rate.

    MDMCFG4 = 0x2D; // Data Rate = 250 kbps------>(0x6D-->270.8khz) (0x2D---->541.666667khz) binary value --> 0b101101 Band_width-->541666.66666666666666666666666667
    MDMCFG3 = 0x3B; // Rx filter bandwidth = 542 kHz --> binary value --> 0b111011 59

    // IF frequency
    FSCTRL1 = 0x0C;
    FSCTRL0 = 0x00;

    // Modulation format, detection level
    MDMCFG2 = 0x13; // 30/32 bits sync word detection. GFSK modulation. 0x03-->2_fsk 0x
    MDMCFG1 = 0x43; // 8 byte preamble. No FEC.
    MDMCFG0 = 0x3B; // Channel spacing: 250 kHz

    // Deviation setting
    DEVIATN = 0x64;


    // Calibration synth
    MCSM2 = 0x07;
    MCSM1 = 0x30; // RXOFF_MOODE: Idle; TXOFF_MODE: Idle
    MCSM0 = 0x08; // Manual FS calibration

    // Frequency offset compensation configuration
    FOCCFG = 0x1D;

    // Bit synchronization
    BSCFG = 0x1C;
    AGCCTRL2 = 0xC7; .
    AGCCTRL1 = 0x40;
    AGCCTRL0 = 0xB0;


    // Front end settings (from SmartRF04)
    FREND1 = 0xB6;
    FREND0 = 0x10;

    // Synth calibration
    FSCAL3 = 0xEF;
    FSCAL2 = 0x2C;
    FSCAL1 = 0x24;
    FSCAL0 = 0x1F;


    PA_TABLE0 = 0x84;


    //RSSI Calculations


    if (RSSI >= 128) // calculate RSSI in dBm
    { rssi_testing = (int) ((RSSI - 256) / 2) - RSSI_OFFSET;}
    else
    { rssi_testing = (int) (RSSI / 2) - RSSI_OFFSET;}

    rssisum += abs(rssi_testing ); // convert to asbsolute value

    rssipkts++;
    if (rssipkts > 20) {
    rssipkts = 0;
    rssiavg= rssisum / 21; // calculate the average RSSI value over the last 21 packets
    rssisum = 0;
    rssivalid= 1; // mark rssiavg as valid
    }
    if(rssivalid==1)
    {

    //check for RSSI here
    if(rssiavg>80)
    {
    //Never happens



    }


    }
  • Would you be able to connect your board to a CCDebugger and test with SmartRF Studio?
    Have you tried to do the measurement with a 50 ohm termination to be sure you are not picking up background noise?
  • No I have not tried with CCDebugger ,And when testing with two cc1110 modules when one is switched off the other doesn't show any RSSI reading hence it may not be the background noise am I right?.I suppose some problem with the way I read RSSI .I do so in a timer and lit an led when RSSI drops below the specified value .


    int xdata rssi_value=0;//Variable declaration

    void timer1(void) interrupt 9 //8khz timer
    {

    if (RSSI >= 128) // calculate RSSI in dBm
    { rssi_value= (int) ((RSSI - 256) / 2) - 77;}
    else
    { rssi_value = (int) (RSSI / 2) - 77;}

    if(rssi_value < -60) //for checking RSSI value below -60 dbm
    {

    led=1;



    }else
    {



    led=0;


    }




    }
  • I'm a bit confused, under which conditions are you not able to get under -80 dBm?

    What does "does not show any RSSI reading" mean? The above function return a number? Do you have a signal generator? If so, apply a tone with known level and see if the RSSI follows the level on the SG.
  • I'm trying to do a two way RF audio communication system between two cc1110 chips(2 modules) and if one of the modules is moved from other the RSSI values in the other drops and finally at -77dBm and for any further movement RF link between the modules is lost .The breaking happens at -77 dBm and no values like -80dBm,-90dBm... are obtained .A'm i clear about the issue?

  • It's clearer.

    Do you carrier sense in your code?

    If no I still think testing with CCDebugger/ signal generator to check the hardware/ software in a more controlled manner.
  • thanks,no i don't do carrier sense ,I'm only checking IRQ_DONE from RFIF register.Now I can confirm that i'm getting RSSI values till the offset value only,ie i tried at 903Mhz and got a least RSSI value of -77dBm and with 433Mhz i got -73 dBm.I'm getting the offset value (in the RSSI formula) as the least value .rssi_value = (int) ((RSSI - 256) >> 1) - Offset_value
    I will try with CCDebugger.

  • Any reason why you have
    {rssi_dBm = (INT16)((INT16)( rssi_dec - 256) / 2) - rssi_offset;} //negative value

    in your first post but
    { rssi_value= (int) ((RSSI - 256) / 2) - 77;}

    in a couple of others? If you always get a limitation equal to the RSSI offset it sounds like you have a issue with the variables. I only checked the first code you posted in detail.
  • No ,Actually the RSSI value is varying and working as expected but when it  gets to  values below the so called offset value (-77 @ 250khz,900Mhz) the packets are not received and audio streaming stops(in my case).will the packets be only received  correctly above -77dBm? if so everything is working perfect.