This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem facing with RSSI value in nRF51822

Hi,

I am new to nRF microcontroller and communication . currently, I am working on nRF51822 microcontroller. I am able to communicate between two nRF51822 microcontrollers(without any protocol stack).

I want to measure RSSI value. I got RSSI new 1test.ccode from the nordic website. When I integrated RSSI code with my code, I got constant RSSI value that is 46. I didn't know what is the mistake. I have attached my code with this.

Parents
  • Try to use this code:

    uint8_t radio_rssi_get (void){
    	
    uint8_t sample;
    NRF_RADIO->TASKS_RSSISTART = 1;
    while (NRF_RADIO->EVENTS_RSSIEND == 0){}
    NRF_RADIO->EVENTS_RSSIEND = 0;
    sample = NRF_RADIO->RSSISAMPLE;
    NRF_RADIO->TASKS_RSSISTOP = 1;
    return sample;
    }
    
Reply
  • Try to use this code:

    uint8_t radio_rssi_get (void){
    	
    uint8_t sample;
    NRF_RADIO->TASKS_RSSISTART = 1;
    while (NRF_RADIO->EVENTS_RSSIEND == 0){}
    NRF_RADIO->EVENTS_RSSIEND = 0;
    sample = NRF_RADIO->RSSISAMPLE;
    NRF_RADIO->TASKS_RSSISTOP = 1;
    return sample;
    }
    
Children
No Data
Related