To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 49
48  |  50
Subject: 
H8300 Stack and SLEEP
Newsgroups: 
lugnet.robotics.rcx.legos, lugnet.robotics.rcx.pbforth, lugnet.robotics
Date: 
Mon, 15 Mar 1999 14:31:45 GMT
Viewed: 
1745 times
  
Hi All,

If this is old news, ignore it...

I just figured out this weekend (thanks Kekoa) that the H8/300 stack
pointer (r7) and the power-down function in the RCX have a close
relationship.

The stack pointer MUST be in the on-chip RAM area (0xFD80 to 0xFF7F)
before calling the RCX shutdown_power() function. This is because the
shutdown_power() funtion (I think) deselects the external RAM to put
it into a low-power mode before putting the CPU itself to sleep.

If r7 is pointing outside of the on-chip RAM, then it cannot be
retrieved and the RCX will hang, and in such a nasty way that you
will have to remove the batteries for about 5 minutes - not a few
seconds like normally.

This is especially important for users of legOS and pbFORTH since we
are likely to allocate task stacks or put the stack pointer outside of the
small 512 byte stack area.

Cheers,

Ralph Hempel - P.Eng

------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.bmts.com/~rhempel/lego/pbFORTH/default.html>
------------------------------------------------------
Reply to:      rhempel at bmts dot com
------------------------------------------------------



Message has 1 Reply:
  Re: H8300 Stack and SLEEP
 
(...) After talking with Ralph over the weekend, I suggested a test he might do to figure out if port 5 bit 2 really does what he suggested it might. I don't think he did this test, so I fired up my RCX and hacked it together. I verified that port 5 (...) (26 years ago, 16-Mar-99, to lugnet.robotics.rcx.legos, lugnet.robotics.rcx.pbforth, lugnet.robotics)

4 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR