<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: system timer, system tick in S32K</title>
    <link>https://community.nxp.com/t5/S32K/system-timer-system-tick/m-p/2073939#M47469</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/241477"&gt;@karmegancjk&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;2. This depends on your application. PIT module is separate from the MCU, does not affect core performance, since it is its own module. If your application does not need to optimize performance, you can use SysTick, which is easier to configure.&lt;/P&gt;
&lt;P&gt;3. I explain how to configure OsIf and use SysTick in this thread:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/td-p/1946299" target="_blank"&gt;Solved: Delay function using OSIF - NXP Community&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;4. This thread talks about SysTick priority and IRQ handling:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/How-can-I-configure-SysTick-timer-interrupt-priority/m-p/1586031" target="_blank"&gt;Solved: How can I configure SysTick timer interrupt priority ? - NXP Community&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;5.&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;OsIf_Timer_System_Init(void)&lt;/STRONG&gt; function initializes SysTick if system timer is selected in the BaseNXP component.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Julián&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Apr 2025 20:57:05 GMT</pubDate>
    <dc:creator>Julián_AragónM</dc:creator>
    <dc:date>2025-04-03T20:57:05Z</dc:date>
    <item>
      <title>system timer, system tick</title>
      <link>https://community.nxp.com/t5/S32K/system-timer-system-tick/m-p/2073339#M47441</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need some clarification on implementing a system tick counter.&lt;/P&gt;&lt;P&gt;1. I am creating 1 ms, 10 ms, and 100 ms task containers in my main loop so that I need a system tick counter periodic interrupt for every 100 us or 500 us once to increment the background run time counter. However, I &lt;STRONG&gt;can't able&lt;/STRONG&gt; to&lt;STRONG&gt;&amp;nbsp;enable the system tick interrupt&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;2. For creating 1 ms, 10 ms, and 100 ms task containers, which one is better: a &lt;STRONG&gt;system&amp;nbsp;tick counter or PIT?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3. Is there any example code available? system tick counter periodic interrupt?&lt;/P&gt;&lt;P&gt;4. In&amp;nbsp;my project, startup_code exception.c already defined system tick ISR, and also in the vector table, IRQ number -1 system tick handler is defined. How to use the &lt;STRONG&gt;system tick ISR from main.c&lt;/STRONG&gt; and how to enable IRQ number -1 interrupt ?&lt;/P&gt;&lt;P&gt;5.&amp;nbsp;System tick counter initialization&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;void OsIf_System_tick_init(uint32 usec_u32)&amp;nbsp;//user-defined function&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float uSEC_value = 0;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;uint32 SytemTick_Reload_Value_u32 = 0;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;uSEC_value = usec_u32 * 0.000001;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SytemTick_Reload_Value_u32 = ((OsIf_apxPredefinedConfig[0]-&amp;gt;counterFrequency) *&amp;nbsp; uSEC_value) - 1 ;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/* Systick counter initialization */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;S32_SysTick-&amp;gt;CSRr =&amp;nbsp; S32_SysTick_CSR_ENABLE(0u);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;S32_SysTick-&amp;gt;RVR&amp;nbsp; =&amp;nbsp; (SytemTick_Reload_Value_u32 &amp;amp; 0xFFFFFF);//24 bit only allowable&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;S32_SysTick-&amp;gt;CVR&amp;nbsp; =&amp;nbsp; S32_SysTick_CVR_CURRENT(0U);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //clear current value&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;S32_SysTick-&amp;gt;CSRr =&amp;nbsp; S32_SysTick_CSR_ENABLE(1u) | S32_SysTick_CSR_TICKINT(1u) | S32_SysTick_CSR_CLKSOURCE(1u); //enable system tick, choose core clock for cpu clock and&amp;nbsp; enable exception&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// systick priority&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// systick interrupt handler&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//systick interrupt enable&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Is it the correct way or not?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ide : S32DS V3.5.14&lt;/P&gt;&lt;P&gt;RTD : v4.0.0&lt;/P&gt;&lt;P&gt;Hardware : S32K344, S32K358.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 06:30:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/system-timer-system-tick/m-p/2073339#M47441</guid>
      <dc:creator>karmegancjk</dc:creator>
      <dc:date>2025-04-03T06:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: system timer, system tick</title>
      <link>https://community.nxp.com/t5/S32K/system-timer-system-tick/m-p/2073939#M47469</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/241477"&gt;@karmegancjk&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;2. This depends on your application. PIT module is separate from the MCU, does not affect core performance, since it is its own module. If your application does not need to optimize performance, you can use SysTick, which is easier to configure.&lt;/P&gt;
&lt;P&gt;3. I explain how to configure OsIf and use SysTick in this thread:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/td-p/1946299" target="_blank"&gt;Solved: Delay function using OSIF - NXP Community&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;4. This thread talks about SysTick priority and IRQ handling:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/How-can-I-configure-SysTick-timer-interrupt-priority/m-p/1586031" target="_blank"&gt;Solved: How can I configure SysTick timer interrupt priority ? - NXP Community&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;5.&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;OsIf_Timer_System_Init(void)&lt;/STRONG&gt; function initializes SysTick if system timer is selected in the BaseNXP component.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Julián&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 20:57:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/system-timer-system-tick/m-p/2073939#M47469</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2025-04-03T20:57:05Z</dc:date>
    </item>
  </channel>
</rss>

