Hi community,
I have a similar custom board as Thingy53, which has the nrf21540 module on board.
my purpose is to turn on the nrf21540 and do the reconnection, when the connection via normal way is lost.
these are the meaningful rescources I can find, but still cannot make the nrf21540 on my board working.
Developing with the nRF21540 EK
(+) nRF21540 is not compatible with nRF54L15 - Nordic Q&A - Nordic DevZone - Nordic DevZone
my configuration is just copied from the thingy53:
in the dts file for cpuapp:
gpio_fwd: nrf-gpio-forwarder { compatible = "nordic,nrf-gpio-forwarder"; status = "disabled"; fem-gpio-if { gpios = <&gpio1 9 0>, <&gpio1 5 0>, <&gpio0 27 0>, <&gpio0 25 0>; }; }; /* Disabled by default as SPI lines are shared with peripherals on application core */ spi_fwd: nrf-spi-forwarder { compatible = "nordic,nrf-gpio-forwarder"; status = "disabled"; fem-spi-if { gpios = <&gpio1 8 0>, <&gpio0 26 0>, <&gpio0 24 0>, <&gpio1 7 0>; };
nrf_radio_fem: fem { compatible = "nordic,nrf21540-fem"; rx-en-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; mode-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; pdn-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; tx-en-gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; spi-if = <&nrf_radio_fem_spi>; supply-voltage-mv = <3000>; }; }; /* Disabled by default as shares same GPIO lines as SPI peripherals on application core */ fem_spi: &spi0 { status = "okay"; cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; pinctrl-0 = <&spi0_default>; pinctrl-1 = <&spi0_sleep>; pinctrl-names = "default", "sleep"; nrf_radio_fem_spi: nrf21540_fem_spi@0 { compatible = "nordic,nrf21540-fem-spi"; status = "okay"; reg = <0>; spi-max-frequency = <8000000>; }; }; &radio { /* Uncomment to enable SPI interface for FEM */ fem = <&nrf_radio_fem>; };
CONFIG_MPSL=y CONFIG_MPSL_FEM=y CONFIG_MPSL_FEM_NRF21540_GPIO=y CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20 CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB=13 CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y CONFIG_BT_CTLR_TX_PWR_ANTENNA=20