I'm currently delving into the intricacies of triggering and receiving multiple Received Signal Strength Indication (RSSI) measurements from a single packet, and I'm grappling with stability issues in the RSSI measurements.
To address the stability concerns, I've been exploring the possibility of measuring the RSSI multiple times from the same packet and then averaging the results to obtain a more reliable RSSI value.
I've implemented an Interrupt Request (IRQ) triggered by NRF_RADIO->EVENTS_RSSIEND, with the hope of obtaining multiple RSSI measurements.
Here's a snippet of the code I've been working on:
sample = (NRF_RADIO->RSSISAMPLE & RADIO_RSSISAMPLE_RSSISAMPLE_Msk); /* Clear event */ NRF_RADIO->EVENTS_RSSIEND = 0; NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Msk | RADIO_SHORTS_ADDRESS_RSSISTART_Msk; NRF_RADIO->TIFS = 0; NRF_RADIO->TASKS_RXEN = 1; // **wait if (NRF_RADIO->EVENTS_RSSIEND != 0) { sample2 = (NRF_RADIO->RSSISAMPLE & RADIO_RSSISAMPLE_RSSISAMPLE_Msk); } else { sample2 = RADIO_RSSI_INVALID; }
However, I've encountered a persistent issue where on each attempt, sample2 returns 255 (indicating an invalid RSSI value), meaning that NRF_RADIO->EVENTS_RSSIEND=0
I'm reaching out to the community for guidance on how to successfully measure RSSI multiple times.
Has anyone faced a similar challenge or have any insight or idea?