mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-14 00:52:05 +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
|
time only mode
|
||||||
./bin/run.sh --set gps_operation 3
|
./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
|
fix has_gps based on new logic
|
||||||
|
|
||||||
|
@ -204,8 +204,11 @@ bool Power::axp192Init()
|
|||||||
PMU_IRQ, [] { pmu_irq = true; }, FALLING);
|
PMU_IRQ, [] { pmu_irq = true; }, FALLING);
|
||||||
|
|
||||||
axp.adc1Enable(AXP202_BATT_CUR_ADC1, 1);
|
axp.adc1Enable(AXP202_BATT_CUR_ADC1, 1);
|
||||||
axp.enableIRQ(AXP202_BATT_REMOVED_IRQ | AXP202_BATT_CONNECT_IRQ | AXP202_CHARGING_FINISHED_IRQ | AXP202_CHARGING_IRQ |
|
// we do not look for AXP202_CHARGING_FINISHED_IRQ & AXP202_CHARGING_IRQ because it occurs repeatedly while there is
|
||||||
AXP202_VBUS_REMOVED_IRQ | AXP202_VBUS_CONNECT_IRQ | AXP202_PEK_SHORTPRESS_IRQ,
|
// 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);
|
1);
|
||||||
|
|
||||||
axp.clearIRQ();
|
axp.clearIRQ();
|
||||||
|
@ -190,8 +190,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// code)
|
// code)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Leave undefined to disable our PMU IRQ handler
|
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
|
||||||
#define PMU_IRQ 35
|
// and waking from light sleep
|
||||||
|
// #define PMU_IRQ 35
|
||||||
#define AXP192_SLAVE_ADDRESS 0x34
|
#define AXP192_SLAVE_ADDRESS 0x34
|
||||||
|
|
||||||
#elif defined(TBEAM_V07)
|
#elif defined(TBEAM_V07)
|
||||||
|
@ -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
|
gpio_wakeup_enable((gpio_num_t)RF95_IRQ_GPIO, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high
|
||||||
#endif
|
#endif
|
||||||
#ifdef PMU_IRQ
|
#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)
|
if (axp192_found)
|
||||||
gpio_wakeup_enable((gpio_num_t)PMU_IRQ, GPIO_INTR_LOW_LEVEL); // pmu irq
|
gpio_wakeup_enable((gpio_num_t)PMU_IRQ, GPIO_INTR_LOW_LEVEL); // pmu irq
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user