I exposed this function via a web interface, and handle it that way.
Adding the USER_ENTER_CRITICAL looks like it would generally be a good
idea. I've never had any problems with it. A more automated approach
might listen on a UDP port for a reboot message. Anyway you look at
it, you're going to need to roll some amount of custom code, as
there's not a built-in way to do it automagically.
int webResetCpuPost(int sock, char* url, char* pData, char* rxBuffer) {
EventLog::post("User initiated reset","");
RedirectResponse( sock, pageNames[FACTORY_DIAG] );
//wait for the response and event log to get out.
OSTimeDly(TICKS_PER_SECOND);
ForceReboot();
return 1;
- Show quoted text -
}
On Tue, Nov 4, 2008 at 12:24 PM, NetBurner Community Forum
<
support@embeddedethernet.com> wrote:
> User: Chris Ruff (
chris@ruffdesigns.com)
> Subject: Re: Remotely rebooting NB device
> Thread: Remotely rebooting NB device
> Forum: General NetBurner Forums « NetBurner Software
> Mode: reply
> Actions: [reply] [quote] [edit] [delete] [info] [pm] [email]
> int DoReboot()
> {
> AUPRINT( DB_AU, "Reboot\r\n" );
> OSTimeDly( TICKS_PER_SECOND * 1 );
>
> /* We need to initialize a number of Coldfire registers and then jump to the
> reset vector */
> USER_ENTER_CRITICAL();
> SetSR_IntLevel( 7 );
> ForceReboot();
> return 1;
> }
>
> this is how autoupdate does it....
>
> Do a little experimenting, see what it takes to do it from your app
>
> Chris
> Real Programmers don't comment their code. If it was hard to write, it
> should be hard to understand
>
>
>
--
Thomas Taranowski
Certified netburner consultant
baringforge.com