<?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>sometimes the device wakes up immediately after calling sleep function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43173/sometimes-the-device-wakes-up-immediately-after-calling-sleep-function</link><description>Hi, 
 
 I am using the system off power down mode in my application to keep the device in sleep mode and it works most oif the time. but sometimes it will restart immediately after the deep sleep indication (led blink) and it will continue this process</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 Jan 2019 14:17:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43173/sometimes-the-device-wakes-up-immediately-after-calling-sleep-function" /><item><title>RE: sometimes the device wakes up immediately after calling sleep function</title><link>https://devzone.nordicsemi.com/thread/168894?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 14:17:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96948a27-c0de-414a-851f-9d6adabefd43</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You do not strictly need to do&amp;nbsp;anything other than configuring wakeup sources, though it is clean to uninitialize stuff first.&amp;nbsp; However, you must make sure that there are no active events on the GPIO ins used as sense, if so and they are not cleared, they will cause&amp;nbsp;an immediate wakeup. I suspect that is what you are seeing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes the device wakes up immediately after calling sleep function</title><link>https://devzone.nordicsemi.com/thread/168846?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 11:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b1bd24d-1a77-4e34-b052-39f4756ec243</guid><dc:creator>madblue</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for the update, my original code was actually like this. my function had a lot of commented things inside the actual code, when i cleaned and copy pasted, those lines got misplaced. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f611.svg" title="Expressionless"&gt;&amp;#x1f611;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;i want to know anything to be done in particular before calling the function sd_power_system_off(); ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sometimes the device wakes up immediately after calling sleep function</title><link>https://devzone.nordicsemi.com/thread/168800?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 08:41:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78602caa-3342-4491-9fa3-4e6c2d94e238</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This question might be obvious, but have you verified that there is no activity on either of the two wakeup pins which could cause the wakeup? Without knowing more about your code I would think rearranging your goto_deepsleep() to something like this would be more sensible:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void goto_deepsleep(void){
    enable_imu_power_down();
    uninit_timer();
    uninit_spi();
    
    uninit_i2c();

    nrf_gpio_cfg_sense_input(INT_PIN, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
    nrf_gpio_cfg_sense_input(17, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);

    sd_power_system_off();
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>