CTE packet recognition

Hi 

I am currently trying to append the CTE extension to a normal packet using the tx and rx examples from the SDK. The examples I am using are in examples/peripherals/radio. 

I have the code to append the CTE extension which is:

NRF_RADIO->DFEMODE = RADIO_DFEMODE_DFEOPMODE_AoA; 

NRF_RADIO->DFECTRL1 = 3 << RADIO_DFECTRL1_NUMBEROF8US_Pos | 1 << RADIO_DFECTRL1_DFEINEXTENSION_Pos;

But I can't see if I have appended the CTE extension or not. What would be an easy way to see the information I am sending through? 

Thanks

Parents
  • Hi,

     

    The easiest way would be to demodulate the signal, e.g. using a spectrum analyzer.

     

    You could probably use a timer, or increment a variable in a while loop, to get the time between EVENTS_END and EVENTS_PHYEND. If they happen at the same time then there is no CTE, if the time between is similar to what you configure in DFECTRL1 then there is CTE.

     

    Best regards,

    Andreas

Reply
  • Hi,

     

    The easiest way would be to demodulate the signal, e.g. using a spectrum analyzer.

     

    You could probably use a timer, or increment a variable in a while loop, to get the time between EVENTS_END and EVENTS_PHYEND. If they happen at the same time then there is no CTE, if the time between is similar to what you configure in DFECTRL1 then there is CTE.

     

    Best regards,

    Andreas

Children
  • Hi 

    Thanks for that. I did as you suggested and implemented a variable increment. The code for that is below. 

    while (NRF_RADIO->EVENTS_PHYEND == 0U)
    {
            while (NRF_RADIO->EVENTS_END == 0U)
            {
            }
            a++;
    }

    And the output did show that when I had the code from my original question working, the variable 'a' was higher. This confirmed that the having the CTE code increased the time before the EVENTS_PHYEND event happened. 

    Without the CTE code, 'a' was 7.

    With the CTE code, 'a' was 42.

    However when I checked the value of:

    NRF_RADIO->EVENTS_CTEPRESENT

    to see if the CTE was present, the value kept displaying 0. I don't know why it is 0 even though I can see an increase the variable 'a'.

    Am I using this EVENTS_CTEPRESENT variable wrong? Or is the CTE code I have shown in my original question not enough to generate a CTE packet?

    Thanks

  • Hi,

     

    EVENTS_CTEPRESENT is only generated in RX, if I understand you correctly you are looking at TX for now. Even so it requires that you structure the CTEinfo packet contents correctly, as described in the PS.

     

    I still think your method is sufficient to prove there is a CTE appended to your packet.

     

    Best regards,

    Andreas

Related