<?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: MCF52235 - Call to socket() fails</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167254#M1688</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcos.&amp;nbsp; I had wondered about that too because it looked like some form of deadlock.&amp;nbsp; I tried lowering the priorities of my two tasks but that didn't help.&amp;nbsp; In module "rtcsglob.c" the global parameter _RTCSTASK_priority is set to 6 so I assume that is the priority that the RTCS task is using.&amp;nbsp; My Task A and Task B have lower priorities of 10 and 9 respectively.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Dec 2010 02:52:00 GMT</pubDate>
    <dc:creator>ArtyCF</dc:creator>
    <dc:date>2010-12-07T02:52:00Z</dc:date>
    <item>
      <title>MCF52235 - Call to socket() fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167252#M1686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I've been stuck for a while now on a problem trying to create a socket.&lt;BR /&gt;I have an application consisting of two tasks (lets call them Task A and Task B).&amp;nbsp; Task A is the main task, automatically&amp;nbsp; started by MQX.&amp;nbsp; Task A initializes RTCS, sets up the Ethernet device, obtains an IP address using DHCP and creates and starts Task B.&amp;nbsp; Task B is supposed to create a socket and then listen for incoming remote connections.&amp;nbsp; One of the first things it does is attempt to create the listening socket by calling the RTCS socket() function.&amp;nbsp; However, this call never returns and worse, no other tasks appear to run after that.&amp;nbsp; If I break the execution and step through the code I can see that the program seems to be looping inside the MQX dispatcher.&amp;nbsp; Even the RTCS task is no longer running because I can't even ping my board.&lt;BR /&gt;&lt;BR /&gt;If I try calling socket() in Task A there is no problem at all and a handle to a new socket is returned.&lt;BR /&gt;&lt;BR /&gt;Am I missing something fundamental here?&amp;nbsp; I've run out of things to try and I can't find an example where a socket is created on a task that is not the same one that initialized RTCS.&lt;BR /&gt;&lt;BR /&gt;Any help or suggestions would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Dec 2010 07:13:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167252#M1686</guid>
      <dc:creator>ArtyCF</dc:creator>
      <dc:date>2010-12-06T07:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: MCF52235 - Call to socket() fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167253#M1687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check if the priority of the Task B is lower than the priority of the RTCS task.&lt;/P&gt;&lt;P&gt;Marcos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Dec 2010 20:51:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167253#M1687</guid>
      <dc:creator>madifazio</dc:creator>
      <dc:date>2010-12-06T20:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: MCF52235 - Call to socket() fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167254#M1688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcos.&amp;nbsp; I had wondered about that too because it looked like some form of deadlock.&amp;nbsp; I tried lowering the priorities of my two tasks but that didn't help.&amp;nbsp; In module "rtcsglob.c" the global parameter _RTCSTASK_priority is set to 6 so I assume that is the priority that the RTCS task is using.&amp;nbsp; My Task A and Task B have lower priorities of 10 and 9 respectively.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 02:52:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167254#M1688</guid>
      <dc:creator>ArtyCF</dc:creator>
      <dc:date>2010-12-07T02:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: MCF52235 - Call to socket() fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167255#M1689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you call the socket() function? Did you check the stack size of the task B?.&lt;/P&gt;&lt;P&gt;When you break the execution, can you see the status of Task B?&lt;/P&gt;&lt;P&gt;The priorities of the tasks seems to be ok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 04:32:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167255#M1689</guid>
      <dc:creator>madifazio</dc:creator>
      <dc:date>2010-12-07T04:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: MCF52235 - Call to socket() fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167256#M1690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently my Task B stack was too small at 500 bytes (in comparison Task A stack was 3000 bytes).&amp;nbsp; I increased the size of the Task B stack to 3000 bytes and now it works.&amp;nbsp; Somehow when I was looking for differences between the two tasks I missed that glaringly obvious fact &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;. &amp;nbsp; I'm surprised that a call to socket() consumes so much of the stack but my background has mostly been with 8-bit microcontrollers where only a few hundred bytes are available.&amp;nbsp; I guess I've learned the hard way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In any case, I'm finally moving forward again.&amp;nbsp; Thank you for your interest and suggestions Marcos, I'm grateful for all your help with this.&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>Tue, 07 Dec 2010 22:33:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MCF52235-Call-to-socket-fails/m-p/167256#M1690</guid>
      <dc:creator>ArtyCF</dc:creator>
      <dc:date>2010-12-07T22:33:10Z</dc:date>
    </item>
  </channel>
</rss>

