Hi
Iam trying to make an ble advertiser project on nrf52840 with nrf21540(custom board)
there are a few configuration changes required for the board(pins and supply voltage) which i have provided via an overlay file(nrf21540dk_nrf21540.overlay)
fem_spi: &spi3 {
status = "okay";
cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_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>;
};
};
/{
nrf_radio_fem: nrf21540_fem {
compatible = "nordic,nrf21540-fem";
tx-en-gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
rx-en-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
pdn-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
ant-sel-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
mode-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
spi-if = <&nrf_radio_fem_spi>;
supply-voltage-mv = <1800>;
};
};
&radio {
fem = <&nrf_radio_fem>;
};
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 22)>,
<NRF_PSEL(SPIM_MISO, 0, 26)>,
<NRF_PSEL(SPIM_MOSI, 0, 24)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 22)>,
<NRF_PSEL(SPIM_MISO, 0, 26)>,
<NRF_PSEL(SPIM_MOSI, 0, 24)>;
low-power-enable;
};
};
};
when i ran my program the sleep current was upto 7uA(even tried
CONFIG_MPSL=y CONFIG_MPSL_FEM=y CONFIG_MPSL_FEM_NRF21540_GPIO=y CONFIG_BT_CTLR_TX_PWR_ANTENNA=20 CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20 CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB=20

