<?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 Using Watchdog Interrupt with MPIC in P4080 in P-Series</title>
    <link>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327601#M1428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I still struggle to get a watchdog interrupt in P4080.&lt;/P&gt;&lt;P&gt;I want to signal to Core0 that Core4 got a watchdog timeout. I think this is possible with the MPIC.&lt;/P&gt;&lt;P&gt;These are the relevant setting on Core4:&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TCR=0x98120000&lt;/P&gt;
&lt;P&gt;MSR=0x2a000&lt;/P&gt;
&lt;P&gt;MPIC_IILR1=0x0&lt;/P&gt;
&lt;P&gt;MPIC_IIVPR1=0x88000c&lt;/P&gt;
&lt;P&gt;MPIC_IIDR1=0x1&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;But when an interrupt occurs, this is what I get&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Core4: MPIC_WSRSR0=0x0&lt;/P&gt;
&lt;P&gt;Core4: TSR=0xf0000000&lt;/P&gt;
&lt;P&gt;Core4: InterruptHandler: 0xb00 exception.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I expected was that there is something in the MPIC_WSRSR0.&lt;/P&gt;&lt;P&gt;I also set EDBCR0[EDM] to 0, thanks to lunminliang, but this also didn't help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The manual (P4080RM p. 340)&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;The platform indicates to the MPIC that a core watchdog timer event has occurred by&lt;/P&gt;
&lt;P&gt;updating the core’s associated field (WRSn) in the MPIC's Watchdog Status Register&lt;/P&gt;
&lt;P&gt;Summary Register (WSRSR).&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what else do I need to do so the WSRSR is updated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help so far.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jan 2015 16:31:09 GMT</pubDate>
    <dc:creator>clemensreibetan</dc:creator>
    <dc:date>2015-01-28T16:31:09Z</dc:date>
    <item>
      <title>Using Watchdog Interrupt with MPIC in P4080</title>
      <link>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327601#M1428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I still struggle to get a watchdog interrupt in P4080.&lt;/P&gt;&lt;P&gt;I want to signal to Core0 that Core4 got a watchdog timeout. I think this is possible with the MPIC.&lt;/P&gt;&lt;P&gt;These are the relevant setting on Core4:&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TCR=0x98120000&lt;/P&gt;
&lt;P&gt;MSR=0x2a000&lt;/P&gt;
&lt;P&gt;MPIC_IILR1=0x0&lt;/P&gt;
&lt;P&gt;MPIC_IIVPR1=0x88000c&lt;/P&gt;
&lt;P&gt;MPIC_IIDR1=0x1&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;But when an interrupt occurs, this is what I get&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Core4: MPIC_WSRSR0=0x0&lt;/P&gt;
&lt;P&gt;Core4: TSR=0xf0000000&lt;/P&gt;
&lt;P&gt;Core4: InterruptHandler: 0xb00 exception.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I expected was that there is something in the MPIC_WSRSR0.&lt;/P&gt;&lt;P&gt;I also set EDBCR0[EDM] to 0, thanks to lunminliang, but this also didn't help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The manual (P4080RM p. 340)&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;The platform indicates to the MPIC that a core watchdog timer event has occurred by&lt;/P&gt;
&lt;P&gt;updating the core’s associated field (WRSn) in the MPIC's Watchdog Status Register&lt;/P&gt;
&lt;P&gt;Summary Register (WSRSR).&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what else do I need to do so the WSRSR is updated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help so far.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 16:31:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327601#M1428</guid>
      <dc:creator>clemensreibetan</dc:creator>
      <dc:date>2015-01-28T16:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using Watchdog Interrupt with MPIC in P4080</title>
      <link>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327602#M1429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The watchdog expirations come in phases.&amp;nbsp; On the first expiration, TSR[ENW] is set and no interrupt happens.&amp;nbsp; On the second, TSR[WIS] is set, and a watchdog exception (not the MPIC interrupt) happens if TCR[WIE] is set.&amp;nbsp; On the third expiration, the action in TCR[WRC] takes place (in your case, causing an MPIC interrupt).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you have TSR[WIS] set, you will get that exception one watchdog period before the MPIC interrupt.&amp;nbsp; I'm guessing that "0xb00 exception" is the watchdog exception but I don't know how you've programmed that IVOR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 00:06:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327602#M1429</guid>
      <dc:creator>scottwood</dc:creator>
      <dc:date>2015-01-29T00:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using Watchdog Interrupt with MPIC in P4080</title>
      <link>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327603#M1430</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;I thinks two things need to make clear:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; "Core4: InterruptHandler: 0xb00 exception."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;Make sure if this is Watchdog? If there is any interrupt on Core0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; "But when an interrupt occurs, this is what I get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Core4: MPIC_WSRSR0=0x0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Core4: TSR=0xf0000000"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;Do you get before or after the interrupt execution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Lunmin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 07:00:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327603#M1430</guid>
      <dc:creator>lunminliang</dc:creator>
      <dc:date>2015-01-29T07:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Watchdog Interrupt with MPIC in P4080</title>
      <link>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327604#M1431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes indeed that was my problem. I thought it would set the MPIC interrupt when the interrupt in the core is set.&lt;/P&gt;&lt;P&gt;Now I just disabled the interrupt (TCR[WIE]=0) and it kinda works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I get the external interrupt on the other core exatctly 1 time.&lt;/P&gt;&lt;P&gt;I handle this with this routine:&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;// read IACK&lt;/P&gt;
&lt;P&gt;value = *((unsigned long *)(0xFE000000 + 0x400A0));&lt;/P&gt;
&lt;P&gt;// clear Watchdog status register&lt;/P&gt;
&lt;P&gt;*((unsigned long *)(0xFE000000 + 0x43A00)) = 0x100;//3 &amp;lt;&amp;lt; 8;&lt;/P&gt;
&lt;P&gt;//disable external interrupt&lt;/P&gt;
&lt;P&gt;asm("wrtee %0" : : "r" (0));&lt;/P&gt;
&lt;P&gt;// clear EOI&lt;/P&gt;
&lt;P&gt;*((unsigned long *)(0xFE000000 + 0x400B0)) = 0;&lt;/P&gt;
&lt;P&gt;// check EOI&lt;/P&gt;
&lt;P&gt;value = *((unsigned long *)(0xFE000000 + 0x400B0));&lt;/P&gt;
&lt;P&gt;if (value)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Core0: EOI=0x%x\n\r", value);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;// reenable external interrupts&lt;/P&gt;
&lt;P&gt;asm("wrtee %0" : : "r" (1));&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this I reset the TSR to 0x0 and wait till it is 0xd0000000 (Watchdog expired for the 3rd time). But now the MPIC_WSRSR0 is not set anymore.&lt;/P&gt;&lt;P&gt;Why not? (I am using the mixed mode of the MPIC)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can help me with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help up to now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 19:41:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/Using-Watchdog-Interrupt-with-MPIC-in-P4080/m-p/327604#M1431</guid>
      <dc:creator>clemensreibetan</dc:creator>
      <dc:date>2015-01-29T19:41:49Z</dc:date>
    </item>
  </channel>
</rss>

