1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

wake up from the sleep mode atmega128

Discussion in 'Embedded' started by Tamilmaran S, May 17, 2005.

  1. Tamilmaran S

    Tamilmaran S Guest

    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
     
    Tamilmaran S, May 17, 2005
    #1
    1. Advertisements

  2. Tamilmaran S

    Dan Guest

    The interrupts you want to use must me enabled.
     
    Dan, May 17, 2005
    #2
    1. Advertisements

  3. Tamilmaran S

    Tamilmaran S Guest

    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
     
    Tamilmaran S, May 17, 2005
    #3
  4. Tamilmaran S

    R Adsett Guest

    Above code? There is no above code.

    Robert
     
    R Adsett, May 18, 2005
    #4
  5. Tamilmaran S

    Jeroen Guest

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

    Jeroen
     
    Jeroen, May 19, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.