<?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>Multiple application timer instances or multiple counters in one instance, what is the best way?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48088/multiple-application-timer-instances-or-multiple-counters-in-one-instance-what-is-the-best-way</link><description>Let suppose using the dynamic multiprotocol ZigBee + Softdevice application with OTA upgrade possibility. I would like to use the app_timer (along with app_scheduler) to trigger some actions every 1ms, 20ms, 100ms, and 3s. Is it right, if I will use separate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Jun 2019 08:29:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48088/multiple-application-timer-instances-or-multiple-counters-in-one-instance-what-is-the-best-way" /><item><title>RE: Multiple application timer instances or multiple counters in one instance, what is the best way?</title><link>https://devzone.nordicsemi.com/thread/190999?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 08:29:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e28991c6-94e2-4318-9713-a7aeffe47089</guid><dc:creator>AnnaR</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The time resolution of RTC1 is okay for my task as for 1ms trigger, and others, that have no strict time precision requirements so even up to 1 ms deviations are acceptable for 20ms, 100ms, and 3s triggers.&lt;/p&gt;
&lt;p&gt;Also, I use app scheduler mode in order to spend less time in the interrupt handler, that can lead to some little additional delays in trigger function actual call, but it is also okay even for 1ms, I believe. However, I wondered, what if all 4 trigger functions will be scheduled in queue simultaneously (for example, on 3s interval)? I can select non-devisors as trigger intervals, but anyway, such a situation with queue would still possible for some times.&lt;/p&gt;
&lt;p&gt;So, as you advised, I would use one app_timer instance for all of these intervals and would further think, how to avoid 1ms triggering by app_timer.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple application timer instances or multiple counters in one instance, what is the best way?</title><link>https://devzone.nordicsemi.com/thread/190958?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 06:20:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f5142a2-d14a-4d23-82fc-5510f05fc68f</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Could you tell me the required precision for each of the options you have, i.e 1ms, 20ms, 100ms and 3s.&lt;/p&gt;
&lt;p&gt;The periode of the RTC1 tick is 1/32768s.&lt;/p&gt;
&lt;p&gt;If you have a small period it would be better with one timer, if you have longer periods it would be better to use different timers I think.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple application timer instances or multiple counters in one instance, what is the best way?</title><link>https://devzone.nordicsemi.com/thread/190790?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 12:56:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bfae982-ffaa-4149-a809-3ee03a6945f1</guid><dc:creator>AnnaR</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Could you, please, comment on what about the triggering each 1ms, is it too &amp;quot;hard&amp;quot; for normal operation in case of multiprotocol (Zigbee + Softdevice) mode, or not? I need such a triggering, but &amp;quot;high-frequency&amp;quot; timers are reserved for other peripherals. So, the only option seems the using of app_timer, as the SysTick does not count while SystemOn sleep.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple application timer instances or multiple counters in one instance, what is the best way?</title><link>https://devzone.nordicsemi.com/thread/190775?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 12:25:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a9db644-054b-4626-aab4-72bf335e6b48</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Doing this either way should work. But it may be an idea to use multiple counters in one timer instance, because then you will have full control of the sequence of the actions you want to perform.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>