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

RSSI measurement on a specific channel

Hey all

I'm working on a BLE device using a nRf52840 SOC and for some tests now I've to measure the RSSI on a specific BLE channel (e.g. ch 37). What I've done so far to measure the RSSI is following.

    static uint32_t u32Packet = 0;
    static uint32_t u32RssiSample = 0;

    NRF_RADIO->PACKETPTR = (uint32_t)u32Packet; // set payload pointer

    NRF_RADIO->EVENTS_READY = 0u;           // clear ready event
    NRF_RADIO->TASKS_RXEN = 1u;             // enable radio in RX mode
    while(NRF_RADIO->EVENTS_READY == 0u);   // wait for the radio to be ramped up and ready to be started

    NRF_RADIO->EVENTS_READY = 0u;           // clear ready event
    NRF_RADIO->TASKS_START = 1u;            // start radio
    // TODO while(NRF_RADIO->EVENTS_READY == 0u);   // wait for the radio to be ramped up and ready to be started

    // perform RSSI determination
    NRF_RADIO->EVENTS_RSSIEND = 0u;         // clear rssiend event
    NRF_RADIO->TASKS_RSSISTART = 1u;        // start the RSSI and take one single sample of the receive signal strength
    while(NRF_RADIO->EVENTS_RSSIEND == 0u); // wait for the sampling of the receive signal strength to be completed

    u32RssiSample = NRF_RADIO->RSSISAMPLE;   // take RSSI sample

    NRF_RADIO->TASKS_RSSISTOP = 1u;         // stop RSSI sampling

    NRF_RADIO->TASKS_STOP = 1u;             // stop radio

    NRF_RADIO->EVENTS_DISABLED = 0u;        // clear disabled event
    NRF_RADIO->TASKS_DISABLE = 1u;          // disable the radio
    while(NRF_RADIO->EVENTS_DISABLED == 0u); // wait for the radio to be disabled

This seems to work fine to take a RSSI sample. My question now is, can I and if yes how can I measure the RSSI only on a specific channel?

For the test the device would be in an shielded environment, where only the signal from the test-infrastructure should be received, so I'm also wondering if it even makes sense to measure on a specific channel, if the transmitted signal is only on this specific channel. However if there is a possibility I'd still like to set it up like this.

Any help would be much appreciated

Greetings

Samuel

Parents Reply Children
No Data
Related