How to achieve a measured conductive Tx Power of +21 dBm using any NCS sample app?

My Goal:  To measure a conductive Tx Power of +21 dBm using any NCS sample app running on Fanstel's BT840XE module, which includes the nRF52840 plus the +22 dBm Skyworks SKY66112 integrated FEM.

Problem Statement:  So far the highest conductive Tx Power I have measured is 3.3 dBm using the attached NCS v2.3.0 peripheral_hr_coded sample, which has my modifications to control the Skyworks SKY66112 FEM in the nrf52840dk_nrf52840.overlay and overlay-nrf52840dk.conf files.  However, I am able to measure +21 dBm using the attached BT840X_AT_PC_221028.hex file I received from Fanstel, which is based on the nRF5 SDK.

Please let me know if you see anything wrong with my nrf52840dk_nrf52840.overlay or overlay-nrf52840dk.conf files.  I am fine with going back to previous NCS versions if necessary.  However, I'm aware of Pull Request 10143 and DRGN-18568 being marked as fixed in NCS v2.3.0.

NOTE:  I added the tx_power.c/h modules and gated them with #define ENABLE_TX_PWR_DYNAMIC_CONTROL in tx_power.h just so I could print out the TX Power value that actually gets initialized at run time after bt_enable() is called in main().  This requires CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y at the top of the overlay-nrf52840dk.conf file.

Any and all ideas are welcome.

Thanks,

Starbuck

4628.peripheral_hr_coded_fem_NCS_v2.3.0.zip

3730.BT840X_AT_PC_221028.zip

Parents
  • Hello,

    Sorry for the delay. I compared the pinout in your overlay with the pinout Fanstel suggest in the "Control Skyworks Power Amplifier" section of their product specification (https://static1.squarespace.com/static/561459a2e4b0b39f5cefa12e/t/63de927a519c1b69364b15f2/1675530877718/BT840F-p+Product+Specifications.pdf) and it looks like you may have gotten the CSD and CPS pins wrong? CPS controls the bypass mode and if I am reading things correctly, you have CSD set to '1' and connected to the input CPS input on the FEM.

    By the way, it looks like you have a neat tool there for measuring TX output power. I have not seen anything like it before.

    Best regards,

    Vidar

      

  • Hi Vidar,
    I agree that is part of the problem.  I found that too this morning.  However, correcting that in my overlay file didn't bring the FEM out of bypass mode.  But after initializing the CHL & CPS pins correctly in main.c I was able to measure +21 dBm.  The code snippets below fix the issue, but I'm still not understanding why I need to initialize CHL & CPS in main.c.  Wouldn't you expect the skyworks,sky66112-11 driver to initialize the CHL & CPS pins?

    Changing the nrf52840dk_nrf52840.overlay file to this did NOT fix the issue:

    / {
    	nrf_radio_fem: fan_evbt840x_fem {
    		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_LOW>;
    		chl-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
    		tx-gain-db = < 18 >; // See CONFIG_BT_CTLR_TX_PWR_ANTENNA comment before changing this value
    	};
    };

     Setting the cps-gpios pin to GPIO_ACTIVE_HIGH didn't work either.

    The code snippets below allowed me to measure +21 dBm:

    	printk("Bluetooth initialized\n");
    
    	nrf_gpio_cfg_output(APP_CHL_PIN);
        nrf_gpio_cfg_output(APP_CPS_PIN);
    	nrf_gpio_pin_set(APP_CHL_PIN);
    	nrf_gpio_pin_clear(APP_CPS_PIN);

    / {
    	nrf_radio_fem: fan_evbt840x_fem {
    		compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
    		ctx-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
    		crx-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
    		tx-gain-db = < 18 >;
    	};
    };

    Thank you for helping me understand this.  I'm still on the Zephyr learning curve. It is very appreciated!

Reply
  • Hi Vidar,
    I agree that is part of the problem.  I found that too this morning.  However, correcting that in my overlay file didn't bring the FEM out of bypass mode.  But after initializing the CHL & CPS pins correctly in main.c I was able to measure +21 dBm.  The code snippets below fix the issue, but I'm still not understanding why I need to initialize CHL & CPS in main.c.  Wouldn't you expect the skyworks,sky66112-11 driver to initialize the CHL & CPS pins?

    Changing the nrf52840dk_nrf52840.overlay file to this did NOT fix the issue:

    / {
    	nrf_radio_fem: fan_evbt840x_fem {
    		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_LOW>;
    		chl-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
    		tx-gain-db = < 18 >; // See CONFIG_BT_CTLR_TX_PWR_ANTENNA comment before changing this value
    	};
    };

     Setting the cps-gpios pin to GPIO_ACTIVE_HIGH didn't work either.

    The code snippets below allowed me to measure +21 dBm:

    	printk("Bluetooth initialized\n");
    
    	nrf_gpio_cfg_output(APP_CHL_PIN);
        nrf_gpio_cfg_output(APP_CPS_PIN);
    	nrf_gpio_pin_set(APP_CHL_PIN);
    	nrf_gpio_pin_clear(APP_CPS_PIN);

    / {
    	nrf_radio_fem: fan_evbt840x_fem {
    		compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
    		ctx-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
    		crx-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
    		tx-gain-db = < 18 >;
    	};
    };

    Thank you for helping me understand this.  I'm still on the Zephyr learning curve. It is very appreciated!

Children
  • Hi,

    Starbuck said:
    Wouldn't you expect the skyworks,sky66112-11 driver to initialize the CHL & CPS pins?

    Yes, I assumed the same at first. However, as implied in the documentation here and shown by the implementation here, the generic FEM GPIO driver is only controlling the CTX and CRX signals. The other signals have to be set by the application as you found out. This should have been documented more clearly.

    The application may still use the properties exposed by your fem node. The Bluetooth direct test mode sample demonstrates how here: https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/direct_test_mode/src/fem/generic_fem.c#L52 

    Starbuck said:
    Regarding my RF Power Meter, it is really nice and portable (affordable too).  I travel a lot and I'm getting into flying FPV drones as a hobby of mine so I'm always looking for compact portable test equipment. I highly recommend it!

    Thank you for providing the link! I am considering this for my home lab. 

Related