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

Example Radio Transmitter / Receiver on 52840

Hi,

I am using 2 development kits 52840-DK.

I run the examples projects transmitter ( pca1056 ) and receiver. It works,

In an attempt to get longer range I increased the TX power In radio config.c

  NRF_RADIO->TXPOWER   = (RADIO_TXPOWER_TXPOWER_Pos8dBm << RADIO_TXPOWER_TXPOWER_Pos);

Examples still work.

To extend the range i try switching to RADIO_MODE_MODE_Ble_LR125Kbit instead of RADIO_MODE_MODE_Nrf_1Mbit.

Noting received anymore.

I changed the while loop in the transmitter to

    while (NRF_RADIO->EVENTS_PHYEND == 0U)
    {
        // wait
    }

as stated in some posts here.

Address is set to 0.

    NRF_RADIO->RXADDRESSES = RADIO_RXADDRESSES_ADDR0_Enabled << RADIO_RXADDRESSES_ADDR0_Pos;
    NRF_RADIO->TXADDRESS   = (0x00 << RADIO_TXADDRESS_TXADDRESS_Pos) & RADIO_TXADDRESS_TXADDRESS_Msk;

 I also tried using the init from the BLE_DTM example. same result works in 1MB 2MB but not in 500 or 125kbps.

Is there something else I am missing?

regards,

Eva

Parents Reply
  • Hi,

    Thanks for the reply.

    I used the config from that example, at first it didn't work either.

    But the problem appears to be in de read_packet function.

    PHYEND and EVENTS_END never seem to come.

     I changed the sequence simular to what that example does in the IRQ function, then packets arrive.

        NRF_RADIO->EVENTS_READY = 0U;
        // Enable radio and wait for ready
        NRF_RADIO->TASKS_RXEN = 1U;

        while (NRF_RADIO->EVENTS_ADDRESS == 0U)
        {
            // wait
        }
        NRF_RADIO->EVENTS_ADDRESS = 0;

        while( NRF_RADIO->EVENTS_DISABLED == 0 )
        {
        }
        NRF_RADIO->EVENTS_DISABLED = 0;

        if (NRF_RADIO->CRCSTATUS == 1U)
        {
            result = packet;
        }

    Thanks.

Children
Related