<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: CMX/ColdFire USB Stuck In Loop(s)</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210470#M10221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;You're totally welcome -- glad I could help!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I also have source code posted for my dual-mode (host/device)&amp;nbsp;USB driver&amp;nbsp;in sources/usb.[ch] contained in "skeleton.zip" from the page:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &lt;A href="http://www.cpustick.com/downloads.htm" rel="nofollow" target="_blank"&gt;http://www.cpustick.com/downloads.htm&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There are 51jm128 as well as 5222x and 5223x projects there.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I opted not to use CMX, and instead&amp;nbsp;built&amp;nbsp;my USB driver from scratch, after encountering a few problems early on with host mode functionality.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I figure it always helps to have more examples of how folks do things, so I post it all. :smileyhappy:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-- Rich&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Dec 2008 05:46:49 GMT</pubDate>
    <dc:creator>RichTestardi</dc:creator>
    <dc:date>2008-12-19T05:46:49Z</dc:date>
    <item>
      <title>CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210467#M10218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I am using a JM128 and have found two instances where the CMX code will hang in a loop.&amp;nbsp; One example is in Host mode performing a read when the client has no data.&amp;nbsp; The device hangs in this loop &amp;nbsp;&amp;nbsp;&amp;nbsp; while((MCF_USB_INT_STAT &amp;amp; (MCF_USB_INT_STAT_TOK_DNE | MCF_USB_INT_STAT_STALL | MCF_USB_INT_STAT_ERROR)) ==0)&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;as neither a Token Done, Stall or Error event occur.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I've added a timeout which lets me exit (similar to a pipe policy timeout on a WinUSB read) but I have yet to add any USB SIE clean up code.&amp;nbsp; Specifically, I've not found any reference to "turning off" or terminating a pending Token in the data sheet.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I assume I must write something to the Token register (although the data sheet says only IN, OUT and SETUP Tokens are valid) then clear the own bit for the descriptor in question.&amp;nbsp; However, you know, when you assume you make a ...........&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Has anyone had the need to terminate an active token?&amp;nbsp; If so, can you share how you went about cleaning up the USB SIE once you timed out?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I've had a similar problem with IN transactions in client mode where I get stuck in a waiting on client Tx to complete.&amp;nbsp; I got past this problem by nuking the client services all together which is a bit silly but it worked.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Bill&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 21:16:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210467#M10218</guid>
      <dc:creator>lolachampcar</dc:creator>
      <dc:date>2008-12-16T21:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210468#M10219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I doubt this is the only way to do this, but for the host case where the device NAKs when it has no data, then you can turn on the RETRY_DIS bit in the endpoint, like you'd do for an interrupt endpoint, and then you'll receive a TOK_DNE for each NAK, and you can gracefully decide when to give up, with the BD no longer owned by the SIE.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This is also a good debugging method to tell when you're getting infinite NAKs back from a device (which I assume is happening to you!!!).&amp;nbsp; Note that it does have a slight performance impact on devices (like many) which&amp;nbsp;intentionally return one or two NAKs in the normal sequence of processing a request, as the retries happen more slowly when initiated by sw.&amp;nbsp; So you might want to do this only on endpoints with the issue (no data&amp;nbsp;indicated by&amp;nbsp;NAK).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-- Rich&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 01:05:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210468#M10219</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2008-12-19T01:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210469#M10220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Rich,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I can not thank you enough.&amp;nbsp; That one post was more help then I've gotten from the guys that own the silicon in a month!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I needed a pipe timeout so I extended the retry by one for every NAK as long as my timer was running.&amp;nbsp; Once the timer expired, I let it retry out and return gracefully.&amp;nbsp; I now have a pipe timeout without a hung SIE.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks Again,&lt;/DIV&gt;&lt;DIV&gt;Bill&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 05:34:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210469#M10220</guid>
      <dc:creator>lolachampcar</dc:creator>
      <dc:date>2008-12-19T05:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210470#M10221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;You're totally welcome -- glad I could help!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I also have source code posted for my dual-mode (host/device)&amp;nbsp;USB driver&amp;nbsp;in sources/usb.[ch] contained in "skeleton.zip" from the page:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &lt;A href="http://www.cpustick.com/downloads.htm" rel="nofollow" target="_blank"&gt;http://www.cpustick.com/downloads.htm&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There are 51jm128 as well as 5222x and 5223x projects there.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I opted not to use CMX, and instead&amp;nbsp;built&amp;nbsp;my USB driver from scratch, after encountering a few problems early on with host mode functionality.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I figure it always helps to have more examples of how folks do things, so I post it all. :smileyhappy:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-- Rich&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 05:46:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210470#M10221</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2008-12-19T05:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210471#M10222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am currently using the MC9S08JM60 in my first USB enabled project.&amp;nbsp; I have successfully (so far) managed to get the CMX stack to run in a Processor Expert created project.&amp;nbsp; (Generic HID mode)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However I am still on the steep part of the USB learning curve,&amp;nbsp; and am worried that things like the subject of this thread are going to bite me when I least expect it.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So,&amp;nbsp; have any of you used the 08JM USB CMX stack?&amp;nbsp; If so does it suffer a similar bug?&amp;nbsp; How similar are the MCF51 and 9S08 flavors of the CMX code?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am contemplating trading up the the MCF51JM in order to benefit from the colective wisdom here in the land of 32bits...&amp;nbsp; &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;&amp;nbsp; The MCF would be overkill for my application though.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;At any rate,&amp;nbsp; thanks for your attention.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Bob Bailey&lt;/DIV&gt;&lt;DIV&gt;N8DRK&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jan 2009 08:10:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210471#M10222</guid>
      <dc:creator>TurboBob</dc:creator>
      <dc:date>2009-01-01T08:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210472#M10223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;From a cursory look at the .c files, it seems the 9S08 drivers are quite&amp;nbsp;different from the 51JM128 and 52223 drivers, which are similar except for what seems to be some requisite interrupt and pull-up differences.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The hardware on all three chips seems similar (based on the old TDI/Chipidea/MIPS USB FS core, I think someone told me?), though the 9S08 is non-OTG, right?, so that is one difference to be wary of.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I actually ported my USB driver to the PIC32 yesterday and today, with almost no effort (just interrupt and pull-up changes, again) -- but that was a move from an OTG to an OTG USB core, which I believe are identical...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-- Rich&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by Rich T on &lt;SPAN class="date_text"&gt;2008-12-31&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;05:56 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jan 2009 08:54:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210472#M10223</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2009-01-01T08:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210473#M10224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for the reply.&amp;nbsp; You are correct,&amp;nbsp; the 08 USB has no hosting capability or OTG.&lt;BR /&gt;&lt;BR /&gt;I ordered a MCF51 chip for my demo kit ( I have a really early JM kit),&amp;nbsp; I want to play with porting my 8 bit code 'upwards'.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I need to spend some time poking thru the CMX code to understand what's going on.&lt;BR /&gt;&lt;BR /&gt;After all these years working with 8 bit machines,&amp;nbsp; it will be fun to see what the same code will do in a 32 bit machine.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Bob&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jan 2009 15:08:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210473#M10224</guid>
      <dc:creator>TurboBob</dc:creator>
      <dc:date>2009-01-01T15:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210474#M10225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I think you'll love the 51JM128.&amp;nbsp; If you want more sample code for it (accessing flash, peripherals, etc.), I have some on that link above.&amp;nbsp; And I'm always happy to help by e-mail (&lt;A href="mailto:rich@testardi.com" rel="nofollow" target="_blank"&gt;rich@testardi.com&lt;/A&gt;).&amp;nbsp; Good luck!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-- Rich&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jan 2009 19:02:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210474#M10225</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2009-01-01T19:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210475#M10226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;thanks,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I browsed your site and app notes,&amp;nbsp; I will give it a try next week once my chips arrive.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Bob&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by TurboBob on &lt;SPAN class="date_text"&gt;2009-01-01&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;06:13 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2009 07:12:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210475#M10226</guid>
      <dc:creator>TurboBob</dc:creator>
      <dc:date>2009-01-02T07:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210476#M10227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Rich T,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It seems finally I have someone who could give me directions =).&lt;/DIV&gt;&lt;DIV&gt;I am also in the steep learning curve of the USB protocol and hence, I am struggling since never before.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I've used the 9SO8JM to sample a couple of analog signals and send these data through the USB port to a PC. It worked fine and I displayed the raw/processed signals with Labview.&lt;/DIV&gt;&lt;DIV&gt;However, as&amp;nbsp;we&amp;nbsp;know, the S08JM doesn't have USB host capabilities. This is a drawback for us, as&amp;nbsp; we intend(ed) to port that code to the MCF51JM, as it has a USB host controller and it is supposed to be connected to&amp;nbsp;PDAs/Pocket PCs (well.... at least the A/D conversions can still remain). The majority, as far as we are concerned, are USB clients only.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hence we need to move on to the CMX&amp;nbsp; host stack&amp;nbsp;for the MCF51JM. They have two projects: the mass storage and the HID class device drivers only. We thought that, as the PPC is treated as a mass storage device, it should have an interface with the class code correspondant, and the endpoint descriptors. Which doesn't happen! The ifc_desc returns zero interfaces and the device is not properly configurated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Anyway, I was wondering with your experience,&amp;nbsp;do you think it would still be&amp;nbsp;quicker to keep tweaking those examples around and make the enum/configuration work (although we are not sure how to finalize the conf. process), use the processor expert or use the skeletal code you have in your website (which btw didn't come with the 51jm128.mcp)?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any kind of information is appreciated, as you probable see we are kind of lost...&lt;/DIV&gt;&lt;DIV&gt;Thanks for the time of reading this huge message!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Edgar Charry&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 11:56:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210476#M10227</guid>
      <dc:creator>echarry</dc:creator>
      <dc:date>2009-01-29T11:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210477#M10228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;Edgar,&lt;NAMESPACE prefix="o" ns="urn:schemas-microsoft-com:office:office"&gt;&lt;/NAMESPACE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;One of my goals was to use "generic" WinCE devices as Clients to the JM128 (in Host mode).&amp;nbsp; The goal was to use inexpensive devices like some of the GPS navigation units as a hand held user interface to our products.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;This part of the project has turned out to be the most difficult.&amp;nbsp; Here were some of the major barriers-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;(1) most CE devices in USB Client mode use ActiveSync or a proprietary protocol to communicate across the only port on the device, the USB port.&amp;nbsp; You will need to manage that process so as to claim the USB port for your needs when needed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;(2) using ActiveSync was not an option as it is undocumented&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;(3) if you use existing CE "appliance" type hardware like the GPS units, you will need to "hack" your application into the existing boot structure.&amp;nbsp; Your hack will need to disable (and enable if need be) the above mentioned ActiveSync support.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;(4) once you are "in" and your application is running on the CE Client and you have USB access, you will need to craft your USB structure with the JM128 being the USB Host and initiating all communication while the CE Client will actually be the one initiating activity.&amp;nbsp; We did this by having the JM poll the CE device for commands.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #51626f; FONT-FAMILY: Arial"&gt;(5) we needed the JM device to still act as a Client and thus needed the ability to intelligently recognize who was connected and act appropriately.&amp;nbsp; Our solution consisted of a host and client connector on the JM device of which only one could be connected.&amp;nbsp; Client was detected by the presence of Vusb while we polled for Host.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We found this worked better than trying to fit the OTG model to our environment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Times New Roman" color="#000000" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" color="#000000" size="3"&gt;We continue down this path as there is no way we can build a 4.3” color TFT touch screen user interface for the $100 price points you can find out of China.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If your project permits, you may want to consider building your own hardware&amp;nbsp;using one of the ARM development platforms which come with all the necessary CE (and Linux in some cases) board support package to build your custom operating system with USB Host support.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Times New Roman" color="#000000" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" color="#000000" size="3"&gt;I hope the above is of some help.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Times New Roman" color="#000000" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" color="#000000" size="3"&gt;Bill&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 20:56:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210477#M10228</guid>
      <dc:creator>lolachampcar</dc:creator>
      <dc:date>2009-01-29T20:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210478#M10229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Hi Edgar,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;If you download this:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp; &lt;A href="http://www.cpustick.com/downloads/skeleton.zip" rel="nofollow" target="_blank"&gt;http://www.cpustick.com/downloads/skeleton.zip&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;The first file in the zip should be 51jm128.mcp, and if you open that with CW6.2, it has a full host mode USB driver that we have used to talk to flash drives, etc. -- you want to build the "Skeleton 51jm128 target".&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;The trick is you have to set "usb_host_mode" to true before you call usb_initialize() to get host mode functionality turned on.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Then you should be able to see that "scsi_attached" gets set true when you connect a USB mass storage device.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Are you using a DEMOJM board to test this?&amp;nbsp; If so, you also have to do some jumper configuration to turn on the 5V USB power -- we were using custom HW which was different than the DEMOJM in that regard.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;We found in building a portable encryption unit that the CMX host stack worked with maybe 40% of the memory cards out there -- many have different initialization requirements, and if you don't follow them exactly, they don't talk.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;You can see where we ended up in the&amp;nbsp;the attached file (which&amp;nbsp;is not in the public zip archive), which implemented the block level caching (and memory card initialization which is critical).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Basically, when we were done, our code worked with &amp;gt;20 memory cards and close to 10 digital cameras, which all expose mass storage interfaces, so we think it is pretty robust now.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;I should be around all weekend and next week, so feel free to return with questions or whatever.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;-- Rich (&lt;A href="mailto:rich@testardi.com" rel="nofollow" target="_blank"&gt;rich@testardi.com&lt;/A&gt;)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;PS we also have fat32 code adapted from here &lt;A href="http://www.larwe.com/zws/products/dosfs/index.html" rel="nofollow" target="_blank"&gt;http://www.larwe.com/zws/products/dosfs/index.html&lt;/A&gt;&amp;nbsp;which I can (and have :smileyhappy: mailed you, which is not appropriate for me to republish here.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by Rich T on &lt;SPAN class="date_text"&gt;2009-01-30&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:03 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Jan 2009 01:01:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210478#M10229</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2009-01-31T01:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: CMX/ColdFire USB Stuck In Loop(s)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210479#M10230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See post&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/78726#78726" title="https://community.freescale.com/message/78726#78726"&gt;https://community.freescale.com/message/78726#78726&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 09:17:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CMX-ColdFire-USB-Stuck-In-Loop-s/m-p/210479#M10230</guid>
      <dc:creator>DMV</dc:creator>
      <dc:date>2011-02-16T09:17:01Z</dc:date>
    </item>
  </channel>
</rss>

