From aa19718ba430698f271e7ae7ce98b332451f067a Mon Sep 17 00:00:00 2001 From: Dmitry Galenko Date: Wed, 14 Dec 2022 17:26:55 +0100 Subject: [PATCH] Change condition for low-voltage killswitch --- src/Power.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Power.cpp b/src/Power.cpp index ff6105338..ec86adc94 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -568,8 +568,12 @@ bool Power::axpChipInit() } DEBUG_MSG("=======================================================================\n"); -// Disable shutdown for non ESP32 boards -#ifdef ARCH_ESP32 +// We can safely ignore this approach for most (or all) boards because MCU turned off +// earlier than battery discharged to 2.6V. +// +// Unfortanly for now we can't use this killswitch for RAK4630-based boards because they have a bug with +// battery voltage measurement. Probably it sometimes drops to low values. +#ifndef RAK4630 // Set PMU shutdown voltage at 2.6V to maximize battery utilization PMU->setSysPowerDownVoltage(2600); #endif