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 &lt;nitro/os.h&gt;</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%"><SPAN class="argument">parameter</SPAN></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 re-executes the program.<BR> This function does not return.</P>
29<P><font color="#ff0000"><B>This function cannot be called when interrupts are disabled.</B></font></P>
30<P><SPAN class="argument">parameter</SPAN> is the reset parameter. The restarted 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 <A href="OS_GetResetParameter.html"><CODE>OS_GetResetParameter</CODE></A> 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>The <A href="OS_InitReset.html"><CODE>OS_InitReset</CODE></A> function must be called before this function is called. However, <CODE>OS_InitReset</CODE> is called from inside <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 <A href="../../mb/common/MB_IsMultiBootChild.html"><CODE>MB_IsMultiBootChild</CODE></A> function determines whether the calling platform is a multiboot child.</P>
34<P><font color="#ff0000">Software resets cannot be performed when operating in a NAND application. </font>If this function is called, the process is stopped by the <A href="../debug/OS_Panic.html"><CODE>OS_Panic</CODE></A> function. In this case, you can execute a hardware reset instead with <A href="../appJump/OS_RebootSystem.html"><CODE>OS_RebootSystem</CODE></A>.</P>
35<P>If wireless communication is 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><A href="OS_InitReset.html"><CODE>OS_InitReset</CODE></A><BR> <A href="OS_GetResetParameter.html"><CODE>OS_GetResetParameter</CODE></A><BR> <A href="../../mb/common/MB_IsMultiBootChild.html"><CODE>MB_IsMultiBootChild</CODE></A></P>
38<H2>Revision History</H2>
39<P>
402009/07/02 Revised <B>Description</B> because support was added for software reset also in TWL mode.<br />2009/06/08 Explained that this function operates only in NITRO mode.<BR>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>
41<hr><p>CONFIDENTIAL</p></body>
42</HTML>