IO-8 Mention a needed pull-up or down where it applies¶
| Severity | Status | Implementation |
|---|---|---|
| suggestion | runs in better_erc | easy, depends on NET-5, RPT-13 |
Data it needs: graph, part classes, rails, values.
Looks at. Switch parts, pins with internal pulls.
What it catches. A button or open-drain source with no external pull, where the firmware must enable an internal one: report it, so the firmware does.
Why it matters. A button to GND on a GPIO with no external pull-up works only with the internal pull-up enabled; nothing in the schematic tells the firmware writer. Some parts make internal pulls unusable: on the RP2350 A2, an input with only the pad pull-down can latch at about 2.2 V (erratum E9), so a button to 3.3 V needs an external pull-down of 8.2 kΩ or less.
Example. B200A rev A's user button SW101 connects GPIO22 to 3.3 V with no external pull-down: the internal one is needed, and E9 makes it unreliable; rev A got a 6 kΩ rework resistor, rev B an external pull-down.
How to check. Switch to a rail with no opposite pull on the input side: add an entry "needs internal pull-up/down" to the programmer report (RPT-13), and an error where the part's errata rule internal pulls out. better_erc (erc_checks/src/io/io_8.rs) also reports an open-drain pin (pin type; no flag or I2C line) on a net with an MCU pin and no pull-up. A controller's own open-drain pin whose net reaches no logic input (only passives, connectors and test points on the net and behind one series resistor, as in LOGIC-7) switches a resistor or leaves the board: it needs no pull and is left out.
A pull-up behind a series resistor still holds the net when the series resistor is small next to it. better_erc counts a pull one series resistor, ferrite, net tie or jumper away when the series part is at most a fifth of the pull. For example, an MCU reset output that reaches a hub's RESET_N through a 1 kΩ resistor, with a 100 kΩ pull-up on the hub side, is pulled up. At a fifth, the far side stays within a sixth of the rail of the level driven against the pull. The other checks that read pulls, such as IO-15, IO-16, CLK-5 and USB-1, count them the same way.
A switched pull-up is a pull-up whose far end is not a rail but a net that goes high only on command. It saves the current through the pulls while the bus is idle, or keeps an unpowered device from being back-fed. better_erc knows two kinds:
- A controller's push-pull pin that feeds pull resistors and nothing else, leading to at least two signal nets. For example, an MCU output
HUB_I2C_ENthat feeds the two pull-ups of an I2C bus. A signal net carries an IC's or a connector's pin; a pin that drives two gates or LEDs through series resistors feeds no pulls. - A net that a MOSFET's drain-source or a BJT's collector-emitter path switches onto a rail, such as the drain of a high-side P-MOSFET. Back-to-back MOSFETs in series count too. A dual transistor whose drain and source pins sit on more than one net is left out, since its channels cannot be told apart.
A switched pull-up holds the net high only while it is switched on. IO-8, IO-15 and DBG-8 ask whether a net has a pull-up at all, so they count it. The checks of static levels, such as IO-16, CLK-5 and USB-1, do not.
Fix. Either an external pull, or a line in the programmer report and the firmware's pin setup.
References. RP2350 §D.5.1 (RP2350-E9); B200 rev B change list; Ganssle part 2 (RC debouncer).
Test schematics¶
Each schematic below is in test_schematics/sources. The block under it is what berc check --only IO-8 reports on it.
io-8_fet_switched_pull¶
suggestion IO-8 #737 U3.3 (DRDY) on /DRDY_B is open-drain with no external pull-up: the controller needs its internal pull-up enabled
net /DRDY_B, pin U3.3
fix: an external pull-up to the reader's IO rail, or the internal one in the firmware's pin setup and the programmer report
io-8_internal_pulls¶
suggestion IO-8 #dh6 SW2 pulls /BTN_DN to +3V3 with no external pull-down: the reader needs an internal pull-down to see it low while released
net /BTN_DN, part SW2
fix: an external pull-down, or the internal one enabled in the firmware's pin setup and noted in the programmer report
suggestion IO-8 #xb0 SW1 pulls /BTN_UP to GND with no external pull-up: the reader needs an internal pull-up to see it high while released
net /BTN_UP, part SW1
fix: an external pull-up, or the internal one enabled in the firmware's pin setup and noted in the programmer report
suggestion IO-8 #6b4 U2.3 (DRDY) on /LIGHT_DRDY is open-drain with no external pull-up: the controller needs its internal pull-up enabled
net /LIGHT_DRDY, pin U2.3
fix: an external pull-up to the reader's IO rail, or the internal one in the firmware's pin setup and the programmer report
io-8_series_pull¶
suggestion IO-8 #0wp U3.3 (DRDY) on /DRDY_B is open-drain with no external pull-up: the controller needs its internal pull-up enabled
net /DRDY_B, pin U3.3
fix: an external pull-up to the reader's IO rail, or the internal one in the firmware's pin setup and the programmer report
io-8_switched_pull¶
suggestion IO-8 #0bs U4.3 (DRDY) on /DRDY_C is open-drain with no external pull-up: the controller needs its internal pull-up enabled
net /DRDY_C, pin U4.3
fix: an external pull-up to the reader's IO rail, or the internal one in the firmware's pin setup and the programmer report
IO-8 also fires on the test schematics of other checks: io-1_drive_sources, logic-7_mcu_open_drain_receiver, logic-7_open_drain.