DBG-2 No series resistors on an obvious debug header (e.g. SWD)¶
| Severity | Status | Implementation |
|---|---|---|
| suggestion | runs in better_erc | easy, depends on netlist |
Data it needs: graph, part classes.
Looks at. Debug header recognised from its nets, series resistors.
What it catches. SWD or JTAG lines going straight from the MCU pins to a header, with no series resistor in between.
Why it matters. A debug header is the board's most handled connector: probes are plugged in hot, cables are swapped, ground is sometimes connected last. A 22-100 Ω series resistor limits the current of an ESD event or a wrong-voltage probe into the pin, damps ringing on a long ribbon cable at several MHz, and gives a footprint to cut the line or inject a signal during debug. XJTAG recommends a series resistor (typically 22 Ω) on TDO for the same signal-integrity reason.
Example. A 15 cm ribbon cable between a J-Link and a 10-pin header at 4 MHz SWD: overshoot on SWCLK double clocks the target, the connection drops until the speed is lowered. 33 Ω at the MCU end cures it.
How to check. Nets of the debug pins (DBG-1) that reach a header pin with no resistor in the path.
Fix. 22-100 Ω in SWCLK and SWDIO (TCK, TMS, TDI, TDO) near the MCU; keep NRST and VTref without one (DBG-19).
References. XJTAG DFT "TDO Termination", "TCK Termination"; Johnson & Graham, High-Speed Digital Design, chapter 6 (terminations).
Test schematics¶
Each schematic below is in test_schematics/sources. The block under it is what berc check --only DBG-2 reports on it.
dbg-2_swd_series_resistors¶
suggestion DBG-2 #6s4 U1.3 (PA13/SWDIO) and U1.4 (PA14/SWCLK) go straight to header J1 with no series resistor
part J1, part U1, pin U1.3, pin U1.4
fix: 22-100 Ω in SWCLK and SWDIO (TCK, TMS, TDI, TDO) near the MCU; NRST and VTref without one
DBG-2 also fires on the test schematics of other checks: dbg-17_swd_without_reset, dbg-1_swd_not_connected.