<?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>MQX Software SolutionsのトピックRe: Spurious interrupts when using _mcf52xx_int_mask from BSP</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Spurious-interrupts-when-using-mcf52xx-int-mask-from-BSP/m-p/170044#M1866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right, there should be at least note or warning on this topic. We are sorry about it.&lt;/P&gt;&lt;P&gt;We found out this "spurious problem" around MQX 3.4 release and we were quite shocked too.&lt;/P&gt;&lt;P&gt;So there are two "solutions":&lt;/P&gt;&lt;P&gt;1) install dummy interrupt handler for spurious interrupt using _int_install_kernel_isr()&lt;/P&gt;&lt;P&gt;2) use _int_disable() and _int_enable() around each interrupt enable register bit clearing (disabling)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jan 2010 23:59:53 GMT</pubDate>
    <dc:creator>PetrM</dc:creator>
    <dc:date>2010-01-27T23:59:53Z</dc:date>
    <item>
      <title>Spurious interrupts when using _mcf52xx_int_mask from BSP</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Spurious-interrupts-when-using-mcf52xx-int-mask-from-BSP/m-p/170043#M1865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;When using MQX/BSP to handle individual interrupt enbale/disable functionality,&lt;BR /&gt;we occasionally (between 5 and 72 hours from start) get a spurious interrupt,&lt;BR /&gt;indicating that an interrupt "disappears" between being detected and the end of&lt;BR /&gt;the IACK cycle.&lt;BR /&gt;We suspect that a disable interrupt is performed when the interrupt controller is&lt;BR /&gt;busy determining the actual vector to use, handling levels and priorities and such.&lt;BR /&gt;I took a look into the MQX source tree for 3.40 (we're still using 2.50, working&lt;BR /&gt;to go to 3.4 in due course, but there's no real difference) and saw that the BSP&lt;BR /&gt;functions to enable/disable individual interrupts, e.g. _mcf52xx_int_mask from&lt;BR /&gt;various BSP's, do not generally disable/enable interrupts to set/clear the&lt;BR /&gt;corresponding bits.&lt;BR /&gt;And since I couldn't find anything on this in the MQX docs (possibly doesn't belong&lt;BR /&gt;there), I'd thought to ask here: Isn't it necessary to disable interrupts before&lt;BR /&gt;setting/resetting the individual mask for a single interrupt source? Or at least&lt;BR /&gt;put a comment in the source that a caller is himself responsible for disabling&lt;BR /&gt;interrupts when such a function is called?&lt;BR /&gt;Take a look at, for instance, _mcf5227_int_mask in int_ctrl_mcf5227.c in the&lt;BR /&gt;standard MQX 3.40 distro. When called with a level lower than the interrupt level&lt;BR /&gt;of the interrupt being masked, a spurious interrupt might be generated.&lt;BR /&gt;A brief comment to that effect would have saved us quite some searching and&lt;BR /&gt;debugging.&lt;BR /&gt;Or am I overlooking something?&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;&lt;BR /&gt;Johan&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 01:54:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Spurious-interrupts-when-using-mcf52xx-int-mask-from-BSP/m-p/170043#M1865</guid>
      <dc:creator>jbezem</dc:creator>
      <dc:date>2010-01-27T01:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Spurious interrupts when using _mcf52xx_int_mask from BSP</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Spurious-interrupts-when-using-mcf52xx-int-mask-from-BSP/m-p/170044#M1866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right, there should be at least note or warning on this topic. We are sorry about it.&lt;/P&gt;&lt;P&gt;We found out this "spurious problem" around MQX 3.4 release and we were quite shocked too.&lt;/P&gt;&lt;P&gt;So there are two "solutions":&lt;/P&gt;&lt;P&gt;1) install dummy interrupt handler for spurious interrupt using _int_install_kernel_isr()&lt;/P&gt;&lt;P&gt;2) use _int_disable() and _int_enable() around each interrupt enable register bit clearing (disabling)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 23:59:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Spurious-interrupts-when-using-mcf52xx-int-mask-from-BSP/m-p/170044#M1866</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2010-01-27T23:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Spurious interrupts when using _mcf52xx_int_mask from BSP</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Spurious-interrupts-when-using-mcf52xx-int-mask-from-BSP/m-p/170045#M1867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually inserted protection in both the mask and unmask functions of the BSP, like this:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;   &lt;/SPAN&gt; &lt;SPAN&gt;/* Save the status register and set the interrupt level to 7 (disable) */&lt;/SPAN&gt;
 &lt;SPAN&gt;   &lt;/SPAN&gt; &lt;SPAN&gt;uSaveSR&lt;/SPAN&gt; &lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;_psp_get_sr&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;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SPAN&gt;/* Restore the previous value of the status register */&lt;/SPAN&gt;
 &lt;SPAN&gt;    (&lt;/SPAN&gt;&lt;SPAN&gt;void&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;_psp_set_sr&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;uSaveSR&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;Maybe you can put that in MQX 3.5.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FWIW,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:18:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Spurious-interrupts-when-using-mcf52xx-int-mask-from-BSP/m-p/170045#M1867</guid>
      <dc:creator>jbezem</dc:creator>
      <dc:date>2020-10-29T09:18:25Z</dc:date>
    </item>
  </channel>
</rss>

