DBG-22 SWDIO without a pull-up or SWCLK without a pull-down (10k-100k)¶
| Severity | Status | Implementation |
|---|---|---|
| suggestion | planned | mid, depends on NET-7 |
Looks at. SWD pins, external pulls, internal pulls of the part (NET-7).
What it catches. SWDIO with no pull-up, SWCLK with no pull-down, on a part that does not provide them internally, or where the pins can lose their internal pulls (pins reused as GPIO).
Why it matters. The ARM SWD protocol expects a defined idle: SWDIO high, SWCLK low. With an unplugged header and a few centimetres of trace, noise can toggle the debug port. On parts with a boot function on SWCLK it matters more: STM32G0's PA14 is also BOOT0, and SWCLK held high at reset enters the ROM bootloader once nBOOT_SEL is cleared.
Example. B153A's SWCLK carries a 100 kΩ pull-down (R209) because it is also BOOT0; the change list asks whether to go to 10 kΩ like on CANnify. AN5096 says the STM32G0 has internal pulls on both pins (SWDIO pull-up, SWCLK pull-down) and needs no external ones, so for that part the check only fires where the pins are reused.
How to check. For each SWD pin, an external pull to the right level, or an internal one from the part's data (NET-7); flag parts without either.
Fix. 10-100 kΩ pull-up on SWDIO and pull-down on SWCLK at the MCU, unless the datasheet guarantees the internal ones in every state the board sees.
References. AN5096 §4.3.2 (internal pull-up and pull-down on SWD pins); B153 rev B change list (SWCLK pull-down); B153A schematic review §12 (BOOT0 on PA14).