A reset is normally performed by sticking your stylus, a bent-open paper clip, or the like into a small hole in the back of the device. Depending on additional keys held down, the reset behavior varies, as described in this chapter.
Soft Reset
A soft reset clears the dynamic heaps of all applications. The storage heap remains untouched. The operating system restarts from scratch with a new stack, new global variables, restarted drivers, and a reset communication port. Applications on the device with the appropriate preferences bit set receive a sysAppLaunchCmdSystemReset
launch code.
Safe-Mode Reset
Holding down the scroll up button while pressing the reset switch causes the same soft reset logic with the following two exceptions:
- The
sysAppLaunchCmdSystemReset
launch code is not sent to applications. This is useful if there is an application on the device that crashes upon receiving this launch code (not uncommon) and therefore prevents the system from booting. - The OS won't load any program that's installed in RAM during startup. This is useful if you have to delete or replace an executable module in RAM. If a module is loaded—and therefore its database is open—it cannot be replaced or deleted from the system.
Hard Reset
A hard reset is performed by pressing the reset switch while holding down the power key. This has all the effects of the soft reset. In addition, the storage heap is erased. As a result, all programs, data, patches, user information, and so on in RAM are lost. A confirmation message is displayed asking the user to confirm the deletion of all data.
The sysAppLaunchCmdSystemReset
launch code is sent to the applications at this time. If the user selected the "Delete all data" option, the digitizer calibration screen comes up first. The default databases for the four main applications are copied out of the ROM.
System Reset Calls
The System Manager provides support for rebooting the Palm Powered device. It calls SysReset()
to reset the device. This call does a soft reset and has the same effect as pressing the reset switch on the unit. Normally applications should not use this call.
SysReset()
is used, for example, by the Sync application. When the user copies a patch that has the "reset after installation" bit set onto the Palm Powered device, the Sync application automatically resets the device after the sync is completed to allow the patch to be applied.