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 Reply Children
  • 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.

  • The way you do it now, you wait for the packet to be completely received, and then start the RSSI measurement. This will obviously not measure the RSSI while the packet is received, which is most likely what you want. To do such measurement, I'd recommend using the shortcut between address match and RSSI start, so that RSSI measurement is started once an address is matched.

Related