<?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>51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38910/51822-power-consumption-issue-with-pa-added</link><description>Hi Everyone, 
 RFX2411N is used to extend signal coverage of NRF51822. Here are the configuration below: 
 
 Use radio notification to generate an interrupt 
 Use this interrupt and a GPIO pin to control RXEN. 
 Connect VDD_PA to TXEN and let this control</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Sep 2018 12:39:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38910/51822-power-consumption-issue-with-pa-added" /><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150823?ContentTypeID=1</link><pubDate>Fri, 28 Sep 2018 12:39:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c485316b-0c0f-431a-abb4-3538f65c3f86</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;I just wanted to make sure you saw my reply with the code for radio notification.&amp;nbsp; The new devzone has this bug where it hides some replies.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150789?ContentTypeID=1</link><pubDate>Fri, 28 Sep 2018 01:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbe023cc-b8e7-4a79-b4e7-e337b726c0d5</guid><dc:creator>wangyong</dc:creator><description>&lt;p&gt;RFX2411N has SWANT pin which allows user to disable/enable a specific channel. So I suppose that ANTA channel is disable with existing hardware configuration.&amp;nbsp; Anyway I will do some testing with adding an 50ohm resistor to GND. Many Thanks to your reply&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150788?ContentTypeID=1</link><pubDate>Fri, 28 Sep 2018 01:57:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb580013-6b90-4090-8df8-23d8e0a7306a</guid><dc:creator>wangyong</dc:creator><description>&lt;p&gt;RFX2411N has SWANT pin which allows user to disable/enable a specific channel. So I suppose that ANTA channel is disable with existing hardware configuration.&amp;nbsp; Anyway I will do some testing with adding an 50ohm resistor to GND. Many Thanks to your reply&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150774?ContentTypeID=1</link><pubDate>Thu, 27 Sep 2018 21:02:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3743125a-1146-4d12-985d-85ba69f63db6</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;If you ever do a rev of this board you should terminate ANTA into 50 ohms since you are not using it.&lt;/p&gt;
&lt;p&gt;RF switches can fry easily with open circuits due to the high voltages that can be present. Better to be safe and just terminate unused RF ports.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150773?ContentTypeID=1</link><pubDate>Thu, 27 Sep 2018 20:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb71cba3-ef9f-4160-a075-633b7b01c5c8</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;Here is some code for you to work with.&amp;nbsp; It will completely replace your other logic.&amp;nbsp; I recommend you keep the notification distance to a minimum since this will reduce your battery consumption.&lt;/p&gt;
&lt;p&gt;Here is the table for NRF_RADIO-&amp;gt;STATE from the reference manual:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1538080740485v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;I am making the assumption that the radio knows which state it will be in when you get the notification.&amp;nbsp; You could hedge your bet on this by turning on the LNA for either RxRu, RxIdle, in addition to Rx.&lt;/p&gt;
&lt;p&gt;Here is the code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;ble_radio_notification.h&amp;quot;

#define RADIO_NOTIFICATION_IRQ_PRIORITY 2
#define RADIO_NOTIFICATION_DISTANCE NRF_RADIO_NOTIFICATION_DISTANCE_800US


void radio_notification_evt_handler(bool radio_evt)
{


	
    	if (radio_evt &amp;amp;&amp;amp; (NRF_RADIO-&amp;gt;STATE==0x3))
    	{
	NRF_GPIO-&amp;gt;OUTSET = (1UL&amp;lt;&amp;lt;22);		
	} 
	else
	{
	NRF_GPIO-&amp;gt;OUTCLR = (1UL&amp;lt;&amp;lt;22);
	}
			

}



	//Include this in main AFTER you have started the SD but BEFORE you start advertising.

	err_code=ble_radio_notification_init(RADIO_NOTIFICATION_IRQ_PRIORITY,RADIO_NOTIFICATION_DISTANCE,radio_notification_evt_handler);
    	APP_ERROR_CHECK(err_code);
    	
    	
    	
    	&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You will notice I just clear the RX pin without logic.&amp;nbsp; It doesn&amp;#39;t really matter if we clear it after a Tx event and it is safer to just make sure it is cleared whenever it shouldn&amp;#39;t be on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150770?ContentTypeID=1</link><pubDate>Thu, 27 Sep 2018 20:00:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cec0e98c-f006-4766-9813-1ca1a106a39e</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;I looked into this, and I think I jumped the gun on suggesting you can solve it with PPI/GPIOTE. The events aren&amp;#39;t structured properly to allow you to solve this that way.&lt;/p&gt;
