<?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: problems in Shell</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207025#M4916</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PetrM,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I found the cause of my problem:&lt;/P&gt;&lt;P&gt;I use direct interrupt in my code. I use Event to signal other task that an interrupt has occured. This causes a lot of problems--- sometime Shell restarts, sometime unexpected exceptions........&lt;/P&gt;&lt;P&gt;So I changes the code to use a global variable to signal the interrupt event. below is the code snip.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the MQXUG, on page154 it reads:&lt;/P&gt;&lt;P&gt;"It must not call any MQX functions" when user uses replacement ISR.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So without using MQX Event, what is the best method to communcate between ISR and other task?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;__declspec(interrupt:0) void new_irq7_isr&amp;nbsp;&amp;nbsp; (&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pointer user_isr_ptr&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; VMCF5225_STRUCT_PTR reg_ptr = (VMCF5225_STRUCT_PTR)BSP_IPSBAR;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;//switch caused IRQ&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;reg_ptr-&amp;gt;EPORT-&amp;gt;EPFR |= MCF522XX_EPORT_EPFR_EPF7;&amp;nbsp;&amp;nbsp; &amp;nbsp;//DES Clear IRQ7 interrupt flag&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;intcnt++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if ( intcnt &amp;gt; MAX_INT_CNT )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;intcnt =0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; _lwevent_set(&amp;amp;ISR7_Event,ISR7_EVENT);&lt;BR /&gt;}&lt;BR /&gt;---------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jun 2010 20:36:33 GMT</pubDate>
    <dc:creator>eGuy</dc:creator>
    <dc:date>2010-06-17T20:36:33Z</dc:date>
    <item>
      <title>problems in Shell</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207023#M4914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running a simple which uses Shell and another task which uses printf to print out some debug info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Occasionlly, I got this on the Hyperterminal:&lt;/P&gt;&lt;P&gt;Terminating shell.&lt;/P&gt;&lt;P&gt;Shell exited, restarting.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know the cause of the shell restarting or point me the direction to look at it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jun 2010 21:05:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207023#M4914</guid>
      <dc:creator>eGuy</dc:creator>
      <dc:date>2010-06-15T21:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: problems in Shell</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207024#M4915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had this problem when there was not enough memory left.&lt;/P&gt;&lt;P&gt;There can be also problem with stack size of the shell task.&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, 16 Jun 2010 21:28:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207024#M4915</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2010-06-16T21:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: problems in Shell</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207025#M4916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PetrM,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I found the cause of my problem:&lt;/P&gt;&lt;P&gt;I use direct interrupt in my code. I use Event to signal other task that an interrupt has occured. This causes a lot of problems--- sometime Shell restarts, sometime unexpected exceptions........&lt;/P&gt;&lt;P&gt;So I changes the code to use a global variable to signal the interrupt event. below is the code snip.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the MQXUG, on page154 it reads:&lt;/P&gt;&lt;P&gt;"It must not call any MQX functions" when user uses replacement ISR.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So without using MQX Event, what is the best method to communcate between ISR and other task?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;__declspec(interrupt:0) void new_irq7_isr&amp;nbsp;&amp;nbsp; (&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pointer user_isr_ptr&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; VMCF5225_STRUCT_PTR reg_ptr = (VMCF5225_STRUCT_PTR)BSP_IPSBAR;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;//switch caused IRQ&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;reg_ptr-&amp;gt;EPORT-&amp;gt;EPFR |= MCF522XX_EPORT_EPFR_EPF7;&amp;nbsp;&amp;nbsp; &amp;nbsp;//DES Clear IRQ7 interrupt flag&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;intcnt++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if ( intcnt &amp;gt; MAX_INT_CNT )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;intcnt =0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; _lwevent_set(&amp;amp;ISR7_Event,ISR7_EVENT);&lt;BR /&gt;}&lt;BR /&gt;---------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 20:36:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207025#M4916</guid>
      <dc:creator>eGuy</dc:creator>
      <dc:date>2010-06-17T20:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: problems in Shell</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207026#M4917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is no trivial way to communicate between ISR and task without synchronization in more complicated data-access schematics.&lt;/P&gt;&lt;P&gt;You can for example set a flag in global variable.&lt;/P&gt;&lt;P&gt;If there is only one task waiting for that flag, the task can scan periodically for the "data ready" flag.&lt;/P&gt;&lt;P&gt;If there are more tasks waiting for data, on ColdFire you have to use TAS instruction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that in any case, your waiting-for-signal-tasks cannot be blocked by operating system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 15:42:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/problems-in-Shell/m-p/207026#M4917</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2010-06-18T15:42:36Z</dc:date>
    </item>
  </channel>
</rss>

