<?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: High Speed PIT generating slow heartbeat in S32K</title>
    <link>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2378489#M59117</link>
    <description>&lt;P&gt;Thanks for all the info you shared.&lt;BR /&gt;Unfortunately, I need to send out pulses of specific sequences/patterns (non-comms) at 10MHz, so I can only do this feature through fast interrupts.&lt;BR /&gt;Using&amp;nbsp;&lt;STRONG&gt;Pit_Ip_ProcessCommonInterrupt&amp;nbsp;&lt;/STRONG&gt;also didn't help much as the delay from 10MHz-&amp;gt;10kHz was just too wide a gap.&lt;/P&gt;&lt;P&gt;Some additional info that may help:&lt;BR /&gt;I have a separate module using emios PWM running up to the hundreds of kHz range so at least the peripheral clocks are fine (note: this emios PWM doesn't run at the same time as the 10MHz PIT pin).&lt;BR /&gt;Additionally, I configured one pin as clock out and confirmed that my core clocks, AIPS Fast/Slow Clocks, PLLs Clocks, etc were all as stated in the "Clocks" tab of the RTD.&lt;/P&gt;&lt;P&gt;May I ask if there is a way to lower the priorities of the FreeRTOS by a step so I could make this task as the highest priority?&lt;/P&gt;&lt;P&gt;May I also confirm with you if I wanted to have a have a 10MHz interrupt running on my 30MHz PIT clock, then I just need to set the period to "3" when I start the PIT -&amp;nbsp;&lt;SPAN&gt;Pit_Ip_StartChannel(1, 0, 3)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Lastly, may I ask if you have any quick reference links to check what peripherals use what clocks? especially within an RTOS environment? Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2026 15:55:57 GMT</pubDate>
    <dc:creator>PMaq</dc:creator>
    <dc:date>2026-06-08T15:55:57Z</dc:date>
    <item>
      <title>High Speed PIT generating slow heartbeat</title>
      <link>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2377394#M59062</link>
      <description>&lt;P&gt;Hi, I am attempting to generate a 5MHz-10MHz heartbeat pulse using a high priority interrupt + GPIO toggle, via PIT.&lt;BR /&gt;I've setup S32DS PIT and IsrCtrl RTDs in such a way that I am able to trigger the notification interrupts periodically, however, I am only getting a max heartbeat of around 10kHz.&lt;BR /&gt;My "Clocks" tab shows my PIT Clock is set to run at 30MHz.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PMaq_1-1780651505140.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/388043i11E3903A7A8C4135/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PMaq_1-1780651505140.png" alt="PMaq_1-1780651505140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PMaq_0-1780652737683.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/388051i09DFAB755F716B4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PMaq_0-1780652737683.png" alt="PMaq_0-1780652737683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a setup using FreeRTOS, RTD v7.0.0, and programming on a&amp;nbsp;S32K312MINI-EVB development board.&lt;/P&gt;&lt;P&gt;Is there another clock configuration in between the 30MHz Clocks tab and actually generating the interrupt notification?&lt;BR /&gt;How does the 30MHz PIT clock relate to the count value start function? is it simply 33ns*count?&lt;BR /&gt;&lt;SPAN&gt;Pit_Ip_StartChannel(uint8 instance, uint8 channel, uint32 countValue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I tried achieving the same results using a regular GPT but similarly got slow pulses.&lt;BR /&gt;&lt;SPAN&gt;I noticed the PIT configuration shows GptIsrEnable and GptChannelUsed and was wondering if there is a common configuration between the two that may cause the slow behaviour?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PMaq_0-1780651445712.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/388041i952311FD4029E819/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PMaq_0-1780651445712.png" alt="PMaq_0-1780651445712.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2026 09:57:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2377394#M59062</guid>
      <dc:creator>PMaq</dc:creator>
      <dc:date>2026-06-05T09:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: High Speed PIT generating slow heartbeat</title>
      <link>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2377735#M59072</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/263497"&gt;@PMaq&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Most likely this is a SW overhead issue, constant PIT ISR is starving the system, not to mention you are also adding FreeRTOS and most likely toggling the pin through high level APIs:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/how-to-improve-S32k3-interrupt-callback-execute-speed/td-p/1996700" target="_blank"&gt;how to improve S32k3 interrupt callback execute speed?&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If your goal is to only toggle a GPIO (no communication or specific toggle patterns), I suggest using a different module, either eMIOS output compare PWM or even LCU/TRGMUX so you can toggle the pin by hardware instead of software.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_2-1780696688220.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/388094i6EF72B978E0BC8E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Julin_AragnM_2-1780696688220.png" alt="Julin_AragnM_2-1780696688220.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also take care on which GPIO pad type you are using, as that will limit your switching rate. In your case, if 10MHz is the maximum spec, then it will not matter, as the GPIO-Standard types switch up to 10 MHz:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_1-1780696649205.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/388093iFFD5762416035074/image-size/large?v=v2&amp;amp;px=999" role="button" title="Julin_AragnM_1-1780696649205.png" alt="Julin_AragnM_1-1780696649205.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2026 21:58:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2377735#M59072</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2026-06-05T21:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: High Speed PIT generating slow heartbeat</title>
      <link>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2378489#M59117</link>
      <description>&lt;P&gt;Thanks for all the info you shared.&lt;BR /&gt;Unfortunately, I need to send out pulses of specific sequences/patterns (non-comms) at 10MHz, so I can only do this feature through fast interrupts.&lt;BR /&gt;Using&amp;nbsp;&lt;STRONG&gt;Pit_Ip_ProcessCommonInterrupt&amp;nbsp;&lt;/STRONG&gt;also didn't help much as the delay from 10MHz-&amp;gt;10kHz was just too wide a gap.&lt;/P&gt;&lt;P&gt;Some additional info that may help:&lt;BR /&gt;I have a separate module using emios PWM running up to the hundreds of kHz range so at least the peripheral clocks are fine (note: this emios PWM doesn't run at the same time as the 10MHz PIT pin).&lt;BR /&gt;Additionally, I configured one pin as clock out and confirmed that my core clocks, AIPS Fast/Slow Clocks, PLLs Clocks, etc were all as stated in the "Clocks" tab of the RTD.&lt;/P&gt;&lt;P&gt;May I ask if there is a way to lower the priorities of the FreeRTOS by a step so I could make this task as the highest priority?&lt;/P&gt;&lt;P&gt;May I also confirm with you if I wanted to have a have a 10MHz interrupt running on my 30MHz PIT clock, then I just need to set the period to "3" when I start the PIT -&amp;nbsp;&lt;SPAN&gt;Pit_Ip_StartChannel(1, 0, 3)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Lastly, may I ask if you have any quick reference links to check what peripherals use what clocks? especially within an RTOS environment? Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2026 15:55:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2378489#M59117</guid>
      <dc:creator>PMaq</dc:creator>
      <dc:date>2026-06-08T15:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: High Speed PIT generating slow heartbeat</title>
      <link>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2382147#M59301</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/263497"&gt;@PMaq&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Sorry for the late reply.&lt;/P&gt;