&lt;p&gt;On m_radio_active, I think the issue you are running into is there is no knowledge there of RX/TX ( I assume you are getting it from elsewhere).&amp;nbsp; Also, they appear to just toggle this boolean which isn&amp;#39;t the most reliable approach.&lt;/p&gt;
&lt;p&gt;The best approach would be use use PA/LNA Assist, but according the the SD spec, Nordic has not included it in nRF51 series softdevices.&amp;nbsp; It is only in nRF52 softdevices.&lt;/p&gt;
&lt;p&gt;The absolute best approach would be to use radio notifications. With radio notifications you get an interrupt at a preset time before a radio event.&amp;nbsp; Within the interrupt you can determine if it is either:&lt;/p&gt;
&lt;p&gt;1. Radio about to go into Tx mode.&lt;/p&gt;
&lt;p&gt;2. Radio about to go into Rx mode.&lt;/p&gt;
&lt;p&gt;3. Radio just having been disabled.&amp;nbsp; ie, just finished either Tx or Rx.&lt;/p&gt;
&lt;p&gt;This with some simple logic will allow you to manage your external PA/LNA solution.&amp;nbsp; You should keep your logic very simple.&amp;nbsp; At best you can have 5500usec before the event and the SD will likely interrupt you and halt your process well before then.&lt;/p&gt;
&lt;p&gt;Straight from the SD spec: &amp;quot;To ensure that the Radio Notification signals behave in a consistent way, the Radio Notification shall always be configured when the SoftDevice is in an idle state with no protocol stack or other SoftDevice activity in progress. Therefore, it is recommended to configure the Radio Notification signals directly after the SoftDevice has been enabled.&amp;quot;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll put together some sample code for what it should look like and you can fine tune it and use it in your app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150421?ContentTypeID=1</link><pubDate>Wed, 26 Sep 2018 09:10:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:617e0c88-bca0-44ec-8a73-2bf2f73c49f1</guid><dc:creator>wangyong</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void SWI1_IRQHandler(void)
{
    m_radio_active = !m_radio_active;
    if (m_evt_handler != NULL)
    {
        m_evt_handler(m_radio_active);
    }
}&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We use m_radio_active flag to control rx enable pin in existing software.&amp;nbsp; But now we have issue as described above in field&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150401?ContentTypeID=1</link><pubDate>Wed, 26 Sep 2018 08:16:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a1501f2-c048-4e7c-be8e-3831bd49d026</guid><dc:creator>wangyong</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&amp;nbsp;AmbystomaLabs:&lt;/p&gt;
&lt;p&gt;Atthached is the hardware connection&lt;/p&gt;
&lt;p&gt;How should I use PPI/gpiote to drive rx enable pin instead of ISR?&lt;/p&gt;
&lt;p&gt;BTW, We use S110 currently.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/hardware.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 power consumption issue with PA added</title><link>https://devzone.nordicsemi.com/thread/150366?ContentTypeID=1</link><pubDate>Wed, 26 Sep 2018 06:51:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54b42371-fcce-4b02-ae8b-6e36cf4df43a</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;The interrupt will never be synchronous with the tx/rx activity due to the nature of the softdevice. You should use radio events and ppi/gpiote to drive the rx enable pin instead of an ISR. PPI can&amp;#39;t be lost like an isr. Though I doubt your isr is getting lost, more likely a logic mistake in the code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>