← Back to the chapter · Next detail →

Technical detail · Low-Power Design: Sleep-State Energy Accounting

Hidden leakage paths defeat power gating

Power-gating a peripheral only helps if you cut every path into it. A classic trap involves the I2C bus. Suppose you switch off a sensor’s power rail to save its 1 mA during sleep, but leave the bus pull-up resistors powered and the I2C lines high. Current then flows from the pull-ups through the sensor’s input protection diodes into the now-unpowered chip. That leak both wastes current and can partially power the sensor through its own pins, so the gated device is neither fully off nor properly saving energy.

The same pattern hides in other places: a peripheral clock left enabled keeps a block toggling, a GPIO left driving into a depowered load pushes current through protection structures, and a floating input can oscillate and draw switching current. The fixes are specific and cheap. Before sleeping, drive shared bus lines low or gate the pull-ups on the same switch as the sensor, disable unused peripheral clocks, and set unused pins to a defined low-leakage state. The rule is to power-gate the whole island - rail, pull-ups, and signals together - not just the chip’s main supply pin.

Put a number on the hidden path before dismissing it. A 4.7 kOhm pull-up on a 3.3 V bus can source about 3.3 / 4700 = 0.70 mA if a depowered input clamps the line low through a diode path. Two lines can therefore create a milliamp-scale leak, larger than many MCU deep-sleep currents by two orders of magnitude. Even a partial 0.2 mA leak on each line for a 60 s sleep interval adds 0.4 x 60 = 24 mA-s, which dwarfs the 0.6 mA-s of a 10 uA processor sleep over the same interval. The measurement proof is simple: change the bus state, gate the pull-ups with the sensor rail, and confirm the sleep floor falls in the full-cycle trace.

← Back to the chapter · Next detail →