“Blue Pill” is a popular STM32 development board thanks to its low cost – now as low as $1.50 on Aliexpress – and Arduino compatibility via the STM32duino project.
People have created all sorts of projects around the tiny STM32 board, but I find Mark (aka thanks4opensource) buck50 test and measurement firmware very interesting as it turns the Blue Pill board into a logic analyzer compatible with the open-source Sigrok command-line tool and PulseView GUI.
- 8 channel, 6+ MHz logic analyzer
- Approx. 5K sample buffer depth
- Samples stored only at signal edges for efficient memory usage
- Complex triggering via user-defined state machine supporting combinations of sequential (“A then B then C”) and logical-OR (“A or B or C”) conditionals
- Output to VCD and other file formats for export to waveform viewing programs that include Pulseview, but also gnuplot, gtkwave, and Saleae Logic
- Live monitoring and logging of digital, analog, USART (sync/async), SPI (MOSI/MISO), and I2C (master/slave/TX/RX) data
- Dual-channel approx. 1 MHz digital storage oscilloscope, approx. 5K sample buffer depth (10K if single channel)
- Triple-channel digital pulse train generator with user-defined frequency and per-channel duty cycle and polarity
- Bidirectional bridge/converter from USART/UART (async/synchro), SPI (master/slave), or I2C … to USB … to host terminal, UNIX socket, or UNIX pty device file
- 8-bit parallel output counter (binary or gray code)
- Host terminal ASCII or binary input data to 8-bit parallel output

The firmware is written in C++ and ARM Thumb-2 assembly code, and a Python host driver program is also provided to control the board. There’s amazingly detailed documentation on Github, and the developer invites people to submit bug reports on the issue tracker as well.
I found the project announced on Sigrok mailing list, where some discussed the potential for STM32 fakes, and that using more recent STM32 chips may deliver better solutions without going into details (yet(. This made me think about the NXP Cortex-M7 powered Teensy 4.1 board, but there’s already a logic analyzer firmware for that board: TeensyLogicAnalyzer, also compatible with Sigrok.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress