<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to configure hci_pwr_ctrl demo to support nrf21540dk</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125528/how-to-configure-hci_pwr_ctrl-demo-to-support-nrf21540dk</link><description>I want to test the nrf21540dk to compare range improvements over the nrf5340dk and nrf52840dk. I am using the hci_pwr_ctrl demo and want to adapt it for the nrf21540dk. I think I need to add an Extra KConfig Fragment to enable the FEM. I was reading this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Nov 2025 12:55:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125528/how-to-configure-hci_pwr_ctrl-demo-to-support-nrf21540dk" /><item><title>RE: How to configure hci_pwr_ctrl demo to support nrf21540dk</title><link>https://devzone.nordicsemi.com/thread/554261?ContentTypeID=1</link><pubDate>Thu, 13 Nov 2025 12:55:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b05ad21-5fc6-45b2-abf8-c47d57a26885</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;Ok. Thank you. Looks like that worked:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1763038522313v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I see the power being set to 20 and the reading of the power at 20.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure hci_pwr_ctrl demo to support nrf21540dk</title><link>https://devzone.nordicsemi.com/thread/553968?ContentTypeID=1</link><pubDate>Tue, 11 Nov 2025 12:29:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71c9e482-803a-40a3-ae95-8bbe72ce2874</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Using the DK you can enable runtime dynamic power control and FEM by adding these configs to prj.conf in the hci_pwer_ctrl sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_MPSL_FEM=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=y
CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And as you write, you can modify the txpower array to test other values, for instance:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const int8_t txpower[DEVICE_BEACON_TXPOWER_NUM] = {20, 10, 4, 0, -3, -8,
							  -18, -30};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;No other changes should be needed, as the board files for the DK has the other configurations that are needed (for custom boards, you would have to do as shown under &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/fem/fem_nrf21540_gpio_spi.html#ug-radio-fem-nrf21540-spi-gpio"&gt;Enabling GPIO+SPI mode support for nRF21540&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The Rx gain can be configured statically, but there is no support for dynamic Rx gain adjustment using &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/e2a97fe2578a1030f99f85d5e9e61160d261f0e3/subsys/mpsl/fem/Kconfig#L187"&gt;&lt;code&gt;CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>