<?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>App timer list gets corrupted with SDK 13 -&amp;gt; Dead lock</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45514/app-timer-list-gets-corrupted-with-sdk-13---dead-lock</link><description>Hello Nordic Team, 
 I have an application running on SDK 13.0 which uses the app_timer for some timeout handling and so does repeatedly call app_timer_start and app_timer_stop to handle the potential timeouts. 
 I now noticed, that in some uses cases</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 May 2019 17:11:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45514/app-timer-list-gets-corrupted-with-sdk-13---dead-lock" /><item><title>RE: App timer list gets corrupted with SDK 13 -&gt; Dead lock</title><link>https://devzone.nordicsemi.com/thread/189405?ContentTypeID=1</link><pubDate>Mon, 27 May 2019 17:11:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0ea3211-4ff1-4ea1-8086-7cceadfe7ef0</guid><dc:creator>TomKeddie</dc:creator><description>&lt;p&gt;I&amp;#39;m seeing something similar in app_timer2 see details at&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47742/app_timer2-timer-list-corruption-seen-on-rtc-overflow"&gt;devzone.nordicsemi.com/.../app_timer2-timer-list-corruption-seen-on-rtc-overflow&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App timer list gets corrupted with SDK 13 -&gt; Dead lock</title><link>https://devzone.nordicsemi.com/thread/179284?ContentTypeID=1</link><pubDate>Fri, 29 Mar 2019 15:08:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04b84506-3067-41d8-9b4d-a44c54402c62</guid><dc:creator>2PrintBeta</dc:creator><description>&lt;p&gt;I just changed my application to handle those timeouts differently which prevents this problem. &lt;/p&gt;
&lt;p&gt;Instead of starting and stopping the timers, i use a faster repeating timer and check variables to see if a command timedout. This completely prevents the problem and is a workung workaround for us.&lt;/p&gt;
&lt;p&gt;Nevertheless the underlying problem still persists and might cause serious issues for other users.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App timer list gets corrupted with SDK 13 -&gt; Dead lock</title><link>https://devzone.nordicsemi.com/thread/179187?ContentTypeID=1</link><pubDate>Fri, 29 Mar 2019 10:34:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbbf5dc6-f790-4a81-bf2e-2634caec59b3</guid><dc:creator>2PrintBeta</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not sure i understand correctly.&lt;/p&gt;
&lt;p&gt;To clarify what my application does:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My application currently sends some request over ble to another device. And it starts an app_timer to handle the timeout of this request. If the answer to this request arrives in time,the timer is stopped. If it does not, the timer handler gets called, which might place a new request and create another timeout timer.&amp;nbsp; The timers are all single-shot.&lt;/p&gt;
&lt;p&gt;Do you mean i should only start/stop the timers from the main loop via the app_scheduler ? Sounds very compilcated and might seriously change the timing if the system is loaded.&lt;/p&gt;
&lt;p&gt;Do you have an example ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App timer list gets corrupted with SDK 13 -&gt; Dead lock</title><link>https://devzone.nordicsemi.com/thread/179172?ContentTypeID=1</link><pubDate>Fri, 29 Mar 2019 09:57:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9d17811-6dd2-4e34-ae41-69814c020533</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see that we have an internal report of a similar issue that have not yet been resolved. A workaround that have been mentioned is to use &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-3-0/lib_scheduler"&gt;app_scheduler&lt;/a&gt; for the timer tasks, could you see if that solves your issue?&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><item><title>RE: App timer list gets corrupted with SDK 13 -&gt; Dead lock</title><link>https://devzone.nordicsemi.com/thread/179122?ContentTypeID=1</link><pubDate>Fri, 29 Mar 2019 07:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f951cebd-62f4-472a-916c-7231c34cc26e</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;This sounds similar to the issue I was having&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/40987/app_timer-hangs"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What I learned was that re-starting an app_timer that is already running might cause the code to hang. My fix was to add a check to app_timer_start if the app_timer instance is already running.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t checked SDK 15.3, but this one isn&amp;#39;t fixed in 15.2 or earlier.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>