Announcement: New logic analyzer firmware for STM32F103, plus ARM assembly questions
Logic analyzer (and more) firmware:
https://github.com/thanks4opensource/buck50
buck50: Test and measurement firmware for "Blue Pill" STM32F103
buck50 is open-source firmware that turns a "Blue Pill" STM32F103 development board (widely available for approx. US$1.50) into a multi-purpose test and measurement instrument, including:
- 8 channel, 6+ MHz logic analyzer
- Live monitoring and logging of digital, analog, USART (sync/async), SPI (MOSI/MISO), and I2C data
- Simple dual-channel approx. 1 MHz digital storage oscilloscope, approx. 5K sample buffer depth (10K if single channel
- 3 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
- Firmware written in a combination of C++ and ARM Thumb-2 assembly code, with several non-standard hacks^H^H^H^H^Htechniques of possible general interest to advanced software developers
- Python host driver program with comprehensive inline help system and usability features
Download, flash, use, enjoy, report bugs -- or ignore -- at your pleasure.
ARM assembly questions:
1) Why does Cortex-M3 code on the STM32F103 take more cycles per instruction than is documented in the ARM Cortex-M3 Processor Technical Reference Manual? Before answering, I'd encourage looking at https://github.com/thanks4opensource/buck50#why_so_slow for more details on the subject. Including: Why does the code run faster when executing from flash than from RAM? Yes, I didn't believe it either, but that's what I found. Independent testing and/or results to the contrary also appreciated.
2) Doing a "C" longjmp to exit an interrupt handler. Again, see https://github.com/thanks4opensource/buck50#longjmp_from_interrupt_handler for details. If any potential responses are, "Yes, of course, everyone knows how to do that", please provide links and I'll kick myself for not finding them and wasting much time and pain figuring it out myself.
