I'm having some troubles adding FEM support to an existing ESB application. Which changes do I require to add to an existing project to support FEM?
I'm using a custom board using a nRF5340 SoC and a nrf21540 FEM. I've already configured the gpio forwarder and added the FEM to the cpunet overlay. But the ESB (TX and RX) seems to not be working. This same application works fine without the FEM (tested with both an nrf52840dk and nrf5340dk).
cpuapp.overlay:
&gpio_fwd { nrf21540-gpio-if { gpios = <&gpio0 26 0>, /* tx-en-gpios */ <&gpio0 3 0>, /* rx-en-gpios */ <&gpio0 27 0>, /* pdn-gpios */ <&gpio1 9 0>; /* mode-gpios */ }; };
cpunet.overlay:
/ { nrf_radio_fem: nrf21540_fem { compatible = "nordic,nrf21540-fem"; tx-en-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; //P0.26 rx-en-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; //P0.03 pdn-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; //P0.27 mode-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; //P1.09 status = "okay"; }; };
cpunet.conf:
# ESB configuration CONFIG_ESB=y CONFIG_ESB_MAX_PAYLOAD_LENGTH=252 CONFIG_ESB_RX_FIFO_SIZE=100 # FEM configuration CONFIG_MPSL=y CONFIG_MPSL_FEM=y CONFIG_MPSL_FEM_NRF21540_GPIO=y CONFIG_MPSL_FEM_LOG_LEVEL_DBG=y
PS: This devices works as a receiver. The transmitter does not have an FEM.