<?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 won&amp;#39;t sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53550/gpiote-won-t-sleep-after-first-button-press-drawing-too-much-current</link><description>I tested the code below to make the board go to sleep and wake up on each button press. When I start, it draws 30ua, but when I press the button it shoots up to 200ua (a clear sign that it is awake) and it stays on. It does not seem to sleep drawing current</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Oct 2019 18:52:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53550/gpiote-won-t-sleep-after-first-button-press-drawing-too-much-current" /><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/217616?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 18:52:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba9b6769-5f03-48d0-9318-5b644ab968a0</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Yes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/217540?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 13:11:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:940b7e3a-dafe-4421-8219-cf15f4378390</guid><dc:creator>Fabio</dc:creator><description>&lt;p&gt;ok, I will try that. To make sure my math is right, if I do this it will consume I = U /R = 2.6 / 1000 = 2.6ua?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/217536?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 12:59:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91b2f98d-5500-4de6-9b5e-a851eed92f80</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You have enabled internal pull up (in_configlow.pull = NRF_GPIO_PIN_PULLUP;), if you expect customers will be pushing this button for a long period of time, I instead suggest use an external pull-up of 1Mohm instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/217532?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 12:51:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8a5a9a3-321b-4071-9369-12e3dc59fac9</guid><dc:creator>Fabio</dc:creator><description>&lt;p&gt;if you are right, does that mean that by pulling a pin low I cannot physically simply create a button with a battery that lasts 2 years? If I can have a current pull of 30ua or less I can. So creating a button operated by battery with less than 200ua is impossible? Unless I reduce the input voltage? If I reduce the input voltage to 1.7v then I = U / R = I = 1.7 * 13 = 100ua. So impossible to have a simple button that consumes less than 100ua?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/217473?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2019 09:41:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4aa8b93-afc7-41ad-bc83-7c2a24f82c71</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I was thinking that 200uA could be close to the current through a pull-up resistor that is pulled low: U = R * I = ~13kohm * ~200uA = ~2.6V (which I expect is close to VDD on the board?).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/216723?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 04:07:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62c5fbb5-7da8-4b22-857e-187abcc16b40</guid><dc:creator>Fabio</dc:creator><description>&lt;p&gt;is it possible that I have a faulty power profiler? Can someone tell me what do you get when you run this code in the DK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/216720?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 03:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:435814a1-295e-4953-894f-f89d5c937ecb</guid><dc:creator>Fabio</dc:creator><description>&lt;p&gt;- _WFE only: 6.6ua&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;&lt;span&gt;add input pin sense, see that it wakeup and measure current - wakes up. 7ua. When button clicked 200ua&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-&amp;nbsp;add pin handler callback, see that it wakeup&amp;nbsp;and&amp;nbsp;measure current -&amp;nbsp;7ua. When button clicked 200ua&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-&amp;nbsp;add output pins, see that it wakeup&amp;nbsp;and&amp;nbsp;measure current - 25ua.&amp;nbsp;When button clicked 200ua&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;No matter what I do, as soon as I press the button it spikes up to 200ua. Something is very wrong. What do you get if you run this code?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/216608?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2019 12:09:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02a4e813-77ab-4f0d-8a9c-f0bfdbf66431</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;In cases like this my suggestion is to simplify the code.&lt;/p&gt;
&lt;p&gt;Do you get the intended current with _WFE() only &lt;br /&gt;-&amp;gt;add input pin sense, see that it wakeup and measure current&lt;br /&gt;-&amp;gt;add pin handler callback, see that it wakeup&lt;span&gt; and&amp;nbsp;measure current&lt;/span&gt;&lt;br /&gt;-&amp;gt;add output pins, see that it wakeup&lt;span&gt; and&amp;nbsp;measure current&lt;/span&gt;&lt;br /&gt;-&amp;gt;add system off, see that it reset on wakeup&lt;span&gt; and&amp;nbsp;measure current&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/216470?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2019 02:17:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39d93387-0543-470f-8a9d-15e86869226e</guid><dc:creator>Fabio</dc:creator><description>&lt;p&gt;If you run this code in a nrf52840 DK do you get different results?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/216468?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2019 01:48:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d31e3e4-51c1-485d-9489-d06b4f5dd43c</guid><dc:creator>Fabio</dc:creator><description>&lt;p&gt;I removed the&amp;nbsp;&lt;span&gt;NRF_POWER-&amp;gt;SYSTEMOFF = 1; and added the 10ms delay. In addition, I am using the buttons of the DK board which in my understanding have a pull up resistor which I am activating with the in_configlow.pull = NRF_GPIO_PIN_PULLUP; line. Would this cause it to NOT be floating?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Having done all of this, I STILL get 200ua+ on the first button press. This happens with 2 DKs. I can&amp;#39;t possibly imagine that I have 2 defective DK boards?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What else can I do? Nothing seems to bring this down.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE won't sleep after first button press drawing too much current</title><link>https://devzone.nordicsemi.com/thread/216416?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2019 14:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60dbdd0c-aed5-42d7-9b02-d79965cb2038</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The&amp;nbsp;NRF_POWER-&amp;gt;SYSTEMOFF = 1; seems a bit odd, since it will go to system OFF, which means the chip will reset on wakeup. I would have placed some 10ms delay and led toggling in beginning of main() just to make sure you have control over what state it is in.&amp;nbsp;This should also make it easier to measure in your power profiler.&lt;/p&gt;
&lt;p&gt;That said, make sure you have full control over the logic level on your input pin, since a floating input pin may draw anything from 30-200uA (or more), in other word connect it to GND or VDD though a pull-resistor or similiar, not leve it unconnected.&lt;/p&gt;
&lt;p&gt;Also, 30uA is also too high if you are only doing _WFE() and some GPIO&amp;#39;s, is it possible that you are sourcing any current through the output pin (e.g. driving any LED or similar).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>