<?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>button interrupt with long push</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21723/button-interrupt-with-long-push</link><description>Hello,
I am using nrf52832 custom board, with SDK 11.0.0 and s132_nrf52_2.0.0, and trying to create an interrupt event on wake up from system off by pressing BSP_BUTTON_0 (only one button available).
Following the nrf51-powerdown examples ( github.com</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 May 2017 15:04:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21723/button-interrupt-with-long-push" /><item><title>RE: button interrupt with long push</title><link>https://devzone.nordicsemi.com/thread/85340?ContentTypeID=1</link><pubDate>Mon, 08 May 2017 15:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4dfbcf7-0f12-4bef-a0cf-ca5f423f7e05</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I believe is expected, if you start calling commands like that the chip will put into debug mode, the CPU will be halted (which the SoftDevice doesn&amp;#39;t like) and so on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button interrupt with long push</title><link>https://devzone.nordicsemi.com/thread/85341?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 19:56:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09614557-5b13-4920-b307-37444ffe6af9</guid><dc:creator>Sal</dc:creator><description>&lt;p&gt;Thanks so much Petter! I used the gpio call to check the pin I am using (nrf_gpio_pin_read).&lt;br /&gt;
Also when I was reading the registers with nrfjprog utility, noticed that the board resets (for both registers). Here are the commands I used:
nrfjprog -f NRF52 --memrd 0x50000510&lt;/p&gt;
&lt;p&gt;Is this expected?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button interrupt with long push</title><link>https://devzone.nordicsemi.com/thread/85339?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 10:24:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91de3d28-cfac-4093-b493-d184cae5e2ca</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I can&amp;#39;t see how that is possible, as GPIOTE only creates events on transitions, but you could simply read the state of the pin on wakeup? The IN or LATCH(nRF52) register?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button interrupt with long push</title><link>https://devzone.nordicsemi.com/thread/85338?ContentTypeID=1</link><pubDate>Tue, 02 May 2017 19:59:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4216adf-95c8-4996-aba0-63b8b5bc3636</guid><dc:creator>Sal</dc:creator><description>&lt;p&gt;Thank you for your comment Petter. Yes I am aware that reset (wakeup mechanism) is the only functionality when the system is in the deep power saving mode.
My question is with button state detection. I have the button_0 setup to wake up the device fine. But trying to use the same button in the already &amp;quot;pressed state&amp;quot; to get a notification, and not a state transition from low to high.&lt;/p&gt;
&lt;p&gt;I am wondering if it is possible with only a long press and not a second press: user only has to hold the button to have the chip go through reset, and on wake up application detects the button is in &amp;quot;pressed state&amp;quot; so triggers a notification.&lt;/p&gt;
&lt;p&gt;Currently in my code I am using bsp_init call and in bsp_event_handler I get BSP_EVENT_KEY_0 even when the button is pressed (state change) but if I use the app_button_init call similar to the &amp;quot;way 2&amp;quot; suggested in the post below, would I be able to detect the button state (APP_BUTTON_PUSH/APP_BUTTON_RELEASE) to trigger an event or this would still need a state transition to work?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/68412/recording-time-for-which-the-button-is-pressed/#68415"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Many thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button interrupt with long push</title><link>https://devzone.nordicsemi.com/thread/85337?ContentTypeID=1</link><pubDate>Tue, 02 May 2017 13:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69fee351-f4db-4723-a28a-36cbc323bf07</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Are you aware that when the system wakes up from system OFF mode, it gets reset? I&amp;#39;m not sure what you are trying to achieve with this, but you will have to configure the GPIOTE in your startup routine, and then try to catch the low to high transition on the pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>