This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

External antenna J1 insert connector in nRF52833-DK

Hello! I use EK42423-03 and 52833-DK

Previous case 

I understand plugging in the SWF connector, Will disconnecting from the PCB antenna and routing the signal to the cable.

EK42423-03-Datasheet

LS ->GND CTRL -> P0.26 ; GND -> GNDVDD -> VDDJ1 RFC -> J1 ANT 

First follow this pic.

I added code in nrf52833dk_nrf52833.dts

    ant1: ant_1 {
			gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; /*CTRL*/
			label = "ANT 1";
	};

Using multimeter can measure from RF2 to Refer to the pic.

RF1 = 0Ω 

RF2 = 20Ω 

But why? EK42423-03 "J1"  insert 52833-DK "J1" After Refer to the pic.

RF1 = 0Ω 

RF2 = 0Ω 

I do not know what is causing.

Sorry, it's been two months and I still can't do it...

But I still hope you can give me advice!

Thanks again for your support.

Parents
  • Hi

    Okay, sorry about the misunderstanding. So how is this SPDT switch connected to the nRF52833 board. How is it set up to switch between the antennas exactly? What have you set up to trig the switching? Our sample application uses two GPIOs to enable the antenna switching as described in the documentation.

    Best regards,

    Simon

Reply
  • Hi

    Okay, sorry about the misunderstanding. So how is this SPDT switch connected to the nRF52833 board. How is it set up to switch between the antennas exactly? What have you set up to trig the switching? Our sample application uses two GPIOs to enable the antenna switching as described in the documentation.

    Best regards,

    Simon

Children
  • 你好

    我們的示例應用程序使用兩個 GPIO來啟用天線切換,如文檔中所述。

    這裡所說的GPIO是指nrf52833-DK?

    是的,讓我解釋一下我做了什麼。

    1.我通過杜邦線連接了以下

    https://www.psemi.com/products/rf-switches/high-isolation-rf-switches/pe42423

    52833-DK

    EK42423-03

    P0.27 LS
    P0.26

    CTRL

    接地 接地

    VDD

    VDD
    J1 J1 RFC

    2. 根據數據表表 5。

    使用 direction_finding_connectionless_rx 示例

    在nrf52833dk_nrf52833.dts中添加代碼

    			gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; /*LS*/
    			label = "ANT 1";
    		};
                    ant2: ant_2 {
    			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;  /*CTRL*/
    			label = "ANT 2";
    		};
    		
    		
    /* These aliases are provided for compatibility with samples */
    	aliases {
    		led0 = &led0;
    		led1 = &led1;
    		led2 = &led2;
    		led3 = &led3;
    *       ant1 = &ant1;
    *       ant2 = &ant2;    
    		pwm-led0 = &pwm_led0;
    		sw0 = &button0;
    		sw1 = &button1;
    		sw2 = &button2;
    		sw3 = &button3;
    		bootloader-led0 = &led0;
    	};
    };

    我將以下代碼設置為觸發。

    在nrf52833dk_nrf52833.overlay中添加代碼 

    /*
     * Copyright (c) 2021 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
     */
    
    &radio {
    	status = "okay";
    	/* This is a number of antennas that are available on antenna matrix
    	 * designed by Nordic. For more information see README.rst.
    	 */
    	dfe-antenna-num = < 2 >;
            /*dfe-antenna-num = <12>;*/
    	/* This is a setting that enables antenna 12 (in antenna matrix designed
    	 * by Nordic) for Rx PDU. For more information see README.rst.
    	 */
    	dfe-pdu-antenna = <0x2>;
            /*dfe-pdu-antenna = <0x0>;*/
    	/* These are GPIO pin numbers that are provided to
    	 * Radio peripheral. The pins will be acquired by Radio to
    	 * drive antenna switching when AoA is enabled.
    	 * Pin numbers are selected to drive switches on antenna matrix
    	 * desinged by Nordic. For more information see README.rst.
    	 */
    	dfegpio0-gpios = <&gpio0 3 0>;
    	dfegpio1-gpios = <&gpio0 4 0>;
        dfegpio2-gpios = <&gpio0 28 0>;
        dfegpio3-gpios = <&gpio0 29 0>;
    };

    在main.c中添加代碼 

    修改 ant_patterns 切換。

    #define SLEEP_TIME_MS   1000
    #define ANT1_NODE DT_ALIAS(ant1)
    #if DT_NODE_HAS_STATUS(ANT1_NODE, okay)
    #define ANT1	DT_GPIO_LABEL(ANT1_NODE, gpios)
    #define PIN	DT_GPIO_PIN(ANT1_NODE, gpios)
    #define FLAGS	DT_GPIO_FLAGS(ANT1_NODE, gpios)
    #else
    /* A build error here means your board isn't set up to blink an LED. */
    #error "Unsupported board: led0 devicetree alias is not defined"
    #define ANT0	""
    #define PIN	0
    #define FLAGS	0
    #endif
    
    #define SLEEP_TIME_MS   1000
    #define ANT2_NODE DT_ALIAS(ant2)
    #if DT_NODE_HAS_STATUS(ANT2_NODE, okay)
    #define ANT2	DT_GPIO_LABEL(ANT2_NODE, gpios)
    #define PIN	DT_GPIO_PIN(ANT2_NODE, gpios)
    #define FLAGS	DT_GPIO_FLAGS(ANT2_NODE, gpios)
    #else
    /* A build error here means your board isn't set up to blink an LED. */
    #error "Unsupported board: led0 devicetree alias is not defined"
    #define ANT0	""
    #define PIN	0
    #define FLAGS	0
    #endif
    
    static const uint8_t ant_patterns[] = { 0x2, 0xB };
    #endif /* CONFIG_BT_CTLR_DF_ANT_SWITCH_RX */

    同樣在main.c
    中參考閃爍示例。在void main(void)
    中添加了以下代碼

    但我認為這可能沒有任何意義

    void main(void)
    {              
            const struct device *dev;
    	bool ant_is_on = true;
    	int ret;
    
    	dev = device_get_binding(ANT1);
    	if (dev == NULL) {
    		return;
    	}
    
    	ret = gpio_pin_configure(dev, PIN, GPIO_OUTPUT_ACTIVE | FLAGS);
    	if (ret < 0) {
    		return;
    	}

    以上是我到目前為止所做的

    非常感謝您的回复

Related