7
32000D–04/2011
AVR32
2.4
Processor States
2.4.1
Normal RISC State
The AVR32 processor supports several different execution contexts as shown in
Table 2-3 onMode changes can be made under software control, or can be caused by external interrupts or
exception processing. A mode can be interrupted by a higher priority mode, but never by one
with lower priority. Nested exceptions can be supported with a minimal software overhead.
When running an operating system on the AVR32, user processes will typically execute in the
application mode. The programs executed in this mode are restricted from executing certain
instructions. Furthermore, most system registers together with the upper halfword of the status
register cannot be accessed. Protected memory areas are also not available. All other operating
modes are privileged and are collectively called System Modes. They have full access to all priv-
ileged and unprivileged resources. After a reset, the processor will be in supervisor mode.
2.4.2
Debug State
The AVR32 can be set in a debug state, which allows implementation of software monitor rou-
tines that can read out and alter system information for use during application development. This
implies that all system and application registers, including the status registers and program
counters, are accessible in debug state. The privileged instructions are also available.
All interrupt levels are by default disabled when debug state is entered, but they can individually
be switched on by the monitor routine by clearing the respective mask bit in the status register.
Debug state can be entered as described in the Technical Reference Manual.
Debug state is exited by the retd instruction.
2.4.3
Java State
Some versions of the AVR32 processor core comes with a Java Extension Module (JEM). The
processor can be set in a Java State where normal RISC operations are suspended. The Java
2.4.4
Secure State
The secure state added in the AVR32 Architecture revision 3 allows executing secure or trusted
software in alongside nonsecure or untrusted software on the same processor. Hardware mech-
Table 2-3.
Overview of execution modes, their priorities and privilege levels.
Priority
Mode
Security
Description
1
Non Maskable Interrupt
Privileged
Non Maskable high priority interrupt mode
2
Exception
Privileged
Execute exceptions
3
Interrupt 3
Privileged
General purpose interrupt mode
4
Interrupt 2
Privileged
General purpose interrupt mode
5
Interrupt 1
Privileged
General purpose interrupt mode
6
Interrupt 0
Privileged
General purpose interrupt mode
N/A
Supervisor
Privileged
Runs supervisor calls
N/A
Application
Unprivileged
Normal program execution mode