On Wed, 2 Aug 2006, Aras Vaichas wrote:

> Is it possible to force a USB device port to "low speed"?

Depends on the hardware.

> I am running an at91rm9200 based board with Linux 2.6.16.

I don't know anything about that hardware, sorry.

> We suspect we might be having some problems with a radiation source of around 
> 13MHz that might be causing problems with the 12Mbps full speed USB, we'd 
> like 
> to try running it at the 1.5Mbps speed to see if this fixes the problem (and 
> confirms our suspicions).
> 
> As a quick test I tried moving the pull-up resistor to the D- line, but that 
> doesn't work and the host doesn't recognise the device at all.

You don't even get a "low-speed device connected" message in the debugging 
log?  That's surprising; nothing more than a pull-up resistor should be 
needed for that.  Even with no device controller at all you should still 
get that message.

> I looked at some of the platform specific code and noticed that it checks to 
> see if the device is configured as "full speed". Is there a particular reason 
> for this?
> 
> e.g. drivers/usb/gadget/at91_udc.c
> 
>          if (!driver
>                          || driver->speed != USB_SPEED_FULL
>                          || !driver->bind
>                          || !driver->unbind
>                          || !driver->setup) {
>                  DBG("bad parameter.\n");
>                  return -EINVAL;
>          }
> 
> Can I set to this to USB_SPEED_LOW without creating other issues?
> e.g. at this point?
>                          /* enable ep0 */
>                          at91_udp_write(AT91_UDP_CSR(0), AT91_UDP_EPEDS | 
> AT91_UDP_EPTYPE_CTRL);
>                          udc->gadget.speed = USB_SPEED_FULL;
>                          udc->suspended = 0;
>                          at91_udp_write(AT91_UDP_IER, AT91_UDP_EP(0));

No you can't.  The requirements for low-speed devices are more strict than 
they are for full-speed devices.  For example, the maxpacket value of ep0 
has to be 8 at low speed, but it is allowed to be any power of 2 between 8 
and 64 at full speed.  Also, iso and bulk transfers are allowed at full 
speed but they are illegal at low speed.

Not to mention that the electrical signals on the bus differ for the two 
speeds.  Hardware capable of working with 12 MHz signals might not be 
capable of working with 1.5 MHz signals.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to