STM32 Blue Pill Low Power - LieBtrau/electronics-design-data GitHub Wiki

Hardware modifications

  • Remove R1 (to turn off the power LED)
  • U1, Richtek RT9193, is not designed for low power. It has 130µA quiescent current. Replace it by a pin compatible Richtek RT9073N-33GB which only draws 3µA quiescent current and 80mV dropout voltage at 50mA output current. The NCP4684 (Imax=150mA) and NCP4681 are inferior alternatives.
  • Connect VBAT to VDD

Low power modes

  • Reference
  • If application has a repeated loop and every loop takes > 200ms, then use "Standby mode" (start from reset every time), which is the lowest power mode.
    • Mode entry: WFI (Wait for Interrupt) or WFE (Wait for Event) while:
      • Set SLEEPDEEP in Cortex-M3 System Control register
      • Set PDDS bit in Power Control register (PWR_CR)
      • Clear WUF bit in Power Control/Status register (PWR_CSR)
    • all pins HiZ except WKUP-pin. WKUP pin is used for wakeup from Standby mode and forced in input pull down configuration (rising edge on WKUP pin wakes-up the system from Standby mode).
  • Turn off peripherals (by clock gating) during run-mode.

Debugging

  • In case you can't load your firmware into the Blue Pill (e.g. because it's in standby mode), then do the following:
    • Put jumper BOOT0 in the "1" position.
    • Push and release reset button.
    • Put jumper BOOT0 back to the "0" position.
    • Try to upload your firmware again.
  • During debugging, the Blue Pill will consume 1.5mA. Stop debugging and disconnect SWD to measure sleep current of your application.

Hardware connections

  • Be aware that all IO-pins, except the WKUP-pin and PA12 are Hi-Z.
    • Connect a pull-down resistor to the UART-TX pins to avoid sending spurious characters.
    • PA12 has a 4K7 pull-up resistor connected to it. Don't connect it to a peripheral that pulls that line low during Blue Pill sleep.
  • The debug connection (SWD) on connector P2 is responsible for about 330µA current draw, even when not debugging.

Power supply

  • The voltage on the 5V connection can be made as small as 2.5V.