<?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>MPC5xxxのトピックRe: MPC5674F PIT not trigerring interrupt</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392842#M536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Install interrupt handler in this way…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTC_InstallINTCInterruptHandler((INTCInterruptFn)pitIntFnct,304,1); /* vector304 for PIT3 */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your case the “pitIntFnct” is called first and then wrong address is placed to the vector table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also do not call INTC_InitINTCInterrupts() explicitly, it is already called from user_init(); see e.g. MPC5674F_init_ram.c. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 May 2015 10:53:50 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2015-05-04T10:53:50Z</dc:date>
    <item>
      <title>MPC5674F PIT not trigerring interrupt</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392841#M535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to configure the PIT timer in order to trig an interrupt.&amp;nbsp; I am using the InctInterrupt.h and InctInterrupt.c from the Code Warrior 10.6.&amp;nbsp; Here is a sniplet of code to init pit and add a function to the interrupt vector:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;initPit(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIT.MCR.R = 0x00000001;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable pit and freeze during debug&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIT.CH[1].LDVAL = 40000000;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 1 second interrupt for 40 MHz clock&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIT.CH[1].TCRL.R = 0x00000003;&amp;nbsp; // Start timer&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;INTCInterruptFn pitIntFnct(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIU.GDPO[PIN_NUMBER].R = !SIU.GDPO[PIN_NUMBER].R;&amp;nbsp; // Toggle pin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIT.CH[1].TFLG.B.TIF = 1;&amp;nbsp; // Reset interrupt flag&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;int main(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initPIT();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTC_InitINTCInterrupts();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTC_InstallINTCInterruptHandler(pitIntFnct(), 302, 1);&amp;nbsp;&amp;nbsp;&amp;nbsp; // PIT[1] is on vector number 302.&amp;nbsp; Priority 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&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;For some reason, the funtion is not trigerred when the PIT[1] flag is set to 1.&amp;nbsp; Do you have any idea why???&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 13:00:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392841#M535</guid>
      <dc:creator>vincentbergeron</dc:creator>
      <dc:date>2015-04-30T13:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5674F PIT not trigerring interrupt</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392842#M536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Install interrupt handler in this way…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTC_InstallINTCInterruptHandler((INTCInterruptFn)pitIntFnct,304,1); /* vector304 for PIT3 */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your case the “pitIntFnct” is called first and then wrong address is placed to the vector table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also do not call INTC_InitINTCInterrupts() explicitly, it is already called from user_init(); see e.g. MPC5674F_init_ram.c. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 10:53:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392842#M536</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2015-05-04T10:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5674F PIT not trigerring interrupt</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392843#M537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to see in memory that the correct address is set.&amp;nbsp; However, the interrupt is triggerred only once and then , the INTC_CPR is not resetted to 0 (initial value).&amp;nbsp; The value 1 stays in the register and I think once the second interrupt is generated (after 2 seconds), the intc doesn't acknowledge it since it has the same priority as in the INTC_CPR register.&amp;nbsp; When writing 0 to INTC_EOIR register, doesn't it supposed to pop from LIFO the previous interrupt INTC_CPR value ????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards, &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 13:51:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392843#M537</guid>
      <dc:creator>vincentbergeron</dc:creator>
      <dc:date>2015-05-04T13:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Re: MPC5674F PIT not trigerring interrupt</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392844#M538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Try attached example. Is that also not working for you?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;BR,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Petr&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 11:52:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5674F-PIT-not-trigerring-interrupt/m-p/392844#M538</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2015-05-06T11:52:33Z</dc:date>
    </item>
  </channel>
</rss>

