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

Nrf52811 AoA TX timing, does this require manual timing

Hello,

we are experimenting with the Nrf52811 CTE feature and have a few doubts concerning the documentation. We program our experiments with bare-metal (no soft device) register level configuration and base this development on the product specification.

Here are some questions I would like to understand better.

(1) Suppose I want to configure the radio for AoA TX, i.e.\ a device with a single antenna is sending a continuous tone and a receiver with several antennas switches while receiving the continuous tone. For modes like BLE 1mbit there is an END event at the same time as the CRC, but that is when the CTE comes in. Since we are AoA Tx, there is no switching going on,

but the continuous tone should be held as long as specified. So how is this supposed to be implemented: the observation is that after CRC the radio sends a 1, but there is no way to know when it should stop doing so. Of course, it could be implemented with a Timer and PPI: the END event starts a timer and a CC-event of the timer invokes the TXEND task. Is that what is supposed to be done?

Note that in AoD TX, one can observe the switching state to know when the switching sequences has finished, but that is not a very desirable thing to do. It works as follows: after TXStart, wait

for CTE switching state to be non-idle, then wait for it to be idle. That is unfortunately possible in software only and the CPU can do no useful work in this period.

(2) The documentation is not clear about the option of having CTE sampling within the payload. Does this mean that the payload should contain a sequence of 1 as data and in AoD TX the switching will occur during payload? Does this require to turn off whitening? Is there a relation with the delays specified in DFECTRL2?

(3) The documentation is not very clear concerning the parameter AGCBACKOFFGAIN of DFECTRL2. Could someone explain why it is there anyhow and what it actually does. Autogain control is nowhere mentioned in any Nordic documentation but here!

Thanks!

-- Peter

Parents
  • Hi Peter,

     

    1. You might be thinking a bit too complicated about this, the CTE is configured and controlled by the radio entirely, no need for timer or PPI. Setup to make the radio append the CTE after the CRC:
      1. Set DFEMODE to AoA
      2. Length of CTE in n*8 µs in DFECTRL.NUMBEROF8US
      3. CTE after CRC in DFECTRL.DFEINEXTENSION
        As an example: 
                NRF_RADIO->DFEMODE = RADIO_DFEMODE_DFEOPMODE_AoA;
                NRF_RADIO->DFECTRL1 = 3 << RADIO_DFECTRL1_NUMBEROF8US_Pos | 
                                      1 << RADIO_DFECTRL1_DFEINEXTENSION_Pos;
         

        Note: if you use the END_DISABLED short or similar the radio will shutdown on the END event, clear this, or use PHYEND_DISABLED instead.
    2. Moving the CTE to the payload should just move it to start at the address event instead, disabling whitening or tailoring your payload is not needed. Not 100% sure about the TSAMPLEOFFSET of that impacts the CTE when switching is not used, but TSWITCHOFFSET should only be related to the switching role.
    3. The intention with ADCBACKOFFGAIN seems to be lowering the gain of the receiver blocks to create some headroom for when antenna switching starts in case some antennas provide much stronger signals than the one used when receiving the payload. 

     

    Best regards,

    Andreas

Reply
  • Hi Peter,

     

    1. You might be thinking a bit too complicated about this, the CTE is configured and controlled by the radio entirely, no need for timer or PPI. Setup to make the radio append the CTE after the CRC:
      1. Set DFEMODE to AoA
      2. Length of CTE in n*8 µs in DFECTRL.NUMBEROF8US
      3. CTE after CRC in DFECTRL.DFEINEXTENSION
        As an example: 
                NRF_RADIO->DFEMODE = RADIO_DFEMODE_DFEOPMODE_AoA;
                NRF_RADIO->DFECTRL1 = 3 << RADIO_DFECTRL1_NUMBEROF8US_Pos | 
                                      1 << RADIO_DFECTRL1_DFEINEXTENSION_Pos;
         

        Note: if you use the END_DISABLED short or similar the radio will shutdown on the END event, clear this, or use PHYEND_DISABLED instead.
    2. Moving the CTE to the payload should just move it to start at the address event instead, disabling whitening or tailoring your payload is not needed. Not 100% sure about the TSAMPLEOFFSET of that impacts the CTE when switching is not used, but TSWITCHOFFSET should only be related to the switching role.
    3. The intention with ADCBACKOFFGAIN seems to be lowering the gain of the receiver blocks to create some headroom for when antenna switching starts in case some antennas provide much stronger signals than the one used when receiving the payload. 

     

    Best regards,

    Andreas

