BLE direction finding and register reset

Hello,

I have been modifying the examples ble_app_uart and ble_app_c_uart to include direction finding. I perform the connection via scan and advertising and then establish a ble service that I communicate through. Now I'm trying to add the CTE on the peripheral unit by adding: 

NRF_RADIO->DFEMODE = RADIO_DFEMODE_DFEOPMODE_AoA;
NRF_RADIO->CTEINLINECONF &= ~RADIO_CTEINLINECONF_CTEINLINECTRLEN_Enabled;
NRF_RADIO->CTEINLINECONF |= (RADIO_CTEINLINECONF_CTEINFOINS1_InS1 << RADIO_CTEINLINECONF_CTEINFOINS1_Pos);

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

After connection has been established I can read from the register on the peripheral while debbuging that the radio register has been reset, probably by some background function setting the NRF_RADIO->Power to 0. I have also tested to remove the sleep and power management from the example to avoid the registers being reseted with no luck. 

Have you any idea why this is happening and how to solve it? 

I'm using two PAN1781 evaluation board with a segger debugger, SDK 17.1 and softdevice s140. 

best regards Patrik. 

Parents
  • Hi Patrik

    The nRF5 SDK does not support the BLE direction finding feature. The HW does, but the SoftDevice(s) in the nRF5 SDK does not include the Direction Finding features, so you will need to move to the nRF Connect SDK to comply with the Bluetooth LE specs.

    You should be able to do direction finding on the bare-metal solution in the nRF5 SDK, but this won't comply with the Bluetooth specification, just so you know. Most likely, the reason the radio register is reset is because the SoftDevice won't allow you to play around with the radio registers. There is more info on how to use the registers to enable direction finding (DFE and CTE) in this whitepaper.

    Best regards,

    Simon

Reply
  • Hi Patrik

    The nRF5 SDK does not support the BLE direction finding feature. The HW does, but the SoftDevice(s) in the nRF5 SDK does not include the Direction Finding features, so you will need to move to the nRF Connect SDK to comply with the Bluetooth LE specs.

    You should be able to do direction finding on the bare-metal solution in the nRF5 SDK, but this won't comply with the Bluetooth specification, just so you know. Most likely, the reason the radio register is reset is because the SoftDevice won't allow you to play around with the radio registers. There is more info on how to use the registers to enable direction finding (DFE and CTE) in this whitepaper.

    Best regards,

    Simon

Children
No Data
Related