<?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>Timer for 8 hours - NRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17665/timer-for-8-hours---nrf52</link><description>I need to turn off a GPIO after 8 hours of it being triggered.
I was reading about changing the prescaler to allot for 8 hours. I did the calculations and came up with a prescaler of 56 which would give me just over 8 hours max time (8.106 hrs). 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Nov 2016 17:38:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17665/timer-for-8-hours---nrf52" /><item><title>RE: Timer for 8 hours - NRF52</title><link>https://devzone.nordicsemi.com/thread/67960?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2016 17:38:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba96d8ed-ba25-4e45-8742-32d021939dc3</guid><dc:creator>Bryan H</dc:creator><description>&lt;p&gt;Thank you to both that answered.
I added another timer that I start when I need it that triggers every 1 minute. When the timer triggers, it increments a variable. I then check to see if the variable is 480 (8*60) and then it shuts off the GPIO.
I can&amp;#39;t believe that I didn&amp;#39;t think of doing this myself. Sometimes, I make things more complicated than they need to be.
Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer for 8 hours - NRF52</title><link>https://devzone.nordicsemi.com/thread/67961?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2016 09:27:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a3bad5b-e948-4663-8b97-3021cbb06372</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;Well you could just create a simple variable, lets say &lt;code&gt;uint32_t timer_irq_qounter;&lt;/code&gt; and then just increment it every time your irq happens. So if you are having lets say 25ms timer for controlling lcd, and you want to turn off gpio pin after 8 hours, you then just count until timer_irq_counter reaches the value 8&lt;em&gt;60&lt;/em&gt;60*40 = 1152000. So you will know that your timer for lcd control has fired an interrupt 1152000 times, you will know that it is about 8 hours. It probably will not be this value exactly, because timer irq can be delayed by higher priority softdevice tasks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer for 8 hours - NRF52</title><link>https://devzone.nordicsemi.com/thread/67959?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 22:44:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8343e7c-2290-46c5-b207-3b6ed53afbe4</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Set your timer to give some suitable &amp;quot;tick&amp;quot; interval, and just count the number of &amp;quot;ticks&amp;quot; that correspond to 8 hours.&lt;/p&gt;
&lt;p&gt;Just like a real clock ticks at, say, once per second.&lt;/p&gt;
&lt;p&gt;It counts 60 of these ticks to get minutes.&lt;/p&gt;
&lt;p&gt;It counts 60 minutes to get hours.&lt;/p&gt;
&lt;p&gt;It counts 24 hours to get days.&lt;/p&gt;
&lt;p&gt;etc, etc, ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>