<?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>nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl</link><description>Hello, 
 To follow the talk we add on this ticket . 
 How can I configure a custom TX gain with the MPSL library ? 
 I want to have an output power of 8 dBm on the nRF21540. 
 I tried to change the MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA and set CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Mar 2023 15:22:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl" /><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/414441?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 15:22:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e40549b-7eb6-47d9-805c-c20b269f79aa</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;So I can also update this value by SPI write directly. Because I can&amp;#39;t put my device in UICR mode as I can&amp;#39;t have the necessary voltage right now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/414437?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 15:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7b87ccf-410a-48d5-9331-089548c35a2f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The CONFREG0 TX_Gain value is the value I meant, however, the nature of where the devices fetches the value is configurable, and you should select the source of this register according to your needs and possibilities. The most common way is to write the UICR register accordingly, and the device fetches the UICR register at boot time and populates the TX_Gain value with it. You can read more in chapters 5.4-5.5 of the product specification of nRF21540&lt;/p&gt;
&lt;div&gt;Regards,&lt;br /&gt;Amanda H.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/414141?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 13:15:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:905facac-6229-423a-8da0-520d24bcbfa9</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I know that the nRF52840 can go to +8dBm but my product need to have a power configurable between 0 and 10dBm, that&amp;#39;s why I use a nRF21540.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand what you mean here.&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl/413908"]you&amp;nbsp;can try flashing the value of the internal register[/quote]
&lt;p&gt;You mean the CONFREG0 TX_Gain value or the UICR register ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413908?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 15:19:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cd0ba50-a843-43de-8ce0-d2b043219e97</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF52840 Product Specification states for TXPOWER register of RADIO peripheral:&amp;nbsp;&lt;a title="https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html?cp=5_0_0_5_19_13_46#register.txpower" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html?cp=5_0_0_5_19_13_46#register.TXPOWER" rel="noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/radio.html?cp=5_0_0_5_19_13_46#register.TXPOWER&lt;br /&gt;&lt;/a&gt;that there is no -2dBm power so the splitter uses achievable power setting.&lt;/p&gt;
&lt;p&gt;For nRF52840 there is no need to use FEM, nRF52840 can achieve +8dBm.&lt;/p&gt;
&lt;p&gt;If nRF52840 is used with nRF21540 to achieve +8dBm, you&amp;nbsp;can try flashing the value of the internal register which corresponds to the 10 dB setting to be lower that the pre-programmed one, and achieve the lower amplification this way.&amp;nbsp;The lab would be needed to actually measure the real output value of power with the adjusted internal setting, and most probably, would be needed to be performed on a per-sample basis.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413751?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 09:41:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9893da2b-a63c-43a4-a340-c3d1d3a86fde</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;With both version of the SDK and default values, it work. I was just using a sniffer and not a spectrum analyzer that&amp;#39;s why thoses values where differents.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;During my analysis, I found that the 802.15.4 drivers of nrfxlib are&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/blob/a2f5dcfb7521f080ba418a28e12dda56aeefeba9/nrf_802154/driver/src/nrf_802154_tx_power.c#L40"&gt;splitting the power between the nRF52840 and nRF21540&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;with a formula inside MPSL.&lt;/p&gt;
&lt;p&gt;Here are my findings when I checked the values sent by SPI with the built in power model (temperature got by the nrf temp sensor).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;inputs values for the power model: 3V, 24&amp;deg;C, 2405MHz, 10dBm
&lt;ul&gt;
&lt;li&gt;nRF52840: 0dBm&lt;/li&gt;
&lt;li&gt;nRF21540: gain_db=10 / private=8&lt;/li&gt;
&lt;li&gt;SPI&amp;nbsp;CONFREG0: 0x3F&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;inputs values for the power model: 3V, 24&amp;deg;C, 2480MHz, 10dBm
&lt;ul&gt;
&lt;li&gt;nRF52840: 0dBm&lt;/li&gt;
&lt;li&gt;nRF21540: gain_db=10 / private=6&lt;/li&gt;
&lt;li&gt;SPI&amp;nbsp;CONFREG0: 0x1F&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even when I activate&amp;nbsp;&lt;span&gt;CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL, the nRF21540 keep default values.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example, if I want 8dBm of transmit power, the function&amp;nbsp;&lt;/span&gt;&lt;em&gt;nrf_802154_fal_tx_power_split()&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;will split the power with&amp;nbsp;RADIO_TXPOWER_TXPOWER_Neg4dBm and 10dBm for the nRF21540. So at the end I will get 6dBm and not 8dBm as wanted...&lt;/p&gt;
&lt;p&gt;Is there a way to make the splitting function output 8dBm for the nRF21540 ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413684?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 03:17:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c7be733-91d3-4404-99a4-0a59ba657389</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="AndrewSafehear"]When I use default values,&amp;nbsp;change&amp;nbsp;MPSL_FEM_NRF21540_TX_GAIN_DB&amp;nbsp;to 10dBm and I want 10 dBm, I get it on both project.[/quote]
&lt;p&gt;Seems v2.2.0 can work as expected while setting to gain 10dBm.&amp;nbsp;&lt;/p&gt;
[quote user="AndrewSafehear"]With all default values I got RSSI values near -19dBm for an output power set at 10dBm.[/quote]
&lt;p&gt;Does that mean it doesn&amp;#39;t work as expected in v2.3.0 &lt;span&gt;while setting to gain 10dBm&lt;/span&gt;? Are you running with&amp;nbsp;&lt;span&gt;radio_test?&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413343?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2023 20:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b10504a4-a8fc-4137-b4dd-65eb9eb7a584</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tested it with NCS v2.3.0 and a sniffer.&lt;/p&gt;
[quote userid="113478" url="~/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl/412937"]&lt;div&gt;&lt;em&gt;- MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;- MPSL_FEM_NRF21540_GPIO_SPI&lt;/em&gt;&lt;span&gt;&lt;em&gt;=y&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=20&lt;br /&gt;&lt;/em&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10&lt;/em&gt;&lt;/div&gt;[/quote]
&lt;p&gt;With all default values I got RSSI values near -19dBm for an output power set at 10dBm.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="113478" url="~/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl/412937"]&lt;div&gt;&lt;em&gt;- MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;- MPSL_FEM_NRF21540_GPIO_SPI&lt;/em&gt;&lt;span&gt;&lt;em&gt;=y&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;span&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=8&lt;br /&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;[/quote]
&lt;p&gt;With custom values, I got RSSI near -37dBm for an output power set at 10dBm.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413338?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2023 19:18:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51ea5d68-bfc3-4588-a7ba-354ab90876cc</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="AndrewSafehear"]&lt;p&gt;Here is the configs for those tests with both projects:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA = 20&lt;br /&gt;&lt;/em&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10&lt;br /&gt;-&amp;nbsp;MPSL_FEM_NRF21540_TX_GAIN_DB = 10&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;With my project I also set&amp;nbsp;CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 10 or 8 and with the radio_test project I set &lt;em&gt;total_output_power&lt;/em&gt; to 10 or 8. Also for the radio_test project, I set data_rate to&amp;nbsp;&lt;/span&gt;ieee802154_250Kbit.&lt;/p&gt;[/quote]
&lt;p&gt;Is it possible for you to test this part with NCS v2.3.0 which got released yesterday? Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413329?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2023 17:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fabe131-1f57-4ba0-abe3-db9a5c2b955f</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes the problem is on both cards...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413325?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2023 17:20:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:560514c5-2bd9-485d-81b7-ada6dbdb966f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="AndrewSafehear"]I don&amp;#39;t know if it change something but I use a custom board with the nRF52840 and nRF21540.[/quote]
&lt;p&gt;Is it possible to reproduce on nRF2140DK? If not, please&lt;span&gt;&amp;nbsp;create a new support case with &amp;quot;nRF21540 and nRF52840 custom board&lt;/span&gt;&lt;span&gt;&amp;quot; as the title.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413166?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2023 08:33:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b19a892d-42de-4e58-94b4-c9f9163d919f</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for closing the ticket I clicked on the wrong button...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For the 13dBm I put&amp;nbsp;&lt;span&gt;CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER at 13, and left all the other configs on default values. With this, the nRF21540 was configured at 10dBm and the nRF52840 at 3dBm, but at 13dBm the product can&amp;#39;t pass the certification so I left my maximum at 10dBm.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl/413132"]How do you set the desired dBm in these two tests? By setting MPSL_FEM_NRF21540_TX_GAIN_DB?[/quote]
&lt;p&gt;Here is the configs for those tests with both projects:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA = 20&lt;br /&gt;&lt;/em&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10&lt;br /&gt;-&amp;nbsp;MPSL_FEM_NRF21540_TX_GAIN_DB = 10&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;With my project I also set&amp;nbsp;CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 10 or 8 and with the radio_test project I set &lt;em&gt;total_output_power&lt;/em&gt; to 10 or 8. Also for the radio_test project, I set data_rate to&amp;nbsp;&lt;/span&gt;ieee802154_250Kbit.&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl/413132"]&lt;p&gt;&lt;span&gt;&lt;span&gt;What result would you get if using the following setting?&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="evolution-code-editor theme-clouds"&gt;&lt;a href="#" class="fullscreen"&gt;&lt;/a&gt;&lt;/div&gt;[/quote]
&lt;p&gt;Same results at -23dBm for both projects...&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know if it change something but I use a custom board with the nRF52840 and nRF21540.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/413132?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 22:35:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b6bcc34-ec9d-4ed9-bea3-8538d1a4452b</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just curious, do you get the&amp;nbsp;&lt;span&gt;final power of 13dBm as desired in&amp;nbsp;this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91220/ncs-and-nrf21540-with-custom-protocol"&gt;ticket&lt;/a&gt;? If so, how do you make it? What configs are you using?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="AndrewSafehear"]&lt;p&gt;&lt;span&gt;When I use default values&amp;nbsp;and I want 10 dBm, I get it on both project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I use&amp;nbsp;default values and I want 8dB, I get 6 dBm on both.&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;How do you set the desired dBm in these two tests? By setting MPSL_FEM_NRF21540_TX_GAIN_DB?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;What result would you get if using the following setting?&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=8
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB=8
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=8&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/412937?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 09:51:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f656bd57-682d-4dba-a4dc-565843f59594</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hello Amanda,&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl/412826"]Doesn&amp;#39;t the PR help the radio_test project?[/quote]
&lt;p&gt;I don&amp;#39;t have a spectral analyzer free right now so I can&amp;#39;t say... I will have it tomorrow.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl/412826"]Are you using the same project as&amp;nbsp;&lt;span&gt;this&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91220/ncs-and-nrf21540-with-custom-protocol"&gt;ticket&lt;/a&gt;?[/quote]
&lt;p&gt;Yes I am. I got the desired output power (10dBm) when I leave&amp;nbsp;&lt;span&gt;MPSL_FEM_NRF21540_TX_GAIN_DB to the default value. When I try to put&amp;nbsp;CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 8 I don&amp;#39;t really get 8dBm as the nRF21540 is configured at 10dBm and the nRF52840 is configured at -4dBm (a total of 6 and not 8).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I already use&amp;nbsp;CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y in this program.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/97116/nrf21540-custom-gain-with-mpsl/412826"]&lt;p&gt;&lt;span&gt;Do you mean you are able to get the default value of 10 dBm with&amp;nbsp;the radio_test sample or your project?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will try to make a summary of all my tests:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Default values are:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;em&gt;- MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;- MPSL_FEM_NRF21540_GPIO_SPI&lt;/em&gt;&lt;span&gt;&lt;em&gt;=y&lt;/em&gt;&lt;br /&gt;&lt;/span&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=20&lt;br /&gt;&lt;/em&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10&lt;/em&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;Modified values are:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;em&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;em&gt;- MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;- MPSL_FEM_NRF21540_GPIO_SPI&lt;/em&gt;&lt;span&gt;&lt;em&gt;=y&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;span&gt;&lt;em&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=8&lt;br /&gt;- MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB = 10&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span&gt;When I use default values&amp;nbsp;and I want 10 dBm, I get it on both project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I use&amp;nbsp;default values and I want 8dB, I get 6 dBm on both.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I use default values,&amp;nbsp;change&amp;nbsp;MPSL_FEM_NRF21540_TX_GAIN_DB&amp;nbsp;to 10dBm and I want 10 dBm, I get it on both project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I use modified values and change&amp;nbsp;MPSL_FEM_NRF21540_TX_GAIN_DB to 8dBm, I get -23dBm on both project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When&amp;nbsp;I use modified values and change&amp;nbsp;&lt;/span&gt;&lt;span&gt;MPSL_FEM_NRF21540_TX_GAIN_DB&amp;nbsp;&lt;/span&gt;to 10dBm, I get -23dBm on both project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The problem appears when I try to change&amp;nbsp;&lt;/span&gt;MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry if I was confusing...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I really need to be able to change the nRF21540 parameters on the go if possible...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If it&amp;#39;s really not possible, I will try to change UICR values for my last try.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Andrew&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/412826?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 17:42:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15bd27e0-8fea-4374-bf26-8d26d49ecb96</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Andrew,&amp;nbsp;&lt;/p&gt;
[quote user="AndrewSafehear"]The PR didn&amp;#39;t help...[/quote]
&lt;p&gt;&lt;span&gt;Doesn&amp;#39;t the PR help the radio_test project? Another customer said that can help with the&amp;nbsp;radio_test. Since you provide the config for&amp;nbsp;the radio_test project for the nrf21540dk_nrf52840 board and&amp;nbsp;used the command &amp;quot;total_output_power 8&amp;quot; and then &amp;quot;start_tx_modulated_carrier&amp;quot;, I provide the PR for fixing the known issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user="AndrewSafehear"]When I use my project (802.15.4 nrf driver with a TX power configured at 10dBm) [/quote]
&lt;p&gt;Are you using the same project as&amp;nbsp;&lt;span&gt;this&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91220/ncs-and-nrf21540-with-custom-protocol"&gt;ticket&lt;/a&gt;? If not, what is the difference? It seems you already get the desired&amp;nbsp;&lt;span&gt;output tx power in that case.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Do you mean to set&amp;nbsp;CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 10 in your project? If so, is it possible to try to set&amp;nbsp;&lt;span&gt;CONFIG_NET_CONFIG_IEEE802154_RADIO_TX_POWER to 8 and leave&amp;nbsp;MPSL_FEM_NRF21540_TX_GAIN_DB to the default value? Also, use&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;CONFIG_&lt;span&gt;MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;I tried to change the&amp;nbsp;MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA and set&amp;nbsp;&lt;span&gt;CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL&amp;nbsp;&lt;/span&gt;configs but the signal on a analyzer was -23dBm and not near 8 dBm as I wanted.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I just use the default value of 10 dBm, the analyzer get a power near 10 dBm as wanted.&lt;/p&gt;[/quote]
&lt;p&gt;&lt;span&gt;Do you mean you are able to get the default value of 10 dBm with&amp;nbsp;the radio_test sample or your project?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/412793?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 15:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:485f3f98-77da-4117-aa18-6a2061cc8650</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The PR didn&amp;#39;t help...&lt;/p&gt;
&lt;p&gt;When I use my project (802.15.4 nrf driver with a TX power configured at 10dBm) and check with wireshark (nrf52840-DK sniffer), without those configs:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=y
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=8&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have a RSSI of -22dBm at 5cm.&lt;/p&gt;
&lt;p&gt;With those configs, I have a RSSI of -40dBm at 5cm...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Same code, same TX power requested. The only change is those 3 lines inside the prj.conf file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/412764?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 13:45:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c883e977-2589-4fb7-adc8-64eb62422c45</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using NCS v2.2.0.&lt;br /&gt;As I can see the PR resolve a problem with the HCI driver.&lt;br /&gt;But I don&amp;#39;t use it as I use the 802.15.4 driver on my main project. And the bug is also here with my main project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I will try to use the PR but I&amp;#39;m not sure if it will change something.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/412583?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 16:43:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70eade50-649f-486b-8dfa-6e824bac1d47</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What NCS version are you using?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A known bug was identified which lead to incorrect values being set in the TXPOWER register, sounding very similar to the issue you describe, and w&lt;/span&gt;&lt;span&gt;e have&amp;nbsp;a fix to the issue which is covered by&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/10120"&gt;this pull request&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Would you be able to apply this PR on your end and see if it fixes your issue? If it doesn&amp;#39;t work in your version, is it possible for you to test the PR with v2.2.0?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to apply the PR to your local NCS installation you can use the following Git commands:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Open a Git bash and navigate to the nrf folder of the v2.2.0 installation
git fetch origin pull/10120/head:pr_10120_test_branch
git checkout pr_10120_test_branch
west update

// In order to go back
git checkout v2.2.0
west update&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/412548?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 14:16:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1620a6f8-829e-40fc-b0e6-79f638500437</guid><dc:creator>AndrewSafehear</dc:creator><description>&lt;p&gt;Here is the conf file used with the radio_test project for the nrf21540dk_nrf52840 board:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2020 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_CONSOLE=y
CONFIG_CONSOLE_HANDLER=y
CONFIG_SHELL=y

CONFIG_DYNAMIC_INTERRUPTS=y

CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=y
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=8

CONFIG_NRFX_TIMER0=y

CONFIG_ENTROPY_GENERATOR=y

CONFIG_SHELL_BACKEND_RTT=y
CONFIG_SENSOR=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;WIth this one, when I use the command &amp;quot;total_output_power 8&amp;quot; and then &amp;quot;start_tx_modulated_carrier&amp;quot; I have -23dBm on the analyzer.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF21540 custom gain with MPSL</title><link>https://devzone.nordicsemi.com/thread/412546?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 14:10:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d616e66-ec1f-43f9-9a41-f96896f60c52</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please kindly share the whole content of the&amp;nbsp;&lt;span&gt;conf file. Thanks.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>