<?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>System &amp;quot;always&amp;quot; wakes up from SYSTEM OFF Mode due to GPIO no matter what setting it is?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63796/system-always-wakes-up-from-system-off-mode-due-to-gpio-no-matter-what-setting-it-is</link><description>Dear Nordic, 
 
 I am using nRF52832-XXAB, SDK 15 
 I am aware that in order to enter SYSTEM OFF Mode and woke up by an GPIO event, 
 I have to set &amp;quot;nrf_gpio_cfg_sense_input(PIN_NUMBER, PULL_STATUS, SENSE_STATUS)&amp;quot; before calling NRF_POWER-&amp;gt;SYSTEMOFF </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Jul 2020 12:44:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63796/system-always-wakes-up-from-system-off-mode-due-to-gpio-no-matter-what-setting-it-is" /><item><title>RE: System "always" wakes up from SYSTEM OFF Mode due to GPIO no matter what setting it is?</title><link>https://devzone.nordicsemi.com/thread/260367?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 12:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abadcfce-a9ff-4566-b914-9f14998037d9</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Is it possible for me to reproduce this on a DK? If so, can you zip a project folder containing a project that I can compile in an unmodified SDK and reproduce the issue?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: System "always" wakes up from SYSTEM OFF Mode due to GPIO no matter what setting it is?</title><link>https://devzone.nordicsemi.com/thread/260255?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 01:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e98f9f20-0fea-4d25-a8c0-7e0842439216</guid><dc:creator>APU</dc:creator><description>&lt;p&gt;Dear Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am sure that this button pin only being configured as a GPIOTE when system boot up, and is uninitialized with&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_drv_gpiote_in_uninit(BTN_PIN)&lt;/pre&gt;&amp;nbsp;before executing the pre-system off function.&lt;/p&gt;
&lt;p&gt;I followed your instructions using&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gpio_cfg_sense_input(BTN_PIN, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Other than that, I set default all the pins from 2 to 31 using&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gpio_cfg_default(PIN)&lt;/pre&gt;&amp;nbsp;before entering SYSTEM OFF Mode, except P0.00 and P0.01 are for 32.768kHz crystal and I keep four LED pins as output and turn them off using&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gpio_pin_clear(PIN)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I do have a pair of UART TX/RX set when system boot up, but it wasn&amp;#39;t physically connect to any device.&lt;/p&gt;
&lt;p&gt;Besides, I tried set them with&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gpio_cfg_input(TX, NRF_GPIO_PIN_PULLUP)
nrf_gpio_cfg_input(RX, NRF_GPIO_PIN_PULLUP)&lt;/pre&gt;&amp;nbsp;and&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gpio_cfg_default(TX)
nrf_gpio_cfg_default(RX)&lt;/pre&gt;respectively before entering SYSTEM OFF Mode, but doesn&amp;#39;t seem to have any impact to the question.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Another phenomenon that kind of tells only the BTN_PIN is causing the system to instantly boot up is that if I remove&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gpio_cfg_sense_input(BTN_PIN, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW)&lt;/pre&gt;, then the system won&amp;#39;t wake up anymore after entering SYSTEM OFF Mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: System "always" wakes up from SYSTEM OFF Mode due to GPIO no matter what setting it is?</title><link>https://devzone.nordicsemi.com/thread/260218?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 16:44:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9075433c-a3c3-45e2-87cf-30b26e275c31</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;In my case, I want my system enters SYSTEM OFF due to a button being pressed for 10 seconds.&lt;/p&gt;
&lt;p&gt;That button is at low level when being pressed and at high level in other times.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Based on this, you should set pullup and NRF_GPIO_PIN_SENSE_LOW.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you configure this pin to be anything else in your application as well? Perhaps you set it to be NRF_GPIO_SENSE_HIGH somewhere else in your application, which then wakes up the chip when the button is released? Or perhaps another pin is set to sense something, and this pin receives a pulse that wakes the chip up?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]4. nrf_gpio_cfg_sense_input(BTN_PIN, NRF_GPIO_PIN_PULLDOWN, NRF_GPIO_PIN_SENSE_HIGH)--&amp;gt;Cannot boot, no matter how hard I press the button[/quote]
&lt;p&gt;&amp;nbsp;That is because the button is pulled low (so it is low when the button is not pressed), and you press the button, which will set it even harder low (the same really). There is no physical change on the pin.&lt;/p&gt;
&lt;p&gt;Check your other pins, if they receive any pulses that may wake it up. E.g. if you use UART or any other peripheral using any input pins, if these pins are not disconnected before you go to system off, they may wake the chip as well.&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>