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 / 46
45  |  47
Subject: 
Re: Idle process
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 11 Mar 1999 15:23:21 GMT
Viewed: 
1325 times
  
Sorry this message is so late, I had to get registered for posting from
my work address.

"Markus L. Noga" wrote:

Hi Lou,

the sleep instruction effectively shuts down the CPU until the next
interrupt occurs.
Thus, the idle process conserves battery power if no task wishes to run.
I consider this a worthwile feature. If you can do this without a
dedicated idle task, feel free to move sleep somewhere else.

I, too, consider power saving to be a valuable (indispensible) feature.
That is precisely the sort of thing that I feared I might be
overlooking.  Up 'till now, I had not worked on an embedded project
which would benefit from using sleep/powerdown modes.

Rereading your code (again), It appears that the situation which causes
this desired behavior is when the loop (in tm.c) wraps around and finds
the idle process at its head.

My code uses a linear (not circular) list of priority structures, so
there is a definite end (where a sleep would be coded).  However, I am
in an ISR at task switching time, so I don't really want to sleep then.
It appears that a power saving task is actually a very good way of
handling this.  I don't actually have an aversion to the sleep task; I
just wanted to fully understand its purpose.

I think I can achieve a similar effect by putting the idle task at the
lowest priority in my structure.


The fact that process lists depend on tm_idle to be there is plain bad
style. I guess I wrote it like that. Sigh.

Don't be too hard on yourself.  I have been quite impressed with the
general quality of your code, and the elegance of some of the mechanisms
implemented therein.

I think the hardest part of this is going to be sufficiently testing the
new code.  Do you have a jig for testing this stuff on the host system,
or do you just burn-and-crash on the RCX?



Message is in Reply To:
  Re: Idle process
 
Hi Lou, the sleep instruction effectively shuts down the CPU until the next interrupt occurs. Thus, the idle process conserves battery power if no task wishes to run. I consider this a worthwile feature. If you can do this without a dedicated idle (...) (26 years ago, 8-Mar-99, to lugnet.robotics.rcx.legos)

10 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