<?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>GPIOTE driver/peripheral power consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39380/gpiote-driver-peripheral-power-consumption</link><description>Hello, 
 I&amp;#39;m trying to lower the power consumption in the s.c. &amp;quot;System ON&amp;quot; mode. I need to run in System ON mode to keep the RTC running. However I need to wake the CPU on an external IRQ activity and I&amp;#39;m using the GPIOTE driver to setup the wake up event</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Oct 2018 12:02:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39380/gpiote-driver-peripheral-power-consumption" /><item><title>RE: GPIOTE driver/peripheral power consumption</title><link>https://devzone.nordicsemi.com/thread/152680?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 12:02:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fad6877-7a95-489e-879d-05e18097fea8</guid><dc:creator>markopa</dc:creator><description>&lt;p&gt;Ok, I&amp;#39;ve been able to figure it out. After I exit the&amp;nbsp;nrf_pwr_mgmt_run() function I check the status of my wake-up pin manually by checking the&amp;nbsp;NRF_GPIO-&amp;gt;IN register. If the wake-up reason is asserted I just trigger other actions.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m measuring a CPU consumption on 2.3uA which is oscillating to 6~7uA upon a RTC tick. I&amp;#39;m fine with that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE driver/peripheral power consumption</title><link>https://devzone.nordicsemi.com/thread/152660?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 10:34:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d36bf65-bfa3-43aa-b0ed-02da08a9c571</guid><dc:creator>markopa</dc:creator><description>&lt;p&gt;&amp;quot;Uninit&amp;quot; output pins makes no sense if they don&amp;#39;t maintain the state as a pin change will trigger other parts of the board that will in turn consume more power. I&amp;#39;m sorry I can&amp;#39;t even try this.&lt;/p&gt;
&lt;p&gt;Instead, I&amp;#39;ve tried to&amp;nbsp;nrf_drv_gpiote_in_uninit() the two input pins and this drops the CPU consumption to ~2uA+.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That being said is there an SDK api or a register which I can check to distinguish if the CPU was waken up by RTC or by the GPIO ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE driver/peripheral power consumption</title><link>https://devzone.nordicsemi.com/thread/152649?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 09:35:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:945456e6-d971-4449-81a2-f8965231c8f9</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Sorry, I was a bit quick on the trigger.&lt;/p&gt;
&lt;p&gt;The pins will not maintain the state while they are disabled, but they will be remembered until you init them again, since the state is written in a different register.&lt;/p&gt;
&lt;p&gt;If you need to keep them in a certain state while you are in system ON, this will draw some current. That is how electronics work.&lt;/p&gt;
&lt;p&gt;But to check whether that is actually the part drawing current here, can you check whether the current consumption drops if you try to uninit the pins before going to sleep?&lt;/p&gt;
&lt;p&gt;Try to use the&amp;nbsp;nrf_drv_gpiote_in_uninit() on the pins that are used for output pins.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE driver/peripheral power consumption</title><link>https://devzone.nordicsemi.com/thread/152639?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 09:19:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b570944-f11d-497e-bcfb-213c333c09e3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;It is probably the&amp;nbsp; output pins that draw the current. Can you try to disable them?&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE driver/peripheral power consumption</title><link>https://devzone.nordicsemi.com/thread/152634?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 09:07:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddf767e7-c9a9-4bdb-8ac7-804e5d20d37c</guid><dc:creator>markopa</dc:creator><description>&lt;p&gt;Hi, thanks for your input.&lt;/p&gt;
&lt;p&gt;I have other pins configured as well. I have some output pins which are not actively being used. They are used at startup to enable other devices on the board. Does disabling the pins preserve their output state?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As for input pins I have two and they are configured as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static nrf_drv_gpiote_in_config_t irq1_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
irq1_config.pull = NRF_GPIO_PIN_NOPULL;
APP_ERROR_CHECK(nrf_drv_gpiote_in_init(LIS2DH_IRQ1, &amp;amp;irq1_config, irq1_handler)); 

static nrf_drv_gpiote_in_config_t irq2_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
irq2_config.pull = NRF_GPIO_PIN_NOPULL;
APP_ERROR_CHECK(nrf_drv_gpiote_in_init(LIS2DH_IRQ2, &amp;amp;irq2_config, irq2_handler)); 
				
nrf_drv_gpiote_in_event_enable(LIS2DH_IRQ1, true);	
nrf_drv_gpiote_in_event_enable(LIS2DH_IRQ2, true);	
				
nrf_gpio_cfg_sense_input(LIS2DH_IRQ2, NRF_GPIO_PIN_NOPULL/*NRF_GPIO_PIN_PULLUP*/, NRF_GPIO_PIN_SENSE_LOW);	&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;IRQ1 pin is used as a regular IRQ and I can disable it when going into &amp;quot;system ON&amp;quot; sleep and later enable i only prior I need it.&lt;/p&gt;
&lt;p&gt;As fro IRQ2 that one is used as a wake-up and as shut-down as well. I can reconfigure even that one to uses it just as a sense pin for wakeup without having the irq handler functionality. I just need to find a way to know why I was waken up. Was this the RTC (1 second) event or was it the IRQ2 pin? Any hints there like reading a status register or similar?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE driver/peripheral power consumption</title><link>https://devzone.nordicsemi.com/thread/152625?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 08:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01d828b8-bc87-42c2-9b92-867e112178a5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;And what pin do you use as wakeup pin? Is it P0.09 or P0.10? Or any of the others?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE driver/peripheral power consumption</title><link>https://devzone.nordicsemi.com/thread/152624?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 08:49:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67fb162c-e884-4e15-bd7e-72779bea56f2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Do you have any other GPIOs configured than the one used for wakeup? And how have you configured that pin? obviously as an input, but how is the rest of the configuration?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If there are any others, especially if any are used as output pins, you should disable these pins before going to &amp;quot;System ON&amp;quot; mode.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>