Motorola Literature Distribution;
P.O. Box 5405
Denver, Colorado 80217
1-800-521-6274 or 480-768-2130
JAPAN:
Motorola Japan Ltd.;
SPS, Technical Information Center,
3-20-1, Minami-Azabu Minato-ku,
Tokyo 106-8573 Japan
81-3-3440-3569
ASIA/PACIFIC:
Motorola Semiconductors H.K. Ltd.;
Silicon Harbour Centre
2 Dai King Street,
Tai Po Industrial Estate
Tai Po, N.T., Hong Kong
852-26668334
HOME PAGE:
http://motorola.com/semiconductors
Information in this document is provided solely to enable system and software implementers to use
Motorola products. There are no express or implied copyright licenses granted hereunder to design
or fabricate any integrated circuits or integrated circuits based on the information in this document.
Motorola reserves the right to make changes without further notice to any products herein.
Motorola makes no warranty, representation or guarantee regarding the suitability of its products
for any particular purpose, nor does Motorola assume any liability arising out of the application or
use of any product or circuit, and specifically disclaims any and all liability, including without
limitation consequential or incidental damages. “Typical” parameters which may be provided in
Motorola data sheets and/or specifications can and do vary in different applications and actual
performance may vary over time. All operating parameters, including “Typicals” must be validated
for each customer application by customer’s technical experts. Motorola does not convey any
license under its patent rights nor the rights of others. Motorola products are not designed,
intended, or authorized for use as components in systems intended for surgical implant into the
body, or other applications intended to support or sustain life, or for any other application in which
the failure of the Motorola product could create a situation where personal injury or death may
occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized
application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries,
affiliates, and distributors harmless against all claims, costs, damages, and expenses, and
reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death
associated with such unintended or unauthorized use, even if such claim alleges that Motorola was
negligent regarding the design or manufacture of the part.
Motorola and the Stylized M Logo are registered in the U.S. Patent and Trademark Office. digital
dna is a trademark of Motorola, Inc. All other product or service names are the property of their
respective owners. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.
The primary objective of this user’s manual is to define the functionality of the MCF5282
processors for use by software and hardware developers.
The information in this book, except for changes to the Flash functionality, also applies to
the MCF5281.
The information in this book is subject to change without notice, as described in the
disclaimers on the title page. As with any technical documentation, it is the reader’s
responsibility to be sure he is using the most recent version of the documentation.
To locate any published errata or updates for this document, refer to the world-wide web at
http://www.motorola.com/coldfire.
Audience
This manual is intended for system software and hardware developers and applications
programmers who want to develop products with the MCF5282. It is assumed that the
reader understands operating systems, microprocessor system design, basic principles of
software and hardware, and basic details of the ColdFire
®
architecture.
Organization
Following is a summary and brief description of the major sections of this manual:
•Chapter 1, “Overview,” includes general descriptions of the modules and features
incorporated in the MCF5282, focussing in particular on new features.
•Chapter 2, “ColdFire Core,” provides an overview of the microprocessor core of the
MCF5282. The chapter describes the organization of the Version 2 (V2) ColdFire
processor core and an overview of the program-visible registers (the programming
model) as they are implemented on the MCF5282.
•Chapter 3, “Enhanced Multiply-Accumulate Unit (EMAC),” describes the
MCF5282 multiply/accumulate unit, which executes integer multiply,
multiply-accumulate, and miscellaneous register instructions. The EMAC is
integrated into the operand execution pipeline (OEP).
MOTOROLAAbout This Bookxliii
Organization
•Chapter 4, “Cache,” describes the MCF5282 cache implementation, including
organization, configuration, and coherency. It describes cache operations and how
the cache interacts with other memory structures.
•Chapter 5, “Static RAM (SRAM),” describes the MCF5282 on-chip static RAM
(SRAM) implementation. It covers general operations, configuration, and
initialization. It also provides information and examples of how to minimize power
consumption when using the SRAM.
•Chapter 6, “ColdFire Flash Module (CFM)” describe the functionality of the
MCF5282 Flash memory.
•Chapter 7, “Power Management,” describes the low power operation of the
MCF5282 and peripheral behavior in low power modes.
•Chapter 8, “System Control Module (SCM),” describes the functionality of the
SCM, which provides the programming model for the System Access Control Unit
(SACU), the system bus arbiter, a 32-bit Core Watchdog Timer (CWT), and the
system control registers and logic.
•Chapter 9, “Clock Module,” describes the MCF5282’s different clocking methods.
It also describes clock module operation in low power modes.
•Chapter 10, “Interrupt Controller Modules,” describes operation of the interrupt
controller portion of the SCM. Includes descriptions of the registers in the interrupt
controller memory map and the interrupt priority scheme.
•Chapter 11, “Edge Port Module (EPORT),” describes EPORT module functionality,
including operation in low power mode.
•Chapter 12, “Chip Select Module,” describes the MCF5282 chip-select
implementation, including the operation and programming model, which includes
the chip-select address, mask, and control registers.
•Chapter 13, “External Interface Module (EIM),” describes data-transfer operations,
error conditions, bus arbitration, and reset operations.
•Chapter 14, “Signal Descriptions,” describes MCF5282 signals. It includes an
alphabetical listing of signals that characterizes each signal as an input or output,
defines its state at reset, and identifies whether a pull-up resistor should be used.
•Chapter 15, “Synchronous DRAM Controller Module,” describes the configuration
and operation of the SDRAM controller. It begins with a general description and
brief glossary, and includes a description of signals involved in DRAM operations.
The remainder of the chapter describes the programming model and signal timing,
as well as the command set required for synchronous operations.
•Chapter 16, “DMA Controller Module,” describes the MCF5282 Direct Memory
Access (DMA) controller module. It provides an overview of the module and
describes in detail its signals and registers. The latter sections of this chapter
describe operations, features, and supported data transfer modes in detail.
xlivMCF5282 User’s ManualMOTOROLA
Organization
•Chapter 17, “Fast Ethernet Controller (FEC),” provides a feature-set overview, a
functional block diagram, and transceiver connection information for both MII
(Media Independent Interface) and 7-wire serial interfaces. It also provides
describes operation and the programming model.
•Chapter 18, “Watchdog Timer Module,” describes Watchdog timer functionality,
including operation in low power mode.
•Chapter 19, “Programmable Interrupt Timer Modules (PIT0–PIT3),” describes the
functionality of the four PIT timers, including operation in low power mode.
•Chapter 20, “General Purpose Timer Modules (GPTA and GPTB),” describes the
functionality of the two general purpose timers, including operation in low power
mode.
•Chapter 21, “DMA Timers (DTIM0–DTIM3),” describes the configuration and
operation of the four DMA timer modules (DTIM0, DTIM1, DTIM2, and DTIM3).
These 32-bit timers provide input capture and reference compare capabilities with
optional signaling of events using interrupts or triggers. This chapter also provides
programming examples.
•Chapter 22, “Queued Serial Peripheral Interface (QSPI) Module,” provides a
feature-set overview and a description of operation, including details of the QSPI’s
internal storage organization. The chapter concludes with the programming model
and a timing diagram.
•Chapter 23, “UART Modules,” describes the use of the universal asynchronous
receiver/transmitters (UARTs) implemented on the MCF5282 and includes
programming examples.
2
•Chapter 24, “I2C Interface,” describes the MCF5282 I
protocol, clock synchronization, and I
2
C programming model registers. It also
C module, including I2C
provides extensive programming examples.
•Chapter 25, “FlexCAN,” describes the MCF5282 implementation of the controller
area network (CAN) protocol. This chapter describes FlexCAN module operation
and provides a programming model.
•Chapter 26, “General Purpose I/O Module,” describes the operation and
programming model of the general purpose I/O (GPIO) ports on the MCF5282.
•Chapter 30, “Chip Configuration Module (CCM),” describes CCM functionality,
detailing the two modes of chip operation: master mode and single-chip mode. This
chapter provides a description of signals used by the CCM and a programming
model.
•Chapter 27, “Queued Analog-to-Digital Converter (QADC),” describes the use of
the QADC module implemented on the MCF5282.
•Chapter 28, “Reset Controller Module,” describes the operation of the reset
controller module, detailing the different types of reset that can occur.
MOTOROLAAbout This Bookxlv
Suggested Reading
•Chapter 29, “Debug Support” describes the Revision A enhanced hardware debug
support in the MCF5282.
•Chapter 31, “IEEE 1149.1 Test Access Port (JTAG),” describes configuration and
operation of the MCF5282 Joint Test Action Group (JTAG) implementation. It
describes those items required by the IEEE 1149.1 standard and provides additional
information specific to the MCF5282. For internal details and sample applications,
see the IEEE 1149.1 document.
•Chapter 32, “Mechanical Data,” provides a functional pin listing and package
diagram for the MCF5282.
•Chapter 33, “Electrical Characteristics,” describes AC and DC electrical
specifications and thermal characteristics for the MCF5282. Because additional
speeds may have become available since the publication of this book, consult
Motorola’s ColdFire web page, http://www.motorola.com/coldfire, to confirm that
this is the latest information.
This manual includes the following appendix:
•Appendix A, “List of Memory Maps,” provides the entire address-map for
MCF5282 memory-mapped registers.
Suggested Reading
This section lists additional reading that provides background for the information in this
manual as well as general information about the ColdFire architecture.
General Information
The following documentation provides useful information about the ColdFire architecture
and computer architecture in general:
•Using Microprocessors and Microcomputers: The Motorola Family, William C.
Wray, Ross Bannatyne, Joseph D. Greenfield
•Computer Architecture: A Quantitative Approach, Second Edition, by John L.
Hennessy and David A. Patterson.
•Computer Organization and Design: The Hardware/Software Interface, Second
Edition, David A . Patterson and John L. Hennessy.
ColdFire Documentation
The ColdFire documentation is available from the sources listed on the back cover of this
manual. Document order numbers are included in parentheses for ease in ordering.
•User’s manuals—These books provide details about individual ColdFire
implementations and are intended to be used in conjunction with The ColdFire Programmers Reference Manual. These include the following:
xlviMCF5282 User’s ManualMOTOROLA
Conventions
— ColdFire MCF5102 User’s Manual (MCF5102UM/AD)
— ColdFire MCF5202 User’s Manual (MCF5202UM/AD)
— ColdFire MCF5204 User’s Manual (MCF5204UM/AD)
— ColdFire MCF5206 User’s Manual (MCF5206EUM/AD)
— ColdFire MCF5206E User’s Manual (MCF5206EUM/AD)
— ColdFire MCF5307 User’s Manual (MCF5307UM/AD)
— ColdFire MCF5407 User’s Manual (MCF5407UM/AD)
Additional literature on ColdFire implementations is being released as new processors
become available. For a current list of ColdFire documentation, refer to the World Wide
Web at http://www.motorola.com/ColdFire/.
Conventions
This document uses the following notational conventions:
MNEMONICSIn text, instruction mnemonics are shown in uppercase.
mnemonicsIn code and tables, instruction mnemonics are shown in lowercase.
REG[FIELD]Abbreviations for registers are shown in uppercase. Specific bits,
fields, or ranges appear in brackets. For example, RAMBAR[BA]
identifies the base address field in the RAM base address register.
nibble A 4-bit data unit
byte An 8-bit data unit
word A 16-bit data unit
1
longword A 32-bit data unit
xIn some contexts, such as signal encodings, x indicates a don’t care.
nUsed to express an undefined numerical value
~NOT logical operator
&AND logical operator
|OR logical operator
1
The only exceptions to this appear in the discussion of serial communication modules that support variable-length data transmission units. To simplify the discussion these units are referred to as words regardless
of length.
MOTOROLAAbout This Bookxlvii
Acronyms and Abbreviations
Acronyms and Abbreviations
Table i lists acronyms and abbreviations used in this document.
Table i. Acronyms and Abbreviated Terms
TermMeaning
ADCAnalog-to-digital conversion
ALUArithmetic logic unit
BDMBackground debug mode
BISTBuilt-in self test
BSDLBoundary-scan description language
CODECCode/decode
DACDigital-to-analog conversion
DMADirect memory access
DSPDigital signal processing
EAEffective address
FIFOFirst-in, first-out
GPIOGeneral-purpose I/O
2
CInter-integrated circuit
I
IEEEInstitute for Electrical and Electronics Engineers
IFPInstruction fetch pipeline
IPLInterrupt priority level
JEDECJoint Electron Device Engineering Council
JTAGJoint Test Action Group
LIFOLast-in, first-out
LRULeast recently used
LSBLeast-significant byte
lsbLeast-significant bit
MACMultiply accumulate unit, also Media access controller
MBARMemory base address register
MSBMost-significant byte
msbMost-significant bit
MuxMultiplex
NOPNo operation
OEPOperand execution pipeline
PCProgram counter
PCLKProcessor clock
PLICPhysical layer interface controller
PLLPhase-locked loop
xlviiiMCF5282 User’s ManualMOTOROLA
Table i. Acronyms and Abbreviated Terms (Continued)
Table ii shows terminology conventions used throughout this document.
Table ii. Notational Conventions
InstructionOperand Syntax
Opcode Wildcard
ccLogical condition (example: NE for not equal)
Register Specifications
AnAny address register n (example: A3 is address register 3)
Ay,AxSource and destination address registers, respectively
DnAny data register n (example: D5 is data register 5)
Dy,DxSource and destination data registers, respectively
RcAny control register (example VBR is the vector base register)
RmMAC registers (ACC, MAC, MASK)
RnAny address or data register
RwDestination register w (used for MAC instructions only)
Ry,RxAny source and destination registers, respectively
XiIndex register i (can be an address or data register: Ai, Di)
MOTOROLAAbout This Bookxlix
Terminology Conventions
Table ii. Notational Conventions (Continued)
InstructionOperand Syntax
Register Names
ACCMAC accumulator register
CCRCondition code register (lower byte of SR)
MACSRMAC status register
MASKMAC mask register
PCProgram counter
SRStatus register
Port Name
DDATADebug data port
PSTProcessor status port
Miscellaneous Operands
#<data>Immediate data following the 16-bit operation word of the instruction
<ea>Effective address
<ea>y,<ea>xSource and destination effective addresses, respectively
<label>Assembly language program label
<list>List of registers for MOVEM instruction (example: D3–D0)
<shift>Shift operation: shift left (<<), shift right (>>)
<size>Operand data size: byte (B), word (W), longword (L)
bcBoth instruction and data caches
dcData cache
icInstruction cache
# <vector>Identifies the 4-bit vector number for trap instructions
<>identifies an indirect data address referencing memory
<xxx>identifies an absolute address referencing memory
dnSignal displacement value, n bits wide (example: d16 is a 16-bit displacement)
SFScale factor (x1, x2, x4 for indexed addressing mode, <<1n>> for MAC operations)
Operations
+Arithmetic addition or postincrement indicator
–Arithmetic subtraction or predecrement indicator
xArithmetic multiplication
lMCF5282 User’s ManualMOTOROLA
Terminology Conventions
Table ii. Notational Conventions (Continued)
InstructionOperand Syntax
/Arithmetic division
~Invert; operand is logically complemented
&Logical AND
|Logical OR
^Logical exclusive OR
<<Shift left (example: D0 << 3 is shift D0 left 3 bits)
>>Shift right (example: D0 >> 3 is shift D0 right 3 bits)
→Source operand is moved to destination operand
←→Two operands are exchanged
sign-extendedAll bits of the upper portion are made equal to the high-order bit of the lower portion
If <condition>
then <operations>
else <operations>
{}Optional operation
()Identifies an indirect address
d
n
AddressCalculated effective address (pointer)
BitBit selection (example: Bit 3 of D0)
lsbLeast significant bit (example: lsb of D0)
LSBLeast significant byte
LSWLeast significant word
msbMost significant bit
MSBMost significant byte
MSWMost significant word
CCarry
NNegative
Test the condition. If true, the operations after ‘then’ are performed. If the condition is false and the optional
‘else’ clause is present, the operations after ‘else’ are performed. If the condition is false and else is omitted,
the instruction performs no operation. Refer to the Bcc instruction description as an example.
Displacement value, n-bits wide (example: d16 is a 16-bit displacement)
Condition Code Register Bit Names
Subfields and Qualifiers
VOverflow
XExtend
ZZero
MOTOROLAAbout This Bookli
Revision History
Revision History
Table iii provides a revision history for this document.
Table iii. Revision History
Revision
Number
011/2002Preliminary release.
0.11/2003Changed title from “MCF5282 ColdFire
Date of
Release
Substantive ChangesSection/Page
Manual” to “MCF5282 ColdFire
Added “This product incorporates SuperFlash® technology licensed from
SST.”
Changed equation in footnote to f
2(MFD + 2) ≤ 80 MHz, f
Multiplied all PLL frequencies in table by 2.Table 9-4/9-6
Changed DTMRx to DTIMx.Figure 10-13/10-12
Changed bit numbers from 63–32 to 31–0.Figure 10-1/10-7
Changed bit numbers from 63–32 to 31–0.Figure 10-3/10-8
Changed bit numbers from 63–32 to 31–0.Figure 10-5/10-9
Added “Unlike the MCF5272, the MCF5282 does not have an independent
SDRAM clock signal. For the MCF5282, the timing of the SDRAM
controller is controlled by the CLKOUT signal.”
In “Reset: CSCR0” row, changed “D7, D6, D5” to “—, D19, D18.”Figure 12-4/12-8
Replaced “SCKE
Changed text to read “The transmit FIFO uses addresses from the start of the
” with “SCKE.”Table 14-1/14-3
17.5.4.20/17-42
FIFO to the location four bytes before the address programmed into the
FRSR.”
Added the following footnote: “The receive buffer pointer, which contains the
Table 17-36/17-48
address of the associated data buffer, must always be evenly divisible by 16.
The buffer must reside in memory external to the FEC. This value is never
modified by the Ethernet controller.”
Added the following footnote: “The transmit buffer pointer, which contains
Table 17-37/17-50
the address of the associated data buffer, must always be evenly divisible by
4. The buffer must reside in memory external to the FEC. This value is never
modified by the Ethernet controller.”
MOTOROLAAbout This Bookliii
Revision History
Table iii. Revision History
Revision
Number
Date of
Release
Substantive ChangesSection/Page
Changed value in “Divide by” block to 8192.Figure 18-1/18-2
Multiplied all system clock divisor values in PRE field description by 2.Table 19-3/19-4
Changed equation in text to the following:
19.6.3/19-7
Timeout period = PRE[3:0] × (PM[15:0] + 1) × system clock ÷ 2
In “UISR Field” row, changed bit 6 to a reserved bit.Figure 23-12/23-14
Changed bit 6 to a reserved bit.Table 23-9/23-14
Changed equation in PRES_DIV field description to the following:Table 25-12/25-25
When Flash security is enabled, the chip will boot in
single chip mode regardless of the external reset configuration.”
Changed equation in QPR field description to the following:Table 27-4/27-12
f
=
f
QCLK
Multiplied all f
divisor values in this table by 2.Table 27-5/27-13
SYS
Added “Note: Enabling Flash security will disable BDM communications.”29.1/29-1
SYS
2(QPR[6:0] + 1)
Replaced “SCKE
Replaced “PEL2” with “PEL6, ” “PNQ6” with “PNQ7,” “PNQ5” with
” with “SCKE.”Figure 32-1/32-2
Table 32-1/32-3
“PNQ6,” “PEL5” with “PEL1,” “PNQ4” with “PNQ5,” “PNQ3” with
“PNQ4,” “PNQ2” with “PNQ3,” “PNQ1” with “PNQ2,” “PNQ0” with
“PNQ1,” “PQS0” with “PQS1,” “PQS1” with “PQS0,” “PJ6” with “PJ7,”
” with “SDRAM_CS0,” “RAS1” with “SDRAM_CS1,” and “SCKE”
“RAS0
with “SCKE.”
Changed value for “ESD Target for Human Body Model” to “2000” and
Table 33-1/33-1
“ESD Target for Machine Model” to “200.”
Changed value in “Maximum number of guaranteed program/erase cycles
Changed the min value in spec D8 to “2” and the max value to”'—”.Table 33-12/33-16
Changed the max value in spec G1a to “12.”Table 33-13/33-17
Added the following footnote: “Because of long delays associated with the
Table 33-13/33-17
PQA/PQB pads, signals on the PQA/PQB pins will be updated on the
following edge of the clock.”
Added timing diagrams and tables to Section 33.12, “Fast Ethernet AC
33.12/33-20
Timing Specifications.”
Changed the max value in spec 1 to “1/4.”Table 33-23/33-25
livMCF5282 User’s ManualMOTOROLA
Table iii. Revision History
Revision History
Revision
Number
21/2004Added MCF5281 device to manual. The MCF5281 implements half the Flash
Date of
Release
Substantive ChangesSection/Page
Changed the min value in spec 2 to “4.”Table 33-23/33-25
Changed the min value in spec 3 to “25.”Table 33-23/33-25
Changed the min value in spec 6 to “25.”Table 33-23/33-25
Changed the max value in spec 7 to “30.”Table 33-23/33-25
Changed the max value in spec 8 to “30.”Table 33-23/33-25
Changed the max value in spec 11 to “25.”Table 33-23/33-25
Changed the min value in spec D1 to “5.”Table 33-24/33-27
Changed the min value in spec D2 to “2.”Table 33-24/33-27
Changed offset for the copy of RAMBAR to “0x008.”Table A-3/A-3
of the MCF5282.
Changed the description of real time debug support. It has only one
user-visible hardware breakpoint register.
Change the I field description to read: “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.”
Throughout Manual
1.1/1-1
Table 2-2/2-6
Replaced the description of PRI1 and PRI2.Table 5-1/5-2
Added note to the SPV bit description, “The BDE bit in the second RAMBAR
register must also be set to allow dual port access to the SRAM. For more
information, see Section 8.4.2, ‘Memory Base Address Register
(RAMBAR).’”
Replaced Figure 6-2, “CFM 512K Array Memory Map” and renamed it
“CFM Array Memory Map”
Change value for page erase verify command to 0x06.Table 6-12/6-16
Change value for page erase verify command to 0x06.Table 6-13/6-20
Add the following note to the BDE bit description: “The SPV bit in the CPU’s
RAMBAR must also be set to allow dual port access to the SRAM. For more
information, see Section 5.3.1, ‘SRAM Base Address Register (RAMBAR).’”
Remove ÷ 2 from CLKGEN block.Figure 9-1/9-3
Add this text to the end of the first paragraph: “If a specific interrupt request is
completely unused, the ICRnx value can remain in its reset (and disabled)
state.”
Added the following note: “The wakeup mask level taken from LPICR[6:4] is
adjusted by hardware to allow a level 7 IRQ to generate a wakeup. That is, the
wakeup mask value used by the interrupt controller must be in the range of
0–6.”
Changed CSCRn to reflect that AA is set at reset.Figure 12-4/12-8
Table 5-1/5-2
Figure 6-2/6-4
Table 8-3/8-5
10.3.6/10-11
10.5/10-17
Removed final paragraph. The paragraph incorrectly states that the MCF5282
does not have a bus monitor.
MOTOROLAAbout This Booklv
13.5/13-14
Revision History
Table iii. Revision History
Revision
Number
Date of
Release
Substantive ChangesSection/Page
Changed pull-up indications in the ‘Internal Pull-Up’ column. Table 14-3/14-11
Change encodings for bits 31–9 to:
Table 17-13/17-26
0 The corresponding interrupt source is masked.
1 The corresponding interrupt source is not masked.
Change PIT1–PIT4 to PIT0–PIT3 throughout chapter. When a timer is
Chapter 19
referenced individually, PIT1 should be PIT0, PIT2 should be PIT1, PIT3
should be PIT2, and PIT4 should be PIT3. Other chapters in the user’s manual
use the correct nomenclature: PIT0–PIT3.
Change timeout period equation to the equation below.19.6.3/19-7
Timeout period
PRE[3:0] (PM[15:0] 1)+2××
-----------------------------------------------------------------------------=
system clock
Change UISR bits 5–3 to reserved bitsFigure 23-11/23-13
Change ‘I2CR = 0xA’ to ‘I2CR = 0xA0.’24.6.1/24-10
Changed ‘When interfacing to 16-bit ports, the port C and D pins and PJ[5:4]
(BS
[1:0]) can be configured as general-purpose input/output (I/O)’
30.2.1/30-2
Added additional device number order information to Table 32-2 for
Table 32-2/32-7
MCF5280 and MCF5281 at 66- and 80-MHz, and MCF5282 at 80 MHz.
Delete references to ‘T
Replace V
row with the row below, in which the maximum value has been
in
= TL to TH’.Chapter 33
A
Table 33-1/33-1
changed to 6.0 V.
Replace I
row with the row below, in which the maximum value in
This chapter provides an overview of the MCF5282 microprocessor features, including the
major functional components.
1.1MCF5282 Key Features
A block diagram of the MCF5282 is shown in Figure 1-1. The main features are as follows:
•Static Version 2 ColdFire variable-length RISC processor
— Static operation
— On-chip 32-bit address and data path
— Processor core and bus frequency up to 80 MHz
— Sixteen general-purpose 32-bit data and address registers
— ColdFire ISA_A with extensions to support the user stack pointer register, and
four new instructions for improved bit processing
— Enhanced Multiply-Accumulate (EMAC) unit with four 48-bit accumulators to
support 32-bit signal processing algorithms
— Illegal instruction decode that allows for 68K emulation support
•System debug support
— Real-time trace for determining dynamic execution path
— Background debug mode (BDM) for in-circuit debugging
— Real time debug support, with one user-visible hardware breakpoint register (PC
and address with optional data) that can be configured into a 1- or 2-level trigger
•On-chip memories
— 2-Kbyte cache, configurable as instruction-only, data-only, or split I-/D-cache
— 64-Kbyte dual-ported SRAM on CPU internal bus, accessible by core and
non-core bus masters (e.g., DMA, FEC) with standby power supply support
— 512 Kbytes of interleaved Flash memory supporting 2-1-1-1 accesses
(256 Kbytes on the MCF5281)
– This product incorporates SuperFlash® technology licensed from SST.
MOTOROLAChapter 1. Overview1-1
MCF5282 Key Features
•Power management
— Fully-static operation with processor sleep and whole chip stop modes
— Very rapid response to interrupts from the low-power sleep mode (wake-up
feature)
— Clock enable/disable for each peripheral when not used
•Fast Ethernet Controller (FEC)
— 10BaseT capability, half- or full-duplex
— 100BaseT capability, half- or limited-throughput full-duplex
— On-chip transmit and receive FIFOs
— Built-in dedicated DMA controller
— Memory-based flexible descriptor rings
— Media-independent interface (MII) to transceiver (PHY)
•FlexCAN 2.0B Module
— Includes all existing features of the Motorola TOUCAN module
— Full implementation of the CAN protocol specification version 2.0B
– Standard data and remote frames (up to 109 bits long)
– Extended data and remote frames (up to 127 bits long)
– 0–8 bytes data length
– Programmable bit rate up to 1 Mbit/sec
— Up to 16 message buffers (MBs)
– Configurable as receive (Rx) or transmit (Tx)
– Support standard and extended messages
— Unused message buffer (MB) space can be used as general-purpose RAM space
— Listen-only mode capability
— Content-related addressing
— No read/write semaphores
— Three programmable mask registers
– Global (for MBs 0-13)
– Special for MB14
– Special for MB15
— Programmable transmit-first scheme: lowest ID or lowest buffer number
— “Time stamp” based on 16-bit free-running timer
— Global network time, synchronized by a specific message
— Programmable I/O modes
— Maskable interrupts
— Glueless interface to SRAM devices with or without byte strobe inputs
— Programmable wait state generator
— 32-bit bidirectional data bus
— 24-bit address bus
MOTOROLAChapter 1. Overview1-5
MCF5282 Key Features
— Up to seven chip selects available
— Byte/write enables (byte strobes)
— Ability to boot from internal Flash memory or external memories that are 8, 16,
or 32 bits wide
•Reset
— Separate reset in and reset out signals
— Seven sources of reset:
– Power-on reset (POR)
– External
– Software
– Watchdog
– Loss of clock
– Loss of lock
– Low-voltage detection (LVD)
— Status flag indication of source of last reset
•Chip integration module (CIM)
— System configuration during reset
— Support for single chip, master, and test modes
— Selects one of four clock modes
— Sets boot device and its data port width
— Configures output pad drive strength
— Unique part identification number and part revision number
•General purpose I/O interface
— Up to 142 bits of general purpose I/O
— Coherent 32-bit control
— Bit manipulation supported via set/clear functions
— Unused peripheral pins may be used as extra GPIO
•JTAG support for system-level board testing
1-6MCF5282 User’s ManualMOTOROLA
Chip
Configuration
Reset
Controller
External
Interface
Module
Power
Management
Ports
Module
JTAG
Port
Debug Module
ColdFire V2 Core
Flash
Module
64K
SRAM
MCF5282 Key Features
Tes t
Controller
Chip
Selects
Edgeport
DRAM
Controller
Clock Module
(PLL)
Interrupt
Controller 0
Interrupt
Controller 1
UART0
Serial
I/O
UART1
Serial
I/O
UART2
Serial
I/O
DIV
D-Cache/I-Cache
Control
System
Module (SCM)
DMA
Timer
Modules
(DTIM0–
DTIM3)
2-Kbyte
EMAC
Module
I2C
Internal Bus
Arbiter
Watchdog
Timer
DMA
Controller
FEC
MOTOROLAChapter 1. Overview1-7
General
Purpose
Timer A
General
Purpose
Timer B
QSPIFlexCANQADC
Figure 1-1. MCF5282 Block Diagram
PIT
Timers
(PIT0–
PIT3)
MCF5282 Key Features
1.1.1Version 2 ColdFire Core
The processor core is comprised of two separate pipelines that are decoupled by an
instruction buffer. The two-stage instruction fetch pipeline (IFP) is responsible for
instruction-address generation and instruction fetch. The instruction buffer is a
first-in-first-out (FIFO) buffer that holds prefetched instructions awaiting execution in the
operand execution pipeline (OEP). The OEP includes two pipeline stages. The first stage
decodes instructions and selects operands (DSOC); the second stage (AGEX) performs
instruction execution and calculates operand effective addresses, if needed.
The V2 core implements the ColdFire instruction set architecture revision A with added
support for a separate user stack pointer register and four new instructions to assist in bit
processing. Additionally, the MCF5282 core includes the enhanced multiply-accumulate
unit (EMAC) for improved signal processing capabilities. The EMAC implements a
4-stage execution pipeline, optimized for 32 x 32 bit operations, with support for four 48-bit
accumulators. Supported operands include 16- and 32-bit signed and unsigned integers,
signed fractional operands, and a complete set of instructions to process these data types.
The EMAC provides superb support for execution of DSP operations within the context of
a single processor at a minimal hardware cost.
1.1.1.1Cache
The 2-Kbyte cache can be configured into one of three possible organizations: a 2-Kbyte
instruction cache, a 2-Kbyte data cache or a split 1-Kbyte instruction/1-Kbyte data cache.
The configuration is software-programmable by control bits within the privileged cache
configuration register (CACR). In all configurations, the cache is a direct-mapped
single-cycle memory, organized as 128 lines, each containing 16 bytes of data. The
memories consist of a 128-entry tag array (containing addresses and control bits) and a
2-Kbyte data array, organized as 512 x 32 bits. The tag and data arrays are accessed in
parallel using the following address bits:
If the desired address is mapped into the cache memory, the output of the data array is
driven onto the ColdFire core's local data bus, completing the access in a single cycle. If
the data is not mapped into the tag memory, a cache miss occurs and the processor core
initiates a 16-byte line-sized fetch. The cache module includes a 16-byte line fill buffer used
0, [9:4]
1, [9:4]
0, [9:2]
1, [9:2]
1-8MCF5282 User’s ManualMOTOROLA
MCF5282 Key Features
as temporary storage during miss processing. For all data cache configurations, the memory
operates in write-through mode and all operand writes generate an external bus cycle.
1.1.1.2SRAM
The SRAM module provides a general-purpose 64-Kbyte memory block that the ColdFire
core can access in a single cycle. The location of the memory block can be set to any
64-Kbyte boundary within the 4-Gbyte address space. The memory is ideal for storing
critical code or data structures, for use as the system stack, or for storing FEC data buffers.
Because the SRAM module is physically connected to the processor's high-speed local bus,
it can quickly service core-initiated accesses or memory-referencing commands from the
debug module.
The SRAM module is also accessible by non-core bus masters, for example the DMA
and/or the FEC. The dual-ported nature of the SRAM makes it ideal for implementing
applications with double-buffer schemes, where the processor and a DMA device operate
in alternate regions of the SRAM to maximize system performance. As an example, system
performance can be increased significantly if Ethernet packets are moved from the FEC
into the SRAM (rather than external memory) prior to any processing.
1.1.1.3Flash
This product incorporates SuperFlash® technology licensed from SST. The ColdFire Flash
Module (CFM) is a non-volatile memory (NVM) module for integration with the processor
core. The CFM is constructed with eight banks of 32K x 16-bit Flash arrays to generate
512 Kbytes of 32-bit Flash memory
NOTE
The CFM on the MCF5281 is constructed with four banks of
32K x 16-bit Flash arrays to generate 256 Kbytes of 32-bit
Flash memory.
These arrays serve as electrically erasable and programmable, non-volatile program and
data memory. The Flash memory is ideal for program and data storage for single-chip
applications allowing for field reprogramming without requiring an external programming
voltage source. The CFM interfaces to the V2 ColdFire core through an optimized
read-only memory controller which supports interleaved accesses from the 2-cycle Flash
arrays. A “backdoor” mapping of the Flash memory is used for all program, erase, and
verify operations. It also provides a read datapath for non-core masters (for example,
DMA).
1.1.1.4Debug Module
The ColdFire processor core debug interface is provided to support system debugging in
conjunction with low-cost debug and emulator development tools. Through a standard
MOTOROLAChapter 1. Overview1-9
MCF5282 Key Features
debug interface, users can access real-time trace and debug information. This allows the
processor and system to be debugged at full speed without the need for costly in-circuit
emulators. The debug interface is a superset of the BDM interface provided on Motorola’s
683xx family of parts.
The on-chip breakpoint resources include a total of 6 programmable registers—a set of
address registers (with two 32-bit registers), a set of data registers (with a 32-bit data
register plus a 32-bit data mask register), and one 32-bit PC register plus a 32-bit PC mask
register. These registers can be accessed through the dedicated debug serial communication
channel or from the processor’s supervisor mode programming model. The breakpoint
registers can be configured to generate triggers by combining the address, data, and PC
conditions in a variety of single or dual-level definitions. The trigger event can be
programmed to generate a processor halt or initiate a debug interrupt exception.
To support program trace, the Version 2 debug module provides processor status (PST[3:0])
and debug data (DDATA[3:0]) ports. These buses and the CLKOUT output provide
execution status, captured operand data, and branch target addresses defining the dynamic
execution path of the processor at the CPU’s clock rate.
1.1.2System Control Module
This section details the functionality of the System Control Module (SCM) which provides
the programming model for the System Access Control Unit (SACU), the system bus
arbiter, a 32-bit Core Watchdog Timer (CWT), and the system control registers and logic.
Specifically, the system control includes the internal peripheral system base address
register (IPSBAR), the processor’s dual-port RAM base address register (RAMBAR), and
system control registers that include low-power and core watchdog timer control.
1.1.3External Interface Module (EIM)
The external interface module handles the transfer of information between the internal core
and memory, peripherals, or other processing elements in the external address space.
Programmable chip-select outputs provide signals to enable external memory and
peripheral circuits, providing all handshaking and timing signals for automatic wait-state
insertion and data bus sizing.
Base memory address and block size are programmable, with some restrictions. For
example, the starting address must be on a boundary that is a multiple of the block size.
Each chip select can be configured to provide read and write enable signals suitable for use
with most popular static RAMs and peripherals. Data bus width (8-bit, 16-bit, or 32-bit) is
programmable on all chip selects, and further decoding is available for protection from user
mode access or read-only access.
1-10MCF5282 User’s ManualMOTOROLA
MCF5282 Key Features
1.1.4Chip Select
Programmable chip select outputs provide a glueless connection to external memory and
peripheral circuits, providing all handshaking and timing signals for automatic wait-state
insertion and data bus sizing.
1.1.5Power Management
The MCF5282 incorporates several low-power modes of operation which are entered under
program control and exited by several external trigger events. An integrated Power-On
Reset (POR) circuit monitors the input supply and forces an MCU reset as the supply
voltage rises. The Low Voltage Detect (LVD) section monitors the supply voltage and is
configurable to force a reset or interrupt condition if it falls below the LVD trip point. The
RAM standby switch provides power to RAM when the supply voltage is higher than the
standby voltage. If the supply voltage to chip falls below the standby battery voltage, the
RAM is switched over to the standby supply.
1.1.6General Input/Output Ports
All of the pins associated with the external bus interface may be used for several different
functions. Their primary function is to provide an external memory interface to access
off-chip resources. When not used for this function, all of the pins may be used as
general-purpose digital I/O pins. In some cases, the pin function is set by the operating
mode, and the alternate pin functions are not supported.
The digital I/O pins on the MCF5282 are grouped into 8-bit ports. Some ports do not use
all eight bits. Each port has registers that configure, monitor, and control the port pins.
1.1.7Interrupt Controllers (INTC0/INTC1)
There are two interrupt controllers on the MCF5282, each of which can support up to 63
interrupt sources for a total of 126. Each interrupt controller is organized as 7 levels with 9
interrupt sources per level. Each interrupt source has a unique interrupt vector, and 56 of
the 63 sources of a given controller provide a programmable level [1-7] and priority within
the level.
1.1.8SDRAM Controller
The SDRAM controller provides all required signals for glueless interfacing to a variety of
JEDEC-compliant SDRAM devices. SRAS/SCAS address multiplexing is software
configurable for different page sizes. To maintain refresh capability without conflicting
with concurrent accesses on the address and data buses, SRAS
SDRAM_CS
[1:0], and SCKE are dedicated SDRAM signals.
, SCAS, DRAMW,
MOTOROLAChapter 1. Overview1-11
MCF5282 Key Features
1.1.9Test Access Port
The MCF5282 supports circuit board test strategies based on the Test Technology
Committee of IEEE and the Joint Test Action Group (JTAG). The test logic includes a test
access port (TAP) consisting of a 16-state controller, an instruction register, and three test
registers (a 1-bit bypass register, a 256-bit boundary-scan register, and a 32-bit ID register).
The boundary scan register links the device’s pins into one shift register. Test logic,
implemented using static logic design, is independent of the device system logic.
The MCF5282 implementation supports the following:
•Perform boundary-scan operations to test circuit board electrical continuity
•Sample
MCF5282systempinsduringoperation and transparently shift out the result
in the boundary scan register
•Bypass the MCF5282 for a given circuit board test by effectively reducing the
boundary-scan register to a single bit
•Disable the output drive to pins during circuit-board testing
•Drive output pins to stable levels
1.1.10UART Modules
The MCF5282 contains three full-duplex UARTs that function independently. The three
UARTs can be clocked by the system clock, eliminating the need for an external crystal.
Each UART has the following features:
•Each can be clocked by the system clock, eliminating a need for an external UART
clock
•Independently programmable receiver and transmitter clock sources
•Programmable data format:
— 5–8 data bits plus parity
— Odd, even, no parity, or force parity
— One, one-and-a-half, or two stop bits
•Each channel programmable to normal (full-duplex), automatic echo, local
loop-back, or remote loop-back mode
•Automatic wake-up mode for multidrop applications
•Four maskable interrupt conditions
•All three UARTs have DMA request capability
1-12MCF5282 User’s ManualMOTOROLA
MCF5282 Key Features
•Parity, framing, and overrun error detection
•False-start bit detection
•Line-break detection and generation
•Detection of breaks originating in the middle of a character
•Start/end break interrupt/status
1.1.11DMA Timers (DTIM0-DTIM3)
There are four independent, DMA-transfer-generating 32-bit timers (DTIM0, DTIM1,
DTIM2, DTIM3) on the MCF5282. Each timer module incorporates a 32-bit timer with a
separate register set for configuration and control. The timers can be configured to operate
from the system clock or from an external clock source using one of the DTINx signals. If
the system clock is selected, it can be divided by 16 or 1. The selected clock is further
divided by a user-programmable 8-bit prescaler which clocks the actual timer counter
register (TCRn). Each of these timers can be configured for input capture or reference
compare mode. By configuring the internal registers, each timer may be configured to
assert an external signal, generate an interrupt on a particular event, or cause a DMA
transfer.
1.1.12General-Purpose Timers (GPTA/GPTB)
The two general-purpose timers (GPTA and GPTB) are 4-channel timer modules. Each
timer consists of a 16-bit programmable counter driven by a 7-stage programmable
prescaler. Each of the four channels for each timer can be configured for input capture or
output compare. Additionally, one of the channels, channel 3, can be configured as a pulse
accumulator.
A timer overflow function allows software to extend the timing capability of the system
beyond the 16-bit range of the counter. The input capture and output compare functions
allow simultaneous input waveform measurements and output waveform generation. The
input capture function can capture the time of a selected transition edge. The output
compare function can generate output waveforms and timer software delays. The 16-bit
pulse accumulator can operate as a simple event counter or a gated time accumulator.
1.1.13Periodic Interrupt Timers (PIT0-PIT3)
The four periodic interrupt timers (PIT0, PIT1, PIT2, PIT3) are 16-bit timers that provide
precise interrupts at regular intervals with minimal processor intervention. Each timer can
either count down from the value written in its PIT modulus register, or it can be a
free-running down-counter.
MOTOROLAChapter 1. Overview1-13
MCF5282 Key Features
1.1.14Software Watchdog Timer
The watchdog timer is a 16-bit timer that facilitates recovery from runaway code. The
watchdog counter is a free-running down-counter that generates a reset on underflow. To
prevent a reset, software must periodically restart the countdown.
1.1.15Phase Locked Loop (PLL)
The clock module contains a crystal oscillator (OSC), phase-locked loop (PLL), reduced
frequency divider (RFD), status/control registers, and control logic. To improve noise
immunity, the PLL and OSC have their own power supply inputs, VDDPLL and VSSPLL.
All other circuits are powered by the normal supply pins, VDD and VSS.
1.1.16DMA Controller
The Direct Memory Access (DMA) controller module provides an efficient way to move
blocks of data with minimal processor interaction. The DMA module provides four
channels (DMA0–DMA3) that allow byte, word, longword or 16-byte burst line transfers.
These transfers are triggered by software, explicitly setting a DCRn[START] bit or the
occurrence of a hardware event from one of the on-chip peripheral devices, such as a
capture event or an output reference event in a DMA timer (DTIMn) for each channel. The
DMA controller supports dual-address mode to on-chip devices.
1.1.17Reset
The reset controller is provided to determine the cause of reset, assert the appropriate reset
signals to the system, and keep track of what caused the last reset. The power management
registers for the internal low-voltage detect (LVD) circuit are implemented in the reset
module. There are seven sources of reset:
•External
•Power-on reset (POR)
•Watchdog timer
•Phase-locked loop (PLL) loss of lock
•PLL loss of clock
•Software
•Low-voltage detection (LVD) reset
External reset on the RSTO
are also software-readable status flags indicating the cause of the last reset, and LVD
control and status bits for setup and use of LVD reset or interrupt.
pin is software-assertable independent of chip reset state. There
1-14MCF5282 User’s ManualMOTOROLA
MCF5282-Specific Features
1.2MCF5282-Specific Features
1.2.1Fast Ethernet Controller (FEC)
The MCF5282’s integrated Fast Ethernet Controller (FEC) performs the full set of IEEE
802.3/Ethernet CSMA/CD media access control and channel interface functions. The FEC
supports connection and functionality for the 10/100 Mbps 802.3 media independent
interface (MII). It requires an external transceiver (PHY) to complete the interface to the
media.
1.2.2FlexCAN
The FlexCAN module is a communication controller implementing the CAN protocol. The
CAN protocol can be used as an industrial control serial data bus, meeting the specific
requirements of real-time processing, reliable operation in a harsh EMI environment,
cost-effectiveness, and required bandwidth. FlexCAN contains 16 message buffers.
1.2.3I2C Bus
The I2C bus is a two-wire, bidirectional serial bus that provides a simple, efficient method
of data exchange, minimizing the interconnection between devices. This bus is suitable for
applications requiring occasional communications over a short distance between many
devices.
1.2.4Queued Serial Peripheral Interface (QSPI)
The queued serial peripheral interface module provides a synchronous serial peripheral
interface with queued transfer capability. It allows up to 16 transfers to be queued at once,
eliminating CPU intervention between transfers.
1.2.5Queued Analog-to-Digital Converter (QADC)
The QADC is a 10-bit, unipolar, successive approximation converter. A maximum of 8
analog input channels can be supported using internal multiplexing. A maximum of 18
input channels can be supported in the internal/external multiplexed mode.
The QADC consists of an analog front-end and a digital control subsystem. The analog
section includes input pins, an analog multiplexer, and sample and hold analog circuits. The
analog conversion is performed by the digital-to-analog converter (DAC) resistor-capacitor
array and a high-gain comparator.
The digital control section contains queue control logic to sequence the conversion process
and interrupt generation logic. Also included are the periodic/interval timer, control and
MOTOROLAChapter 1. Overview1-15
MCF5282-Specific Features
status registers, the 64-entry conversion command word (CCW) table, and the 64-entry
result table.
1-16MCF5282 User’s ManualMOTOROLA
Chapter 2
ColdFire Core
This section describes the organization of the Version 2 (V2) ColdFire® processor core and
an overview of the program-visible registers. For detailed information on instructions, see
the ColdFire Family Programmer’s Reference Manual.
2.1Processor Pipelines
Figure 2-1 is a block diagram showing the processor pipelines of a V2 ColdFire core.
Instruction
IAG
Address
Generation
Instruction
Fetch
Pipeline
Operand
Execution
Pipeline
IC
IB
DSOC
AGEX
Instruction
Fetch Cycle
FIFO
Instruction Buffer
Decode & Select,
Operand Fetch
Address
Generation,
Execute
Address [31:0]
read_data[31:0]
write_data[31:0]
Figure 2-1. ColdFire Processor Core Pipelines
MOTOROLAChapter 2. ColdFire Core2-1
Processor Register Description
The processor core is comprised of two separate pipelines that are decoupled by an
instruction buffer.
The Instruction Fetch Pipeline (IFP) is a two-stage pipeline for prefetching instructions.
The prefetched instruction stream is then gated into the two-stage Operand Execution
Pipeline (OEP), which decodes the instruction, fetches the required operands and then
executes the required function. Since the IFP and OEP pipelines are decoupled by an
instruction buffer which serves as a FIFO queue, the IFP is able to prefetch instructions in
advance of their actual use by the OEP thereby minimizing time stalled waiting for
instructions.
The Instruction Fetch Pipeline consists of two stages with an instruction buffer stage:
•Instruction Address Generation (IAG Cycle)
•Instruction Fetch Cycle (IC Cycle)
•Instruction Buffer (IB Cycle)
When the instruction buffer is empty, opcodes are loaded directly from the IC cycle into the
Operand Execution Pipeline. If the buffer is not empty, the IFP stores the contents of the
fetch cycle in the FIFO queue until it is required by the OEP. In the Version 2
implementation, the instruction buffer contains three 32-bit longwords of storage.
The Operand Execution Pipeline is implemented in a two-stage pipeline featuring a
traditional RISC datapath with a dual-read-ported register file (RGF) feeding an
arithmetic/logic unit. In this design, the pipeline stages have multiple functions:
•Decode & Select/Operand Cycle (DSOC Cycle)
•Address Generation/Execute Cycle (AGEX Cycle)
2.2Processor Register Description
The following paragraphs describe the processor registers in the user and supervisor
programming models. The appropriate programming model is selected based on the
privilege level (user mode or supervisor mode) of the processor as defined by the S bit of
the status register (SR).
2.2.1User Programming Model
Figure 2-2 illustrates the user programming model. The model is the same as the M68000
family microprocessors, consisting of the following registers:
Registers D0–D7 are used as data registers for bit (1-bit), byte (8-bit), word (16-bit) and
longword (32-bit) operations; they can also be used as index registers.
2.2.1.2Address Registers (A0–A6)
These registers can be used as software stack pointers, index registers, or base address
registers; they can also be used for word and longword operations.
2.2.1.3Stack Pointer (A7)
Certain ColdFire implementations, including the MCF5282, support two unique stack
pointer (A7) registers—the supervisor stack pointer (SSP) and the user stack pointer (USP).
This support provides the required isolation between operating modes of the processor. The
SSP is described in Section 2.2.3.2, “Supervisor/User Stack Pointers (A7 and
OTHER_A7).”
A subroutine call saves the PC on the stack and the return restores it from the stack. Both
the PC and the SR are saved on the supervisor stack during the processing of exceptions
and interrupts. The return from exception (RTE) instruction restores the SR and PC values
from the supervisor stack.
2.2.1.4Program Counter (PC)
The PC contains the address of the currently executing instruction. During instruction
execution and exception processing, the processor automatically increments the contents of
the PC or places a new value in the PC, as appropriate. For some addressing modes, the PC
is used as a base address for PC-relative operand addressing.
MOTOROLAChapter 2. ColdFire Core2-3
Processor Register Description
15031
1570
7
Figure 2-2. User Programming Model
2.2.1.5Condition Code Register (CCR)
D0
D1
D2
D3
D4
D5
D6
D7
A0
A1
A2
A3
A4
A5
A6
A7
PC
CCR
DATA
REGISTERS
ADDRESS
REGISTERS
USERSTACK
POINTER
PROGRAM
COUNTER
CONDITION
CODE
REGISTER
The CCR is the LSB of the processor status register (SR). Bits 4–0 act as indicator flags for
results generated by processor operations. Bit 4, the extend bit (X bit), is also used as an
input operand during multiprecision arithmetic computations.
43210
XNZVC
Figure 2-3. Condition Code Register (CCR)
Table 2-1. CCR Field Descriptions
BitsNameDescription
4XExtend condition code bit.
3NNegative condition code bit. Set if the most significant bit of the result is set;
otherwise cleared.
2ZZero condition code bit. Set if the result equals zero; otherwise cleared.
1VOverflow condition code bit. Set if an arithmetic overflow occurs implying that the
result cannot be represented in the operand size; otherwise cleared.
0CCarry condition code bit. Set if a carry out of the operand msb occurs for an
addition, or if a borrow occurs in a subtraction; otherwise cleared
Set to the value of the C bit for arithmetic operations; otherwise not affected.
2-4MCF5282 User’s ManualMOTOROLA
Processor Register Description
2.2.2 EMAC Programming Model
The registers in the EMAC portion of the user programming model, are described in
Section Chapter 5, “Enhanced Multiply-Accumulate Unit (EMAC),” and include the
following registers:
•Four 48-bit accumulator registers partitioned as follows:
— Four 32-bit accumulators (ACC0–ACC3)
— Eight 8-bit accumulator extension bytes (two per accumulator). These are
grouped into two 32-bit values for load and store operations (ACCEXT01 and
ACCEXT23).
Accumulators and extension bytes can be loaded, copied, and stored, and results
from EMAC arithmetic operations generally affect the entire 48-bit destination.
•Eight 8-bit accumulator extensions (two per accumulator), packaged as two 32-bit
values for load and store operations (ACCext01 and ACCext23)
•One 16-bit mask register (MASK)
•One 32-bit status register (MACSR) including four indicator bits signaling product
or accumulation overflow (one for each accumulator: PAV0–PAV3)
These registers are shown in Figure 2-4.
310
MACSRMAC status register
ACC0MAC accumulator 0
ACC1MAC accumulator 1
ACC2MAC accumulator 2
ACC3MAC accumulator 3
ACCext01 Extensions for ACC0 and ACC1
ACCext23 Extensions for ACC2 and ACC3
MASKMAC mask register
Figure 2-4. EMAC Register Set
2.2.3Supervisor Programming Model
Only system control software is intended to use the supervisor programming model to
implement restricted operating system functions, I/O control, and memory management.
All accesses that affect the control features of ColdFire processors are in the supervisor
programming model, which consists of registers available in user mode as well as the
following control registers:
•16-bit status register (SR)
•32-bit supervisor stack pointer (SSP)
•32-bit vector base register (VBR)
•32-bit cache control register (CACR)
MOTOROLAChapter 2. ColdFire Core2-5
Processor Register Description
•Two 32-bit access control registers (ACR0, ACR1)
•Two 32-bit memory base address registers (RAMBAR, FLASHBAR)
1570
(CCR)
31
SR
OTHER_A7
VBR
CACR
ACR0
ACR1
FLASHBAR
RAMBAR
STATUS
SUPERVISOR A7
STACK POINTER
VECTOR BASE
REGISTER
CACHE
CONTROL
ACCESS
CONTROL
ACCESS
CONTROL
FLASH BASE
ADDRESS REGISTER
RAM BASE
ADDRESS REGISTER
Figure 2-5. Supervisor Programming Model
The following paragraphs describe the supervisor programming model registers.
2.2.3.1Status Register (SR)
The SR stores the processor status and includes the CCR, the interrupt priority mask, and
other control bits. In supervisor mode, software can access the entire SR. In user mode, only
the lower 8 bits are accessible (CCR). The control bits indicate the following states for the
processor: trace mode (T bit), supervisor or user mode (S bit), and master or interrupt state
(M bit). All defined bits in the SR have read/write access when in supervisor mode.
System ByteCondition Code Register (CCR)
151413121110 876543210
T0SM0I000XNZVC
Figure 2-6. Status Register
Table 2-2. SR Field Descriptions
BitsNameDescription
15TTrace enable. When set, the processor performs a trace exception after
14—Reserved, should be cleared.
13SSupervisor/user state. Denotes whether the processor is in supervisor
2-6MCF5282 User’s ManualMOTOROLA
every instruction.
mode (S = 1) or user mode (S = 0).
Processor Register Description
Table 2-2. SR Field Descriptions (continued)
BitsNameDescription
12MMaster/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–8IInterrupt 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–0CCRRefer to Table 2-1.
2.2.3.2Supervisor/User Stack Pointers (A7 and OTHER_A7)
The MCF5282 architecture supports two independent stack pointer (A7) registers—the
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
thenA7 = Supervisor Stack Pointer
OTHER_A7 = User Stack Pointer
elseA7 = 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.
MOTOROLAChapter 2. ColdFire Core2-7
Programming Model
2.2.3.3Vector Base Register (VBR)
The VBR contains the base address of the exception vector table in memory. To access the
vector table, the displacement of an exception vector is added to the value in VBR. The
lower 20 bits of the VBR are not implemented by ColdFire processors; they are assumed to
be zero, forcing the table to be aligned on a 1 MByte boundary.
2.2.3.4Cache Control Register (CACR)
The CACR controls operation of the instruction/data cache memories. It includes bits for
enabling, freezing, and invalidating cache contents. It also includes bits for defining the
default cache mode and write-protect fields. The CACR is described in Section 4.4.2.1,
“Cache Control Register (CACR).”
2.2.3.5Access Control Registers (ACR0, ACR1)
The access control registers, ACR0 and ACR1, define attributes for two user-defined
memory regions. These attributes include the definition of cache mode, write protect, and
buffer write enables. The ACRs are described in Section 4.4.2.2, “Access Control Registers
(ACR0, ACR1).”
2.2.3.6Memory Base Address Registers (RAMBAR, FLASHBAR)
Memory base address registers are used to specify the base address of the internal SRAM
and Flash modules and indicate the types of references mapped to each. Each base address
register includes a base address, write-protect bit, address space mask bits, and an enable
bit. For the MCF5282, FLASHBAR determines the base address of the on-chip Flash, and
RAMBAR determines the base address of the on-chip RAM. For more information, refer
to Section 5.3.1, “SRAM Base Address Register (RAMBAR)” and Section 6.3.2, “Flash
Base Address Register (FLASHBAR).”
2.3Programming Model
Table 2-3 lists register names, the CPU space location, and whether the register is written
from the processor using the MOVEC instruction.
Table 2-3. ColdFire CPU Registers
NameCPU Space (Rc)
Memory Management Control Registers
CACR0x002YesCache control register
Written with
MOVEC
Register Name
ACR0, ACR10x004-0x005YesAccess control registers 0 and 1
The original ColdFire instruction set architecture (ISA) was derived from the
M68000-family opcodes based on extensive analysis of embedded application code. After
the initial ColdFire compilers were created, developers identified ISA additions that would
enhance both code density and overall performance. Additionally, as users implemented
ColdFire-based designs into a wide range of embedded systems, they identified frequently
used instruction sequences that could be improved by the creation of new instructions. This
observation was especially prevalent in development environments that made use of
substantial amounts of assembly language code.
Table 2-4 summarizes the new instructions added to Revision A+ ISA. For more details see
Section 2.14, “ColdFire Instruction Set Architecture Enhancements.”
MOTOROLAChapter 2. ColdFire Core2-9
Exception Processing Overview
Table 2-4. ISA Revision A+ New Instructions
InstructionDescription
BITREVThe contents of the destination data register are bit-reversed; that
is, new Dx[31] = old Dx[0], new Dx[30] = old Dx[1], ..., new Dx[0]
= old Dx[31].
BYTEREVThe contents of the destination data register are byte-reversed;
that is, new Dx[31:24] = old Dx[7:0], ..., new Dx[7:0] = old
Dx[31:24].
FF1The data register, Dx, is scanned, beginning from the
most-significant bit (Dx[31]) and ending with the least-significant
bit (Dx[0]), searching for the first set bit. The data register is then
loaded with the offset count from bit 31 where the first set bit
appears.
STLDSRPushes the contents of the Status Register onto the stack and
then reloads the Status Register with the immediate data value.
2.5Exception Processing Overview
Exception processing for ColdFire processors is streamlined for performance. The
ColdFire processors differ from the M68000 family in that they include:
•A simplified exception vector table
•Reduced relocation capabilities using the vector base register
•A single exception stack frame format
•Use of a single self-aligning system stack
All ColdFire processors use an instruction restart exception model, but certain
microarchitectures (V2 and V3) require more software support to recover from certain
access errors. See Section 2.7.1, “Access Error Exception” for details.
Exception processing includes all actions from the detection of the fault condition to the
initiation of fetch for the first handler instruction. Exception processing is comprised of
four major steps
First, the processor makes an internal copy of the SR and then enters supervisor mode by
asserting the S bit and disabling trace mode by negating the T bit. The occurrence of an
interrupt exception also forces the M bit to be cleared and the interrupt priority mask to be
set to the level of the current interrupt request.
Second, the processor determines the exception vector number. For all faults except
interrupts, the processor performs this calculation based on the exception type. For
interrupts, the processor performs an interrupt-acknowledge (IACK) bus cycle to obtain the
vector number from the interrupt controller. The IACK cycle is mapped to a special
acknowledge address space with the interrupt level encoded in the address.
2-10MCF5282 User’s ManualMOTOROLA
Exception Processing Overview
Third, the processor saves the current context by creating an exception stack frame on the
supervisor system stack. As a result, the exception stack frame is created at a 0-modulo-4
address on the top of the current system stack. Additionally, the processor uses a simplified
fixed-length stack frame for all exceptions. The exception type determines whether the
program counter placed in the exception stack frame defines the location of the faulting
instruction (fault) or the address of the next instruction to be executed (next).
Fourth, the processor calculates the address of the first instruction of the exception handler.
By definition, the exception vector table is aligned on a 1 Mbyte boundary. This instruction
address is generated by fetching an exception vector from the table located at the address
defined in the vector base register. The index into the exception table is calculated as (4 x
vector number). Once the exception vector has been fetched, the contents of the vector
determine the address of the first instruction of the desired handler. After the instruction
fetch for the first opcode of the handler has been initiated, exception processing terminates
and normal instruction processing continues in the handler.
All ColdFire processors support a 1024-byte vector table aligned on any 1 Mbyte address
boundary (see Table 2-5). The table contains 256 exception vectors; the first 64 are defined
by Motorola and the remaining 192 are user-defined interrupt vectors.
“Fault” refers to the PC of the instruction that caused the exception; “Next” refers to the PC
of the next instruction that follows the instruction that caused the fault.
Vec to r
Offset (Hex)
Stacked
Program
Counter
Assignment
All ColdFire processors inhibit interrupt sampling during the first instruction of all
exception handlers. This allows any handler to effectively disable interrupts, if necessary,
by raising the interrupt mask level contained in the status register. In addition, the V2 core
includes a new instruction (STLDSR) that stores the current interrupt mask level and loads
a value into the SR. This instruction is specifically intended for use as the first instruction
of an interrupt service routine which services multiple interrupt requests with different
interrupt levels. For more details see Section 2.14, “ColdFire Instruction Set Architecture
Enhancements.”
2.6Exception Stack Frame Definition
The exception stack frame is shown in Figure 2-7. The first longword of the exception stack
frame contains the 16-bit format/vector word (F/V) and the 16-bit status register, and the
second longword contains the 32-bit program counter address.
0
SSP
31
FORMATFS[3:2]VECTOR[7:0]FS[1:0 ]STATUS REGISTER
+ 0X4
27
25
PROGRAM COUNTER[31:0]
17
15
Figure 2-7. Exception Stack Frame Form
The 16-bit format/vector word contains 3 unique fields:
•A 4-bit format field at the top of the system stack is always written with a value of
4, 5, 6, or 7 by the processor indicating a two-longword frame format. See Table 2-6.
Table 2-6. Format Field Encodings
Original SSP @ Time
of Exception, Bits 1:0
00Original SSP - 84
01Original SSP - 95
10Original SSP - 106
11Original SSP - 117
SSP @ 1st Instruction
of Handler
Format Field
2-12MCF5282 User’s ManualMOTOROLA
Processor Exceptions
•There is a 4-bit fault status field, FS[3:0], at the top of the system stack. This field is
defined for access and address errors only and written as zeros for all other types of
exceptions. See Table 2-7.
Table 2-7. Fault Status Encodings
FS[3:0]Definition
00xxReserved
0100Error on instruction fetch
0101Reserved
011xReserved
1000Error on operand write
1001Attempted write to write-protected space
101xReserved
1100Error on operand read
1101Reserved
111xRese rved
•The 8-bit vector number, vector[7:0], defines the exception type and is calculated by
the processor for all internal faults and represents the value supplied by the interrupt
controller in the case of an interrupt. Refer to Table 2-5.
2.7Processor Exceptions
2.7.1Access Error Exception
The exact processor response to an access error depends on the type of memory reference
being performed. For an instruction fetch, the processor postpones the error reporting until
the faulted reference is needed by an instruction for execution. Therefore, faults that occur
during instruction prefetches that are then followed by a change of instruction flow do not
generate an exception. When the processor attempts to execute an instruction with a faulted
opword and/or extension words, the access error is signaled and the instruction aborted. For
this type of exception, the programming model has not been altered by the instruction
generating the access error.
If the access error occurs on an operand read, the processor immediately aborts the current
instruction’s execution and initiates exception processing. In this situation, any address
register updates attributable to the auto-addressing modes, (for example, (An)+,-(An)),
have already been performed, so the programming model contains the updated An value.
In addition, if an access error occurs during the execution of a MOVEM instruction loading
from memory, any registers already updated before the fault occurs contain the operands
from memory.
MOTOROLAChapter 2. ColdFire Core2-13
Processor Exceptions
The V2 ColdFire processor uses an imprecise reporting mechanism for access errors on
operand writes. Because the actual write cycle may be decoupled from the processor’s
issuing of the operation, the signaling of an access error appears to be decoupled from the
instruction that generated the write. Accordingly, the PC contained in the exception stack
frame merely represents the location in the program when the access error was signaled. All
programming model updates associated with the write instruction are completed. The NOP
instruction can collect access errors for writes. This instruction delays its execution until all
previous operations, including all pending write operations, are complete. If any previous
write terminates with an access error, it is guaranteed to be reported on the NOP instruction.
2.7.2Address Error Exception
Any attempted execution transferring control to an odd instruction address (that is, if bit 0
of the target address is set) results in an address error exception.
Any attempted use of a word-sized index register (Xn.w) or a scale factor of 8 on an indexed
effective addressing mode generates an address error as does an attempted execution of a
full-format indexed addressing mode.
2.7.3Illegal Instruction Exception
Any attempted execution of an illegal 16-bit opcode (except for line-A and line-F opcodes)
generates an illegal instruction exception (vector 4). Additionally, any attempted execution
of any non-MAC line-A and most line-F opcode generates their unique exception types,
vector numbers 10 and 11, respectively. The V2 core does not provide illegal instruction
detection on the extension words on any instruction, including MOVEC.
2.7.4Divide-By-Zero
Attempting to divide by zero causes an exception (vector 5, offset = 0x014).
2.7.5Privilege Violation
The attempted execution of a supervisor mode instruction while in user mode generates a
privilege violation exception. See the ColdFire Programmer’s Reference Manual for lists
of supervisor- and user-mode instructions.
2.7.6Trace Exception
To aid in program development, all ColdFire processors provide an
instruction-by-instruction tracing capability. While in trace mode, indicated by the
assertion of the T-bit in the status register (SR[15] = 1), the completion of an instruction
execution (for all but the STOP instruction) signals a trace exception. This functionality
allows a debugger to monitor program execution.
2-14MCF5282 User’s ManualMOTOROLA
Processor Exceptions
The STOP instruction has the following effects:
1. The instruction before the STOP executes and then generates a trace exception. In
the exception stack frame, the PC points to the STOP opcode.
2. When the trace handler is exited, the STOP instruction is executed, loading the SR
with the immediate operand from the instruction.
3. The processor then generates a trace exception. The PC in the exception stack
frame points to the instruction after the STOP, and the SR reflects the value loaded
in the previous step.
If the processor is not in trace mode and executes a STOP instruction where the immediate
operand sets SR[T], hardware loads the SR and generates a trace exception. The PC in the
exception stack frame points to the instruction after the STOP, and the SR reflects the value
loaded in step 2.
Because ColdFire processors do not support any hardware stacking of multiple exceptions,
it is the responsibility of the operating system to check for trace mode after processing other
exception types. As an example, consider the execution of a TRAP instruction while in
trace mode. The processor will initiate the TRAP exception and then pass control to the
corresponding handler. If the system requires that a trace exception be processed, it is the
responsibility of the TRAP exception handler to check for this condition (SR[15] in the
exception stack frame asserted) and pass control to the trace handler before returning from
the original exception.
2.7.7Unimplemented Line-A Opcode
A line-A opcode is defined when bits 15-12 of the opword are 0b1010. This exception is
generated by the attempted execution of an undefined line-A opcode.
2.7.8Unimplemented Line-F Opcode
A line-F opcode is defined when bits 15-12 of the opword are 0b1111. This exception is
generated by attempted execution of an undefined line-F opcode.
2.7.9Debug Interrupt
This special type of program interrupt is discussed in detail in Chapter 29, “Debug
Support.” This exception is generated in response to a hardware breakpoint register trigger.
The processor does not generate an IACK cycle but rather calculates the vector number
internally (vector number 12).
MOTOROLAChapter 2. ColdFire Core2-15
Processor Exceptions
2.7.10 RTE and Format Error Exception
When an RTE instruction is executed, the processor first examines the 4-bit format field to
validate the frame type. For a ColdFire core, any attempted RTE execution where the
format is not equal to {4,5,6,7} generates a format error. The exception stack frame for the
format error is created without disturbing the original RTE frame and the stacked PC
pointing to the RTE instruction.
The selection of the format value provides some limited debug support for porting code
from M68000 applications. On M68000 family processors, the SR was located at the top of
the stack. On those processors, bit 30 of the longword addressed by the system stack pointer
is typically zero. Thus, if an RTE is attempted using this “old” format, it generates a format
error on a ColdFire processor.
If the format field defines a valid type, the processor: (1) reloads the SR operand, (2) fetches
the second longword operand, (3) adjusts the stack pointer by adding the format value to
the auto-incremented address after the fetch of the first longword, and then (4) transfers
control to the instruction address defined by the second longword operand within the stack
frame.
2.7.11TRAP Instruction Exception
The TRAP #n instruction always forces an exception as part of its execution and is useful
for implementing system calls.
2.7.12 Interrupt Exception
Interrupt exception processing includes interrupt recognition and the fetch of the
appropriate vector from the interrupt controller using an IACK cycle. See Chapter 10,
“Interrupt Controller Modules” for details on the interrupt controller.
2.7.13 Fault-on-Fault Halt
If a ColdFire processor encounters any type of fault during the exception processing of
another fault, the processor immediately halts execution with the catastrophic
“fault-on-fault” condition. A reset is required to force the processor to exit this halted state.
2.7.14 Reset Exception
Asserting the reset input signal to the processor causes a reset exception. The reset
exception has the highest priority of any exception; it provides for system initialization and
recovery from catastrophic failure. Reset also aborts any processing in progress when the
reset input is recognized. Processing cannot be recovered.
2-16MCF5282 User’s ManualMOTOROLA
Processor Exceptions
The reset exception places the processor in the supervisor mode by setting the S-bit and
disables tracing by clearing the T bit in the SR. This exception also clears the M-bit and sets
the processor’s interrupt priority mask in the SR to the highest level (level 7). Next, the
VBR is initialized to zero (0x00000000). The control registers specifying the operation of
any memories (e.g., cache and/or RAM modules) connected directly to the processor are
disabled.
NOTE
Other implementation-specific supervisor registers are also
affected. Refer to each of the modules in this user’s manual for
details on these registers.
Once the processor is granted the bus, it then performs two longword read bus cycles. The
first longword at address 0 is loaded into the stack pointer and the second longword at
address 4 is loaded into the program counter. After the initial instruction is fetched from
memory, program execution begins at the address in the PC. If an access error or address
error occurs before the first instruction is executed, the processor enters the fault-on-fault
halted state.
ColdFire processors load hardware configuration information into the D0 and D1
general-purpose registers after system reset. The hardware configuration information is
loaded immediately after the reset-in signal is negated. This allows an emulator to read out
the contents of these registers via BDM to determine the hardware configuration.
Information loaded into D0 defines the processor hardware configuration as shown in
Figure 2-8.
312423201916
FieldPFVERREV
Reset1100_1111_0010_0000
R/WR
15141312111087430
FieldMAC DIV EMAC FPU MMU—ISADEBUG
Reset0110_0000_1000_0000
R/WR
Figure 2-8. D0 Hardware Configuration Info
MOTOROLAChapter 2. ColdFire Core2-17
Processor Exceptions
Table 2-8. D0 Hardware Configuration Info Field Description
BitsNameDescription
31–24PFProcessor family. This field is fixed to a hex value of 0xCF indicating a ColdFire core is present.
23–20VERColdFire core version number. This field is fixed to a hex value of 0x2 indicating a Version 2 ColdFire
core.
19–16REVProcessor revision number.
15MACMAC execute engine status. Indicates if optional MAC unit is present.
0 MAC execute engine not present in core. (This is the value used for MCF5282.)
1 MAC execute engine is present in core.
14DIVDivide execute engine status. Indicates if optional hardware divide unit is present.
0 Divide execute engine not present in core.
1 Divide execute engine is present in core. (This is the value used for MCF5282.)
13EMACEMAC execute engine status. Indicates if optional enhanced MAC unit is present.
0 EMAC execute engine not present in core.
1 EMAC execute engine is present in core. (This is the value used for MCF5282.)
12FPUFPU execute engine status. Indicates if optional FPU unit is present.
0 FPU execute engine not present in core. (This is the value used for MCF5282)
1 FPU execute engine is present in core.
11MMUVirtual memory management unit status. Indicates if optional MMU unit is present.
0 MMU execute engine not present in core. (This is the value used for MCF5282)
1 MMU execute engine is present in core.
10–8—Reserved.
7–4ISAInstruction set architecture (ISA) revision number.
0000 ISA_A
0001 ISA_B
0010 ISA_C
1000 ISA_A+ (ISA_A with the addition of the BYTEREV, BITREV, FF1, and STLDSR instructions.
This is the value used for MCF5282.)
0x3-0xF Reserved.
3–0DEBUG Debug module revision number.
0000 DEBUG_A (This is the value used for MCF5282)
0001 DEBUG_B
0010 DEBUG_C
0011 DEBUG_D
0100 DEBUG_E
0x5-0xF Reserved.
Information loaded into D1 defines the local memory hardware configuration as shown in
Figure 2-9.
2-18MCF5282 User’s ManualMOTOROLA
Processor Exceptions
31302928272423201916
FieldCLICAICSIZRAM0SIZROM0SIZ
Reset0001_0011_1011_0000
R/WR
151413121187430
FieldBUSWDCADCSIZRAM1SIZROM1SIZ
Reset0001_0000_1000_0000
R/WR
Figure 2-9. D1 Hardware Configuration Info
Table 2-9. D1 Local Memory Hardware Configuration
Information Field Description
BitsNameDescription
31–30CLCache line size. This field is fixed to a hex value of 0x0 indicating a 16-byte cache line size.
29–28ICAInstruction cache associativity.
00 Four-way.
01 Direct mapped. (This is the value used for MCF5282)
27–24ICSIZInstruction cache size.
0000 No instruction cache.
0001 512B instruction cache.
0010 1KB instruction cache.
0011 2KB instruction cache. (This is the value used for MCF5282)
0100 4KB instruction cache.
0101 8KB instruction cache.
0110 16KB instruction cache.
0111 32KB instruction cache.
1000 64KB instruction cache.
0x9–0xF Reserved.
MOTOROLAChapter 2. ColdFire Core2-19
Processor Exceptions
Table 2-9. D1 Local Memory Hardware Configuration
Information Field Description (continued)
BitsNameDescription
23–20 RAM0SIZ RAM bank 0 size. The first RAM bank can be used for either SRAM or Flash. The first encodings
shown are used to indicate the size of a RAM bank, and the second set of encodings indicate the
size for a Flash bank. On the MCF5282, RAM0 is associated with the on-chip Flash, so these bits
use the Flash encodings.
Flash size encodings:
0x0–0x7 No Flash.
1000 64KB Flash.
1001 128KB Flash.
1010 256KB Flash.
1011 512KB Flash. (This is the value used for MCF5282)
0xC–0xF Reserved.
19–16 ROM0SIZ ROM bank 0 size.
0x0–0x3 No ROM. (This is the value used for MCF5282)
0100 4KB ROM.
0101 8KB ROM.
0110 16KB ROM.
0111 32KB ROM.
1000 64KB ROM.
1001 128KB ROM.
0xA–0xF Reserved.
15–14BUSWEncoded bus data width.
00 32-bit data bus (only configuration currently in use).
13–12DCAData cache associativity.
00 Four-way.
01 Direct mapped. (This is the value used for MCF5282)
11–8DCSIZData cache size.
0000 No data cache. (This is the value used for MCF5282)
0001 512B data cache.
0010 1KB data cache.
0011 2KB data cache.
0100 4KB data cache.
0101 8KB data cache.
0110 16KB data cache.
0111 32KB data cache.
1000 64KB data cache.
0x9–0xF Reserved.
2-20MCF5282 User’s ManualMOTOROLA
Table 2-9. D1 Local Memory Hardware Configuration
Information Field Description (continued)
BitsNameDescription
7–4RAM1SIZ RAM bank 1size.
0x0–0x3 No RAM.
0100 4KB RAM.
0101 8KB RAM.
0110 16KB RAM.
0111 32KB RAM.
1000 64KB RAM. (This is the value used for MCF5282)
1001 128KB RAM.
0xA–0xF Reserved.
3–0ROM1SIZ ROM bank 1size.
0x0–0x3 No ROM. (This is the value used for MCF5282)
0100 4KB ROM.
0101 8KB ROM.
0110 16KB ROM.
0111 32KB ROM.
1000 64KB ROM.
1001 128KB ROM.
0xA–0xF Reserved.
Instruction Execution Timing
2.8Instruction Execution Timing
This section presents V2 processor instruction execution times in terms of processor core
clock cycles. The number of operand references for each instruction is enclosed in
parentheses following the number of processor clock cycles. Each timing entry is presented
as C(R/W) where:
•C is the number of processor clock cycles, including all applicable operand fetches
and writes, and all internal core cycles required to complete the instruction
execution.
•R/W is the number of operand reads (R) and writes (W) required by the instruction.
An operation performing a read-modify-write function is denoted as (1/1).
This section includes the assumptions concerning the timing values and the execution time
details.
2.8.1Timing Assumptions
For the timing data presented in this section, the following assumptions apply:
1. The operand execution pipeline (OEP) is loaded with the opword and all required
extension words at the beginning of each instruction execution. This implies that the
OEP does not wait for the instruction fetch pipeline (IFP) to supply opwords and/or
extension words.
MOTOROLAChapter 2. ColdFire Core2-21
Instruction Execution Timing
2. The OEP does not experience any sequence-related pipeline stalls. For V2 ColdFire
processors, the most common example of this type of stall involves consecutive
store operations, excluding the MOVEM instruction. For all STORE operations
(except MOVEM), certain hardware resources within the processor are marked as
“busy” for two processor clock cycles after the final DSOC cycle of the store
instruction. If a subsequent STORE instruction is encountered within this 2-cycle
window, it will be stalled until the resource again becomes available. Thus, the
maximum pipeline stall involving consecutive STORE operations is 2 cycles. The
MOVEM instruction uses a different set of resources and this stall does not apply.
3. The OEP completes all memory accesses without any stall conditions caused by the
memory itself. Thus, the timing details provided in this section assume that an
infinite zero-wait state memory is attached to the processor core.
4. All operand data accesses are aligned on the same byte boundary as the operand
size: that is, 16 bit operands aligned on 0-modulo-2 addresses and 32 bit operands
aligned on 0-modulo-4 addresses.
If the operand alignment fails these guidelines, it is misaligned. The processor core
decomposes the misaligned operand reference into a series of aligned accesses as shown in
Table 2-10.
Table 2-10. Misaligned Operand References
Address[1:0]Size
X1WordByte, Byte2(1/0) if read
X1LongByte, Word, Byte3(2/0) if read
10LongWord, Word2(1/0) if read
Kbus
Operations
Additional
C(R/W)
1(0/1) if write
2(0/2) if write
1(0/1) if write
2.8.2MOVE Instruction Execution Times
The execution times for the MOVE.{B,W} instructions are shown in Table 2-11, while
Table 2-12 provides the timing for MOVE.L.
For all tables in this section, the execution time of any instruction using the PC-relative
effective addressing modes is the same for the comparable An-relative mode.
The nomenclature “xxx.wl” refers to both forms of absolute addressing, xxx.w and xxx.l.
2-22MCF5282 User’s ManualMOTOROLA
Instruction Execution Timing
Table 2-11. Move Byte and Word Execution Times
Destination
Source
Rx(Ax)(Ax)+-(Ax)(d16,Ax) (d8,Ax,Xi) (xxx).wl
Dn1(0/0)1(0/1)1(0/1)1(0/1)1(0/1)2(0/1)1(0/1)
An1(0/0)1(0/1)1(0/1)1(0/1)1(0/1)2(0/1)1(0/1)
(An)3(1/0)3(1/1)3(1/1)3(1/1)3(1/1)4(1/1)3(1/1)
(An)+3(1/0)3(1/1)3(1/1)3(1/1)3(1/1)4(1/1)3(1/1)
-(An)3(1/0)3(1/1)3(1/1)3(1/1)3(1/1)4(1/1)3(1/1)
,An)3(1/0)3(1/1)3(1/1)3(1/1)3(1/1)——
(d
16
(d8,An,Xi)4(1/0)4(1/1)4(1/1)4(1/1)———
(xxx).w3(1/0)3(1/1)3(1/1)3(1/1)———
(xxx).l3(1/0)3(1/1)3(1/1)3(1/1)———
(d16,PC)3(1/0)3(1/1)3(1/1)3(1/1)3(1/1)——
(d8,PC,Xi)4(1/0)4(1/1)4(1/1)4(1/1)———
#<xxx>1(0/0)3(0/1)3(0/1)3(0/1)———
Table 2-12. Move Long Execution Times
Destination
Source
Rx(Ax)(Ax)+-(Ax)(d
Dn1(0/0)1(0/1)1(0/1)1(0/1)1(0/1)2(0/1)1(0/1)
An1(0/0)1(0/1)1(0/1)1(0/1)1(0/1)2(0/1)1(0/1)
(An)2(1/0)2(1/1)2(1/1)2(1/1)2(1/1)3(1/1)2(1/1)
(An)+2(1/0)2(1/1)2(1/1)2(1/1)2(1/1)3(1/1)2(1/1)
-(An)2(1/0)2(1/1)2(1/1)2(1/1)2(1/1)3(1/1)2(1/1)
,An)2(1/0)2(1/1)2(1/1)2(1/1)2(1/1)——
(d
16
(d
,An,Xi)3(1/0)3(1/1)3(1/1)3(1/1)———
8
(xxx).w2(1/0)2(1/1)2(1/1)2(1/1)———
(xxx).l2(1/0)2(1/1)2(1/1)2(1/1)———
(d16,PC)2(1/0)2(1/1)2(1/1)2(1/1)2(1/1)——
(d8,PC,Xi)3(1/0)3(1/1)3(1/1)3(1/1)———
#<xxx>1(0/0)2(0/1)2(0/1)2(0/1)———
,Ax)(d8,Ax,Xi) (xxx).wl
16
MOTOROLAChapter 2. ColdFire Core2-23
Standard One Operand Instruction Execution Times
2.9Standard One Operand Instruction
Execution Times
Table 2-13. One Operand Instruction Execution Times
For divide and remainder instructions the times listed represent the worst-case timing. Depending on the operand
values, the actual execution time may be less.
2.11Miscellaneous Instruction Execution Times
Table 2-15. Miscellaneous Instruction Execution Times
Storing an accumulator requires one additional processor clock cycle when saturation is enabled, or fractional
rounding is performed (MACSR[7:4] = 1---, -11-, --11)
2
————— ——
MOTOROLAChapter 2. ColdFire Core2-27
Branch Instruction Execution Times
NOTE
The execution times for moving the contents of the Racc,
Raccext[01,23], MACSR, or Rmask into a destination location
<ea>x shown in this table represent the best-case scenario
when the store instruction is executed and there are no load or
M{S}AC instructions in the EMAC execution pipeline. In
general, these store operations require only a single cycle for
execution, but if preceded immediately by a load, MAC, or
MSAC instruction, the depth of the EMAC pipeline is exposed
and the execution time is four cycles.
2.13Branch Instruction Execution Times
Table 2-17. General Branch Instruction Execution Times
Effective Address
Opcode <EA>
Rn(An)(An)+-(An)
(d16,An)
(d16,PC)
(d8,An,Xi*SF)
(d8,PC,Xi*SF)
xxx.wl#xxx
bsr————3(0/1)— ——
jmp<ea>—3(0/0)——3(0/0)4(0/0)3(0/0)—
jsr<ea>—3(0/1)——3(0/1)4(0/1)3(0/1)—
rte——10(2/0)—————
rts——5(1/0)—————
Table 2-18. BRA, Bcc Instruction Execution Times
Opcode
bra2(0/0)—2(0/0)—
bcc3(0/0)1(0/0)2(0/0)3(0/0)
Forward
Taken
Forward
Not Taken
Backward
Taken
Backward
Not Taken
2.14ColdFire Instruction Set Architecture
Enhancements
This section describes the new opcodes implemented as part of the Revision A+
enhancements to the basic ColdFire ISA.
2-28MCF5282 User’s ManualMOTOROLA
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.