<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>USB double trouble</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25037/usb-double-trouble</link><description> 
Hello, 

 
I have a LPC2478 than I can address via 2 data sources: A CDC
device and a USB to RS-485 converter. I see something very strange:
If I try to use them in parallel, the USB CDC transfers are starting
to logged by my sniffer as &amp;quot;canceled&amp;quot; </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/144788?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 06:53:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b233162a-e0be-4ea5-a031-437a8db6adee</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
Tsuneo,&lt;/p&gt;

&lt;p&gt;
Thanks for your reply. I have found the cause: the UART interrupt
changing a global variable caused the CDC device to fail to reply
sometimes ! Thanks a lot for your advise!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/142522?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 06:49:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c4f6a3ee-992c-4b80-bb03-eb5f379bded9</guid><dc:creator>Tsuneo Chinzei</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;gt; I see that when I try to resend something to the device, a
setup stage is triggered. Why is that?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Sound like the CDC device driver try to reset the device USB
engine, by sending bus reset.&lt;br /&gt;
After bus reset, re-enumeration occurs. Even if the endpoint is
stalled, it is released on the enumeration.&lt;/p&gt;

&lt;p&gt;
As it doesn&amp;#39;t recover your problem, it means that your firmware
doesn&amp;#39;t implement USB_Configure_Event() properly.
USB_Configure_Event() is called when Set_Configuation request comes
on enumeration.&lt;br /&gt;
In this subroutine, your firmware should initialize the variables and
flags which relate to USB communication.&lt;/p&gt;

&lt;p&gt;
For example, suppose that you have a buffer to receive large data
from an OUT endpoint.&lt;br /&gt;
The buffer pointer is initialized to point to the top buffer in
USB_Configure_Event().&lt;br /&gt;
Also, your firmware have any status flags related to communication,
the flags are also initialized.&lt;/p&gt;

&lt;p&gt;
[code]&lt;br /&gt;
usbuser.c&lt;/p&gt;

&lt;p&gt;
#if USB_CONFIGURE_EVENT&lt;br /&gt;
void USB_Configure_Event (void) {&lt;/p&gt;

&lt;p&gt;
if (USB_Configuration) { /* Check if USB is configured */&lt;br /&gt;
[b] /* add your code here */[/b] }&lt;br /&gt;
} #endif&lt;br /&gt;
[/code]&lt;/p&gt;

&lt;p&gt;
Above suggestion is told just for recovery.&lt;br /&gt;
The original source of the trouble is still under question.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;gt; but money still talks :-)&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Call for demonstration of the analyzers to the representatives
:-)&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/139450?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 05:48:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:64d3ac55-c38b-4951-9225-344b3f79764e</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I&amp;#39;m playing all the right notes - but not necessarily in the
right order&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
you have no idea ;-)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/136036?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 05:47:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9683f517-38e6-4425-987d-3fe99a57afe8</guid><dc:creator>Non Keil Related</dc:creator><description>&lt;p&gt;&lt;p&gt;
That&amp;#39;s a bit like saying:&lt;/p&gt;

&lt;p&gt;
&amp;quot;I&amp;#39;m playing all the right notes - but not necessarily in the
right order.&amp;quot;&lt;/p&gt;

&lt;p&gt;
(Taken from Eric Morecambe, 1971.)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/125925?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 05:30:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ed259f64-b430-4261-89e8-9fbc95e884a1</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Isn&amp;#39;t it the time to get a hardware bus analyzer?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Tsuneo rocks, but money still talks :-)&lt;/p&gt;

&lt;p&gt;
Let&amp;#39;s assume the endpoint is stalled because of a pipe abort
issued by the device. I tried to call &amp;#39;USB_ClrStallEP&amp;#39; to clear it,
but no availe...How Do I deal with this situation using Keil
software? Maybe I&amp;#39;m doing the right thing in the wrong place...?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/115462?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 05:26:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:944fe730-c6a4-4ab5-8dbd-9afd4f0ac563</guid><dc:creator>Tsuneo Chinzei</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;gt; Bulk or Interrupt Transfer - Cancelled (Canceled)&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Maybe the endpoint is disabled, or STALLed.&lt;br /&gt;
Or, some trouble on the hub, if you are using a hub between the
device and the PC.&lt;br /&gt;
Just with this software sniffer log, I can&amp;#39;t specify which one is the
right one.&lt;/p&gt;

&lt;p&gt;
It&amp;#39;s the limitation of software sniffer, which just sees the
&amp;quot;software&amp;quot; traffic between the device drivers on PC, not the real bus
traffic directly.&lt;/p&gt;

&lt;p&gt;
You&amp;#39;ve developed many USB projects.&lt;br /&gt;
Isn&amp;#39;t it the time to get a hardware bus analyzer?&lt;br /&gt;
It&amp;#39;ll answer to above question immediately, and accelerate your
development.&lt;/p&gt;

&lt;p&gt;
Hardware analyzers,&lt;/p&gt;

