<?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>simple timer?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32843/simple-timer</link><description>Hi, I need a simple timer that interrupts every second. I&amp;#39;m trying to use the code from the sleep timer, but it isn&amp;#39;t working. this device is the PRX, so i don&amp;#39;t want it go to sleep. what am i getting wrong? Thanks! Mahesh 
 
 
 void mcu_init(void) {</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Mar 2017 15:37:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32843/simple-timer" /><item><title>RE: simple timer?</title><link>https://devzone.nordicsemi.com/thread/126252?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2017 15:37:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b8bbd87-0a24-4bdb-a64a-a39e9dcaf24f</guid><dc:creator>mr_creosote</dc:creator><description>thanks! have a good weekend. regards, mahesh&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: simple timer?</title><link>https://devzone.nordicsemi.com/thread/126251?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2017 09:25:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5b2f912-f3ec-4de6-997b-ccac2dd333aa</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Feel free to comment out the PWRDWN calls, the timer interrupt will fire in any case.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: simple timer?</title><link>https://devzone.nordicsemi.com/thread/126250?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2017 14:11:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4292da8-c2b7-4fb9-82d1-c4984efc3ace</guid><dc:creator>mr_creosote</dc:creator><description>&lt;p&gt;Hi, I just need a timer -- i don&amp;#39;t want the device to go to sleep. Is there a way to do that? Thanks! Mahesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: simple timer?</title><link>https://devzone.nordicsemi.com/thread/126249?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2017 09:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ed0015a-df39-4383-84c0-c9c99a6b7170</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I think you can take a look at this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.nordicsemi.com/eng/Nordic-FAQ/All/How-to-setup-register-retention-mode-timer-on-on-the-nRF24LE1" target="_blank"&gt;http://www.nordicsemi.com/eng/Nordic-FAQ/All/How-to-setup-register-retention-mode-timer-on-on-the-nRF24LE1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The reason there is a &amp;quot;double&amp;quot; PWRDWN call in the while(1)-loop as shown below, is because the system will wakeup 1.5ms prior to the actual RTC wakeup tick. The system does so to startup the 16MHz crystal, to make sure the 16MHz crystal is running by the time the RTC wakeup tick&amp;nbsp;occurs.&amp;nbsp;During this 1.5ms period&amp;nbsp;the CPU can go to standby to save current until the RTC wakeup tick occurs (another approach would be to use a flag in the whiel loop, and wait until the flag has been cleared in the RTC wakeup tick.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;// Register retention mode&lt;/p&gt;
&lt;p&gt;PWRDWN = 0x04;&lt;/p&gt;
&lt;p&gt;// Standby mode (wait for interrupt)&lt;/p&gt;
&lt;p&gt;PWRDWN = 0x07;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>