<?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: MQX 3.8 system blocks after a while when enabled external IRQ3</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-8-system-blocks-after-a-while-when-enabled-external-IRQ3/m-p/337234#M10887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soledad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; After I changed project code structure and got more debug log about this issue. This issue may be caused by interrupt context switch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I checked _int_kernel_isr() function in the file mqx/source/psp/powerpc/dispatch.s.&amp;nbsp; When external interrupt IRQ3 occurs, the _int_kernel_isr() firstly executed. it will call the installed IRQ3 user interrupt handler. After that, it will check current task ready-Q. If there is one high priority task than interrupted task, _int_kernel_isr() function will call _int_kernel_isr_context_switch().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From my debug log,&amp;nbsp; i have one monitor task to display current stack usage periodically. This task has the lowest priority. When interrupt IRQ3 comes, the console display is interrupted. The IRQ3 interrupt handler will release one semaphore. There is another task (named card_loop) waiting for the semaphore. Its priority is higher than monitor task. So return from interrupt handler will switch to card_loop task. After card_loop task process, it will wait the semaphore again. Then next interrupt IRQ3 comes, the card_loop task executed again. But the monitor task did not run again, because there are nothing console display. So I think that task context switch in interrupt may have some bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm not sure whether the guess is correct. So could you give some help? Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attached file is dispatch.s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ryan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2015 10:55:46 GMT</pubDate>
    <dc:creator>rhelfan</dc:creator>
    <dc:date>2015-06-09T10:55:46Z</dc:date>
    <item>
      <title>MQX 3.8 system blocks after a while when enabled external IRQ3</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-8-system-blocks-after-a-while-when-enabled-external-IRQ3/m-p/337232#M10885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;I'm using MPC8309 and MQX 3.8 version. In our board there is one FPGA interrupt connected in IRQ3 pin. The interrupt period is about 25ms. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;I initialized four tasks. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The first task is to install FPGA ISR and enable interrupt.&amp;nbsp; In FPGA ISR function, there is one counter increasing with one interrupt. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The second task setup one software watchdog to light on/off the LED on the board. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The third task is to use one _time_delay(1000) and then print the counter in FPGA to the serial console and&amp;nbsp; in a while(1). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The four task is one shell task for debug and can get current counter value. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;when these three tasks begin, at first the counter value can be output on the console. but after a while, there no any output on the console.&amp;nbsp; The LED in the board blinks normally. I can get the counter value changing from shell debug command.&amp;nbsp; It shows the system and FPGA ISR work, but the third task blocks.&amp;nbsp; &lt;SPAN style="line-height: 1.5em;"&gt;I try several times. Although the times is random, but the third task always blocks at last. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;I don't know where the problem is. _time_delay(), interrupt or task schedule?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;Can anyone give me some suggestion? Thanks. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Jan 2015 09:31:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-8-system-blocks-after-a-while-when-enabled-external-IRQ3/m-p/337232#M10885</guid>
      <dc:creator>rhelfan</dc:creator>
      <dc:date>2015-01-31T09:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 3.8 system blocks after a while when enabled external IRQ3</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-8-system-blocks-after-a-while-when-enabled-external-IRQ3/m-p/337233#M10886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please share your code in order to check it??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 22:16:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-8-system-blocks-after-a-while-when-enabled-external-IRQ3/m-p/337233#M10886</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2015-02-09T22:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 3.8 system blocks after a while when enabled external IRQ3</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-8-system-blocks-after-a-while-when-enabled-external-IRQ3/m-p/337234#M10887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soledad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; After I changed project code structure and got more debug log about this issue. This issue may be caused by interrupt context switch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I checked _int_kernel_isr() function in the file mqx/source/psp/powerpc/dispatch.s.&amp;nbsp; When external interrupt IRQ3 occurs, the _int_kernel_isr() firstly executed. it will call the installed IRQ3 user interrupt handler. After that, it will check current task ready-Q. If there is one high priority task than interrupted task, _int_kernel_isr() function will call _int_kernel_isr_context_switch().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From my debug log,&amp;nbsp; i have one monitor task to display current stack usage periodically. This task has the lowest priority. When interrupt IRQ3 comes, the console display is interrupted. The IRQ3 interrupt handler will release one semaphore. There is another task (named card_loop) waiting for the semaphore. Its priority is higher than monitor task. So return from interrupt handler will switch to card_loop task. After card_loop task process, it will wait the semaphore again. Then next interrupt IRQ3 comes, the card_loop task executed again. But the monitor task did not run again, because there are nothing console display. So I think that task context switch in interrupt may have some bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm not sure whether the guess is correct. So could you give some help? Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attached file is dispatch.s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ryan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 10:55:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-3-8-system-blocks-after-a-while-when-enabled-external-IRQ3/m-p/337234#M10887</guid>
      <dc:creator>rhelfan</dc:creator>
      <dc:date>2015-06-09T10:55:46Z</dc:date>
    </item>
  </channel>
</rss>

