USB Link speed configuration - need help

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a question regarding whether it is possible to do the following:

PC (Win 10) >>> USB 2.0 Hub >>>  USB 2.0 device (operating at Full Speed - 12MHz)

The device connected is set to run at Full speed but I want to 'FORCE' the PC host to communicate with the device at Low speed (1.5 MHz) only.  Is there a configuration method (driver, etc.) to make this happen?  I've heard some suggest to install a USB 1.x hub between the host and device but that wouldn't guarantee a low speed connection as 1.x also supports Full Speed.

I went to the USB.org website thinking there was a true 'forum' to post this question but couldn't seem to find it.

Any help offered would be appreciated.
Jim
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rfdes wrote:
The device connected is set to run at Full speed but I want to 'FORCE' the PC host to communicate with the device at Low speed (1.5 MHz) only.

I can't imagine why you would want to do that?

A far easier way to make the device not work would be, simply, don't plug it in :)

 

The speed is determined by a 1.5k  pullup (in the device) to one of the data lines, pullup to D+ to signal full speed or to D- to signal low speed.

You might be bable to take the device apart and hack it to apply its pullup to the other data line, so the host will see it as a low speed device.

But I still can't imagine what is the point.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rfdes wrote:
Is there a configuration method (driver, etc.) to make this happen?
Not driver, electronics.

USB in a NutShell - Chapter 2 - Hardware - Speed Identification

A use case is first enumeration as HID (IIRC low-speed) with second enumeration as CDC (full-speed); HID is usually enough for loads with CDC for application data flows.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wasn't aware of any device that would ever need to switch between low speed and full speed, seems like a completely pointless thing to do, you either design the device to support low speed or full speed, no reason to support both.

But I might be wrong.

For a high speed device then, yes, it has to connect first at full speed then does some extra 'dance' to switch to high speed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

MrKendo wrote:
I wasn't aware of any device that would ever need to switch between low speed and full speed, ...
ATmega_U4 and some AT90USB have the speed switches.

ATmega16U4/32U4 Datasheet

(page 263)

 

edit :

XMEGA C has ATTACH and SPEED bits for USB.

 

edit2 :

The crystal-less USB PIC :

PIC18F25K50 - Microcontrollers and Processors

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Sun. Jul 21, 2019 - 06:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

ATmega_U4 and some AT90USB have the speed switches.

Ok, so the hardware gives you the option of creating either a low speed or a full speed device.

But that doesn't answer the question of why a given device would ever need to switch between low and full speed.

HID class doesn't require low speed, can be full speed.

So I don't see what the use case is for a device to eg. connect first as a low speed device, then at some point disconnect and reconnect as full speed.

If you're going to do that, why wouldn't you just connect at full speed all the time?

(I get the point of disconnecting and then reconnecting to enumerate as something different, just don't get why this would require changing speed from low to full or vice versa).

 

But I can't say that such devices don't exist, just that it's not something I have (knowingly) come across.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MrKendo wrote:
If you're going to do that, why wouldn't you just connect at full speed all the time?
Reduced accuracy clock, some crystals and resonators won't survive a very hard shock test (though MEMS oscillators exist), some timing devices won't start below a certain temperature, fail-over (full-speed fails to low-speed, USB is required though USB speed can vary)

Use cases are : rocketry, Arctic, automotive

Some RC oscillators are accurate enough for low-speed USB.

 

USB in a NutShell - Chapter 2 - Hardware | Data Signaling Rate

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MrKendo wrote:
I can't imagine why you would want to do that?

 

Yes, I understand your confusion but I do have a technical reason.

We are redesigning a legacy PS/2 keyboard for the US military.  PS/2 keyboard parts are hard to come by and we found a part made by a third party company  - Sprintek.  The part supports both PS/2 and USB HID class communication but PS/2 and USB share the same pins of the device.  The only way to reconfigure the part's keyboard matrix(which we need to do) in production is using the USB port.  Due to the requirement of EMI protection needed for the PS/2 port, the impedance of the EMI components limits the bandwidth when using the port with USB at full speed.  My hope was to eliminate the need to use manual jumpers at production for configuring the keyboard.  Configuration speed is irrelevant, so low speed USB is totally OK in this application.  I could get fancy with the electronics and do some semiconductor switching to accomplish this but the effort isn't really worth it.  Also, we probably could talk with the vendor and ask for firmware that supports only low speed USB but that would mean we would need to reload firmware and again, it is likely not worth the extra effort just to save a jumper.

 

thanks for your input
Jim
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rfdes wrote:
PS/2 keyboard parts are hard to come by ...
fyi, PS/2 keyboards are still in production by Unicomp in Kentucky US.

rfdes wrote:
The part supports both PS/2 and USB HID class communication but PS/2 and USB share the same pins of the device.
PS/2 and USB can be separate :

PS2Keyboard Library, Connect a keyboard for user input (PJRC, Teensy)

 


Unicomp, Inc.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

rfdes wrote:
PS/2 keyboard parts are hard to come by ...
fyi, PS/2 keyboards are still in production by Unicomp in Kentucky US.

rfdes wrote:
The part supports both PS/2 and USB HID class communication but PS/2 and USB share the same pins of the device.
PS/2 and USB can be separate :

PS2Keyboard Library, Connect a keyboard for user input (PJRC, Teensy)

 


Unicomp, Inc.

 

 

Hi- thanks for the input.

Finding a PS/2 keyboard is not as difficult as finding 'off the shelf' parts to support a PS/2 keyboard.  If we had the time  I would spin my own PS/2 keyboard component.  Since this was a legacy redesign, the form, fit and function was fixed in stone.  The issue was to design out the obsolete components with new, readily available parts.  Sharing USB and PS/2 is easy when your EMI environment is your home office, etc.  In our case the keyboard is part of ruggedized laptop who's EMI environment is the deck of US Naval ships with a smorgasbord of RF signals including hi-power radar. The PS/2 port simply did not have the bandwidth to support full speed USB.

 

Take care -

Jim

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, I see you do have a good reason to want to change the speed :)

The bottom line though, as far as I am aware, is you have to talk to the device at the speed it expects.

If the device is expecting full speed, you can't (or at least I don't think it would work) ignore what it is telling you (ie. when device applies pullup on D+ it is telling you it is full speed) and 'force' it to low speed by simply talking to it at low speed and expect it to work.

It would require the device itself to be changed in some way to become a low speed device, which may or may not be easy/possible depending on the device hardware and firmware.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for now comprehend your issue.

rfdes wrote:
The PS/2 port simply did not have the bandwidth to support full speed USB.
or low-speed USB (1.50Mb/s, 1.5% max or 15000PPM)

Wayback Machine | Computer-Engineering.org | The PS/2 Mouse/Keyboard Protocol

(mid-page)

Communication: General Description

(next to last paragraph)

...

The clock frequency must be in the range 10 - 16.7 kHz.

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

Thanks for now comprehend your issue.

 

rfdes wrote:

The PS/2 port simply did not have the bandwidth to support full speed USB.

 

or low-speed USB (1.50Mb/s, 1.5% max or 15000PPM)

 

 

 

 

 

 

Wayback Machine | Computer-Engineering.org | The PS/2 Mouse/Keyboard Protocol

(mid-page)

Communication: General Description

(next to last paragraph)

...

The clock frequency must be in the range 10 - 16.7 kHz.

...

 

Not sure I understand your comments but the EMI bandwidth that I have designed for the PS/2 ports is about 10 MHz,  plenty of bandwidth for PS/2 and low speed USB but not for full speed (12 MHz).  i.e. I have single ended LC filters in line with the data and clock lines that are reasonably phase matched.

 

Jim