??? 04/20/08 19:32 Read: times |
#153750 - Power down mode problem with timer 0 interrupt... |
Hi,
I have observed that after going to sleep and waking up, my timer 0 interrupt handler does not get called. My problem is this: My micro receives an external interrupt every second from a real time clock. This external interrupt is tied to /INT0 of the micro. I need to light up an LED for 10 seconds(visual alarm). I calculated how many times timer 0 would overflow in 10 seconds. Let us call this count 'n'. Then in my timer 0 ISR, I keep a count how many times the ISR was called. When this number matches 'n' I know that 10 seconds have elapsed and then I shut the LED down. The problem I am facing is that if I go to power down mode between the RTC interrupts, my LED keeps on blinking and never stops. Basically the count 'n' is never reached. However, if I choose to go to idle mode instead of power down mode, everything works and my LED does not light up after 10 seconds. Somehow I believe that this is due to the oscillator stopping in power down mode and not stopping in idle mode. But I am not able to figure out the exact connection. Can anyone please suggest what is happening here? Thanks in advance! regards, Seemanta |
Topic | Author | Date |
Power down mode problem with timer 0 interrupt... | 01/01/70 00:00 | |
I got it!!![]() | 01/01/70 00:00 |