<?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_timer2 issue with operations queued in interrupt context</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93590/app_timer2-issue-with-operations-queued-in-interrupt-context</link><description>Hello, I encountered an issue with the app_timer2 library (SDK 16.0 and 17.1) : in some cases the timers won&amp;#39;t be executed in the correct order and delay. The problem happens when timer operations are queued in a particular order in an interrupt context</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Nov 2022 06:54:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93590/app_timer2-issue-with-operations-queued-in-interrupt-context" /><item><title>RE: app_timer2 issue with operations queued in interrupt context</title><link>https://devzone.nordicsemi.com/thread/395225?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2022 06:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3958adb-1c9c-43da-a44d-28d8c20ce468</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Guillaume&lt;/p&gt;
&lt;p&gt;Absolutely &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I wish you the best of luck with your project, hopefully you can find a satisfactory workaround.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer2 issue with operations queued in interrupt context</title><link>https://devzone.nordicsemi.com/thread/395165?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2022 15:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bec06a61-a423-427c-a723-7030b6eaac31</guid><dc:creator>Guillaume76</dc:creator><description>&lt;p&gt;Hi Torbjorn, &lt;br /&gt;&lt;br /&gt;Ok, well at least this thread will perhaps help a bit other developers using the old sdk.&lt;br /&gt;&lt;br /&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer2 issue with operations queued in interrupt context</title><link>https://devzone.nordicsemi.com/thread/394586?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 07:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07b64fd7-d75a-49ea-a2d7-084d6c07872a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Guillaume&lt;/p&gt;
&lt;p&gt;I can report it, but I doubt there will be any more changes to this library unless a critical bug is found.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Several years ago we transitioned to a new software platform called the nRF Connect SDK, and the nRF5 SDK is now in maintenance mode only. This means we are not adding new features to the nRF5 SDK anymore, and will not issue any updates unless absolutely necessary.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer2 issue with operations queued in interrupt context</title><link>https://devzone.nordicsemi.com/thread/394464?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 14:21:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34796160-2f6a-44b9-ab1c-c69d8f99d36c</guid><dc:creator>Guillaume76</dc:creator><description>&lt;p&gt;Hello Torbjorn, &lt;br /&gt;Thanks for your reply. &lt;br /&gt;Yes it works fine if we schedule operations only in interrupts with lower priority (timer operation are processed directly). But I think the documentation should explain in more detail what can and cannot be done. That&amp;#39;s not obvious because the point of having an operation queue in this library is to be able to process operations later.&lt;br /&gt;The information I found regarding this case are some comments in the code. But it actually suggests that it works ok in the end which is not always the case given my example above. &lt;br /&gt;&lt;img style="max-height:107px;max-width:428px;" height="107" src="https://devzone.nordicsemi.com/resized-image/__size/856x214/__key/communityserver-discussions-components-files/4/pastedimage1667831109124v1.png" width="428" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Do you plan to rework this libray ? As I suggested storing the next delay and apply it when the operation is processed seems to work. &lt;br /&gt;&lt;br /&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_timer2 issue with operations queued in interrupt context</title><link>https://devzone.nordicsemi.com/thread/394436?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 13:22:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aebd8427-8a5a-441c-afed-fe713b620fb8</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Guillaume&lt;/p&gt;
&lt;p&gt;I discussed this with one of the developers, and apparently this is a known limitation in the app_timer2 implementation.&amp;nbsp;If you start or stop timers from a high priority interrupt it can cause issues.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you make sure to only schedule app timer operations from the same or lower priority as the RTC interrupt it should work fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>