<?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>Long Press to Wake-up</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20404/long-press-to-wake-up</link><description>Hello, 
 Is there any methods to implement the &amp;quot;long press wake-up&amp;quot;? Pressing the button for 3 seconds to let device enter sleep mode and pressing the same button for 3 seconds to wake it up. 
 Already defined the wake-up gpio in &amp;quot;sleep_mode_enter(</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Mar 2017 13:47:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20404/long-press-to-wake-up" /><item><title>RE: Long Press to Wake-up</title><link>https://devzone.nordicsemi.com/thread/79564?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 13:47:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db002250-4c2f-4799-90c6-2f80e5a8b8d1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;No you don&amp;#39;t need to stop advertising , why ? The device enter systemON mode with CPU when you call sd_app_evt_wait() inside power_manage(). When advertising, the CPU sleeps between the advertising interval, same applies when in connection, CPU sleeps most of the time, only wake up by a timer to do BLE tasks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Press to Wake-up</title><link>https://devzone.nordicsemi.com/thread/79563?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 09:55:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53c729ce-363e-4347-9ea2-ba600c371a25</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;Hi,
Does it mean I just need to stop advertising (if using beacon sample project) then the device will enter the systemON mode with CPU off?  Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Press to Wake-up</title><link>https://devzone.nordicsemi.com/thread/79562?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 08:30:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d64f341b-9a01-455a-958b-82620ca8dff4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You can simply put the CPU to sleep, by calling __WFE function. Please have refer to the main while loop in our rtc example in \examples\peripheral\rtc or if you use Softdevice, please use             power_manage() function as in the main loop of our ble examples.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Press to Wake-up</title><link>https://devzone.nordicsemi.com/thread/79561?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 07:35:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8e5243b-2dc9-403d-a036-9f0be64eac8d</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;Hello Hung Bui,
I got it, but how to let the system in system ON mode but CPU off? Thanks.&lt;/p&gt;
&lt;p&gt;Sara&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Press to Wake-up</title><link>https://devzone.nordicsemi.com/thread/79560?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2017 10:14:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b652d25e-06b4-4a57-b9b2-a89d9b660523</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Sara: as endnode wrote, you don&amp;#39;t have any timer when you are in SystemOFF so the chip won&amp;#39;t know if it&amp;#39;s a long press or not.
But if you put the systemON mode with CPU off, you can still keep the RTC running and detect if it&amp;#39;s a long press or not. SystemON+ RTC running may cost you some uA extra, should be less than 5uA as far as I recall.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Press to Wake-up</title><link>https://devzone.nordicsemi.com/thread/79559?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2017 10:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28c10487-3b25-4973-9380-c20a07fb03d3</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;Understood, thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long Press to Wake-up</title><link>https://devzone.nordicsemi.com/thread/79558?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2017 07:20:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10d56431-6c65-403b-ba77-c9d65f620d8e</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Hello Sara,&lt;/p&gt;
&lt;p&gt;If you mean SYSTEM OFF by your &amp;quot;sleep&amp;quot; then NO, the only wake-up mechanism in your situation is simple GPIOTE level change, there is no clock running in SYSTEM OFF so obviously you cannot detect &amp;quot;long&amp;quot; press. If you need it for user experience then you can of course fake it by going back to OFF mode if the GPIO line doesn&amp;#39;t hold &amp;quot;pressed&amp;quot; state long enough after nRF5x wakes up.&lt;/p&gt;
&lt;p&gt;CHeers Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>