nRF 7002 coexistence interface doesn't work

Hi,

I have designed a custom board, and I cannot get coexistence interface to work reliably. I don't get any errors, but I'm not able to connect to my board with BLE. WiFi also doesn't connect. I can share my parts of config files, device tree, and general block schematic. After flashing the code, swctrl0 output is low for ~1 second, and then goes high for a short time, and that continues indefinitely. While the output is high, I can see BLE advertisement data, but, when I try to connect to the board with nRF connect app, it gets disconnected when swctrl0 gets pulled low.

So, the general idea was to share the 2.4GHz antenna between BLE and WiFi. I connected the components like this. When SWCTRL0 is high - 2.4GHz BLE path is selected. Is that ok?

I followed the following resources while configuring this:

https://docs.nordicsemi.com/bundle/nan_044/page/APP/nan_044/coex_API.html

https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/wifi_coex.html

NCS is 2.9.0. Tried upgrading it to 3.0.0, but there wasn't really much difference....


If you could tell me what I'm doing wrong, I would really appreciate it, thanks! 




This is in ipc_radio config file:

CONFIG_NRF_RPC=n
CONFIG_NRF_RPC_CBOR=n
CONFIG_MPSL=y
CONFIG_MPSL_CX=y
CONFIG_MPSL_CX_NRF700X=y

Prj.cfg only has this:

CONFIG_NRF70_SR_COEX=y
CONFIG_NRF70_SR_COEX_RF_SWITCH=n

_cpunet overlay has this defined:

    nrf_radio_coex: nrf7002-coex {
        status = "okay";
        compatible = "nordic,nrf7002-coex";
        req-gpios     = <&gpio0 7 GPIO_ACTIVE_HIGH>;
        status0-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
        grant-gpios   = <&gpio0 6 GPIO_ACTIVE_HIGH>;
  };
};

&radio {
	coex = <&nrf_radio_coex>;
};

and cpuapp overlay has this:

   nrf_radio_coex: nrf7002-coex {
        status = "okay";
        compatible = "nordic,nrf7002-coex";
        req-gpios     = <&gpio0 7 GPIO_ACTIVE_HIGH>;
        status0-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
        grant-gpios   = <&gpio0 6 GPIO_ACTIVE_HIGH>;
  };


	gpio_fwd: nrf-gpio-forwarder {
		compatible = "nordic,nrf-gpio-forwarder";
		status = "okay";
		uart {
			gpios = <&gpio0 7 0>, /* nrf7002-coex req-gpios     */
				    <&gpio1 3 0>, /* nrf7002-coex status0-gpios */
				    <&gpio0 6 0>; /* nrf7002-coex grant-gpios   */
		};
	};

under spi node: 
	nrf70: nrf7002@0 {
		status = "okay";
		compatible = "nordic,nrf7002-spi";
		reg = <0>;
		spi-max-frequency = <24000000>;
		/* Wi-Fi Pins used */
		iovdd-ctrl-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
		bucken-gpios = <&gpio1  6 GPIO_ACTIVE_HIGH>;
		host-irq-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
		wifi-max-tx-pwr-2g-dsss = < 0x15 >;
		wifi-max-tx-pwr-2g-mcs0 = < 0x10 >;
		wifi-max-tx-pwr-2g-mcs7 = < 0x10 >;
		wifi-max-tx-pwr-5g-low-mcs0 = < 0x9 >;
		wifi-max-tx-pwr-5g-low-mcs7 = < 0x9 >;
		wifi-max-tx-pwr-5g-mid-mcs0 = < 0xb >;
		wifi-max-tx-pwr-5g-mid-mcs7 = < 0xb >;
		wifi-max-tx-pwr-5g-high-mcs0 = < 0xd >;
		wifi-max-tx-pwr-5g-high-mcs7 = < 0xd >;
		wlan0: wlan {
			compatible = "nordic,wlan";
		};  
	};

My initialisation is just this:

    if(nrf_wifi_coex_hw_reset()){
        LOG_ERR("Error resetting coex hardware");
    }

    int ret = nrf_wifi_coex_config_non_pta(false, true);
    if (ret != 0) {
        LOG_ERR("Configuring non-PTA registers of CoexHardware FAIL\n");
    }

Parents
  • UPDATE:

    yeah, the switch is definitely wired wrong - BLE output should be connected to the antenna when the SWCTRL0 is low. When SWCTRL0 is high, WiFi output should be connected to antenna.

    So, I got the coexistence somewhat working, but, the shared 2.4GHz antenna works good for BLE - i can connect, provide wifi credentials, etc... but, WiFi connection is spotty - if I put my cellphone with the hotspot enabled directly to the board, it connects, and i can use both the BLE and WiFi. But, it hotspot is far away, I cannot connect.

    Are there still some things that could be tweaked here?

    Also, is the algorithm here a good way to initialise everything:
    https://docs.nordicsemi.com/bundle/nan_044/page/APP/nan_044/coex_API.html

    Thanks in advance,

    Tomislav

Reply
  • UPDATE:

    yeah, the switch is definitely wired wrong - BLE output should be connected to the antenna when the SWCTRL0 is low. When SWCTRL0 is high, WiFi output should be connected to antenna.

    So, I got the coexistence somewhat working, but, the shared 2.4GHz antenna works good for BLE - i can connect, provide wifi credentials, etc... but, WiFi connection is spotty - if I put my cellphone with the hotspot enabled directly to the board, it connects, and i can use both the BLE and WiFi. But, it hotspot is far away, I cannot connect.

    Are there still some things that could be tweaked here?

    Also, is the algorithm here a good way to initialise everything:
    https://docs.nordicsemi.com/bundle/nan_044/page/APP/nan_044/coex_API.html

    Thanks in advance,

    Tomislav

Children
No Data
Related