Update tbeam deepsleep example
This commit is contained in:
parent
be0ac0f1db
commit
44085e1e9b
4 changed files with 35 additions and 9 deletions
|
|
@ -129,6 +129,7 @@ bool beginPower()
|
|||
PMU->disablePowerOutput(XPOWERS_BLDO2);
|
||||
PMU->disablePowerOutput(XPOWERS_DLDO1);
|
||||
PMU->disablePowerOutput(XPOWERS_DLDO2);
|
||||
PMU->disablePowerOutput(XPOWERS_CPULDO);
|
||||
|
||||
// GNSS RTC PowerVDD 3300mV
|
||||
PMU->setPowerChannelVoltage(XPOWERS_VBACKUP, 3300);
|
||||
|
|
@ -341,10 +342,6 @@ void disablePeripherals()
|
|||
PMU->disableBattVoltageMeasure();
|
||||
PMU->disableTemperatureMeasure();
|
||||
PMU->disableBattDetection();
|
||||
// Disable all PMU interrupts
|
||||
PMU->disableIRQ(XPOWERS_AXP2101_ALL_IRQ);
|
||||
// Clear the PMU interrupt status before sleeping, otherwise the sleep current will increase
|
||||
PMU->clearIrqStatus();
|
||||
|
||||
#if defined(T_BEAM_S3_BPF)
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO4); //gps
|
||||
|
|
@ -353,10 +350,33 @@ void disablePeripherals()
|
|||
PMU->disablePowerOutput(XPOWERS_DCDC5);
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO1);
|
||||
#else
|
||||
// LoRa VDD
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO2);
|
||||
//GNSS VDD
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO3);
|
||||
|
||||
if (PMU->getChipModel() == XPOWERS_AXP2101) {
|
||||
|
||||
// Disable all PMU interrupts
|
||||
PMU->disableIRQ(XPOWERS_AXP2101_ALL_IRQ);
|
||||
// Clear the PMU interrupt status before sleeping, otherwise the sleep current will increase
|
||||
PMU->clearIrqStatus();
|
||||
// GNSS RTC Power , Turning off GPS backup voltage and current can further reduce ~ 100 uA
|
||||
PMU->disablePowerOutput(XPOWERS_VBACKUP);
|
||||
// LoRa VDD
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO2);
|
||||
// GNSS VDD
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO3);
|
||||
|
||||
} else if (PMU->getChipModel() == XPOWERS_AXP192) {
|
||||
|
||||
// Disable all PMU interrupts
|
||||
PMU->disableIRQ(XPOWERS_AXP192_ALL_IRQ);
|
||||
// Clear the PMU interrupt status before sleeping, otherwise the sleep current will increase
|
||||
PMU->clearIrqStatus();
|
||||
// LoRa VDD
|
||||
PMU->disablePowerOutput(XPOWERS_LDO2);
|
||||
// GNSS VDD
|
||||
PMU->disablePowerOutput(XPOWERS_LDO3);
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,9 @@
|
|||
|
||||
## TIMER_WAKEUP_ADD_GPIO_WAKEUP_ext1_ext0_SLEEP_CUR + DISPLAY
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## TIMER_WAKEUP_ADD_GPIO_WAKEUP_ext1_ext0_SLEEP_CUR NO DISPLAY + DISABLE GNSS BACKUP POWER
|
||||
|
||||

|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ void handleEvent(AceButton *button, uint8_t eventType, uint8_t buttonState)
|
|||
// esp_sleep_enable_timer_wakeup(30 * 1000 * 1000);
|
||||
|
||||
|
||||
// GPIO WAKE UP EXT0 + EXT 1 + TIMER WAKE UP NO OLED Display + Disable gnss power backup power ~ 415 uA
|
||||
// GPIO WAKE UP EXT0 + EXT 1 + TIMER WAKE UP NO OLED Display ~ 540 uA
|
||||
// GPIO WAKE UP EXT0 + EXT 1 + TIMER WAKE UP + OLED Display ~ 580 uA
|
||||
// Serial.println("GPIO WAKE UP EXT0 + EXT 1 + TIMER WAKE UP");
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 262 KiB |
Loading…
Add table
Add a link
Reference in a new issue