Go Down

Topic: Interrupts do not fire with Arduino 1.0 (Read 1 time) previous topic - next topic



I just upgraded from the IDE version 0022 to the 1.0, and now my interrupts no longer fire in SLEEP_MODE_PWR_DOWN mode.  Is anyone aware of this change?

The SLEEP_MODE_IDLE mode just bounces out of the sleep mode too quickly, so it's rather pointless.  I'm trying to put the thing to sleep, and the SLEEP_MODE_PWR_DOWN does, but after the upgrade, the interrupts no longer fire.  The code :

//    set_sleep_mode(SLEEP_MODE_IDLE);

Anyone know if someone changed the code?  I didn't see anything in the revision history (didn't check out the source for changes, though).



Unfortunately, it stopped letting me upload code.  Not sure if this is 1.0 yet, but will back-rev the IDE just to see if it's a problem with 1.0.


After getting the arduino un-bricked, I have validated that moving back to 0023 the interrupts were working, and moving to 1.0 and uploading the code caused them to fail.  Back to 0023 a fourth time, and it is clear something has changed from 0023 to 1.0, as it works again.


do you have

# include <avr/interrupt.h>

at the top of your sketch?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


Don't know if this is related.. but I was trying to get the code from http://www.engblaze.com/hush-little-microprocessor-avr-and-arduino-sleep-mode-basics/ running on a 8mhz breadboard arduino and the LED on 13 stays high on 1.0.
Have you found a solution?


Figured it out.. setting the attachInterrupt() once in the setup routine did the trick.
I also had to disable timer0 with power_timer0_disable() before sleep_mode() and enable it back at wakeup.

Go Up