<?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>nRF51: Sleeping a certain time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17986/nrf51-sleeping-a-certain-time</link><description>Hello, 
 my program should do the following: 
 
 Collect sensor data 
 Initialize SD and start advertising 
 After a timeout or after a successful data connection it should sleep for half an hour. 
 When waking up, it should start from the beginning</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Nov 2016 10:12:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17986/nrf51-sleeping-a-certain-time" /><item><title>RE: nRF51: Sleeping a certain time</title><link>https://devzone.nordicsemi.com/thread/69349?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2016 10:12:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:112f2fec-107d-4449-a408-5dddd0570c20</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should use a timer to set a periodical wakeup from sleep to collect and send sensor data. I would recommend that you take a look at the &lt;a href="https://devzone.nordicsemi.com/tutorials/19/"&gt;Application Timer Tutorial&lt;/a&gt;. The application timer module use &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=2_2_0_24#concept_rvn_vkj_sr"&gt;RTC&lt;/a&gt; instead of timers, which is more power efficient. You can also take a look at this &lt;a href="https://github.com/NordicSemiconductor/nRF52-ADC-examples/tree/master/saadc_low_power"&gt;nRF52 ADC example&lt;/a&gt;, where a RTC is setup for periodical capture of battery voltage.&lt;/p&gt;
&lt;p&gt;Notice that you can only use &lt;em&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=2_2_0_17_2#unique_752213511"&gt;system on sleep mode&lt;/a&gt;&lt;/em&gt;, when using timers. &lt;em&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=2_2_0_17_1#unique_863354678"&gt;System off sleep mode&lt;/a&gt;&lt;/em&gt; will disable all clock sources.&lt;/p&gt;
&lt;p&gt;An alterantive, which might be more power efficient, is to add an external ULP timer. You can then put the nRF device in &lt;em&gt;system off&lt;/em&gt; mode, &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=2_2_0_17_9_0#unique_1502638242"&gt;lowering the current consumption&lt;/a&gt; compared to &lt;em&gt;system on&lt;/em&gt; mode, and configure the device to wake on GPIO/GPIOTE. You can find some exampes of the different sleep modes &lt;a href="https://github.com/NordicSemiconductor/nrf51-powerdown-examples"&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Sleeping a certain time</title><link>https://devzone.nordicsemi.com/thread/69348?ContentTypeID=1</link><pubDate>Sat, 26 Nov 2016 21:56:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:548aa0f7-59a9-47c5-9ad1-5e577c827458</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Why not just use a timer ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>