<?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>TIMER</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91974/timer</link><description>HI FLOKS,I HAVE DOUBT ON TIMER 
 WHAT IS TIMER TICKS AND WHAT IS THE FORMULA TO CALCULATE IT? 
 WHY TIMER IS CONVERTING INTO TIMER TICKS?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Sep 2022 09:27:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91974/timer" /><item><title>RE: TIMER</title><link>https://devzone.nordicsemi.com/thread/386338?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 09:27:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe1b01d6-e123-416e-8df4-c0c93f2f9b57</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/timer.html?cp=4_0_0_5_29"&gt;TIMER&lt;/a&gt;&amp;nbsp;peripheral runs off the 16 MHz high-frequency clock, which does not necessarily match any standard time-unit. The frequency of the timer is determined by the configured&amp;nbsp;&lt;a title="PRESCALER" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/timer.html?cp=4_0_0_5_29_4_12#register.PRESCALER"&gt;PRESCALER&lt;/a&gt;. When the timer is running, it will tick at a given interval, determined by the frequency. For instance if the PRESCALER is 0, the timer will tick every 1/16MHz = 62.5 ns.&lt;/p&gt;
&lt;p&gt;We have functions in the SDK (&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrfx__timer.html#ga31fa2f12ecfe0cb09c0046424afeef6f"&gt;nrfx_timer_ms_to_ticks&lt;/a&gt;()/&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrfx__timer.html#ga76edc54531996a98e2ddbb67f0faddbb"&gt;nrfx_timer_us_to_ticks&lt;/a&gt;()) that can be used to calculate time to ticks. You can look at the &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/v1.9.0/hal/nrf_timer.h#L683-L703"&gt;implementation of these functions&lt;/a&gt; on how to calculate the ticks.&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>