Freescale Semiconductor
Technical Information Center, CH370
1300 N. Alma School Road
Chandler, Arizona 85224
+1-800-521-6274 or +1-480-768-2130
[email protected]
Freescale Semiconductor Japan Ltd.
Headquarters
ARCO Tower 15F
1-8-1, Shimo-Meguro, Meguro-ku,
Tokyo 153-0064, Japan
0120 191014 or +81 3 5437 9125
[email protected]
Asia/Pacific:
Freescale Semiconductor Hong Kong Ltd.
Technical Information Center
2 Dai King Street
Tai Po Industrial Estate
Tai Po, N.T., Hong Kong
+800 26668334
[email protected]
For Literature Requests Only:
Freescale Semiconductor Literature Distribution Center
P.O. Box 5405
Denver, Colorado 80217
1-800-441-2447 or 303-675-2140
Fax: 303-675-2150
[email protected]
Information in this document is provided solely to enable system and
software implementers to use F reescal e Semiconductor pr oducts. There ar e
no express or implied copyright licenses granted hereunder to design or
fabricate any integrated circ uits or in te g rated circuits based on the
information in this document.
Freescale Semiconductor reserves the right to mak e changes without further
notice to any products herein. F reescale Se miconductor m akes no w arran ty,
representation or guarantee regarding the suitability of its products for any
particular purpose, nor does Freescale Semiconductor assume any liability
arising out of the application or use of any product or circuit, and spec ifica lly
disclaims any and all liability, including without limitation consequential or
incidental damages. “Typical” parameters that may be provided in Freescale
Semiconductor data sheets and/or specif ications can and d o vary in diff erent
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. Freescale Semiconductor does
not convey any license under its patent rights nor the rights of others.
Freescale Semiconductor products are not desig ned, intended, or auth orized
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 Freescale Semiconductor product could
create a situation where personal injury or death may occur. Should Buyer
purchase or use Freescale Semiconductor products for any such unintended
or unauthorized application, Buyer shall indemnify and hold Freescale
Semiconductor and its officers, employees, subsidiaries, affiliates, and
distributors harmless against all claims, costs , damages, and expen ses, and
reasonable attorney fe es arising out of, directly or indirectly, any claim of
personal injury or death associated with such unintended or unauthorized
use, even if such cl aim alleg es that Freescale Semiconductor was negligent
regarding the design or manufacture of t he part.
12.2 Features ........................................................................................................................................ 12-3
12.3 Modes of Operation...................................................................................................................... 12-3
16.3 Features ........................................................................................................................................ 16-2
16.4 Modes of Operation...................................................................................................................... 16-2
B.1Changes Between Rev. 2 and Rev. 3 ...............................................................................B-1
B.2Changes Between Rev. 1 and Rev. 2 ...............................................................................B-5
B.3Changes Between Rev. 0.1 and Rev. 1 ..........................................................................B-12
B.4Changes Between Rev. 0 and Rev. 0.1 ..........................................................................B-17
xxviiiFreescale Semiconductor
Appendix A
Register Memory Map Quick Reference
Appendix B
Revision History
Page 29
About This Book
MCF5329 Reference Manual, Rev 3
The primary objective of this reference manual is to define the functionality of the MCF5329
processor for use by software and hardware developers. In addition, this manual supports the
MCF5327, MCF5328, and MCF53281. This book is written from the perspective of the
MCF5329, and unless otherwise noted, the information applies also to the MCF5327, MCF5328,
and MCF53281. The MCF5327, MCF5328, and MCF53281 have the same functionality as the
MCF5329 and any differences in data regarding bus timing, signal behavior, and AC, DC, and
thermal characteristics are in the hardware specifications. Please refer to Table 1-1 to see a
summary of the differences.
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.freescale.com/coldfire.
Portions of Chapter 20, “Universal Serial Bus Interface – Host Module,” and Chapter 21,
“Universal Serial Bus Interface – On-The-Go Module,” relating to the EHCI specification are
This manual is intended for system software and hardware developers and applications
programmers who want to develop products with the MCF5329. It is assumed that the reader
understands operating systems, microprocessor system design, basic principles of software and
hardware, and basic details of the ColdFire
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 device, focusing in particular on new features.
Freescale Semiconductorxxix
®
architecture.
Page 30
•Chapter 2, “Signal Descriptions,” describes the device signals. It includes a listing of
MCF5329 Reference Manual, Rev 3
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 3, “ColdFire Core,” provides an overview of the microprocessor core. The chapter
describes the organization of the Version 2 (V2) ColdFire processor core and an overview
of the programming model as they are implemented on the device.
•Chapter 4, “Enhanced Multiply-Accumulate Unit (EMAC),” describes the
multiply/accumulate unit, which executes integer multiply, multiply-accumulate, and
miscellaneous register instructions. The EMAC is integrated into the operand execution
pipeline (OEP).
•Chapter 5, “Cache,” describes the cache implementation, including organization,
configuration, and coherency. It describes cache operations and how the cache interacts
with other memory structures.
•Chapter 6, “Static RAM (SRAM),” describes the 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 7, “Clock Module,” describes the device’s different clocking methods. It also
describes clock module operation in low power modes.
•Chapter 8, “Power Management,” describes the low power operation of the device and
peripheral behavior in low power modes.
•Chapter 9, “Chip Configuration Module (CCM),” details the various operating
configurations of the device. This chapter provides a description of signals used by the
CCM and a programming model.
•Chapter 10, “Reset Controller Module,” describes the operation of the reset controller
module, detailing the different types of reset that can occur.
•Chapter 11, “System Control Module (SCM),” describes the functionality of the SCM,
which provides the programming model for peripheral access control, the software core
watchdog timer (CWT), and the generic access error information.
•Chapter 12, “Crossbar Switch (XBS),” details the interaction between bus masters and bus
slaves within the device, including arbitration schemes.
•Chapter 13, “General Purpose I/O Module,” describes the operation and programming
model of the general purpose I/O (GPIO) ports on the device.
•Chapter 14, “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 15, “Edge Port Module (EPORT),” describes EPORT module functionality,
including operation in low power mode.
xxxFreescale Semiconductor
Page 31
•Chapter 16, “Enhanced Direct Memory Access (eDMA),” describes the direct memory
MCF5329 Reference Manual, Rev 3
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.
•Chapter 17, “FlexBus,” describes data-transfer operations, chip-select operation, error
conditions, bus arbitration, and reset operations.
•Chapter 18, “SDRAM Controller (SDRAMC),” describes the configuration and operation
of the SDRAM controller . It begins with a general description 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 19, “Fast Ethernet Controller (FEC),” provides a feature-set overview , a functional
block diagram, and transceiver connection information for MII (media independent
interface) and 7-wire serial interfaces. It also provides describes operation and the
programming model.
•Chapter 20, “Universal Serial Bus Interface – Host Module,” provides an overview of the
universal serial bus (USB) host module. The USB Specification, Revision 2.0 is a
recommended supplement to this chapter.
•Chapter 21, “Universal Serial Bus Interface – On-The-Go Module,” provides an overview
of the universal serial bus (USB) On-the-Go module. The USB Specification, Revision 2.0
is a recommended supplement to this chapter.
•Chapter 23, “FlexCAN,” describes the implementation of the controller area network
(CAN) protocol. This chapter describes FlexCAN module operation and provides a
programming model.
•Chapter 24, “Synchronous Serial Interface (SSI),” describes SSI module operation and
provides a programming model.
•Chapter 25, “Real-Time Clock,” describes the real-time clock module operation and
provides a programming model.
•Chapter 26, “Pulse-Width Modulation (PWM) Module,” describes the configuration and
operation of the pulse width modulation (PWM) module. It includes a block diagram,
programming model, and functional description.
•Chapter 27, “Watchdog Timer Module,” describes software watchdog timer functionality,
including operation in low power mode.
•Chapter 28, “Programmable Interrupt Timers (PIT0–PIT3),” describes the functionality of
the PIT timers, including operation in low power mode.
•Chapter 29, “DMA Timers (DTIM0–DTIM3),” describes the configuration and operation
of the DMA timer modules. 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.
Freescale Semiconductorxxxi
Page 32
•Chapter 30, “Queued Serial Peripheral Interface (QSPI),” provides a feature-set overview
MCF5329 Reference Manual, Rev 3
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 31, “UART Modules,” desc ribes the use of the universal asynchronous
receiver/transmitters (UARTs) implemented on the device and includes programming
examples.
•Chapter 32, “I2C Interface,” describes the I
synchronization, and I
2
C programming model registers.
2
C module, including I2C protocol, clock
•Chapter 33, “Message Digest Hardware Accelerator (MDHA),” describes implementation
of two of the world’s most popular cryptographic hash functions: SHA-1 and MD5.
Accelerators for either algorithm separately have been designed, however the MDHA
combines similar functions of the two algorithms into one small, optimized area of silicon
on the device.
•Chapter 34, “Random Number Generator (RNG),” describes the 32-bit Random Number
Generator (RNG), including a programming model, functional description, and application
information.
•Chapter 35, “Symmetric Key Hardware Accelerator (SKHA),” describes the cryptographic
hardware coprocessor designed to implement two widely used symmetric key block cipher
algorithms, AES and DES.
•Chapter 36, “Debug Module,” describes the hardware debug support in the device.
•Chapter 37, “IEEE 1149.1 Test Access Port (JTAG),” describes configuration and
operation of the Joint Test Action Group (JTAG) implementation. It describes those items
required by the IEEE 1149.1 standard and provides additional information specific to the
device. For internal details and sample applications, see the IEEE 1149.1 document.
This manual includes the following appendices:
•Appendix A, “Register Memory Map Quick Reference,” provides the entire address map
for memory-mapped registers.
•Appendix B, “Revision History,” provides a revision history for all previously released
versions of this document.
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.
Hardware Specification
The MCF5329EC document contains the mechanical and electrical specifications of the
MCF52329. It can be found at http://www.freescale.com/coldfire.
xxxiiFreescale Semiconductor
Page 33
General Information
MCF5329 Reference Manual, Rev 3
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
ColdFire documentation is available from the sources listed on the back cover of this manual.
•Reference manuals (formerly called 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.
•Addenda/errata to reference manuals—Because some processors have follow-on parts, an
addendum is provided that describes the additional features and functionality changes.
Also, if mistakes are found within a reference manual, an errata document will be issued
before the next published release of the reference manual. These addenda/errata are
intended for use with the corresponding reference manuals.
•Hardware specifications—Hardware specifications provide specific data regarding bus
timing, signal behavior, and AC, DC, and thermal characteristics, as well as other design
considerations.
•Product briefs—Each device has a product brief that provides an overview of its features.
This document is roughly equivalent to the overview (Chapter 1) of an implementation’s
reference manual.
•Application notes—These short documents address specific design issues useful to
programmers and engineers working with Freescale Semiconductor processors.
Additional literature is published as new processors become available. For a current list of
ColdFire documentation, refer to http://www.freescale.com/coldfire.
Conventions
This document uses the following notational conventions:
cleared/setWhen a bit takes the value zero, it is said to be cleared; when it takes a value
of one, it is said to be set.
Freescale Semiconductorxxxiii
Page 34
MNEMONICSIn text, instruction mnemonics are shown in uppercase.
MCF5329 Reference Manual, Rev 3
mnemonicsIn code and tables, instruction mnemonics are shown in lowercase.
Book titles in text are set in italics.
0x0Prefix to denote hexadecimal number
0b0Prefix to denote binary number
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
OVERBAR
An overbar indicates that a signal is active-low.
Register Figure Conventions
This document uses the following conventions for the register reset values:
—Undefined at reset.
uUnaffected by reset.
[signal_name]Reset value is determined by the polarity of the indicated signal.
The following register fields are used:
R0
W
R1
W
Indicates a reserved bit field in a memory-mapped register . These bits are
always read as zeros.
Indicates a reserved bit field in a memory-mapped register . These bits are
always read as ones.
1. The only exceptions to this appear in the discussion of serial communication modules th at support variable-length data
transmission units. To simplify the discussion these units are referred to as words regardless of length.
xxxivFreescale Semiconductor
Page 35
R FIELDNAME
MCF5329 Reference Manual, Rev 3
W
Indicates a read/write bit.
R FIELDNAME
W
R
W FIELDNAME
R FIELDNAME
Ww1c
R0
W FIELDNAME
Indicates a read-only bit field in a memory-mapped register.
Indicates a write-only bit field in a memory-mapped register.
Write 1 to clear: indicates that writing a 1 to this bit field clears it.
Indicates a self-clearing bit.
Acronyms and Abbreviations
Table 1 lists acronyms and abbreviations used in this document.
Table 1. Acronyms and Abbreviated Terms
TermMeaning
ADCAnalog-to-digital con version
ALUArithmetic logic unit
BDMBackground debug mode
BISTBuilt-in self test
BSDLBoundary-scan description langu age
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
Table 2 shows terminology conventions used throughout this document.
xxxviFreescale Semiconductor
Page 37
Table 2. Notational Conventions
MCF5329 Reference Manual, Rev 3
InstructionOperand Syntax
Opcode Wildcard
ccLo gical 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)
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)
bcInstruction 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)
Freescale Semiconductorxxxvii
Page 38
Table 2. Notational Conventions (continued)
MCF5329 Reference Manual, Rev 3
InstructionOperand Syntax
Operations
+Arithmetic addition or postincrement indicator
–Arithmetic subtraction or predecrement indicator
xArithmetic multiplication
/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-o rder 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 (e xample: lsb of D0)
LSBLeast sign ificant byte
LSWLeast significant word
msbMost significant bit
MSBMost significant byte
MSWMost significant word
Test the condition. If true, the operations after then are performed. If the cond ition 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.
Subfields and Qualifiers
Displacement value, n-bits wide (example: d16 is a 16-bit displacement)
xxxviiiFreescale Semiconductor
Page 39
Chapter 1
MCF5329 Reference Manual, Rev 3
Overview
The MCF532x devices are highly-integrated 32-bit microprocessors based on the Version 3 ColdFire
microarchitecture. All MCF532x devices contain a 32-Kbyte internal SRAM, an LCD controller, USB
host and On-the-Go controllers, a two-bank SDR/DDR SDRAM controller, a 16-channel DMA controller ,
up to three UAR Ts, a queued SPI, as well as other peripherals that enable the MCF532x family for use in
general purpose industrial control applications. Optional peripherals include a fast Ethernet controller, a
CAN module, and cryptography hardware accelerators.
This chapter provides an overview of the MCF5327, MCF5328, MCF53281, and MCF5329
microprocessors. It was written from the perspective of the MCF5329 device. See the following section
for a summary of differences between the devices.
1.1MCF532x Device Configurations
The following table compares the various devices derivatives available:
Ta ble 1-1. MCF5 3 2x Family Configurations
ModuleMCF5327MCF5328MCF53281MCF5329
ColdFire Version 3 Core with EMAC
(Enhanced Multiply-Accumulate Unit)
Core (System) Clockup to 240 MHz
Peripheral and External Bus Clock
(Core clock ÷ 3)
Perfo rmance (Dhrystone/2.1 MIPS)up to 211
Unified Cache16 Kbytes
Static RAM (SRAM)32 Kbytes
LCD Controller••••
SDR/DDR SDRAM Controller••••
USB 2.0 Host••••
USB 2.0 On-the-Go••••
UTMI+ Low Pin Interface (ULPI)—•••
Synchronous Serial Interface (SSI)••••
Fast Ethernet Controller (FEC)—•••
Cryptography Hardware Accelerators———•
Embedded Voice-over-IP System Solution——•—
FlexCAN 2.0B communication module——••
••••
up to 80 MHz
Freescale Semiconductor1-1
Page 40
Overview
MCF5329 Reference Manual, Rev 3
Table 1-1. MCF532x Family Configurations (continued)
ModuleMCF5327MCF5328MCF53281MCF5329
UARTs3333
2
C••••
I
QSPI••••
PWM Module••••
Real Time Clock••••
32-bit DMA Timers4444
Watchdog Timer (WDT)••••
Periodic Interrupt Timers (PIT)4444
Edge Port Module (EPORT)••••
Interrupt Controllers (INTC)2222
16-channel Direct Memory Access (DMA)••••
FlexBus External Interface••••
General Purpose I/O Module (GPIO)••••
®
JTAG - IEEE
Package196
1149.1 Test Access Port••••
MAPBGA
256
MAPBGA
256
MAPBGA
MAPBGA
256
1.2Block Diagram
The superset device in the MCF532x family is available in a 256 mold array process ball grid array
(MAPBGA) package. Figure 1-1 shows a top-level block diagram of the MCF5329.
1-2Freescale Semiconductor
Page 41
Overview
FlexBus
XBS
M2
M1M0
M5
PWMs, EPORT,
JTAG
TAP
TRST
TCLK
TMS
TDI
TDO
Cache
(1024x32)x4
DMA
UARTs
FlexCAN
I2C
QSPI
DMA Timers
Watchdog, PITs
PADI — Pin Muxing
EXTAL
XTAL
CLKOUT
16 KByte
Chip
External
Selects
(To/From PADI)
FEC
JTAG_EN
RTC
USB Host
M4
LCDC
S4
S7
S1
Reset
PORTS
SDRAMC
SSI
LCDC
USB OTG
RESET
SRAM
(4096x32)x2
32 KByte
PLL
S6
SDRAMC
M6
USB Host
USB OTG
XCVR
ULPI Interface
INTC0
INTC1
RCON
XCVR
V3 ColdFire CPU
DIVEMAC
BDM
(To/From PADI)
RNGA
SKHA
MDHA
Cryptography
Modules
Interface
RSTOUT
EXTAL32K
XTAL32K
(To/From SRAM backdoor)
(To/From XBS)
(To/From PADI)
D[31:0]
A[23:0]
R/W
CS[5:0]
TA
TS
CANTX
CANRX
FEC
DMA Timer
SDRAMC
UART
I
2
C
SDRAMC
QSPI
LCDC
SSI
DREQ
n
DACKn
USB Host
USB OTG
BE/BWE[3:0]
PWM
(To/From PADI)
MCF5329 Reference Manual, Rev 3
1.3Features
The following is a brief summary of the functional blocks in the MCF5329 superset device.
— Static operation
— 32-bit address and data path on-chip
— Processor core runs at three times the bus frequency
— Sixteen general-purpose 32-bit data and address registers
— Implements the ColdFire instruction set architecture, ISA_A+, with extensions to support the
user stack pointer register, and 4 new instructions for improved bit processing
— Enhanced multiply-accumulate (EMAC) unit with four 48-bit accumulators to support 32-bit
signal processing algorithms
Figure 1-1. MCF5329 Block Diagram
Page 42
Overview
MCF5329 Reference Manual, Rev 3
— Hardware divide execution unit supporting various 32-bit operations
— Illegal instruction decode that allows for 68K emulation support
•System debug support
— Background debug mode (BDM) revision B+ for in-circuit debugging
— Real time debug support, with nine user-visible hardware breakpoint registers (PC and address
with optional data) that can be configured into a 1- or 2-level trigger
•JTAG support for system level board testing
•On-Chip memories
— 16-Kbyte unified write-back cache
— 32-Kbyte dual-ported SRAM on CPU internal bus, accessible by core and non-core bus masters
(DMA, FEC, LCD controller, and USB host and OTG)
•Power management
— Fully static operation with processor wait, doze, and stop modes
— Very rapid response to interrupts from sleep mode
— Global clock disable register to disable clocks to most modules
— Ability to bypass PLL circuitry for low-power and low-speed mode
•Liquid crystal display controller (LCDC)
— Support for single (non-split) screen monochrome/color LCD panels and self-refresh type LCD
panels
— 16 simultaneous gray-scale levels from a palette of 16 for monochrome display
— Maximum supported panel size of 800x600 pixels
— 4(mapped to RGB444)/8(RGB444)/12 bits per pixel (bpp) for passive color panel
— 4(mapped to RGB666)/8(mapped to RGB666)/12(RGB444)/16(RGB565)/18 bpp for TFT
•Embedded voice-over-IP (VoIP) system solution
— Fully integrated and tested software VoIP package
•SDR/DDR SDRAM controller
— Supports a glueless interface to SDR and DDR SDRAM devices
— 16-bit (DDR) or 32-bit (SDR) fixed memory port width
— 16 bytes critical word first burst transfer
— Up to 14 lines of row address, up to 12 (in 32-bit mode) or 13 (in 16-bit bus mode) column
address lines, 2 bits of bank address, and a maximum of two pinned-out chip selects. The
maximum row bits plus column bits equals 24 in 32-bit bus mode or 25 in 16-bit mode.
— Supports up to 256 MBytes of memory per chip select, 512 MBytes total
— Supports page mode to maximize the data rate
— Supports sleep and self-refresh modes
•Universal serial bus (USB) host controller
— Fully compliant with the Universal Serial Bus Specification, Revision 2.0
— Support for full speed (FS = 12 Mbps) and low speed (LS = 1.5 Mbps) with on-chip
1-4Freescale Semiconductor
Page 43
transceiver in host mode.
MCF5329 Reference Manual, Rev 3
— Support for full speed with on-chip transceiver in device mode.
— Compatible with the Enhanced Host Controller Interface (EHCI) Specification for Universal
Serial Bus, Revision 1.0
— Connects to external 5V power control chip for 100mA to 500mA downstream power
— Uses 60 MHz reference clock based off of the system clock or from an external pin
•Universal serial bus (USB) On-the-Go (OTG) controller
— Fully compliant with the On-The-Go Supplement to the USB 2.0 Specification, Revision 1.0a
— Support for full speed and low speed with on-chip FS/LS transceiver.
— Optional UTMI+ Low Pin Interface (ULPI) available on some packages to support high speed
(HS = 480 Mbps) transfers
— Connects to external OTG charge pump and resistor chip via I2C bus
— Embedded host controller compatible with the Enhanced Host Controller Interface (EHCI)
Specification for Universal Serial Bus, Revision 1.0
— Uses 60 MHz reference clock based on the system clock or from an external pin
•Synchronous serial interface (SSI)
— Supports shared (synchronous) transmit and receive sections
— Normal mode operation using frame sync
Overview
— Network mode operation allowing multiple devices to share the port with as many as 32 time
slots
— Gated clock mode operation requiring no frame sync
— Programmable data interface modes such as I2S, LSB, MSB aligned
— Programmable word length up to 24 bits
— AC97 support
•Fast Ethernet controller (FEC)
— 10/100 BaseT/TX capability, half duplex or full duplex
— On-chip transmit and receive FIFOs
— Built-in dedicated DMA controller
— Memory-based flexible descriptor rings
— Media independent interface (MII) to external transceiver (PHY)
•Cryptography hardware accelerators
— FIPS-140 compliant random number generator
— MD5 and SHA-160 one-way hash algorithms
— DES, Triple-DES, and AES ciphers
•FlexCAN 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)
Freescale Semiconductor1-5
Page 44
Overview
MCF5329 Reference Manual, Rev 3
– 0–8 bytes data length
– Programmable bit rate up to 1 Mbit/sec
— 16 flexible Message Buffers (MBs) of 0–8 bytes data length each, configurable as Rx or Tx, all
supporting standard and extended messages
— Listen-only mode capability
— Content-related addressing
— Three programmable mask registers: global (for MBs 0-13), special for MB14 and 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
•Three universal asynchronous receiver transmitters (UARTs)
— 16-bit divider for clock generation
— Interrupt control logic
— DMA support with separate transmit and receive requests
— Data formats can be 5, 6, 7, or 8 bits with even, odd, or no parity
— Up to two stop bits in 1/16 increments
— Error-detection capabilities
— Flow control support includes request-to-send (UnRTS) and clear-to-send (UnCTS) lines
•I2C module
— Interchip bus interface for EEPROMs, A/D converters, and keypads
— Fully compatible with industry-standard I2C bus
— Master or slave modes support multiple masters
— Automatic interrupt generation with programmable level
•Queued serial peripheral interface (QSPI)
— Full-duplex, three-wire synchronous transfers
— Up to three chip selects available
— Master mode operation only with programmable master bit rates
— Up to 16 pre-programmed transfers
•Pulse width modulation (PWM) module
— Four independent PWM channels with programmable period and duty cycle
— Dedicated counter for each PWM channel
— Programmable PWM enable/disable for each channel
— Software selection of PWM duty pulse polarity for each channel
•Real time clock
— Full clock - days, hours, minutes, seconds
— Minute countdown timer with interrupt
— Programmable daily alarm with interrupt
1-6Freescale Semiconductor
Page 45
— Sampling timer with interrupt
MCF5329 Reference Manual, Rev 3
— Once-per-day, once-per-hour, once-per-minute, and once-per-second interrupts
— Operation at 32.768 kHz, 32 kHz, or 38.4 kHz (determined by reference clock crystal)
•Four 32-bit DMA timers
— 12.5-ns resolution at 80 MHz
— Programmable prescaler and sources for clock input, including an external clock option
— Input-capture capability with programmable trigger edge on input pin
— Output-compare with programmable mode for the output pin
— Free run and restart modes
— Maskable interrupts and DMA trigger capability on input capture or output compare
•Software watchdog timer
— 16-bit counter
— Low-power mode support
•Four periodic interrupt timers (PITs)
— 16-bit counter
— Selectable as free running or count down
•Interrupt controllers (x2)
— Support for up to 126 interrupt sources
— Unique vector number for each interrupt source
— Ability to mask any individual interrupt source or all interrupt sources (global mask-all)
— Support for hardware and software interrupt acknowledge (IACK) cycles
— Combinatorial path to provide wake-up from low power modes
•DMA controller
— 16 fully programmable channels with 32-byte transfer control
— Data movement via dual-address transfers for 8-, 16-, 32-, and 128-bit data values
— Programmable source and destination addresses, transfer size, and support for enhanced
address modes
— Support for major and minor nested counters with one request and one interrupt per channel
— Support for channel-to-channel linking and scatter/gather for continuous transfers with fixed
priority and round-robin channel arbitration
— External request pins for up to four channels
•FlexBus (external interface)
— Glueless connections to 8-, 16-, or 32-bit external memory devices (SRAM, Flash, ROM, etc.)
— Support for independent primary and secondary wait states per chip select
Freescale Semiconductor1-7
Page 46
Overview
MCF5329 Reference Manual, Rev 3
— Programmable address setup and hold time with respect to chip select negation, per transfer
direction
— Glueless interface to SRAM devices with or without byte strobe inputs
— Programmable wait state generator
— 32-bit bidirectional data bus and 24-bit address bus
— Up to six chip selects available
— Byte/write enables (byte strobes)
— Ability to boot from external memories that are 8, 16, or 32 bits wide
•Chip configuration module (CCM)
— System configuration during reset
— Unique part identification number and part revision number
•Reset controller
– Separate reset in and reset out signals
– Five reset sources: power-on reset (POR), external, software, watchdog, PLL loss of lock
– Status flag indication of source of last reset
•General purpose I/O interface
— Up to 94 bits of GPIO for the MCF5328, MCF53281, and MCF5329
— Up to 64 bits of GPIO for the MCF5327
— Bit manipulation supported via set/clear functions
— Unused peripheral pins may be used as extra GPIO
— Programmable drive strength or slew rate control for related group of pins
1.3.1V3 Core Overview
The Version 3 ColdFire processor core consists of two independent pipeline structures decoupled by an
instruction buffer. The four-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 V3 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
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 and
signed fractional operands, as well as 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.
The core also includes a hardware divide unit which performs a number of integer-divide operations. The
supported divide functions include: 32-bit dividend and 16-bit divisor producing a 16-bit quotient and a
1-8Freescale Semiconductor
Page 47
Overview
MCF5329 Reference Manual, Rev 3
16-bit remainder, 32-bit dividend and 32-bit divisor producing a 32-bit quotient, and 32-bit dividend and
32-bit divisor producing a 32-bit remainder.
1.3.2Debug Module
The ColdFire processor core debug interface is provided to support system debugging with low-cost debug
and emulator development tools. Through a standard debug interface, you can access debug information.
This allows the processor and system to be debugged without the need for costly in-circuit emulators.
The on-chip breakpoint resources include a total of nine programmable registers—a pair of upper and
lower address registers, a pair of data registers (a 32-bit data register and a 32-bit data mask register), and
four 32-bit PC registers 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.
T o support program trace, the V3 Coldfire core’s debug module provides processor status (PST[3:0]) and
debug data (DDATA[3:0]) ports. These buses and the PSTCLK output provide execution status, captured
operand data, and branch target addresses defining processor activity at one-half the CPU’s clock rate.
1.3.3JTAG
The device supports circuit board test strategies based on the T est 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 bypass register, a boundary-scan register, and
an 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 implementation can do the following:
•Perform boundary-scan operations to test circuit board electrical continuity
•Sample device system pins during operation and transparently shift out the result in the boundary
scan register
•Bypass the device 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.3.4On-chip Memories
1.3.4.1Cache
The MCF5329 architecture includes a 16-Kbyte unified cache. This four-way, set-associative cache
provides pipelined, single-cycle access on cached instructions and operands.
Freescale Semiconductor1-9
Page 48
Overview
MCF5329 Reference Manual, Rev 3
As with all ColdFire caches, the cache controller implements a non-lockup, streaming design. The use of
processor-local memories decouples performance from external memory speeds and increases available
bandwidth for external devices or the on-chip DMA module.
The cache implements line-fill buffers to optimize 16-byte line burst accesses. Additionally, the cache
supports copyback, write-through, or cache-inhibited modes. A 4-entry , 32-bit buffer is used for cache line
push operations and can be configured for deferred write buffering in write-through or cache-inhibited
modes.
1.3.4.2SRAM
The SRAM module provides a general-purpose 32-Kbyte memory block that the ColdFire core can access
in a single cycle. The memory is ideal for storing critical code or data structures or for use as the system
stack. 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 dual-port SRAM module is also accessible by the DMA, USB host and OTG, LCD, and FEC non-core
bus masters through the crossbar switch. The dual-ported nature of the SRAM makes it ideal for
implementing applications with double-buffer schemes, where the processor and a bus-mastering 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.3.5LCD Controller
The Liquid Crystal Display Controller (LCDC) provides display data for external gray-scale or color LCD
panels. The LCDC is capable of supporting black-and-white, gray-scale, passive-matrix color (passive
color or CSTN), and active-matrix color (active color or TFT) LCD panels. The module also provides a
direct interface to Sharp 240x320 HR-TFT panels.
1.3.6Voice-over-IP (VoIP) System Solution
A fully integrated and tested VoIP software development kit is provided with the MCF53281 device. The
development kit also includes a royalty-free uClinux™ embedded software BSP complete with source
code, GNU tools, kernel, and a broad collection of applications and drivers. This open source BSP is
augmented by a complete take-to-market middleware system that includes certified SIP telephony stack,
audio subsystem with APIs, and advanced device management system.
The product is suitable for applications that require real-time two-way voice communications and control
interfaces, including:
Figure 1-2 illustrates the placement of the VoIP development kit in an embedded system solution.
Overview
Figure 1-2. MCF53281 Embedded VoIP System Solution
1.3.7SDR/DDR SDRAM Controller
The SDRAM controller provides a glueless interface to SDR and DDR SDRAM memory devices. The
module uses a 32-bit (for SDR) or a 16-bit (for DDR) memory port and can address up to 512 MB of data
(256 MB per chip select). The controller supports DDR and SDR SDRAM, but both cannot be used at the
same time.
1.3.8USB Host and OTG Controllers
MCF5329supports two separate USB 2.0 compliant controllers on chip; a host-only core and an
On-The-Go (or dual-role) core. Both controllers support full-speed (12 Mbps) and/or low-speed
(1.5 Mbps) USB data rates via on-chip transceivers (The USB OTG module in device mode does not
support low-speed). The The USB host module and the USB On-The-Go module’s embedded host
controllers are compliant with the EHCI driver model and support directly connected full-speed and
low-speed devices without the need for UHCI/OHCI companion controllers and associated driver stacks.
Both USB controllers contain chaining direct memory access (DMA) engines that reduce interrupt load on
the CPU, thereby reducing total system bus bandwidth utilization.
The USB controllers are compliant with the following industry standards:
•Universal Serial Bus Specification, Revision 2.0
Freescale Semiconductor1-11
Page 50
Overview
MCF5329 Reference Manual, Rev 3
•On-The-Go Supplement to the USB 2.0 Specification, Revision 1.0a
•Enhanced Host Controller Interface (EHCI) Specification for Universal Serial Bus, Revision 1.0
•USB 2.0 Transceiver Macrocell Interface (UTMI) Specification, Version 1.05
1.3.8.1USB Host Controller
The USB host controller is configured for a single port, which can connect to downstream hubs to support
connection of up to 127 devices. The host controller also supports connection to external USB power
control devices for downstream power delivery.
1.3.8.2USB On-the-Go Controller
The second USB controller is programmable to support host, device or On-the-Go operations. The
dual-role feature allows device-to-device connectivity , without the need for a host PC (e.g. digital camera
to photo printer). The OTG module supports high-speed (480 Mbps) operation via an external ULPI
transceiver.
For more details, the following specifications can be found from the ULPI web page at http://www.ulpi.org
The SSI is a full-duplex, serial port that allows the chip to communicate with a variety of serial devices,
including audio codecs, digital signal processors (DSPs), and microprocessors that implement the inter-IC
sound bus standard (I2S) or Intel AC97 standard. SSI typically transfers samples in a periodic manner.
1.3.10Fast Ethernet Controller (FEC)
The device’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.3.11Cryptography Accelerators
The superset device, MCF532973L, incorporates small, fast, dedicated hardware accelerators for random
number generation, message digest and hashing, and the DES, 3DES, and AES block cipher functions.
This allows for the implementation of common Internet security protocol cryptography operations with
performance well in excess of software-only algorithms. Each of the three accelerator modules contains a
DMA option for transferring data.
1-12Freescale Semiconductor
Page 51
Overview
MCF5329 Reference Manual, Rev 3
1.3.12FlexCAN
The FlexCAN module implements the 2.0B CAN protocol that is a commonly used industrial control serial
bus that meets the specific requirements of real-time processing, reliable operation in a harsh EMI
environment, cost-effectiveness, and required bandwidth. FlexCAN has 16 message buffers.
1.3.13UARTs
The device contains three independent, full-duplex UARTs. The three UARTs can be clocked by the
system bus clock, eliminating the need for an externally supplied clock. They can use DMA requests on
transmit-ready and receive-ready as well as interrupt requests for servicing.
1.3.14I2C Bus
The I2C bus is a two-wire, bidirectional serial bus that provides an 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.3.15QSPI
The queued serial peripheral interface module provides a high-speed 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.3.16Pulse Width Modulation (PWM) Timer
The pulse width modulation (PWM) timer generates a synchronous series of pulses having programmable
duty cycle. With a suitable low-pass filter, the PWM can be used as a digital-to-analog converter.
The PWM module has four channels, each having a programmable period and duty cycle as well as a
dedicated counter. A flexible clock select scheme allows a total of four dif ferent clock sources to be used
with the counters. Each of the modulators can create independent continuous waveforms with
software-selectable duty rates from 0% to 100%. The PWM outputs can be programmed as left-aligned
outputs or center-aligned outputs
1.3.17Real Time Clock
The real time clock module has a dedicated 32/32.768/38.4 kHz crystal oscillator and provides the system
with a full clock, capable of interrupting the core once per day, hour, minute, or second. It also contains a
sampling timer which can periodically interrupt the core.
1.3.18DMA Timers (DTIM0-DTIM3)
There are four independent, DMA-transfer-generating 32-bit timers (DTIM[3:0]). 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 DTnIN
Freescale Semiconductor1-13
Page 52
Overview
MCF5329 Reference Manual, Rev 3
signals. If the system clock is selected, it can be divided by 16 or 1. The input clock is further divided by
a user-programmable 8-bit prescaler that clocks the actual timer counter register (TCRn). Each of these
timers can be configured for input-capture or output-compare mode. By configuring the internal registers,
each timer may be configured to assert an external pin, generate an interrupt on a particular event, or cause
a DMA transfer.
1.3.19Software 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.3.20Periodic Interrupt Timers (PIT0–PIT3)
The four periodic interrupt timers (PIT[3:0]) are 16-bit timers that provide precise interrupts at regular
intervals with minimal processor intervention. Each timer can count down from the value written in its PIT
modulus register, or it can be a free-running down-counter.
1.3.21Clock Module and Phase Locked Loop (PLL)
The device contains a 16 MHz crystal oscillator, a phase-locked loop, as well as status and control
registers. The PLL’s output dividers and dithering waveform are register programmable. The system
operates via two main clocks generated by the PLL, typically 240 MHz (core) and 80 MHz (peripherals).
However, two additional clocks are also generated by the PLL for use by the USB and SDRAM controller
modules. To improve noise immunity, the PLL has its own power supply inputs, PLL_VDD and
PLL_VSS. All other circuits are powered by the normal internal supply pins, IVDD (core), EVDD (I/O),
SD_VDD (SDRAM), and VSS.
The PLL circuitry may be bypassed to reduce system speed and decrease power consumption. The external
clock (EXTAL) is used directly, with an optional programmable divider, to produce the internal core and
bus clocks.
1.3.22Interrupt Controllers
There are two interrupt controllers on the MCF5329, which can support up to 126 interrupt sources. Each
interrupt source has a unique interrupt vector, and all sources of a given controller provide a programmable
level (1-7).
1.3.23DMA Controller
The implementation of the DMA is targeted towards cost-sensitive applications while providing a high
level of functionality . The DMA executes in parallel with the core, enabling transfers of data between the
memory and peripherals with little intervention from the core, thus increasing system performance, as well
as simplifying software development. The DMA is capable of performing complex data transfers via 16
programmable DMA channels. The hardware microarchitecture includes the DMA engine (which
1-14Freescale Semiconductor
Page 53
Overview
MCF5329 Reference Manual, Rev 3
performs source/destination address calculations and data movement operations), and a dedicated memory
array containing transfer control descriptors.
1.3.24Fle xBus External Interface
The FlexBus provides an external interface to 8-, 16-, or 32-bit memory devices (SRAM, flash, ROM,
etc.). The FlexBus’ s internal data lines are s hared with the SDRAM controller. When the SDRAMC is in
DDR mode (DRAMSEL = 0) the data bus signals, D[31:16], are dedicated to the SDRAM controller and
the D[15:0] data bus signals are dedicated to the FlexBus. In SDR mode (DRAMSEL = 1), all 32 data lines
are shared between the FlexBus and SDRAM controller.
Features are available to support external flash modules and secondary wait states on reads and writes and
a signal to support active-low address valid (TS). Six 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.3.25Reset Controller Module
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. There are five sources of reset:
•External
•Power-on reset (POR)
•Watchdog timer
•Phase locked-loop (PLL) loss of lock
•Software
External reset on the RSTOUT pin is software-assertable independent of chip reset state. There are also
software-readable status flags indicating the cause of the last reset.
1.3.26GPIO
Unused bus interface and peripheral pins can be used as discrete general-purpose inputs and outputs. These
are managed by a dedicated GPIO module that logically groups all pins into ports located within a
contiguous block of memory-mapped control registers. Each port has registers that configure, monitor , and
control the port pins. Slew rate control or output pad drive strength control is available on all pins.
Most of the pins associated with the FlexBus interface may be used for several different functions. Their
primary function is to provide an external interface to access off-chip resources. When not used for this,
the pins may be used as general-purpose digital I/O pins.
Freescale Semiconductor1-15
Page 54
Overview
MCF5329 Reference Manual, Rev 3
1.4Documentation
Documentation is available from a local Freescale distributor, a Freescale sales office, the Freescale
Literature Distribution Center, or through the Freescale World Wide Web address at
http://www.freescale.com/coldfire.
1-16Freescale Semiconductor
Page 55
Chapter 2
MCF5329 Reference Manual, Rev 3
Signal Descriptions
2.1Introduction
This chapter describes the external signals on the device. 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.
NOTE
The terms assertion and negation are used to avoid confusion when dealing
with a mixture of active-low and active-high signals. The term asserted
indicates that a signal is active, independent of the voltage level. The term
negated indicates that a signal is inactive.
Active-low signals, such as SD_SRAS and TA, are indicated with an
overbar.
2.2Signal Properties Summary
The below table lists the signals grouped by functionality.
NOTE
In this table and throughout this document, a single signal within a group is
designated without square brackets (i.e., A23), while designations for
multiple signals within a group use brackets (i.e., A[23:21]) and is meant to
include all signals within the two bracketed numbers when these numbers
are separated by a colon.
NOTE
The primary functionality of a pin is not necessarily its default functionality .
Pins that are muxed with GPIO default to their GPIO functionality.
Table 2-1. MCF5327/8/9 Signal Information and Muxing
Signal NameGPIOAlternate 1Alternate 2
Reset
RESET
RSTOUT———O
2
———I
MCF53281
MCF5329
256
MAPBGA
Voltage
Domain
MCF5327
196
MAPBGA
J11N15N15
P14P14P14
1
Dir.
EVDD
EVDD
MCF5328
256
MAPBGA
Freescale Semiconductor2-1
Page 56
Signal Descriptions
MCF5329 Reference Manual, Rev 3
Table 2-1. MCF5327/8/9 Signal Information and Muxing (continued)
Signal NameGPIOAlternate 1Alternate 2
Clock
EXTAL———I
2
XTAL
———O
EXTAL32K———I
XTAL32K———O
FB_CLK———O
Mode Selection
2
RCON
———I
DRAMSEL———I
FlexBus
A[23:22]—FB_CS
[5:4]—O
A[21:16]———O
A[15:14]—SD_BA[1:0]
A[13:11]—SD_A[13:11]
3
3
—O
—O
1
Dir.
Voltage
EVDD
EVDD
EVDD
EVDD
SDVDD
EVDD
EVDD
SDVDD
SDVDD
SDVDD
SDVDD
Domain
MCF5327
196
MAPBGA
MCF5328
256
MAPBGA
L14P16P16
K14N16N16
M11P13P13
N11R13R13
L1T2T2
M7M8M8
G11H12H12
B11,C11C13, D13C13, D13
B12, A12,
D11, C12,
B13, A13
E13, A14,
B14, C14,
A15, B15
A14, B14D14, B16D14, B16
C13, C14,
D12
C15, C16,
D15
MCF53281
MCF5329
256
MAPBGA
E13, A14,
B14, C14,
A15, B15
C15, C16,
D15
A10———O
A[9:0]—SD_A[9:0]
D[31:16]—SD_D[31:16]
D[15:1]—FB_D[31:17]
2
D0
BE/BWE
[3:0]PBE[3:0]SD_DQM[3:0]
—FB_D[16]
3
4
4
4
3
—O
—I/O
—I/O
—I/O
—O
OEPBUSCTL3——O
SDVDD
SDVDD
SDVDD
SDVDD
SDVDD
SDVDD
SDVDD
D13D16D16
D14,
E11–14,
F11–F14,
E14–E16,
F13–F16,
G16– G14
E14–E16,
F13–F16,
G16– G14
G14
H3–H1,
J4–J1, K1,
L4, M2, M3,
N1, N2, P1,
P2, N3
F4–F1,
G5–G2, L5,
N4, P4, M5,
N5, P5, L6
M1–M4,
N1–N4, T3,
P4, R4, T4,
N5, P5, R5,
T5
J3–J1,
K4–K1, L2,
R6, N7, P7,
R7, T7, P8,
R8
M1–M4,
N1–N4, T3,
P4, R4, T4,
N5, P5, R5,
T5
J3–J1,
K4–K1, L2,
R6, N7, P7,
R7, T7, P8,
R8
M6T8T8
H4, P3, G1, M4L4, P6, L3, N6L4, P6, L3,
N6
P6R9R9
2-2Freescale Semiconductor
Page 57
Table 2-1. MCF5327/8/9 Signal Information and Muxing (continued)
Table 2-1. MCF5327/8/9 Signal Information and Muxing (continued)
MCF53281
MCF5329
256
MAPBGA
Signal NameGPIOAlternate 1Alternate 2
Voltage
Domain
MCF5327
196
MAPBGA
1
Dir.
MCF5328
256
MAPBGA
USB_VDD—————G10L14L14
VSS—————G6–G9,
H6–H8, P9
G7–G10,
H7–H10,
J7–10,
K7–K10,
L12, L13
G7–G10,
H7–H10,
J7–10,
K7–K10,
L12, L13
PLL_VSS—————H11K13K13
USB_VSS—————H12M14M14
1
Refers to pin’s primary function.
2
Pull-up enabled internally on this signal for this mode.
3
The SDRAM functions of these signals are not programmable by the user. They are dynamically switched b y the processor
when accessing SDRAM memory space and are included he re for completeness.
4
Primary functionality selected by asserting the DRAMSEL signal (SDR mode). Alternate functionality selected by negating
the DRAMSEL signal (DDR mode). The GPIO module is not responsible for assigning these pins.
5
GPIO functionality is determined by the edge port module. The GPIO module is only responsible for assigning the alternate
functions.
6
If JTAG_EN is asserted, these pins default to Alternate 1 (JTAG) functionality. The GPIO module is not responsible for
assigning these pins.
7
Pull-down enabled internally on this signal for this mode.
8
Must be left floating for proper operation of the PLL.
2.2.1Internal Pull-up/Pull-downs Resistors
The following table summarizes which external signals contain internal pull-up or pull-down resistors.
Table 2-2. Internal Pull-up/down Resistors
Pin NamePull-UpPull-DownComment
RESET
TESTxAlways, except JTAG mode
RCONxAlways, except JTAG mode
XTALxWhen not in crystal oscillator mode (intended for
I2C_SDAxI2C mode only (I2C_SDA)
I2C_SCLxI2C mode only (I2C_SCL)
DT0INxWhen used as DREQ0
U1RXDxxWhen used as SSI_RXD, configured by the MISCCR
U1TXDxxWhen used as SSI_TXD, configured by the MISCCR
SSI_RXDxxSSI mode only . Configured b y the MISCCR register in
SSI_TXDxxSSI mode only. Configured by the MISCCR register in
C mode only (I2C_SDA)
2
C mode only (I2C_SCL)
register in the CCM
register in the CCM
the CCM
the CCM
JTAG_ENx
TDIxJTAG mode only
TMSxJTAG mode only
TRST
TCLKxJTAG mode only
D0xDuring reset only
xJTAG mode only
2.3Signal Primary Functions
2.3.1Reset Signals
Table 2-3 describes signals that are used to reset the chip or as a reset indication.
Table 2-3. Reset Sign als
Signal NameAbbreviationFunctionI/O
Reset InRESETPrimary reset input to the device. Asserting RESET immediately resets
the core and peripherals, which stay in reset until RESET
Reset OutRSTOUTReset output (RSTOUT) is an indicator that the chip is in reset.
RSTOUT
internal or external reset.
is driven low for 512 FB_CLK clock cycles in response to any
is negated.
I
O
2.3.2PLL and Clock Signals
Table 2-4 describes signals that are used to support the on-chip clock generation circuitry.
Freescale Semiconductor2-9
Page 64
Signal Descriptions
MCF5329 Reference Manual, Rev 3
Signal NameAbbreviationFunctionI/O
Table 2-4. PLL and Clock Signals
External Clock InEXTALAlways driven by an external clock input except when used as a
connection to the external crystal when the internal oscillator circuit is
used. The clock source may be configured during reset by asserting
. See Chapter 9, “Chip Configuration Module (CCM)” for more
RCON
details.
CrystalXTALUsed as a connection to the external crystal when the internal
oscillator circuit is used to drive the crystal.
32 kHz External Clock InEXTAL32K32 kHz crystal input clock for the real time clock.I
32 kHz CrystalXTAL32KOscillator output to EXTAL 32kHz crystal.O
USB Clock InUSBCLKINAllows the user to drive the reference clock to the USB modules,
instead of the clock being generated internally by the PLL. This pin
should only be driven with a 60 MHz clock. When using the ULPI USB
interface , this pin becomes the ULPI input clock.
SSI Clock InSSICLKINAllows the user to drive a specific clock frequency to the SSI module,
instead of using the internally generated clock.
FlexBus Clock OutFB_CLKReflects the internal bus clock (or one-third the core/system clock).
)
(f
sys/3
2.3.3Mode Selection
Table 2-5 describes signals used in mode selection.
I
O
I
I
O
Table 2-5. Mode Selection Signals
Signal NameAbbreviationFunctionI/O
Reset ConfigurationRCONIndicates whether the external D[15:0] pi n states affect chip
configuration at reset.
SDR/DDR SDRAM
Select
DRAMSELControls whether certain pins act as FlexBus or SDRAMC signals.
When asserted, D[31:0] dynamically switches between SDR data and
FlexBus data. When negated, D[31:16] are dedicated for DDR data
while D[15:0] are dedicated for FlexBus data.
I
I
2-10Freescale Semiconductor
Page 65
2.3.4FlexBus Signals
MCF5329 Reference Manual, Rev 3
Table 2-6 describes signals that are used for doing transactions on the external bus.
Table 2-6. FlexBus Si gnals
Signal NameAbbreviationFunctionI/O
Signal Descriptions
Address BusA[23:0]The 24 dedicated address signals define the address of external byte,
word, and longword accesses. These three-state outputs are the 24
lsbs of the internal 32-bit address bus and multiplexed with the
SDRAM controller row and column addresses.
Data BusD[31:0]These three-state bidirectional signals provide the general purpose
data path between the processor and all other devices.
Byte EnablesBW/BWE
Output EnableOE
[3:0] Define the flow of data on the data bus. During peripheral accesses,
these output signals indicate that data is to be latched or driven onto
a byte of the data when driven low. The BE/BWE[3:0] signals are
asserted only to the memory bytes used during a read or write access.
BE/BWE
and BE/BWE3 controls access to the least significant byte lane of
data.
For SRAM or Flash devices , the BE/BWE
connected to individual byte strobe signals.
The BE/BWE
peripherals, but not to on-chip SRAM or cache. During SDRAM
accesses, these signals act as the SD_DQM[3:0] signals, which
indicate a byte transfer between SDRAM and the chip when driven
high. See Table 2-7 for more details.
Indicates when an external device can drive data during external read
cycles.
0 controls access to the most significant byte lane of data,
n outputs should be
n signals are asserted during accesses to on-chip
O
I/O
O
O
Transfer AcknowledgeTAIndicates that the external data transfer is complete. During a read
cycle, when the processor recognizes TA, it latches the data and then
terminates the bus cycle. During a write cycle, when the processor
recognizes TA
Read/WriteR/W
Transfer StartTS
Chip SelectsFB_CS[5:0]These output signals select external devices for external bus
Indicates the direction of the data transfer on the bus for SRAM (R/W )
accesses. A logic 1 indicates a read from a slave de vice and a logic 0
indicates a write to a slave device.
Bus control output signal indicating the start of a transfer.O
transactions.
, the bus cycle is terminated.
I
O
O
Freescale Semiconductor2-11
Page 66
Signal Descriptions
MCF5329 Reference Manual, Rev 3
2.3.5SDRAM Controller Signals
Table 2-7 describes signals that are used for SDRAM accesses.
Table 2-7. SDRAM Controller Signals
Signal NameAbbreviationFunctionI/O
SDRAM A10SD_A10Bit 10 of the SDRAM Address busO
SDRAM Clock EnableSD_CKESDRAM clock enable.O
DDR SDRAM ClockSD_CLKOutput clock for DDR SDRAM.O
DDR SDRAM ClockSD_CLKInverted output clock for DDR SDRAM.O
SDRAM Chip SelectsSD_CS[1:0]SDRAM chip select signals.O
DDR SDRAM Data Strobes SD_DQS[3:2]Indicates when valid data is on the data bus. SD_DQS1 is tied to
SD_DQS3 and SD_DQS0 is tied to SD_DQS2 internally.
SDR SDRAM Write Data
Byte Mask
SDRAM Synchronous
Column Address Strobe
SDRAM Synchronous Row
Address Strobe
SDR SDRAM Data StrobeSD_SDRDQS Generated by the memory controller in SDR mode, to mimic the DQS
SDRAM Write EnableSD_WE
SD_DQM[3:0] Used to determine which byte lanes of the data bus should be latched
during a write cycle. These pins are multiplexed with the BE/BWE
pins.
The SD_DQMn should be connected to individual SDRAM DQM
signals. Most SDRAMs associate DQM3 with the MSB, in which case
SD_DQM3 should be connected to the SDRAM's DQM3 input.
SD_SCAS
SD_SRASSDRAM synchronous row address strobe.O
SDRAM synchronous column address strobe.O
generated by DDR memories during reads. It is routed out and
connected back to SD_DQS inputs.
Indicates the direction of the data transfer on the bus for SDRAM
accesses. A logic 1 indicates a read from a slave device and a logic 0
indicates a write to a slave device.
2.3.6External Interrupt Signals
Table 2-8 describes the external interrupt signals.
Line DataLCD_D[17:0]LCD data bus.O
First Line Marker/
Vertical Sync
Line Pulse/
Horizontal Sync
Shift ClockLCD_LSCLKClock for latching data into the display driver’s interna l shift register.O
Alt. Crystal Direction/
Output Enable
ContrastLCD_CONTRAST Controls the LCD bias voltage for contrast control.O
Power SaveLCD_PSControls signal output for source driver (Sharp HR-TFT 240x320 panels
LCD_FLM/
LCD_VSYNC
LCD_LP/
LCD_HSYNC
LCD_ACD/
LCD_OE
Passive matrix: First line marker
Active matrix: Vertical sync pulse. Indicates start of next frame.
Passive matrix: Line pulse
Active matrix: Horizontal sync pulse. Indicates start of next line.
Passive matrix: Alternate crystal direction
Active matrix: Output enable to enable data to be shifted onto the display.
only)
O
O
O
O
Gate Driver Clock
Signal
Reverse ControlLCD_REVSignal for common electrode driving signal preparation (Sharp HR-TFT
Sampling Start Signal LCD_SPL_SPRSets the horizontal scan direction (Sharp HR-TFT 240x3 20 panels only).O
LCD_CLSStart signal output for gate driver, inverted version of LCD_PS (Sharp
HR-TFT 240x320 panels only).
240x320 panels only).
2.3.9Ethernet Module (FEC ) Signals
The following signals are used by the Ethernet module for data and clock signals.
Table 2-11. Ethernet Module (FEC) Signals
Signal NameAb breviationFunctionI/O
Management DataFEC_MDIOTransfers control information between the external PHY and the
media-access controller. Data is synchronous to FEC_MDC. Applies
to MII mode operation. This signal is an input after reset. When the
FEC is operated in 10Mbps 7-wire interface mode, this signal should
be connected to VSS.
Management Data
Clock
FEC_MDCIn Ethernet mode, FEC_MDC is an output clock which provides a
timing reference to the PHY for data transfers on the FEC_MDIO
signal. Applies to MII mode operation.
CollisionFEC_COLAsserted upon detection of a collision and remains asserted while the
collision persists. This signal is not defined for full-duplex mode.
Carrier Receive Sense FEC_CRSWhen asserted, indicates that transmit or receive medium is not idle.
Applies to MII mode operation.
Transmit ClockFEC_TXCLKInput clock which provides a timing reference for FEC_TXEN,
FEC_TXD[3:0] and FEC_TXER
Transmit EnableFEC_TXENIndicates when valid nibbles are present on the MII. This signal is
asserted with the first nibble of a preamble and is negated before the
first FEC_TXCLK following the final nibble of the frame.
Transmit Data 0FEC_TXD0FEC_TXD0 is the serial output Ethernet data and is only valid during
the assertion of FEC_TXEN. This signal is used for 10-Mbps Ethernet
data. It is also used for MII mode data in conjunction with
FEC_TXD[3:1].
Transmit Data 1–3FEC_TXD[3:1] In Ethernet mode, these pins contain the serial output Ethernet data
and are valid only during assertion of FEC_TXEN in MII mode.
T ransmit ErrorFEC_TXERIn Ethernet mode, when FEC_TXER is asserted for one or more clock
cycles while FEC_TXEN is also asserted, the PHY sends one or more
illegal symbols. FEC_TXER has no effect at 10 Mbps or when
FEC_TXEN is negated. Applies to MII mode operation.
Receive ClockFEC_RXCLKProvides a timing reference for FEC_RXDV, FEC_RXD[3:0], and
FEC_RXER.
Receive Data ValidFEC_RXDVAsserting the FEC_RXDV input indicates that the PHY has valid
nibbles present on the MII. FEC_RXD V should remain asserted from
the first recovered nibble of the frame through to the last nibble.
Assertion of FEC_RXDV must start no later than the SFD and exclude
any EOF.
I
I
I
O
O
O
O
I
I
Receive Data 0FEC_RXD0FEC_RXD0 is the Ethernet input data transferred f rom the PHY to the
media-access controller when FEC_RXDV is asserted. This signal is
used for 10-Mbps Ethernet data. This signal is also used for MII mode
Ethernet data in conjunction with FEC_RXD[3:1].
Receive Data 1–3FEC_RXD[3:1] In Ethernet mode, these pins contain the Ethernet input data
transferred from the PHY to the media access controller when
FEC_RXDV is asserted in MII mode operation.
Receive ErrorFEC_RXERIn Ethernet mode, FEC_RXER—when asserted with
FEC_RXDV—indicates that the PHY has detected an error in the
current frame. When FEC_RXDV is not asserted FEC_RXER has no
effect. Applies to MII mode operation.
I
I
I
2.3.10I2C I/O Signals
Table 2-12 describes the I2C serial interface module signals.
2-14Freescale Semiconductor
Page 69
Table 2-12. I2C I/O Signals
MCF5329 Reference Manual, Rev 3
Signal NameAbbreviationFunctionI/O
2
Serial ClockI2C_SCLOpen-drain clock signal for the I
module when the bus is in the master mode or it becomes the clock
input when the I
Serial DataI2C_SDAOpen-drain signal that serves as the data input/output for the I
interface.
2
C is in the slave mode.
C interface. It is driven by the I2C
2
2.3.11FlexCAN Signals
Table 2-13 describes the FlexCAN module signals.
Table 2-13. FlexCAN Signals
Signal NameAbbreviationFunctionI/O
FlexCAN TransmitCANTXController area network transmit data output.O
FlexCAN ReceiveCANRXController area network receive data input.I
2.3.12Queued Serial Peripheral Interface (QSPI)
Signal Descriptions
I/O
C
I/O
Table 2-14 describes QSPI signals.
Table 2-14. Queued Serial Peripheral Interface (QSPI) Signals
Signal NameAbbreviationFunctionI/O
QSPI Syncrhonous
Serial Output
QSPI Synchronous
Serial Data Input
QSPI Serial ClockQSPI_CLKProvides the serial clock from the QSPI. The polarity and phase of
Synchronous Peripheral
Chip Selects
QSPI_DOUTProvides the serial data from the QSPI and can be programmed to be
driven on the rising or falling edge of QSPI_CLK. Each byte is sent
msb first.
QSPI_DINProvides the serial data to the QSPI and can be programmed to be
sampled on the rising or falling edge of QSPI_CLK. Each byte is
written to RAM lsb first.
QSPI_CLK are programmable. The output frequency is programmed
according to the following formula, in which n can be any value
between 1 and 255:
SPI_CLK = f
QSPI_CS[2:0] Provide QSPI peripheral chip selects that can be programmed to be
active high or low.
sys/3
÷ (2 × n)
2.3.13Synchronous Serial Interface (SSI) Signals
The SSI module uses the signals in this section.
O
I
O
O
Freescale Semiconductor2-15
Page 70
Signal Descriptions
MCF5329 Reference Manual, Rev 3
Signal NameAbbreviationFunctionI/O
Table 2-15. SSI Module Signals
Serial ClockSSI_CLKUsed by the receive and transmit blocks. In gated clock mode,
SSI_CLK is only valid during the transmission of data, otherwise it is
pulled to an inactive state.
Serial Frame SyncSSI_FSUsed by transmitter/receiver to synchronize the transfer of data. In
gated clock mode, this signal is not used. When configured as an
input, the external device should drive SSI_FS during the riding edge
of SSI_CLK.
Serial Receive DataSSI_RXDReceives data into the receive data shift registerI
Serial Transmit DataSSI_TXDTransmits data from the serial transmit shift register. O
I/O
I/O
2.3.14Universal Serial Bus (USB) Signals
The following table describes the signals for the USB module.
Table 2-16. USB Module Signals
Signal NameAbbreviationFunctionI/O
On-the-Go D-USBOTG_DMD- output of the dual-speed transceiver for the On-the-Go module.O
On-the-Go D+USBOTG_DPD+ output of the dual-speed transceiver for the On-the-Go module.O
On-the-Go EnableUSBOTG_PU_ENEnables an external pull-up on the USBOTG_DP line. This signal is
controlled by the UOCSR[BVLD] bit.
Host D-USBHOST_DMD- output of the dual-speed transceiver for the USB Host module.O
O
Host D+USBHOST_DPD+ output of the dual-speed transceiver for the USB Host module.O
Host VBUS EnableUSBHOST_VBUS_ENEnables off-chip VBUS charge pumpO
Host VBUS over-current USBHOST_VBUS_OCIndicates to the processor that a short has occurred on the USB
data bus.
ULPI Data BusULPI_DATA[7:0]Data bus for the ULPI interface, which is synchronous to
USBCLKIN/ULPI_CLK.
ULPI Data Bus
Direction
ULPI Stop DataULPI_STPSynchronous to USBCLKIN
ULPI Next DataULPI_NXTSynchronous to USBCLKIN
ULPI On-Chip ClockULPI_CLK60MHz clock which is generated on-chipO
USB Off-Chip ClockUSBCLKINSee Section 2.3.2, “PLL and Clock Signals”I
ULPI_DIRIndicates direction of the ULPI data bus., which is synchronous to
USBCLKIN/ULPI_CLK
2.3.15Pulse Width Modulation (PWM) Module Signals
The following table describes the signals for the PWM module.
I
I/O
I
2-16Freescale Semiconductor
Page 71
Signal Descriptions
MCF5329 Reference Manual, Rev 3
Table 2-17. PWM Module Signals
Signal NameAbbreviationFunctionI/O
PWM7 OutputPWM7Wavef orm output for channel 7 of the PWM module. Also functions as
an input for the emergency shutdown feature of the PWM.
PWM[5,3,1,0] OutputsPWM[5,3,1,0]Waveform output for channels 5, 3, 1, and 0 respectively.O
I/O
2.3.16UART Module Signals
Table 2-18 describes the signals of the three UAR T modules, where n=0–2. Baud rate clock inputs are not
supported.
Table 2-18. UART Module Signals
Signal NameAbbreviationFunctionI/O
Transmit Serial Data
Output
Receive Serial Data
Input
Clear-to-SendU
Request-to-SendUnRTSAutomatic request-to-send outputs from the UART modules. They ma y
UnTXDT ransmitter serial data outputs. Data is shifted out lsb first on this pin at
the falling edge of the serial clock source. The output is held high when
the transmitter is disabled, idle, or in local loopback mode.
UnRXDReceiver serial data inputs. Data is sampled on the rising edge of the
serial clock source lsb first. When the UART clock is stopped for
power-down mode, any transition on this pin restarts it.
nCTSIndicates that the UART modules can begin data transmissionI
also be asserted and negated as a functio n of the receive FIFO level.
O
I
O
2.3.17DMA Timer Signals
Table 2-19 describes the signals of the four DMA timer modules, where n=0–3.
Table 2-19. DMA Timer Signals
Signal NameAbbreviationFunctionI/O
DMA Timer n InputDTnINCan be programmed to cause events to occur in the respective timer .
It can clock the event counter or provide a trigger to the timer value
capture logic.
DMA Timer n OutputDTnOUTThe output from the respective timer.O
I
2.3.18Debug Support Signals
These signals are used as the interface to the on-chip JT AG controller and the BDM logic. Pin functionality
between JTAG and BDM is dependent upon the JTAG_EN pin.
Freescale Semiconductor2-17
Page 72
Signal Descriptions
MCF5329 Reference Manual, Rev 3
Signal NameAbbreviationFunctionI/O
Table 2-20. Debug Support Signals
Test ResetTRST
This active-low signal is used to initialize the JTAG logic
asynchronously.
Test ClockTCLKUsed to synchronize the JTAG logic.I
Test Mode SelectTMSUsed to sequence the JTAG state machine. TMS is sampled on the
rising edge of TCLK.
T est Data InputTDISerial input for test instructions and data. TDI is sampled on the rising
edge of TCLK.
T est Data OutputTDOSerial output for test instructions and data. TDO is three-stateable and
is actively driven in the shift-IR and shift-DR controller states. TDO
changes on the falling edge of TCLK.
Development Serial
Clock
BreakpointBKPT
Development Serial
Input
Development Serial
Output
DSCLKClocks the serial communication port to the BDM module during
packet transfers.
Used to request a manual breakpoint.I
DSIThis internally-synchronized signal provides data input for the serial
communication port to the BDM module.
DSOThis internally-registered signal provides serial output communication
for BDM module responses.
Processor Status Clock PSTCLKUsed by the development system to known when to sample the
DDATA and PST signals.
Debug DataDDAT A[3:0]Display captured processor data and breakpoint status. The PSTCLK
signal can be used by the development system to know when to
sample DDATA[3:0].
I
I
I
O
I
I
O
O
O
Processor Status
Outputs
PST[3:0]Indicate core status, as shown in Table 2-21. Debug mode timing is
synchronous with the processor clock; status is unrelated to the
current bus transfer. The PSTCLK signal can be used by the
development system to know when to sample PST[3:0].
Table 2-21. Processor Status
PST[3:0]Processor Status
0000Continue execution
0001Begin execution of one instruction
0010Reserved
0011Entry into user mode
0100Begin execution of PULSE and WDDATA instructions
0101Begin execution of taken branch
0110Reserved
0111Begin execution of RTE instruction
1000Begin one-byte transfer on DDATA
O
2-18Freescale Semiconductor
Page 73
Table 2-21. Processor Status (continued)
MCF5329 Reference Manual, Rev 3
PST[3:0]Processor Status
1001Begin two-byte transfer on DDATA
1010Begin three-byte transfer on DDATA
1011Begin four-byte transfer on DDATA
1100Exception processing
1101Reserved
1110Processor is stopped
1111Processor is halted
2.3.19Test Signals
Table 2-22 describes test signals which are reserved for factory testing.
Table 2-22. Test Signals
Signal NameAbbreviationFunctionI/O
Signal Descriptions
TestTESTReserved for factory testing only and in normal modes of operation
should be connected to VSS to prevent unintentional activation of test
functions.
PLL TestPLL_TESTReserved for factory testing only and should be treated as a
no-connect (NC).
I
O
2.3.20Power and Ground Pins
The pins described in Table 2-23 provide system power and ground to the chip. Multiple pins are provided
for adequate current capability. All power supply pins must have adequate bypass capacitance for
high-frequency noise suppression.
Table 2-23. Power and Ground Pins
Signal NameAbbreviationFunctionI/O
PLL Analog SupplyPLL_VDD
PLL_VSS
Positiv e I/O SupplyEVDDThese pins supply positive power to the I/O pads
Positive Core SupplyIVDDThese pins supply positive power to the core logic.—
SDRAMC SupplySD_VDDThese pins supply positive power to the SDRAM controller.—
USB SupplyUSB_VDDThese pins supply positive power to the USB controllers.—
Dedicated power supply signals to isolate the sensitive PLL analog
(VCO) circuitry from the nor mal levels of noise present on the digital
power supply.
.—
—
USB GroundUSB_VSSThese pins are the negative supply (ground) for the USB controllers.—
GroundVSSThese pins are the negative supply (ground) for the device.—
Freescale Semiconductor2-19
Page 74
Signal Descriptions
MCF5329 Reference Manual, Rev 3
2.4External Boot Mode
After reset, the address bus, data bus, FlexBus control signals, and SDRAM control signals default to their
bus functionalities. All other signals default to GPIO inputs (if applicable).
2-20Freescale Semiconductor
Page 75
Chapter 3
MCF5329 Reference Manual, Rev 3
ColdFire Core
3.1Introduction
This section describes the organization of the Version 3 (V3) ColdFire® processor core and an overview
of the program-visible registers. For detailed information on instructions, see the ISA_A+ definition in the
ColdFire Family Programmer’s Reference Manual. The V3 ColdFire core emphasizes operating
frequency and system performance and provides backward object file compatibility to the Version 2 (V2)
ColdFire core. It is a step on the ColdFire core roadmap of providing higher performance embedded
microprocessors. Specific enhancements include a 4-stage instruction fetch pipeline (IFP) with an 8-entry
instruction buffer and change-of-flow acceleration, a 2-stage pipeline local bus structure, and a 4-way
set-associative unified cache design supporting copyback and write-through modes of operation.
3.1.1Overview
As with all ColdFire cores, the V3 ColdFire core is comprised of two separate pipelines decoupled by an
instruction buffer.
Freescale Semiconductor3-1
Page 76
ColdFire Core
Instruction
Instruction
FIFO
Decode & Select,
Address
Instruction
Operand
Data[31:0]
Instruction
Fetch Cycle 2
Instruction
Pipeline
Execution
Fetch
Pipeline
IAG
IC1
IC2
IED
IB
DSOC
AGEX
Address [31:0]
Instruction Buffer
Address
Generation
Fetch Cycle 1
Early Decode
Generation,
Execute
Operand Fetch
MCF5329 Reference Manual, Rev 3
The instruction fetch pipeline (IFP) is a four-stage pipeline for prefetching instructions. The prefetched
instruction stream is then gated into the two-stage operand execution pipeline (OEP), which decodes the
Figure 3-1. V3 ColdFire Core Pipelines
instruction, fetches the required operands and then executes the required function. Because the IFP and
OEP pipelines are decoupled by an instruction buffer serving 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 V3 ColdFire core pipeline stages include the following:
— Instruction address generation (IAG) — Calculates the next prefetch address
— Instruction fetch cycle 1 (IC1) — Prefetch on the processor’s local bus
— Instruction fetch cycle 2 (IC2) — Completes prefetch on the processor’s local bus
— Instruction early decode (IED) — Generates time-critical decode signals needed for the OEP
— Instruction buffer (IB) — Optional buffer stage minimizes fetch latency effects using FIFO
queue
3-2Freescale Semiconductor
Page 77
ColdFire Core
MCF5329 Reference Manual, Rev 3
•Two-stage operand execution pipeline (OEP)
— Decode and select/operand fetch cycle (DSOC)—Decodes instructions and fetches the
required components for effective address calculation, or the operand fetch cycle
— Address generation/execute cycle (AGEX)—Calculates operand address or executes the
instruction
When the instruction buffer is empty, opcodes are loaded directly from the IED cycle into the operand
execution pipeline. If the buffer is not empty, the IFP stores the contents of the fetched instruction and its
early decode informration in the IB until it is required by the OEP.
For register-to-register and register-to-memory store operations, the instruction passes through both OEP
stages once. For memory-to-register and read-modify-write memory operations, an instruction is
effectively staged through the OEP twice: the first time to calculate the effective address and initiate the
operand fetch on the processor’s local bus, and the second time to complete the operand reference and
perform the required function defined by the instruction.
The V3 ColdFire core’s instruction buffer is or ganized differently than the V2 ColdFire core’ s. One of the
time-critical decode fields provided by the early-decode stage of the IFP is the instruction length. By
knowing the length of the prefetched instructions, the IED field can package the fetched data into machine
instructions and load them into the FIFO instruction buffer in that form. This approach greatly simplifies
and accelerates the OEP read logic. As one instruction is completed in the OEP, the next
instruction—regardless of instruction length—is read from the next sequential buffer location and loaded
into the instruction registers.
The resulting pipeline and local bus structure allow the V3 ColdFire core to deliver sustained high
performance across a variety of demanding embedded applications.
3.1.1.1Change-of-Flow Acceleration
Because the IFP and OEP are decoupled by the instruction buffer, the increased depth of the IFP is
generally hidden from the OEP’s inst ruction execution. However , for change-of-flow instructions, such as
unconditional branches or jumps, subroutine calls, taken conditional branches, the increased IFP depth is
fully exposed. T o minimize the effects of this increased depth, a logic module dedicated to change-of-flow
acceleration was developed for the IED stage of the IFP.
The basic premise of the V3 ColdFire core’s branch acceleration is to detect certain types of
change-of-flow instructions, calculate their target instruction address, and immediately begin fetching
down the target stream. By allowing the IFP to manage switching of the prefetch stream without OEP
intervention, typical execution time is greatly improved.
For example, consider a PC-relative unconditional branch using the BRA instruction. The branch
acceleration logic searches the prefetch stream for this type of opcode. After encountered, the acceleration
logic calculates the target address by summing the current instruction prefetch address with a displacement
contained in the instruction. This detection and calculation of the target address occurs in the IED stage of
the BRA prefetch. The target address is then immediately fed back into the IAG stage, causing the current
prefetch stream to be discarded and establishing a new stream at the target address. Given that the two
pipelines are decoupled, in many cases, the target instruction is available to the OEP immediately after the
BRA instruction, making its execution time appear as a single cycle.
Freescale Semiconductor3-3
Page 78
ColdFire Core
(described fully in Chapter 4, “Enhanced Multiply-Accumulate Unit (EMAC
•One 32-bit memory base address register (RAMBAR)
MCF5329 Reference Manual, Rev 3
The acceleration logic uses a static prediction algorithm when processing conditional branch (Bcc)
instructions. The default prediction scheme is as follows: forward Bcc instructions are predicted as not
taken, while backward Bcc opcodes are predicted as taken. A user-mode bit in the condition control
register, CCR[P], supports altering the prediction dynamically for forward Bcc instructions. See
Section 3.2.4, “Condition Code Register (CCR).”
Depending on the run-time characteristics of an application, processor performance may be increased
significantly by setting or clearing this configuration bit. Section 3.3.5.7, “Branch Instruction Execution
Times,” gives details on individual instruction performance.
3.2Memory Map/Register Description
The following sections describe the processor registers in the user and supervisor programming models.
The programming model is selected based on the processor privilege level (user mode or supervisor mode)
as defined by the S bit of the status register (SR). Table 3-1 lists the processor registers.
The user-programming model consists of 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.
— 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)
The supervisor programming model is to be used only by system control software 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)
•32-bit access control registers (ACR0, ACR1)
3-4Freescale Semiconductor
Page 79
Table 3-1. ColdFire Core Programming Model
MCF5329 Reference Manual, Rev 3
ColdFire Core
BDM
1
Register
Width
(bits)
AccessReset Value
Written with
MOVEC
Supervisor/User Access Registers
Load: 0x080
Data Register 0 (D0)32R/W0xCF30_60No3.2.1/3-6
Store: 0x180
Load: 0x081
Data Register 1 (D1)32R/W0x0000_0670No3.2.1/3-6
Store: 0x181
Load: 0x082–7
Data Register 2–7 (D2–D7)32R/WUndefinedNo3.2.1/3-6
0x804MAC Status Register (MACSR)32R/W0x0000_0000No4.2.1/4-3
0x805MAC Address Mask Register (MASK)32R/W0xFFFF_FFFFNo4.2.2/4-5
0x806, 0x809,
MAC Accumulators 0–3 (ACC0–3)32R/WUndefinedNo4.2.3/4-6
0x80A, 0x80B
0x807MAC Accumulator 0,1 Exten si on By te s
32R/WUndefinedNo4.2.4/4-7
(ACCext01)
Section/Page
0x808MAC Accumulator 2,3 Exten si on By te s
32R/WUndefinedNo4.2.4/4-7
(ACCext23)
0x80ECondition Code Register (CCR)8R/WUndefinedNo3.2.4/3-7
0x80FProgram Counter (PC)32R/WContents of
No3.2.5/3-8
location
0x0000_0004
Supervisor Access Only Registers
0x002Cache Control Register (CACR)32R/W0x0000_0000Yes3.2.6/3-8
0x004–5Access Control Register 0–1 (ACR0–1)32R/WSee SectionYes3.2.7/3-9
0x800User/Supervisor A7 Stack Pointer
(OTHER_A7)
32R/WContents of
location
No3.2.3/3-6
0x0000_0000
0x801Vector Base Register (VBR)32R/W0x0000_0000Y es3.2.8/3-9
0x80EStatus Register (SR)16R/W0x27--No3.2.9/3-9
0xC05RAM Base Address Register (RAMBAR)32R/WSee SectionYes3.2.10/3-10
1
The values listed in this column represent the Rc field used when accessing the core registers via the BDM port. For more
information see Chapter 36, “Debug Module”.
Freescale Semiconductor3-5
Page 80
ColdFire Core
MCF5329 Reference Manual, Rev 3
3.2.1Data Registers (D0–D7)
D0–D7 data registers are for bit (1-bit), byte (8-bit), word (16-bit) and longword (32-bit) operations; they
can also be used as index registers.
NOTE
Registers D0 and D1 contain hardware configuration details after reset. See
Section 3.3.4.15, “Reset Exception” for more details.
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.
3.2.3Supervisor/User Stack Pointers (A7 and OTHER_A7)
This ColdFire 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
program-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
3-6Freescale Semiconductor
Page 81
ColdFire Core
MCF5329 Reference Manual, Rev 3
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 a single stack
pointer (A7), defined for ColdFire ISA_A, is available. EUSP is cleared at reset.
To support dual stack pointers, the following two supervisor instructions are included in 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. All other
instruction references to the stack pointer, explicit or implicit, access the active A7 register.
NOTE
The SSP is loaded during reset exception processing with the contents of
location 0x0000_0000.
Figure 3-4. Stack Pointer Registers (A7 and OTHER_A7)
Access: A7: User or BDM read/write
OTHER_A7: Supervisor or BDM read/write
3.2.4Condition Code Register (CCR)
The CCR is the LSB of the processor status register (SR). Bits 4–0 act as indicator flags for results
generated by processor operations. The extend bit (X) is also an input operand during multiprecision
arithmetic computations. The CCR register must be explicitly loaded after reset and before any compare
(CMP), Bcc, or Scc instructions are executed.
BDM: LSB of Status Register (SR)Access: User read/write
BDM read/write
76543210
R
P
W
00
XNZVC
Reset:0 0 0—————
Freescale Semiconductor3-7
Figure 3-5. Condition Code Register (CCR)
Page 82
ColdFire Core
MCF5329 Reference Manual, Rev 3
Table 3-2. CCR Field Descriptions
FieldDescription
7
Branch prediction bit. Alters the static prediction algorithm used by the branch acceleration logic in the IFP on forward
P
conditional branches.
0 Predicit ed as no t ta ken.
1 Predicted as taken.
6–5Reserved, must be cleared.
4
Extend condition code bit. Set to the C-bit value for arithmetic operations; otherwise not affected or set to a specified
X
result.
3
Negative condition code bit. Set if most significant bit of the result is set; otherwise cleared.
N
2
Zero condition code bit. Set if result equals zero; otherwise cleared.
Z
1
Overflow condition code bit. Set if an arithmetic overflow occurs implying the result cannot be represented in operand
V
size; otherwise cleared.
0
Carry condition code bit. Set if a carry out of the operand msb occurs for an addition or if a borrow occurs in a
C
subtraction; otherwise cleared.
3.2.5Program Counter (PC)
The PC contains the currently executing instruction address. During instruction execution and exception
processing, the processor automatically increments contents of the PC or places a new value in the PC, as
appropriate. The PC is a base address for PC-relative operand addressing.
The PC is initially loaded during reset exception processing with the contents of location 0x0000_0004.
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 5.2.1, “Cache Control Register (CACR).”
3-8Freescale Semiconductor
Page 83
ColdFire Core
MCF5329 Reference Manual, Rev 3
3.2.7Access Control Registers (ACRn)
The access control registers define attributes for user-defined memory regions. These attributes include the
definition of cache mode, write protect, and buffer write enables. The ACRs are described in Section 5.2.2,
“Access Control Registers (ACR0–ACR1).”
3.2.8Vector 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.
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 (CCR) are
accessible. 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. The lower byte of the SR (the CCR) must be loaded explicitly after reset and
before any compare (CMP), Bcc, or Scc instructions execute.
BDM: 0x80E (SR)Access: Supervisor read/write
BDM read/write
System ByteCondition Code Register (CCR)
1514131211109876543210
R
W
Reset00100111000—————
FieldDescription
0
T
SM
0
Figure 3-8. Status Register (SR)
Table 3-3. SR Field Descriptions
IP
00
XNZVC
15
Trace enable. When set, the processor performs a trace exception after every instruction.
T
14Reserved, must be cleared.
Freescale Semiconductor3-9
Page 84
ColdFire Core
3.2.10Memory Base Address Register (RAMBAR)
The memory base address register is used to specify the base address of the internal SRAM module and
indicates the types of references mapped to it. The base address register includes a base address,
write-protect bit, address space mask bits, and an enable bit. RAMBAR determines the base address of
the on-chip RAM. For more information, refer to Section 6.2.1, “SRAM Base Address Register
Master/interrupt state. Bit is cleared by an interrupt exception and software can set it during execution of the RTE or
move to SR instructions.
11Reserved, must be cleared.
10–8IInterrupt level mask. Defines current interrupt level. Interrupt requests are inhibited for all priority levels less than or
7–0
CCR
equal to current level, except edge-sensitive level 7 requests, which cannot be masked.
Refer to Section 3.2.4, “Condition Code Register (CCR)”.
3.3Functional Description
3.3.1Version 3 ColdFire Microarchitecture
The following diagrams present a more detailed view of the internal pipeline structures for the Version 3
design. In particular, note the increased length of the IFP with the early decode (ED) table lookup and the
branch acceleration target address adders in the IED stage with the feedback to the prefetch address logic
in the IAG stage. The OEP is essentially unchanged from the Version 2 design with the exception of the
extended opword provided from the IFP as part of the instruction interface:
3-10Freescale Semiconductor
Page 85
Figure 3-9. Version 3 ColdFire Processor Instruction Fetch Pipeline Diagram
IAG
IC 1IB
Core bus
Opword
Extension 1
Extension 2
FIFO
IB
IC 2IED
Extended
opword
ED
+4
read data
DSOCAGEX
Opword
Extension 1
Extension 2
Core bus
Core bus
Core bus
RGF
Extended
opword
write data
read data
address
MCF5329 Reference Manual, Rev 3
ColdFire Core
Figure 3-10. Version 3 ColdFire Processor Operand Execution Pipeline Diagram
3.3.2Instruction Set Architecture (ISA_A+)
The original ColdFire Instruction Set Architecture (ISA_A) was derived from the M68000 family opcodes
based on extensive analysis of embedded application code. The ISA was optimized for code compiled
Freescale Semiconductor3-11
Page 86
ColdFire Core
MCF5329 Reference Manual, Rev 3
from high-level languages where the dominant operand size was the 32-bit integer declaration. This
approach minimized processor complexity and cost, while providing excellent performance for compiled
applications.
After the initial ColdFire compilers were created, developers noted there were certain ISA additions that
would enhance code density and overall performance. Additionally , as users implemented ColdFire-based
designs into a wide range of embedded systems, they found certain frequently-used instruction sequences
that could be improved by the creation of additional instructions.
The original ISA definition minimized support for instructions referencing byte- and word-sized operands.
Full support for the move byte and move word instructions was provided, but the only other opcodes
supporting these data types are CLR (clear) and TST (test). A set of instruction enhancements has been
implemented in subsequent ISA revisions, ISA_B and ISA_C. The new opcodes primarily addressed three
areas:
1. Enhanced support for byte and word-sized operands
2. Enhanced support for position-independent code
3. Miscellaneous instruction additions to address new functionality
Table 3-4 summarizes the instructions added to revision ISA_A to form revision ISA_A+. For more details
see the ColdFire Family Programmer’s Reference Manual.
Table 3-4. Instruction Enhancements over Revision ISA_A
InstructionD escription
BITREVThe contents of the destination data register are bit-reversed; new Dn[31] equals old Dn[0], new
Dn[30] equals old Dn[1],..., new Dn[0] equals old Dn[31].
BYTEREVThe contents of the destination data register are byte-reversed; new Dn[31:24] equals old
Dn[7:0],..., new Dn[7:0] equals old Dn[31:24].
FF1The data register, Dn, is scanned, beginning from the most-significant bit (Dn[31]) and ending
with the least-significant bit (Dn[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.
Move from USP USP → Destination register
Move to USPSource register → USP
3.3.3Exception Processing Overview
Exception processing for ColdFire processors is streamlined for performance. The ColdFire processors
differ from the M68000 family because they include:
•A simplified exception vector table
•Reduced relocation capabilities using the vector-base register
•A single exception stack frame format
•Use of separate system stack pointers for user and supervisor modes.
All ColdFire processors use an instruction restart exception model. However, Version 3 ColdFire
processors require more software support to recover from certain access errors. See Section 3.3.4.1,
“Access Error Exception” for details.
3-12Freescale Semiconductor
Page 87
ColdFire Core
2. The processor determines the exception vector number. For all faults except interrupts, the
processor performs this calculation based on 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 special locations within the interrupt
controller’s address space with the interrupt level encoded in the address.
All ColdFire processors support a 1024-byte vector table aligned on any 1 Mbyte address boundary (see
Table 3-5).
MCF5329 Reference Manual, Rev 3
Exception processing includes all actions from fault condition detection to the initiation of fetch for first
handler instruction. Exception processing is comprised of four major steps:
1. The processor makes an internal copy of the SR and then enters supervisor mode by setting the S
bit and disabling trace mode by clearing the T bit. The interrupt exception also forces the M bit to
be cleared and the interrupt priority mask to set to current interrupt request level.
3. The processor saves the current context by creating an exception stack frame on the system stack.
The exception stack frame is created at a 0-modulo-4 address on top of the system stack pointed to
by the supervisor stack pointer (SSP). As shown in Figure 3-11, 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).
4. 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 × vector number). After the exception
vector has been fetched, the vector contents determine the address of the first instruction of the
desired handler. After the instruction fetch for the first opcode of the handler has initiated,
exception processing terminates and normal instruction processing continues in the handler.
The table contains 256 exception vectors; the first 64 are defined for the core and the remaining 192 are
device-specific peripheral interrupt vectors. See Chapter 14, “Interrupt Controller Modules” for details on
the device-specific interrupt sources.
Table 3-5. Exception Vector Assignments
Vector
Number(s)
00x000—Initial supervisor stack pointer
10x004—Initial program counter
20x008FaultAccess error
Vector
Offset (Hex)
Stacked
Program
Counter
Assignment
30x00CFaultAddress error
40x010FaultIllegal instruction
50x014FaultDivide by zero
Fault ref ers to the PC of the instruction that caused the exception. Next ref ers to the PC
of the instruction that follows the instruction that caused the fault.
Vector
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 disable interrupts effectively, if necessary, by raising the interrupt mask level
contained in the status register. For more details, see ColdFire Family Programmer’s Reference Manual.
3.3.3.1Exception Stack Frame Definition
Figure 3-11 shows exception stack frame. The first longword 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.
The 16-bit format/vector word contains three 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 3-6.
•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 exceptions. See Table 3-7.
Table 3-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
111xReserved
•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 case of an
interrupt. See Table 3-5.
3.3.4Processor Exceptions
3.3.4.1Access Error Exception
The exact processor response to an access error depends on the 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 during instruction prefetches 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.
Freescale Semiconductor3-15
Page 90
ColdFire Core
MCF5329 Reference Manual, Rev 3
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 a MOVEM instruction
loading from memory, any registers already updated before the fault occurs contain the operands from
memory.
The V3 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 fra me 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.
3.3.4.2Address Error Exception
Any attempted execution transferring control to an odd instruction address (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 eight on an indexed effective
addressing mode generates an address error, as does an attempted execution of a full-format indexed
addressing mode, which is defined by bit 8 of extension word 1 being set.
If an address error occurs on a JSR instruction, the Version 3 ColdFire processor calculates the target
address then the return address is pushed onto the stack. If an address error occurs on an R TS instruction,
the Version 3 ColdFire processor overwrites the faulting return PC with the address error stack frame.
3.3.4.3Illegal Instruction Exception
The ColdFire variable-length instruction set architecture supports three instruction sizes: 16, 32, or 48 bits.
The first instruction word is known as the operation word (or opword), while the optional words are known
as extension word 1 and extension word 2. The opword is further subdivided into three sections: the upper
four bits segment the entire ISA into 16 instruction lines, the next 6 bits define the operation mode
(opmode), and the low-order 6 bits define the effective address. See Figure 3-12. The opword line
definition is shown in Table 3-8.
1514131211109876543210
LineOpModeEffective Address
ModeRegister
Figure 3-12. ColdFire Instruction Operation Word (Opword) Format
3-16Freescale Semiconductor
Page 91
Table 3-8. ColdFire Opword Line Definition
MCF5329 Reference Manual, Rev 3
Opword[Line]Instruction Class
0x0Bit manipulation, Arithmetic and Logical Immediate
0x1Move Byte
0x2Move Long
0x3Move Word
0x4Miscellaneous
0x5Add (ADDQ) and Subtract Quick (SUBQ), Set according to Condition Codes (Scc)
0x6PC-relative change-of-flow instructions
Conditional (Bcc) and unconditional (BRA) branches, subroutine calls (BSR)
0x7Move Quick (MOVEQ), Move with sign extension (MVS) and zero fill (MVZ)
0x8Logical OR (OR)
0x9Subtract (SUB), Subtract Extended (SUBX)
0xAEMAC, Move 3-bit Quick (MOV3Q)
0xBCompare (CMP), Exclusive-OR (EOR)
In the original M68000 ISA definition, lines A and F were effectively reserved for user-defined operations
(line A) and co-processor instructions (line F). Accordingly, there are two unique exception vectors
associated with illegal opwords in these two lines.
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 opcodes generate their unique exception types, vector numbers 10 and 11, respectively.
ColdFire cores do not provide illegal instruction detection on the extension words on any instruction,
including MOVEC.
3.3.4.4Divide-By-Zero
Attempting to divide by zero causes an exception (vector 5, offset equal 0x014).
3.3.4.5Privilege Violation
The attempted execution of a supervisor mode instruction while in user mode generates a privilege
violation exception. See ColdFire Programmer’s Reference Manual for a list of supervisor-mode
instructions.
There is one special case involving the HALT instruction. Normally, this opcode is a supervisor mode
instruction, but if the debug module's CSR[UHE] is set, then this instruction can be also be executed in
user mode for debugging purposes.
Freescale Semiconductor3-17
Page 92
ColdFire Core
MCF5329 Reference Manual, Rev 3
3.3.4.6Trace Exception
To aid in program development, all ColdFire processors provide an instruction-by-instruction tracing
capability. While in trace mode, indicated by setting of the SR[T] bit, 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.
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 executes, 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 a TRAP instruction execution while in trace mode. The processor initiates the trap
exception and then passes 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[T] in the
exception stack frame set) and pass control to the trace handler before returning from the original
exception.
3.3.4.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.
3.3.4.8Unimplemented Line-F Opcode
A line-F opcode is defined when bits 15-12 of the opword are 0b1111. This exception is generated when
attempting to execute an undefined line-F opcode.
3.3.4.9Debug Interrupt
See Chapter 36, “Debug Module,” for a detailed explanation of this exception, which 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). Additionally , SR[M,I] are unaffected by
the interrupt.
3-18Freescale Semiconductor
Page 93
ColdFire Core
MCF5329 Reference Manual, Rev 3
3.3.4.10RTE 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 R TE 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.
3.3.4.11TRAP Instruction Exception
The TRAP #n instruction always forces an exception as part of its execution and is useful for implementing
system calls. The TRAP instruction may be used to change from user to supervisor mode.
3.3.4.12Unsupported Instruction Exception
If execution of a valid instruction is attempted but the required hardware is not present in the processor , an
unsupported instruction exception is generated. The instruction functionality can then be emulated in the
exception handler, if desired.
All ColdFire cores record the processor hardware configuration in the D0 register immediately after the
negation of RESET. See Section 3.3.4.15, “Reset Exception,” for details.
3.3.4.13Interrupt Exception
Interrupt exception processing includes interrupt recognition and the fetch of the appropriate vector from
the interrupt controller using an IACK cycle. See Chapter 14, “Interrupt Controller Modules,” for details
on the interrupt controller.
3.3.4.14Fault-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
to exit this state.
3.3.4.15Reset Exception
Asserting the reset input signal (RESET) 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
Freescale Semiconductor3-19
Page 94
ColdFire Core
MCF5329 Reference Manual, Rev 3
failure. Reset also aborts any processing in progress when the reset input is recognized. Processing cannot
be recovered.
The reset exception places the processor in the supervisor mode by setting the SR[S] bit and disables
tracing by clearing the SR[T] bit. This exception also clears the SR[M] bit and sets the processor’s SR[I]
field to the highest level (level 7, 0b11 1). Next, the VBR is initialized to zero (0x0000_0000). 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 registers are also affected. Refer to each
module in this reference manual for details on these registers.
After the processor is granted the bus, it performs two longword read-bus cycles. The first longword at
address 0x0000_0000 is loaded into the supervisor stack pointer and the second longword at address
0x0000_0004 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 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 the BDM
to determine the hardware configuration.
Information loaded into D0 defines the processor hardware configuration as shown in Figure 3-13.
BDM: Load: 0x080 (D0)
Store: 0x180 (D0)
31302928272625242322212019181716
RPFVERREV
W
Reset1100111100110000
1514131211109876543210
R MACDIVEMACFPU0000ISADEBUG
W
Reset0110000010001001
Figure 3-13. D0 Hardware Configuration Info
Access: User read-only
BDM read-only
3-20Freescale Semiconductor
Page 95
Table 3-9. D0 Hardware Configuration Info Field Description
(This is the value used for this device.)
MCF5329 Reference Manual, Rev 3
FieldDescription
31–24PFProcessor family. This field is fixed to a hex value of 0xCF indicating a ColdFire core is present.
ColdFire Core
23–20
VER
ColdFire core version number. Defines the hardware microarchitecture version of ColdFire core.
0001 V1 ColdFire core
0010 V2 ColdFire core
0011 V3 ColdFire core (This is the value used for this device.)
0100 V4 ColdFire core
0101 V5 ColdFire core
Else Reserved for future use
19–16
Processor revision number. The default is 0b000 0.
REV
15
MAC present. This bit signals if the optional multiply-accumulate (MAC) ex ecution engine is present in processor core.
MAC
0 MA C execute engine not present in core. (This is the value used for this device.)
1 MAC execute engine is present in core.
14
Divide present. This bit signals if the hardware divider (DIV) is present in the processor core.
DIV
0 Divide execute engine not prese nt in core.
1 Divide execute engine is present in core.
13
EMAC present. This bit signals if the optional enhanced multiply-accumulate (EMAC) execution engine is present in
EMAC
processor core.
0 EMAC execute engine not present in core.
1 EMAC execute engine is present in core. (This is the value used for this device.)
12
FPU present. This bit signals if the optional floating-point (FPU) execution engine is present in processor core.
FPU
0 FPU execute engine not present in core. (This is the value used for this device.)
1 FPU execute engine is present in core.
10–8Reserved.
7–4
ISA
3–0
DEBUG
ISA revision. Defines the instruction-set architecture (ISA) revision level implemented in ColdFire processor core.
0000 ISA_A
0001 ISA_B
0010 ISA_C
1000 ISA_A+ (This is the value used for this device.)
Else Reserved
Debug module revision number. Defines revision level of the debug module used in the ColdFire processor core.
0000 DEBUG_A
0001 DEBUG_B
0010 DEBUG_C
0011 DEBUG_D
0100 DEBUG_E
1001 DEBUG_B+ (This is the value used for this device.)
1011 DEBUG_D+
1111 DEBUG_D+PST Buffer
Else Reserved
Freescale Semiconductor3-21
Page 96
ColdFire Core
MCF5329 Reference Manual, Rev 3
Information loaded into D1 defines the local memory hardware configuration as shown in the figure below .
BDM: Load: 0x081 (D1)
Store: 0x181 (D1)
31302928272625242322212019181716
Access: User read-only
BDM read-only
RCLSZ 00000000000000
W
Reset0000000000000000
1514131211109876543210
RMBSZUCASUCSZSRAMSZ000
W
Reset0000011001110000
Figure 3-14. D1 Hardware Configuration Info
Table 3-10. D1 Hardware Configuration Information Field Description
FieldDescription
31–30
CLSZ
29–24Reserved.
Cache line size. This field is fixed to a hex value of 0x0 indicating a 16-byte cache line size.
23–16Reserved.
15–14
MBSZ
Bus size. Defines the width of the ColdFire master bus datapath.
0032-bit system bus datapath (This is the value used for this device)
0164-bit system bus datapath
Else Reserved
13–12
UCAS
Unified cache associativity. Defines the un ified cache set-associativity.
00Four-way (This is the value used for this device)
01Direct mapped
Else Reserved for future use
11–8
UCSZ
Unified cache size. Indicates the size of the unified cache.
0000 No unified cache
0001 512 bytes
0010 1 Kbytes
0011 2 Kbytes
0100 4 Kbytes
0101 8 Kbytes
0110 16 Kbytes (This is the value used for this device)
0111 32 Kbytes
Else Reserved for future use
3-22Freescale Semiconductor
Page 97
Table 3-10. D1 Hardware Configuration Information Field Description (continued)
MCF5329 Reference Manual, Rev 3
FieldDescription
ColdFire Core
7–3
SRAMSZ
2–0Reserved.
SRAM bank size.
00000 N o SRAM
00010 512 bytes
00100 1 Kbytes
00110 2 Kbytes
01000 4 Kbytes
01010 8 Kbytes
01100 16 Kbytes
01110 32 Kbytes (This is the value used for this device)
10000 64 Kbytes
10010 128 Kbytes
ElseReserved for future use
3.3.5Instruction Execution Timing
This section presents 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.
3.3.5.1Timing Assumptions
For the timing data presented in this section, these assumptions apply:
1. The 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 IFP to supply opwords and/or
extension words.
2. The OEP does not experience any sequence-related pipeline stalls. The most common example 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 clock cycles after the final decode and select/operand fetch cycle (DSOC) of the store
instruction. If a subsequent STORE instruction is encountered within this 2-cycle window, it is
stalled until the resource again becomes available. Thus, the maximum pipeline stall involving
consecutive STORE operations is two 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.
Freescale Semiconductor3-23
Page 98
ColdFire Core
MCF5329 Reference Manual, Rev 3
4. All operand data accesses are aligned on the same byte boundary as the operand size; for example,
16-bit operands aligned on 0-modulo-2 addresses, 32-bit operands aligned on 0-modulo-4
addresses.
The processor core decomposes misaligned operand references into a series of aligned accesses as
shown in Table 3-11.
Table 3-11. Misaligned Operand References
address[1:0]Size
01 or 11WordByte, Byte2(1/0) if read
01 or 11LongByte, Word,
10LongWord, Word2(1/0) if read
Bus
Operations
Byte
Additional
C(R/W)
1(0/1) if write
3(2/0) if read
2(0/2) if write
1(0/1) if write
3.3.5.2MOVE Instruction Execution Times
Table 3-12 lists execution times for MOVE.{B,W} instructions; Table 3-13 lists timings for MOVE.L.
NOTE
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.
ET with {<ea> = (d16,PC)}equals ET with {<ea> = (d16,An)}
ET with {<ea> = (d8,PC,Xi*SF)}equals ET with {<e a> = (d8,An,Xi*SF)}
The nomenclature xxx.wl refers to both forms of absolute addressing, xxx.w
and xxx.l.