Children
  • Andreas, thanks!

    Concerning (2) and (3), I am happy now.

    Concerning (1), I still have doubts. Figure 75 on page 192 of the product specification v1.0 suggests that with respect to CTE, there is first the END event and after CTE the PHYEND event. This contradicts other parts of the documentation that suggest that END is for non-LR modes and PHYEND is for LR-modes. I did try LR500Kbits to this end and when disabling the radio at PHYEND, there still was no continuous tone on the end of the packages (I use an SDR to see what is going on on the air).

    However, when I cheat and choose mode TX AoD without any switching sequence programmed, I can observe in DFESTATUS that switching continues as expected. This led to a code like this for the radio event handler, attached to the END event (I was using Ble_2Mbits mode) and this works, although it is not satisfactory (busy waiting).

    void RADIO_IRQHandler(){ // end of transmission handler
    		if(NRF_RADIO->EVENTS_END){
    			NRF_RADIO->EVENTS_END=0; // clear
    
    			// busy wait for DFE sequence to be sent
    
    			int timeout = 3;// DFE starts after shortly after end end
    			while (timeout-- && (((NRF_RADIO->DFESTATUS & RADIO_DFESTATUS_SWITCHINGSTATE_Msk) >> RADIO_DFESTATUS_SWITCHINGSTATE_Pos) == 0))
    				;
    			while ((((NRF_RADIO->DFESTATUS & RADIO_DFESTATUS_SWITCHINGSTATE_Msk) >> RADIO_DFESTATUS_SWITCHINGSTATE_Pos) != 0))
    				;
    			NRF_RADIO->TASKS_DISABLE=1;
    	
    		}
    
    }

    When on the other hand I use TX AoA mode, I have no way to observe on the registers (switching state is always idle,

    and, why shouldn't it be) or events whether the radio is supposed to still emit the continuous tone.

    Since CTE and sampling does work with other than LR modes, I am confused about the mention of PHYEND. First, I tried to wait for PHYEND, but with DFE enabled it still only occurs in LR modes and it does not leave time for the tone.

  • Hi,

     

    Yes, the text about PHYEND can be misinterpreted, EVENTS_PHYEND is generated for all PHYs in RX and TX.

    The fact that the DFE only ocurrs in LR modes could indicate that you have a END_DISABLE short enabled, have you checked this?

     

    Best regards,

    Andreas

  • OK, now I have understood what had happened.

    Actually, when the DTX field of MODECNF0 is set to "B1" or "B0", the PHYEND event does not occur!

    It must be configured "Center". DTX=B1 could seem a logical choice for CTE, and maybe (?) it was meant for such applications before 52811, but then the radio must be stopped manually.

    In my case, by negligence the DTX field was configured B1 by an assignment 

    NRF_RADIO->MODECNF0 = RADIO_MODECNF0_RU_Fast << RADIO_MODECNF0_RU_Pos;

    which put a 0 or B1 into the DTX field. After changing it to 

    	NRF_RADIO->MODECNF0 = RADIO_MODECNF0_RU_Fast << RADIO_MODECNF0_RU_Pos | RADIO_MODECNF0_DTX_Center << RADIO_MODECNF0_DTX_Pos;

    the PHYEND event occurs and the radio works as expected.

    You might want to extend the note of the MODECNF0 register to explicitly mention PHYEND, not just the compatible radio modes.

Related