Skip to content

Increased power usage after flashing firmware #368

@joelspadin

Description

@joelspadin

Operating System

Windows 11

INFO_UF2.TXT

UF2 Bootloader 0.4.1-265-g4723240 lib/nrfx (v2.0.0) lib/tinyusb (0.12.0-145-g9775e7691) lib/uf2 (heads/master-28-gb19ac9a)
Model: Marten Numpad
Board-ID: nRF52840-Marten-Numpad
Date: Nov 16 2025
SoftDevice: not found

UF2 Bootloader 0.5.0 lib/nrfx (v2.0.0) lib/tinyusb (0.9.0-22-g7cdeed54) lib/uf2 (heads/master)
Model: nice!nano
Board-ID: nRF52840-nicenano-v2
SoftDevice: S140 version 6.1.1
Date: Apr 7 2021

What happened?

I have a custom keyboard PCB that uses the nRF52840, and I am running the Adafruit nRF52 bootloader on it (fork at https://github.com/joelspadin/Adafruit_nRF52_Bootloader/tree/marten_numpad). When running ZMK firmware and measuring the power usage at the battery using a Nordic PPK2, I usually get ~45 uA at idle. However, directly after flashing firmware and booting into the new firmware, the power usage increases to ~400 uA, and it remains there until I cycle power or press the reset button, after which it usually returns to ~45 uA. Occasionally, resetting only reduces it to ~150 uA, and then a second reset brings it down to ~45 uA.

I also see the same behavior on a nice!nano v2, which uses ~480 uA after flashing firmware and returns to ~45 uA (or ~150 uA rarely) after pressing the reset button.

It is possible this is an issue with ZMK, but since it only occurs directly after flashing, I suspect it is caused by the bootloader, maybe due to some peripheral being enabled when flashing and not disabled afterwards? Any help you could provide for tracking down what is causing this would be much appreciated.

Both my custom hardware and the nice!nano have similar bootloader configurations, with a single DFU switch, FRST set to an unused pin, and a single-color status LED. The nice!nano bootloader contains the SoftDevice, while the bootloader for my hardware does not, so this doesn't seem to be caused by SoftDevice.

How to reproduce?

  1. Get a nice!nano v2 or other nRF52840-based board and connect a momentary switch across the RST and GND pins.
  2. Attach a power meter across the RAW and GND pins and supply 4.1 V.
  3. Connect the nice!nano to a PC with a USB cable.
  4. Double tap the reset button to enter bootloader.
  5. Build ZMK firmware with board=nice_nano_v2 and shield=two_percent_milk and flash the firmware.
  6. Disconnect USB.
  7. Measure the power draw. A 10 second average will be around 400 uA or more.
  8. Tap the reset button.
  9. Measure the power draw again. A 10 second average should now be < 50 uA.

Debug Log

No response

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions