Shop OBEX P1 Docs P2 Docs Learn Events
NOP before SLEEP — Parallax Forums

NOP before SLEEP

ZootZoot Posts: 2,227
edited 2007-11-24 20:44 in General Discussion
In this thread: forums.parallax.com/forums/post.aspx?f=7&m=231773
Bean said...
(note that you need something between the WKPND_B and SLEEP, a NOP will do)

Why?

Is the need for NOP before SLEEP documented? I don't see it specifically mentioned in either the SX/B help file or in the SX manual, though I see it code examples occasionally.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST

Post Edited (Zoot) : 11/23/2007 8:18:07 PM GMT

Comments

  • BeanBean Posts: 8,129
    edited 2007-11-23 12:27
    Zoot, I remember having trouble with SLEEP and I remember I had to put a NOP before it.
    It may not have been WKPND_B...It's foggy now. It may have been setting a pin state just before SLEEP. And it may only be for high frequencies (50MHz).
    It was quite awhile ago and I don't remember exactly what the situation was.

    I guess what I trying to say is...If you have a problem with SLEEP, try putting a NOP before it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
  • BeanBean Posts: 8,129
    edited 2007-11-24 20:03
    Zoot,
    Looking back over some old code I think it was that I needed the NOP between WKPND_B=0 and RETURNINT (not SLEEP).

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
  • ZootZoot Posts: 2,227
    edited 2007-11-24 20:44
    Huh. OK. Thanks, I think smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
Sign In or Register to comment.