|
On Tue, 20 Apr 1999, Lou Sortman wrote:
> "Markus L. Noga" wrote:
>
> > rom_reset() does the trick, you'll need to #include "rom/system.h". I'm
> > not sure wheter this is safe when multitasking.
>
> What sort of safety are you referring to? Motors left running? My initial
> thought was of lost memory or data structures in an indeterminate state, but
> that would seem to be moot since you are restarting from the ROM, which will
> have forgotten all about legOS.
In my brief experimentation with rom_reset(), it does not actually clear
the rom- rather it only starts the program over again (in main()). Is
this intentional? I get this behavior when calling it from main- when
calling it from within another thread, it freezes, and the batteries have
to be removed for a restart. This appears to be an interrupt issue (as
discussed elsewhere in the thread) but I haven't checked it yet today.
> However, you may be referring to the little problem of having to have the stack
> in on-chip RAM. I know that I got burned once by calling the power-down
> function while multitasking. I had to wait something like 1/2 hour until the
> onboard cap(s) drained. I don't know whether there is a similar caveat for
> rom_reset() or not. It has been awhile.
Haven't seen anything like that yet, thank goodness.
> This might be good stuff for the HOWTO. 8)
rom_reset() is now there, but I'm trying to figure out where to put the
stuff about the variables/memory. At the moment, I've just created an
"advanced topics" section, since I want to keep the main section basic
and not clutter it up with things like this.
My .02 cents-
Luis
#######################################################################
"They call the faithful to their knees
to hear the softly spoken magic spell:"
"There's no place like home...
There's no place like home...
There's no place like home."
-Pink Floyd, Dark Side of the Moon
-Dorothy, The Wizard of Oz
#######################################################################
|
|
Message is in Reply To:
| | Re: loading s/w
|
| (...) What sort of safety are you referring to? Motors left running? My initial thought was of lost memory or data structures in an indeterminate state, but that would seem to be moot since you are restarting from the ROM, which will have forgotten (...) (26 years ago, 20-Apr-99, to lugnet.robotics.rcx.legos)
|
11 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|