<?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>No wake up after LPCOMP set in SYSTEM OFF nrf52 SDK12.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18144/no-wake-up-after-lpcomp-set-in-system-off-nrf52-sdk12-1</link><description>Hi, 
 Im trying to wake up from SYSTEM OFF using LPCOMP. 
 Im using the following code to power off: 
 nrf_drv_lpcomp_config_t config = NRF_DRV_LPCONF_DEFAULT_CONFIG;
config.hal.detection=1;
config.hal.reference=1;
config.input = NRF_LPCOMP_INPUT_2;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Dec 2016 20:06:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18144/no-wake-up-after-lpcomp-set-in-system-off-nrf52-sdk12-1" /><item><title>RE: No wake up after LPCOMP set in SYSTEM OFF nrf52 SDK12.1</title><link>https://devzone.nordicsemi.com/thread/70021?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2016 20:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e033c59d-ba7a-49ee-a292-4236b10124be</guid><dc:creator>Sergy</dc:creator><description>&lt;p&gt;Thanks very much Sigurd, that was the problem indeed!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No wake up after LPCOMP set in SYSTEM OFF nrf52 SDK12.1</title><link>https://devzone.nordicsemi.com/thread/70020?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 15:06:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7db0370-c8de-4843-bba6-7e20dc6f4f4b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Before going to System OFF mode, you will need to wait for the LPCOMP to be ready. In the product specification its stated that:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;After a start-up time of t_LPCOMP,STARTUP the LPCOMP will generate a READY event to indicate
that the comparator is ready to use and the output of the LPCOMP is correct
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So change your code to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_lpcomp_config_t config = NRF_DRV_LPCONF_DEFAULT_CONFIG;
config.hal.detection=1;
config.hal.reference=1;
config.input = NRF_LPCOMP_INPUT_2;
// initialize LPCOMP driver, from this point LPCOMP will be active and provided
// event handler will be executed when defined action is detected
err_code = nrf_drv_lpcomp_init(&amp;amp;config, wakeUp);
APP_ERROR_CHECK(err_code);
nrf_drv_lpcomp_enable();
while(NRF_LPCOMP-&amp;gt;EVENTS_READY == 0);
NRF_LPCOMP-&amp;gt;EVENTS_READY = 0;
sd_power_system_off();
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No wake up after LPCOMP set in SYSTEM OFF nrf52 SDK12.1</title><link>https://devzone.nordicsemi.com/thread/70019?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 12:29:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1917791f-1e4a-4aa7-8524-3f08cfa1cca4</guid><dc:creator>Sergy</dc:creator><description>&lt;p&gt;I have NRF_LOG printouts and also a buzzer to indicate that the system is startup. Basically it doesnt startup again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No wake up after LPCOMP set in SYSTEM OFF nrf52 SDK12.1</title><link>https://devzone.nordicsemi.com/thread/70018?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 12:25:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13f99fae-2b2e-436c-b4ff-0226fa7d88bd</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;How are you detecting that the wake up is triggered/not triggered? When the system wakes up from System OFF mode, it gets reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>