Unable to achieve power and range using nrf21540 FEM module with nrf52840

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

nrf_power_system_off(NRF_POWER);)
Then i referred some related tickets and found the following and added them to the code
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

After which, now im able to get upto 0.5uA when using the nrf power off function and 3.25uA  sleep current at 3V input voltage.
Now the issue is the power consumption of advertisement is very much higher than the same code's consumption when run on nRF21540DK,
power consumption of DK (note: the pic has both non.conn(coded_phy). and followed by conn. adv(legacy) repeated for 5 pkts at tx power +18 dbm)
power consumption of my custom board (note: same as above but at +16dbm)
Is there anything that I'm missing that makes the difference in consumption??
I'm also unable to achieve the range compared to the DK(comparatively much lesser)
Kindly guide me through this.
Thanks.
Parents Reply
  • Have you measured the output power here (for instance using a spectrum analyzer), to ensure you have the same output power between the DK and your board? I am thinking if it's possible one is actually also transmitting at a higher power than the other. Though I am not entirely sure how that should be the case if you are building the same project for both boards.

    Kenneth

Children
No Data
Related