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.

How to read RSSI in CC1111EMK868-915

Other Parts Discussed in Thread: CC1111EMK868-915

Hello,

I need to read the RSSI value from my CC1111EMK868-915 Dongle. I am working with IAR Embedded Workbench. I need to use it in the USB testproject to transfer it via USB. For this I am using the ide/usb_app_ex from this page. Further I tried to get the RSSI value following this guide, but when I compile it I get the error that the function

halSpiReadStatus(CCxxx0_RSSI);

in my case CC1111_RSSI (but that does not matter at this point) can not be found. If I search for it in IAR Embedded Workbench using Ctrl+Shift+F to look in ALL files I can not find it either. So I need to get this function anyhow or get the RSSI value in another way.

I hope the description of my problem is precise enough, if not let me know and I will update my question.

Luisa

  • Hi

    CC1111 is a SoC so you do not need a function to read the registers over SPI. This is only necessary for the transceivers. To read the RSSI register you simply write:

    UINT8 test = RSSI;

    Siri

  • Thank you, that worked perfectly. Do you further know, if the offset has to be subtracted from this or is it already subtracted?
    With this code I get around -80 to -100 dbM, but both devices are just right next to each other.

    int16_t rssi_dBm;
    rssi_offset = 77;
    rssi_dec = RSSI;
    if (rssi_dec >= 128)
    {
    rssi_dBm = (int16_t)((int16_t)( rssi_dec - 256) / 2) - rssi_offset;
    }
    else
    {
    rssi_dBm = (rssi_dec / 2) - rssi_offset;
    }
  • Hi

    You still need to do all the calculations described in DN505. The only difference is that you read the RSSI directly from a register on a SoC instead of reading via SPI.

    The design note gives you the offset for different data rates and frequency bands on the CC1110.

    BR

    Siri

  • I did follow the instuctions and copied the calculation exactly from DN505. But it still get values like "FF A6" which is in my understanding equivalent to -90. It appears that the code above subtracts the offset twice. If I add the offset once to -90 the RSSI seems much more reasonable. But this is only a guess and I need to know how this is exactly calculated and what I am doing wrong. I read DN505 a couple of times again but could not find any clue to my fault.

    BG Luisa

  • What do you mean by saying that you read 0xFFA6?

    The register is only 8 bits.

    If you get 0xA6, this is -90 interpreted as a 2’s complement number. You then divide by 2 and subtract the offset ((-90)/2) – 77 = -122

    BR
    Siri
  • OK, I am a bit confused at the moment.
    I took a look at it again and tried to understand it. During this process I tried to read only the RSSI value and output it just in this form. The values I got appeared to be quite reasonable, about between 0xDF and 0xC5. Interpreted they lay around 40 +-10, which is still a little bit to weak, because they are right next to each other.
    But this would mean, that this code:

    rssi_twoComplement = RSSI;

    would deliver directly the value (in 2-complement) which indicates the interesting value. But this is different from your answer, so I am confused.

    BR Luisa