<?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: Interrupts versus Tasks in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174738#M2222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi OldNick,&lt;/P&gt;&lt;P&gt;What CPU you are using?&lt;/P&gt;&lt;P&gt;In my project with K10 the MQX interrupts work OK: Eight tasks are running in ms timing schedule and Uart, PWM, ADC and Timer interrupts runs nicely.&lt;/P&gt;&lt;P&gt;The problem&amp;nbsp; is probably not in MQX (Version 3.7).&lt;/P&gt;&lt;P&gt;How have you decided that interrupt is not running?&lt;/P&gt;&lt;P&gt;What interrupt is an problem?&lt;/P&gt;&lt;P&gt;One way to detect interrupt is toggling an output pin in interrupt routine.&lt;/P&gt;&lt;P&gt;Have you used _int_disable() and _int_enable() -calls? Is the _int_:enable() missing somewhere?&lt;/P&gt;&lt;P&gt;One problem source may be too small task stack, causes mysterious behauviour.&lt;/P&gt;&lt;P&gt;Does the debugger halt and report any "Kernel data area corrupted" messages?&lt;/P&gt;&lt;P&gt;~Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Oct 2011 01:11:19 GMT</pubDate>
    <dc:creator>MarkP_</dc:creator>
    <dc:date>2011-10-18T01:11:19Z</dc:date>
    <item>
      <title>Interrupts versus Tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174737#M2221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a simple explanation of the interrupt model for MQX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem - the symptoms of which look like MQX only services interrupts when it is running the task in which they were installed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that the case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If so - how to make interrupts do what they are supposed to (i.e. &lt;STRONG&gt;interrupt&lt;/STRONG&gt; the current process &lt;IMG alt=":robotwink:" class="emoticon emoticon-robotwink" id="robotwink" src="http://freescale.i.lithium.com/i/smilies/16x16_robot-wink.gif" title="Robot wink" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2011 15:52:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174737#M2221</guid>
      <dc:creator>OldNick</dc:creator>
      <dc:date>2011-10-17T15:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupts versus Tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174738#M2222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi OldNick,&lt;/P&gt;&lt;P&gt;What CPU you are using?&lt;/P&gt;&lt;P&gt;In my project with K10 the MQX interrupts work OK: Eight tasks are running in ms timing schedule and Uart, PWM, ADC and Timer interrupts runs nicely.&lt;/P&gt;&lt;P&gt;The problem&amp;nbsp; is probably not in MQX (Version 3.7).&lt;/P&gt;&lt;P&gt;How have you decided that interrupt is not running?&lt;/P&gt;&lt;P&gt;What interrupt is an problem?&lt;/P&gt;&lt;P&gt;One way to detect interrupt is toggling an output pin in interrupt routine.&lt;/P&gt;&lt;P&gt;Have you used _int_disable() and _int_enable() -calls? Is the _int_:enable() missing somewhere?&lt;/P&gt;&lt;P&gt;One problem source may be too small task stack, causes mysterious behauviour.&lt;/P&gt;&lt;P&gt;Does the debugger halt and report any "Kernel data area corrupted" messages?&lt;/P&gt;&lt;P&gt;~Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2011 01:11:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174738#M2222</guid>
      <dc:creator>MarkP_</dc:creator>
      <dc:date>2011-10-18T01:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupts versus Tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174739#M2223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Hi Mark P.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am using MQX 3.7 and MCU is MCF51JF128. I want to have a interrupt in Port E bit 2. I had already written the program for install ISR, it shows as following:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;MY_ISR_STRUCT_PTR isr_ptr;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;isr_ptr = _mem_alloc_zero((_mem_size)sizeof(MY_ISR_STRUCT));&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;isr_ptr-&amp;gt;OLD_ISR_DATA = _int_get_isr_data(BSP_REMOTE_INTERRUPT_VECTOR);&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;isr_ptr-&amp;gt;OLD_ISR = _int_get_isr(BSP_REMOTE_INTERRUPT_VECTOR);&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;_int_install_isr(BSP_REMOTE_INTERRUPT_VECTOR, REMOTE_ISR, isr_ptr);&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;Remote_init();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN style="line-height: normal;"&gt;And the interrupt vector progam is as following:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;void REMOTE_ISR(pointer user_isr_ptr)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;{&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;MY_ISR_STRUCT_PTR isr_ptr;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;// RNG_CMD |= RNG_CMD_SR_MASK; //generate SW reset&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;// PMC_LVDSC1 |= PMC_LVDSC1_LVDACK_MASK; //clear LVDF Low Voltage Detect Flag&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;isr_ptr = (MY_ISR_STRUCT_PTR)user_isr_ptr;&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;PCTLE_IC=PCTLE_IC&amp;amp;0b11111011; //clear PTIE flag&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;PCTLE_IF=0xff; // IF register = FF&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;remote_count=0;&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;if (Remote_Data_Receive1()==0)&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;{&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;int x;&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;x=0;&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;/* Chain to the previous notifier */&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT color="#FF9900"&gt;(*isr_ptr-&amp;gt;OLD_ISR)(isr_ptr-&amp;gt;OLD_ISR_DATA);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; This program can have interrupt to routine void REMOTE_ISR(pointer user_isr_ptr) when I strat the falling edge in this port. But this routine is running and then go to halt and then I run in single step the program is enter to&amp;nbsp;_int_kernel_isr() routine.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Is any missing for this program?Please help me to solve this problem.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;~Eric&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;&lt;SPAN style="line-height: normal;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 23:41:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174739#M2223</guid>
      <dc:creator>kinhc138</dc:creator>
      <dc:date>2011-11-22T23:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupts versus Tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174740#M2224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;What happens if you leave the chaining away by commenting the line:&lt;/P&gt;&lt;P&gt;//(*isr_ptr-&amp;gt;OLD_ISR)(isr_ptr-&amp;gt;OLD_ISR_DATA);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure but I believe that _int_kernel_isr() should not be chain-called,&lt;/P&gt;&lt;P&gt;it is a default int handler for erroneous ints.&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;if (isr_ptr-&amp;gt;OLD_ISR != _int_kernel_isr) // Chain int only when not default hadnler&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; (*isr_ptr-&amp;gt;OLD_ISR)(isr_ptr-&amp;gt;OLD_ISR_DATA);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;~Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 00:36:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Interrupts-versus-Tasks/m-p/174740#M2224</guid>
      <dc:creator>MarkP_</dc:creator>
      <dc:date>2011-11-24T00:36:26Z</dc:date>
    </item>
  </channel>
</rss>

