MEM-3 SD / eMMC CLK with a pull-up, or CD / WP switch pins without one¶
| Severity | Status | Implementation |
|---|---|---|
| warning | runs in better_erc | easy, depends on netlist, NET-5 |
Data it needs: graph, part classes, values, rails.
Looks at. SD socket pins by function, resistors to rails.
What it catches. A pull-up on the SD or eMMC clock line, and the opposite mistake: card-detect (CD) or write-protect (WP) switch contacts of a socket with no pull-up (or pull-down) at all.
Why it matters. CLK is always driven push-pull by the host; a pull-up does nothing useful there but adds load and a stub on the fastest line of the bus, and it is the usual sign that a resistor array was copied over all six lines. CD and WP are bare mechanical switches to ground or the shell: without a pull the input floats whenever the switch is open, so the firmware sees cards appear and vanish, or reads a write-protected card as writable.
Example. A board uses two 4 × 10 kΩ arrays to "pull up the SD bus" and so covers CMD, CLK, DAT0-DAT3, CD and WP, with CLK on one of them; a later revision fixes the CLK but forgets the CD pull, and a Hirose DM3AT socket's detect switch, open with no card, leaves the MCU input floating. B200A shows the intended pattern: 33 Ω series on CLK, no pull-up there, 10 kΩ on DET (hw_b200a.md §11).
How to check. A resistor from the CLK net to a rail (not counting a series resistor); a socket pin whose function is CD, DET or WP with no resistor to a rail and no MCU pin that the project marks as pulled.
Fix. Remove the CLK pull-up (keep a 22-33 Ω series resistor at the host if needed); 10-100 kΩ pulls on CD and WP to the logic rail, matching the switch's other side (to ground or to the shell, see MEM-5).
References. ESP-IDF SD pull-ups (pull-ups on CMD and DATA only); Wikipedia, SD card "Write-protect notch".
Test schematics¶
Each schematic below is in test_schematics/sources. The block under it is what berc check --only MEM-3 reports on it.
mem-3_clk_and_detect_pulls¶
warning MEM-3 #cjr switch contact J1.9 (DET_B) (/SD1_DET) has no pull: the input floats whenever the switch is open
net /SD1_DET, part J1, pin J1.9
fix: 10-100 kΩ to the logic rail (or to ground), matching the switch's other side (MEM-5)
warning MEM-3 #prs clock J1.5 (CLK) (/SD1_CK) has a pull-up, R6: CLK is driven push-pull, the pull-up only adds load and a stub on the fastest line
part J1, part R6, pin J1.5
fix: remove the CLK pull-up; keep a 22-33 Ω series resistor at the host if needed