cheap USB analyzer based on FPGA

Hi expert fellows :) , I would like to get some advices on making a cheap usb analyzer with an cheap FPGA board :

-i only target loww speed / full speed at the moment

- i woudl proceed like this : * cut an existing USB cable, insert a breakoutinteh middle * connect D+ & D- (and GND) to the FPGA pins (i guess impedance aspects are OK since FPGA pin input Z is ~ infinite...) * build the analyzer design using the opencore's USB PHY Core & USB 1.1 Function Core * the design would intercept all USB trafic and would store it onchip , with the possibility of retrieving it on the PC

The main Questions concerns - electric level : i plan to only use D+ using LVTTL but .... - NRZI tackle : how can i rebuild the USB clock from it ?

Any advice welcome !

Have a nice day.

Reply to
Jerome
Loading thread data ...

Don't connect them directly to the FPGA, unless you're using an older FPGA with 5V-tolerant inputs.

If you're not trying to run high-speed USB, you could simply use a

74LVC buffer chip, which does have 5V tolerant inputs.

Keep the stub length very short.

If you want to deal with high-speed (480 Mbps) USB, you almost certainly will need to use an actual USB transceiver chip. High-speed USB has a very finicky electrical environment.

Reply to
Eric Smith

Thanks Eric, However concerning the 5V tolerance, i'm not sure it is necessary since the D+ & D- level swing stays in the 0V - 3.6 V range

My first step will c>> * cut an existing USB cable, insert a breakoutinteh middle

Reply to
Jerome

Those levels are OK but in USB spec there is a tolerance to short to

5V requirement which is why it's mentioned. In a controlled environment you don't need 5V tolerance on the data inputs.
Reply to
m

Jerome wrote about USB:

If I'm not mistaken, there's nothing that guarantees that the postive swing can't approach the positive supply rail.

Reply to
Eric Smith

I'm curious as to what your trying to achieve, I might be completely wrong about this but I feel some dongle cracking in the works!

Reply to
colin

If you're doing USB device development, a bus analyzer is an absolute requirement. The least expensive useful bus analyzer is the Ellisys Tracker 110 and it costs almost $1000.

I guess $1000 is a bit expensive if you're trying to crack dongles ...

-a

Reply to
Andy Peters

NO NO , i'm NOT trying to crack anything I just want to make USB devpt (using libusb) and i need an usb analyzer I'm sure it is feasible with a $200 FPGA which is 1/3 price of the cheapest USB analyser

Reply to
Jerome

I checked with a scope after having insterted "spy pins" in the middle of a AF/AM cable

--> swing is indeed 0v - 3.6V ."spyied" device was a Webcam, used SW was ampcap.

My scope is old and unaccurate , i'm not sure of the exact acceptable level for NON 5V tolerant devices (3.3V? 3.6V?...)

When using live video, there are data frame of length ~40 ms & period ~50 ms When "zooming", i can see the USB full speed frames every 1 ms. Theses frames have a duration of ~200 - 250 us when live video is enabled

When no video is enabled, the 1ms frame are still threre but no data

Reply to
Jerome

How about using some resistors to reduce the swing, then use a differential input of the FPGA ?

Jerome wrote:

Reply to
Sylvain Munaut

Have you ruled out software analyzers? There's something that plugs in partway through the windows USB stuff and monitors traffic between the driver and the device...

Reply to
cs_posting

Yes i did. SW USB analyser are great & useful ! Some are free (SniffUsb) some are not (SourceUsb)

However, under Windows anyway, USB SW analyzer hides part of the low level stuff , they allow to see URBs requests which is already relevant but sometimes not enough.

Another reason why i look ahead for HW analyser is that i aim at developping USB device and/or controller with an FPGA.....

Reply to
Jerome

Hi, My first results are here :

formatting link

Not very easy to identify the SYNC bits , and the SOF.... The en dof packet is easier ( Both D+ & D- at '0')

Note that sample time of used logci anlyser is 10 ns ....

Reply to
Jerome

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.