Is Analog Discovery 2 good enough for micro-controller debugging?  - Page 1
Forum section: electronics / general

author: asgard20032
author_rank: Regular Contributor
timestamp: May 15, 2016, 04:08:38 am
content: Is Analog Discovery 2 good enough for micro-controller debugging? To be more precise, debugging/analyzing common protocol, like I2C, one wire, SPI, UART? By looking at the spec, I can't really tell what maximum frequency the logical analyzer could analyze SPI or UART. I got a nice student discount, and since my electronic laboratory is in my basement, and my bedroom is on the second floor, it could help me design in the comfort of my bedroom when I don't need big oscilloscope or power-supply. I will mainly do some mcu programming and some simple circuit from the comfort of my bedroom. Of course, later on, I will get a real logic analyzer for my laboratory. But I am still wondering if it will be enough to analyze high speed uart and or common SPI.

author: tggzzz
author_rank: Super Contributor
timestamp: May 15, 2016, 09:12:32 am
content: Whether or not it can debug SPI etc problems will depend on the nature of the problem.The first essential is to ensure there is "signal integrity", i.e. all voltages are clean and within limits, and that setup and hold times are not violated. That needs analogue measurements. The highest frequency that must be captured depends solely on the signal's risetime; its period is irrelevant. The rule-of-thumb is that bandwidth =0.35/tr. Do not confuse the scope's sampling rate with its bandwidth; the two are independent. So, what's the scope's bandwidth and the signal's risetime?Once you have a "good clean" signal, you can proceed to debug the logical values using either the sampling scope or the protocol analyser (which IIRC is 100MS/s). For that you need to either synchronise the instrument's clock to the signal, or to take several samples per bit. So, what's the bit period?

author: rstofer
author_rank: Super Contributor
timestamp: May 15, 2016, 05:56:04 pm
content: Of course it can debug those serial streams! It has 100M samples/sec so it should be able to keep up with a 10 MHz bus quite easily. Most serial buses are a lot slower although SPI can run at very high speeds.Attached is a screen shot of a 10 MHz square wave generated by the device itself (because I am too lazy to rig something up).

author: asgard20032
author_rank: Regular Contributor
timestamp: May 15, 2016, 06:16:10 pm
content: I am worried about 20-40 mhz spi.

author: rstofer
author_rank: Super Contributor
timestamp: May 15, 2016, 06:37:32 pm
content: Quote from: asgard20032 on May 15, 2016, 06:16:10 pmNot with the Analog Discovery you won't. It just isn't capable of capturing such a thing with only 100 M samples/second.Even if it could capture the 20 MHz version, you could never be certain of the timing relationships. I would be worried even with my 200 MHz FPGA based logic analyzer except that I can feed it an external clock so I know the signals are synchronized.

author: asgard20032
author_rank: Regular Contributor
timestamp: May 15, 2016, 07:07:24 pm
content: Quote from: rstofer on May 15, 2016, 06:37:32 pmOpenbench logic sniffer from dangerous prototypes?

author: rstofer
author_rank: Super Contributor
timestamp: May 15, 2016, 08:09:43 pm
content: Quote from: asgard20032 on May 15, 2016, 07:07:24 pmNo, the one fromhttp://www.sump.org/projects/analyzer/I do have the DangerousPrototypes LA but I haven't used it much. Frankly, I had forgotten how useful it could be. That unit is based on the sump.org design and UI.In the early days of the Sump project, I added a little piece which seems to have been memorialized for no particularly good reason:http://www.sump.org/projects/analyzer/addons/I wanted the full 32 channels and I wanted to plug the adapter into the header on the Spartan 3 Starter Board. It's been working pretty well for a long time. The only problem I have is that the JAVA runtime keeps changing and breaking the UI. Next time I need an LA, I'll have to figure out where things stand.