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 re-executes the program.
This function does not return.

This function cannot be called when interrupts are disabled.

parameter is the reset parameter. The restarted 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.

The OS_InitReset function must be called before this function is called. However, OS_InitReset is called from inside 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.

Software resets cannot be performed when operating in a NAND application. If this function is called, the process is stopped by the OS_Panic function. In this case, you can execute a hardware reset instead with OS_RebootSystem.

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.

See Also

OS_InitReset
OS_GetResetParameter
MB_IsMultiBootChild

Revision History

2009/07/02 Revised Description because support was added for software reset also in TWL mode.
2009/06/08 Explained that this function operates only in NITRO mode.
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