<?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: What are task queues?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218257#M5652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what my problem is but I have certain clues.&lt;/P&gt;&lt;P&gt;My interrupt post a semaphore.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This interrupt gets triggered about every 2ms for a period of around 50ms. The last time the interrupt gets triggered(from each 50ms group) must post a semaphore but for some reason I get an Unhandled Interrupt comming from shell task. It is like if the interrupt didnt have enough time to run before the next interrupt pulse comes. How can I overcome this?&lt;/P&gt;&lt;P&gt;The code works fine without posting the semaphore, like if the semaphore post instruction is making the interrupt too long. Could be this causing the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void GPT_C0F_ISR(pointer dummy_param){   Door3Counter++;   if(Door3Counter &amp;gt;= 26){//When is the last bit
       Door3Counter = 0;//Reestart the counter
      FifoInsertDataID(codeReadD3, 8); //Codigo y La Puerta      _lwsem_post(&amp;amp;sem_cardRead); //Posts the semaphore
   }   readCounter(0); //Clears the Interrupt flag
   return;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Oct 2009 07:19:19 GMT</pubDate>
    <dc:creator>MQXuser</dc:creator>
    <dc:date>2009-10-10T07:19:19Z</dc:date>
    <item>
      <title>What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218252#M5647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im new to RTOS and I am looking for information about task queues.&lt;BR /&gt;Where can I find basic information about how task queues work or can somebody explain it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 21:11:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218252#M5647</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-09-25T21:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218253#M5648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MQXuser,&lt;/P&gt;&lt;P&gt;Best location is to look in the ~Freescale MQX 3.x\doc\mqx\MQXUG.pdf section 3.7.8.&amp;nbsp; It explains the fifo ask and reviews the example that is in the ~Freescale MQX 3.x\mqx\examples\taskq directory.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2009 20:35:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218253#M5648</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2009-09-28T20:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218254#M5649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I read the documentation before but there are still some questions. To be more specific:&lt;/P&gt;&lt;P&gt;Can I place the same task two times into the task queue?&lt;/P&gt;&lt;P&gt;I need to synchronize a task with an ISR but I need that the task executes 1 time by everytime the interrupt is triggered. If the interrupt gets triggered faster than the task: Can I still make the task run all the times the interrupt have been triggered?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 07:44:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218254#M5649</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-08T07:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218255#M5650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A task may only be enqueued once before a corresponding dequeue.&lt;/P&gt;&lt;P&gt;You want a lwSem. The ISR posts for every interrupt occurrence. The tasks waits on the LWsem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 19:58:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218255#M5650</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-10-08T19:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218256#M5651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course that is what I need. Sometimes its hard to start thinking in terms of RTOS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 21:30:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218256#M5651</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-08T21:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218257#M5652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what my problem is but I have certain clues.&lt;/P&gt;&lt;P&gt;My interrupt post a semaphore.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This interrupt gets triggered about every 2ms for a period of around 50ms. The last time the interrupt gets triggered(from each 50ms group) must post a semaphore but for some reason I get an Unhandled Interrupt comming from shell task. It is like if the interrupt didnt have enough time to run before the next interrupt pulse comes. How can I overcome this?&lt;/P&gt;&lt;P&gt;The code works fine without posting the semaphore, like if the semaphore post instruction is making the interrupt too long. Could be this causing the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void GPT_C0F_ISR(pointer dummy_param){   Door3Counter++;   if(Door3Counter &amp;gt;= 26){//When is the last bit
       Door3Counter = 0;//Reestart the counter
      FifoInsertDataID(codeReadD3, 8); //Codigo y La Puerta      _lwsem_post(&amp;amp;sem_cardRead); //Posts the semaphore
   }   readCounter(0); //Clears the Interrupt flag
   return;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2009 07:19:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218257#M5652</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-10T07:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218258#M5653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Assuming there is not bug in embedded functions of ISR, the ISR is written well.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 21:39:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218258#M5653</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-10-13T21:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218259#M5654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I dont think there is a bug in the embedded functions since the ISR works without a problem when I dont use the post semaphore function. Does this make sense?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 22:48:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218259#M5654</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-13T22:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218260#M5655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Did your create the semaphore before using it?&lt;/P&gt;&lt;P&gt;2. Set a breakpoint on the _lwsem_post. Use Task Aware Debugging to display LW semaphores. Ensure the semaphore is listed and is valid.&lt;/P&gt;&lt;P&gt;3. Is your interrupt stack big enough?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 22:56:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218260#M5655</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-10-13T22:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218261#M5656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.-Yes I did.&lt;/P&gt;&lt;P&gt;2.-Yes, semaphore is listed and is valid.&lt;/P&gt;&lt;P&gt;3.-How can I check that? The error that comes is unknown error and not Interrupt stack overflow.&amp;nbsp; What I see on hyperterminal is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;***UNHANDLED INTERRUPT ***&lt;/P&gt;&lt;P&gt;Vector #: 2 0x2&lt;/P&gt;&lt;P&gt;Offset &amp;nbsp;&amp;nbsp; : 8 0x8&lt;/P&gt;&lt;P&gt;Task Id: 0x10002 Td_ptr 0x20001b68 Stack Frame: 0x20001030&lt;/P&gt;&lt;P&gt;Interrupt_nesting level: 2 &amp;nbsp;&amp;nbsp; PC:&amp;nbsp; 0x00040ccc&amp;nbsp;&amp;nbsp; SR:&amp;nbsp;&amp;nbsp; 0x2600&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I check if I have enough stack?&lt;/P&gt;&lt;P&gt;How can I increase it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 00:09:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218261#M5656</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-14T00:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218262#M5657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another thing.&lt;/P&gt;&lt;P&gt;Semaphore post works fine the first time. It fails the second time although the semaphore is valid before trying to post it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by MQXuser on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-13&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;06:22 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 00:22:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218262#M5657</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-14T00:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218263#M5658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Can you step in the _lwsem_post() and find out the reason of failure?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2009 13:23:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218263#M5658</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-10-14T13:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218264#M5659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;
