Shop OBEX P1 Docs P2 Docs Learn Events
Nap Mode — Parallax Forums

Nap Mode

RyanKURyanKU Posts: 2
edited 2008-07-17 14:04 in General Discussion
System setup:
Windows XP
Software 2.03
Stamp version $50

Problem:
When we try to put the stamp into nap mode by calling CPU.nap(7),
several problems ensue. The stamp's power consumption actually
decreases slightly but then increases to above its baseline consumption
(e.g. 80mA -> 100mA). As well, it doesn't recover from the napping
state and stops responding. There are no virtual peripherals installed
that might conflict with nap mode. This is being tested in a barebones
program in order to troubleshoot the problem.

Thanks
Ryan

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-04-11 17:59
    Can you post your code?
    Also, no VP's must be running, that includes Timer().

    regards peter
  • RyanKURyanKU Posts: 2
    edited 2007-04-11 18:08
    The code we used was very basic. All the test was supposed to do was test the power consumption during sleep mode.

    import stamp.core.*;

    class test {
    public static void main() {
    System.out.println("TEST");
    CPU.nap(7);
    System.out.println("TEST2");

    }

    }


    TEST is written to the screen. The power consumption is normally approximately 80mA and drops to 50mA for a very short period (less than the sleep time) and then rises to 100mA, and the stamp stops responding. TEST2 never prints. Reprogramming requires a reset of the stamp.

    Thanks
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-04-11 18:36
    I tested your code and can confirm your results.
    I had to recycle power to the javelin to be able to reprogram it.

    I never use(d) nap and based upon these findings I advice not to use nap().
    I do not know if it only applies to nap(7) or to any nap(x).

    regards peter
  • Ken DoeKen Doe Posts: 1
    edited 2008-07-17 14:04
    This is an VERY serious problem. One of the reasons we choose the Javelin was it's extreme power management efficiency. If nap can't be used safely, what good is it? This is not a liability we can live with in production.
    Has this been reported to Parallax? If not, how does one go about reporting such problems?
    I'd like to gain a better understanding of the risk so we can at least try to manage it.
    I really like the Javelin architecture and don't want to have to abandon it.
    I'd be willing to conduct some testing if anyone wants to provide me with some use-cases.

    On a related topic: I can understand why VP's have to be stopped before using nap, but it's not intuitive until you actually trip over this design weakness. Be that as it may, why can't the compiler simple flag this?

    Peter: How's the VP support coming along in the Propeller?

    --dy
Sign In or Register to comment.