&lt;p&gt;
Ellisys&lt;br /&gt;
&lt;a href="http://www.ellisys.com/"&gt;http://www.ellisys.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
PacketMaster&lt;br /&gt;
&lt;a href="http://www.mqp.com/usbdev.htm"&gt;http://www.mqp.com/usbdev.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
ITI&lt;br /&gt;

&lt;a href="http://www.internationaltestinstruments.com/StoreFront/Store_Prod1_1480A-USB-20-Protocol-Analyzer.aspx"&gt;www.internationaltestinstruments.com/.../Store_Prod1_1480A-USB-20-Protocol-Analyzer.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Beagle&lt;br /&gt;
&lt;a href="http://www.totalphase.com/"&gt;http://www.totalphase.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Also, check out this article.&lt;br /&gt;
USB 2.0 Bus/Protocol Analyzer Hardware/Software Comparison&lt;br /&gt;
&lt;a href="http://www.summitsoftconsulting.com/UsbAnalyzers.htm"&gt;www.summitsoftconsulting.com/UsbAnalyzers.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/103691?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 05:14:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:47bde219-a324-46a0-bc7c-e294d1fe4e53</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
can this be related? how can address this situation using the Keil
USB software suit?&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;After a driver issues an abort pipe request, it must wait for
all of its outstanding I/O requests on the pipe to complete, even if
the abort request fails. The driver may attempt to cancel outstanding
I/O requests, but it must never, under any circumstances, free IRP
memory for IRPs that it has not completed or IRPs that it does not
own.&lt;/i&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/90198?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 05:08:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ca2d2768-632b-4dbf-8da6-98d7526f5388</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
I see that when I try to resend something to the device, a setup
stage is triggered. Why is that? and why do my transfers still get
canceled?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB double trouble</title><link>https://community.arm.com/thread/57496?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2009 04:41:00 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8601bf47-133c-4214-80d2-e1e1562d14cc</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
here is a log of the moment it goes wrong:&lt;/p&gt;

&lt;pre&gt;
URB        0124    13:28:16.611    Bulk or Interrupt Transfer      91      out     01:01:02        8350A030h       00000132        ACPI    FC795660h
URB     0125    13:28:16.611    Bulk or Interrupt Transfer      91      out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC795660h
URB     0126-0125       13:28:16.611    Bulk or Interrupt Transfer      91      out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC795660h       Success (Success)
URB     0127-0124       13:28:16.611    Bulk or Interrupt Transfer      91      out     01:01:02        8350A030h       00000132        ACPI    FC795660h       Success (Success)
URB     0128-0123       13:28:16.611    Bulk or Interrupt Transfer      174     in      01:01:82        82F58B60h       USBPDO-15       usbhub  FC5AD368h       Success (Success)
URB     0129-0122       13:28:16.611    Bulk or Interrupt Transfer      174     in      01:01:82        8350A030h       00000132        ACPI    FC5AD368h       Success (Success)
URB     0130    13:28:16.611    Bulk or Interrupt Transfer      4096    in      01:01:82        8350A030h       00000132        ACPI    FC5AD368h
URB     0131    13:28:16.611    Bulk or Interrupt Transfer      4096    in      01:01:82        82F58B60h       USBPDO-15       usbhub  FC5AD368h
URB     0132    13:28:16.861    Bulk or Interrupt Transfer      91      out     01:01:02        8350A030h       00000132        ACPI    FC795660h
URB     0133    13:28:16.861    Bulk or Interrupt Transfer      91      out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC795660h
URB     0134-0133       13:28:16.861    Bulk or Interrupt Transfer      91      out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC795660h       Success (Success)
URB     0135-0132       13:28:16.861    Bulk or Interrupt Transfer      91      out     01:01:02        8350A030h       00000132        ACPI    FC795660h       Success (Success)
URB     0136    13:28:17.111    Bulk or Interrupt Transfer      91      out     01:01:02        8350A030h       00000132        ACPI    FC795660h
URB     0137    13:28:17.111    Bulk or Interrupt Transfer      91      out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC795660h
URB     0138-0137       13:28:17.111    Bulk or Interrupt Transfer      91      out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC795660h       Success (Success)
URB     0139-0136       13:28:17.111    Bulk or Interrupt Transfer      91      out     01:01:02        8350A030h       00000132        ACPI    FC795660h       Success (Success)
URB     0140    13:28:17.361    Bulk or Interrupt Transfer      91      out     01:01:02        8350A030h       00000132        ACPI    FC795660h
URB     0141    13:28:17.361    Bulk or Interrupt Transfer      91      out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC795660h
&lt;b&gt;URB  0142-0141       13:28:17.611    Bulk or Interrupt Transfer      0       out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC795660h       Cancelled (Canceled)
URB     0143-0140       13:28:17.611    Bulk or Interrupt Transfer      0       out     01:01:02        8350A030h       00000132        ACPI    FC795660h       Cancelled (Canceled)
URB     0144    13:28:17.861    Bulk or Interrupt Transfer      91      out     01:01:02        8350A030h       00000132        ACPI    FC5ACA38h
URB     0145    13:28:17.861    Bulk or Interrupt Transfer      91      out     01:01:02        82F58B60h       USBPDO-15       usbhub  FC5ACA38h &lt;/b&gt;
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>