<?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>MCUXpresso General中的主题 Re: SCTIMER Interrupt jitter</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1434630#M4541</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Another clue is that the LPC55S69 may use on-chip FRO as the clock source for the CTimer, the FRO has jitter I think. You can output the FRO clock to a pin and check the clock quality.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2022 07:50:29 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2022-03-28T07:50:29Z</dc:date>
    <item>
      <title>SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1426403#M4524</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've set up SCTIMER2 to run at 20nSecs/tick.&amp;nbsp; I'm using match channel 0 to generate an interrupt every 1 mSec, for now. Counter counts up at 20nS, match occurs at 1mS, resets the counter, generate an interrupt, rinse repeat.&amp;nbsp; Eventually I need to output a SPI xfer every 14.76uSecs.&amp;nbsp; But 1st I was checking to see if the ISR trips.&amp;nbsp; It does but, there's jitter of about 100uSecs!&amp;nbsp; I have only 1 interrupt enabled, (checked ISER0 &amp;amp; 1).&amp;nbsp; Core running at 150MHz.&amp;nbsp; No atomic sections of code.&amp;nbsp; Below is the isr code, printf only occurs if get interrupt from another source. None occur.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jreh_0-1646951975180.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/173118iF8BA8180E154BD4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jreh_0-1646951975180.png" alt="jreh_0-1646951975180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't think there's anything in there that would cause 100uS of jitter.&amp;nbsp; I've checked, on a scope, the number of interrupts are correct over a long period of time, which means it's not drifting/accumulating the error.&amp;nbsp; It's just jittering from one isr to the next.&amp;nbsp; I suspect it's the over head of context switching?&lt;/P&gt;&lt;P&gt;Questions;&lt;/P&gt;&lt;P&gt;Is this normal?&lt;/P&gt;&lt;P&gt;Is there a way to reduce this?&lt;/P&gt;&lt;P&gt;If I use DMA, instead of an ISR, to start the SPI xfer, will the jitter still be there?&amp;nbsp; If so I'll need another way to do this.&amp;nbsp; Because 100uS of jitter swamps out the 14.74uS period of SPI updates.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 23:00:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1426403#M4524</guid>
      <dc:creator>jreh</dc:creator>
      <dc:date>2022-03-10T23:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1428118#M4527</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Probably the PRINTF() leads to the jitter of the CTimer ISR, pls comment the PRINTF() function, have a try. If you have more ISR, pls set the priority of the CTimer ISR in highest with 0x00 in priority register of the CTimer interrupt.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 03:21:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1428118#M4527</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-03-15T03:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1430736#M4531</link>
      <description>&lt;P&gt;Thanks for looking into this, but the PRINTF is not executed in the isr.&amp;nbsp; If it did it would print out which it doesn't.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 14:07:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1430736#M4531</guid>
      <dc:creator>jreh</dc:creator>
      <dc:date>2022-03-18T14:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1431000#M4533</link>
      <description>&lt;P&gt;Hi，&lt;/P&gt;
&lt;P&gt;Anyway, I suggest you comment the PRINTF() function and have a try.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 02:27:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1431000#M4533</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-03-21T02:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1431366#M4534</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Commented out the PRINTF, same results.&amp;nbsp; I'm measuring by toggling a gpio pin, GPIO-&amp;gt;NOT[pin]=pin.&amp;nbsp; Would that cause any jitter?&amp;nbsp; The amount of jitter, 100uS, won't work for our application, found another way to accomplish what we need to do.&amp;nbsp; But want to make sure that we're not doing something wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 14:37:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1431366#M4534</guid>
      <dc:creator>jreh</dc:creator>
      <dc:date>2022-03-21T14:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1431589#M4535</link>
      <description>&lt;P&gt;Hi，&lt;/P&gt;
&lt;P&gt;If you have commented the PRINTF() function, but the interrupt jitter is the same, we have to consider the other issue.&lt;/P&gt;
&lt;P&gt;If you use the DMA module, we have to consider the resource competition, as you know, if both DMA and Core access the same memory, which may result in resource competition.&lt;/P&gt;
&lt;P&gt;I suggest you put the stack to one RAMx, the stack is used to save registers, I suggest you remove all local variable for only a test in ISR. Put the DMA destination/source memory to another RAMx lest they compete.&lt;/P&gt;
&lt;P&gt;If you disable DMA, what is the result?&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 03:04:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1431589#M4535</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-03-22T03:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1433720#M4538</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Disabled the DMA.&amp;nbsp; Only interrupt enabled is the timer.&amp;nbsp; No local variables, (RAM), used in the ISR.&amp;nbsp; Striped the isr to below.&lt;/P&gt;&lt;P&gt;void CTIMER2_IRQHandler( void )&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; // Toggle gpio pin&lt;BR /&gt;&amp;nbsp; GPIO-&amp;gt;NOT[BOARD_GPIOPINS_TP1_PORT] = BOARD_GPIOPINS_TP1_PIN_MASK;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Clear Match interrupt&lt;BR /&gt;&amp;nbsp;CTIMER2-&amp;gt;IR = 0x01UL;&lt;BR /&gt;&amp;nbsp;NVIC-&amp;gt;ICPR[1] = (1UL &amp;lt;&amp;lt; 4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;SDK_ISR_EXIT_BARRIER; // Presently does nothing, but here for future/errata&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still see lots of jitter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 00:26:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1433720#M4538</guid>
      <dc:creator>jreh</dc:creator>
      <dc:date>2022-03-25T00:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1433749#M4539</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Can you tell us the part number of LPC family? does the running code and stack are saved in the same SRAM space?&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 01:36:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1433749#M4539</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-03-25T01:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1434179#M4540</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Part is LCP55S69,&amp;nbsp; presently the 2nd core is disabled.&lt;/P&gt;&lt;P&gt;Stack in SRAM3&lt;/P&gt;&lt;P&gt;Variables for app in SRAM4&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 13:55:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1434179#M4540</guid>
      <dc:creator>jreh</dc:creator>
      <dc:date>2022-03-25T13:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: SCTIMER Interrupt jitter</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1434630#M4541</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Another clue is that the LPC55S69 may use on-chip FRO as the clock source for the CTimer, the FRO has jitter I think. You can output the FRO clock to a pin and check the clock quality.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 07:50:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/SCTIMER-Interrupt-jitter/m-p/1434630#M4541</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-03-28T07:50:29Z</dc:date>
    </item>
  </channel>
</rss>

