Author Topic: USB SOF  (Read 22072 times)

nileiqi

  • Member
  • ***
  • Posts: 2
USB SOF
« on: October 07, 2012, 10:25:44 pm »
Hi,
For full speed,  Windows sends SOF every 1ms, however Windows operating system is not premetive system, how it can guarantee 1ms accuracy ? thanks
Daniel

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB SOF
« Reply #1 on: October 07, 2012, 10:31:48 pm »
The USB host controller's hardware handles it.

nileiqi

  • Member
  • ***
  • Posts: 2
Re: USB SOF - More questions please
« Reply #2 on: October 08, 2012, 03:12:28 am »
thanks, some more questions.

(1) SOF and suspend mode
Usually, a USB device will enter suspend mode if it detects there is no activity on the USB bus for more than 3 ms (I assume there is no SOF on the bus as well). But the SOF is sent every 1ms, then at what circumstance, host stops to send SOF.
(2) Can we control Windows to enter suspend mode (stop to send SOF) ?
thanks in advance.
« Last Edit: October 08, 2012, 03:14:08 am by nileiqi »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB SOF
« Reply #3 on: October 08, 2012, 10:52:39 am »
Windows suspends the bus on entering a low-power state (standby, hibernate).

To suspend a single device, the host issues a Set Port Feature request to a hub with wIndex set to the port number and wValue set to PORT_SUSPEND. The request instructs the hub to stop sending traffic, including SOFs or low-speed keep alives, to the port.

So you would need to identify the hub and port number and send a control request to the hub.



Renate

  • Frequent Contributor
  • ****
  • Posts: 97
Re: USB SOF
« Reply #4 on: November 23, 2012, 10:11:14 am »
To just check suspend on your USB device in Windows,
go to Device Manager and "disable" the device, that suspends it.
"Enable" does a reset, not a wakeup.

Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: USB SOF
« Reply #5 on: November 24, 2012, 08:47:25 am »
Quote
go to Device Manager and "disable" the device, that suspends it.

WinXP works as you said, but 7 and 8 keep SOF after "disable".
For these Windows version,
- Connect the device over a hub, and "disable" the hub on Device Manager
OR
- "Disable" root hub to which the device connects.

Tsuneo
« Last Edit: November 24, 2012, 09:08:45 am by Tsuneo »

Bret

  • Frequent Contributor
  • ****
  • Posts: 68
Re: USB SOF
« Reply #6 on: November 26, 2012, 07:33:19 pm »
how it can guarantee 1ms accuracy ?

If you're really concerned about the accuracy of the 1 ms, you can't guarantee it with USB hardware.  Each host controller has its own on-board oscillator, which may not necessarily be very accurate or stable (depending on different factors, such as temperature).  In addition, the rate of the SOF can be adjusted a little bit to each side of the "optimum" (1 ms) value through software, though this is usually only done when you need to synchronize the bus to an external timing source for some reason.

maheshkarrajmanda

  • Member
  • ***
  • Posts: 13
Re: USB SOF
« Reply #7 on: October 06, 2014, 01:37:23 am »
Hi all,
I've been working on xmc4500 board to implement vcom port using usb cdc class.my question is how many bytes are trasmitted between two start of frame packets.Regarding xmc datasheet there is a facility of multiple packet transfer.so i tested by sending morethan 500 bytes for every 10ms.
but i'm not sure how to figure how many bytes r transmitiing between 2 SOF's. Do anyone have experience relating to my doubt.
Thanks,
Maheshkar

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: USB SOF
« Reply #8 on: October 06, 2014, 02:30:13 am »
I answered your question in your other thread.