How does USB device discovery work? [video]
youtube.com
How does USB device discovery work? [video]
1–10 of 30 posts
Re: How does USB device discovery work? [video]
#2Re: How does USB device discovery work? [video]
#3And note that (since it's a digital signal) you don't have to sample evenly; you can also record the timepoints of the edges.
Re: How does USB device discovery work? [video]
#4Kind of disappointing that his probably very expensive digital oscilloscope can't record the entire protocol. I mean, what is the price of ram these days? And note that (since it's a digital signal) you don't have to sample evenly; you can also record the timepoints of the edges.
It's probably more of a bandwidth issue than a memory issue. USB 2.0 runs at 480 Mbit/s, so if the oscilloscope can decode that, it would have to be able to output/store at least that much in terms of bandwidth. A USB keyboard would never hit that type of bandwidth, but presumably a buyer of such expensive oscilloscope would expect the feature to work every time, rather than only in best case scenarios.
>And note that (since it's a digital signal) you don't have to sample evenly; you can also record the timepoints of the edges.
Depending on the signal characteristics this can actually be worse. eg. if it switches very rapidly you'd probably be better off storing the reading as PCM or something, because the timestamps (which are presumably nanosecond level) would take more space to record than the raw sample reading (a few bits at most).
Re: How does USB device discovery work? [video]
#5Kind of disappointing that his probably very expensive digital oscilloscope can't record the entire protocol. I mean, what is the price of ram these days? And note that (since it's a digital signal) you don't have to sample evenly; you can also record the timepoints of the edges.
>I mean, what is the price of ram these days? It's probably more of a bandwidth issue than a memory issue. USB 2.0 runs at 480 Mbit/s, so if the oscilloscope can decode that, it would have to be able to output/store at least that much in terms of bandwidth. A USB keyboard would never hit that type of bandwidth, but presumably a buyer of such expensive oscilloscope would expect the feature to work every time, rather t…
Yeah, but you can use multiple banks and write in a round-robin fashion.
> Depending on the signal characteristics this can actually be worse.
Of course, that was only an example. You should probably do something like runlength encoding.
In any case, the USB protocol is much slower than modern hardware can handle, so certainly doable.
Re: How does USB device discovery work? [video]
#6Kind of disappointing that his probably very expensive digital oscilloscope can't record the entire protocol. I mean, what is the price of ram these days? And note that (since it's a digital signal) you don't have to sample evenly; you can also record the timepoints of the edges.
It would in the grand scheme of things be rather easy to "just add ram" but that's not how the product lines work for oscilloscopes. It's a bit like asking "Why does Intel price their high-end chips so high? It's not like the silicon is that much more expensive or yields that differ so much that they're 500% more expensive? And the consumer chips don't even support all the features that their Xeon's do!"
And you're right, it's a digital signal, and in the normal world you would just use a logical analyzer and do it like you said. But this is for educational purposes and seeing the same tool and the actual edges is a great and clear example. That's not to say that oscilloscopes aren't useful for debugging digital signals. After all, seeing the exact glitch might help in some cases.
So yeah, basically it's a combination of product differentiation and not the entirely right tool for the job.
Re: How does USB device discovery work? [video]
#7Kind of disappointing that his probably very expensive digital oscilloscope can't record the entire protocol. I mean, what is the price of ram these days? And note that (since it's a digital signal) you don't have to sample evenly; you can also record the timepoints of the edges.
Re: How does USB device discovery work? [video]
#8Re: How does USB device discovery work? [video]
#9So far I've been practicing on my saleae logic analyzer clone, which is based on this controller too, but there are cheap dev boards orderable from aliexpress, that have this chip which are not limited to input only.
Muuuch simpler than STM32, and much faster interface. While some STM32 chips have high speed USB, most cheap boards don't include the high-speed PHY, so it's useless.
Can't wait for the dev boards to arrive.
Re: How does USB device discovery work? [video]
#10That's some fancy oscilloscope, but you can also get that info via usbmon, for example, directly to wireshark.
If you cared about digital decode only, and had confidence in both the SI of your interface and tooling, sure. Great when things "just work"...entirely unhelpful when they don't at the lower layers of hardware domain.
[1] https://www.keysight.com/us/en/product/D4000USBA/usb-2-0-tri...