<?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>Sleep on long button press wakes up automatically</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16100/sleep-on-long-button-press-wakes-up-automatically</link><description>Hi 
 Using an nRF52832 and SDK11, I have the following issue: 
 I want to use button 0 with a regular push for functionality and a long press to go to sleep. The detection of long and short pushes work, and the button is configured to cause a wakeup</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Sep 2016 06:39:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16100/sleep-on-long-button-press-wakes-up-automatically" /><item><title>RE: Sleep on long button press wakes up automatically</title><link>https://devzone.nordicsemi.com/thread/61397?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2016 06:39:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad48987d-6752-440e-82f4-9b9d264c1977</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Quote from Product spec, you are right, DETECT is level triggered not edge trigged, my bad, thanks for correcting&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When the correct level is detected on
any such configured pin, the sense
mechanism will set the DETECT signal
high. Each pin has a separate DETECT
signal, and the default behaviour, as
defined by the DETECTMODE register, is
that the DETECT signal from all pins
in the GPIO Port are combined into a
common DETECT signal that is routed
throughout the system&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sleep on long button press wakes up automatically</title><link>https://devzone.nordicsemi.com/thread/61396?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 08:04:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb4197f8-e8ec-4760-8c1e-8cac1db55c3e</guid><dc:creator>bds</dc:creator><description>&lt;p&gt;BTW serveral other responses on this board seem to indicate that wakeup is always level triggered and not edge triggered. Can you verify this Aryan?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sleep on long button press wakes up automatically</title><link>https://devzone.nordicsemi.com/thread/61395?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 16:01:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee0f631b-2ec8-48f2-be7e-bc7c27970626</guid><dc:creator>bds</dc:creator><description>&lt;p&gt;I have exactly the same problem.
Reproducing the problem:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;default ble_app_uart example code from ble peripheral example&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;change:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;define BTN_ACTION_SLEEP          BSP_BUTTON_ACTION_RELEASE&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;define BTN_ACTION_SLEEP          BSP_BUTTON_ACTION_LONG_PUSH&lt;/p&gt;
&lt;p&gt;in bsp_btn_ble_c&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;sd_power_system_off() does not seem to work anymore (advertising indication LED stays blinking)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sleep on long button press wakes up automatically</title><link>https://devzone.nordicsemi.com/thread/61394?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 10:45:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70829d39-f07c-4eda-8fb8-9431d1bfedf8</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;how are you verifying that the system is waking? can you attach your project as you are testing this on development kit, it will be easy for me to test and see what else is going on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sleep on long button press wakes up automatically</title><link>https://devzone.nordicsemi.com/thread/61393?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 10:17:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4042b94c-853e-4dd8-ad1a-696f7c262add</guid><dc:creator>Eddie</dc:creator><description>&lt;p&gt;It makes sense that it would only wakeup at an edge. So I&amp;#39;m at a loss why it is powering back up right away in my case. I&amp;#39;m using the development kit with the first button. I&amp;#39;ve even tried a different button and different boards. Is there a way to check why it is waking up?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sleep on long button press wakes up automatically</title><link>https://devzone.nordicsemi.com/thread/61392?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 09:11:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb5f4a01-f038-424a-82cf-a7db0d113fa0</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The button handler which uses GPIOTE driver underneath is configured to wakeup only at any edge , that is rising or falling edge of button input. So as long you are not releasing the buttin it should be asleep as the GPIOTE is not level trigerred. I tried you example it worked perfectly OK for me, i mean after the long press, the system went to system_off stayed there until i released the button.&lt;/p&gt;
&lt;p&gt;Note that in debug mode you cannot know that the device went to system off or not (check the Emulated system off mode that works in debug mode).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>