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

nRF52840 DK - real TIFS inaccurate with Long Range

Hi,

I am using the TIFS register of the NRF RADIO to define the interframe spacing timing.
(Done with the following line)

NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_TXEN_Msk; // or NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_RXEN_Msk;
NRF_RADIO->TIFS     = 150;


During a 1Mbit or 2Mbit connection, the real TIFS observed on the sniffer is quite accurate (~150.25us observed).
However, in LE Coded PHY with different Coded PHY, the real TIFS is inaccurate (TX: S=2, RX: S=8): TIFS observed 161.375us  and (TX: S=8, RX: S=2): TIFS observed 146.5us 

I am using a nRF52840 DK (PCA10056 v1.0.0).
Do you have any idea of what may impact this timing and how could I avoid this behavior ? 

Thank you.

Parents
  • Hi,

    Can you check that the HFCLK with crystal oscillator(HFXO) is running ?

  • Thank you for your answer ! 

    I used the following lines to start the HFXO.  

        NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
        NRF_CLOCK->TASKS_HFCLKSTART = 1;
        while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);


    Then when the connection is established with LE Coded PHY, I checked the NRF_CLOCK->HFCLKRUN (=0x00000001) and NRF_CLOCK->HFCLKSTAT (=0x00010001)  registers and they indicates that the HFCLK is running with the HFXO 64 MHz crystal oscillator.

    Is there something more that I should check ? 

    Thank you.

  • JGounon said:
    Is there something more that I should check ? 

     From the PS we have that "TIFS is only enforced if END_DISABLE and DISABLED_TXEN or END_DISABLE and DISABLED_RXEN shortcuts are enabled. ". From your code snippet, DISABLED_TXEN  is enabled, but did you enable the END_DISABLE shortcut as well?

  • Good point, I didn't write this part in the code snippet but the shortcuts configuration is done before the TIFS configuration :

        NRF_RADIO->SHORTS           = RADIO_SHORTS_READY_START_Msk |
                                      RADIO_SHORTS_END_DISABLE_Msk;
        ... 
        
        NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_TXEN_Msk; 
        //or NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_RXEN_Msk; depending on the next operation chosen
        NRF_RADIO->TIFS     = 150;
    Without those shortcuts the TIFS doesn't work with the 1Mbps or 2Mbps neither. 
    In my case, the timing are always good, except with different LE Coded Coding Sheme. 

Reply
  • Good point, I didn't write this part in the code snippet but the shortcuts configuration is done before the TIFS configuration :

        NRF_RADIO->SHORTS           = RADIO_SHORTS_READY_START_Msk |
                                      RADIO_SHORTS_END_DISABLE_Msk;
        ... 
        
        NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_TXEN_Msk; 
        //or NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_RXEN_Msk; depending on the next operation chosen
        NRF_RADIO->TIFS     = 150;
    Without those shortcuts the TIFS doesn't work with the 1Mbps or 2Mbps neither. 
    In my case, the timing are always good, except with different LE Coded Coding Sheme. 

Children
Related