AOA Antenna Switching

Hello

I am running the nrf/samples/bluetooth/direction_findinding_connectionless_rx App on an nRF52833-DK with nrf Connect SDK 2.2.0

I have set VS Code to use board nrf52833_nrf53833 and configuration to prj.conf

I am running the transmitter code on another board and in the terminal window see:

CTE[0]: samples count 45, cte type AOD 2 [us], slot durations: 2 [us], packet status CRC OK, RSSI -480
CTE[0]: samples count 45, cte type AOD 2 [us], slot durations: 2 [us], packet status CRC OK, RSSI -490
CTE[0]: samples count 45, cte type AOD 2 [us], slot durations: 2 [us], packet status CRC OK, RSSI -500

What I am not seeing is any changes on the antenna switching pins 03,04,28,29 when viewing them with an oscilloscope.

If I change

 dfe-pdu-antenna = <0x0>

to <0x5>

I can see the relevant antenna pins go high on the line:

err = bt_enable(NULL);
but they remain high and do not switch.

In a post similar to this it was suggested adding the following to the prj.conf, but I see no difference:

CONFIG_BT_CTLR_DF=y
CONFIG_BT_CTLR_DF_ANT_SWITCH_RX=y
CONFIG_BT_CTLR_DF_SCAN_CTE_RX=y
Why don't I see the antenna pins switching, Is there some setting I am missing?
Please can you tell me where in the code the antenna switching takes place.
Thank you
  • Thank you,
    I was just looking at the receive project and forgot about the transmitter and that I had not added the file overlay-aoa.conf to the build fragment.

    The clue was there all along in my original post where the receive was getting AOD transmissions:

    CTE[0]: samples count 45, cte type AOD 2 [us], slot durations: 2 [us], packet status CRC OK, RSSI -480

  • Hi Sir,

    I have the same problem, but I am in AOA mode. When I modify the PDU antenna, the GPIO will change (H/L), but when I output the IQ sample, GPIO 3/4/28/29 will not switch (H/L). Can you help confirm this?

    IQ sample print : 

    CTE[0]: samples count 45, cte type AOA, slot durations: 2 [us], packet status CRC OK, RSSI -600

    Main.c :

     static const uint8_t ant_patterns[] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 };

    NRF52833DK_NRF52833.overlay : 

        dfe-antenna-num = <8>;
        dfe-pdu-antenna = <0x0>;

        dfegpio0-gpios = <&gpio0 3 0>;
        dfegpio1-gpios = <&gpio0 4 0>;
        dfegpio2-gpios = <&gpio0 28 0>;
        dfegpio3-gpios = <&gpio0 29 0>;
    output files :
    .config :
     CONFIG_BT_DF=y
     CONFIG_BT_DF_CONNECTIONLESS_CTE_RX=y
     CONFIG_BT_DF_CTE_RX_AOA=y
     CONFIG_BT_CTLR_DF_CTE_TX_SUPPORT=y
     CONFIG_BT_CTLR_DF_CTE_RX_SUPPORT=y
     CONFIG_BT_CTLR_DF_CTE_RX_SAMPLE_1US_SUPPORT=y
     CONFIG_BT_CTLR_DF_ANT_SWITCH_2US_SUPPORT=y
     CONFIG_BT_CTLR_DF_ANT_SWITCH_1US_SUPPORT=y
     CONFIG_BT_CTLR_CTEINLINE_SUPPORT=y
     CONFIG_BT_CTLR_DF_CTE_TX=y
     CONFIG_BT_CTLR_DF_CTE_RX_SAMPLE_1US=y
     CONFIG_BT_CTLR_DF_ANT_SWITCH_1US=y
     # CONFIG_BT_CTLR_DF_ANT_SWITCH_TX is not set
     CONFIG_BT_CTLR_DF_ANT_SWITCH_RX=y
     CONFIG_BT_CTLR_DF_CTE_RX=y
     CONFIG_BT_CTLR_DF_SCAN_CTE_RX=y
     CONFIG_BT_CTLR_DF_SAMPLE_CTE_FOR_PDU_WITH_BAD_CRC=y
     CONFIG_BT_CTLR_DF_MAX_ANT_SW_PATTERN_LEN=12
     CONFIG_BT_CTLR_DF_INIT_ANT_SEL_GPIOS=y
     CONFIG_BT_CTLR_DF_PER_SCAN_CTE_NUM_MAX=16
    zephyr.dts :
            radio: radio@40001000 {
                compatible = "nordic,nrf-radio";
                reg = < 0x40001000 0x1000 >;
                interrupts = < 0x1 0x1 >;
                status = "okay";
                dfe-supported;
                ieee802154-supported;
                ble-2mbps-supported;
                ble-coded-phy-supported;
                tx-high-power-supported;
                dfe-antenna-num = < 0x8 >;
                dfe-pdu-antenna = < 0x0 >;
                dfegpio0-gpios = < &gpio0 0x3 0x0 >;
                dfegpio1-gpios = < &gpio0 0x4 0x0 >;
                dfegpio2-gpios = < &gpio0 0x1c 0x0 >;
                dfegpio3-gpios = < &gpio0 0x1d 0x0 >;
                ieee802154: ieee802154 {
                    compatible = "nordic,nrf-ieee802154";
                    status = "okay";
                };
            };
Related