nRF52840, RFX2401c, and the nRF Connect SDK Thread Coprocessor Sample

I am trying to get a Holyiot 21017 dongle to work correctly as a Thread RCP. The Holyiot 21017 has a nRF52840 and a RFX2401c power amplifier.

In VS Code with the nRF Connect SDK 3.4.0, I have made changes to `nrf52840dongle_nrf52840.overlay` and `prj.conf`:

nrf52840dongle_nrf52840.overlay:

/* Copyright (c) 2024 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

/ {
    /*
     * nRF52840 dongle has pin P0.19 connected to reset. By setting it
     * in `GPIO_OUTPUT_ACTIVE` mode, reset is pulled to GND,
     * which results in device rebooting without skipping the bootloader.
     * openthread_config node enables doing so using `reset bootloader` command.
     */
    openthread_config: openthread {
        compatible = "openthread,config";
        bootloader-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
    };

    chosen {
        zephyr,ot-uart = &board_cdc_acm_uart;
    };

    nrf_radio_fem: rfx2401c {
        compatible = "radio-fem-two-ctrl-pins";
        ctx-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
        crx-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
        ctx-settle-time-us = <10>;
        crx-settle-time-us = <10>;
    };
};

&radio {
    fem = <&nrf_radio_fem>;
    status = "okay";
};


prj.conf:
#
# Copyright (c) 2020 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable OpenThread
CONFIG_OPENTHREAD=y

# Set OpenThread NCP architecture
CONFIG_OPENTHREAD_COPROCESSOR=y
CONFIG_OPENTHREAD_COPROCESSOR_RCP=y

# Nordic feature set
CONFIG_OPENTHREAD_NORDIC_LIBRARY_RCP=y

# Increase Settings storage size
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000

# Disable RTT
CONFIG_USE_SEGGER_RTT=n

CONFIG_MPSL=y
CONFIG_MPSL_FEM=y
CONFIG_MPSL_FEM_SIMPLE_GPIO=y


The changes are relatively simple, with the `nrf_radio_fem` and `&radio` blocks in `nrf52840dongle_nrf52840.overlay` and three MSPL lines in `prj.conf`. The GPIOs should be correct, as the Holyiot 21017 schematic clearly show TXEN on P0.24 and RXEN on P0.22.

However, this does not seem to be working. When connected to an OTBR Raspberry Pi, the Holyiot 21017 with the `nrf_radio_fem` has the same limited range it did before the code changes, and it shows approx. the same RSS values for the devices it does see.

Am I missing something that's required to make this work? 

Thanks!

  • Hello,

    Your "rfx2401c" node does not seem to include the required "tx-gain-db" and "rx-gain-db" properties, but I would have expected a build failure they really were missing. This TX gain property is used to inform the MPSL what the output power of the PA. Either way, please try to expand the node to include these as shown below.

        nrf_radio_fem: rfx2401c {
            compatible = "radio-fem-two-ctrl-pins";
            ctx-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
            crx-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
            ctx-settle-time-us = <10>;
            crx-settle-time-us = <10>;
    	    tx-gain-db = <20>;
    	    rx-gain-db = <12>;
        };

    Also add CONFIG_OPENTHREAD_DEFAULT_TX_POWER=20 to your project configuration file. The default is 0 dBm, which will cause MPSL to reduce the nRF RADIO output power to -20 dBm to compensate for the additional gain provided by the FEM.
    Best regards,
    Vidar
Related