<?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>sd_app_evt_wait() and hardware interrupts</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7255/sd_app_evt_wait-and-hardware-interrupts</link><description>Hello, 
 I&amp;#39;m developing on a nrf51822 with the S110 softdevice.
To save power, I use the sd_app_evt_wait() function to go into sleep mode.
To wake up, i want to use an gpiote interrupt, from an external accelerometer.
But it seems, that the chip doesn</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 May 2015 14:16:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7255/sd_app_evt_wait-and-hardware-interrupts" /><item><title>RE: sd_app_evt_wait() and hardware interrupts</title><link>https://devzone.nordicsemi.com/thread/25643?ContentTypeID=1</link><pubDate>Mon, 25 May 2015 14:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82b0bd3b-71d8-472b-91c5-f8cae029ceb5</guid><dc:creator>Jonathan</dc:creator><description>&lt;p&gt;You are the best! Thumbs up!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() and hardware interrupts</title><link>https://devzone.nordicsemi.com/thread/25645?ContentTypeID=1</link><pubDate>Mon, 25 May 2015 14:14:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:061b5ece-204b-470e-bab1-1a4735b7b6e1</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;added the code from bsp.c which sets up buttons ready for wakeup just before sleeping. Sense is one of the things you can set the GPIO to do, ie it senses when the level changes and causes a GPIO event which causes the chip to wake.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() and hardware interrupts</title><link>https://devzone.nordicsemi.com/thread/25644?ContentTypeID=1</link><pubDate>Mon, 25 May 2015 14:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3af1d638-0d37-4a13-aa8e-841ce5d09344</guid><dc:creator>Jonathan</dc:creator><description>&lt;p&gt;Great advise. Could you explain in short what &amp;quot;sense&amp;quot; does mean. I knew that you could configure the inputs with sense, but couldn&amp;#39;t find out what the difference is to no sense.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait() and hardware interrupts</title><link>https://devzone.nordicsemi.com/thread/25642?ContentTypeID=1</link><pubDate>Mon, 25 May 2015 13:30:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e42507f-6292-48db-bfed-59676264b621</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;No it doesn&amp;#39;t use a timer - not the one I&amp;#39;m looking at. As long as you enable the GPIO to &amp;#39;sense&amp;#39; they will wake up the chip. That works just as well from an external source, as long as it toggles the value on a pin set to sense, the chip will wake.&lt;/p&gt;
&lt;p&gt;Added in the code from bsp.c which sets the buttons up for sensing for wake&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t bsp_wakeup_buttons_set(uint32_t wakeup_buttons)
{
#if (BUTTONS_NUMBER &amp;gt; 0) &amp;amp;&amp;amp; !defined(BSP_SIMPLE)
    for (uint32_t i = 0; i &amp;lt; BUTTONS_NUMBER; i++)
    {
        uint32_t new_cnf = NRF_GPIO-&amp;gt;PIN_CNF[m_buttons_list[i]];
        uint32_t new_sense = ((1 &amp;lt;&amp;lt; i) &amp;amp; wakeup_buttons) ? GPIO_PIN_CNF_SENSE_Low : GPIO_PIN_CNF_SENSE_Disabled;
        new_cnf &amp;amp;= ~GPIO_PIN_CNF_SENSE_Msk;
        new_cnf |= (new_sense &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos);
        NRF_GPIO-&amp;gt;PIN_CNF[m_buttons_list[i]] = new_cnf;
    }
    return NRF_SUCCESS;
#else
    return NRF_ERROR_NOT_SUPPORTED;  
#endif
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>