Menu

#4 Bug in set_sleep_mode() for at least ATMEGA8515

cdk-avr-libc
closed-invalid
Interface (2)
5
2006-06-23
2003-12-25
No

ATMEGA8515 chip have three sleep mode bits SM0, SM1 and SM2
located at different registers EMCUCR.7, MCUCR.4 and MCUCSR.5
respectively.
But set_sleep_mode() for ATMEGA8515 defined:

# define set_sleep_mode(mode) (MCUCR = ((MCUCR &
~_SLEEP_MODE_MASK) | (mode)))

And set_sleep_mode(SLEEP_MODE_IDLE) doing:
MCUCR = ((MCUCR & 0x4F) | (0x00))

or another words:
SRE=0, SE=0 and SM1=0;

--
Unrau Alexander

Discussion

  • Stephan Linz

    Stephan Linz - 2006-06-23

    Logged In: YES
    user_id=21260

    Have to fix by avr-libc developers. Please inform the
    related project:
    http://savannah.nongnu.org/projects/avr-libc

     
  • Stephan Linz

    Stephan Linz - 2006-06-23
    • labels: --> Interface
    • assigned_to: nobody --> slz
    • status: open --> closed-invalid
     

Log in to post a comment.