summaryrefslogtreecommitdiff
path: root/src-avr/ao_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src-avr/ao_timer.c')
-rw-r--r--src-avr/ao_timer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src-avr/ao_timer.c b/src-avr/ao_timer.c
index cc48dd2a..f0918a7d 100644
--- a/src-avr/ao_timer.c
+++ b/src-avr/ao_timer.c
@@ -162,6 +162,9 @@ ao_clock_init(void)
PLLCSR |= (1 << PLLE);
while (!(PLLCSR & (1 << PLOCK)))
;
+
+ set_sleep_mode(SLEEP_MODE_IDLE);
+ sleep_enable();
#else
/* Switch system clock to crystal oscilator */
CLKCON = (CLKCON & ~CLKCON_OSC_MASK) | (CLKCON_OSC_XTAL);