Verifying FEM Activation on BT840X (nRF52840 + SKY66112-11)

Hello,

I'm trying to confirm whether the front-end module (FEM) is actually active in my application. Here is a summary of what I have done so far:

  1. Updated prj.conf

    CONFIG_MPSL=y
    CONFIG_MPSL_FEM=y
    

  2. Modified the .dts file to include:

        
    / {
        nrf_radio_fem: name_of_fem_node {
            compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
            ctx-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
            crx-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
            cps-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
            chl-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
            tx-gain-db = <2>;
        };
    };
    
    &radio {
        fem = <&nrf_radio_fem>;
    };
    
  3. Modified scan.c to get RSSI information by changing the device_found callback function:

    static void device_found(const bt_addr_le_t *addr, int8_t rssi, uint8_t type,
                             struct net_buf_simple *ad)
    {
        char dev[BT_ADDR_LE_STR_LEN];
    
        bt_addr_le_to_str(addr, dev, sizeof(dev));
        printk("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i\n",
               dev, type, ad->len, rssi);
    
        // Original code to parse advertising data has been commented out.
    }
    
    int bt_scan_start(enum bt_scan_type scan_type)
    {
        switch (scan_type) {
        case BT_SCAN_TYPE_SCAN_ACTIVE:
            bt_scan.scan_param.type = BT_LE_SCAN_TYPE_ACTIVE;
            break;
        case BT_SCAN_TYPE_SCAN_PASSIVE:
            bt_scan.scan_param.type = BT_LE_SCAN_TYPE_PASSIVE;
            break;
        default:
            return -EINVAL;
        }
    
        // Start scanning
        int err = bt_le_scan_start(&bt_scan.scan_param, device_found);
    
        if (!err) {
            LOG_DBG("Scanning");
        }
    
        return err;
    }
    

Test Setup and Observations

I’m currently using:

  • Toolchain: v2.7.0
  • nRF Connect SDK: v2.5.2

I am debugging a BLE central with a coded PHY on a BT840X (nRF52840 with a built-in Sky66112-11 amplifier). The peripheral is an MK08 (nRF52840 without any front-end amplification), located roughly 4 meters away. I tried to ensure consistent environmental conditions for each test.

  • For each test configuration and tx-gain-db value, I captured the first five successfully completed transmissions (i.e., no connection drops) and then calculated an average RSSI from those five values.
  • The four configurations tested were with and without FEM, and with and without the following Kconfig setting:
    ini
    Copiar
    CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
  • In total, I experimented with different tx-gain-db values (0, 2, 8, 12, 16, 20).
  • I noticed no significant differences in performance across most settings—except when I set tx-gain-db to <20>, which caused the BLE connection to drop before transmitting all packets.

Below is the table of RSSI measurements (in dBm) under each configuration with FEM:

tx-gain-db
FEM W/ PWR_PLUS_8=y  FEM W/o PWR_PLUS_8=y 
0 -71.8 -69.4
2 -72 -69.4
8 -70.8 -70.8
12 -72.6 -66.6
16 -68.2
20 Dont work Dont work

Below is the table of RSSI measurements (in dBm) under each configuration without FEM:

PWR_PLUS_8=n PWR_PLUS_8=y
-72.2 -68.6

Averaging the results, I still see minimal impact, except for the case where tx-gain-db = <20> caused disconnections.


My Question

How can I verify that the FEM is truly active with these settings? Even after enabling CONFIG_MPSL=y and CONFIG_MPSL_FEM=y, and pointing the radio node to the nrf_radio_fem, I'm not seeing the expected increase in output power or any clear sign that the FEM is in operation.

  • Are there additional logs, debug methods, or configuration changes recommended to confirm that the FEM is on and amplifying the signal?
  • Is there a specific way to read back the FEM status or measure its current draw to ensure it is being driven properly?

Thank you in advance for your assistance! If you need any further details or logs, please let me know.

Best regards,

  • Hello everyone,

    I apologize for the silly question! It turns out the issue was simply missing the CPS and CHL pin configuration in the code. Once these pins were properly configured, everything started working as expected.


    #include <zephyr/drivers/gpio.h>
    
    int main(void)
    {
    	// Enable pins of SKY66112-11
    	const struct device* gpio0_dev = device_get_binding("gpio@50000000"); // gpio 0
    
    	//	Table 6. SKY66112-11 Mode Control Logic1
    	//	Mode	Description 		CPS	CHL
    	//	1 	Receive LNA 		0 	X
    	//	2 	Transmit high-power 	0 	1
    	//	3 	Transmit low-power 	0 	0
    
    	gpio_pin_configure(gpio0_dev, 6, GPIO_OUTPUT); // gpio 0.06 - CPS
    	gpio_pin_set(gpio0_dev, 6, 0);
    	gpio_pin_configure(gpio0_dev, 8, GPIO_OUTPUT); // gpio 0.08 - CHL
    	gpio_pin_set(gpio0_dev, 8, 1);
    	
    	// etc
    	
    }

    However, one question remains: why doesn't it work when I set tx-gain-db=22? If anyone has any insight into this, I'd greatly appreciate your help.

    Thank you!

Related