mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 01:42:15 +00:00
bug #376 - stop using pmu IRQ - we don't need it and it causes LS wakes
This commit is contained in:
parent
943d5cb08d
commit
7854a22fbf
@ -6,9 +6,9 @@ bin/run.sh --set region 8
|
||||
time only mode
|
||||
./bin/run.sh --set gps_operation 3
|
||||
|
||||
fix wake behavior when message arrives on lora
|
||||
record power measurements and update spreadsheet
|
||||
|
||||
do new power measurements
|
||||
fix uart wake from sleep
|
||||
|
||||
fix has_gps based on new logic
|
||||
|
||||
|
@ -204,8 +204,11 @@ bool Power::axp192Init()
|
||||
PMU_IRQ, [] { pmu_irq = true; }, FALLING);
|
||||
|
||||
axp.adc1Enable(AXP202_BATT_CUR_ADC1, 1);
|
||||
axp.enableIRQ(AXP202_BATT_REMOVED_IRQ | AXP202_BATT_CONNECT_IRQ | AXP202_CHARGING_FINISHED_IRQ | AXP202_CHARGING_IRQ |
|
||||
AXP202_VBUS_REMOVED_IRQ | AXP202_VBUS_CONNECT_IRQ | AXP202_PEK_SHORTPRESS_IRQ,
|
||||
// we do not look for AXP202_CHARGING_FINISHED_IRQ & AXP202_CHARGING_IRQ because it occurs repeatedly while there is
|
||||
// no battery also it could cause inadvertent waking from light sleep just because the battery filled
|
||||
// we don't look for AXP202_BATT_REMOVED_IRQ because it occurs repeatedly while no battery installed
|
||||
// we don't look at AXP202_VBUS_REMOVED_IRQ because we don't have anything hooked to vbus
|
||||
axp.enableIRQ(AXP202_BATT_CONNECT_IRQ | AXP202_VBUS_CONNECT_IRQ | AXP202_PEK_SHORTPRESS_IRQ,
|
||||
1);
|
||||
|
||||
axp.clearIRQ();
|
||||
|
@ -190,8 +190,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// code)
|
||||
#endif
|
||||
|
||||
// Leave undefined to disable our PMU IRQ handler
|
||||
#define PMU_IRQ 35
|
||||
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
|
||||
// and waking from light sleep
|
||||
// #define PMU_IRQ 35
|
||||
#define AXP192_SLAVE_ADDRESS 0x34
|
||||
|
||||
#elif defined(TBEAM_V07)
|
||||
|
@ -176,7 +176,7 @@ void doDeepSleep(uint64_t msecToWake)
|
||||
|
||||
// axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF); // LORA radio
|
||||
|
||||
// now done by UBloxGPS.cpp
|
||||
// now done by UBloxGPS.cpp
|
||||
// setGPSPower(false);
|
||||
}
|
||||
#endif
|
||||
@ -275,7 +275,7 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
|
||||
gpio_wakeup_enable((gpio_num_t)RF95_IRQ_GPIO, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high
|
||||
#endif
|
||||
#ifdef PMU_IRQ
|
||||
// FIXME, disable wake due to PMU because it seems to fire all the time?
|
||||
// wake due to PMU can happen repeatedly if there is no battery installed or the battery fills
|
||||
if (axp192_found)
|
||||
gpio_wakeup_enable((gpio_num_t)PMU_IRQ, GPIO_INTR_LOW_LEVEL); // pmu irq
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user