I have some doubts about one of my (new) laptop's usb ports regarding whether it is usb 2 or 3.
The port color is black, while it is reported that usb 3 come in blue.
From ubuntu 14, I checked with lsusb and I got
bcdUSB 3.00
which should mean that the usb port is version 3. Does the black color mean something?
While this isn't really a coding question, here's what a quick search results in:
Manufacturers are recommended to distinguish USB 3.0 connectors from their USB 2.0 counterparts by blue color-coding of the Standard-A receptacles and plugs,[2] and by the initials SS.
[...]
Since USB 2.0 and USB 3.0 ports may coexist on the same machine and they look similar, USB 3.0 specification mandates appropriate color-coding and recommends that the Standard-A USB 3.0 connector has a blue insert (Pantone 300C color). The same color-coding applies to the USB 3.0 Standard-A plug.
Source: Wikipedia
This does not necessarily mean that it is a USB2.0 port. It is most likely just of wrong color. You could try running a speed test (if you have a USB3.0 device to do so with).
First up, I don't know much about USB, so apologies in advance if my question is wrong.
In USB 2.0 the polling interval was 0.125ms, so the best possible latency for the host to read some data from the device was 0.125ms. I'm hoping for reduced latency in USB 3.0 devices, but I'm finding it hard to learn what the minimum latency is. The USB 3.0 spec says, "USB 2.0 style polling has been replaced with asynchronous notifications", which implies the 0.125ms polling interval may no longer be a limit.
I found some benchmarks for a USB 3.0 SSDs that look like data can be read from the device in just slightly less than 0.125ms, and that includes all time spent in the host OS and the device's flash controller.
http://www.guru3d.com/articles_pages/ocz_enyo_usb_3_portable_ssd_review,8.html
Can someone tell me what the lowest possible latency is? A theoretical answer is fine. An answer including the practical limits of the various versions of Linux and Windows USB stacks would be awesome.
To head-off the "tell me what you're trying to achieve" question, I'm creating a debug interface for the ASICs my company designs. ie A PC connects to one of our ASICs via a debug dongle. One possible use case is to implement conditional breakpoints when the ASIC hardware only implements simple breakpoints. To do so, I need to determine when a simple breakpoint has been hit, evaluate the condition, if false set the processor running again. The simple breakpoint may be hit millions of times before the condition becomes true. We might implement the debug dongle on an FPGA or an off-the-shelf USB 3.0 enabled micro-controller.
Answering my own question...
I've come to realise that this question kind-of misses the point of USB 3.0. Unlike 2.0, it is not a shared-bus system. Instead it uses a point-to-point link between the host and each device (I'm oversimplifying but the gist is true). With USB 2.0, the 125 us polling interval was critical to how the bus was time-division multiplexed between devices. However, because 3.0 uses point-to-point links, there is no multiplexing to be done and thus the polling interval no longer exists. As a result, the latency on packet delivery is much less than with USB 2.0.
In my experiments with a Cypress FX-3 devkit, I have found that it is easy enough to get an average round trip from Windows application to the device and back with an average latency of 30 us. I suspect that the vast majority of that time is spent in various OS delays, eg the user-space to kernel-space mode switch and the DPC latency within the driver.
I've got a couple of resources for you, one I've just downloaded which is the complete specs ... several pdfs zipped up for USB3, and here is short excerpt from page 58,59 (USB 3_r1.0_06_06_2011.pdf):
USB 2.0 transmits SOF/uSOF at fixed 1 ms/125 μs intervals. A device driver may change the interval with small finite adjustments depending on the implementation of host and system software. USB 3.0 adds mechanism for devices to send a Bus Interval Adjustment Message that is used by the host to adjust its 125 μs bus interval up to +/-13.333 μs.
In addition, the host may send an Isochronous Timestamp Packet (ITP) within a relaxed timing window from a bus interval boundary.
Here is one more resource which looked interesting which deals with calculating latency.
You make a good point about operating system latency issues, especially in not real time operating systems.
I might suggest that you check on SuperUser too, maybe someone has other ideas. CHEERS
I dispute the marked answer.
On Windows there is no way to achieve the stated roundtrip latency over USB. SuperSpeed (3.0) or not. The documentation states:
The number of isochronous packets must be a multiple of the number of packets per frame.
https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/transfer-data-to-isochronous-endpoints
The packets per frame is given by the bIntervaland also determines the polling interval. E.g. if you want to achieve a transfer every microframe (125usec) you will need to submit 8 transfers per URB (USB Request Block), which means a scheduling service interval of 1ms.
Anything else requires your own kernel-mode driver or is out-of-spec.
On RT Linux I can confirm roundtrips of 2*125usec + some overhead.
Excerpts from embedded.com: "USB 3.0 vs USB 2.0: A quick reference summary for the busy engineer"
Communication architecture differences
USB 2.0 employs a communication architecture where the data transaction must be initiated by the host. The host will frequently poll the device and ask for data, and the device may only transmit data once it has been requested by the host. The high polling frequency not only increases power consumption, it increases transmission latency because the data can only be transmitted when the device is polled by the host. USB 3.0 improves upon this communication model and reduces transmission latency by minimizing polling and also allowing devices to transmit data as soon as it is ready.
...
Timestamp enhancements
Unlike USB 2.0 cameras, which can range in accuracy from 0 to 125 us, the timestamp originating from USB 3.0 cameras is more precise, and mimics the accuracy of the 1394 cycle timer of FireWire cameras.
...
USB 3.0 -- or Super-speed USB -- overcomes key limitations of other specifications all these limitations with six (over IEEE 1394b) to nine (over USB 2.0) times higher bandwidth, better error management, higher power supply, ... and lower latency and jitter times.
P.S. also it says about "longer cable lengths" for USB 3.0, but other paragraph contradicts to this & says upto 5m for USB 2.0, upto 3m for USB 3.0.
I am using 4 AD9833, in which the 4 fsync signals are sent from atmega2560. I want to generate different frequencies from all the 4 AD9833, if I program it, I am getting some frequencies in 2 port pins, I could not change the frequency .. please help
For the Atmega2560, you may want to look up "SPI" programming at here:
http://arduino.cc/en/Main/arduinoBoardMega2560
Using the SPI library, u can then issue command to the AD9833 via SPI interfacing. For details lookup page 2 here:
http://www.analog.com/static/imported-files/data_sheets/AD9833.pdf
(and page 15 above described the details on specifying the frequencies).
More information on SPI programming for Atmel is here: http://www.atmel.com/Images/doc0943.pdf
For SPI example for Arduino:
http://www.youtube.com/watch?v=YE0wnom_7As
http://arduino.cc/en/Tutorial/BarometricPressureSensor (look for SPI.begin(), SPI.transfer() etc).
For the SPI library specification:
http://arduino.cc/en/Reference/SPI
i am trying to use CNET developer api to get a list of detailed product specification but what what i can get now is basic product details
Apple iOS 5, Apple A5X, IEEE 802.11n, IEEE 802.11b, IEEE 802.11a, IEEE 802.11g, Bluetooth 4.0, 7.3 in x 0.4 in x 9.5 in, 9.7 in TFT active matrix - LED backlight - Yes, 23 oz
but i need the details
something like this
General
Product Type Tablet
Operating System Apple iOS 5
First Seen On Google Shopping March 2011
Display
Type 9.7" IPS TFT - LED backlight
Resolution 1024 x 768 ( 132 ppi )
Touchscreen Multi-Touch
Features Fingerprint resistant oleophobic coating
Processor
Processor Apple A5
Processor Clock Speed 1 GHz
Number of Cores Dual-Core
and not necessarily use CNET apis i am fine with any other source of product information
thanks
Could you please format properties which you receive from CNET and expect?
I'm representative of http://aerse.com. We strive to provide the most detailed properties with strict validation of property values. Have a look at Nokia N900
If you fine with multiple results for single product (for example, search "N900", get many of "N900" products) you could try Amazon Product Advertising API.
Also you could have a look at APIs here: http://www.programmableweb.com/apis/directory/1?apicat=Shopping
My kernel uses registers extensively.
When compiling for 1.2 devices --ptxas-options=-v reports 83 registers. When I am trying to compile for 2.0 there are only 63 registers in use, the rest of local data are put into local memory. Experiments with '--maxrregcount' give limit of 124 registers per thread for 1.2 devices and as few as 63 registers for 2.0.
Is it possible to put all the data into registers on 2.0 architecture?
Unfortunately, the per-thread register limit for compute capability 2.x cards is 63 registers per thread. There isn't anyway to stop local memory spillage if you have a very complex kernel which consumes a lot of registers.