<?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: How to stop RTCS_ping() while awaiting ICMP echo reply before the TIMEOUT expires</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640971#M17089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Bing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you check the state and priority of ping_task after restart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In MQX, Task can create, destroy , block, set ready and restart.&lt;/P&gt;&lt;PRE style="color: #000000; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"&gt;_task_create() _task_destroy() _task_block() _task_ready() _task_restart()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Mar 2017 03:34:10 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2017-03-15T03:34:10Z</dc:date>
    <item>
      <title>How to stop RTCS_ping() while awaiting ICMP echo reply before the TIMEOUT expires</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640970#M17088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;hello&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm using MQX 4.2.0.2 RTCS_ping() on FRDM-K64F.&lt;/P&gt;&lt;P&gt;I created a PING task using RTCS_ping() to regularly check the network.&lt;BR /&gt;And I know it will block the PING task while await ICMP echo reply.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now the situation is, &lt;BR /&gt;After RTCS_ping() be executed, while awaiting ICMP echo reply before the TIMEOUT expires,&lt;BR /&gt;in some cases, PING task needs to be restart using _task_restart() by the MAIN task.&lt;BR /&gt;Although the return value of _task_restart() is MQX_OK,&lt;BR /&gt;in fact, PING task doesn't work after 'restart'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Does anyone know how to stop the wait of ICMP echo reply before the TIMEOUT expires?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 10:39:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640970#M17088</guid>
      <dc:creator>icelee</dc:creator>
      <dc:date>2017-03-10T10:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop RTCS_ping() while awaiting ICMP echo reply before the TIMEOUT expires</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640971#M17089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Bing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you check the state and priority of ping_task after restart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In MQX, Task can create, destroy , block, set ready and restart.&lt;/P&gt;&lt;PRE style="color: #000000; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"&gt;_task_create() _task_destroy() _task_block() _task_ready() _task_restart()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 03:34:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640971#M17089</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2017-03-15T03:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop RTCS_ping() while awaiting ICMP echo reply before the TIMEOUT expires</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640972#M17090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Daniel:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;As your suggest, &lt;BR /&gt;I added "STATE of TD_STRUCT_PTR" and "_task_get_priority" to get the state and priority of PING task&lt;BR /&gt;before restart and after restart.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;[result is below]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;before restart --- Ping task priority: 10.&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-- priority is 10&lt;BR /&gt;before restart --- Ping task state: 13.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-- state is SEND_BLOCKED&lt;/P&gt;&lt;P&gt;..._task_restart() Ping_task OK.&lt;/P&gt;&lt;P&gt;after restart --- Ping task priority: 10.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-- priority is 10&lt;BR /&gt;after restart --- Ping task state: 2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-- state is SEND_BLOCKED&lt;/P&gt;&lt;P&gt;... after 1 sec get again&lt;/P&gt;&lt;P&gt;after restart --- Ping task priority: 10.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-- priority is 10&lt;BR /&gt;after restart --- Ping task state: 11.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-- state is UNHANDLED_INT_BLOCKED&lt;/P&gt;&lt;P&gt;... and then always get the same results&lt;/P&gt;&lt;P&gt;after restart --- Ping task priority: 10.&lt;BR /&gt;after restart --- Ping task state: 11.&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;After _task_restart(), the state of PING task was from &lt;STRONG&gt;READY&lt;/STRONG&gt; turn to &lt;STRONG&gt;UNHANDLED_INT_BLOCKED&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;It seems that unhandled interrupt or exception occurs happened ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Bing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2017 11:53:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640972#M17090</guid>
      <dc:creator>icelee</dc:creator>
      <dc:date>2017-03-17T11:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop RTCS_ping() while awaiting ICMP echo reply before the TIMEOUT expires</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640973#M17091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the way to stop RTCS_ping() while awaiting ICMP echo reply before the TIMEOUT expires.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;[Solution]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;point is &lt;BR /&gt;・Remove the ICMP echo send info in ICMP config chain (Can get by RTCS_getcfg(ICMP))&lt;BR /&gt;・Cancel the TCPIP timer event used for PING expire (TCPIP_Event_cancel())&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Refer to the ICMP echo reply code can be achieved.&lt;/P&gt;&lt;P&gt;---------------------------------------------------------&lt;BR /&gt;Freescale_MQX_4_2\rtcs\source\tcpip\icmp.c&lt;/P&gt;&lt;P&gt;void ICMP_service(){&lt;BR /&gt;...&lt;BR /&gt;&amp;nbsp;&amp;nbsp; case ICMPTYPE_ECHO_REPLY:&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;---------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now PING task runs well after _task_restart().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 02:37:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-ping-while-awaiting-ICMP-echo-reply-before-the/m-p/640973#M17091</guid>
      <dc:creator>icelee</dc:creator>
      <dc:date>2017-03-28T02:37:24Z</dc:date>
    </item>
  </channel>
</rss>

