1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>OS_ResetSystem</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_ResetSystem <img src="../../image/TWL.gif" align="middle"><img src="../../image/NTR.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14<DD><CODE>#include <nitro/os.h></CODE><BR> <BR> <code>void OS_ResetSystem( u32 parameter );</CODE> 15</DL> 16<H2>Arguments</H2> 17<TABLE border="1" width="100%"> 18 <TBODY> 19 <TR> 20<TD width="13%"><EM><STRONG>parameter</STRONG></EM></TD> 21<TD width="87%">Reset parameter.</TD> 22 </TR> 23 </TBODY> 24</TABLE> 25<H2>Return Values</H2> 26<P>None.</P> 27<H2>Description</H2> 28<P>Performs a software reset and reruns the program.<BR> There is no return from this function.</P> 29<P><font color="#ff0000"><B>This function cannot be called when interrupts are disabled.</B></font></P> 30<P><em><strong><code>parameter</code></strong></em> is the reset parameter. The re-started program can read this value using the <A href="OS_GetResetParameter.html"><code>OS_GetResetParameter</code></A> function. A value of zero is read with the <CODE><A href="OS_GetResetParameter.html">OS_GetResetParameter</A></CODE> function call that comes immediately after startup. By setting a value other than zero in the reset parameter, a power-on operation can be distinguished from a reboot.</P> 31<P>Operations required for a restart must be performed before calling this function.</P> 32<P><CODE><A href="OS_InitReset.html">OS_InitReset</A></CODE> must be called before this function is called. However, <CODE>OS_InitReset</CODE> is called from within <A href="../init/OS_Init.html"><CODE>OS_Init</CODE></A>. Therefore, if you call <CODE>OS_Init</CODE>, there is no need to call <CODE>OS_InitReset</CODE> from the application.</P> 33<P>A reset cannot be performed from a multiboot child. If this function is called, the <a href="../debug/OS_Panic.html"><code>OS_Panic</code></a> function stops the process thread. The <CODE><A href="../../mb/common/MB_IsMultiBootChild.html">MB_IsMultiBootChild</A></CODE> function determines whether the calling platform is a multiboot child.</P> 34<P>Reset also cannot be performed from a NAND application. If this function is called, the <a href="../debug/OS_Panic.html"><code>OS_Panic</code></a> function stops the process thread. NAND applications can use the <A href="../appJump/OS_RebootSystem.html"><CODE>OS_RebootSystem</CODE></A> function, which executes a hardware reset, instead.</P> 35<P>If wireless communications are in progress, stop communication and perform a software reset after following the procedure for reverting the WM library back to its pre-initialization state.</P> 36<H2>See Also</H2> 37<P><CODE><A href="OS_InitReset.html">OS_InitReset</A><BR><A href="OS_GetResetParameter.html">OS_GetResetParameter</A><BR><A href="../../mb/common/MB_IsMultiBootChild.html">MB_IsMultiBootChild</A></CODE></P> 38<H2>Revision History</H2> 39<P>2008/04/01 Added the fact that communication must be stopped before reset.<BR>2006/12/05 Added a description of reset parameters.<BR>2005/04/01 Added a note that this function cannot be called when interrupts are disabled. <BR>2004/11/02 Removed processes that are not required because they are performed in other functions. <BR>2004/09/09 Added the description that a multiboot child cannot initiate a reset. <BR>2004/09/01 Initial version.</P> 40<hr><p>CONFIDENTIAL</p></body> 41</HTML>