<?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>topic Re: USB connection stuck in usb_host_start_transaction in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206277#M9792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;My experience has been that when you get "stuck" waiting for TOK_DNE, you're not actually stuck at all, but in an infinite (hardware) retry loop where the device is returning infinite NAKs.&amp;nbsp; If you turn of hardware retries (RETRY_DIS = 1) then you might be able to see the NAKs (you'll get a TOK_DNE for each) to confirm it...&amp;nbsp; Or if you put on a USB analyzer, that's even easier yet!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What I found was that many keys depend on a very specific (certainly against the spirit of the&amp;nbsp;SBC standard) order of commands during initialization, including magic sequences of Inquiry, Test Unit Ready, Request Sense, and Read Capacity.&amp;nbsp; Apparently they all expect the order that Windows happens to send, and if you do a different order, things get confused.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We eventually got every key we had (about 20-30, including card readers and multi-LUN devices, not to mention a half dozen MST-capable cameras) working with our initialization sequence, which is below if it helps.&amp;nbsp; The API is for our custom USB host/device driver (source available in skeleton.zip at &lt;A href="http://www.cpustick.com/downloads.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.cpustick.com/downloads.htm&lt;/A&gt;), but I believe the command sequence should be obvious from it if you want to try and mimic it.&amp;nbsp; (I definitely found keys CMX could not talk to for this reason, when attempting to isolate the bugs and going back and forth between drivers.)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;        // set interface        usb_setup(0, SETUP_TYPE_STANDARD, SETUP_RECIP_INTERFACE, 0x0b, 0, 0, 0, &amp;amp;setup);        rv = usb_control_transfer(&amp;amp;setup, NULL, 0);        //assert(rv == 0);        // get max lun        usb_setup(1, SETUP_TYPE_CLASS, SETUP_RECIP_INTERFACE, 0xfe, 0, 0, sizeof(max_lun), &amp;amp;setup);        max_rv = usb_control_transfer(&amp;amp;setup, &amp;amp;max_lun, sizeof(max_lun));        //assert(max_rv == 1 &amp;amp;&amp;amp; max == 0);                scsi_lun = 0;XXX_NEXTLUN_XXX:                // inquiry        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x12;  // inquiry        cdb[4] = 36;        rv = scsi_bulk_transfer(1, cdb, 6, buf, 36);        if (rv &amp;lt; 0) {            return rv;        }        assert(rv == 36);                // test unit ready        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x00;  // test unit ready        rv = scsi_bulk_transfer(0, cdb, 6, NULL, 0);                // request sense        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x03;  // request sense        cdb[4] = 18;        rv = scsi_bulk_transfer(1, cdb, 6, buf, 18);        if (rv &amp;lt; 0) {            return rv;        }        assert(rv);                // test unit ready        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x00;  // test unit ready        rv = scsi_bulk_transfer(0, cdb, 6, NULL, 0);        if (rv &amp;lt; 0 &amp;amp;&amp;amp; max_rv == 1 &amp;amp;&amp;amp; scsi_lun &amp;lt; max_lun) {            scsi_lun++;            goto XXX_NEXTLUN_XXX;        }        if (rv &amp;lt; 0) {            return rv;        }                    // read format capacities        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x23;  // read format capacities        cdb[8] = sizeof(buf);        rv = scsi_bulk_transfer(1, cdb, 12, buf, sizeof(buf));        assert(rv);                // read capacity        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x25;  // read capacity        rv = scsi_bulk_transfer(1, cdb, 10, buf, 8);        assert(rv == 8);                // request sense        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x03;  // request sense        cdb[4] = 18;        rv = scsi_bulk_transfer(1, cdb, 6, buf, 18);        assert(rv);        // test unit ready        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x00;  // test unit ready        rv = scsi_bulk_transfer(0, cdb, 6, NULL, 0);&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Nov 2008 01:42:24 GMT</pubDate>
    <dc:creator>RichTestardi</dc:creator>
    <dc:date>2008-11-29T01:42:24Z</dc:date>
    <item>
      <title>USB connection stuck in usb_host_start_transaction</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206276#M9791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;I use the CMX routines downloaded from Freescale Web Site, a MCF52211 and CodeWarrior 7.0. I have 2 important issues related to the usb_host_start_transaction() function:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;1- There is a USB key that can not be read/write or initialized at all. It is a standard USB key (1GB) and it is working correctly on my PC (Windows XP);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;2- During a transfer (read or write), when I remove a USB key, any key, the action is well supported most of the time, but some time not (1/20 with some keys, problematic each time for few keys);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;The common thing with these 2 problems is that the ColdFire is waiting infinitely in the following loop of usb_host_start_transaction() :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;while((MCF_USB_INT_STAT &amp;amp; (MCF_USB_INT_STAT_TOK_DNE | MCF_USB_INT_STAT_STALL | MCF_USB_INT_STAT_ERROR)) ==0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; if (MCF_USB_INT_STAT &amp;amp; MCF_USB_INT_STAT_USB_RST)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; evt_disconnect();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; tr_error=tre_disconnected;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; return((hcc_u16)-1u);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;I tried to resolve the problem by checking the following post:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fforums.freescale.com%2Ffreescale%2Fboard%2Fmessage%3Fboard.id%3DCFCOMM%26message.id%3D4944%26query.id%3D100893%23M4944" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #000000; font-size: 3;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=4944&amp;amp;query.id=100893#M4944" target="test_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=4944&amp;amp;query.id=100893#M4944&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fforums.freescale.com%2Ffreescale%2Fboard%2Fmessage%3Fboard.id%3DCFCOMM%26message.id%3D5182%26query.id%3D100901%23M5182" rel="nofollow" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&amp;amp;message.id=5182&amp;amp;query.id=100901#M5182&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;but without success.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #000000; font-size: 3;"&gt;Note: for point #1, I also tried the same USB key on a M52210DEMO board with original Freescale code on it to make sure it was not specific to my software project, but the same problem happen. It freezes after "Mass-storage driver started”.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style=": ; color: #000000;"&gt;Did someone got that problem too and overcome it?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style=": ; color: #000000;"&gt;Frelon&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2008 21:43:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206276#M9791</guid>
      <dc:creator>Frelon</dc:creator>
      <dc:date>2008-11-28T21:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: USB connection stuck in usb_host_start_transaction</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206277#M9792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;My experience has been that when you get "stuck" waiting for TOK_DNE, you're not actually stuck at all, but in an infinite (hardware) retry loop where the device is returning infinite NAKs.&amp;nbsp; If you turn of hardware retries (RETRY_DIS = 1) then you might be able to see the NAKs (you'll get a TOK_DNE for each) to confirm it...&amp;nbsp; Or if you put on a USB analyzer, that's even easier yet!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What I found was that many keys depend on a very specific (certainly against the spirit of the&amp;nbsp;SBC standard) order of commands during initialization, including magic sequences of Inquiry, Test Unit Ready, Request Sense, and Read Capacity.&amp;nbsp; Apparently they all expect the order that Windows happens to send, and if you do a different order, things get confused.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We eventually got every key we had (about 20-30, including card readers and multi-LUN devices, not to mention a half dozen MST-capable cameras) working with our initialization sequence, which is below if it helps.&amp;nbsp; The API is for our custom USB host/device driver (source available in skeleton.zip at &lt;A href="http://www.cpustick.com/downloads.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.cpustick.com/downloads.htm&lt;/A&gt;), but I believe the command sequence should be obvious from it if you want to try and mimic it.&amp;nbsp; (I definitely found keys CMX could not talk to for this reason, when attempting to isolate the bugs and going back and forth between drivers.)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;        // set interface        usb_setup(0, SETUP_TYPE_STANDARD, SETUP_RECIP_INTERFACE, 0x0b, 0, 0, 0, &amp;amp;setup);        rv = usb_control_transfer(&amp;amp;setup, NULL, 0);        //assert(rv == 0);        // get max lun        usb_setup(1, SETUP_TYPE_CLASS, SETUP_RECIP_INTERFACE, 0xfe, 0, 0, sizeof(max_lun), &amp;amp;setup);        max_rv = usb_control_transfer(&amp;amp;setup, &amp;amp;max_lun, sizeof(max_lun));        //assert(max_rv == 1 &amp;amp;&amp;amp; max == 0);                scsi_lun = 0;XXX_NEXTLUN_XXX:                // inquiry        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x12;  // inquiry        cdb[4] = 36;        rv = scsi_bulk_transfer(1, cdb, 6, buf, 36);        if (rv &amp;lt; 0) {            return rv;        }        assert(rv == 36);                // test unit ready        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x00;  // test unit ready        rv = scsi_bulk_transfer(0, cdb, 6, NULL, 0);                // request sense        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x03;  // request sense        cdb[4] = 18;        rv = scsi_bulk_transfer(1, cdb, 6, buf, 18);        if (rv &amp;lt; 0) {            return rv;        }        assert(rv);                // test unit ready        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x00;  // test unit ready        rv = scsi_bulk_transfer(0, cdb, 6, NULL, 0);        if (rv &amp;lt; 0 &amp;amp;&amp;amp; max_rv == 1 &amp;amp;&amp;amp; scsi_lun &amp;lt; max_lun) {            scsi_lun++;            goto XXX_NEXTLUN_XXX;        }        if (rv &amp;lt; 0) {            return rv;        }                    // read format capacities        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x23;  // read format capacities        cdb[8] = sizeof(buf);        rv = scsi_bulk_transfer(1, cdb, 12, buf, sizeof(buf));        assert(rv);                // read capacity        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x25;  // read capacity        rv = scsi_bulk_transfer(1, cdb, 10, buf, 8);        assert(rv == 8);                // request sense        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x03;  // request sense        cdb[4] = 18;        rv = scsi_bulk_transfer(1, cdb, 6, buf, 18);        assert(rv);        // test unit ready        memset(cdb, 0, sizeof(cdb));        cdb[0] = 0x00;  // test unit ready        rv = scsi_bulk_transfer(0, cdb, 6, NULL, 0);&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2008 01:42:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206277#M9792</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2008-11-29T01:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: USB connection stuck in usb_host_start_transaction</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206278#M9793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Rich, thank you for your answer, it gives us new ideas of sequence to use to be more compatible. Also I will check if there is some information about the order that Windows sends these commands.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Frelon&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2008 06:00:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206278#M9793</guid>
      <dc:creator>Frelon</dc:creator>
      <dc:date>2008-11-29T06:00:20Z</dc:date>
    </item>
    <item>
      <title>Fixed CMX Host reliability and lockup issues.</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206279#M9794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;STRONG&gt;Simple Change:&lt;/STRONG&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;&lt;STRONG&gt;From&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;'static void demo_process(void)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (tr_error != tre_none) demo_info.state=DMST_BADDEV;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&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;&lt;STRONG&gt;To&lt;/STRONG&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;&lt;/FONT&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;'static void demo_process(void)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (tr_error != tre_none)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Reset Device&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; demo_info.nlun = DMST_NODEV;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; demo_info.state =DMST_NODEV;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Reset USB&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host_init();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scsi_init();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&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;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Background:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;------------------&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Expanded error reporting&amp;nbsp;of &amp;nbsp;"if (tr_error != tre_none) " to report all errors&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;/* Error codes. */&lt;BR /&gt;typedef enum {&lt;BR /&gt;&amp;nbsp; tre_none=0,&lt;BR /&gt;&amp;nbsp; tre_not_running,&amp;nbsp; /* host operation disabled */&lt;BR /&gt;&amp;nbsp; tre_no_device,&amp;nbsp;&amp;nbsp;&amp;nbsp; /* no device connected */&lt;BR /&gt;&amp;nbsp; tre_disconnected, /* device has been disconnected */&lt;BR /&gt;&amp;nbsp; tre_stall,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* endpoint halted by device*/&lt;BR /&gt;&amp;nbsp; tre_data_error,&amp;nbsp;&amp;nbsp; /* communicatin error (CRC, etc...)*/&lt;BR /&gt;&amp;nbsp; tre_silent,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* device returned no handshake at all */&lt;BR /&gt;&amp;nbsp; tre_no_ep&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* endpoint not configured */&lt;BR /&gt;} tr_error_t;&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;Found CMX&amp;nbsp;errors and&amp;nbsp;lockups when&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;1).&amp;nbsp;With flash drive repeat wiggle/ removal / re insert, causes&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;tre_data_error "Communication error (CRC, etc...)" then gets stuck in&lt;/FONT&gt; &lt;FONT face="Arial" size="2"&gt;while(MCF_USB_CTL &amp;amp; MCF_USB_CTL_TXDSUSPEND_TOKBUSY) (DemoJM &amp;amp; Custom PCB)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;2). No Drive, using internal regulator (touch usb connector &amp;nbsp;D+/D- Lines) causes&amp;nbsp;&amp;nbsp;&lt;FONT face="Arial" size="2"&gt;tre_data_error "Communication error (CRC, etc...)" then gets stuck in&lt;/FONT&gt; long stack_size(byte pattern) (Custom PCB)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;David&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="mailto:david@designfeats.com" rel="nofollow" target="_blank"&gt;&lt;FONT size="2"&gt;david@designfeats.com&lt;/FONT&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Perth, Australia&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 06:55:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206279#M9794</guid>
      <dc:creator>DMV</dc:creator>
      <dc:date>2010-07-21T06:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed CMX Host reliability and lockup issues.</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206280#M9795</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:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-connection-stuck-in-usb-host-start-transaction/m-p/206280#M9795</guid>
      <dc:creator>DMV</dc:creator>
      <dc:date>2011-02-16T09:17:27Z</dc:date>
    </item>
  </channel>
</rss>

