v1.1.1 - Badger deep sleep powers off
Follow-up to v1.1.0. Deep sleep on the Badger 2040 now switches the board
off rather than leaving it drawing 1 mA.
Badger 2040 power, measured on a PPK2
| state | stock | patched |
|---|---|---|
| awake, 125 MHz | 25 mA | 25 mA |
| light sleep | 16 mA | 2 mA |
| deep sleep | 1 mA | 3 µA |
| reader average, 1 page / 10 s | 18 mA | 5 mA |
Two separate problems. Light sleep was fixed in v1.1.0 by patching
CircuitPython (firmware/patches/0002-rp2-real-light-sleep.patch).
Deep sleep was the other one, and no firmware change reaches it: the RP2040
is already fully dormant there, and the remaining milliamp is the board -
regulator, panel, divider. This board latches its own rail, so deep sleep now
drops it and powers off outright. 1 mA -> 3 µA, low enough that a cell's
self-discharge dominates.
It costs nothing on wake: deep sleep here was always a full reboot, so a cold
boot on any button is the same experience, and the panel holds the sleep
screen with no power at all. On USB the cable feeds the rail and it cannot be
cut, so the reader falls through to an ordinary deep sleep and debugging is
unaffected.
Assets
badger-1.1.1.zip- precompiled Badger reader, use this rather than
v1.1.0's, which predates the deep-sleep changebadger2040-circuitpython-real-light-sleep.uf2- patched CircuitPython,
unchanged from v1.1.0. Hold BOOTSEL, plug in, copy to theRPI-RP2drive.
Back up CIRCUITPY first - flashing can reformat it.heltec_vision_master_e213.bin/heltec_vision_master_e290_lightsleep.bin- unchanged since v1.0.0, flash at
0x0
- unchanged since v1.0.0, flash at
SHA256SUMS
A note for Badger users running from source
The RP2040 can no longer compile device/code.py at boot and still have a
contiguous 4736-byte block left for a page buffer - it fails with
MemoryError in the display driver. The precompiled package is not an
optimisation on this board, it is the supported layout. code.py there is a
one-line shim importing lib/ereader.mpy; rebuild with
tools/build_badger_release.py. The E213 and E290 are unaffected and still
run device/ directly.