<?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>Why is system tick frequency so high?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110954/why-is-system-tick-frequency-so-high</link><description>Hello! 
 We&amp;#39;ve been doing some serious development on nRF52833 and nRF5340 machines with Zephyr, and on both of them CONFIG_SYS_CLOCK_TICKS_PER_SEC is set to 32768 by default. We&amp;#39;ve also been using similar category Cortex M4 MCUs with FreeRTOS with satisfaction</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 May 2024 12:01:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110954/why-is-system-tick-frequency-so-high" /><item><title>RE: Why is system tick frequency so high?</title><link>https://devzone.nordicsemi.com/thread/482269?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 12:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64a4d7f3-ade5-40a8-8118-9cb1317fd943</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, we use the RTC as the system timer, and&amp;nbsp;nrf_rtc_timer.c&amp;nbsp;is the implementation of it.&lt;/p&gt;
[quote userid="76226" url="~/f/nordic-q-a/110954/why-is-system-tick-frequency-so-high/482259"]&lt;code&gt;CONFIG_SYS_CLOCK_TICKS_PER_SEC&lt;/code&gt; option controls the frequency of RTC TICK[/quote]
&lt;p&gt;Yes, if you disable the tickles kernel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why is system tick frequency so high?</title><link>https://devzone.nordicsemi.com/thread/482259?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:41:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ad075fb-8254-411d-8912-cf3bb6c1fa40</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;So I wasn&amp;#39;t wrong when I was unable to find such a SysTick-related code ;)&lt;/p&gt;
&lt;p&gt;So Zephyr on Nordic MCUs uses Nordic&amp;#39;s RTC which features a low power TICK feature, is it correct? And the &lt;span&gt;&lt;code&gt;CONFIG_SYS_CLOCK_TICKS_PER_SEC&lt;/code&gt; option controls the frequency of RTC TICK, is it right? &lt;code&gt;nrf_rtc_timer.c&lt;/code&gt; appears to be source file in question...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why is system tick frequency so high?</title><link>https://devzone.nordicsemi.com/thread/482251?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:23:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:311bc792-1896-4316-8336-76d8bf643aad</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, if you don&amp;#39;t use the tickless kernel, you should reduce the tick rate.&amp;nbsp;The&amp;nbsp;limitation with using the SysTick timer is that it stops running when the CPU is idle, see&amp;nbsp;&lt;a class="" title="Tick event" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/rtc.html?cp=4_0_0_6_27_4#concept_g53_fh4_sr"&gt;Tick event&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It does not look like we have added support for using SysTick in Zephyr.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;:&amp;nbsp;SYS_CLOCK_TICKS_PER_SEC defaults to &amp;#39;128&amp;#39; if you don&amp;#39;t select the tickless kernel:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/3758bcbfa5cd749d977e2600b6687104b8948243/soc/arm/nordic_nrf/Kconfig.defconfig#L22"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/3758bcbfa5cd749d977e2600b6687104b8948243/soc/arm/nordic_nrf/Kconfig.defconfig#L22&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why is system tick frequency so high?</title><link>https://devzone.nordicsemi.com/thread/482248?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:11:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bac571ff-f5e8-4348-9a69-7cfe6ac59086</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;And what if I don&amp;#39;t use tickless kernel? How to choose from RTC/SysTick sources? (SysTick is a Cortex M4 peripheral in System Control Block, RTC is a vendor-added peripheral)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why is system tick frequency so high?</title><link>https://devzone.nordicsemi.com/thread/482245?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0907e2a4-1932-43b1-90d5-b04fbf50fd29</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We use the RTC as the SysTick source to achieve low power, and the 32768 tick rate is chosen because we use the tickless kernel by default. This setting provides better timing granularity.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1715079783658v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/b5cf3040298410845311ff7397374540d3451528/kernel/Kconfig#L772"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/b5cf3040298410845311ff7397374540d3451528/kernel/Kconfig#L772&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>