Hi,
We may need to using the DTM or Radio_test example to get the RSSi of recevied packet.
Is thay can working on nrf5340 SDK 2.4.0?
Hi,
We may need to using the DTM or Radio_test example to get the RSSi of recevied packet.
Is thay can working on nrf5340 SDK 2.4.0?
Hi,
I think you need to modify both samples so that they have a function that reads the RSSI register. To read out the RSSI, you first have to trigger the Task TASKS_RSSISTART, and then wait for the EVENTS_RSSIEND to be generated. Once that event is generated, you can read out the result from the RSSISAMPLE.
regards
Jared
Hi Jared,
I add the below code in the "on_radio_end_event" at dtm.c line:2238.
Hi.
The RSSI doesn't specify which peer that the package comes from? It could be something close to the device that is sending the -127 RSSI packet. Do you trigger the START task before each turn?
Also, from the documentation:
For the RSSI sample to be valid, RADIO has to be enabled in RX mode (RXEN task) and the reception has to be started (READY event followed by START task).
regards
Jared
Hi,
Now I add the below add code in "static void radio_prepare(bool rx)" of dtm.c
Hi,
You need to clear the NRF_RADIO->EVENTS_RSSIEND event by setting it to 0 in between starting the task again,
something like this:
uint8_t rssi(void)
{
NRF_RADIO->EVENTS_RSSIEND = 0;
NRF_RADIO->TASKS_RSSISTART = 1;
while (NRF_RADIO->EVENTS_RSSIEND == 0);
uint8_t rssi = NRF_RADIO->RSSISAMPLE;
return rssi;
}
regards
Jared