-
-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
Everything works fine with Standby and Power-Down, the device goes to sleep forever without waking up
void loop() {
SLPCTRL.CTRLA |= SLPCTRL_SMODE_PDOWN_gc; //SLEEP_MODE_PWR_DOWN
sleep_enable();
sleep_cpu();
sleep_disable();
Serial.println("ERROR"); //If you see this there is an error
Serial.flush();
}
But I would like to have millis()
running since I need to keep track of the time
I change to SLEEP_MODE_IDLE
(SLPCTRL.CTRLA |= SLPCTRL_SMODE_STDBY_gc;
)to have the main clock running
However, after that, the device just exits sleep mode immediately. And output "ERROR" to the terminal
Two question that need help:
- Is there any config I need to do for the MCU to go to IDEL mode and enter sleep?
- While in STANDBY and PWR_DOWN, is there anyway to keep
millis()
active?
Thanks all!
Metadata
Metadata
Assignees
Labels
No labels