<?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>GPIO wakeup from System ON sleep</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89214/gpio-wakeup-from-system-on-sleep</link><description>Hi, 
 I&amp;#39;m currenty try to code GPIO wakeup from System ON sleep with system_on_wakeup_on_gpio as a reference. 
 My circuit is powerd by solar panel via control board. In this design P0_04 on nRF52832 receives the PWR_GOOD signal. 
 I would like to keep</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jun 2022 10:47:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89214/gpio-wakeup-from-system-on-sleep" /><item><title>RE: GPIO wakeup from System ON sleep</title><link>https://devzone.nordicsemi.com/thread/373896?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2022 10:47:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0f3ab4d-cf21-422c-b18a-cd23de1bc105</guid><dc:creator>tyro01</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I found a way to use System OFF sleep, which consumes less power than System ON sleep, so I decided to use your suggestion.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define PIN_PWR_GOOD 4

void PWR_GOOD_wait_sysOFF(void)
{
    nrf_gpio_cfg_sense_input(PIN_PWR_GOOD, NRF_GPIO_PIN_PULLDOWN, NRF_GPIO_PIN_SENSE_HIGH);

    // Enter system OFF. After wakeup the chip will be reset, and code execution will run from the top 
    NRF_POWER-&amp;gt;SYSTEMOFF = 1;
    
    for(;;){}
}

int main(void)
{
    nrf_gpio_cfg_input(PIN_PWR_GOOD, NRF_GPIO_PIN_PULLDOWN);
    
    if (nrf_gpio_pin_read(PIN_PWR_GOOD) == 0)
    {
        PWR_GOOD_wait_sysOFF();
    }
    ...
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thank you&amp;nbsp;for your advice.&lt;/p&gt;
&lt;p&gt;tyro&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO wakeup from System ON sleep</title><link>https://devzone.nordicsemi.com/thread/373803?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2022 03:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0992ff29-0ab9-4b72-a863-a4472baa884c</guid><dc:creator>tyro01</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I can see your advice.&amp;nbsp;I will try to return from the System ON sleep mode I originally planned. I will consider your proposal as well.&amp;nbsp;&lt;span style="font-family:inherit;"&gt;I&amp;#39;m currently out. &lt;/span&gt;&lt;span style="font-family:inherit;"&gt;Please give me some time.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO wakeup from System ON sleep</title><link>https://devzone.nordicsemi.com/thread/373678?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2022 12:10:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:958341cd-b9a2-45de-a2e6-1bb879adfff0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;To wake-up from System ON mode (entered when you call __WFE) you need to configure the pin to trigger an interrupt. Here you have only configured the pin with sense enabled without configuration the GPIOTE interrupt. You can however use this configuration to wake the chip from&amp;nbsp; &lt;span&gt;&lt;a title="System OFF mode" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_1#unique_2047546596"&gt;System OFF mode&lt;/a&gt;&lt;/span&gt;. If this is what you want, then you can replace &amp;nbsp; __WFE();__SEV();__WFE(); with NRF_POWER-&amp;gt;SYSTEMOFF=1.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>