<?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 expires instantly</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22004/timer-expires-instantly</link><description>Hi all, 
 I have seen a pair of questions ( this and this ) that I think have something to do with this, but didn&amp;#39;t find a solution. 
 I have a custom board with a button which acts as a reset button. This button must be pressed during 3 seconds to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 May 2017 15:03:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22004/timer-expires-instantly" /><item><title>RE: Timer expires instantly</title><link>https://devzone.nordicsemi.com/thread/86356?ContentTypeID=1</link><pubDate>Tue, 16 May 2017 15:03:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1f472db-ea70-4e79-9371-c0f1cae16c30</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I believe the bug should be resolved in our current SDK. Which SDK are you using ? If possible, please modify the stock SDK example, and only add the timer&amp;amp;reset button part, so we can test here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer expires instantly</title><link>https://devzone.nordicsemi.com/thread/86357?ContentTypeID=1</link><pubDate>Mon, 15 May 2017 09:09:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c57020c-e5d5-440d-8900-170027fa003c</guid><dc:creator>vea45</dc:creator><description>&lt;p&gt;I found also this problem and in some cases even using the dummy timer doesn&amp;#39;t work... Some months ago I found one answer in the forum proposing some modifications on the timer library to fix this. I have tested my code with those changes and now it seems to work better... I don&amp;#39;t know if the bug i solved with the new SDK 12.3.0.&lt;/p&gt;
&lt;p&gt;My modified timer library for sdk 12.2 is attached:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5238.app_5F00_timer.c"&gt;app_timer.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer expires instantly</title><link>https://devzone.nordicsemi.com/thread/86355?ContentTypeID=1</link><pubDate>Mon, 15 May 2017 08:48:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec3da778-d829-4c9e-98fd-3b63a4d6b598</guid><dc:creator>dblasco</dc:creator><description>&lt;p&gt;I have found that when no timer is executed within 256 seconds (with prescaler 0), when the next timer is executed it will be done immediately. This is the same as in &lt;a href="https://devzone.nordicsemi.com/question/50059/bug-one-shot-app_timer-misfires-at-256-seconds/?comment=50471#comment-50471"&gt;this question&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To solve this I have created a dummy timer that does nothing but is executed repetadly at 256-1 seconds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer expires instantly</title><link>https://devzone.nordicsemi.com/thread/86354?ContentTypeID=1</link><pubDate>Mon, 15 May 2017 08:45:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:394f1335-677a-44ee-bd7f-b187b8832301</guid><dc:creator>dblasco</dc:creator><description>&lt;p&gt;Sorry, I am not allowed to attach the whole code. If you wait for 5 minutes (it does not matter if you have already reset) when you press the button it will reset immediately.
I have found a solution which I am typing right now here, although it is more a trick.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer expires instantly</title><link>https://devzone.nordicsemi.com/thread/86353?ContentTypeID=1</link><pubDate>Mon, 15 May 2017 07:24:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a16b397-597a-4c5a-8720-16ebf580c2ce</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Dblasco,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see anything wrong with your code. Could you edit the question and attach your project ?&lt;/p&gt;
&lt;p&gt;You meant if you just wait for 5 minute then press the button, it will reset immediately ? Or you have to press the button for 3 seconds first, let it resets, and then wait for 5 minutes then the issue happens ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>