wake up from the sleep mode atmega128

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

Reply to
Tamilmaran S
Loading thread data ...

The interrupts you want to use must me enabled.

Reply to
Dan

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

Reply to
Tamilmaran S

Above code? There is no above code.

Robert

Reply to
R Adsett

"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

Reply to
Jeroen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.