Replies: 12 comments 5 replies
-
|
PcapNG file format requires speed to be specified before capture starts. And overall automatic speed detection adds a lot of work and corner cases to the software without a real benefit. It worked fine in limited testing I did. |
Beta Was this translation helpful? Give feedback.
-
|
I also did some experiments with proposed changes. I added 510 Ohm resistors before the comparators. I cut the traces close to the connector pins on the existing board. I also drilled out the short layer jump on the DM line and replaced it with 0 Ohm resistor. I can't do anything with impedance matching on the existing board, of course. None of that had any perceivable effect. But I also ran into some strange effect that I can't fully explain. I use Lenovo ThinkCentre mini PC. It has USB ports on the front and in the back. I tried with USB stick directly plugged into the sniffer and an Android phone plugged using another USB cable. At first I tried back USB for the data interface and front USB for the target interface. Back USB uses the same Chinese flexible cable. With flexible cable for the target interface, devices fail to enumerate. With a good cable, both devices work as expected and the capture works fine. But then I tried to reverse the connectors using back USB as a target interface and the front USB as a data interface. With this change and both "bad" cables, it all worked as expected. As far as I can tell all of those USB connectors are attached to different ports of the same root hub. So, it looks like there are a lot of things stacking up to cause marginal behavior. Routing of the USB connector inside the PC to the front panel, bad cables, losses introduced by the sniffer itself. It is really hard to tell what exactly going on without proper equipment. But it does not look like there is a simple solution to this. Even improving impedance matching in the sniffer may not help, so using the best cables and trying different ports in case of issues may be necessary. |
Beta Was this translation helpful? Give feedback.
-
Oh that's sad :( I did a quick impedance calculation of your differential track which gives 112 Ohm, not too far compared to 90.
That's true. I had an old ASUS PC who use FPC cable for USB which is not great. In another Clevo one it has retimer ICs behind every ports. Afterall without a high-end oscilloscope it's hard to know what happened. |
Beta Was this translation helpful? Give feedback.
-
|
I computed about 150 Ω differential impedance (0.254 mm width, 0.254 mm distance, 0.35 µm copper, 1.55 mm dialectric with constant 4.6 for a 1.6 mm board). |
Beta Was this translation helpful? Give feedback.
-
|
The clearance is 0.19 mm only under the USB C connector. Elsewhere, the clearance is 0.254 mm. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, but the 90 Ω impedance to achieve is the differential impedance. We have a distance of 0.254 mm between the D+ and D- traces. I didn't take the distance to the ground plane on the same layer into account as I haven't found a PCB impedance calculator that does that. Does your impedance calculator use all three distances (distance between layers, distance between the two traces, distances from a trace to the ground plane in the same layer)? |
Beta Was this translation helpful? Give feedback.
-
|
The single-ended impedance should be above 45 Ω IIRC. |
Beta Was this translation helpful? Give feedback.
-
|
I found a better online calculator which takes the distance to the reference plane in the same layer into account: |
Beta Was this translation helpful? Give feedback.
-
|
Tried a few more experiments:
So, it looks like both comparators and the PHY contribute to the behavior. And it may be possible to decouple the comparators with higher series resistance. Although it is hard to tell how marginal it would end up being anyway. I only tested with one USB flash drive. PCB stubs on their own don't seem to matter and impedance mismatch is probably contributing something as well, but it it hard to tell how much. And I don't think there is a way to better decouple the PHY without sacrificing the actual functionality. And I'm inclined to require better cabling setup rather than sacrifice the goal of the device. There is some info that TotalPhase sniffer works better on the same PC setup, but I don't think it is possible to compare them directly, since TotalPhase uses Type-B connectors, and there are not a lot of shoddy Type-B cables out there, they seem to have been designed before radical cost cutting and the cables still made are made with the same quality. And this sniffer works fine with good quality Type-C cables. In all cases I only tried the "bad" cable, since I expect all combinations to work with the good cable. |
Beta Was this translation helpful? Give feedback.
-
|
Maybe adding two op amps (e.g., one LTC6229 or two LTC6228 powered from 5 V rail) in unity-gain configuration might reduce the impact of the PHY and the comparators on the signal. |
Beta Was this translation helpful? Give feedback.
-
|
If someone wants to experiment with that - go for it. I don't really care enough to bother doing that. I don't see a real issue here, just use good cables and it all works. Adding extra components will just complicate the design for no benefit. |
Beta Was this translation helpful? Give feedback.
-
|
In a non-driving mode all termination should be disabled. Otherwise nothing would work at all. The whole point of the comparators is to see when one or both devices enable HS termination. And you can clearly see that in the log. You would not see that if this PHY already enabled termination on its own. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for this awesome project !
As a tinyusb project maintainer, this analyzer is very interesting :)
I saw there is a speed detector implemented in FPGA but auto speed option is not exported in host side, is there any issue such as false detection ?
I built one and so far it works well for full-speed devices, high-speed devices stop enumerating once the cable longer than 1m.
I'm working on my hardware implantation trying to improve signal integrity https://github.com/HiFiPhile/usb-sniffer_hw/blob/master/USB_Sniffer.pdf :
Beta Was this translation helpful? Give feedback.
All reactions