Discussion in "AVR Discussion Forum" started by    compaq    Jan 29, 2013.
Tue Jan 29 2013, 03:36 pm
#1
hi
i am using AVR atmega128 , i want to use the sleep mode for power saving
and i want to wake up device on the basis of external interrupt 5,
the interrupt works ok if i am using it in normal mode,
but when i turn the MCU to sleep mode the external interrupt does not work

please help
thank you



set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
sei();
sleep_mode();
// code stucks here and interrupt does now work

sleep_disable();
Wed Jan 30 2013, 03:14 pm
#2
Wed Jan 30 2013, 03:23 pm
#3
hi
i have seen this document before, thanks for sharing, but the problem is this i am unable to wake up device using interrupt 5, it only wakes up using interrup 0 so this was the issue.
thank you
Sun Feb 03 2013, 04:06 am
#4
is interrupt 5 enabled? and ATmega128 only get enabled if interrupt 5 is configured for level interrupt. check page 56 of datasheet for info on wakeup sources.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am