IQ sampling in BLE payload

Hello,

For my project I am interested in performing IQ sampling in the payload of a BLE packet, using nRF52833 at both receiver and transmitter.

I am manually configuring the RADIO peripheral at the receiver. As far as I understand, the bit DFECTRL1.DFEINEXTENSION should do the trick for me, by setting it to 0. However, modifying that bit by writing 0 to that bitfield does not change anything. It stays set to 1.

When I start the debugger and manually flip the bit at a breakpoint using the register editor, it seems to do the trick and the device behaves as expected. How can I achieve this without using the debugger?

This is the function I use to configure the sampling procedure.

void aoa_radio_rx_init(){
    NRF_RADIO->DFEMODE |= (RADIO_DFEMODE_DFEOPMODE_AoA << RADIO_DFEMODE_DFEOPMODE_Pos);
    NRF_RADIO->CTEINLINECONF |= (RADIO_CTEINLINECONF_CTEINLINECTRLEN_Disabled << RADIO_CTEINLINECONF_CTEINLINECTRLEN_Pos);
    NRF_RADIO->DFECTRL1 |= (RADIO_DFECTRL1_DFEINEXTENSION_Payload << RADIO_DFECTRL1_DFEINEXTENSION_Pos);
    NRF_RADIO->DFECTRL1 |= (RADIO_DFECTRL1_SAMPLETYPE_IQ << RADIO_DFECTRL1_SAMPLETYPE_Pos);
    NRF_RADIO->DFECTRL1 |= (RADIO_DFECTRL1_TSWITCHSPACING_2us<<RADIO_DFECTRL1_TSWITCHSPACING_Pos);
}
 

Parents Reply Children
  • Yes, I got it to work with this DFECTRL1 and DFECTRL2 configuration:

    uint32_t conf;
    conf = ((((uint32_t)20 << RADIO_DFECTRL1_NUMBEROF8US_Pos) & RADIO_DFECTRL1_NUMBEROF8US_Msk) |
        ((uint32_t)RADIO_DFECTRL1_DFEINEXTENSION_Payload << RADIO_DFECTRL1_DFEINEXTENSION_Pos) |
        ((uint32_t)RADIO_DFECTRL1_TSWITCHSPACING_4us << RADIO_DFECTRL1_TSWITCHSPACING_Pos) |
        ((uint32_t)RADIO_DFECTRL1_TSAMPLESPACINGREF_1us << RADIO_DFECTRL1_TSAMPLESPACINGREF_Pos) |
        ((uint32_t)RADIO_DFECTRL1_SAMPLETYPE_IQ << RADIO_DFECTRL1_SAMPLETYPE_Pos) |
        ((uint32_t)RADIO_DFECTRL1_TSAMPLESPACING_4us << RADIO_DFECTRL1_TSAMPLESPACING_Pos) |
        (((uint32_t)0 << RADIO_DFECTRL1_AGCBACKOFFGAIN_Pos) & RADIO_DFECTRL1_AGCBACKOFFGAIN_Msk));
    
    NRF_RADIO->DFECTRL1 = conf;
    
    conf = ((((int16_t)15 << RADIO_DFECTRL2_TSAMPLEOFFSET_Pos) & RADIO_DFECTRL2_TSAMPLEOFFSET_Msk) |
    	    (((int16_t)2000 << RADIO_DFECTRL2_TSWITCHOFFSET_Pos) & RADIO_DFECTRL2_TSWITCHOFFSET_Msk));
    
    NRF_RADIO->DFECTRL2 = conf;

  • thanks. very much.
    I will give a message after I get result.

Related