QUEUE_ELEMENT_STRUCT_PTR  _queue_dequeue
   (
      /* [IN] the queue to use */
      QUEUE_STRUCT_PTR q_ptr
   )
{ /* Body */
   QUEUE_ELEMENT_STRUCT_PTR e_ptr;
  
   _int_disable();
   if (q_ptr-&amp;gt;SIZE == 0) {
      _int_enable();
      return(NULL);
   } /* Endif */
  
  &lt;SPAN&gt;&lt;SPAN&gt;_QUEUE_DEQUEUE(q_ptr, e_ptr);&lt;/SPAN&gt;&lt;/SPAN&gt;
   _int_enable();
   return(e_ptr);

} /* Endbody */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second time I try to post the semaphore the UNHANDLED INTERRUPT shows in hyperterminal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When debugging I cant step into _QUEUE_DEQUEUE&amp;nbsp; function. And thats when the error shows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have set a breakpoint in that instruction line and the semaphore is valid.&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>Wed, 14 Oct 2009 22:11:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218264#M5659</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-14T22:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218265#M5660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;How can I add more stack to INTERRUPTS?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 06:07:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218265#M5660</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-21T06:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218266#M5661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I replied here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=MQXGEN&amp;amp;thread.id=580" target="test_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=MQXGEN&amp;amp;thread.id=580&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2009 13:47:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218266#M5661</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-10-22T13:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: What are task queues?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218267#M5662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I know JuroV, thank you. Unfortunately increasing the Interrupt Stack didnt solve the problem. I am still trying to solve this.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 04:59:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/What-are-task-queues/m-p/218267#M5662</guid>
      <dc:creator>MQXuser</dc:creator>
      <dc:date>2009-10-23T04:59:16Z</dc:date>
    </item>
  </channel>
</rss>

