nRF54l15 Custom Board & nRF21540 FEM & nRF7001 GPIOTE error

      • We designed a nRF54L15 custom board with a nRF21540 FEM and nRF7001 Module which are on the same SPI with separate CS pins our device tree is configured for this as follows:

            wifi_coex: nrf7001_coex {
                compatible = "nordic,nrf7001-coex";
                status = "okay";
                req-gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
                status0-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
                grant-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
                swctrl1-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
            };

            nrf_radio_fem: nrf21540_fem {
                compatible = "nordic,nrf21540-fem";
                status = "okay";
                tx-en-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
                rx-en-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
                pdn-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
                mode-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
                spi-if = <&nrf21540_spi>;
                supply-voltage-mv = <3300>;  
            };

        &spi21 {
            status = "okay";
            cs-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>,
            <&gpio2 10 GPIO_ACTIVE_LOW>;
            pinctrl-0 = <&spi21_default>;
            pinctrl-1 = <&spi21_sleep>;
            pinctrl-names = "default", "sleep";

            nrf21540_spi: nrf21540-spi@0 {
                compatible = "nordic,nrf21540-fem-spi";
                status = "okay";
                reg = <0>;
                spi-max-frequency = <8000000>;
            };

            nrf70: wifi@1 {
                status = "okay";
                compatible = "nordic,nrf7001-spi";
                reg = <1>;
                spi-max-frequency = <8000000>;
                iovdd-ctrl-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
                bucken-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
                host-irq-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
                iovdd-power-up-delay-ms = <1>;

                /*
                 * TODO: replace with your certified/custom-board TX power ceilings.
                 * These are placeholder values commonly used in public nRF70 examples.
                 */
                wifi-max-tx-pwr-2g-dsss = <21>;
                wifi-max-tx-pwr-2g-mcs0 = <16>;
                wifi-max-tx-pwr-2g-mcs7 = <16>;

                nrf70_wlan: nrf70_wlan {
                    compatible = "nordic,wlan";
                    status = "okay";
                };
            };


        This configuration compiles however when I switched the SPI reg and CS pins as shown below I got GPIOTE error also show below.

        Do both the CS pins also need to be on GPIO port 1 with RADIO DFE functionality?

        Or is there a reason that the nRF21540 has to be the first SPI Index or not on a shared SPI?

        Why does swapping the index on the SPI bus affect this?


        NOT working configuration (Other Configurations unchanged):


        &spi21 {
            status = "okay";
            cs-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>,
            <&gpio1 13 GPIO_ACTIVE_LOW>;
            pinctrl-0 = <&spi21_default>;
            pinctrl-1 = <&spi21_sleep>;
            pinctrl-names = "default", "sleep";

            nrf70: wifi@1 {
                status = "okay";
                compatible = "nordic,nrf7001-spi";
                reg = <0>;
                spi-max-frequency = <8000000>;
                iovdd-ctrl-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
                bucken-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
                host-irq-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
                iovdd-power-up-delay-ms = <1>;

                /*
                 * TODO: replace with your certified/custom-board TX power ceilings.
                 * These are placeholder values commonly used in public nRF70 examples.
                 */
                wifi-max-tx-pwr-2g-dsss = <21>;
                wifi-max-tx-pwr-2g-mcs0 = <16>;
                wifi-max-tx-pwr-2g-mcs7 = <16>;

                nrf70_wlan: nrf70_wlan {
                    compatible = "nordic,wlan";
                    status = "okay";
                };
            };

            nrf21540_spi: nrf21540-spi@0 {
                compatible = "nordic,nrf21540-fem-spi";
                status = "okay";
                reg = <1>;
                spi-max-frequency = <8000000>;
            };


        };


        Error resulting from this configuration:

        C:/ncs/v3.2.4/nrf/subsys/mpsl/fem/nrf21540_gpio_spi/mpsl_fem_nrf21540_gpio_spi.c: In function 'fem_nrf21540_spi_configure':
        c:\ncs\v3.2.4\zephyr\soc\nordic\common\gpiote_nrfx.h:11:45: error: 'g_nrfx_gpioteDT_N_S_soc_S_peripheral_50000000_S_gpio_50400_P_gpiote_instance_IDX_0_PH_REG_IDX_0_VAL_ADDRESSU' undeclared (first use in this function)
        11 | #define GPIOTE_NRFX_INST_BY_REG_CONCAT(reg) g_nrfx_gpiote##reg

        Note:
        We are using SDK and toolchain 3.2.4 

Parents Reply
  • While I am quite curious why you got the compilation error, PaKa raised a key point.

    Sharing SPI bus between the FEM and another device won't work well. I don't know much about the nRF70x products, but the timing requirement for controlling the nRF21540 is very strict, so the tiniest delay due to sharing bus can cause failures.

    Therefore, we strongly recommend against sharing the same SPI bus between nRF7001 and nRF21540.

    If you already have a hardware designed, then you could consider controlling the nRF21540 only over GPIO instead.

Children
No Data
Related