sleep
Sleep
Enters Sleep power-saving mode (Supervisor only).
Details
Enters Sleep power-saving mode, providing even deeper power reduction than Nap with correspondingly longer wake-up time. This privileged instruction suspends execution and places the processor in a very low-power state. Recovery occurs on system reset or external wakeup signals. No status registers are modified.
Pseudocode Operation
if MSR[PR] = 1 then raise Privileged Instruction Exception
enter Sleep mode
Programming Note
The sleep instruction is useful for reducing power consumption when no computation is needed. It should be used sparingly as it halts execution, potentially affecting real-time performance. Ensure proper synchronization to avoid race conditions when resuming from sleep.