<?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 External interrupt MPC5748G in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/External-interrupt-MPC5748G/m-p/1544060#M22239</link>
    <description>&lt;P&gt;Hallo and Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please i try to use&amp;nbsp;&amp;nbsp;External interrupt PA3 on&amp;nbsp;MPC5748G but until now not work&amp;nbsp; please if any one has experience with this problem i will be thankful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;int main(void) {&lt;/P&gt;&lt;P&gt;xcptn_xmpl(); /* Configure and Enable Interrupts */&lt;BR /&gt;peri_clock_gating();&lt;BR /&gt;SIUL2.MSCR[10].B.OBE = 1;&lt;/P&gt;&lt;P&gt;extern_interrupt();&lt;/P&gt;&lt;P&gt;for (;;) {&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void extern_interrupt(void) {&lt;BR /&gt;// INTC.PSR[1].B.PRC_SELN1 = 0x4; /* IRQ sent to Core 1 */&lt;BR /&gt;// INTC.PSR[1].B.PRIN = 0x0F; /* IRQ priority = 4 (15 = highest) */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SIUL2.IRER0.B.EIRE0 = 1; // CLEAR the flag&lt;BR /&gt;SIUL2.IRSR0.B.DIRSR0= 0; // request Enabel&lt;BR /&gt;SIUL2.IFEER0.B.IFEE0 = 1;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;SIUL2.MSCR[3].B.OBE = 0; // output pin disable&lt;BR /&gt;SIUL2.MSCR[3].B.IBE = 1; // input pin enabel&lt;BR /&gt;SIUL2.IMCR[144].B.SSS=1;&amp;nbsp; &amp;nbsp;// depend on the datasheet excel&lt;BR /&gt;SIUL2.IRER0.B.EIRE0 = 0; // Enabel interrupt flag in 1&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void extern_ISR(void) {&lt;BR /&gt;uint16_t i, j;&lt;BR /&gt;for (i = 0; i &amp;lt; 15000; i++)&lt;BR /&gt;SIUL2.GPDO[10].R = 1;&lt;BR /&gt;for (j = 0; j &amp;lt; 15000; j++)&lt;BR /&gt;SIUL2.GPDO[10].R = 0;&lt;/P&gt;&lt;P&gt;SIUL2.IRER0.B.EIRE0 = 1; // disable the flag&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IRQ.C&lt;/P&gt;&lt;P&gt;void dummy (void);&lt;/P&gt;&lt;P&gt;extern void extern_ISR(void);&lt;/P&gt;&lt;P&gt;(uint32_t) &amp;amp;extern_ISR, /* Vector # 243 SIUL EIRQ [0-7] - SIUL Combined External Interrupt */&lt;BR /&gt;(uint32_t) &amp;amp;dummy, /* Vector # 244 SIUL EIRQ [8-15] - SIUL Combined External Interrupt */&lt;BR /&gt;(uint32_t) &amp;amp;dummy, /* Vector # 245 SIUL EIRQ [16-23] - SIUL Combined External Interrupt */&lt;BR /&gt;(uint32_t) &amp;amp;dummy, /* Vector # 246 SIUL EIRQ [24-31] - SIUL Combined External Interrupt */&lt;/P&gt;&lt;P&gt;Thank you very much&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Oct 2022 13:36:30 GMT</pubDate>
    <dc:creator>Mustafa123</dc:creator>
    <dc:date>2022-10-26T13:36:30Z</dc:date>
    <item>
      <title>External interrupt MPC5748G</title>
      <link>https://community.nxp.com/t5/MPC5xxx/External-interrupt-MPC5748G/m-p/1544060#M22239</link>
      <description>&lt;P&gt;Hallo and Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please i try to use&amp;nbsp;&amp;nbsp;External interrupt PA3 on&amp;nbsp;MPC5748G but until now not work&amp;nbsp; please if any one has experience with this problem i will be thankful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;int main(void) {&lt;/P&gt;&lt;P&gt;xcptn_xmpl(); /* Configure and Enable Interrupts */&lt;BR /&gt;peri_clock_gating();&lt;BR /&gt;SIUL2.MSCR[10].B.OBE = 1;&lt;/P&gt;&lt;P&gt;extern_interrupt();&lt;/P&gt;&lt;P&gt;for (;;) {&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void extern_interrupt(void) {&lt;BR /&gt;// INTC.PSR[1].B.PRC_SELN1 = 0x4; /* IRQ sent to Core 1 */&lt;BR /&gt;// INTC.PSR[1].B.PRIN = 0x0F; /* IRQ priority = 4 (15 = highest) */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SIUL2.IRER0.B.EIRE0 = 1; // CLEAR the flag&lt;BR /&gt;SIUL2.IRSR0.B.DIRSR0= 0; // request Enabel&lt;BR /&gt;SIUL2.IFEER0.B.IFEE0 = 1;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;SIUL2.MSCR[3].B.OBE = 0; // output pin disable&lt;BR /&gt;SIUL2.MSCR[3].B.IBE = 1; // input pin enabel&lt;BR /&gt;SIUL2.IMCR[144].B.SSS=1;&amp;nbsp; &amp;nbsp;// depend on the datasheet excel&lt;BR /&gt;SIUL2.IRER0.B.EIRE0 = 0; // Enabel interrupt flag in 1&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void extern_ISR(void) {&lt;BR /&gt;uint16_t i, j;&lt;BR /&gt;for (i = 0; i &amp;lt; 15000; i++)&lt;BR /&gt;SIUL2.GPDO[10].R = 1;&lt;BR /&gt;for (j = 0; j &amp;lt; 15000; j++)&lt;BR /&gt;SIUL2.GPDO[10].R = 0;&lt;/P&gt;&lt;P&gt;SIUL2.IRER0.B.EIRE0 = 1; // disable the flag&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IRQ.C&lt;/P&gt;&lt;P&gt;void dummy (void);&lt;/P&gt;&lt;P&gt;extern void extern_ISR(void);&lt;/P&gt;&lt;P&gt;(uint32_t) &amp;amp;extern_ISR, /* Vector # 243 SIUL EIRQ [0-7] - SIUL Combined External Interrupt */&lt;BR /&gt;(uint32_t) &amp;amp;dummy, /* Vector # 244 SIUL EIRQ [8-15] - SIUL Combined External Interrupt */&lt;BR /&gt;(uint32_t) &amp;amp;dummy, /* Vector # 245 SIUL EIRQ [16-23] - SIUL Combined External Interrupt */&lt;BR /&gt;(uint32_t) &amp;amp;dummy, /* Vector # 246 SIUL EIRQ [24-31] - SIUL Combined External Interrupt */&lt;/P&gt;&lt;P&gt;Thank you very much&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 13:36:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/External-interrupt-MPC5748G/m-p/1544060#M22239</guid>
      <dc:creator>Mustafa123</dc:creator>
      <dc:date>2022-10-26T13:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: External interrupt MPC5748G</title>
      <link>https://community.nxp.com/t5/MPC5xxx/External-interrupt-MPC5748G/m-p/1546198#M22258</link>
      <description>&lt;P&gt;Interrupt flag is needed to clear by write to SIUL2_ISR0 register. not to SIUL2_IRER0.&lt;/P&gt;
&lt;P&gt;I could possibly point out following thread:&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/MPC5xxx/External-Interrupt-MPC5748g-is-not-working-what-do-I-miss/m-p/753802/highlight/true" target="_blank"&gt;https://community.nxp.com/t5/MPC5xxx/External-Interrupt-MPC5748g-is-not-working-what-do-I-miss/m-p/753802/highlight/true&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Also I would recommend to see following bulleting to understand when use .B and when .R instance:&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/engineering-bulletin/EB758.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/engineering-bulletin/EB758.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 09:08:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/External-interrupt-MPC5748G/m-p/1546198#M22258</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2022-10-31T09:08:08Z</dc:date>
    </item>
  </channel>
</rss>

