<?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>How to set a 12-hour timer in S110</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13920/how-to-set-a-12-hour-timer-in-s110</link><description>Hello, 
 [Device: nRF18522 S110 Softdevice 8.0.0 SDK10] 
 I&amp;#39;ve referred to this post: 
 
 devzone.nordicsemi.com/.../ 
 
 Does it mean the maximum value is 512 seconds for prescaler of 0? 
 However, I want to set a 12-hour timer to monitor battery</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 May 2016 06:46:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13920/how-to-set-a-12-hour-timer-in-s110" /><item><title>RE: How to set a 12-hour timer in S110</title><link>https://devzone.nordicsemi.com/thread/53211?ContentTypeID=1</link><pubDate>Thu, 19 May 2016 06:46:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fe47c1f-73e2-4c88-9a56-48742300c292</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;I found the bug which I forgot to change the predefined &amp;quot;prescalar&amp;quot; value. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a 12-hour timer in S110</title><link>https://devzone.nordicsemi.com/thread/53207?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 08:47:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77faaca8-8d70-458a-9840-546839714fdc</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;Hello,
I used &amp;quot;app_timer.c&amp;quot; library and set --&amp;gt;
#define BATTERY_LEVEL_MEAS_INTERVAL     APP_TIMER_TICKS(30000, 255)
using prescalar 2^8-1, and tried to set 30 secs counter&lt;/p&gt;
&lt;p&gt;But it&amp;#39;s failed. Could you give me some advice? thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a 12-hour timer in S110</title><link>https://devzone.nordicsemi.com/thread/53210?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 05:49:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6649c8af-aeb8-4e0f-a4c4-e9f3d4b7b451</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;OK, I&amp;#39;ll study RTC as well, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a 12-hour timer in S110</title><link>https://devzone.nordicsemi.com/thread/53209?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 03:55:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06ab487b-e515-49e4-9458-a4323ba404da</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;yes, 125ms, but if you care about 12 hours, hardly matters.&lt;/p&gt;
&lt;p&gt;higher power, yes but not much, you&amp;#39;re waking up 84 times instead of once, counting plus one and going back to sleep again. Just choose the value of prescalar which works for all the timers you need in your app and use that. Or don&amp;#39;t even bother with app_timer and just start the RTC with a counter value you want, enable the interrupt and go to sleep.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a 12-hour timer in S110</title><link>https://devzone.nordicsemi.com/thread/53208?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 03:52:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb7023c7-4d4a-4ad2-9c76-4cb7909085ed</guid><dc:creator>sara</dc:creator><description>&lt;p&gt;Hello RK,&lt;/p&gt;
&lt;p&gt;The timer I can set from 126 ms to 582.542 hours if the prescalar is (2^12-1), but the counter resolution is down to 125ms. Is it correct?&lt;/p&gt;
&lt;p&gt;Another question is that does the latest method you provided has higher power consumption?&lt;/p&gt;
&lt;p&gt;Thanks again,
Sara&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a 12-hour timer in S110</title><link>https://devzone.nordicsemi.com/thread/53206?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 03:25:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08fe9b6f-31cb-49e2-8ea7-b6091a4266b6</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Yes the max value is about 512 seconds for a prescalar of zero, because the timer counts to 2^24 at 32,768Hz and 2^24/32,768 = 512.&lt;/p&gt;
&lt;p&gt;If you want longer, don&amp;#39;t use a prescalar of zero.&lt;/p&gt;
&lt;p&gt;As usual this is in the nRF51 reference manual, section 19.1.2 which gives you the max times for various prescalars. It goes all the way up to 582.542 hours, or just over 24 days.&lt;/p&gt;
&lt;p&gt;Or you could just wake up every 512 seconds and count 1 until you reach 12x60x60/512 = 84 and a bit, then you have 12 hours.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>