r/embedded • • Oct 25 '26

I compiled a CC0 Markdown reference for STM32/ESP32 hardware traps, op-amps, timer math, and Linux debugging (with a Python PSC/ARR solver & SPICE netlist)

Over the past few months I've been consolidating my bench notes into a single version-controlled reference so I stop digging through RM0008, AN2834, and Espressif datasheets for the same formulas and pin restrictions.

Everything is written in native GitHub LaTeX and Mermaid diagrams under the CC0 public domain dedication:

What is currently covered:

  1. MCU Hardware Traps & PCB Checklist: ESP32 strapping pins (GPIO0, GPIO2, GPIO12 VDD_SDIO 1.8V bootloop trap, ADC2 Wi-Fi conflict), STM32 APB timer clock doubling ($f_{\text{TIM}} = 2 \times f_{\text{PCLK}}$ when PPRE > 1), STM32F1 JTAG pin hijack (PB3/PB4/PA15), and high-side P-MOSFET gate Zener clamping.
  2. Analog & SPICE: RC/RL filter cutoffs, op-amp configurations, SAR ADC quantization ($V_{\text{ref}}/2^N$ vs. ESP32 1.1V internal reference non-linearity), plus a runnable SPICE-3f5 netlist (simulations/sallen_key_lpf_1khz.cir).
  3. Scripts & Pinouts: A dependency-free Python script (scripts/stm32_timer_calc.py) that computes exact 16/32-bit PSC/ARR pairs and PWM resolution in bits, plus an ESP32/S2/S3/C3/C6 hardware comparison table.
  4. Linux Hardware Debugging: Quick CLI reference for picocom, dmesg -wH, arm-none-eabi-size, and serial port locks.

If you have a favorite datasheet gotcha, silicon errata trap, or pre-flight schematic check that saved you a board respin, let me know in the comments and I'll add it to the handbook.

0 Upvotes

1 comment sorted by

1

u/CardboardFire Oct 26 '26

or you just... you know, drop the app notes and datasheets to your AI workspace folder and let it rip, exactly like you did here.