213
26. SYSTEM/USER MODE
26.1 Overview
The Rabbit 3000A is the first Rabbit microprocessor to incorporate support for two tiers of
control in the processor: System Mode, which provides full access to all processor resources;
and User Mode, a more restricted mode.
Table 26-1 describes the essential differences
between the System Mode and the User Mode. The System Mode is essentially the same
as the normal operation when the System/User Mode is disabled.
The main intent of the System/User Mode is to protect critical code (for example, code
that performs remote firmware updates), data, and the current processor state (memory
setup, peripheral control, etc.) from inadvertent changes by the user’s standard code. By
removing access to the processor’s I/O registers and preventing memory writes to critical
regions, the user’s code can run without the danger of locking up the processor to the point
where it cannot be restarted remotely and/or new code uploaded.
Table 26-1. Differences Between System Mode and User Mode
System Mode
User Mode
All peripherals accessible.
No peripherals accessible by default.
All processor control registers available.
No processor control registers available.
All interrupt priorities available.
Interrupt Priority 3 not allowed.
IDET instruction has no effect.
IDET instruction causes Priority 3 “System
mode violation” interrupt.
No write protection when 0x00 is written to
WPCR (write protection in User mode only)
Write to protected segment causes Priority 3
“write protection violation” interrupt.
Easy to enter User mode (SETUSR instruction).
Difficult to enter system mode (requires
interrupt, SYSCALL, or RST instruction).