This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to translate the result from register RSSISAMPLE to the real RSSI ?

Hi, Thank you for your kindly help.

I have get the result from the register RSSISAMPLE. The result I get from RSSISAMPLE is like this:0x00000050. As you known, the result should be a negative number. So there must be a formula or some other operation to translate it into the final result. But I haven't find any document about that. So please reply soon.

Many thans

Parents
  • This is pretty clearly stated in the nRF51 Reference Manual: "The value of this register is read as a positive value while the actual received signal strength is a negative value. Actual received signal strength is as follows: Received signal strength = -A [dBm]"

    This means that your 0x50 = 80, to be read as -80 dBm.

  • Now I have another problem. I use the example button_radio_example to get RSSI. I write code like this in PCA10000. NRF_RADIO->EVENTS_READY = 0U; // Enable radio and wait for ready NRF_RADIO->TASKS_RXEN = 1U; while(NRF_RADIO->EVENTS_READY == 0U) { } NRF_RADIO->EVENTS_END = 0U; // Start listening and wait for address received event NRF_RADIO->TASKS_START = 1U; // Wait for end of packet while(NRF_RADIO->EVENTS_END == 0U) { }

    	//get RSSI
    	NRF_RADIO->EVENTS_RSSIEND = 0U;
    	NRF_RADIO->TASKS_RSSISTART = 1U;
      while(NRF_RADIO->EVENTS_RSSIEND == 0U)
    	{
    }
    	
    	rssi = NRF_RADIO->RSSISAMPLE;
    

    When the two device is so closed. The rssi result is -72dB. And sometimes I get -82dB. I find the result is not right, it is too small. Is my code right or not? or should I consider the clock? As you known, in this example the clock is 16MHZ. We are doing a great project, please give your advice or solution soon. Many thanks.

Reply
  • Now I have another problem. I use the example button_radio_example to get RSSI. I write code like this in PCA10000. NRF_RADIO->EVENTS_READY = 0U; // Enable radio and wait for ready NRF_RADIO->TASKS_RXEN = 1U; while(NRF_RADIO->EVENTS_READY == 0U) { } NRF_RADIO->EVENTS_END = 0U; // Start listening and wait for address received event NRF_RADIO->TASKS_START = 1U; // Wait for end of packet while(NRF_RADIO->EVENTS_END == 0U) { }

    	//get RSSI
    	NRF_RADIO->EVENTS_RSSIEND = 0U;
    	NRF_RADIO->TASKS_RSSISTART = 1U;
      while(NRF_RADIO->EVENTS_RSSIEND == 0U)
    	{
    }
    	
    	rssi = NRF_RADIO->RSSISAMPLE;
    

    When the two device is so closed. The rssi result is -72dB. And sometimes I get -82dB. I find the result is not right, it is too small. Is my code right or not? or should I consider the clock? As you known, in this example the clock is 16MHZ. We are doing a great project, please give your advice or solution soon. Many thanks.

Children
No Data
Related