# OS_ResetSystem

## Syntax

  `#include <nitro/os.h>`
  `void OS_ResetSystem( u32 parameter );`

## Arguments

parameter | Reset parameter.

## Return Values

None.

## Description

Performs a software reset and reruns the program.
There is no return from this function.

This function cannot be called when interrupts are disabled.

`parameter` is the reset parameter. The re-started program can read this value using the `OS_GetResetParameter` function. A value of zero is read with the `OS_GetResetParameter` 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.

Operations required for a restart must be performed before calling this function.

`OS_InitReset` must be called before this function is called. However, `OS_InitReset` is called from within `OS_Init`. Therefore, if you call `OS_Init`, there is no need to call `OS_InitReset` from the application.

A reset cannot be performed from a multiboot child. If this function is called, the `OS_Panic` function stops the process thread. The `MB_IsMultiBootChild` function determines whether the calling platform is a multiboot child.

Reset also cannot be performed from a NAND application. If this function is called, the `OS_Panic` function stops the process thread. NAND applications can use the `OS_RebootSystem` function, which executes a hardware reset, instead.

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.

## See Also

`OS_InitReset
OS_GetResetParameter
MB_IsMultiBootChild`

## Revision History

2008/04/01 Added the fact that communication must be stopped before reset.
2006/12/05 Added a description of reset parameters.
2005/04/01 Added a note that this function cannot be called when interrupts are disabled.
2004/11/02 Removed processes that are not required because they are performed in other functions.
2004/09/09 Added the description that a multiboot child cannot initiate a reset.
2004/09/01 Initial version.

CONFIDENTIAL