<?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>How to auto-reload Counter</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101841/how-to-auto-reload-counter</link><description>Hi, 
 I am using Nordic Connect SDK v2.3.0. 
 I have taken the sample application as the reference for the counter. 
 I am using Timer1 for the counter using the following configurations: 
 
 CONFIG_COUNTER =y 
 CONFIG_COUNTER_TIMER1 =y 
 
 How to configure</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Jul 2023 15:37:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101841/how-to-auto-reload-counter" /><item><title>RE: How to auto-reload Counter</title><link>https://devzone.nordicsemi.com/thread/436320?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 15:37:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdea1bcc-e8d4-4d86-822d-a0c33cb05ac9</guid><dc:creator>Ankit Modi</dc:creator><description>&lt;p&gt;Hi J&amp;oslash;rgen Holmefjord,&lt;/p&gt;
&lt;p&gt;I will look into this as you suggested in next week and revert back.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to auto-reload Counter</title><link>https://devzone.nordicsemi.com/thread/436310?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 15:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:617cba08-c600-4837-ae15-c5eb254e389b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You could implement the counter using &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/zephyr/hardware/peripherals/counter.html#c.counter_set_top_value"&gt;counter_set_top_value&lt;/a&gt;() to set your interval, with a callback set in the cfg. This will automatically &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.3.99-ncs1/drivers/counter/counter_nrfx_timer.c#L256"&gt;enable the shortcut &lt;/a&gt;that clears the TIMER when it reaches the top value (COMPARE0). Note that this will prevent you from setting alarms with timeout longer than the top value.&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>