WatchDog Interrupt CPUSleep
-
- Posts: 10
- Joined: 05 February 2015, 4:52 AM
I observed the issue that you described. I found that disabling the Timer0 and Timer2 interrupts before entering sleep mode, and then re-enabling them afterward, seemed to solve the problem.integrator wrote:I emailed you my code.
I tried this on a hunch because of this statement in the datasheet section on sleep modes:
In your app, the only interrupts enabled are the watchdog interrupt, Timer0 and Timer2 compare match A interrupt, and the three USART0 interrupts. It didn't seem necessary to disable/re-enable the USART interrupts in my test but in the actual application it might be necessary to disable at least the "data received" interrupt.mega1284P datasheet wrote:If an enabled interrupt occurs while the MCU is in a sleep mode, the MCU wakes up.
- Don Kinzer