<?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: MPC5744P PIT Interrupt problem in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494159#M2686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem has been solved. Thank you so much !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Sep 2017 12:41:30 GMT</pubDate>
    <dc:creator>nathan_</dc:creator>
    <dc:date>2017-09-27T12:41:30Z</dc:date>
    <item>
      <title>MPC5744P PIT Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494155#M2682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Original Content posted by David Chung.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm writing a simple project for Panther that uses the PIT0 ISR to to toggle a GPIO pin. I use the 160MHz PLL as the clock source, initialize PIT0, enable PIT0 interrupts in the NVIC, add the PIT0_ISR address to the interrupt table. In the ISR, I clear the interrupt flag and toggle the GPIO pin.&amp;nbsp; The problem is for some reason the program only enters the ISR around 2 to 4 times before never entering again.&amp;nbsp; I can see that PIT_0.TFLG0 is set so an interrupt is called by PIT0, but it's not being handled. The PIT0 init code is shown:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void PIT0_init(uint32_t LDVAL) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; volatile uint32_t dummy = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_0.TIMER[0].LDVAL.R = LDVAL; /* Load # PIT clocks to count */&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_0.TIMER[0].TCTRL.B.TIE = 1; /* Enable interrupt */&lt;/P&gt;&lt;P&gt;&amp;nbsp; INTC_0.PSR[226].B.PRIN = 10; /* IRQ priority = 10 (31 highest) */&lt;/P&gt;&lt;P&gt;&amp;nbsp; dummy = INTC_0.PSR[226].R;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PIT_0.TIMER[0].TCTRL.B.TEN = 1; /* enable channel */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ISR is as follows:&lt;/P&gt;&lt;P&gt;void PIT0_isr(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; LED1 = ~LED1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Toggle LED1 port */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; PIT_0.TIMER[0].TFLG.R |= 1;&amp;nbsp; /* Clear interrupt flag. w1c */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone know the cause of this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 16:26:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494155#M2682</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2016-02-29T16:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P PIT Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494156#M2683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look at this example. There is shown how to set PIT.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-329575"&gt;Example MPC5744P PinToggleStationery S32DS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the first sight, you did not correctly configure INTC_0.PSR register. You only set priority, but you did not choose the core, which will handle the interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 20:18:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494156#M2683</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2016-02-29T20:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P PIT Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494157#M2684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,I just download the example you uploaded and tried to debug it.&lt;/P&gt;&lt;P&gt;I want to use the PIT module, so I made a little change in the code. My project is attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I met a problem when I debug it. After I press the "resume", the code will fall into a function named "dummy" and do not go on, The picture is also attached, named "dummy"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I set a breakpoint before the while loop, I find out the code goes well before the while loop, which means in the initiation the problem did not occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me to fix the problem? I really need to work out this problem and use the PIT module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 08:35:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494157#M2684</guid>
      <dc:creator>nathan_</dc:creator>
      <dc:date>2017-09-27T08:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P PIT Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494158#M2685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you do not have installed correct interrupt service routine. Please see intc_SW_mode_isr_vectors_MPC5744P.c file in my project and add the interrupt service routine at correct address (Vector 226).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 08:53:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494158#M2685</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-09-27T08:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P PIT Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494159#M2686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem has been solved. Thank you so much !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 12:41:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494159#M2686</guid>
      <dc:creator>nathan_</dc:creator>
      <dc:date>2017-09-27T12:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P PIT Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494160#M2687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can not understand the set for PLL0 in the example.&lt;/P&gt;&lt;P&gt;According to the MPC5744P datasheet, the max of PLL0_PHI0 is 200MHz, but the example the PLL0 is set to 400MHz&amp;nbsp;by&amp;nbsp;the following code:&lt;/P&gt;&lt;P&gt;PLLDIG.PLL0DV.R = 0x58021014;&lt;SPAN class=""&gt; &lt;/SPAN&gt; &amp;nbsp; &amp;nbsp; // PREDIV = &amp;nbsp;1, MFD = 20, RFDPHI = 2, RFDPHI1 = 11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 13:22:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494160#M2687</guid>
      <dc:creator>nathan_</dc:creator>
      <dc:date>2017-09-27T13:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P PIT Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494161#M2688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the calculation seems to be incorrect. Correct value for 200MHz with 40MHz crystal is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLLDIG.PLL0DV.R = 0x3002100A // PREDIV = &amp;nbsp;1, MFD = 10, RFDPHI = 2, RFDPHI1 = 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 11:32:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-PIT-Interrupt-problem/m-p/494161#M2688</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-10-10T11:32:33Z</dc:date>
    </item>
  </channel>
</rss>

