wake up from the sleep mode atmega128

May 17, 2005 4 Replies

hi, Good Day, I want to put my controller Atmega128 into the sleep mode, it is going well but it is not waking up from the idle mode for any interrupt occure. The actual asm code is as below:



; 3591 sleep_enable(); CALL _sleep_enable ; 3592 idle(); CALL _idle


_sleep_enable: in r30,mcucr sbr r30,__se_bit out mcucr,r30 ret



_sleep_disable: in r30,mcucr cbr r30,__se_bit out mcucr,r30 ret



_idle: in r30,mcucr cbr r30,__sm_mask out mcucr,r30 sleep ret



can anyone direct me to solve this problem , my advance thanks



with regards marans



Dan, We enabled all the interrupts whatever we used, we didn't block any one them. Stil that problem is coming (not waking up from the idle mode for any interrupt). We tried to simulate the above code , but the program flow caught up in the ' sleep ' instruction itself, it is not coming out from that line for timer overflow interrupt , but it should come out. Thank you for your reply.

with regards marans

Above code? There is no above code.

Robert

"Tamilmaran S" schreef in bericht news: snipped-for-privacy@g14g2000cwa.googlegroups.com...

Are the interrupts working before the sleep instruction? Do you have the global interrupt enable flag on?

Jeroen

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required