<?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 TX GAIN with beacon sample</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98262/nrf21540-tx-gain-with-beacon-sample</link><description>Hi, 
 
 I want to change the FEM gain from the bluetooth/beacon sample. 
 I&amp;#39;m running custom hardware and I don&amp;#39;t use the MODE pin of the nrf21540. 
 I can only set FEM gain with the SPI command. 
 I successfully change the gain using the radio_test sample</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 May 2023 10:48:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98262/nrf21540-tx-gain-with-beacon-sample" /><item><title>RE: NRF21540 TX GAIN with beacon sample</title><link>https://devzone.nordicsemi.com/thread/424218?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 10:48:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:141e0f05-9d53-4d0f-a052-e0e84ff70288</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The FEM initialization is done at boot time only, you don&amp;#39;t need to do it after every wakeup.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;At boot time when the nRF21540 is initialized nothing is written to be stored in the FEM. The transfers you see are calibration register reads, which are stored in the MCU for later use. If you have an additional switch to control power this should be turned on at boot time, to make sure that these register reads are successful.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any further transmission attempt (invoked by the SoftDevice Controller (SDC)) will activate the PDN pin, send the tx_gain to be used for the transmission through the SPI interface (based on the values read at boot time), activate the TX_EN pin, start the RADIO frame transmission, and then disable TX_EN and later PDN once the entire frame is transmitted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is no need to call any FEM API&amp;#39;s for this, as the SDC does this automatically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Possibly you can make a hardware connection between the PDN pin and the pin you use to switch the power of the FEM. If required by the power switch you can tweak the &amp;#39;pdn-settle-time-us&amp;#39; devicetree property in order to start the PDN activation earlier.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order for all of this to work make sure to use CONFIG_MPSL_FEM_NRF21540_GPIO_SPI, and also consider using CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL. In this case the gain will be sent to the nRF21540 before every transmission attempt through the SPI interface.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF21540 TX GAIN with beacon sample</title><link>https://devzone.nordicsemi.com/thread/423913?ContentTypeID=1</link><pubDate>Fri, 05 May 2023 08:21:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5dde632-9285-43d1-89dd-888d1e3ae919</guid><dc:creator>Neunz</dc:creator><description>&lt;p&gt;We found what is the reason for the failure of the use of the SPI.&lt;br /&gt;in our design the nRF21540 FEM is controlled by a switch in order to prevent the current leak due of the defect of the component described in the errata:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Ferrata_nRF21540_Rev2%2FERR%2FnRF21540%2FRev2%2Flatest%2Fanomaly_540_7.html&amp;amp;cp=8_0_1_0_1_0"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Ferrata_nRF21540_Rev2%2FERR%2FnRF21540%2FRev2%2Flatest%2Fanomaly_540_7.html&amp;amp;cp=8_0_1_0_1_0&lt;/a&gt;&lt;br /&gt;This is crucial since the leakage is so huge compared to the promises of the datasheet (1mA compared to 60nA).&lt;br /&gt;But we found out that at startup if the FEM is power on some configuration occur via SPI.&lt;br /&gt;We have discovered that if the FEM is power on in a task with a higher priority than the radio in the post-kernel initialization then some new kind of communication occurs on the SPI.&lt;br /&gt;This not documented anywhere we were looking at, but this communication looks like an initialization of the FEM that looks mandatory.&lt;br /&gt;Our problem is that we shut down the FEM when we do not use the radio, but we do not know how to trigger this initialization, hence, the SPI communication on the FEM ceases to work for us when we power on the FEM afterwards.&lt;/p&gt;
&lt;p&gt;As we are in production, this is a critical problem for us (we have thousand of FEMs with the defect already in our inventory).&lt;br /&gt;This is critical for us that you can provide us with a way to launch this initialization when we need it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF21540 TX GAIN with beacon sample</title><link>https://devzone.nordicsemi.com/thread/418316?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 12:51:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa3d6af0-ce1e-436e-9f5a-46823db31022</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Pierre&lt;/p&gt;
&lt;p&gt;The power settings will be lost in powerdown, and needs to be configured every time the FEM is brought back up, yes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is automatically handled by the driver when you use the GPIO_SPI implementation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>