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

Radio Test - Logging Results in RX Sweep

Hi,

the evalboard seems successfully implementing the command start_rx_sweep by placing the receiver in the sweep mode.

infocenter.nordicsemi.com/.../nrf_radio_test_example.html

What commands to use to be able to log the measured received power values over UART and corresponding active receive channel?

Ideally 1 power level (dBm) per channel.

Thanks.

Parents
  • Hi,

     

     

    What commands to use to be able to log the measured received power values over UART and corresponding active receive channel?

    Unfortunately, the example does not print the RSSI value. If you require this functionality, you have to modify the example and add it manually, first by enabling the RSSI shorts in radio_test.c::radio_rx():

    NRF_RADIO->SHORTS    = RADIO_SHORTS_READY_START_Msk | RADIO_SHORTS_END_START_Msk | RADIO_SHORTS_DISABLED_RSSISTOP_Msk | RADIO_SHORTS_ADDRESS_RSSISTART_Msk;

     

    You should then be able to read out the RSSISAMPLE register when EVENTS_RSSIEND is set.

     

    Kind regards,

    Håkon

  • Hi,

    we are trying to implement the above suggestion. Here's how the actual modification looks like:

    if (NRF_TIMER0->EVENTS_COMPARE[0])

        {

            NRF_TIMER0->EVENTS_COMPARE[0] = 0;

            if (m_sweep_tx)

            {

                radio_unmodulated_tx_carrier(txpower, mode, m_channel);

            }

            else if (m_sweep_rx)

            {

                if(NRF_RADIO->EVENTS_RSSIEND == 1)

                {

                  uint8_t rssi_value= NRF_RADIO->RSSISAMPLE;

                  nrf_cli_fprintf(p_cli_test, NRF_CLI_NORMAL, "RSSI:%d, Channel: %d\r\n",rssi_value,m_channel-1);

                }

                radio_rx(mode, m_channel);

            }

            else

            {

               //Do nothing

            }

     

            m_channel++;

            if (m_channel > channel_end)

            {

                m_channel = channel_start;

            }

        }

    EVENTS_RSSIEND had to be manually added but it appears nowhere in the radio test example.

    After flashing start_rx_sweep did not return anything. So the questen is where and when will the EVENTS_RSSIEND be set?

    As for the transmit, it is envisaged to use another board in transmit mode at a fixed channel (start_tx_carrier).

    We expect the start_rx_sweep to function in a similar way like the start_tx_sweep.

    The goal is to be able to read the RSSIs of the RX sweep for each channel.

  • Hi,

     

    Sorry, I assumed that you wanted to get the RSSI on address match (ie: receiving a valid packet).

    You do not need to do this on a interrupt level.

    If you just want to sample the noise level, you can do something like this:

    NRF_RADIO->TASKS_RSSISTART = 1;
    while (NRF_RADIO->EVENTS_RSSIEND == 0);
    NRF_RADIO->EVENTS_RSSIEND = 0;
    int8_t rssi = NRF_RADIO->RSSISAMPLE;

     

    This assumes that you are already in RX mode.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    Sorry, I assumed that you wanted to get the RSSI on address match (ie: receiving a valid packet).

    You do not need to do this on a interrupt level.

    If you just want to sample the noise level, you can do something like this:

    NRF_RADIO->TASKS_RSSISTART = 1;
    while (NRF_RADIO->EVENTS_RSSIEND == 0);
    NRF_RADIO->EVENTS_RSSIEND = 0;
    int8_t rssi = NRF_RADIO->RSSISAMPLE;

     

    This assumes that you are already in RX mode.

     

    Kind regards,

    Håkon

Children
No Data
Related