<?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のトピックBug report: _time_delay() sometimes blocks for very long</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-report-time-delay-sometimes-blocks-for-very-long/m-p/342442#M11024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Freescale,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using MQX 4.0.2. I was using the _time_delay() function to loosely schedule tasks to perform their duties in a periodic way.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I encountered an infrequent bug where _time_delay() would block for a much longer time than specified, perhaps a hundred times as long or longer. I have not found the cause of the bug, but I can confirm that using MQX's _timer_start_oneshot_after() + _taskq_suspend() + _taskq_resume() solves the issue for me. That means the same sort of timing error is not present in the timer module.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For reference, I have included my own delay_ms() function's source code, which seems to work properly.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Richard Donkin&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339190"&gt;Scheduler_Delay.hpp.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339190"&gt;Scheduler_Delay.cpp.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339190"&gt;Simple_Map.hpp.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2014 09:08:17 GMT</pubDate>
    <dc:creator>richarddonkin</dc:creator>
    <dc:date>2014-09-05T09:08:17Z</dc:date>
    <item>
      <title>Bug report: _time_delay() sometimes blocks for very long</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-report-time-delay-sometimes-blocks-for-very-long/m-p/342442#M11024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Freescale,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using MQX 4.0.2. I was using the _time_delay() function to loosely schedule tasks to perform their duties in a periodic way.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I encountered an infrequent bug where _time_delay() would block for a much longer time than specified, perhaps a hundred times as long or longer. I have not found the cause of the bug, but I can confirm that using MQX's _timer_start_oneshot_after() + _taskq_suspend() + _taskq_resume() solves the issue for me. That means the same sort of timing error is not present in the timer module.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For reference, I have included my own delay_ms() function's source code, which seems to work properly.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Richard Donkin&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339190"&gt;Scheduler_Delay.hpp.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339190"&gt;Scheduler_Delay.cpp.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-339190"&gt;Simple_Map.hpp.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 09:08:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-report-time-delay-sometimes-blocks-for-very-long/m-p/342442#M11024</guid>
      <dc:creator>richarddonkin</dc:creator>
      <dc:date>2014-09-05T09:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Bug report: _time_delay() sometimes blocks for very long</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-report-time-delay-sometimes-blocks-for-very-long/m-p/342443#M11025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for sharing your solution (work around) in the community Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any time you think you find a bug I recommend to submit a Service Request at our web page &lt;A href="http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId=05"&gt;www.freescale.com/support&lt;/A&gt; this way technical support team can evaluate the case and report it to development team. I will take a look to it and submit a report if necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 20:42:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-report-time-delay-sometimes-blocks-for-very-long/m-p/342443#M11025</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2014-09-08T20:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Bug report: _time_delay() sometimes blocks for very long</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-report-time-delay-sometimes-blocks-for-very-long/m-p/342444#M11026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Carlos. I will submit it as a Service Request as well next time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 06:59:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Bug-report-time-delay-sometimes-blocks-for-very-long/m-p/342444#M11026</guid>
      <dc:creator>richarddonkin</dc:creator>
      <dc:date>2014-09-09T06:59:37Z</dc:date>
    </item>
  </channel>
</rss>

