Entry | |
---|---|
- |
Exit | |
---|---|
R0 | Restart code: |
1 = Keyboard interrupt | |
2 = RTC alarm interrupt | |
Other values: Reserved |
The purpose of this call is to perform what’s commonly referred to as a “suspend to RAM” operation – i.e. the system is placed into a low power state of suspension, where only a handful of external events (keyboard, RTC alarm, etc.) can be used to wake the machine. The RAM is left powered, so that when the machine is woken the operating system and all software will be in the same state as it was prior to suspension.
If the system cannot be placed into a state of suspension (e.g. because a module objects to the freeze request service call) and error will be returned. Otherwise, upon return from the SWI, R0 will indicate the reason for the machine to have been woken.
SWI Portable_ReadFeatures can be used to determine if this call is available.
Prior to suspending the system, the Portable module will issue the Portable service call with the freeze request reason code (5). If nothing objects to the request the module will then issue the freeze service call (reason code 3), to indicate that the freeze is taking place. Upon return from the low power state the unfreeze service call (reason code 4) will be issued in order to allow software to recover (e.g. to adapt to the sudden jump in RTC time).