How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
1–10 of 34 posts
Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#2The STM32F746G looks like a far "weaker" processor. 216MHz, only 320KB of RAM... the "Computer" specs look utterly awful compared to the Raspberry Pi Zero. Indeed, the Rasp. Pi Zero costs only $10 while the NUCLEO-F746ZG costs $25.
However, what is important in this application is not necessarily raw speed... but speed coupled with CONSISTENCY, as per diagram "B". The particular feat is this:
> It can reliably read GPIO inputs every 3th or 4th clock cycle on many devices
You will never get this level of consistency from a Raspberry Pi. Indeed, it looks like it was only achieved through careful programming + use of the DMA channels + careful work thinking about who is using RAM and who isn't (to not over-burden the on-board memory controller).
That's the world of microcontrollers in a nutshell. Its about the focus on delivering consistent performance rather than high-performance.
Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#3There's been various discussions around here, and often the Raspberry Pi comes up. The Raspberry Pi is a great board and everything, but this "Logic Analyzer" use case is a great example of where a Microcontroller should be used rather than a general-purpose computer. The STM32F746G looks like a far "weaker" processor. 216MHz, only 320KB of RAM... the "Computer" specs look utterly awful compared to the Raspberry Pi Z…
Some SBCs also contain additional non-ARM processors on the SoC, which could be used for the purpose of data acquisition.
For example Orange Pi has H3, which contains OpenRISC core that can run at 300MHz or so from code located in internal SRAM. I haven't tried yet, but I guess you can get pretty consistent results with this approach too: Main cores running on Linux processing the data, OpenRISC accessing GPIO and reading the data in a tight loop, throwing them to main memory into some ring buffer, or into part of the SRAM.
Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#4Have you looked into using opensource protocol analyzers, or adding support for sigrok?
Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#5Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#6http://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 up to ~200 MHz.
http://media.latticesemi.com/~/media/LatticeSemi/Images/Prod...
(it would be a lot better if it had a superspeed USB connection- they should make a version with Cypress FX3)
Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#7There's been various discussions around here, and often the Raspberry Pi comes up. The Raspberry Pi is a great board and everything, but this "Logic Analyzer" use case is a great example of where a Microcontroller should be used rather than a general-purpose computer. The STM32F746G looks like a far "weaker" processor. 216MHz, only 320KB of RAM... the "Computer" specs look utterly awful compared to the Raspberry Pi Z…
Perhaps not on Linux. You don't need to run Linux on SBCs. At least not exclusively. Some SBCs also contain additional non-ARM processors on the SoC, which could be used for the purpose of data acquisition. For example Orange Pi has H3, which contains OpenRISC core that can run at 300MHz or so from code located in internal SRAM. I haven't tried yet, but I guess you can get pretty consistent results with this approach…
One particularly cool Single-board Computer (SBC) is the Beaglebone Blue. The Beaglebone Blue came with "PRUs" (Programmable Realtime Units), which seem similar to the OpenRISC core you are talking about. Such "embedded microcontrollers" exist because the main computer. There are also a hell of a lot more GPIO pins, ADCs, Servo-channels, Motor-controls, and other such stuff to assist the robotic designers.
No need for "Realtime" Linux either, if you're focusing on the PRU / alternative cores to do the heavy-lifting. So I didn't want to discriminate against SBCs as much as I wanted to highlight the importance of low-latency and consistent reads off of pins. Two things that the Raspberry Pi is pretty dismal at doing.
---------
In any case, previous discussions with the "Orange Pi" clearly don't "get" it. https://news.ycombinator.com/item?id=12890005
Its fine, ycombinator is a web-technology, software-focused message board. YCombinator cares about web-technologies, keeping up with Linux Kernel patches, and the like. And that's good and important.
However, embedded and microcontroller features are often ignored, despite embedded topics popping up around here pretty often. So I felt it necessary to bring up the compare/contrast.
Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#88 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…
When your entire chip is programmable-logic, you don't have much room for RAM. The MachXo3LF-6900 has a grand total of 240 kBITs, or 30kBytes of storage.
In contrast, the STM32F746G will get you 320kBYTES of storage, 10x the capacity.
At 75MHz and 1-bit per cycle, that's still only 35ms of storage. Furthermore, it'd be a lot easier to program a Microcontroller to compress the data as its reading it, rather than use the FPGA.
The Microcontroller will still get you the Ethernet and USB connections too.
--------
I think this is a job for a microcontroller, not an FPGA. FPGAs are nice and flexible of course, but Microcontrollers offer you far more performance if you're going to use the specific features.
The STM32F746G has GPIO -> DMA directly to its RAM, while the CPU can compress 1/2 of the signal and send it out while the GPIO pins are simultaneously working. That's... pretty good. I have doubts that a cheap FPGA can accomplish all that at the same speed.
Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#98 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…
Re: How We Turned 8 Popular STM32 Boards into Powerful Logic Analyzers
#108 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…
And how much RAM does that FPGA hold? When your entire chip is programmable-logic, you don't have much room for RAM. The MachXo3LF-6900 has a grand total of 240 kBITs, or 30kBytes of storage. In contrast, the STM32F746G will get you 320kBYTES of storage, 10x the capacity. At 75MHz and 1-bit per cycle, that's still only 35ms of storage. Furthermore, it'd be a lot easier to program a Microcontroller to compress the dat…
A cheap FPGA can probably do that at 5x the speed. Parallel operations like these are specifically what they're build for.