Live data from Hacker News

How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers

sysprogs.com

31–34 of 34 posts

Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers

#31

Earlier quoted context omitted.

You'd get more consistency for sure, but nothing that approaches the 75MHz (13 nanoseconds!!) needed to capture data from the GPIO pins. From my understanding of the Raspberry Pi, the GPIO pins simply weren't designed for that level of speed. Which is fine, the Raspberry Pi was designed for other stuff. Its all about tradeoffs.

Maybe not capture, but you can write to the pins at least that quickly. I've seen projects that use the gpio of a raspberry pi to drive an FM transmitter at 100MHz.

The project you're thinking about uses internal PLL in the SoC. This has nothing to do with GPIO reading/writing.

http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspb...

Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers

#32
post #31

Earlier quoted context omitted.

Maybe not capture, but you can write to the pins at least that quickly. I've seen projects that use the gpio of a raspberry pi to drive an FM transmitter at 100MHz.

The project you're thinking about uses internal PLL in the SoC. This has nothing to do with GPIO reading/writing. http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspb...

Ah, my bad. I was actually thinking afterwards about how they could be doing the frequency shifts and what kind of sampling speed they would need for accurate, small frequency shift adjustments.

Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers

#33

8 Boards? How about turn one FPGA board into a logic analyzer. For example, get the $25 MachXo3LF starter kit: http://www.latticesemi.com/Products/DevelopmentBoardsAndKits... And that's pretty much it- Lattice includes "Reveal" a logic analyzer which can run on the FPGA in their tools. It's intended to debug designs, but there is nothing stopping you from capturing data from pins. Pretty sure it would capture signals…

The logic analyser just uses a single board, but they support 8 different STM32 development kit boards.

Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers

#34
This is awesome, thanks for sharing it.

It pains me though that you haven't experienced a 'real' logic analyzer (and that is in quotes because they are all real but originally they were different).

So originally, the way the logic analyzer worked was that you had a 'clock' module and 'data' lines. The clock module fed a clock signal into analyzer and you told it so sample the data lines on the rising, falling, or both clock edges. It was done this way because all digital logic works on the clock edges. You could also 'oversample' where you ran the system clock through a clock doubler or quadrupler or octupler and used that as your clock source. That would let you look at a signal multiple times. Most of the doubler circuit patents[1] have expired so using them/building them is fine.

Given that setup you could analyze your logic using the clock the logic was using and everything just worked. To translate back into 'real' time you either had to measure the logic's clock or annotate the samples with a free running clock built into the analyzer.

What you have built, and a lot of people have experienced on things like the Rigol scope and elsewhere, is more like a 'digital oscilloscope' where you digitally sample the inputs at a given frequency. This is fine for doing serial bus decoding (especially if you can sample at 16x the bus frequency) but it doesn't help on logic analysis if your tracking down timing issues. Because the signal may have changed state at any time between the sampling interval you can't check setup or hold times accurately.

[1] https://www.google.com/patents/US5111066 as an example

Post reply on HN