<?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>Sometime, the timer handler is not called with FreeRTOS.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37694/sometime-the-timer-handler-is-not-called-with-freertos</link><description>Sometime, the timer handler is not call immediately after calling app_timer_start(). 
 environment - nrf52840 - SDK 15 - with FreeRTOS - timer task priority is higher - timeout_ticks = 1 (app_timer_start) 
 mechanism (maybe) 1. Call app_timer_start(timeout_ticks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Sep 2018 01:10:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37694/sometime-the-timer-handler-is-not-called-with-freertos" /><item><title>RE: Sometime, the timer handler is not called with FreeRTOS.</title><link>https://devzone.nordicsemi.com/thread/146862?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 01:10:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82bcc6aa-1335-4e8f-9a74-9dc5a48f8e47</guid><dc:creator>masataka hasegawa</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;Thank you the advice.&lt;/p&gt;
&lt;p&gt;I think that there is active flag for the exclusive control of the timer start,&lt;br /&gt;And, I have modified to add &amp;quot;pinfo-&amp;gt;active = false&amp;quot; if RTOS API failed,&lt;br /&gt;But, I will consider about the minimum ticks of 5 ticks along your advice.&lt;/p&gt;
&lt;p&gt;Thank you.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometime, the timer handler is not called with FreeRTOS.</title><link>https://devzone.nordicsemi.com/thread/146740?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 11:21:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab74dac7-2c0d-4fc9-bf0b-aa41e3e6b740</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I have checked this with our FreeRTOS expert, and your findings makes sense. Unfortunately, this is a limitation with the library that is not well described in the documentation. In the app_timer library used for non-FreeRTOS application, there is a minimum ticks config of 5 ticks (&lt;span&gt;APP_TIMER_MIN_TIMEOUT_TICKS)&lt;/span&gt;. This limitation is also present in the FreeRTOS version of app_timer, but there is no check to make sure ticks are not set to a lower value than this in the implementation. I have added a bug report internally to get this added to future versions.&lt;/p&gt;
&lt;p&gt;Your workaround will most likely work in most cases, but it is not fail-safe. I would strongly recommend that you do not set the ticks value to anything lower than 5. If&amp;nbsp;the function app_timer_start fails, then setting the flag active = true before the function returns is not good.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometime, the timer handler is not called with FreeRTOS.</title><link>https://devzone.nordicsemi.com/thread/145627?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 08:38:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:829216b2-2329-4c59-ba8f-36b411087e29</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Ok, thanks for the clarification. I will check with our FreeRTOS expert as soon as&amp;nbsp;possible if your approach is correct, and if this should be considered a bug in the FreeRTOS app_timer implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometime, the timer handler is not called with FreeRTOS.</title><link>https://devzone.nordicsemi.com/thread/145602?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 06:50:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d35b2bd-c320-4aba-8eac-d8953307b460</guid><dc:creator>masataka hasegawa</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Sorry, This problem occurred our projects code.&lt;/p&gt;
&lt;p&gt;But,&amp;nbsp;I think that it will occur in theory.&lt;/p&gt;
&lt;p&gt;and,&amp;nbsp;After fixing it, the problem no longer occurred.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometime, the timer handler is not called with FreeRTOS.</title><link>https://devzone.nordicsemi.com/thread/145577?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 19:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2bff5f8-dd4b-4f61-9ecf-22ffe27b971e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you have any code/project or procedure that can be used to reproduce this behavior?&lt;/p&gt;
&lt;p&gt;You say &amp;quot;Sometime, the timer handler is not call immediately after calling app_timer_start()&amp;quot;, do you have any examples of when it is called and when it is not called?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>