&lt;P&gt;I can help you optimize the GPIO switching. However, this will not replace or come close to switching the pin through HW. You can strip the RTD function to just switching the pin through registers:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;IP_SIUL2-&amp;gt;MSCR[29] ^= SIUL2_MSCR_OBE_MASK;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;Using&amp;nbsp;Pit_Ip_ProcessCommonInterrupt&amp;nbsp;also didn't help much as the delay from 10MHz-&amp;gt;10kHz was just too wide a gap.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The reason I pointed you to the community post was to explain the process when PIT enters interrupt, it does not only go through the callback, but also through the interrupt process from RTD, meaning it is significantly slower.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;May I ask if there is a way to lower the priorities of the FreeRTOS by a step so I could make this task as the highest priority?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You can lower the interrupt priority for the interrupt controller inside the configuration container:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_1-1781644932055.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/389172i916EF1EA420775D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Julin_AragnM_1-1781644932055.png" alt="Julin_AragnM_1-1781644932055.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;May I also confirm with you if I wanted to have a have a 10MHz interrupt running on my 30MHz PIT clock, then I just need to set the period to "3" when I start the PIT - Pit_Ip_StartChannel(1, 0, 3)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, however, the PIT may not be able to process the interrupt with a period of 3.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="bodyDisplay" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;&lt;STRONG&gt;Lastly, may I ask if you have any quick reference links to check what peripherals use what clocks? especially within an RTOS environment? Thanks!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You can refer to S32K3XX's reference manual. Chapter 24.6 shows peripheral clocking. For example, PIT uses AIPS_SLOW_CLK:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_0-1781644787793.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/389171i5435303F66F6A4B3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Julin_AragnM_0-1781644787793.png" alt="Julin_AragnM_0-1781644787793.png" /&gt;&lt;/span&gt;
&lt;P&gt;One last thing to consider is that if you are toggling your pin inside the PIT callback, this will result in an output square-wave frequency that is half the interrupt frequency.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Jun 2026 21:26:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/High-Speed-PIT-generating-slow-heartbeat/m-p/2382147#M59301</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2026-06-16T21:26:31Z</dc:date>
    </item>
  </channel>
</rss>

