Processor Register Description

 

Table 2-2. SR Field Descriptions (continued)

 

 

 

 

Bits

Name

Description

 

 

 

 

 

12

M

Master/interrupt state. This bit is cleared by an interrupt exception, and

 

 

 

can be set by software during execution of the RTE or move to SR

 

 

 

instructions.

 

 

 

 

 

11

Reserved, should be cleared.

 

 

 

 

 

10–8

I

Interrupt level mask. Defines the current interrupt level. Interrupt

 

 

 

requests are inhibited for all priority levels less than or equal to the

 

 

 

current level, except the edge-sensitive level 7 request, which cannot

 

 

 

be masked.

 

 

 

 

 

7–5

Reserved, should be cleared.

 

 

 

 

 

4–0

CCR

Refer to Table 2-1.

 

 

 

 

 

2.2.3.2Supervisor/User Stack Pointers (A7 and OTHER_A7)

The MCF5282 architecture supports two independent stack pointer (A7) registersthe supervisor stack pointer (SSP) and the user stack pointer (USP). The hardware implementation of these two programmable-visible 32-bit registers does not identify one as the SSP and the other as the USP. Instead, the hardware uses one 32-bit register as the active A7 and the other as OTHER_A7. Thus, the register contents are a function of the processor operation mode, as shown in the following:

if SR[S] = 1

 

 

 

 

 

 

then

A7

=

Supervisor

Stack Pointer

OTHER_A7 =

User Stack

Pointer

else

A7

=

User Stack

Pointer

OTHER_A7 =

Supervisor

Stack Pointer

The BDM programming model supports direct reads and writes to A7 and OTHER_A7. It is the responsibility of the external development system to determine, based on the setting of SR[S], the mapping of A7 and OTHER_A7 to the two program-visible definitions (SSP and USP). This functionality is enabled by setting the enable user stack pointer bit, CACR[EUSP]. If this bit is cleared, only the stack pointer (A7), defined for previous ColdFire versions, is available. EUSP is zero at reset.

If EUSP is set, the appropriate stack pointer register (SSP or USP) is accessed as a function of the processor’s operating mode. To support dual stack pointers, the following two privileged M68000 instructions are added to the ColdFire instruction set architecture to load/store the USP :

move.l Ay, USP; move to USP

move.l USP, Ax; move from USP

These instructions are described in the ColdFire Family Programmer’s Reference Manual.

MOTOROLA

Chapter 2. ColdFire Core

2-7

Page 79
Image 79
Motorola MCF5281, MCF5282 user manual Supervisor/User Stack Pointers A7 and OTHERA7