MPC5200 Users Guide
MPC5200 Users Guide
E-mail:
support@freescale.com
Europe, Middle East, and Africa: Information in this document is provided solely to enable system and
Freescale Halbleiter Deutschland GmbH software implementers to use Freescale Semiconductor products. There are
Technical Information Center no express or implied copyright licenses granted hereunder to design or
fabricate any integrated circuits or integrated circuits based on the
Schatzbogen 7
information in this document.
81829 Muenchen, Germany
+44 1296 380 456 (English)
+46 8 52200080 (English) Freescale Semiconductor reserves the right to make changes without further
notice to any products herein. Freescale Semiconductor makes no warranty,
+49 89 92103 559 (German)
representation or guarantee regarding the suitability of its products for any
+33 1 69 35 48 48 (French) particular purpose, nor does Freescale Semiconductor assume any liability
support@freescale.com arising out of the application or use of any product or circuit, and specifically
disclaims any and all liability, including without limitation consequential or
Japan: incidental damages. “Typical” parameters that may be provided in Freescale
Freescale Semiconductor Japan Ltd. Semiconductor data sheets and/or specifications can and do vary in different
Headquarters applications and actual performance may vary over time. All operating
ARCO Tower 15F parameters, including “Typicals”, must be validated for each customer
application by customer’s technical experts. Freescale Semiconductor does
1-8-1, Shimo-Meguro, Meguro-ku,
not convey any license under its patent rights nor the rights of others.
Tokyo 153-0064, Japan Freescale Semiconductor products are not designed, intended, or authorized
0120 191014 or +81 3 5437 9125 for use as components in systems intended for surgical implant into the body,
support.japan@freescale.com or other applications intended to support or sustain life, or for any other
application in which the failure of the Freescale Semiconductor product could
Asia/Pacific: create a situation where personal injury or death may occur. Should Buyer
Freescale Semiconductor Hong Kong Ltd. purchase or use Freescale Semiconductor products for any such unintended
Technical Information Center or unauthorized application, Buyer shall indemnify and hold Freescale
Semiconductor and its officers, employees, subsidiaries, affiliates, and
2 Dai King Street
distributors harmless against all claims, costs, damages, and expenses, and
Tai Po Industrial Estate reasonable attorney fees arising out of, directly or indirectly, any claim of
Tai Po, N.T., Hong Kong personal injury or death associated with such unintended or unauthorized
+800 26668334 use, even if such claim alleges that Freescale Semiconductor was negligent
support.asia@freescale.com regarding the design or manufacture of the part.
Chapter 1 Introduction
1.1 Overview ...................................................................................................................................................................1-1
1.1.1 Features ...............................................................................................................................................................1-1
1.2 Architecture ...............................................................................................................................................................1-2
1.2.1 Embedded G2_LE Core ......................................................................................................................................1-6
1.2.2 BestComm I/O Subsystem .................................................................................................................................1-7
1.2.2.1 Programmable Serial Controllers (PSCs) ....................................................................................................1-7
1.2.2.2 10/100 Ethernet Controller ..........................................................................................................................1-7
1.2.2.3 Universal Serial Bus (USB) .........................................................................................................................1-7
1.2.2.4 Infrared Support ............................................................................................................................................1-7
1.2.2.5 Inter-Integrated Circuit (I 2 C) ......................................................................................................................1-7
1.2.2.6 Serial Peripheral Interface (SPI) ..................................................................................................................1-7
1.2.3 Dual Freescale (formerly Motorola) Scalable (MS) Controller Area Network (CAN) .....................................1-7
1.2.4 Byte Data Link Controller - Digital BDLC-D ....................................................................................................1-8
1.2.5 System Level Interfaces ......................................................................................................................................1-8
1.2.5.1 Chip Selects ..................................................................................................................................................1-8
1.2.5.2 Interrupt Controller .......................................................................................................................................1-8
1.2.5.3 Timers ...........................................................................................................................................................1-8
1.2.5.4 General Purpose Input/Outputs (GPIO) ......................................................................................................1-8
1.2.5.5 Functional Pin Multiplexing .........................................................................................................................1-9
1.2.5.6 Real-Time Clock (RTC) ..............................................................................................................................1-9
1.2.6 SDRAM Controller and Interface .......................................................................................................................1-9
1.2.7 Multi-Function External LocalPlus Bus .............................................................................................................1-9
1.2.8 Power Management ............................................................................................................................................1-9
1.2.9 Systems Debug and Test ...................................................................................................................................1-10
1.2.10 Physical Characteristics ....................................................................................................................................1-10
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
12.4.3.2 USB HC Period Current Endpoint Descriptor Register —MBAR + 0x101C ..........................................12-13
12.4.3.3 USB HC Control Head Endpoint Descriptor Register —MBAR + 0x1020 ............................................12-14
12.4.3.4 USB HC Control Current Endpoint Descriptor Register —MBAR + 0x1024 ........................................12-14
12.4.3.5 USB HC Bulk Head Endpoint Descriptor Register—MBAR + 0x1028 ..................................................12-14
12.4.3.6 USB HC Bulk Current Endpoint Descriptor Register—MBAR + 0x102C .............................................12-15
12.4.3.7 USB HC Done Head Register—MBAR + 0x1030 ..................................................................................12-15
12.4.4 Frame Counter Partition—MBAR + 0x1034 ..................................................................................................12-16
12.4.4.1 USB HC Frame Interval Register—MBAR + 0x1034 .............................................................................12-16
12.4.4.2 USB HC Frame Remaining Register—MBAR + 0x1038 ........................................................................12-17
12.4.4.3 USB HC Frame Number Register—MBAR + 0x103C ...........................................................................12-17
12.4.4.4 USB HC Periodic Start Register—MBAR + 0x1040 ...............................................................................12-18
12.4.4.5 USB HC LS Threshold Register—MBAR + 0x1044 ...............................................................................12-18
12.4.5 Root Hub Partition—MBAR + 0x1048 ..........................................................................................................12-19
12.4.5.1 USB HC Rh Descriptor A Register—MBAR + 0x1048 ..........................................................................12-19
12.4.5.2 USB HC Rh Descriptor B Register—MBAR + 0x104C ..........................................................................12-20
12.4.5.3 USB HC Rh Status Register—MBAR + 0x1050 .....................................................................................12-21
12.4.5.4 USB HC Rh Port1 Status Register—MBAR + 0x1054 ...........................................................................12-22
12.4.5.5 USB HC Rh Port2 Status Register—MBAR + 0x1058 ...........................................................................12-26
chapter 13 BestComm
13.1 Overview .................................................................................................................................................................13-1
13.2 BestComm Functional Description .........................................................................................................................13-1
13.3 Features summary ....................................................................................................................................................13-2
13.4 Descriptors ...............................................................................................................................................................13-2
13.5 Tasks ........................................................................................................................................................................13-2
13.6 Memory Map/ Register Definitions ........................................................................................................................13-2
13.7 Task Table (Entry Table) ........................................................................................................................................13-3
13.8 Task Descriptor Table .............................................................................................................................................13-3
13.9 Variable Table .........................................................................................................................................................13-3
13.10 Function Descriptor Table .......................................................................................................................................13-3
13.11 Context Save Area ...................................................................................................................................................13-3
13.12 BestComm DMA Registers—MBAR+0x1200 ......................................................................................................13-3
13.12.1 SDMA Task Bar Register—MBAR + 0x1200 .................................................................................................13-4
13.12.2 SDMA Current Pointer Register—MBAR + 0x1204 .......................................................................................13-4
13.12.3 SDMA End Pointer Register—MBAR + 0x1208 .............................................................................................13-5
13.12.4 SDMA Variable Pointer Register—MBAR + 0x120C .....................................................................................13-5
13.12.5 SDMA Interrupt Vector, PTD Control Register—MBAR + 0x1210 ...............................................................13-6
13.12.6 SDMA Interrupt Pending Register—MBAR + 0x1214 ....................................................................................13-6
13.12.7 SDMA Interrupt Mask Register—MBAR + 0x1218 ........................................................................................13-7
13.12.8 SDMA Task Control 0 Register—MBAR + 0x121C .......................................................................................13-8
13.12.9 SDMA Task Control 2 Register—MBAR + 0x1220 ........................................................................................13-9
13.12.10 SDMA Task Control 4 Register—MBAR + 0x1224 ......................................................................................13-10
13.12.11 SDMA Task Control 6 Register—MBAR + 0x1228 ......................................................................................13-10
13.12.12 SDMA Task Control 8 Register—MBAR + 0x122C .....................................................................................13-11
13.12.13 SDMA Task Control A Register—MBAR + 0x1230 .....................................................................................13-11
13.12.14 SDMA Task Control C Register—MBAR + 0x1234 .....................................................................................13-12
13.12.15 SDMA Task Control E Register—MBAR + 0x1238 .....................................................................................13-12
13.12.16 SDMA Initiator Priority 0 Register—MBAR + 0x123C ................................................................................13-13
13.12.17 SDMA Initiator Priority 4 Register—MBAR + 0x1240 .................................................................................13-14
13.12.18 SDMA Initiator Priority 8 Register—MBAR + 0x1244 .................................................................................13-14
13.12.19 SDMA Initiator Priority 12 Register—MBAR + 0x1248 ...............................................................................13-15
13.12.20 SDMA Initiator Priority 16 Register—MBAR + 0x124C ..............................................................................13-16
13.12.21 SDMA Initiator Priority 20 Register—MBAR + 0x1250 ...............................................................................13-17
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Paragraph Page
Number Number
Figure Page
Number Number
Figure Page
Number Number
Notes
Table Page
Number Number
Table Page
Number Number
Table Page
Number Number
Table Page
Number Number
Table Page
Number Number
Table Page
Number Number
Table Page
Number Number
Table Page
Number Number
Table Page
Number Number
20-16 BDLC Receiver VPW Symbol Timing for Binary Frequencies ...........................................................................20-21
20-17 BDLC Receiver VPW 4X Symbol Timing for Integer Frequencies .....................................................................20-21
20-18 BDLC Receiver VPW 4X Symbol Timing for Binary Frequencies .....................................................................20-21
20-19 BDLC module J1850 Error Summary ...................................................................................................................20-27
20-20 IFR Control Bit Priority Encoding ........................................................................................................................20-38
21-1 TLM Link-DR Instructions .....................................................................................................................................21-7
21-2 TLM Test Instruction Encoding ..............................................................................................................................21-8
21-3 Device ID Register = 0001101D hex ......................................................................................................................21-8
21-4 COP/BDM Interface Signals ..................................................................................................................................21-9
3 26Jan04 AS/TB/PL Updates to PSC, SPI, MSCAN, LPC, SDRAM, Signals and
SystemIntegration chapters
3.1 24Mar06 KL/AE New title page (no Launched by Motorola, added back page);
updated bit 19’s description on pg. 15-27.
Freescale Semiconductor 1
MPC5200 Users Guide, Rev. 3.1
Freescale Semiconductor
Overview
Chapter 1
Introduction
1.1 Overview
The digital communication networking and consumer markets require significant processor performance to enable operating systems and
applications such as VxWorks™, QNX™, JAVA and soft modems. High integration is essential to reducing device and systems costs. The
MPC5200 is specifically designed to meet these market needs while building on the family of microprocessors that use PowerPC™
architecture. For more information on PowerPC architecture, see “The Programming Environments Manual for 32-bit Implementations of the
PowerPC Architecture”.
MPC5200 integrates a high performance 603e G2_LE core with a rich set of peripheral functions focused on communications and systems
integration. The 603e G2_LE core design is based on the PowerPC™ core architecture. The MPC5200 incorporates an innovative I/O
subsystem, which isolates routine maintenance of peripheral functions from the embedded 603e G2_LE core.
The MPC5200 supports a dual external bus architecture. It has a high speed SDRAM Bus interface that connects directly to the 603e G2_LE
core. In addition, the MPC5200 has a LocalPlus Bus used as a generalized interface to system level peripheral devices and debug
environments.
1.1.1 Features
Key features are shown below.
• 603e G2_LE core
— Superscalar architecture
— 760MIPS at 400MHz (-40 to +85 oC)
— 16k Instruction cache, 16k Data cache
— Double precision FPU
— Instruction and Data MMU
— Standard & Critical interrupt capability
• SDRAM / DDR Memory Interface
— up to 132MHz operation
— SDRAM and DDR SDRAM support
— 256-MByte addressing range per Chip Select (Two CS lines available)
— 32-bit data bus
— Built-in initialization and refresh
• Flexible multi-function External Bus Interface
— Supports interfacing to ROM/Flash/SRAM memories or other memory mapped devices
— 8 programmable Chip Selects
— Non multiplexed data access using 8/16/32 bit databus with up to 26 bit address
— Short or Long Burst capable
— Multiplexed data access using 8/16/32 bit databus with up to 25 bit address
• Peripheral Component Interconnect (PCI) Controller
— Version 2.2 PCI compatibility
— PCI initiator and target operation
— 32-bit PCI Address/Data bus
— 33 and 66 MHz operation
— PCI arbitration function
• ATA Controller
— Version 4 ATA compatible external interface—IDE Disk Drive connectivity
• BestComm DMA subsystem
— Intelligent virtual DMA Controller
— Dedicated DMA channels to control peripheral reception and transmission
— Local memory (SRAM 16kBytes)
• 6 Programmable Serial Controllers (PSC), configurable for:
— UART or RS232 interface
— CODEC interface for Soft Modem, Master/Slave CODEC Mode, I2S and AC97
1.2 Architecture
The following areas comprise the MPC5200 system architecture:
• Embedded G2_LE Core
• BestComm I/O Subsystem
• Controller Area Network (CAN)
• Byte Data Link Controller - Digital BDLC-D
• System Level Interfaces
• SDRAM Controller and Interface
• Multi-Function External LocalPlus Bus
• Power Management
• Systems Debug and Test
• Physical Characteristics
MPC5200 Users Guide, Rev. 3.1
A dynamically managed external pin multiplexing scheme minimizes overall pin count. The result is low cost packaging and board assembly
costs.
Figure 1-1 shows a simplified MPC5200 block diagram.
Local
Bus
MSCAN
2x
J1850
Systems Interface Unit (SIU)
LocalPlus Controller
USB
2x
GPIO/Timers
SPI
I2C
Memory Controller
2x
SDRAM / DDR
SDRAM / DDR
BestComm DMA
Ethernet
Reset / Clock
603e
JTAG / COP
Generation
Interface
MPC5200 Audio
Memory SIU Transport &
Controller Video Decoder/ Video
Encoder
PCI Bus
Embedded SDRAM
G2_LE Core
ATA Interface
(MPC603e)
SRAM Interface Graphics SDRAM
Control SRAM DMA
Flash,
ENET Boot ROM
PSC6
PSC4
PSC5
PSC1
PSC2
PSC3
USB
I2C1
IDE Disk
Interface
Ethernet IC Control
UART
UART
Codec
AC97
Debug Interface
Up to 3 instructions can be issued and retired per clock. Most instructions execute in a single cycle. The core contains an integrated Floating
Point Unit (FPU), a Data Cache Memory Management Unit and an Instruction Cache Memory Management Unit.. The core implements the
32-bit portion of the PowerPC architecture, which provides 32-bit effective addressing and integer data types of 8-, 16-, and 32-bits.
Enhancements in this core version, specific to embedded automotive/telematics include:
• Improved interrupt latency (critical interrupt)
• New MMU with additional 8 BAT (16 total) registers and 1KByte page management
The 603e G2_LE core performance for SPEC95 benchmark integer operations, ranges between 4.4 and 5.1 at 200MHz. In Drystone 2.1MIPS,
the 603e G2_LE core is 280MIPS at 200MHz.
MSCAN supports both standard and extended identifier (ID) message formats specified in BOSCH CAN protocol specification, revision 2.0,
part B. Each MSCAN module contains:
• 4 receive buffers (with FIFO storage scheme)
• 3 transmit buffers
• flexible mask able identifier filters
1.2.5.3 Timers
MPC5200 integrates several timer functions required by most embedded systems:
• Two internal Slice timers can create short-cycle periodic interrupts.
• A WatchDog timer can interrupt the processor if not regularly serviced, catching software hang-ups.
A bus monitor monitors bus cycles and provides an interrupt if transactions take longer than a prescribed time.
A Wake Up capability is supported by CAN, RTC, several GPIOs and the interrupt lines. Therefore, the MPC5200 can be shut down to a
low-power standby mode, then re-enabled by one of the Wake Up inputs without resetting the MPC5200.
Chapter 2
Signal Descriptions
2.1 Overview
The MPC5200 contains a 603e G2_LE CPU core, an internal DMA engine, BestComm, multiple functional blocks and associated I/O ports.
There are two external data/address bus structures, the LocalPlus bus and SDRAM bus. A block diagram of the MPC5200 structure is shown
in Figure 1-1.
In general, the LocalPlus bus connects to external SRAM, FLASH, peripheral devices, etc. The LocalPlus bus is capable of executing standard
memory cycles, PCI cycles and ATA cycles. In addition to the data and address bus pins on the LocalPlus bus, there are pins specifically
dedicated to ATA transactions, PCI transactions and standard memory transactions. When the MPC5200 is released from reset, Chip Select 0
is the only active chip select. Program execution must always start from the “boot device” on the LocalPlus bus. There are 8 chip select signals
associated with the LocalPlus bus. It’s possible to execute from every CS. Also every CS can address “data space”.
The SDRAM bus interfaces to Synchronous DRAM. Both Single Data Rate and Double Data Rate DRAMs are supported. Executable
programs are generally loaded into memory residing on the SDRAM bus. The SDRAM bus has a 32-bit wide data/address bus structure and
is capable of burst accesses. It is possible to execute program code over the LocalPlus bus. However, the data transfer rate on the SDRAM
bus is many times faster than LocalPlus.
There are 16 peripheral functional blocks on the MPC5200. These are General Purpose I/O, I2C, TIMER, PSC1, PSC2, PSC3, PSC4, PSC5,
PSC6, Ethernet, USB, MSCAN, SPI and J1850. Each of these functional blocks are routed to one or more I/O ports through a system of
multiplexers. A functional block can only be routed to one I/O port at a time and in many cases, several functional blocks can be routed to the
same I/O port.
The I/O ports are Dedicated GPIO Group, I2C Group, Timer Group, PSC1 Group, PSC2 Group, PSC3 Group, PSC6 Group, Ethernet Group,
and the USB Group.
Figures 2-2 through 2-10 present detailed on the multiplexing options for each I/O port.
MPC5200 is packaged in a 272-pin Plastic Ball Gate Array (PBGA). Package ball locations are shown in Figure 2-1. See Appendix D, for
case diagram.
Y
W
V
U
T
R
P
N
M
L
K
J
H
G
F
E
D
C
B
A
Note: Table 2-1 and Table 2-2 give the signals on each pin/ball.
Table 2-1 gives a list of MPC5200 I/O signals sorted by package ball name. Table 2-2 gives the same list sorted by signal name.
Many signal pins can have multiple functions depending on internal register settings. These additional functions are described in Table 2-3
through Table 2-31.
TEST_MODE_1 JTAG_TDO JTAG_TDI JTAG_TMS PSC3_8 PSC3_5 PSC3_2 PSC2_4 PSC2_2 PSC1_4 PSC1_1 PSC6_2 PORRESET SRESET SYS_XTAL_IN MEM_MA_1 MEM_MBA_1 MEM_RAS MEM_WE MEM_DQM_2
B01 B02 B03 B04 B05 B06 B07 B08 B09 B10 B11 B12 B13 B14 B15 B16 B17 B18 B19 B20
TEST_SEL_0 TEST_MODE_0 JTAG_TRST JTAG_TCK PSC3_7 PSC3_4 PSC3_1 PSC2_3 PSC2_1 PSC1_3 PSC1_0 PSC6_0 HRESET SYS_PLL_AVDD SYS_PLL_TPA MEM_MA_2 MEM_MA_10 MEM_CS_0 MEM_CAS MEM_MA_4
C01 C02 C03 C04 C05 C06 C07 C08 C09 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19 C20
RTC_XTAL_OUT RTC_XTAL_IN TEST_SEL_1 PSC3_9 PSC3_6 PSC3_3 PSC3_0 CORE_PLL_AVDD PSC2_0 PSC1_2 PSC6_1 GPIO_WKUP_7 PSC6_3 SYS_PLL_AVSS GPIO_WKUP_6 MEM_MA_3 MEM_MA_0 MEM_MBA_0 MEM_MA_5 MEM_MA_6
D01 D02 D03 D04 D05 D06 D07 D08 D09 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20
TIMER_4 TIMER_3 TIMER_2 VSS VDD_CORE VDD_IO VDD_CORE LP_OE VDD_IO VDD_CORE VDD_CORE VDD_MEM_IO VDD_MEM_IO SYS_XTAL_OUT VDD_MEM_IO VSS VDD_MEM_IO MEM_MDQS_2 MEM_MA_7 MEM_MA_8
F01 F02 F03 F04 Key for IO Balls: F17 F18 F19 F20
USB_7 USB_8 USB_9 VDD_IO
A6 <– Ball VDD_MEM_IO MEM_MDQ_17 MEM_MA_12 MEM_CLK_EN
G01 G02 G03 G04 PSC3_5 <– Signal Name G17 G18 G19 G20
USB_3 USB_4 USB_5 USB_6 MEM_MDQ_18 MEM_MDQ_19 MEM_CLK MEM_CLK
J01 J02 J03 J04 J09 J10 J11 J12 J17 J18 J19 J20
VSS VSS VSS VSS
MPC5200 Users Guide, Rev. 3.1
K01 K02 K03 K04 K09 K10 K11 K12 K17 K18 K19 K20
VSS VSS VSS VSS d 193 194 196
ETH_0 ETH_1 ETH_2 VDD_CORE VDD_MEM_IO MEM_MDQ_23 MEM_MDQ_10 MEM_MDQ_11
L01 L02 L03 L04 L09 L10 L11 L12 L17 L18 L19 L20
ETH_9 ETH_16 ETH_5 ETH_11 VSS VSS VSS VSS MEM_DQM_3 MEM_MDQS_3 MEM_MDQ_12 MEM_MDQ_13
M01 M02 M03 M04 M09 M10 M11 M12 M17 M18 M19 M20
VSS VSS VSS VSS d 182 184 186
ETH_13 ETH_12 ETH_8 VDD_CORE VDD_MEM_IO MEM_MDQ_24 MEM_MDQ_14 MEM_MDQ_15
R01 R02 R03 R04 VDD_CORE 1.5V Core VDD R17 R18 R19 R20
IRQ3 PCI_RESET EXT_AD_30 PCI_GNT
VDD IO 3.3V IO VDD MEM_MDQ_28 MEM_MDQ_29 MEM_MDQ_5 MEM_MDQ_4
T01 T02 T03 T04 VDD_MEM_IO Memory VDD T17 T18 T19 T20
PCI_CLOCK EXT_AD_26 EXT_AD_28 VDD_IO VDD_MEM_IO MEM_MDQ_30 MEM_MDQ_3 MEM_MDQ_2
U01 U02 U03 U04 U05 U06 U07 U08 U09 U10 U11 U12 U13 U14 U15 U16 U17 U18 U19 U20
PCI_REQ PCI_IDSEL EXT_AD_24 VSS VDD_IO VDD_IO VDD_CORE EXT_AD_15 VDD_IO VDD_IO EXT_AD_6 VDD_CORE VDD_IO LP_ACK VDD_CORE VDD_IO VSS MEM_MDQ_31 MEM_MDQ_1 MEM_MDQ_0
V01 V02 V03 V04 V05 V06 V07 V08 V09 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20
EXT_AD_31 EXT_AD_20 EXT_AD_22 EXT_AD_18 PCI_FRAME PCI_STOP PCI_PAR EXT_AD_13 EXT_AD_11 EXT_AD_9 EXT_AD_4 EXT_AD_2 EXT_AD_0 LP_ALE LP_CS2 LP_CS5 ATA_DRQ TIMER_1 I2C_0 I2C_2
W01 W02 W03 W04 W05 W06 W07 W08 W09 W10 W11 W12 W13 W14 W15 W16 W17 W18 W19 W20
EXT_AD_29 EXT_AD_25 EXT_AD_23 EXT_AD_16 PCI_TRDY PCI_CBE_2 PCI_DEVSEL PCI_SERR EXT_AD_14 PCI_CBE_0 EXT_AD_8 EXT_AD_5 EXT_AD_1 LP_CS0 LP_CS3 LP_RW ATA_IOW ATA_IOCHRDY I2C_1 I2C_3
Y01 Y02 Y03 Y04 Y05 Y06 Y07 Y08 Y09 Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y18 Y19 Y20
EXT_AD_27 PCI_CBE_3 EXT_AD_21 EXT_AD_19 EXT_AD_17 PCI_IRDY PCI_PERR PCI_CBE_1 EXT_AD_12 EXT_AD_10 EXT_AD_7 EXT_AD_3 LP_TS LP_CS1 LP_CS4 ATA_ISOLATION ATA_IOR ATA_DACK ATA_INTRQ TIMER_0
M S P J P
S P S 1 S
C I C 8 C
SDRAM A 5 5 6
CS1 N 0
System
TSIZE_1 chip
selects
4 4 5 2 4
G I T P P P P E U
P 2 I S S S S T S
I C M C C C C H B
O E 1 2 3 4 E
R R
S
10 100 P2 P1
4 8 5 5 5 5
7 18 10 10
ATA chip 2 4
selects
2 Reset
Conf.
2 8 2 5 4 5 10 14 8 2 5 4
W04 EXT_AD_16
W05 PCI_TRDY
W06 PCI_CBE_2
W07 PCI_DEVSEL
W08 PCI_SERR
W09 EXT_AD_14
W10 PCI_CBE_0
W11 EXT_AD_8
W12 EXT_AD_5
W13 EXT_AD_1
W14 LP_CS0
W15 LP_CS3
W16 LP_RW
W17 ATA_IOW
W18 ATA_IOCHRDY
W19 I2C_1
W20 I2C_3
Y01 EXT_AD_27
Y02 PCI_CBE_3
Y03 EXT_AD_21
VDD_IO U06
VDD_IO U09
VDD_IO U10
VDD_IO U13
VDD_IO U16
VDD_MEM_IO D12
VDD_MEM_IO D13
VDD_MEM_IO D15
VDD_MEM_IO D17
VDD_MEM_IO E17
VDD_MEM_IO F17
VDD_MEM_IO H17
VDD_MEM_IO K17
VDD_MEM_IO M17
VDD_MEM_IO P17
VDD_MEM_IO T17
VSS_IO/CORE D04
VSS_IO/CORE D16
VSS_IO/CORE J09
VSS_IO/CORE J10
VSS_IO/CORE J11
D D D D D D D D D D D D D D D D A A A A A A A A A A A A A A A A
16 bit Adr,
1 1 1 1 1 1 0 8 7 6 5 4 3 2 1 0 1 1 1 1 1 1 9 8 7 6 5 4 3 2 1 0
16 bit Data
5 4 3 2 1 0 9 5 4 3 2 1 0
D D D D D D D D A A A A A A A A A A A A A A A A A A A A A A A A
24 bit Adr,
7 6 5 4 3 2 1 0 2 2 2 2 1 1 1 1 1 1 1 1 1 1 9 8 7 6 5 4 3 2 1 0
8 bit Data
3 2 1 0 9 8 7 6 5 4 3 2 1 0
Muxed modes
0 T T T 0 B B A A A A A A A A A A A A A A A A A A A A A A A A A
S S S S S 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 9 8 7 6 5 4 3 2 1 0
All Muxed mode 1 1 1 1 0 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
Address tenures Z Z Z
E E E
2 1 0
8 bit Data D D D D D D D D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
tenure 7 6 5 4 3 2 1 0
D D D D D D D D D D D D D D D D
16 bit Data tenure 1 1 1 1 1 1 9 8 7 6 5 4 3 3 2 0
5 4 3 2 1 0
D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D
32 bit Data tenure 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 9 8 7 6 5 4 3 2 1 0
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
LocalPlus LocalPlus
PCI BUS
Non-mux MULTIPLEXED BUS
Large
Pin name BALL ATA MOST RESET
Addr Addr 32-bit 16-bit 8-bit PCI 32-bit 16-bit 8-bit Flash
Address
/Data /Data Data Data Data Address Data Data Data
Phase
24/8 16/16 Phase Phase Phase Phase Phase Phase Phase
EXT_AD_30 R03 D6 D14 TSIZ0 D30 D14 D6 A30 D30 0 0 D30 D14
EXT_AD_29 W01 D5 D13 TSIZ1 D29 D13 D5 A29 D29 0 0 D29 D13
EXT_AD_28 T03 D4 D12 TSIZ2 D28 D12 D4 A28 D28 0 0 D28 D12
EXT_AD_26 T02 D2 D10 BS1 D26 D10 D2 A26 D26 0 0 D26 D10
EXT_AD_15 U08 A15 A15 A15 D15 0 0 A15 D15 D15 0 D15 D15 A15
EXT_AD_14 W09 A14 A14 A14 D14 0 0 A14 D14 D14 0 D14 D14 A14
EXT_AD_13 V08 A13 A13 A13 D13 0 0 A13 D13 D13 0 D13 D13 A13
EXT_AD_12 Y09 A12 A12 A12 D12 0 0 A12 D12 D12 0 D12 D12 A12
EXT_AD_11 V09 A11 A11 A11 D11 0 0 A11 D11 D11 0 D11 D11 A11
EXT_AD_10 Y10 A10 A10 A10 D10 0 0 A10 D10 D10 0 D10 D10 A10
EXT_AD_9 V10 A9 A9 A9 D9 0 0 A9 D9 D9 0 D9 D9 A9
EXT_AD_8 W11 A8 A8 A8 D8 0 0 A8 D8 D8 0 D8 D8 A8
EXT_AD_7 Y11 A7 A7 A7 D7 0 0 A7 D7 D7 D7 D7 D7 A7
EXT_AD_6 U11 A6 A6 A6 D6 0 0 A6 D6 D6 D6 D6 D6 A6
EXT_AD_5 W12 A5 A5 A5 D5 0 0 A5 D5 D5 D5 D5 D5 A5
EXT_AD_4 V11 A4 A4 A4 D4 0 0 A4 D4 D4 D4 D4 D4 A4
EXT_AD_3 Y12 A3 A3 A3 D3 0 0 A3 D3 D3 D3 D3 D3 A3
EXT_AD_2 V12 A2 A2 A2 D2 0 0 A2 D2 D2 D2 D2 D2 A2
EXT_AD_1 W13 A1 A1 A1 D1 0 0 A1 D1 D1 D1 D1 D1 A1
EXT_AD_0 V13 A0 A0 A0 D0 0 0 A0 D0 D0 D0 D0 D0 A0
LocalPlus LocalPlus
PCI BUS
Non-mux MULTIPLEXED BUS
Large
Pin name BALL ATA MOST RESET
Addr Addr 32-bit 16-bit 8-bit PCI 32-bit 16-bit 8-bit Flash
Address
/Data /Data Data Data Data Address Data Data Data
Phase
24/8 16/16 Phase Phase Phase Phase Phase Phase Phase
PCI_CL0CK T01 CLK CLK CLK CLK CLK CLK Same as PCI_CLOCK CLK CLK
OUT OUT OUT OUT OUT OUT OUT OUT
LocalPlus LocalPlus
PCI BUS
Non-mux MULTIPLEXED BUS
Large
Pin name BALL ATA MOST RESET
Addr Addr 32-bit 16-bit 8-bit PCI 32-bit 16-bit 8-bit Flash
Address
/Data /Data Data Data Data Address Data Data Data
Phase
24/8 16/16 Phase Phase Phase Phase Phase Phase Phase
1. The PCI signals, which are not used as address in Large Flash mode, are drive low during a Large Flash access.
2. For a burst transaction LP_ACK signal indicates the burst
.
Table 2-5. LocalPlus Bus Address / Data Signals
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
Reset
PIN / BALL NUMBER Function Description
Value
LFLASH BRST logic 1 BURST indication for Large Flash, if bursts are
enabled
MOST Graphics BRST logic 1 BURST indication for MOST Graphics, if bursts are
enabled
5 4 5 5
Port_conf
Function PSC_0 PSC_1 PSC_2 PSC_3 PSC_4
[29:31]
Note:
1. CODEC usage leaves pin 3 open for simple GPIO.
2. If port otherwise unused, all five pins are available as GPIO.
3. CODEC plus additional GPIO from elsewhere can implement Soft Modem or RS-232 functionality.
4. AC’97 usage is limited to PSC1 and PSC2.
Figure 2-4. PSC1 Port Map—5 Pins
CODEC1 w/
Pin Name Dir. GPIO AC97_1 UART1 UART1e CODEC1
MCLK
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose I/O
AC97_1 hi - z AC97_1_SDATA_OUT
AC97 Serial Data Out
UART1 hi - z UART1_TXD
Transmit Data
UART1e hi - z UART1e_TXD
Transmit Data
CODEC1 hi - z CODEC1_TXD
Transmit Data
CODEC1_w/MCLK hi - z CODEC1_w/MCLK_TXD
Transmit Data
GPIO hi - z GPIO
Simple General Purpose I/O
AC97_1 hi - z AC97_1_SDATA_IN
AC97 Serial Data In
UART1 hi - z UART1_RXD
Receive Data
UART1e hi - z UART1e_RXD
Receive Data
CODEC1 hi - z CODEC1_RXD
Receive Data
CODEC1_w/MCLK hi - z CODEC1_w/MCLK_RXD
Receive Data
GPIO hi - z GPIO
Simple General Purpose I/O
AC97_1 hi - z AC97_1_SYNC
AC97 Frame Sync
UART1 hi - z UART1_RTS
Ready To Send
UART1e hi - z UART1e_RTS
Ready To Send
CODEC1 hi - z GPIO
Simple General Purpose I/O
Reset
PIN / BALL NUMBER Function Description
Value
AC97_1 hi - z AC97_1_BITCLK
AC97 Bit Clock
UART1 hi - z UART1_CTS
UART Clear To Send
UART1e hi - z UART1e_CTS
UARTe Clear To Send
CODEC1 hi - z CODEC1_CLK
CODEC Bit Clock
CODEC1_w/MCLK hi - z CODEC1_w/MCLK_CLK
CODEC Bit Clock
Pin PSC1_4 Ball A10
GPIO hi - z GPIO
Simple General Purpose I/O with WAKE UP
AC97_1 hi - z AC97_1_RES
AC97 Reset
UART1 hi - z GPIO
Simple General Purpose I/O with WAKE UP
UART1e hi - z UART1e_DCD
UARTe Carrier Detect
CODEC1 hi - z CODEC1_FRAME
CODEC Frame Sync
CODEC1_w/MCLK hi - z CODEC1_w/MCLK_FRAME
CODEC Frame Sync
5 4 5 4 5
Port_conf
Function PSC_0 PSC_1 PSC_2 PSC_3 PSC_4
[25:27]
Note:
1. CODEC usage leaves pin 3 open for simple GPIO.
2. CAN usage leaves pin 5 open for WakeUp GPIO.
3. CODEC plus additional GPIO from elsewhere can implement Soft Modem or RS-232 functionality.
4. AC97 usage is limited to PSC1 or PSC2.
5. MSCAN ports 1 and 2 can be configured here or on timer/I2C ports. They cannot be split.
(i.e., put CAN1 on PSC2 and CAN2 on the timer port).
6. CAN RX input supports WakeUp functionality.
Figure 2-5. PSC2 Port Map—5 Pins
Pin CODEC2 w/
Dir. GPIO CAN1/2 AC97_2 UART2 UART2e CODEC2
Name MCLK
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose I/O
AC97_2 hi - z AC97_2_SDATA_OUT
AC97 Serial Data Out
UART2 hi - z UART2_TXD
Transmit Data
UART2e hi - z UART2e_TXD
Transmit Data
CODEC2 hi - z CODEC2_TXD
Transmit Data
CODEC2_w/MCLK hi - z CODEC2_w/MCLK_TXD
Transmit Data
GPIO hi - z GPIO
Simple General Purpose I/O
AC97_2 hi - z AC97_2_SDATA_IN
AC97 Serial Data In
UART2 hi - z UART2_RXD
Receive Data
UART2e hi - z UART2e_RXD
Receive Data
CODEC2 hi - z CODEC2_RXD
Receive Data
GPIO hi - z GPIO
Simple General Purpose I/O
AC97_2 hi - z AC97_2_SYNC
AC97 Frame Sync
UART2 hi - z UART2_RTS
Ready To Send
UART2e hi - z UART2e_RTS
Ready To Send
CODEC2 hi - z GPIO
Simple General Purpose I/O
Reset
PIN / BALL NUMBER Function Description
Value
AC97_2 hi - z AC97_2_BITCLK
AC97 Bit Clock
UART2 hi - z UART2_CTS
UART Clear To Send
UART2e hi - z UART2e_CTS
UARTe Clear To Send
CODEC2 hi - z CODEC2_CLK
CODEC Bit Clock
Pin PSC2_4 Ball A08
GPIO hi - z GPIO
Simple General Purpose I/O with WAKE UP
AC97_2 hi - z AC97_2_RES
AC97 Reset
UART2 hi - z GPIO
Simple General Purpose I/O with WAKE UP
UART2e hi - z UART2e_DCD
UARTe Carrier Detect
CODEC2 hi - z CODEC2_FRAME
CODEC Frame
5 4 10 4 10
Port_conf
Function PSC3_0 PSC3_1 PSC3_2 PSC3_3 PSC3_4 PSC3_5 PSC3_6 PSC3_7 PSC3_8 PSC3_9
[20:23]
GPIO 0000 GPIO GPIO GPIO GPIO LP_CS_6 or LP_CS_7 or GPIO GPIO INTERRUPT GPIO_W/WAKE-UP
INTERRUPT INTERRUPT
USB2 0001 USB2_OE USB2_TXN USB2_TXP USB2_RXD USB2_RXP USB2_RXN USB2_PRTPW USB2_SPEED USB2_SUSPE USB2_OVRCNT
R ND
UART3 0100 UART3_TXD UART3_RXD UART3_RTS UART3_CTS LP_CS_6 LP_CS_7 GPIO GPIO INTERRUPT GPIO_W/WAKE_UP
UART3e 0101 UART3e_TXD UART3e_RXD UART3e_RTS UART3e_CTS UART3e_DCD LP_CS_7 GPIO GPIO INTERRUPT GPIO_W/WAKE_UP
CODEC3 0110 CODEC3_TXD CODEC3_RXD CODEC3_CLK CODEC3_FRA LP_CS_6 LP_CS_7 GPIO GPIO INTERRUPT GPIO_W/WAKE_UP
ME
CODEC3 w/ 0111 CODEC3_w/ CODEC3_w/ CODEC3_w/M CODEC3_w/M LP_CS_6 LP_CS_7 CODEC3_w/M GPIO INTERRUPT GPIO_W/WAKE-UP
MCLK MCLK_TXD MCLK_RXD CLK_CLK CLK_FRAME CLK_MCLK
SPI 100X GPIO GPIO GPIO GPIO LP_CS_6 LP_CS_7 SPI_MOSI SPI_MISO SPI_SS SPI_CLK
UART3 / SPI 1100 UART3_TXD UART3_RXD UART3_RTS UART3_CTS LP_CS_6 LP_CS_7 SPI_MOSI SPI_MISO SPI_SS SPI_CLK
UART3e / SPI 1101 UART3e_TXD UART3e_RXD UART3e_RTS UART3e_CTS UART3e_DCD LP_CS_7 SPI_MOSI SPI_MISO SPI_SS SPI_CLK
CODEC3 / 111X CODEC3_TXD CODEC3_RXD CODEC3_CLK CODEC3_FRA LP_CS_6 LP_CS_7 SPI_MOSI SPI_MISO SPI_SS SPI_CLK
SPI ME
NOTES:
1. If Soft Modem or RS-232 functionality is desired, use UARTe/CODEC function and use available
GPIO from this or any other port.
2. Second USB port (USB2) can be configured on PSC3 or on the Ethernet port, but not both locations.
3. PSC3_4 can be configured to be LP_CS6 or an interrupt GPIO, except when PS3 is in USB2 or UART3e modes
In these modes, CS6 is not available.
4. PSC3_5 can be configured to be LP_CS7 or an interrupt GPIO, except when PS3 is in USB2 mode.
In this mode, LP_CS7 is not available.
Pin name Dir. CODEC3 w/ M SPI UART3 / SPI UART3e / SPI CODEC3 / SPI
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose I/O
USB2 hi - z USB2_OE
USB Output Enable
UART3 hi - z UART3_TXD
Uart Transmit Data
UART3e hi - z UART3e_TXD
Uart Transmit Data
CODEC3 hi - z CODEC3_TXD
CODEC Transmit Data
CODEC3_w/MCLK hi - z CODEC3_w/MCLK_TXD
CODEC Transmit Data
SPI hi - z GPIO
Simple General Purpose I/O
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose I/O
USB2 hi - z USB2_TXN
USB Transmit Negative
UART3 hi - z UART3_RXD
Uart Receive Data
UART3e hi - z UART3e_RXD
Uart Receive Data
CODEC3 hi - z CODEC3_RXD
CODEC Receive Data
CODEC3_w/MCLK hi - z CODEC3_w/MCLK_RXD
CODEC Receive Data
SPI hi - z GPIO
Simple General Purpose I/O
UART3e,SPI hi - z UART3e_RXD
Uart Receive Data
GPIO hi - z GPIO
Simple General Purpose I/O
USB2 hi - z USB2_TXP
USB Transmit Positive
UART3 hi - z UART3_RTS
Uart Ready To Send
UART3e hi - z UART3e_RTS
Uart Ready To Send
CODEC3 hi - z CODEC3_CLK
CODEC Bit Clock
CODEC3_w/MCLK hi - z CODEC3_w/MCLK_CLK
CODEC Bit Clock
SPI hi - z GPIO
Simple General Purpose I/O
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose I/O
USB2 hi - z USB2_RXD
USB Receive Data
UART3 hi - z UART3_CTS
Uart Clear To Send
UART3e hi - z UART3e_CTS
Uart Clear To Send
CODEC3 hi - z CODEC3_FRAME
CODEC Frame Sync
CODEC3_w/MCLK hi - z CODEC3_w/MCLK_FRAME
CODEC Frame Sync
SPI hi - z GPIO
Simple General Purpose I/O
USB2 hi - z USB2_RXP
USB Receive Positive
UART3 hi - z LP_CS_6
UART3e hi - z UART3e_DCD
UART3e Carrier Detect
CODEC3 hi - z LP_CS_6
CODEC3_w/MCLK hi - z LP_CS_6
SPI hi - z LP_CS_6
UART3, SPI hi - z LP_CS_6
UART3e,SPI hi - z UART3e_DCD
UART3e Carrier Detect
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z LP_CS_7
USB2 hi - z USB2_RXN
USB Receive Positive
UART3 hi - z LP_CS_7
UART3e hi - z LP_CS_7
CODEC3 hi - z LP_CS_7
CODEC3_w/MCLK hi - z CODEC3_w/MCLK_MCLK
CODEC Clock
SPI hi - z LP_CS_7
UART3e,SPI hi - z LP_CS_7
GPIO hi - z GPIO
Simple General Purpose I/O
USB2 hi - z USB2_PRTPWR
USB Port Power
UART3 hi - z GPIO
Simple General Purpose I/O
UART3e hi - z GPIO_
Simple General Purpose I/O
CODEC3 hi - z GPIO
Simple General Purpose I/O
CODEC3_w/MCLK hi - z LP_CS_7
SPI hi - z SPI_MOSI
SPI_Master Out Slave In
UART3, SPI hi - z SPI_MOSI
SPI_Master Out Slave In
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose I/O
USB2 hi - z USB2_SPEED
USB Speed
UART3 hi - z GPIO
Simple General Purpose I/O
UART3e hi - z GPIO
Simple General Purpose I/O
CODEC3 hi - z GPIO
Simple General Purpose I/O
CODEC3_w/MCLK hi - z GPIO
Simple General Purpose I/O
SPI hi - z SPI_MISO
SPI Master In Slave Out
GPIO hi - z GPIO
Simple General Purpose I/O
USB_2 hi - z USB2_SUSPEND
USB Susupend
UART3 hi - z INTERRUPT
UART3e hi - z INTERRUPT
CODEC3 hi - z INTERRUPT
CODEC3_w/MCLK hi - z INTERRUPT
SPI hi - z SPI_SS
SPI Slave Select
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO_W/WAKE_UP
Simple General Purpose I/O with WAKE UP
USB2 hi - z USB2_OVRCRNT
USB Over Current
UART3 hi - z GPIO_W/WAKE_UP
Simple General Purpose I/O with WAKE UP
UART3e hi - z GPIO_W/WAKE_UP
Simple General Purpose I/O with WAKE UP
CODEC3 hi - z GPIO_W/WAKE_UP
Simple General Purpose I/O with WAKE UP
CODEC3_w/MCLK hi - z GPIO_W/WAKE_UP
Simple General Purpose I/O with WAKE UP
SPI hi - z SPI_CLK
SPI Clock
10 4 4 2 5
Port_conf
Function USB_0 USB_1 USB_2 USB_3 USB_4 USB_5 USB_6 USB_7 USB_8 USB_9
[18:19]
USB 01 USB1_OE USB1_TXN USB1_TXP USB1_RXD USB1_RXP USB1_RXN USB1_POR USB1_SPEED USB1_SUS USB1_OVERCNT
TPWR PEND
2x UART4/5 10 GPIO UART4_RT UART4_TX UART4_RXD UART4_CTS UART5_RXD UART5_TXD UART5_RTS UART5_CTS INTERRUPT
S D
NOTE:
1. If not used for USB, this port is available as a GPIO resource.
2. USB clock source can be generated internally or sourced fromUSB_CLK input.
3. Pins 3–5 are not mapped to any function other than USB.
4. RST_config bits are sampled only during Reset.
5. PSC4/5 can be used here or on the Ethernet port, but not in both places.
Pin Reset
Dir. GPIO USB 2x UART4/5
Name Configuration
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
USB1 hi - z USB1_OE
GPIO hi - z ----
USB1 hi - z USB1_TXN
USB1 Transmit Negative
USB1 hi - z USB1_TXP
USB1 Transmit Positive
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z ----
USB1 hi - z USB1_RXD
USB1 Receive Data
USB1 hi - z USB1_RXP
USB1 Receive Positive
RESET Config. hi - z ----
GPIO hi - z ----
USB1 hi - z USB1_RXN
USB1 Receive Negative
GPIO hi - z GPIO
Simple General Purpose I/O
USB1 hi - z USB1_PRTPWR
USB Receive Negative
USB1 hi - z USB1_SPEED
USB Speed
GPIO hi - z GPIO
Simple General Purpose I/O
USB1 hi - z USB1_SUSPEND
USB Suspend
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose I/O
USB1 hi - z USB1_OVRCRNT
USB1 Over Current
Ethernet USB2
J1850 PSC4 PSC5 (Outputs) RST_CFG (output portion) GPIO
2 5 5 8 8 6 8
Port_conf
Function ETH_0 ETH_1 ETH_2 ETH_3 ETH_4 ETH_5 ETH_6 ETH_7
[12:15]
RST_CFG ----- RST_CFG8 RST_CFG15 RST_CFG10 RST_CFG11 RST_CFG12 RST_CFG13 RST_CFG14 -----
GPIO 0000 OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT
USB2 0001 OUTPUT OUTPUT USB2_TXP USB2_PRTPWR USB2_SPEED USB2_SUSPEN USB2_OE USB2_TXN
D
ETH7 0010 ETH7_TXEN ETH7_TXD_0 OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT
ETH7 / USB2 0011 ETH7_TXEN ETH7_TXD_0 USB2_TXP USB2_PRTPWR USB2_SPEED USB2_SUSPEN USB2_OE USB2_TXN
D
ETH_18 no MD 0100 ETH18_TXEN ETH18_TXD_0 ETH18_TXD_1 ETH18_TXD_2 ETH18_TXD_3 ETH18_TXERR OUTPUT OUTPUT
ETH_18 w/ MD 0101 ETH18_w/MD_T ETH18_w/MD_T ETH18_w/MD_T ETH18_w/MD_T ETH18_w/MD_T ETH18_w/MD_T ETH18_w/MD_ ETH18_w/MD_
XEN XD_0 XD_1 XD_2 XD_3 XERR MDC MDIO
ETH7 / 1000 ETH7_TXEN ETH7_TXD_0 OUTPUT UART4e_TXD J1850_TX UART4e_RTS OUTPUT OUTPUT
UART4e/J1850
ETH7 /J1850 1001 ETH7_TXEN ETH7_TXD_0 OUTPUT OUTPUT J1850_TX OUTPUT OUTPUT OUTPUT
UART4/5e/J1850 1010 OUTPUT UART5e_TXD UART5e_RTS UART4_TXD J1850_TX UART4_RTS OUTPUT OUTPUT
UART5e/J1850 1011 OUTPUT UART5e__TXD UART5e_RTS OUTPUT J1850_TX OUTPUT OUTPUT OUTPUT
J1850 1100 OUTPUT OUTPUT OUTPUT OUTPUT J1850_TX OUTPUT OUTPUT OUTPUT
Ethernet USB2
J1850 PSC4 PSC5 (Inputs) (I/O portion) GPIO
2 5 5 10 4 9
Port_
Function conf ETH_8 ETH_9 ETH_10 ETH_11 ETH_12 ETH_13 ETH_14 ETH_15 ETH_16 ETH_17
[12:15]
RST_CFG
GPIO 0000 OUTPUT OUTPUT OUTPUT OUTPUT INTERRUPT INTERRUPT INTERRUPT INTERRUPT GPIO_W/WAK
E_UP
USB2 0001 OUTPUT OUTPUT OUTPUT OUTPUT USB2_RXD USB2_RXP USB2_RXN USB2_OVR GPIO_W/WAK
CNT E_UP
ETH7 0010 ETH7_CD ETH7_RXCLK ETH7_COL ETH7_TXCL ETH7_RXD INTERRUPT INTERRUPT INTERRUPT INTERRUPT GPIO_W/WAK
K _0 E_UP
ETH7 / USB2 0011 ETH7_CD ETH7_RXCLK ETH7_COL ETH7_TXCL ETH7_RXD USB2_RXD USB2_RXP USB2_RXN USB2_OVR GPIO_W/WAK
K _0 CNT E_UP
ETH_18 no 0100 ETH18_RXDV ETH18_RXCL ETH18_COL ETH18_TXC ETH18_RX ETH18_RXD ETH18_RXD_ ETH18_RXD ETH18_RXE ETH18_CRS
MD K LK D_0 _1 2 _3 RR
ETH_18 w/ 0101 ETH18_w/MD_ ETH18_w/MD_ ETH18_w/M ETH18_TXD ETH18_w/ ETH18_w/M ETH18_w/MD ETH18_w/M ETH18_w/M ETH18_W/MD
MD RXDV RXCLK D_COL MD_RXD_0 D_RXD_1 _RXD_2 D_RXD_3 D_RXERR _CRS
ETH7 / 1000 ETH7_CD ETH7_RXCLK ETH7_COL ETH7_TXCL ETH7_RXD J1850_RX UART4e_RXD UART4e_CT UART4_DCD GPIO_W/WAK
UART4e/J18 K _0 S E_UP
50
ETH7 /J1850 1001 ETH7_CD ETH7_RXCLK ETH7_COL ETH7_TXCL ETH7_RXD J1850_RX INTERRUPT INTERRUPT INTERRUPT GPIO_W/WAK
K _0 E_UP
UART4/5e/J1 1010 UART5e_CD UART5e_CTS OUTPUT OUTPUT UART5e_R J1850_RX UART4_RXD UART4_CTS UART4_CD GPIO_W/WAK
850 XD E_UP
UART5e/J18 1011 UART5e_DCD UART5e_CTS OUTPUT OUTPUT UART5e_R J1850_RX INTERRUPT INTERRUPT INTERRUPT GPIO_W/WAK
50 XD E_UP
J1850 1100 GPIO OUTPUT OUTPUT OUTPUT J1850_RX INTERRUPT INTERRUPT INTERRUPT GPIO_W/WAK
E_UP
Reset
Pin name Dir. GPIO USB2 ETH7 ETH7 / USB2
Configuration
Reset
Pin name Dir. GPIO USB2 ETH7 ETH7 / USB2
Configuration
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z GPIO
Simple General Purpose Output
J1850 hi - z GPIO
Simple General Purpose Output
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z GPIO
Simple General Purpose Output
J1850 hi - z GPIO
Simple General Purpose Output
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z USB2_TXP
USB Transmit Positive
J1850 hi - z GPIO
Simple General Purpose Output
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose Output
USB2 hi - z USB2_PrtPWR
USB Port Power
J1850 hi - z GPIO
Simple General Purpose Output
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z USB2_Speed
USB Speed
J1850 hi - z J1850_TX
J1850 Transmit Data
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z USB2_Suspend
USB Suspend
J1850 hi - z GPIO
Simple General Purpose Output
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z USB2_OE
USB Output Enable
J1850 hi - z GPIO
Simple General Purpose Output
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z USB2_TXN
USB Transmit Negative
J1850 hi - z GPIO
Simple General Purpose Output
Notes:
1. The external bus clock (pci_clk) will be 1/2 the frequency of the internal bus clock (ipb_clk) at powerup. Therefore, 4 IPbus wait states
will translate to as little as 1 external wait state (i.e. peripheral must respond within 2 external clocks). The "slow" setting represents
48 IPbus clocks of wait, or 23 external clocks of wait External waits are "minus-1" because Chip Select may assert on falling edge
of external bus clock (dependant on internal timing).
2. For muxed boot ROM types, the width of ALE_b & TS_b will be 2 IPbus clocks (i.e. 1 external clock). This represents the "wide ALE"
setting in the LocalPlus Controller (LPC). Care must be taken if these clock relationships are to be changed during the boot
process. For the 1-to-1 internal-to-external clock setting (which must be programmed by software into the CDM), be sure to change
the ALE width setting (in LPC) *after* adjusting the clock relationship. Any fetches to the boot device between these two settings will
result in ALE and TS being 2 external clocks wide.
3. Only one boot mode can be enabled at a time. Large Flash and Most Graphics cannot be enabled at the same time. If neither Large
Flash or Most Graphics is enabled, boot will occur from the normal LocalPlus mode, either muxed or nonmuxed (depending on the
"boot_rom_type" configuration input).
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose Output
USB2 hi - z GPIO
Simple General Purpose Output
GPIO hi - z GPIO
Simple General Purpose Output
USB2 hi - z GPIO
Simple General Purpose Output
J1850 hi - z UART5e_CTS
Uart Clear To Send
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z GPIO
Simple General Purpose Output
J1850 hi - z GPIO
Simple General Purpose Output
Pin ETH_11 Ball L04
GPIO hi - z GPIO
Simple General Purpose Output
USB2 hi - z GPIO
Simple General Purpose Output
J1850 hi - z GPIO
Simple General Purpose Output
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z
J1850 hi - z ----
Pin ETH_13 Ball M01
GPIO hi - z INTERRUPT
J1850 hi - z J1850_RX
J1850 Receive Data
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z USB_2_RXP
USB Receive Positive
ETH7 Wire hi - z INTERRUPT
GPIO hi - z INTERRUPT
USB2 hi - z USB_2_RXN
USB Receive Negative
J1850 hi - z INTERRUPT
Reset
PIN / BALL NUMBER Function Description
Value
USB2 hi - z USB_2_OVRCNT
USB Over Current
ETH7 Wire hi - z INTERRUPT
J1850 hi - z INTERRUPT
Pin ETH_17 Ball J04
GPIO hi - z GPIO
Simple General Purpose Output with WAKE UP
USB2 hi - z GPIO
Simple General Purpose Output with WAKE UP
J1850 hi - z GPIO
Simple General Purpose Output with WAKE UP
1 1 1 2 2 4 8
Port_config
Function TIMER0 TIMER1 TIMER2 TIMER3 TIMER4 TIMER5 TIMER6 TIMER7
[2:3_6:7]
GPIO 00_0X GPIO GPIO GPIO GPIO GPIO GPIO GPIO GPIO
TIMER 00_10 TIMER_0 TIMER_1 TIMER_2 TIMER_3 TIMER_4 TIMER_5 TIMER_6 TIMER_7
ATA_CS 00_11 ATA_CS_0 ATA_CS_1 GPIO GPIO GPIO GPIO GPIO GPIO
TIMER_2 TIMER_3 TIMER_4 TIMER_5 TIMER_6 TIMER_7
CAN2 01_00 CAN2_TX CAN2_RX GPIO GPIO GPIO GPIO GPIO GPIO
TIMER_2 TIMER_3 TIMER_4 TIMER_5 TIMER_6 TIMER_7
SPI 10_00 GPIO GPIO SPI_MOSI SPI_MISO SPI_SS SPI_CLK GPIO GPIO
TIMER_0 TIMER_1 TIMER_6 TIMER_7
SPI/ATA_CS 10_11 ATA_CS_0 ATA_CS_1 SPI_MOSI SPI_MISO SPI_SS SPI_CLK GPIO GPIO
TIMER_6 TIMER_7
CAN2/SPI 11_00 CAN2_TX CAN2_RX SPI_MOSI SPI_MISO SPI_SS SPI_CLK GPIO GPIO
TIMER_6 TIMER_7
NOTES:
1. Each pin is individually selectable as a Timer or GPIO. Each Timer can be individually
configured as Input Capture (IC), Output Compare (OC), or Pulse Width Modulator (PWM)
(GPT X Enable and Mode Select Register).
If a timer pin is configured as a GPIO or some other function (SPI, chip select or CAN), the
timer module can still be used internally by software.
2. Timers 6 and 7, when configured as input capture, contain WakeUp functionality.
3. All Timer and GPIO function controls are within the Timer module register set.
4. CAN RX input supports WakeUp functionality.
ATA CHIP
Pin Name Dir. GPIO TIMER CAN2 SPI CAN2 / SPI
SEL
TIMER 0 I/O SIMPLE GPIO TIMER 0 ATA_CS_0 CAN2_TX SIMPLE GPIO CAN2_TX
TIMER 1 I/O SIMPLE GPIO TIMER 1 ATA_CS_1 CAN2_RX SIMPLE GPIO CAN2_RX
TIMER 2 I/O SIMPLE GPIO TIMER 2 SIMPLE GPIO SIMPLE GPIO SPI_MOSI SPI_MOSI
TIMER 3 I/O SIMPLE GPIO TIMER 3 SIMPLE GPIO SIMPLE GPIO SPI_MISO SPI_MISO
TIMER 4 I/O SIMPLE GPIO TIMER 4 SIMPLE GPIO SIMPLE GPIO SPI_SS SPI_SS
TIMER 5 I/O SIMPLE GPIO TIMER 5 SIMPLE GPIO SIMPLE GPIO SPI_CLK SPI_CLK
TIMER 6 I/O SIMPLE GPIO TIMER 6 SIMPLE GPIO SIMPLE GPIO SIMPLE GPIO SIMPLE GPIO
TIMER 7 I/O SIMPLE GPIO TIMER 7 SIMPLE GPIO SIMPLE GPIO SIMPLE GPIO SIMPLE GPIO
Reset
PIN / BALL NUMBER Function Description
Value
TIMER hi - z TIMER_0
GPIO hi - z GPIO
Simple General Purpose I/O
CAN2 hi - z CAN2_TX
CAN 2 Transmit Data
SPI hi - z GPIO
Simple General Purpose I/O
TIMER hi - z TIMER_1
GPIO hi - z GPIO
Simple General Purpose I/O
SPI hi - z GPIO
Simple General Purpose I/O
TIMER hi - z TIMER_2
GPIO hi - z GPIO
Simple General Purpose I/O
CAN2 hi - z GPIO
Simple General Purpose I/O
Reset
PIN / BALL NUMBER Function Description
Value
TIMER hi - z TIMER_3
GPIO hi - z GPIO
Simple General Purpose I/O
ATA CHIP SELECTS hi - z GPIO
Simple General Purpose I/O
CAN2 hi - z GPIO
Simple General Purpose I/O
GPIO hi - z GPIO
Simple General Purpose I/O
CAN2 hi - z GPIO
Simple General Purpose I/O
SPI hi - z SPI _SS
SPI Slave Select
TIMER hi - z TIMER_5
GPIO hi - z GPIO
Simple General Purpose I/O
CAN2 hi - z GPIO
Simple General Purpose I/O
Reset
PIN / BALL NUMBER Function Description
Value
GPIO hi - z GPIO
Simple General Purpose I/O
ATA CHIP SELECTS hi - z GPIO
Simple General Purpose I/O
CAN2 hi - z GPIO
Simple General Purpose I/O
SPI hi - z GPIO
Simple General Purpose I/O
CAN2 / SPI hi - z GPIO
Simple General Purpose I/O
GPIO hi - z GPIO
Simple General Purpose I/O
CAN2 hi - z GPIO
Simple General Purpose I/O
SPI hi - z GPIO
Simple General Purpose I/O
PSC6 GPIO
4 4
Port_conf
Function PSC6_0 PSC6_1 PSC6_2 PSC6_3
[9:11]
Reset
PIN / BALL NUMBER Function Description
Value
ATA Chip
I2C1 I2C2 CAN1
Selects
2 2 2 2
NOTE:
1. CAN RX input supports WakeUp functionality.
Figure 2-12. I2C Port Map—4 Pins (two pins each, for two I2Cs)
Reset
PIN / BALL NUMBER Function Description
Value
CAN_1/I2C_2 CAN1_TX
CAN Transmit Data
I2C_1/ATA_CS I2C_1_CLK
I2C Clock
CAN1/CAN2 CAN1_RX
I2C_1/ATA_CS I2C_1_I/O
Pin I2C_2 Ball V20
CAN1/CAN2 I2C_2_CLK
I2C Clock
I2C_1/ATA_CS ATA_CS0
ATA Chip Select 0
CAN1/CAN2 I2C_2_I/O
I2C I/O line
I2C_1/ATA_CS ATA_CS1
ATA Chip Select 1
Reset
PIN BALL NUMBER Function Description
Value
Reset
PIN BALL NUMBER Function Description
Value
Reset
PIN BALL NUMBER Function Description
Value
Reset
PIN BALL NUMBER Function Description
Value
Reset
PIN BALL NUMBER Function Description
Value
Reset
CLOCK / RESET Functions Description
Value
Reset
DEDICATED GPIO Functions Description
Value
Notes
Chapter 3
Memory Map
3.1 Overview
The following sections are contained in this document:
• MPC5200 Internal Register Memory Map
• MPC5200 Memory Map
• SDRAM Bus
• LocalPlus Bus
— Memory Cycles
– Boot Chip Select
– Chip Selects
— ATA Cycles
— PCI Cycles
• MPC5200 Register Summaries
— Memory Map Registers -- MBAR + 0x0000
— SDRAM Registers -- MBAR + 0x0100
— Clock Distribution Module Registers -- MBAR + 0x0200
— Chip Select Configuration Registers -- MBAR + 0x0300
— Interrupt Controller Registers -- MBAR + 0x0500
— General Purpose Timer Registers -- MBAR + 0x0600
— Slice Timer Control Registers -- MBAR + 0x0700
— Real Time Clock Registers -- MBAR + 0x0800
— MSCAN Registers -- MBAR + 0x0900
— Simple GPIO Registers -- MBAR + 0x0B00
— Wake-up GPIO Registers -- MBAR + 0x0C00
— PCI Registers -- MBAR + 0x0D00
— Serial Peripheral Interface Registers -- MBAR + 0x0F00
— USB Host Registers -- MBAR + 0x1000
— BestComm Registers -- MBAR + 0x1200
— J1850 (BDLC Controller) Registers -- MBAR + 0x1300
— XL BUS ARbitration Registers -- MBAR + 0x1F00
— PSC1 Registers -- MBAR + 0x2000
— PSC2 Registers -- MBAR + 0x2200
— PSC3 Registers -- MBAR + 0x2400
— PSC4 Registers -- MBAR + 0x2600
— PSC5 Registers -- MBAR + 0x2800
— PSC6 Registers -- MBAR + 0x2C00
— Ethernet Registers -- MBAR + 0x3000
— BestComm / PCI Interface Registers -- MBAR + 0x3800
— ATA Bus Configuration Registers -- MBAR + 0x3A00
— BestComm / LocalPlus Interface Registers -- MBAR + 0x3C00
— I2C Configuration Registers -- MBAR + 0x3D00
— SRAM Module -- MBAR + 0x8000
MBAR + 0x2C00 PSC6 Programmable Serial Controller 6 / Infra-Red Data Section 15.2
Association registers.
MBAR + 0x8000 SRAM On-chip Static RAM memory locations. Section 13.13
R
Reserved
W
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R
Base Address Register
W
RESET 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16:31 Base Address Provides the offset to which all register space for MPC5200 is accessed. The reset value of
Register this register is 0x8000, which provides for a MBAR of 0x8000 0000. All of MPC5200
registers are then accessible at MBAR+offset, where offset refers to the given value in
Table 3-1 for the respective module.
MBAR
Name Description
offset
0x0004 CS0 Start Chip Select 0 through the LocalPlus Bus. Any access on an address between the Start
Address and Stop Addresses enables this chip select.
0x000C CS1 Start Chip Select 1 through the LocalPlus Bus. Any access on an address between the Start
Address and Stop Addresses enables this chip select.
0x0010 CS1 Stop
Address
0x0014 CS2 Start Chip Select 2 through the LocalPlus Bus. Any access on an address between the Start
Address and Stop Addresses enables this chip select.
0x001C CS3 Start Chip Select 3 through the LocalPlus Bus. Any access on an address between the Start
Address and Stop Addresses enables this chip select.
0x0024 CS4 Start Chip Select 4 through the LocalPlus Bus. Any access on an address between the Start
Address and Stop Addresses enables this chip select.
MBAR
Name Description
offset
0x002C CS5 Start Chip Select 5 through the LocalPlus Bus. Any access on an address between the Start
Address and Stop Addresses enables this chip select.
0x004C Boot Start Boot Addressing through the LocalPlus Bus. Any access on an address between the
Address Start and Stop Addresses accesses the boot space. By default, the address space
accessed starts at 0x0000 0000 or 0xFFF0 0000 depends on the reset configuration.
0x0050 Boot Stop The size of the boot address space after reset is 512Kbytes.
Address
0x0058 CS6 Start Chip Select 6 through the LocalPlus Bus. Any access on an address between the Start
Address and Stop Addresses enables this chip select.
0x0060 CS7 Start Chip Select 7 through the LocalPlus Bus. Any access on an address between the Start
Address and Stop Addresses enables this chip select.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Base Address
RESET 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
16:31 Base Address The 16 most significant bits of the Base Address. A value of 0x4000 would translate into a
base address of 0x4000 0000.
MBAR
Name Description
offset
0x0034 SDRAM Chip Contains the Base Addresses and configurations for SDRAM’s connected to the
Select 0 SDRAM controller.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
27:31 SDRAM size Should be set to size of SDRAM at corresponding SDRAM chip select. Settings are included
in the following table.
SDRAM
SDRAM size bit setting
Memory Size
11111 4GB
11110 2GB
11101 1GB
11100 512MB
11011 256MB
11010 128MB
11001 64MB
11000 32MB
10111 16MB
10110 8MB
10101 4MB
10100 2MB
10011 1MB
00001-10010 Reserved
0000 Disable
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved CS7 CS6 Boot Reserved CS5 CS4 CS3 CS2 CS1 CS0
Ena Ena Ena Ena Ena Ena Ena Ena Ena
W
RESET 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved WSE
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
31 WSE Wait State Enable bit. This bit should always be enabled when running an IP bus frequency
of >66MHz.
Chapter 4
Resets and Reset Configuration
4.1 Overview
The following sections are contained in this document:
• Hard and Soft Reset Pins
• Reset Sequence
• Reset Operation
• Other Resets
• Reset Configuration
1. All “open drain” outputs of MPC5200 are actually regular 3-state output drivers with the output data tied low, and the output enable controlled. Thus,
unlike a true open drain, there is a current path from the external system to the MPC5200 I/O power rail if the external signal is driven above the
MPC5200 I/O power rail voltage.
Internal or External
HRESET is asserted Assert internal and external
HRESET for 4096
HRESET reference clock cycles
APLLs Lock
Reset Hold
Sample configuration from
RST_CONFIG[15:0]
Internal or External
SRESET is asserted
No Reset signals
Wait recognized for 2
reference clock cycles
All Power
Supplies
SYS_XTAL
PORRESET
HRESET
SRESET
When external HRESET is asserted, internal reset logic catches the reset signal held low and asserts internal hard and soft resets for 4096
reference clock cycles. The external reset signal must be held low for at least 4 reference clock cycles (must catch 4 rising edges of reference
clock) to be recognized and assert the internal reset signals.
Reference clock
HRESET
2 edges
3 edges
Internal
Reset
The Clock Distribution Module contains a register that can be written by the microprocessor to assert soft reset. Writing the SRESET bit in
this register to zero causes external SRESET and internal soft reset to be asserted.
Definition
PCI_RESET PCI bus reset output. Generated by processor write to a PCI register.
AC97_1_RES AC97 reset output. Generated from the AC97 PSC1 module.
AC97_2_RES AC97 reset output. Generated from the AC97 PSC2 module.
Definition
JTAG_TRST JTAG reset input. Generated externally from JTAG or debug control logic. This input only resets
the JTAG logic. Other system resets (PORRESET, HRESET, and SRESET) do not reset the JTAG
logic.
Note: For information on the reset signal JTAG_TRST and the relationship to other reset signals
refer to the MPC5200 Hardware Specifications.
ATA Reset This is NOT a reset pin on MPC5200. The ATA reset for the external drive must be supplied by the
board level reset source, or if software control is required, generated via a GPIO.
CDM Reset
Pkg Reset I/O Signal Config Signal
Config Description
Ball Config Pin Name from CDM
Register Bit
Y18 RST_CFG0 ATA_DACK PORCFG[31] ppc_pll_cfg_4 MPC5200 G2_LE PPC Core PLL
Configuration
Y17 RST_CFG1 ATA_IOR PORCFG[30] ppc_pll_cfg_3
K01 RST_CFG8 ETH0 PORCFG[23] boot_rom_mg bit=0:No Boot in Most Graphics Mode 1
bit=1:Boot in Most Graphics Mode 1,2,4
J01 RST_CFG11 ETH3 PORCFG[20] boot_rom_wait bit=0:4 PCI bus clocks of wait state1
bit=1:48 PCI bus clocks of wait state1
J02 RST_CFG12 ETH4 PORCFG[19] boot_rom_swap bit=0:no byte lane swap, same
endian ROM image
bit=1:byte lane swap, different
endian ROM image
CDM Reset
Pkg Reset I/O Signal Config Signal
Config Description
Ball Config Pin Name from CDM
Register Bit
L03 RST_CFG13 ETH5 PORCFG[18] boot_rom_size For non-muxed boot ROMs: 2,3
bit=0:8bit boot ROM data bus, 24bit
max boot ROM address bus
bit=1:16bit boot ROM data bus, 16bit
boot ROM address bus
For muxed boot ROMs:
boot ROM address is max 25 significant
bits during address tenure.
bit=0:16bit ROM data bus
bit=1:32bit ROM data bus
Note:
1. If multipe settings are choosen the following priorities are valid:
1. large_flash_sel
2. boot_rom_mg
3. boot_rom_type
2. The boot_rom_size configuration signal doesn’t influence the address and data bus width of the MOST Graphics boot
mode configuration. The maximum address bus width is fixed to 24 bit and the data bus width is fixed to 32 bit.
3. The boot_rom_size configurationsignal doesn’t influence the address bus width of the Large Flash boot mode
configuration. The maximum address bus width is fixed to 26 bit.
4. The PCI controller is disabled, if booting in Large Flash or MOST Graphics mode is selected.
Notes
Chapter 5
Clocks and Power Management
5.1 Overview
The following sections are contained in this document:
• Clock Distribution Module (CDM)
• MPC5200 Clock Domains
• Power Management
• CDM Registers
XLB CLOCK Microprocessor on-chip 64-bit XLB clock. This is the fundamental MPC5200 frequency.
(xlb_clk)
MEM_CLOCK SDRAM Controller memory clock supplied to external SDRAM devices. Max frequency is
(mem_clock) 132MHz. The memory clock frequency is always equal to the XLB frequency.
CORE CLOCK Clock for the 603e G2_LE Core. The core APLL takes the XLB clock and generates the G2_LE
CORE clock.
48MHz CLOCK 48MHz clock for USB and IrDA (PSC6). This clock can be sourced internally from the CDM or from
USB CLOCK an external source via the IrDA_USB_CLK pin.
— When generated internally, the clock source can be a fix 48MHz clock generator or a programmable clock generator (Mclk).
— When generated externally, the frequency can be different
NOTE
Only one pin is allocated to supply the USB and PSC6/IrDA clock. If both modules require external
clock generation, the frequency must be 48MHz.
SPI—The SPI (Serial Peripheral Interface) has a clock input pin, SPI_CLK, that can be supplied externally. The SPI module
therefore has a small asynchronous clock domain.
I2C—There are two I2C (Inter-Integrated Circuit) modules on MPC5200. Both have input source clocks (I2Cx_CLK) and therefore
asynchronous clock domains.
RTC—The RTC (Real-Time Clock) has its own clock domain, which is clocked by an external 32.768KHz oscillator. The two
oscillator pins are RTC_XTAL_IN and RTC_XTL_OUT. There is an asynchronous boundary between this clock domain and the
IPB register interface.
JTAG—The JTAG (Joint Test Action Group) has its own clock domain clocked by the JTAG_TCK pin.
The following peripheral functions use clocks generated from CDM.
MSCAN—The MSCAN (Freescale [formerly Motorola] Scalable Controller Area Network) internal baud rate generator also uses
the ipb_clk or can be derived from the oscillator clock sys_xtal_in. The resultant divided clock samples an incoming CAN data stream
and generates an outgoing data stream.
Local Bus
Control
LocalPlus Bus
CONF
Controller
REG BestComm
BestComm DMA
SIO ATA
SRAM
timers Control
ATA
interrupt Controller
IPB
IPB
CommBus
I2C_2 PSC_6
fVCOcore divide by
VCO
2 or 4
603e G2_LE
CORE CLOCK
603e G2_LE
Core APLL
divide by
2, 2.5,3.0 ...7.5, 8
Core APLL
Control Logic
rst_cfg[0:4]
ppc_pll_cfg[0:4] XLB CLOCK
MEM CLOCK
XLB Clock Divider
fsystem / (8 or 4)
xlb_clk_sel 0
IPB CLOCK
divide
by 2 1
ipb_clk_sel
PCI CLOCK
PCI Clock Divider
xlb_clk_sel
ipb_clk_sel
pci_clk_sel[1:0]
fsystem
fVCOsys 0
USB CLOCK
VCO
Fractional Divider 48 MHz CLOCK
divide fsystem / (6, 6.25, 6.5 ...11)
by 2 1
SYS_XTAL_IN
System APLL
PSC1 MCLK DIVIDER PSC1 MCLK
sys_pll_cfg[1] fsystem / (MclkDiv[8:0]+1)
divide
1 by 12 PSC2 MCLK
PSC2 MCLK DIVIDER
fsystem / (MclkDiv[8:0]+1)
divide
0 by 16
PSC3 MCLK DIVIDER PSC3 MCLK
fsystem / (MclkDiv[8:0]+1)
sys_pll_cfg[0]
Table 5-2 shows the System PLL configuration and the corresponding fsystem frequencies for a 27.0 MHz and 33.0 MHz input clock.
Table 5-3 shows all possible clock ratios.
Table 5-2. System PLL Ratios
0 0 432.0 432.0
1 1 648.0 324.0
0 0 528.0 528.0
1a 0 1056.0 528.0
1 1 792.0 396.0
a
These are invalid configurations. The fVCOsys frequencies exceed the maximum operation frequency. See
MPC5200 Hardware Specification.
CLOCK Ratio
xlb_clk_sel XLB CLOCK ipb_clk_sel IPB CLOCK pci_clk_sel[1:0] PCI CLOCK
XLB:IPB:PCI
33.0 4:2:1
Table 5-4 shows the typical clock ratios with a 33.0 MHz clock input on the SYS_XTAL_IN pin and a System PLL divide value 16
(sys_pll_cfg[0] = 0).
NOTE
Frequency ranges in Table 5-3 and Table 5-4 represent possible ranges of operation. A variety of
conditions may prevent the part from actually performing at these frequency ranges. For data relating
to actual performance, see Section A.2, AC Timing.
x1 — — — — — — — — — —
x1.5 — — — — — — — — — —
x2.5 330 270 247.5 202.5 165 135 123.8 101.3 82.5 67.5
G2 Core PLL Bus to Core Multipliera
x3.5 378 346.5 283.5 231 189 173.3 141.8 115.5 94.5
Note: 1x and 1.5x multiply ratios are not available in this version of the MPC5200.
a
See Table 5-6, XLB to CORE clock ratio.
Table 5-6 gives the 603e G2_LE Core APLL and operating frequency options compared to the xlb_clk reference input (shown in Figure 5-2).
The selection of a 603e G2_LE Core frequency is made at Power-On Reset (POR) via the reset configuration inputs. For more information
see Section 4.6, Reset Configuration.
Frequency ranges indicated in Table 5-6 represent possible ranges for the processor APLL. A variety of conditions may prevent the part from
actually performing at these frequency ranges. For data relating to actual performance, see the MPC5200 Hardware Specification.
Table 5-6. 603e G2_LE Core APLL Configuration Options
ppc_pll_cfg
Bus:Core Ratio Core:VCO Ratio Bus:VCO Ratio
(XLB : CORE CLOCK) (CORE CLOCK: fVCOcore) (XLB : fVCOcore)
hex [0:1:2:3:4]
0x00 00000 — — —
0x01 00001 — — —
0x02 00010 — — —
ppc_pll_cfg
Bus:Core Ratio Core:VCO Ratio Bus:VCO Ratio
(XLB : CORE CLOCK) (CORE CLOCK: fVCOcore) (XLB : fVCOcore)
hex [0:1:2:3:4]
0x0C 01100 — — —
0x18 11000 — — —
NOTE
The XLB CLOCK frequency and the ppc_pll_cfg[0:4] must be chosen such that resulting CORE
CLOCK frequency and PLL (fVCOcore) frequency do not exceed their respective maximium or
minimum operating frequencies. Refer to Table 5-5 and MPC5200 Hareware Specification.
Bits Description
mem_2x_clk, These internal clocks are twice the frequency of xlb_clk and are used to add more resolution to
mem_2x_clk SDRAMC control signals
mem2x1x_clk This is the source of the internal memory read clock. It always operates at the memory data rate,
(becomes 1x mem_clk for SDR, 2x mem_clk for DDR. The physical circuit path of mem2x1x_clk is matched
mem_rd_clk) as closely as possible to the on-chip portion of the memory clock output and the read data input;
a tapped delay chain is used to match off-chip portions of the memory clock and read data path.
Figure 5-3 shows the clock relationships for the SDRAM Controller.
xlb_clk
MEM_MEMCLK, mem_clk
mem_2x_clk
mem_2x_clk
mem2x1x_clk
xlb_clk
MEM_MEMCLK, mem_clk
mem_2x_clk
mem_2x_clk
mem2x1x_clk
Figure 5-3. Timing Diagram—Clock Waveforms for SDRAM and DDR Memories
Since the XLB is 64bits and the SDRAM external bus is 32bits, when SDR (single data rate) SDRAM memory is used, the XLB bandwidth
is only half utilized. When DDR (dual data rate) memory is used, the XLB bandwidth is fully used on SDRAM transactions.
MPC5200 supplies 2 external memory clocks as part of the SDRAM interface:
• MEM_MEMCLK
• MEM_MEMCLK
These 2 clocks are always the same frequency as XLB clock. SDR memory uses MEM_MEMCLK only; DDR memory uses both.
mode. The 603e G2_LE Core must enable the deep sleep process in the CDM module, then put itself into sleep mode before the 603e G2_LE
Core PLL can be disabled.
Since MPC5200 clocks are stopped in Deep Sleep mode, the wake-up time is longer than in the 603e G2_LE Core-only power down modes.
A power-on sequence must occur which re-locks both the MPC5200 system and processor PLLs.
The sequence of events to enter and exit Deep Sleep mode are initiated by the 603e G2_LE Core under software control and then sequenced
in hardware by the Clock Control Sequencer (CCS) in CDM.
• CDM JTAG ID Number Register—MBAR + 0x0200 • CDM Clock Control Sequencer Configuration Register
(0x0200), read-only (0x021C)
• CDM Power On Reset Configuration Register • CDM Soft Reset Register (0x0220)
(0x0204)
• CDM Bread Crumb Register—MBAR + 0x0208 • CDM System PLL Status Register (0x0224)
(0x0208), never reset
• CDM Configuration Register (0x020C) • PSC1 Mclock Config Register—MBAR + 0x0228
(0x0228)
• CDM 48MHz Fractional Divider Configuration • CDM PSC2 Mclock Config (0x022C)
Register (0x0210)
• CDM Clock Enable Register (0x0214) • CDM PSC3 Mclock Config (0x0230)
• CDM System Oscillator Configuration Register • (0x0234)
(0x0218)
W Unused
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
W Unused
RESET: 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0 1
_bypass
R Reserved Reserved, Read Only
sys_pll
select_0
select_1
select_2
select_3
select_4
Write 0
tap_
tap_
tap_
tap_
tap_
RESET: 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 V
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
ram_swap
R
ram_type
ram_size
ram_wait
ram_mg
sys_pll_
sys_pll_
ppc_pll
ppc_pll
ppc_pll
ppc_pll
ppc_pll
clk_sel
_cfg_0
_cfg_1
_cfg_2
_cfg_3
_cfg_4
ram_lf
boot_
boot_
boot_
boot_
boot_
boot_
msrip
cfg_1
cfg_0
ppc_
xlb_
RESET: V V V V V V — V V V V V V V V V
3 tap_select_0 Indicates the delay of the internal sdram controller read clock with respect to the
internal memory clock mem_clk (SDR) or mem_2x_clk (DDR).
4 tap_select_1
5 tap_select_2
6 tap_select_3
7 tap_select_4
15 sys_pll_bypass bit=0:Normal mode. The SYS OSC clock input is multiplied up by the system PLL, then
the PLL VCO is divided down to produce internal clocks.
bit=1:The SYS OSC clock input is used directly, bypassing the system PLL. No
multiplication of the input frequency is performed, but the input frequency is divided to
produce internal clocks just as the system PLL VCO frequency would be. sys_pll_cfg_1
and sys_pll_cfg_0 are ignored.
27 ppc_pll_cfg_0 603e G2_LE Core core pll config pins. See also Table 5-6
28 ppc_pll_cfg_1
29 ppc_pll_cfg_2
30 ppc_pll_cfg_3
31 ppc_pll_cfg_4
RESET: — — — — — — — — — — — — — — — —
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: — — — — — — — — — — — — — — — —
clk_sel
R Reserved Reserved
mode
ddr_
xlb_
Write 0 Write 0
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 V
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
NOTE
The clock ratio should only be changed if no module, which is clocked by the IPB and/or PCI clock,
is currently running. Suggestion is to change the clock ratio during the boot time only.
48mhz_en
Write 0 Write 0
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
Write 0
Write 0
Write 0
Write 0
Rsrvd
Rsrvd
Rsrvd
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 — These fields hold 4 phase divide ratios used by the fractional divider. The fields are
incompletely decoded; fsystem /11 is obtained with 3 values.
17–19 cgfd_p3_cnt[2:0]
110–fractional counter divide ratio fsystem /6
20 — 111–fractional counter divide ratio fsystem/7
21–23 cgfd_p2_cnt[2:0] 000–fractional counter divide ratio fsystem/8
001–fractional counter divide ratio fsystem /9
24 —
010–fractional counter divide ratio fsystem/10
25–27 cgfd_p1_cnt[2:0]
011–fractional counter divide ratio fsystem/11
28 — 10X–fractional counter divide ratio fsystem/11
29–31 cgfd_p0_cnt[2:0]
R Reserved
clk_en
clk_en
clk_en
clk_en
mem_
pci_
lpc_
slt_
Write 0
W
RESET: 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
bdlc_clk_
R
psc345_
mscan_
scom_
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
clk_en
timer_
psc2_
psc1_
gpio_
usb_
psc6
ata_
eth_
irrx_
irtx_
spi_
i2c_
en
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
13 pci_clk_en PCI Bus Clock Enable—controls PCI bus control module clocks
Note: PCI Arbiter and external PCI Bus clocks are not controlled by pci_clk_en.
14 lpc_clk_en Local Plus Bus Clock Enable—controls LP bus control module clocks
17 ata_clk_en ATA Clock Enable—controls ATA disk drive control module clocks
24 psc345_clk_en PSC345 Clock Enable—control clock to the PSC3, PSC4 and PSC5 module
Note: Enable value 1, enables the corresponding clock. Enable value 0, disables corresponding clock.
Reserved Reserved
sys_osc_
disable
R Write 0 Write 0
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
Write 0
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ccs_osc_
sleep_en
sleep_en
R Reserved Reserved
ccs_
Write 0 Write 0
W
RESE 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
T:
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
ccs_qreq
R Reserved
_test
Write 0
W
RESE 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
T:
31 ccs_qreq_test CCS Test bit—Used in CCS module functional simulation to simulate a QREQ signal.
bit=0:QREQ input to CCS forced active.
bit=1:QREQ input to CCS comes directly from 603e G2_LE Core.
ckstp_reset
R Reserved Reserved
cdm_no_
cdm_soft
_reset
Write 0 Write 0
W
RESET: 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
Write 0
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
pll_lost
R Reserved Reserved _lock
Write 0 Write 0
W
RESET: 0 0 0 0 0 0 0 — 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
lock_window
R Reserved Reserved
pll_small_
Write 0 Write 0
W
RESET: 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
R Reserved
Write 0
W
RESET: 0 0 0 0 0 0 0 — 0 0 0 0 0 0 0 —
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
Mclock
R Reserved MclkDiv[8:0]
Enable
Write 0
W
RESET: 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
23-31 MclkDiv[8:0] The counter divide the fsystem frequency by MclkDiv+1. A vallue of 0x00 in this
register turns off internally generated Mclock.
For example, a value of 7 in this register, where fsystem clock is at a frequency of
528MHz would result in a Mclock rate of 528/8, or 66 MHz.
Note: fsystem clock is always 12 or 16 times the reference clock, sys_xtal_in,
depending on sys_pll_cfg_0 at reset.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
Mclock
Enable
R Reserved MclkDiv[8:0]
Write 0
W
RESET: 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
R Reserved MclkDiv[8:0]
Write 0
W
RESET: 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
R Reserved
Write 0
W
RESET: 0 0 0 0 0 0 0 — 0 0 0 0 0 0 0 —
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved MclkDiv[8:0]
Enable
Mclock
Write 0
W
RESET: 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
23-31 MclkDiv[8:0] The counter divide the fsystem frequency by MclkDiv+1. A vallue of 0x00 in this
register turns off internally generated Mclock.
For example, a value of 7 in this register, where fsystem clock is at a frequency of
528MHz would result in a Mclock rate of 528/8, or 66 MHz.
Note: fsystem clock is always 12 or 16 times the reference clock, sys_xtal_in,
depending on sys_pll_cfg_0 at reset.
Chapter 6
G2_LE Processor Core
6.1 Overview
The following sections are contained in this document:
• MPC5200 G2_LE Processor Core Functional Overview
• G2_LE Core Reference Manual
Revision SVR
1.0 80110010
1.1 80110011
1.2 80110012
Chapter 7
System Integration Unit (SIU)
7.1 Overview
The following sections are contained in this document:
• Interrupt Controller, includes:
— Interrupt Controller Registers
• General Purpose I/O (GPIO), includes:
— GPIO Standard Registers—MBAR+0x0B00
— WakeUp GPIO Registers—MBAR+0x0C00
• General Purpose Timers (GPT), includes:
— GPT Registers—MBAR + 0x0600
• Slice Timers, includes:
— SLT Registers—MBAR + 0x0700
• Real-Time Clock, includes:
— RTC Interface Registers—MBAR + 0x0800
NOTE
Watchdog timer functions are included in the GPT section.
The System Integration Unit (SIU) controls and support the functions listed above.
External IRQ 4 Can be programmed as level or edge sensitive. Provides interrupt requests to
Interrupts Interrupt Controller for external devices.
Slice Timers 2 “Tick” generators. Suitable for operating system update tick.
General Timers 8 Generates interrupt in Input Capture mode or Internal Timer mode. Timers 6 and 7
can interrupt from NAP/DOZE power-down.
BestComm and 19 Various peripherals are priority programmed and encoded into HI or LO interrupt to
Peripherals the Interrupt Controller. BestComm Controller interrupt is connected to HI interrupt.
WakeUp 8 These are special GPIO pins with WakeUP capability. There are 8 such pins
funneled into one interrupt. The source module is gpio_wkup.
GPIO 8 GPIO pins with simple interrupt capability (not available in power down mode). The
source module is gpio_std.
Table 7-1 does not include machine-check bus errors or transaction handshaking. Core interrupt pins given in Section 7.2.1.1, Machine Check
Pin—core_mcp through Section 7.2.1.3, Standard Interrupt—core_int show core interrupt priority.
Interrupt Description
Enables The MSR[ee] bit must be set to enable interrupts at this core pin. The MSR[ee] bit is
automatically cleared when an interrupt occurs. Therefore, the exception handler must re-set
this bit when interrupt is cleared.
Recovery/Status Recovery is highly dependant on system and software design. Where multiple sources are tied
to the same interrupt, a status register is provided to distinguish the interrupting source.
Timing Assertion of this interrupt is persistent (i.e., interrupt remains until cleared). If other interrupts
are pending when first interrupt is cleared, the core_smi pin should remain asserted for
handling once the current exception handler re-sets the MSR[ee] bit.
Connections Standard external and internal interrupts can be connected to this high priority interrupt. Slice
timer 1 is a dedicated connection.
IRQ[0]
Slice Timer 0
CCS Wkup core_cint
BestComm
HI_int
Peripherals
(ATA/PCI etc.)
LO_int
Slice Timer 1
core_smi
IRQ[1:3]
4
Timers CORE
(IC, OC, PWM)
4 core_mcp
Slice 0 core_cint
Timers 1
core_smi
Real Time
Clock core_int
8
GPIO/Std
8 Main Interrupt
GPIO/WakeUp Controller
IRQ0
cint_ded Encoder
Peripheral 1 IRQ1 smi_ded
Peripheral 2 int_ded
IRQ2 Grouper
Encoder
Peripheral 3 IRQ3
programmable inputs
Peripheral 4
Grouper
Encoder
Peripheral 5
HI
Peripheral 6
LO
Peripheral …
NOTE:
1. Grouper and Encoder functions imply
XLB Arbiter BestComm programmability in software.
Controller
correct behavior, the 603e core always completes the core_int before treating the core_smi. In this case, the CPU does not authorize nested
interrupt at the exception if the ISR set the 603e’s MSR[EE] to support nested interrupt (core_smi and core_int).
In order to guaranty the assertion of the core_cint when a core_int is pending, the ISR needs to force the re-evaluation of the Peripheral
Interrupt condition by writing “1” to the Peripheral Status Encoded Pse msb. The ISR has to repeatedly set this bit since the interrupt events
are indeterministic. Moreover, the Peripheral Interrupt sources directed to core_cint needs to have their priorities to be higher than the LO_int
Peripheral Interrupt sources. The Interrupt Controller always activates first the pending interrupt having the highest priority. Like for the
Peripheral Interrupt Group, the ISR needs to set the Main Status Encoded MSe msb to force re-evaluation of the Main Interrupt Condition and
each Main Interrupt Priority needs to be properly programmed.
• ICTL Peripheral Interrupt Mask Register (0x0500) • ICTL PerStat, MainStat, CritStat Encoded Register
(0x0524)
• ICTL Peripheral Priority and HI/LO Select 1 Register • ICTL Critical Interrupt Status All Register (0x0528)
(0x0504)
• ICTL Peripheral Priority and HI/LO Select 2 Register • ICTL Main Interrupt Status All Register (0x052C)
(0x0508)
• ICTL Peripheral Priority and HI/LO Select 3 Register • ICTL Peripheral Interrupt Status All Register (0x0530)
(0x050C)
• ICTL External Enable and External Types Register • ICTL Bus Error Status Register (0x0538)
(0x0510)
• ICTL Critical Priority and Main Interrupt Mask • ICTL Main Interrupt Emulation All Register (0x0540)
Register) (0x0514)
• ICTL Main Interrupt Priority and INT/SMI Select 1 • ICTL Peripheral Interrupt Emulation All Register
Register (0x0518) (0x0544)
• ICTL Main Interrupt Priority and INT/SMI Select 2 • ICTL IRQ Interrupt Emulation All Register (0x0544)
Register (0x051C)
R Per_mask
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Per_mask Reserved
RESET: 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
— Per_mask Bits 0:23—To mask/accept individual peripheral interrupt sources. This masking is in
addition to interrupt enables, which may exist in each source module.
0=Accept interrupt from source module.
1=Ignore interrupt from source module.
Important—See Note 1.
19 Per_mask Reserved
20 Per_mask Reserved
24:31 — Reserved
Note:
1. Setting these bits prevents an interrupt being presented to the core pins for the masked sources. Encoded status
indications in the ICTL Perstat, MainStat, CritiStat Encoded Register are suppressed, but the binary "all" status bits (PSa
in ICTL Peripheral Interrupt Status All Register) are active as long as the source module is presenting an active input to
the Interrupt Controller.
7.2.4.2 ICTL Peripheral Priority and HI/LO Select 1 Register —MBAR + 0x0504
Table 7-5. ICTL Peripheral Priority and HI/LO Select 1 Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
— Per[x]_pri Priority encoding is done using 4 configuration bits per input source. Each group of 4bits
controls the source priority in relation to other peripheral sources. The most significant bit
(msb) of each config nibble is called the HI/LO or "bank" bit.
If this bit is high it implies not only a high priority, but causes this interrupt source to assert a
HI interrupt condition. Under most circumstances this creates a Critical Interrupt assertion to
the core. See Note 1.
Peripherals with identical priority settings (either zero or non-zero) are default prioritized with
"lower peripheral has higher priority". In other words, Per1 has a default priority higher than
Per2.
Note:
1. Per0_pri, associated with the BestComm interrupt source, is not programmable and always has the highest peripheral
priority and always results in a HI interrupt condition to the Interrupt Controller. These bits are writable and readable, but
have no effect on controller operation.
7.2.4.3 ICTL Peripheral Priority and HI/LO Select 2 Register —MBAR + 0x0508
Table 7-6. ICTL Peripheral Priority and HI/LO Select 2 Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7.2.4.4 ICTL Peripheral Priority and HI/LO Select 3 Register —MBAR + 0x050C
Table 7-7. ICTL Peripheral Priority and HI/LO Select 3 Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
— Per[x]_pri Identical to Peripheral_Priority 2 register, but related to peripheral interrupt sources 16–21.
All bits are programmable and significant.
7.2.4.5 ICTL External Enable and External Types Register —MBAR + 0x0510
Table 7-8. ICTL External Enable and External Types Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
— ECLR[x] These bits clear external IRQ interrupt indications. When an IRQ input is configured as an
edge-sensitive input, the Interrupt Controller must be notified that the specific interrupt has
been serviced. Software must write 1 to the appropriate bit position to clear the interrupt
indication. ECLR bits are always read as 0 (i.e., they do not contain status).
8:9 Etype0 These bits control how the Interrupt Controller interprets the IRQ[0] input pin.
00 = Input is level sensitive and active hi
01 = Input is edge sensitive, rising edge active”
10 = Input is edge sensitive, falling edge active”
11 = Input is level sensitive, and active low”
10:11 Etype1 Same as above, but for the IRQ[1] input pin.
12:13 Etype2 Same as above, but for the IRQ[2] input pin.
14:15 Etype3 Same as above, but for the IRQ[3] input pin.
19 MEE Master External Enable—clearing this bit masks all IRQ input transitions (including status
indications).
— EENA[x] Individual enable bits for each IRQ input pin. Setting the associated bit lets the related IRQ
pin generate interrupts. In either case, status indications in PSa and CSa (ICTL Peripheral
Interrupt Status All Register) are active.
20 EENA0 IRQ[0]
21 EENA1 IRQ[1]
22 EENA2 IRQ[2]
23 EENA3 IRQ[3]
24:30 — Reserved
31 CEb Critical Enable—a special control bit, which if set, directs critical interrupt sources to the
normal core Interrupt pin. This is for system programmer who prefers to handle all interrupts
in a single ISR.
The status operation remains unchanged, it is necessary to parse Critical Status information
prior to Normal Status information to detect critical interrupt sources routed to the normal
interrupt pin.
7.2.4.6 ICTL Critical Priority and Main Interrupt Mask Register—MBAR + 0x0514
Table 7-9. ICTL Critical Priority and Main Interrupt Mask Register)
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Main_Mask
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 Crit0_pri Priority encoding value for Critical Interrupt 0, IRQ[0] input pin.
There are four Critical Interrupt sources that can be uniquely prioritized (a higher Priority
value creates a higher priority, i.e. a value of 3 is the highest priority value). In the case of
identical priority value, the lower numbered interrupt source has priority. This makes
IRQ[0] the highest default priority (being the lowest numbered source).
2:3 Crit1_pri Priority encoding value for Slice Timer 0 interrupt source. Hard-wired as critical interrupt
source number 1, it has the second highest default priority.
4:5 Crit2_pri Priority encoding value for HI_int interrupt source. Hard-wired as critical interrupt source
number 2. It is programmable such that any peripheral source can be directed to it, and
thus get maximum priority service.
6:7 Crit3_pri Priority encoding value for CCS WakeUp source. Hard-wired as critical interrupt source
number 3.
8:14 — Reserved
— Main_Mask[x] To mask/accept individual main interrupt sources (as opposed to peripheral or critical
interrupt sources). This masking is in addition to interrupt enables, which may exist in each
source module.
0=Default. Accept interrupt from source module.
1=Ignore interrupt from source module.
Take care if masking LO_int, which is a collection of multiple Peripheral sources in a single
presentation. Masking LO_int essentially prevents any LO Peripheral from generating an
interrupt, even when those interrupts are enabled (i.e., unmasked) in Per_Mask, Reg0.
Important—See Note 1.
15 Main_Mask0 Slice Timer 1, which is hardwired to SMI interrupt output. See Note 2.
— — Interrupt sources below are bank/priority programmable (in Reg6 and Reg7).
Note:
1. Setting these bits prevents an interrupt being presented to the masked sources core pins. Encoded status indications
(MSe in Reg9) are therefore suppressed, but the binary all status bits (MSa in RegB) are active as long as the source
module is presenting an active input to the Interrupt Controller. Masking IRQ[1:3], is redundant with External ENA bits
in Reg4, but both masks are applied.
2. Slice Timer 1 is hard-coded and neither bank nor priority adjustable.
7.2.4.7 ICTL Main Interrupt Priority and INT/SMI Select 1 Register —MBAR + 0x0518
Table 7-10. ICTL Main Interrupt Priority and INT/SMI Select 1 Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4:7 Main2_pri Main interrupt source 2 (IRQ[2] input pin) priority encoding value.
8:11 Main3_pri Main interrupt source 3 (IRQ[3] input pin) priority encoding value.
12:15 Main4_pri Main interrupt source 4 (LO_int) priority encoding value. LO_int is a collection of any
Peripheral Interrupts directed to this interrupt source. Peripheral interrupts sources are
directed to either LO_int, or to the critical interrupt source HI_int.
20:23 Main6_pri Main interrupt source 6 (RTC_stopwatch and RTC_alarm) priority encoding value.
24:27 Main7_pri Main interrupt source 7 (GPIO_std) priority encoding value. GPIO_std is a collection of all
simple interrupt GPIO pins enabled for Interrupt operation.
Note:
1. Main source 0 (Slice Timer 1) is not listed, it is fixed as both the highest priority main interrupt and to generate an SMI
interrupt output only.
7.2.4.8 ICTL Main Interrupt Priority and INT/SMI Select 2 Register—MBAR + 0x051C
Table 7-11. ICTL Main Interrupt Priority and INT/SMI Select 2 Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
24:27 Main15_pri Main interrupt source 15 (TMR6) priority encoding value. See Note 1.
28:31 Main16_pri Main interrupt source 16 (TMR7) priority encoding value. See Note 1.
Note:
1. This timer has WakeUp functionality and therefore can provide a WakeUp interrupt source.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2:7 PSe Peripheral Status Encoded—makes a singular indication of the current peripheral interrupt
(6bits indicating 1 of 24 possible peripheral interrupts).
The msb operates as a flag bit and is set if any peripheral interrupt is currently being
presented by the Interrupt Controller (e.g., if peripheral interrupt source 0 is current, then this
register reads as 0x20). Normally it would not be necessary to clear this status register since
all peripheral interrupt sources are level sensitive.
Once an interrupt source negates at the input of the controller, the new input condition is
re-evaluated without software intervention. However, if ISR does not clear the interrupt
source (at the source module), then the controller is locked on the current interrupt and
cannot re-evaluate the input condition (possibly to detect the presence of a higher priority
interrupt). Therefore, ISR can force a re-evaluation of the input condition by writing 1 to the
msb of PSe. This sticky-bit clear operation is optional and can be used at the discretion of
the ISR writer.
The encoded value cross-reference to a specific source is described in ICTL Peripheral
Interrupt Mask Register and re-stated in ICTL Peripheral Interrupt Status All Register. In all
cases, the peripheral status encoded value converts to a single source module (i.e., no
additional status parsing is required at the Interrupt Controller).
8:9 — Reserved
10:15 MSe Main Status Encoded—makes a singular indication of the current main interrupt (6 bits
indicating 1 of 17 possible main interrupts).
The msb operates as a flag bit, as described above. The msb can also be written to 1 to force
a re-evaluation of the main interrupt sources.
The cross-reference of the encoded value to a particular source is described in Reg5 (main
mask) and re-stated in ICTL Main Status All Register.
All MSe values convert to a single source module, EXCEPT Main source 4 (LO_int), which
indicates a peripheral source is active. In this case it is necessary to parse the PSe to
determine which peripheral source is active. See Note 1.
16:20 — Reserved
21:23 CSe Critical Status Encoded—makes a singular indication of the current critical interrupt (3bits
indicating 1 of 4 possible interrupts).
The msb operates as a Flag bit, as described above. This msb can also be written to 1 to
force a re-evaluation of the critical interrupt sources.
00 = IRQ input pin is the source. See Note 2.
01 = Slice Timer 0 is the source.
10 = HI_int is the source. See Note 3.
11 = CCS module is the source. WakeUp from deep-sleep. See Note 4.
24:30 — Reserved
31 CEbSh Critical Enable bar Shadow bit—this is a special bit that shadows the setting programmed
into ICTL External Enable and External Types Register. This bit indicates whether Critical
interrupt sources have or have not been directed to the normal INT core pin.
If Critical interrupts are directed to INT (CEbSh = 1), to detect higher priority interrupt
sources, INT ISR must always parse the CSe prior to MSe or PSe. All other processing
remains the same.
This shadow bit is provided here so a single read to this register can obtain all necessary
information to make the interrupt source determination.
Note:
1. For Main sources 1, 2, and 3 that represent IRQ[1:3] respectively, if the IRQ pin is set as edge sensitive, it is REQUIRED
that the MSe flag bit be cleared (i.e., written to 1) or the appropriate ECLR bit in ICTL External Enable and External
Types Register be set to clear this interrupt indication. Only one method should be used, not both (this limit is only true
for multiple edge-sensitive IRQ inputs).
2. For IRQ[0] set as edge sensitive, it is REQUIRED that either the CSe flag bit be cleared (i.e., written to 1) or the
ECLR[0] bit in ICTL External Enable and External Types Register be set to clear this interrupt indication.
You can do both if desired, and you can do it regardless of the IRQ[0] interrupt type.
3. This indicates a peripheral source programmed for HI bank priority is the source. It is necessary to parse the PSe value
to determine the peripheral source module.
4. For recovery from deep-sleep mode, it is necessary to acknowledge this WakeUp interrupt by writing 1 to the msb of
this field (CSe). Only then does the CCS module release it's power-down internal signal and let MPC5200 operate
normally.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
— CSa[x] Critical Interrupt Status All—Indicates all pending interrupts, including the currently active
interrupt (if any). CSa is binary, showing each active interrupt input in its corresponding bit
position. See Note 1.
Number in parenthesis indicates equivalent encoded value in CSe, ICTL PerStat, MainStat,
CritStat Encoded Register.
8:31 — Reserved
Note:
1. No direct mask register is defined for critical interrupts. However, IRQ[0] can be masked by the MEE bit in Reg4, in which
case CSa status does not occur. If only the EENA[0] bit in ICTL External Enable and External Types
Register is cleared, then CSa status occurs, but controller does not assert a core interrupt.
R Reserved MSa
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R MSa
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:14 — Reserved
— MSa[x] Main Interrupt Status All. Indicates all pending interrupts. Is binary, showing each active
interrupt in its corresponding bit position. See Note 1.
Number in parenthesis indicates equivalent encoded value in MSe, Reg9.
Note:
1. All main interrupt sources are directly maskable in Main_Mask, ICTL Critical Priority and Main Interrupt Mask Register.
If masked in Main_Mask, status information still shows in MSa. However, if interrupt is not enabled at the source module
(i.e., in source module registers) the Interrupt Controller cannot observe or record status information for that interrupt.
R Reserved PSa
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 — Reserved
— PSa[x] Peripheral Interrupt Status All. Indicates all pending interrupts. Is binary, showing each active
interrupt in its corresponding bit position. See Note 1.
Number in parenthesis indicates equivalent encoded value in PSe, ICTL PerStat, MainStat,
CritStat Encoded Register.
9 PSa22 BDLC
11 PSa1 PSC1
12 PSa2 PSC2
13 PSa3 PSC3
14 PSa4 PSC6
15 PSa5 Ethernet
16 PSa6 USB
17 PSa7 ATA
21 PSa11 PSC4
22 PSa12 PSC5
25 PSa15 I2C1
26 PSa16 I2C2
27 PSa17 CAN1
28 PSa18 CAN2
29:30 — Reserved
Note:
1. These interrupts are directly maskable by ICTL Peripheral Interrupt Mask Register. However, PSa status occurs
regardless of Per_Mask setting, as long as the source module interrupt is enabled in the source module registers.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:5 — Reserved
6 BE1 Bus Error 1—Indicates write attempt to read-only register, clear with a write to 1.
7 BE2 Bus Error 0—Indicates access to unimplemented register, clear with a write to 1.
8:31 — Reserved
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R MEa
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:14 — Reserved
— MEa[x] This register provides a way for software to emulate the assertion of a particular Main/SIU
interrupt. The actual interrupt is the OR or the normal interrupt source and each of these test
register bits. The order is exactly the same as the MSa in
ICTL Main Interrupt Status All Register.
The MEa[x] bits ARE masked by the Main_Mask setting, so they operate as
much as possible as the real interrupt source. Even the IRQ sources, which may be
programmed as edge sensitive, will react just like the pin when emulated here with test bit
assertion/negation. One exception is LO-int, which if asserted here, will NOT create a
corresponding Peripheral Status indication.
If relying on MEa [x] assertion/negation to emulate and test an ISR routine it is
important to disable all source modules so that real source interrupts will not disturb
the test generated interrupt.
R Reserved PEa
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 — Reserved
— PEa[x] This register provides a way for software to emulate the assertion of a particular Peripheral
interrupt. The actual interrupt is the OR or the normal interrupt source and each of these test
register bits. The order is exactly the same as the PSa in ICTL Peripheral Interrupt Status All
Register. The PEa[x] bits ARE masked by the Per_Mask setting, so they operate as much as
possible as the real interrupt source. Test assertion of a Periperhal source will cause HI-int
or LO-int indications which will be reflected in the Main or Critical status registers. If relying
on PEa[x] assertion/negation to emulate and test an ISR routine it is important to disable all
source modules so that real source interrupts will not disturb the test generated interrupt.
9 PEa22 BDLC
11 PEa1 PSC1
12 PEa2 PSC2
13 PEa3 PSC3
14 PEa4 PSC6
15 PEa5 Ethernet
16 PEa6 USB
17 PEa7 ATA
21 PEa11 PSC4
22 PEa12 PSC5
25 PEa15 I2C1
26 PEa16 I2C2
27 PEa17 CAN1
28 PEa18 CAN2
29:30 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
— IRQEa[x] This register provides a way for software to emulate the assertion of a particular external
interrupt pin. The actual interrupt is the OR of the normal interrupt source and each of these
IRQEa[x] bits.
This register represents the four IRQ inputs. This register is redundant with IICTL Main
Interrupt Emulation All Register for IRQ1-3 but is the only source to emulate IRQ0. It provides
a single register with which to test and develop an ISR for the external interrupt sources.
Each bit operates as if it were the pin itself, i.e. edge sensitive operation would require
multiple test writes to create the emulation of a pulsing input. See Note 1
8:31 — Reserved
Note:
1. The emulation is only possible if the IRQ pins are externally pulled down. Otherwise the OR between the external pin
values and the IRQEa[x] bits is whole the time one.
PSC1_0 UART1/AC971/CODEC1 No No
PSC1_1 UART1/AC971/CODEC1 No No
PSC1_2 UART1/AC971 No No
PSC1_3 UART1/AC971/CODEC1 No No
PSC2_0 UART2/AC972/CODEC2/CAN1 No No
PSC2_1 UART2/AC972/CODEC2/CAN1 No No
PSC2_2 UART2/AC972/CAN2 No No
PSC2_3 UART2/AC972/CODEC2/CAN2 No No
GPIO_PSC3_0 USB2/CODEC3/UART3 No No
GPIO_PSC3_1 USB2/CODEC3/UART3 No No
GPIO_PSC3_2 USB2/CODEC3/UART3 No No
GPIO_PSC3_3 USB2/CODEC3/UART3 No No
GPIO_PSC3_6 USB2/SPI No No
GPIO_PSC3_7 USB2/SPI No No
GPIO_ETHI_0 Ethernet/UART5 No No
GPIO_ETHI_1 Ethernet/UART5 No No
GPIO_ETHI_2 Ethernet No No
GPIO_ETHI_3 Ethernet No No
GPIO_IRDA_0 IRDA/UART6/Codec6 No No
Alternate Func 1
Pin MUX Logic
IN OUT
BC
Enabled
Alternate Func 2
IN OUT
BC
Enabled
I/O Cell
TIMER Multi-
Function
IN OUT
I/O
BC
Enabled
GPIO/d/W
ODconfig
IN OUT Priority
Output Enable
BC
Logic
Awake Enabled
Note:
1. Open-Drain Emulation is supported on the GPIO function.
2. Pin MUX Logic is controlled by the Port Configuration Register and supersedes any individual
GPIO register programming.
7.3.1.4 USB1/RST_CONFIG
This is a 10-bit port dedicated to primary USB. GPIO becomes available only if the USB function is not used. When this occurs, the following
GPIO becomes available:
• 4 Simple GPIO
• 1 Interrupt GPIO
Other pins on this port serve as Reset Configuration inputs.
7.3.1.5 Ethernet/USB2/UART4/5/J1850/RST_CONFIG
This port consists of 8 output data pins and 10 control pins (in ethernet mode). For GPIO grouping these are the EthO and EthI ports,
respectively. The output-only pins (EthO) are also used for input reset configuration data, therefore these pins must act as output only in all
other cases. No peripheral is allowed to overdrive the reset configuration pull-up/pull-down settings. The 8 GPIOs on the EthO port are
therefore output-only, and only available if the pin is otherwise unused (beyond reset config).
NOTE
The ethernet pin, MDIO, is actually an I/O. However, there should be no danger of an external chip
driving this pin during power-up.
This port is configured such that 7-wire Ethernet and a secondary USB port can exist simultanaeouly. This configuration makes available 1
GPIO WakeUp pin.
Full Ethernet consumes all 18 pins, unless the optional MDIO and MDC pins are specified as unused. In this case, 2 Output Only GPIO are
available.
Meanwhile, there are other cases becasue many pins can be used for UART, J1850. Please Refer to the port-mapping illustrations for details.
USB stand-alone usage leaves available:
• 2 Output Only GPIO
• 4 Simple GPIO
• 1 WakeUp GPIO
7-wire Ethernet stand-alone leaves available:
• 6 Output Only GPIO
• 4 Interrupt GPIO
• 1 WakeUp GPIO
1850 stand-alone leaves available:
• 7 Output Only GPIO
• 4 Simple GPIO
• 3 Interrupt GPIO
• 1 WakeUp GPIO
Total GPIO available on this port is:
• 8 Output Only GPIO
• 4 Simple GPIO
• 4 Interrupt GPIO
• 1 WakeUp GPIO
7.3.1.6 PSC6
The PSC6 port has 4 pins, which includes:
• 2 Simple GPIO
• 2 WakeUp GPIO
Hardware functions available are:
• IRDA
— 3 pins with clock input
— 2 pins with internal clock
• UART (4 pins)
• Codec (4 pins)
The IRDA clock pin can be used as a Input USB clock and is separately programmable for this use.
• If unused, the IRDA Receive pins are available as WakeUp GPIO.
• If unused, the IRDA Transmit pin and the Clock pin are available as Simple GPIO.
7.3.1.7 I2 C
There are 2 I2C ports consisting of 2 pins each. Although no GPIO is available on these pins, they can be alternately programmed as CAN1
pins (on I2C1) and/or as the ATA Chip Selects (on I2C2). If the alternate function is specified, the associated I2C port is consumed and
unavailable.
• Timer pins 6 and 7 are dedicated as Timer GPIO and have no alternate function.
Although the Timer as GPIO only operates to the Simple GPIO level, Interrupt capability can be achieved by configuring the Timer for Input
Capture mode.
• GPS Port Configuration Register (0x0B00) • GPS GPIO Simple Interrupt Enables Register (0x0B20)
• GPS Simple GPIO Enables Register (0x0B04) • GPS GPIO Simple Interrupt Open-Drain Emulation
Register (0x0B24)
• GPS Simple GPIO Open Drain Type Register (0x0B08) • GPS GPIO Simple Interrupt Data Direction Register
(0x0B28)
• GPS Simple GPIO Data Direction Register (0x0B0C) • GPS GPIO Simple Interrupt Data Value Out Register
(0x0B2C)
• GPS Simple GPIO Data Output Values Register • GPS GPIO Simple Interrupt Interrupt Enable Register
(0x0B10) (0x0B30)
• GPS Simple GPIO Data Input Values Register • GPS GPIO Simple Interrupt Interrupt Types Register
(0x0B14) (0x0B34)
• GPS GPIO Output-Only Enables Register (0x0B18) • GPS GPIO Simple Interrupt Master Enable Register
(0x0B38)
• GPS GPIO Output-Only Data Value Out Register • GPS GPIO Simple Interrupt Status Register (0x0B3C)
(0x0B1C)
IR_USB_CLK
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 — Reserved
24 — Reserved
28 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2:3 IRDA Individual enable bits for the 2 Simple GPIO on IRDA port.
bit 2 controls GPIO_IRDA_1 (IR_USB_CLK pin)
bit 3 controls GPIO_IRDA_0 (IRDA_TX pin)
0 = Disabled for GPIO (default)
1 = Enabled for GPIO
4:7 ETHR Individual enable bits for the 4 Simple GPIO on ETHR port.
bit 4 controls GPIO_ETHI_3 (ETH_11 pin)
bit 5 controls GPIO_ETHI_2 (ETH_10 pin)
bit 6 controls GPIO_ETHI_1 (ETH_9 pin)
bit 7 controls GPIO_ETHI_0 (ETH_8 pin)
0 = Disabled for GPIO (default)
1 = Enabled for GPIO
8:11 — Reserved
12:15 USB Individual enable bits for the 4 Simple GPIO on USB port.
bit 12 controls GPIO_USB_3 (USB1_8 pin)
bit 13 controls GPIO_USB_2 (USB1_7 pin)
bit 14 controls GPIO_USB_1 (USB1_6 pin)
bit 15 controls GPIO_USB_0 (USB1_0 pin)
0 = Disabled for GPIO (default)
1 = Enabled for GPIO
16:17 — Reserved
18:23 PSC3 Individual enable bits for the 6 Simple GPIO on PSC3 port.
bit 18 controls GPIO_ PSC3_5 (PSC3_7 pin)
bit 19 controls GPIO_ PSC3_4 (PSC3_6 pin)
bit 20 controls GPIO_ PSC3_3 (PSC3_3 pin)
bit 21 controls GPIO_ PSC3_2 (PSC3_2 pin)
bit 22 controls GPIO_ PSC3_1 (PSC3_1 pin)
bit 23 controls GPIO_ PSC3_0 (PSC3_0 pin)
0 = Disabled for GPIO (default)
1 = Enabled for GPIO
24:27 PSC2 Individual enable bits for the 4 Simple GPIO on PSC2 port.
bit 24 controls GPIO_PSC2_3 (PSC2_3 pin)
bit 25 controls GPIO_PSC2_2 (PSC2_2 pin)
bit 26 controls GPIO_PSC2_1 (PSC2_1 pin)
bit 27 controls GPIO_PSC2_0 (PSC2_0 pin)
0 = Disabled for GPIO (default)
1 = Enabled for GPIO
28:31 PSC1 Individual enable bits for the 4 Simple GPIO on PSC1 port.
bit 28 controls GPIO_PSC1_3 (PSC1_3 pin)
bit 29 controls GPIO_PSC1_2 (PSC1_2 pin)
bit 30 controls GPIO_PSC1_1 (PSC1_1 pin)
bit 31 controls GPIO_PSC1_0 (PSC1_0 pin)
0 = Disabled for GPIO (default)
1 = Enabled for GPIO
7.3.2.1.3 GPS Simple GPIO Open Drain Type Register —MBAR + 0x0B08
Table 7-23. GPS Simple GPIO Open Drain Type Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2:3 IRDA Individual bits to cause open drain emulation for pins configured as GPIO output.
bit 2 controls GPIO_IRDA_1 (IR_USB_CLK pin)
bit 3 controls GPIO_IRDA_0 (IRDA_TX pin)
0 = Normal CMOS output (default)
1 = Open Drain emulation (a drive to high creates Hi-Z)
4:7 ETHR Individual bits to cause open drain emulation for pins configured as GPIO output.
bit 4 controls GPIO_ETHI_3 (ETH_11 pin)
bit 5 controls GPIO_ETHI_2 (ETH_10 pin)
bit 6 controls GPIO_ETHI_1 (ETH_9 pin)
bit 7 controls GPIO_ETHI_0 (ETH_8 pin)
0 = Normal CMOS output (default)
1 = Open Drain emulation (a drive to high creates Hi-Z)
8:11 — Reserved
12:15 USB Individual bits to cause open drain emulation for pins configured as GPIO output.
bit 12 controls GPIO_USB_3 (USB1_8 pin)
bit 13 controls GPIO_USB_2 (USB1_7 pin)
bit 14 controls GPIO_USB_1 (USB1_6 pin)
bit 15 controls GPIO_USB_0 (USB1_0 pin)
0 = Normal CMOS output (default)
1 = Open Drain emulation (a drive to high creates Hi-Z)
16:17 — Reserved
18:23 PSC3 Individual bits to cause open drain emulation for pins configured as GPIO output.
bit 18 controls GPIO_ PSC3_5 (PSC3_7 pin)
bit 19 controls GPIO_ PSC3_4 (PSC3_6 pin)
bit 20 controls GPIO_ PSC3_3 (PSC3_3 pin)
bit 21 controls GPIO_ PSC3_2 (PSC3_2 pin)
bit 22 controls GPIO_ PSC3_1 (PSC3_1 pin)
bit 23 controls GPIO_ PSC3_0 (PSC3_0 pin)
0 = Normal CMOS output (default)
1 = Open Drain emulation (a drive to high creates Hi-Z)
24:27 PSC2 Individual bits to cause open drain emulation for pins configured as GPIO output.
bit 24 controls GPIO_PSC2_3 (PSC2_3 pin)
bit 25 controls GPIO_PSC2_2 (PSC2_2 pin)
bit 26 controls GPIO_PSC2_1 (PSC2_1 pin)
bit 27 controls GPIO_PSC2_0 (PSC2_0 pin)
0 = Normal CMOS output (default)
1 = Open Drain emulation (a drive to high creates Hi-Z)
28:31 PSC1 Individual bits to cause open drain emulation for pins configured as GPIO output.
bit 28 controls GPIO_PSC1_3 (PSC1_3 pin)
bit 29 controls GPIO_PSC1_2 (PSC1_2 pin)
bit 30 controls GPIO_PSC1_1 (PSC1_1 pin)
bit 31 controls GPIO_PSC1_0 (PSC1_0 pin)
0 = Normal CMOS output (default)
1 = Open Drain emulation (a drive to high creates Hi-Z)
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
8:11 — Reserved
16:17 — Reserved
7.3.2.1.5 GPS Simple GPIO Data Output Values Register —MBAR + 0x0B10
Table 7-25. GPS Simple GPIO Data Output Values Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2:3 IRDA Individual bits to control the state of pins configured as GPIO output.
bit 2 controls GPIO_IRDA_1 (IR_USB_CLK pin)
bit 3 controls GPIO_IRDA_0 (IRDA_TX pin)
0 = Drive 0 on the pin (default)
1 = Drive 1 on the pin
4:7 ETHR Individual bits to control the state of pins configured as GPIO output.
bit 4 controls GPIO_ETHI_3 (ETH_11 pin)
bit 5 controls GPIO_ETHI_2 (ETH_10 pin)
bit 6 controls GPIO_ETHI_1 (ETH_9 pin)
bit 7 controls GPIO_ETHI_0 (ETH_8 pin)
0 = Drive 0 on the pin (default)
1 = Drive 1 on the pin
8:11 — Reserved
12:15 USB Individual bits to control the state of pins configured as GPIO output.
bit 12 controls GPIO_USB_3 (USB1_8 pin)
bit 13 controls GPIO_USB_2 (USB1_7 pin)
bit 14 controls GPIO_USB_1 (USB1_6 pin)
bit 15 controls GPIO_USB_0 (USB1_0 pin)
0 = Drive 0 on the pin (default)
1 = Drive 1 on the pin
16:17 — Reserved
18:23 PSC3 Individual bits to control the state of pins configured as GPIO output.
bit 18 controls GPIO_ PSC3_5 (PSC3_7 pin)
bit 19 controls GPIO_ PSC3_4 (PSC3_6 pin)
bit 20 controls GPIO_ PSC3_3 (PSC3_3 pin)
bit 21 controls GPIO_ PSC3_2 (PSC3_2 pin)
bit 22 controls GPIO_ PSC3_1 (PSC3_1 pin)
bit 23 controls GPIO_ PSC3_0 (PSC3_0 pin)
0 = Drive 0 on the pin (default)
1 = Drive 1 on the pin
24:27 PSC2 Individual bits to control the state of pins configured as GPIO output.
bit 24 controls GPIO_PSC2_3 (PSC2_3 pin)
bit 25 controls GPIO_PSC2_2 (PSC2_2 pin)
bit 26 controls GPIO_PSC2_1 (PSC2_1 pin)
bit 27 controls GPIO_PSC2_0 (PSC2_0 pin)
0 = Drive 0 on the pin (default)
1 = Drive 1 on the pin
28:31 PSC1 Individual bits to control the state of pins configured as GPIO output.
bit 28 controls GPIO_PSC1_3 (PSC1_3 pin)
bit 29 controls GPIO_PSC1_2 (PSC1_2 pin)
bit 30 controls GPIO_PSC1_1 (PSC1_1 pin)
bit 31 controls GPIO_PSC1_0 (PSC1_0 pin)
0 = Drive 0 on the pin (default)
1 = Drive 1 on the pin
7.3.2.1.6 GPS Simple GPIO Data Input Values Register —MBAR + 0x0B14
Table 7-26. GPS Simple GPIO Data Input Values Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2:3 IRDA Individual status bits reflecting the state of corresponding GPIO pins.
bit 2 reflects GPIO_IRDA_1 (IR_USB_CLK pin)
bit 3 reflects GPIO_IRDA_0 (IRDA_TX pin)
4:7 ETHR Individual status bits reflecting the state of corresponding GPIO pins.
bit 4 reflects GPIO_ETHI_3 (ETH_11 pin)
bit 5 reflects GPIO_ETHI_2 (ETH_10 pin)
bit 6 reflects GPIO_ETHI_1 (ETH_9 pin)
bit 7 reflects GPIO_ETHI_0 (ETH_8 pin)
8:11 — Reserved
12:15 USB Individual status bits reflecting the state of corresponding GPIO pins.
bit 12 reflects GPIO_USB_3 (USB1_8 pin)
bit 13 reflects GPIO_USB_2 (USB1_7 pin)
bit 14 reflects GPIO_USB_1 (USB1_6 pin)
bit 15 reflects GPIO_USB_0 (USB1_0 pin)
16:17 — Reserved
18:23 PSC3 Individual status bits reflecting the state of corresponding GPIO pins.
bit 18 reflects GPIO_ PSC3_5 (PSC3_7 pin)
bit 19 reflects GPIO_ PSC3_4 (PSC3_6 pin)
bit 20 reflects GPIO_ PSC3_3 (PSC3_3 pin)
bit 21 reflects GPIO_ PSC3_2 (PSC3_2 pin)
bit 22 reflects GPIO_ PSC3_1 (PSC3_1 pin)
bit 23 reflects GPIO_ PSC3_0 (PSC3_0 pin)
24:27 PSC2 Individual status bits reflecting the state of corresponding GPIO pins.
bit 24 reflects GPIO_PSC2_3 (PSC2_3 pin)
bit 25 reflects GPIO_PSC2_2 (PSC2_2 pin)
bit 26 reflects GPIO_PSC2_1 (PSC2_1 pin)
bit 27 reflects GPIO_PSC2_0 (PSC2_0 pin)
28:31 PSC1 Individual status bits reflecting the state of corresponding GPIO pins.
bit 28 reflects GPIO_PSC1_3 (PSC1_3 pin)
bit 29 reflects GPIO_PSC1_2 (PSC1_2 pin)
bit 30 reflects GPIO_PSC1_1 (PSC1_1 pin)
bit 31 reflects GPIO_PSC1_0 (PSC1_0 pin)
Note: These status bits operate regardless of the function on the pin.
R
ETHR Reserved
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R
Reserved
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 ETHR Individual bits to enable each Output Only GPIO pin—all reside on the Ethernet port.
bit 0 controls GPIO_ETHO_7 (ETH_7 pin)
bit 1 controls GPIO_ETHO_6 (ETH_6 pin)
bit 2 controls GPIO_ETHO_5 (ETH_5 pin)
bit 3 controls GPIO_ETHO_4 (ETH_4 pin)
bit 4 controls GPIO_ETHO_3 (ETH_3 pin)
bit 5 controls GPIO_ETHO_2 (ETH_2 pin)
bit 6 controls GPIO_ETHO_1 (ETH_1 pin)
bit 7 controls GPIO_ETHO_0 (ETH_0 pin)
0 = Disabled for GPIO use (default)
1 = Enabled for GPIO use
8:31 — Reserved
7.3.2.1.8 GPS GPIO Output-Only Data Value Out Register —MBAR + 0x0B1C
Table 7-28. GPS GPIO Output-Only Data Value Out Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R ETHR Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 ETHR Individual bits to control the state of enabled Output Only GPIO pins.
bit 0 controls GPIO_ETHO_7 (ETH_7 pin)
bit 1 controls GPIO_ETHO_6 (ETH_6 pin)
bit 2 controls GPIO_ETHO_5 (ETH_5 pin)
bit 3 controls GPIO_ETHO_4 (ETH_4 pin)
bit 4 controls GPIO_ETHO_3 (ETH_3 pin)
bit 5 controls GPIO_ETHO_2 (ETH_2 pin)
bit 6 controls GPIO_ETHO_1 (ETH_1 pin)
bit 7 controls GPIO_ETHO_0 (ETH_0 pin)
0 = Drive 0 on the pin (default)
1 = Drive 1 on the pin
8:31 — Reserved
R SIGPIOe Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 SIGPIOE Individual bits to enable each Interrupt GPIO pin (pins are scattered).
bit 0 controls GPIO_SINT_7 (ETH_16 pin)
bit 1 controls GPIO_SINT_6 (ETH_15 pin)
bit 2 controls GPIO_SINT_5 (ETH_14 pin)
bit 3 controls GPIO_SINT_4 (ETH_13 pin)
bit 4 controls GPIO_SINT_3 (USB1_9 pin)
bit 5 controls GPIO_SINT_2 (PSC3_8 pin)
bit 6 controls GPIO_SINT_1 (PSC3_5 pin)
bit 7 controls GPIO_SINT_0 (PSC3_4 pin)
0 = disabled for GPIO use (default)
1 = enabled for GPIO use
8:31 — Reserved
7.3.2.1.10 GPS GPIO Simple Interrupt Open-Drain Emulation Register —MBAR + 0x0B24
Table 7-30. GPS GPIO Simple Interrupt Open-Drain Emulation Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R SIODe Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 SIODe Individual bits to cause open drain emulation for pins configured as GPIO output.
bit 0 controls GPIO_SINT_7 (ETH_16 pin)
bit 1 controls GPIO_SINT_6 (ETH_15 pin)
bit 2 controls GPIO_SINT_5 (ETH_14 pin)
bit 3 controls GPIO_SINT_4 (ETH_13 pin)
bit 4 controls GPIO_SINT_3 (USB1_9 pin)
bit 5 controls GPIO_SINT_2 (PSC3_8 pin)
bit 6 controls GPIO_SINT_1 (PSC3_5 pin)
bit 7 controls GPIO_SINT_0 (PSC3_4 pin)
0 = Normal CMOS output (default)
1 = Open Drain emulation (a drive to high creates Hi-Z)
8:31 — Reserved
7.3.2.1.11 GPS GPIO Simple Interrupt Data Direction Register —MBAR + 0x0B28
Table 7-31. GPS GPIO Simple Interrupt Data Direction Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R SIDDR Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8:31 — Reserved
7.3.2.1.12 GPS GPIO Simple Interrupt Data Value Out Register —MBAR + 0x0B2C
Table 7-32. GPS GPIO Simple Interrupt Data Value Out Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R SIDVO Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 SIDVO Individual bits to control the state of pins configured as GPIO output.
bit 0 controls GPIO_SINT_7 (ETH_16 pin)
bit 1 controls GPIO_SINT_6 (ETH_15 pin)
bit 2 controls GPIO_SINT_5 (ETH_14 pin)
bit 3 controls GPIO_SINT_4 (ETH_13 pin)
bit 4 controls GPIO_SINT_3 (USB1_9 pin)
bit 5 controls GPIO_SINT_2 (PSC3_8 pin)
bit 6 controls GPIO_SINT_1 (PSC3_5 pin)
bit 7 controls GPIO_SINT_0 (PSC3_4 pin)
0 = Drive 0 on the pin (default)
1 = Drive 1 on the pin
8:31 — Reserved
7.3.2.1.13 GPS GPIO Simple Interrupt Interrupt Enable Register —MBAR + 0x0B30
Table 7-33. GPS GPIO Simple Interrupt Interrupt Enable Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R SIINTEN Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 SIINTEN Individual bits to enable Interrupt generation for each GPIO pin configured as an Input.
bit 0 controls GPIO_SINT_7 (ETH_16 pin)
bit 1 controls GPIO_SINT_6 (ETH_15 pin)
bit 2 controls GPIO_SINT_5 (ETH_14 pin)
bit 3 controls GPIO_SINT_4 (ETH_13 pin)
bit 4 controls GPIO_SINT_3 (USB1_9 pin)
bit 5 controls GPIO_SINT_2 (PSC3_8 pin)
bit 6 controls GPIO_SINT_1 (PSC3_5 pin)
bit 7 controls GPIO_SINT_0 (PSC3_4 pin)
0 = Pin cannot generate an Interrupt (default)
1 = Pin can generate an Interrupt if configured as an Input GPIO
8:31 — Reserved
Note: See Interrupt Type data in GPS GPIO Simple Interrupt Interrupt Types Register —MBAR + 0x0B34 Register. Also,
the Master Interrupt Enable bit must be set in the GPS GPIO Simple Interrupt Master Enable Register —MBAR + 0x0B38
Register, before any Simple Interrupt pin can generate an Interrupt.
7.3.2.1.14 GPS GPIO Simple Interrupt Interrupt Types Register —MBAR + 0x0B34
Table 7-34. GPS GPIO Simple Interrupt Interrupt Types Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 ITYP[0:7] GPIO Interrupt Type bits for Simple-Interrupt GPIO pin 7.
ITYP7—bits 0:1 controls GPIO_SINT_7 (ETH_16 pin)
ITYP6—bits 2:3 controls GPIO_SINT_6 (ETH_15 pin)
ITYP5—bits 4:5 controls GPIO_SINT_5 (ETH_14 pin)
ITYP4—bits 6:7 controls GPIO_SINT_4 (ETH_13 pin)
ITYP3—bits 8:9 controls GPIO_SINT_3 (USB1_9 pin)
ITYP2—bits 10:11 controls GPIO_SINT_2 (PSC3_8 pin)
ITYP1—bits 12:13 controls GPIO_SINT_1 (PSC3_5 pin)
ITYP0—bits 14:15 controls GPIO_SINT_0 (PSC3_4 pin)
16:31 — Reserved
7.3.2.1.15 GPS GPIO Simple Interrupt Master Enable Register —MBAR + 0x0B38
Table 7-35. GPS GPIO Simple Interrupt Master Enable Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved ME Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:2 — Reserved
3 ME GPIO Simple Interrupt Master Enable pin—This pin must be high before any Simple
Interrupt pin can generate an interrupt. This bit should remain clear while programming
individual interrupts, then set high as a final step. This prevents any spurious interrupt
occurring during programming.
4:31 — Reserved
R ISTAT IVAL
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 ISTAT Interrupt Status—status bit for GPIO Simple interrupt pins 7 to 0, where 1 indicates an
interrupt has occurred. Clear bit with a Sticky bit write to 1.
Bit 0 reflects GPIO_SINT_7 (ETH_16 pin)
Bit 1 reflects GPIO_SINT_6 (ETH_15 pin)
Bit 2 reflects GPIO_SINT_5 (ETH_14 pin)
Bit 3 reflects GPIO_SINT_4 (ETH_13 pin)
Bit 4 reflects GPIO_SINT_3 (USB1_9 pin)
Bit 5 reflects GPIO_SINT_2 (PSC3_8 pin)
Bit 6 reflects GPIO_SINT_1 (PSC3_5 pin)
Bit 7 reflects GPIO_SINT_0 (PSC3_4 pin)
8:15 IVAL Input Value—status bit for GPIO Simple Interrupt pins 7 to 0. This is the raw state of the
input pin at the time this register is read. It is not latched to the state that caused the
Interrupt (if any).
Bit 8 reflects GPIO_SINT_7 (ETH_16 pin)
Bit 9 reflects GPIO_SINT_6 (ETH_15 pin)
Bit 10 reflects GPIO_SINT_5 (ETH_14 pin)
Bit 11 reflects GPIO_SINT_4 (ETH_13 pin)
Bit 12 reflects GPIO_SINT_3 (USB1_9 pin)
Bit 13 reflects GPIO_SINT_2 (PSC3_8 pin)
Bit 14 reflects GPIO_SINT_1 (PSC3_5 pin)
Bit 15 reflects GPIO_SINT_0 (PSC3_4 pin)
IVAL is always available regardless of enable or setting, even if not used as GPIO.
Writing to this byte has no effect.
16:31 — Reserved
• GPW WakeUp GPIO Enables Register (0x0C00) • GPW WakeUp GPIO Individual Interrupt Enable Register
(0x0C14)
• GPW WakeUp GPIO Open Drain Emulation Register • GPW WakeUp GPIO Interrupt Types Register (0x0C18)
(0x0C04)
• GPW WakeUp GPIO Data Direction Register (0x0C08) • GPW WakeUp GPIO Master Enables Register (0x0C1C)
• GPW WakeUp GPIO Data Value Out Register (0x0C0C) • GPW WakeUp GPIO Data Input Values Register (0x0C20)
• GPW WakeUp GPIO Interrupt Enable Register (0x0C10) • GPW WakeUp GPIO Status Register (0x0C24)
R WGPIOe Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 WGPIOe Bits to enable the operation of individual WaleUp GPIO pins.
Bit 0 controls GPIO_WKUP_7 (GPIO_WKUP_7 pin)
Bit 1 controls GPIO_WKUP_6 (GPIO_WKUP_6 pin)
Bit 2 controls GPIO_WKUP_5 (PSC6_1 pin)
Bit 3 controls GPIO_WKUP_4 (PSC6_0 pin)
Bit 4 controls GPIO_WKUP_3 (ETH_17 pin)
Bit 5 controls GPIO_WKUP_2 (PSC3_9 pin)
Bit 6 controls GPIO_WKUP_1 (PSC2_4 pin)
Bit 7 controls GPIO_WKUP_0 (PSC1_4 pin)
0 = Pin not enabled for any GPIO use (default).
1 = Pin enabled for use as GPIO.
8:31 — Reserved
7.3.2.2.2 GPW WakeUp GPIO Open Drain Emulation Register —MBAR + 0x0C04
Table 7-38. GPW WakeUp GPIO Open Drain Emulation Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R WODe Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 WODe Bits to control open drain emulation for individual WakeUp GPIO configured as outputs.
Bit 0 controls GPIO_WKUP_7 (GPIO_WKUP_7 pin)
Bit 1 controls GPIO_WKUP_6 (GPIO_WKUP_6 pin)
Bit 2 controls GPIO_WKUP_5 (PSC6_1 pin)
Bit 3 controls GPIO_WKUP_4 (PSC6_0 pin)
Bit 4 controls GPIO_WKUP_3 (ETH_17 pin)
Bit 5 controls GPIO_WKUP_2 (PSC3_9 pin)
Bit 6 controls GPIO_WKUP_1 (PSC2_4 pin)
Bit 7 controls GPIO_WKUP_0 (PSC1_4 pin)
0 = Normal CMOS output (default).
1 = Open Drain emulation (a drive to high creates Hi-Z).
8:31 — Reserved
R WDDR[7:0] Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8:31 — Reserved
7.3.2.2.4 GPW WakeUp GPIO Data Value Out Register —MBAR + 0x0C0C
Table 7-40. GPW WakeUp GPIO Data Value Out Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R WDVO Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 WDVO Individual bits to control the state of pins configured as GPIO output.
Bit 0 controls GPIO_WKUP_7 (GPIO_WKUP_7 pin)
Bit 1 controls GPIO_WKUP_6 (GPIO_WKUP_6 pin)
Bit 2 controls GPIO_WKUP_5 (PSC6_1 pin)
Bit 3 controls GPIO_WKUP_4 (PSC6_0 pin)
Bit 4 controls GPIO_WKUP_3 (ETH_17 pin)
Bit 5 controls GPIO_WKUP_2 (PSC3_9 pin)
Bit 6 controls GPIO_WKUP_1 (PSC2_4 pin)
Bit 7 controls GPIO_WKUP_0 (PSC1_4 pin)
0 = Drive 0 on the pin (default).
1 = Drive 1 on the pin.
Note: If pin is emulating open drain, this setting results in Hi-Z
8:31 — Reserved
R WUPe Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 WUPe Individual bits to enable generation of WakeUp interrupt for WakeUp GPIO configured as
input.
Bit 0 controls GPIO_WKUP_7 (GPIO_WKUP_7 pin)
Bit 1 controls GPIO_WKUP_6 (GPIO_WKUP_6 pin)
Bit 2 controls GPIO_WKUP_5 (PSC6_1 pin)
Bit 3 controls GPIO_WKUP_4 (PSC6_0 pin)
Bit 4 controls GPIO_WKUP_3 (ETH_17 pin)
Bit 5 controls GPIO_WKUP_2 (PSC3_9 pin)
Bit 6 controls GPIO_WKUP_1 (PSC2_4 pin)
Bit 7 controls GPIO_WKUP_0 (PSC1_4 pin)
0 = Pin cannot generate WakeUp Interrupt (default).
1 = Pin can generate WakeUp Interrupt while MPC5200 is in Deep Sleep mode.
Note: These enable bits apply ONLY when MPC5200 is in Deep Sleep mode.
8:31 — Reserved
Note: Only valid when Port Configuration indicates GPIO usage and pin is configured as input in the associated DDR
bit in GPIOWDO. Also, Master Interrupt Enable bit in GPIOWME must be set.
7.3.2.2.6 GPW WakeUp GPIO Individual Interrupt Enable Register —MBAR + 0x0C14
Table 7-42. GPW WakeUp GPIO Individual Interrupt Enable Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R WINe Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 WINe Individual bits to enable generation of Simple interrupt for WakeUp GPIO configured as
input.
Bit 0 controls GPIO_WKUP_7 (GPIO_WKUP_7 pin)
Bit 1 controls GPIO_WKUP_6 (GPIO_WKUP_6 pin)
Bit 2 controls GPIO_WKUP_5 (PSC6_1 pin)
Bit 3 controls GPIO_WKUP_4 (PSC6_0 pin)
Bit 4 controls GPIO_WKUP_3 (ETH_17 pin)
Bit 5 controls GPIO_WKUP_2 (PSC3_9 pin)
Bit 6 controls GPIO_WKUP_1 (PSC2_4 pin)
Bit 7 controls GPIO_WKUP_0 (PSC1_4 pin)
0 = Pin cannot generate Simple Interrupt (default).
1 = Pin can generate Simple Interrupt while MPC5200 is not in Deep Sleep mode.
Note: These enable bits apply only when MPC5200 is not in Deep Sleep mode.
8:31 — Reserved
Note: Only valid when Port Configuration indicates GPIO usage and pin is configured as input in the associated DDR
bit in GPIOWDO. Also, Master Interrupt Enable bit in GPIOWME must be set.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 Ityp7 GPIO Interrupt Type bits for WakeUp GPIO pins 7–0
2:3 Ityp6 00=Interrupt at any transition
01=Interrupt on rising edge
4:5 Ityp5
10=Interrupt on falling edge
6:7 Ityp4 11=Interrupt on pulse (any 2 transitions)
8:9 Ityp3 The above interrupt types describe operation for interrupts occuring while MPC5200 is not
10:11 Ityp2 in Deep Sleep mode (i.e., Simple Interrupt types). For operation while in Deep Sleep mode
the interpretation of these bits is slightly different, because no clocking is present in this
12:13 Ityp1 mode and it is therefore impossible to detect an edge on the input. For Deep Sleep mode
the bits are interpretted as follows:
14:15 Ityp0
00 = Not Valid, no interrupt can be detected
01 = Level High, any high creates WakeUp from Deep Sleep
10 = Level Low, any low creates WakeUp from Deep Sleep
11 = Not Valid, no interrupt can be detected.
16:31 — Reserved
R Reserved ME Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 ME WakeUp GPIO Master Enable pin. This pin must be high before any WakeUp GPIO pin can
generate an interrupt. This bit should remain clear while programming individual interrupts
and then set high as a final step. This prevents any spurious interrupt occuring during
programming.
8:31 — Reserved
7.3.2.2.9 GPW WakeUp GPIO Data Input Values Register —MBAR + 0x0C20
Table 7-45. GPW WakeUp GPIO Data Input Values Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R WIVAL Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 WIVAL Input Value bits for GPIO WakeUp pins 7–0. This is the raw state of the input pin at the time
this register is read. It is not latched to the state that caused the interrupt (if any).
This status bit is always available, regardless of any enable or setting. For example, even
if the pin is not used as GPIO.
Writing to this byte has no effect.
Bit 0 reflects GPIO_WKUP_7 (GPIO_WKUP_7 pin)
Bit 1 reflects GPIO_WKUP_6 (GPIO_WKUP_6 pin)
Bit 2 reflects GPIO_WKUP_5 (PSC6_1 pin)
Bit 3 reflects GPIO_WKUP_4 (PSC6_0 pin)
Bit 4 reflects GPIO_WKUP_3 (ETH_17 pin)
Bit 5 reflects GPIO_WKUP_2 (PSC3_9 pin)
Bit 6 reflects GPIO_WKUP_1 (PSC2_4 pin)
Bit 7 reflects GPIO_WKUP_0 (PSC1_4 pin)
8:31 — Reserved
R Istat Reserved
RESET: 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Istat Interrupt status bits for GPIO WakeUp pins 7–0.
1 indicates an interrupt occurred. Cleared with a sticky-bit write to a 1 to clear the interrupt
condition.
Bit 0 reflects interrupt on GPIO_WKUP_7 (GPIO_WKUP_7 pin)
Bit 1 reflects interrupt on GPIO_WKUP_6 (GPIO_WKUP_6 pin)
Bit 2 reflects interrupt on GPIO_WKUP_5 (PSC6_1 pin)
Bit 3 reflects interrupt on GPIO_WKUP_4 (PSC6_0 pin)
Bit 4 reflects interrupt on GPIO_WKUP_3 (ETH_17 pin)
Bit 5 reflects interrupt on GPIO_WKUP_2 (PSC3_9 pin)
Bit 6 reflects interrupt on GPIO_WKUP_1 (PSC2_4 pin)
Bit 7 reflects interrupt on GPIO_WKUP_0 (PSC1_4 pin)
8:31 — Reserved
• GPT 0 Enable and Mode Select Register (0x0600) • GPT 0 PWM Configuration Register (0x0608)
• GPT 1 Enable and Mode Select Register (0x0610) • GPT 1 PWM Configuration Register (0x0618)
• GPT 2 Enable and Mode Select Register (0x0620) • GPT 2 PWM Configuration Register (0x0628)
• GPT 3 Enable and Mode Select Register (0x0630) • GPT 3 PWM Configuration Register (0x0638)
• GPT 4 Enable and Mode Select Register (0x0640) • GPT 4 PWM Configuration Register (0x0648)
• GPT 5 Enable and Mode Select Register (0x0650) • GPT 5 PWM Configuration Register (0x0658)
• GPT 6 Enable and Mode Select Register (0x0660) • GPT 6 PWM Configuration Register (0x0668)
• GPT 7 Enable and Mode Select Register (0x0670) • GPT 7 PWM Configuration Register (0x0678)
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
:
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
Open_Drn
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 OCPW Output Compare Pulse Width—Applies to OC Pulse types only. This field specifies the number
of IP bus clocks (non-prescaled) to create a short output pulse at each Output Event. This
pulse is generated at the end of the OC period and overlays the next OC period (rather than
adding to the period).
Note: This field is alternately used as the Watchdog reset field if Watchdog Timer mode is
enabled.
8:9 — Reserved
10:11 OCT Output Compare Type—describes action to occur at each output compare event, as follows:
00=Special case, output is immediately forced low without respect to each output compare
event.
01=Output pulse highs, initial value is low (OCPW field applies).
10=Output pulses low, initial value is high (OCPW field applies).
11=Output toggles.
GPIO modalities can be used to achieve an initial output state prior to enabling OC mode. It is
important to move directly from GPIO output mode to OC mode and not to pass through the
Timer_MS=000 state.
To prevent the Internal Timer Mode from engaging during the GPIO state, CE bit should be
held low during the configuration steps.
GPIO initialization is needed when presetting the I/O to 1 in conjunction with a simple toggle
OCT setting.
Note: For Stop Mode operation (see Stop_Cont bit below) it is necessary to pass through the
mode_sel = 0 state to restart the output compare counters with their programmed values. See
prescale and count fields in GPT 0 Counter Input Register.
12:13 — Reserved
14:15 ICT Input Capture Type—describes the input transition type required to trigger an input capture
event, as follows:
00=Any input transition causes an IC event.
01=IC event occurs at input rising edge.
10=IC event occurs at input falling edge.
11=IC event occurs at any input pulse (i.e., at 2nd input edge).
BE AWARE: For ICT=11 (pulse capture), status register records only the pulse width.
16 WDen Watchdog enable—bit enables watchdog operation. A timer expiration causes an internal
MPC5200 reset. Watchdog operation requires the Timer_MS field be set for internal timer
mode and the CE bit to be set high.
In this mode the OCPW byte field operates as a watchdog reset field. Writing A5 to the OCPW
field resets the watchdog timer, preventing it from expiring. As long as the timer is properly
configured, the watchdog operation continues.
This bit (and functionality) is implemented only for Timer 0. 1 = enabled
17:18 — Reserved
19 CE Counter Enable—bit enables or resets the internal counter during Internal timer modes only.
CE must be high to enable these modes. If low, counter is held in reset.
This bit is secondary to the timer mode select bits (Timer_MS). If Timer_MS is1XX, internal
timer modes are enabled. CE can then enable or reset the internal counter without changing
the Timer_MS field.
GPIO operation is also available in this mode. 1 = enabled
20 — Reserved
• IC mode
Stop operation—At each IC event, counter is reset.
Continuous operation—counter is not reset at each IC event.
Effect is to create Status count values that are cumulative between Capture events. If the
special Pulse Mode Capture type is specified, the Stop_Cont bit is not used, operation
fixed as if it were Stop.
• OC mode
Stop operation—Counter resets and stops at first OC event. Note: Software needs to pass
through Timer_MS=000 state to restart timer.
Continuous operation—counter resets and continues at each OC event.
Effect to is create back-to-back periodic OC events.
BE AWARE—In this mode the polarity of Stop_cont is reversed. Also, in Stop Mode, the
output event falsely retriggers at the expiration of the prescale count.
This means the software has to service and output event prior to the prescale expiring.
Service is defined as programming mode_sel field to 0, which causes the programmed
prescale and count values to be reset.
• PWM mode
Bit not used, operation is always Continuous.
• CPU Timer mode
Stop operation—On counter expiration, Timer waits until Status bit is cleared by passing
through Timer_MS=000 state before beginning a new cycle.
Continuous operation—On counter expiration, Timer resets and immediately begin a new
cycle.
Effect is to generate fixed periodic timeouts.
• WatchDog Timer and GPIO modes
Bit not used.
23 IntEn Enable interrupt—enables interrupt generation to the CPU for all modes (IC, OC, PWM, and
Internal Timer). IntEn is not required for watchdog expiration to create a reset. 1 = enabled
24:25 — Reserved
26:27 GPIO GPIO mode type. Simple GPIO functionality that can be used simultaneously with the Internal
Timer mode. It is not compatible with IC, OC, or PWM modes, since these modes dictate the
usage of the I/O pin.
0x=Timer enabled as simple GPIO input
10=Timer enabled as simple GPIO output, value=0
11=Timer enabled as simple GPIO output, value=1 (tri-state if Open_Drn=1)
While in GPIO modes, internal timer mode is also available. To prevent undesired timer
expiration, keep the CE bit low.
28 — Reserved
R Prescale
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Count
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 Prescale Prescale amount applied to internal counter (in IP bus clocks).
BE AWARE—The prescale field should be written prior to enabling any timer mode. A prescale
of 0x0001 means one IP bus clock per count increment. If prescale is 0 when any timer mode is
started, it results in an effective prescale of 64K. The counter will immediately begin and an
output event will occur with the 64K prescale, rather than the desired value.
16:31 COUNT Sets number of prescaled counts applied to reference events, as follows:
IC—Field has no effect, internal counter starts at 0.
OC—Number of prescaled counts counted before creating output event.
PWM—Number of prescaled counts defining the PWM output period.
Internal Timer—Number of prescaled counts counted before timer (or watchdog) expires.
Note: Reading this register only returns the programmed value, intermediate values of the
internal counter are not available to software.
R WIDTH
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 WIDTH PWM only. Defines ON time for output in prescaled counts. Similar to count value, which defines
the period. ON time overlays the period time.
If WIDTH = 0, output is always OFF.
If WIDTH exceeds count value, output is always ON.
ON and OFF polarity is set by the PWMOP bit.
16:22 — Reserved
23 PWMOP Pulse Width Mode Output Polarity—Defines PWM output polarity for OFF time. Opposite state is
ON time polarity. PWM cycles begin with ON time.
24:30 — Reserved
31 LOAD Bit forces immediate period update. Bit auto clears itself. A new period begins immediately with
the current count and width settings.
If LOAD = 0, new count or width settings are not updated until end of current period.
Note: Prescale setting is not part of this process. Changing prescale value while PWM is active
causes unpredictable results for the period in which it was changed. The same is true for
PWMOP bit.
R CAPTURE
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 Capture Read of internal counter, latch at reference event. This is pertinent only in IC mode, in which case
it represents the count value at the time the Input Event occurred. Capture status does not
shadow the internal counter while an event is pending, it is updated only at the time the Input
Event occurs.
Note: If ICT is set to 11, which is Pulse Capture Mode, the Capture value records the width of
the pulse. Also, the Stop_Cont bit is irrelevant in Pulse Capture Mode, operation is as if
Stop_Cont were 0.
16 — Reserved
17:19 OVF Represents how many times internal counter has rolled over. This is pertinent only during IC
mode and would represent an extremely long period of time between Input Events. However, if
Stop_Cont = 1 (indicating cumulative reporting of Input Events), this field could come into play.
Note: This field is cleared by any “sticky bit” status write in the 4 bit fields below (28, 29, 30, 31).
20:22 — Reserved
23 PIN Registered state of the I/O PIN (all modes). The IP bus Clock registers the state of the I/O input.
Valid, even if Timer is not enabled.
24:27 — Reserved
28 TEXP Timer Expired in Internal Timer mode. Cleared by writing 1 to this bit position. Also cleared if
Timer_MS is 000 (i.e., Timer not enabled). See Note.
29 PWMP PWM end of period occurred. Cleared by writing 1 to this bit position. Also cleared if Timer_MS
is 000 (i.e., Timer not enabled). See Note.
30 COMP OC reference event occurred. Cleared by writing 1 to this bit position. Also cleared if Timer_MS
is 000 (i.e., Timer not enabled). See Note.
31 CAPT IC reference event occurred. Cleared by writing 1 to this bit position. Also cleared if Timer_MS is
000 (i.e., Timer not enabled). See Note.
Note: To clear any of these bits, it is necessary to clear all of them. An F must be written to bits 28:31.
RESET: 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Terminal Count
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0:7 — Reserved
8:31 Terminal The user programs this register to set the Terminal Count value to be used by the Timer.
Count This register can be updated even if the Timer is running, the new value takes effect immediately.
The internal counter is compared to this register to determine if Terminal Count has been
reached.
Note: The Timer will not begin counting until a value greater than 255 is programmed into the
Terminal Count Register. A value less than 255 will essentially suspend the Timer.
Writing a value of zero to this register is considered invalid and will be converted to all ones,
creating a maximum duration count period.
Defaults at reset: TerminalCount will default to all ones, all other control bits willn default to zero.
R Reserved Reserved
Run_Wait
Interrupt
Enable
Enable
Timer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:4 — Reserved
5 Run_ Wait A high indicates the Timer should run continuously while enabled. When the Timer counter
reaches terminal count it immediately resets to 0 and resumes counting. If the Run/Wait bit is
set low, the Timer Counter expires, but then waits until the Timer is cleared (either by writing 1
to the status bit or by disabling and re-enabling the Timer), before resuming operation.
6 Interrupt CPU Interrupt is generated only if this bit is high. This bit does not affect operation of the Timer
Enable Counter or Status Bit registers.
7 Timer While this bit is high the Timer operates normally, while low the Timer is reset and remains idle.
Enable
8:32 — Reserved
R Reserved TimerCount
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TimerCount
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 — Reserved
8:31 Timer Provides current state of the Timer counter. This register does not chodange while a read is in
Count progress, but the actual Timer counter continues unaffected.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 ST This status bit goes high whenever the Timer has reached Terminal Count. The bit is cleared by
writing 1 to its bit position. If Interrupts are enabled, clearing this status bit also clears the
interrupt.
8:31 — Reserved
Periodic interrupts are separately enabled by control bits, and a global enable must be asserted to allow any of the periodic sources to generate
a CPU interrupt. Clearing Periodic interrupts is accomplished by writing 1 to the appropriate status bit.
Stopwatch and Alarm interrupts are enabled simply by initiating the function. In the Stopwatch case, this means starting the Stopwatch, in the
Alarm case, this means enabling the Alarm. Clearing Stopwatch or Alarm interrupts is accomplished by writing 1 to the appropriate status bit.
Either of the RTC interrupts to the CPU can be used to awaken the MPC5200 from any power down mode.
Figure 7-4 shows a suggested circuit using an Epson ® MC-405 32.768KHz quartz crystal oscillator.
NOTE
External component values are highly dependent on the crystal. These values will be different for
different brands of crystals.
RTC_XTAL_IN RTC_XTAL_OUT
R1
20MΩ R2
500KΩ
MC-405
C1 C2
12pF 12pF
• RTC Time Set Register (0x0800) • RTC Current Date Register (0x0814), read-only
• RTC Date Set Register (0x0804) • RTC Alarm and Stopwatch Interrupt Register (0x0818),
read-only
• RTC New Year and Stopwatch Register (0x0808) • RTC Periodic Interrupt and Bus Error Register (0x081C),
read-only
• RTC Alarm and Interrupt Enable Register (0x080C) • RTC Test Register/Divides Register (0x0820)
pause_time
SlctHour
set_time
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:5 — Reserved
6 set_time A bit used in conjunction with pause_time bit (below) to cause a new time to be programmed
into the RTC. After a proper software sequence, the values in the *_set fields below are
loaded.
The proper software sequence is:
1. Write register with pause_time 1 and set_time 0
2. Write register with pause_time 1 and set_time 1
3. Write register with pause_time 1 and set_time 0
4. Write register with pause_time 0 and set_time 0
At completion of Step 4, RTC is updated with the new time.
The C24Hour_set, Minute_set, and the Second_set fields should remain consistent values
throughout the four steps (i.e., at the desired new time values).
Note: Read-modify-write operations may disrupt this procedure, it is advised that four
simple writes occur. Byte writes to this byte are also acceptable.
7 pause_time Used with set_time above to perform time update. Must be zero for normal operation.
8:9 — Reserved
11:15 C24Hour_set Hour in 24-hour format written in RTC after successful state machine transition by set_time
and pause_time bits.
Note: This field is always written with 24-Hour format, it is NOT affected by SlctHour bit
above.
16:17 — Reserved
18:23 Minute_set Minute written in RTC after successful state machine transition by set_time and pause_time
bits.
24:25 — Reserved
26:31 Second_set Second written in RTC after successful state machine transition by set_time and
pause_time bits.
pause_date
set_date
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:5 — Reserved
6 set_date Operation of pause_date and set_date is similar to pause_time and set_time described in
the time set register.
7 pause_date Used with set_date above to perform date update. Must be zero for normal operation.
8:10 — Reserved
11:15 Month_set New month written in RTC after successful state machine transition by set_date and
pause_date bits. Actually the lower 4 bits is used
16:17 — Reserved
18:23 Weekday_set New weekday written in RTC after state machine transition by set_date and pause_date
bits. 1 = Monday; 7 = Sunday. Actually the lower 3 bits is used.
24:25 — Reserved
26:31 Date_set New date written in RTC after state machine transition by set_date and pause_date bits.
Actually the lower 5 bits is used.
Note: Year_set in the following register is also part of the date set function.
write_SW
R Reserved SW_set
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved Year_set
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 write_SW Typical stopwatch operation is to write initial value into 8-bit wide SW_set and assert
write_SW bit. The write_SW bit is immediately auto cleared, but it triggers the stopwatch
minute countdown to begin.
8:15 SW_set Number of minutes to be written into stopwatch. Max is 255, a little over 4 hours.
16:19 — Reserved
20:31 Year_set New year written in RTC after successful state machine transition by set_date and
pause_date bits.
Note: This is part of date set function in the previous register.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
IntEn_sec
MPEb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0:6 — Reserved
7 Alm_enable Alarm Enable bit for once-a-day Alarm. If high, Alarm status/interrupt operation is enabled.
If low, Alarm setting is not compared to time of day.
8:10 — Reserved
11:15 Alm_24Hset Hour setting (in 24 hour format) to be compared to time of day for the purpose of generating
Alarm Status/Interrupt. Can be written at any time.
16:17 — Reserved
18:23 Alm_Min_set Minute setting to be compared to time of day for the purpose of generating Alarm
Status/Interrupt. Can be written at any time.
24:27 — Reserved
28 MPEb Master Periodic Enable bar. Must be written low after reset to allow periodic interrupts.
Note: The Interrupt enable bits (28, 29, 30, 31) control the Periodic Interrupt coming from the RTC. The separate
Stopwatch/Alarm Interrupt signal does not have a specific interrupt enable bit. An Alarm interrupt is automatically
generated if Alarm is enabled and the Alarm setting matches time of day. Similarly, a Stopwatch expiration, which
shares the Alarm interrupt signal, automatically occurs once the Stopwatch is initiated and the Stopwatch counter
expires.
R Reserved Hour
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:10 — Reserved
11:15 Hour Hour format can be either 24-hour or 12-hour with AM/PM.
If 24-hour format is selected (SlctHour low in Reg 0), the whole 5-bit hour field designates
current time in 24-hour format.
If 12-hour format is selected (SlctHour high in Reg 0), the MSB of hour field indicates:
• Hour[0]=0: AM,
• Hour[0]=1: PM and
• Hour[1:4] designates current time in 12-hour format.
16:17 — Reserved
24:25 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved Year
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
11:15 Date Shows current date. Calendar feature is implemented, therefore, day rollover at the end of
month including February (and Leap Years) is automatic.
16:19 — Reserved
Int_SW
R Reserved Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
Alm_status
R Reserved SW_min
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 Int_alm Status bit indicating that enabled once-a-day Alarm has occurred (active high). Alarm
interrupt has been activated. This bit and the Interrupt is cleared by writing 1 to this bit
position.
Note: A Stopwatch interrupt, if also active, must be cleared before the interrupt signal to the
CPU is negated.
8:14 — Reserved
15 Int_SW Status bit indicating that Stopwatch expiration has occurred (active high). Stopwatch
interrupt has been activated. This bit and the Interrupt are cleared by writing 1 to this bit
position.
Note: An Alarm interrupt, if also active, must be cleared before the interrupt signal to the
CPU is negated.
16:22 — Reserved
23 Alm_status Status bit indicating that once-a-day Alarm has occurred. Same as Int_alm bit above except
that clearing this bit does NOT clear the interrupt.
R Reserved Reserved
Int_day
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
Int_min
Int_sec
R Reserved Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 Bus_error_1 Internal status register—If high, indicates software has attempted a write access to a
read-only register in this module. No actual register contents are corrupted if this happens.
Cleared by writing 1 to this bit position.
8:14 — Reserved
16:22 — Reserved
23 Int_min Periodic interrupt at each minute rollover. High indicates interrupt has occurred.
Cleared by writing 1 to this bit position.
24:30 — Reserved
31 Int_sec Periodic interrupt at each second rollover. High indicates interrupt has occurred.
Cleared by writing 1 to this bit position.
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 — Reserved
1:7 PTERM Prescale Termination value, the number of 32KHz clocks per 7-bit prescale counter.
Default at reset is the maximum (and proper) value of 128 decimal. Any value lower than
this causes the RTC to run fast.
8:15 ETERM External Termination value, the number of prescaled counts per 8-bit external counter.
Default at reset is the maximum (and proper) value of 256 decimal. Any value lower than
this causes the RTC to run fast.
16:31 — Reserved
Note: The 32.768KHz crystal frequency is divided by PTERM, which is then divided by ETERM to produce a 1 second
time interval. It is conceivable that a system might wish to adjust these values to produce a more locally accurate clock
rate. However, be aware that these values are affected by reset. Therefore, any adjustment value must be stored and
retrieved from non-volatile memory. Further, the adjustment could only increase the clock rate, not decrease it.
Chapter 8
SDRAM Memory Controller
8.1 Overview
The following sections are contained in this document:
• Section 8.2, Terminology and Notation
• Section 8.3, Features
— Section 8.3.1, Devices Supported
• Section 8.4, Functional Description
— Section 8.4.1, External Signals (SDRAM Side)
— Section 8.4.2, Block Diagram
— Section 8.4.3, Transfer Size
— Section 8.4.4, Commands
• Section 8.5, Operation
— Section 8.5.1, Power-Up Initialization
• Section 8.6, Programming the SDRAM Controller
• Section 8.7, Memory Controller Registers (MBAR+0x0100:0x010C)
8.2.1 “Endian”-ness
Endian-ness is a source of seemingly endless confusion, yet it need not be. The source of the confusion usually seems to be that bit number
and/or byte address are improperly equated with significance. In fact, bit number and byte address neither govern, nor imply, significance.
• Significance can only exist within an arithmetic context. An arithmetic context can be explicit or implicit.
• An explicit arithmetic context is the scope of an arithmetic operator, that is, the operand(s) and result(s).
• An implicit arithmetic context exists within any collection of bits representing an atomic arithmetic object, that is, a number.
Significance does not extend beyond the boundaries of the bit range.
• With a single exception, an arithmetic context, and therefore significance, can only exist within an execution context, that is, an
abstract process or the actual hardware to which it is mapped. The single exception is an implicit context: A byte is an implicit
arithmetic context.
• Within an atomic object “obj[m:n]”, in an arithmetic context, the most significant bit(byte) is on the left (m), and the least significant
bit(byte) is on the right (n), unless otherwise specified. The bit numbering and byte addressing order from left to right (ascending
or descending) is strictly cosmetic.
Note that “:” in “m:n” is an arithmetic operator, and therefore m and n are arithmetic objects within the operator scope. (If they
weren’t, then the terms “ascending” and “descending” would be meaningless.)
Note furthermore that the scope of the “:” operator does not include “obj”: obj could be of a non-arithmetic type. One particular
value (pattern of the bit range) of obj could represent “red”; another value might represent “cold”. The bit patterns are enumerations
of the legal values of obj; sometimes arithmetic operations on enumeration values are valid for the concepts they represent,
sometimes not.
An enumeration value is not an arithmetic context. An enumeration value is a representation of an object value; the nature of the
object itself need not be numeric.
The enumeration value of a collection of bits (e.g. process variable) is only meaningful in the context of a process which manipulates those
bits in a manner consistent with the concept they represent. (A process itself may be just a concept represented by a collection of bits
manipulated (by a processing unit) in a manner consistent with the concept they represent.) And in the context of the concept they represent,
bits and bytes may have significance.
But while transporting bits from one location to another, the hardware transport media almost never have any knowledge of the concepts
represented by the data, or the contexts in which they are valid (this does not include protocol bits of the media, which may be added and
stripped along the way). Nor is the transportation of data an execution context. Without knowledge of atom boundaries and significance (if
any), the following convention is the de facto standard:
• “Bit significance, byte address”: From every observation point in a system, the relative address order of bytes shall be maintained,
and the relative significance of bits within each individual byte shall be maintained, as if they represented an 8 bit unsigned binary
integer. This is the implicit arithmetic context of bytes. The “native” bit numbering and address significance order of different
observers shall have no bearing on the byte address or bit significance order of visible data.
Byte “swapping”, the intentional transposition of bytes’ relative addresses between a source and a destination to maintain inter-byte
significance, is improper.
Bit “swizzling”, the intentional renumbering of bit positions, is perfectly legal if necessary to maintain intra-byte bit significance
or inter-byte address order. When necessary, it is required; when not necessary, it is prohibited.
To correctly join data path segments in accordance with this convention, the bit significance and byte addressing of each segment must be
specified.
In this document, significance is always msb on the left, lsb on the right, if any significance relationship exists.
All multi-bit components of the internal XL bus are defined with bit numbers and byte addresses (if any) ascending from left to right:
XLA[0:31], XLD[0:63]. The address of byte XLD[0:7] is a modulo 8 boundary, 8n (0x00, 0x08, 0x10, 0x18); the address of byte XLD[56:63]
is a modulo 8 boundary plus offset 7, 8n+7 (0x07, 0x0F, 0x17, 0x1F).
All internal IP busses are defined with bit numbers descending from left to right: IPA[31:0], IPD[31:0]. The byte addresses of IPD[31:0] are
defined acsending from left to right: IPD[31:24] is a modulo 4 address boundary, 4n (0x00, 0x04, 0x08, 0x0C); IPD[7:0] is a modulo 4 address
boundary plus offset 3, 4n+3 (0x03, 0x07, 0x0B, 0x0F). IPA[31:0] correspond left-to-right with XLA[0:31]. IPD[31:0] correspond
left-to-right with XLD[0:31] (XLA[29] == 0) or XLD[32:63] (XLA[29] == 1).
The Memory Controller registers are defined with byte addresses and bus bit numbers ascending from left to right; but object bit fields within
the registers may have ascending or descending bit numbers. The numbering order of bits as a bus does not govern the numbering order of
bits within a data object.
All external memory interface busses are defined with descending bit numbers: MEM_MA[12:0], MEM_MBA[1:0], MEM_MDQ[31:0],
MEM_DQM[3:0], MEM_MDQS[3:0]. Byte addressing of MEM_MDQ[31:0], MEM_DQM[3:0], and MEM_MDQS[3:0] is ascending:
MEM_MDQ[31:24], MEM_DQM[3], and MEM_MDQS[3] are associated with address offset 0 modulo 4 (4n); MEM_MDQ[7:0],
MEM_DQM[0], and MEM_MDQS[0] are associated with address offset 3 modulo 4 (4n+3).
8.3 Features
The MPC5200 SDRAM Memory Controller has the following features:
• Supports either:
— SDR SDRAM—memory I/Os are powered at 3.3V
— DDR SDRAM—memory I/Os are powered at 2.5V
DDR SDRAM transfers data at twice the rate and uses MEM_CLK and MEM_CLK as a differential pair.
• 32-bit memory data bus
NOTE
It is not possible to connect only a 16-bit device to one half of the data bus.
• Maximum address space 512MB; 256MB per CS:
— Up to 13 bits of row address (RA[12:0])
— Up to 12 bits of column address (CA[11:0])
— 2 bits of bank address (BA[1:0])
— Cannot use all 13 bits of RA and all 12 bits of CA at the same time. Maximum total address bits (RA+CA+BA) ≤ 26; 26 address
bits x 4Byte data bus = 256MB.
NOTE
In this document the Auto Precharge control signal (A10 usually), conveyed on the memory address
bus along with column address, is never included in the stated CA width; it is always in addition to
the CA width.
The Memory Controller does not support memory devices with >8 CA bits, but <12 RA bits.
RA[12:0] correspond directly with MEM_MA[12:0]. CA[7:0] correspond directly with
MEM_MA[7:0]. CA[11:8] do not correspond directly with MEM_MA[12:8].
• Maximum of 2 pinned-out Chip Selects (CS).
— CS0 is pinned out all the time (i.e., a dedicated pin).
— CS1 is only available if the GPIO_WKUP6 pin is programmed to be an SDRAM chip select. The default function of the pin
is GPIO_WKUP6.
— To configure the GPIO_WKUP6 pin as SDRAM chip select, write 1 to the Port Configuration register msb.Section 7.3.2.1.1,
GPS Port Configuration Register—MBAR + 0x0B00
— The size of each CS space is independent. It is possible but not recommended to overlap the address space pointed to by the 2
independent chip select.
NOTE
Maximum 4 physical memory devices total, all CS.
• Minimum allocatable address space 1MB:
— 8 bits of row address;
— 8 bits of column address;
— 2 bits of bank address;
— 1 chip select;
NOTE
Minimum allocatable address space is much smaller (8Mb) than the lowest density available (64Mb).
Excess memory bits are not used or simply wasted.
Spaces
Row Bits Column Bits Bank Bits Physical Address Range
(CS)
11 8 2 1 1 x 64Mb 8MB
512K x 4bank x 32bit
2 2 x 64Mb 16MB
512K x 4bank x 32bit
12 8 2 1 2 x 64Mb 16MB
1M x 4bank x 16bit
1 x 128Mb
1M x 4bank x 32bit
2 4 x 64Mb 32MB
1M x 4bank x 16bit
2 x 128Mb
1M x 4bank x 32bit
12 9 2 1 4 x 64Mb 32MB
13 8 2 2M x 4bank x 8bit
2 x 128Mb
2M x 4bank x 16bit
1 x 256Mb
2M x 4bank x 32bit
2 4 x 128Mb 64MB
2M x 4bank x 16bit
2 x 256Mb
2M x 4bank x 32bit
12 10 2 1 4 x 128Mb 64MB
13 9 2 4M x 4bank x 8bit
2 x 256Mb
4M x 4bank x 16bit
1 x 512Mb
4M x 4bank x 32bit
2 4 x 256Mb 128MB
4M x 4bank x 16bit
2 x 512Mb, 2 CS
4M x 4bank x 32bit
12 11 2 1 4 x 256Mb 128MB
13 10 2 8M x 4bank x 8bit
2 x 512Mb
8M x 4bank x 16bit
1 x 1Gb
8M x 4bank x 32bit
2 4 x 512Mb 256MB
8M x 4bank x 16bit
2 x 1Gb
8M x 4bank x 32bit
Spaces
Row Bits Column Bits Bank Bits Physical Address Range
(CS)
12 12 2 1 4 x 512Mb 256MB
13 11 2 16M x 4bank x 8bit
2 x 1Gb
16M x 4bank x 16bit
1 x 2Gb
16M x 4bank x 32bit
2 4 x 1Gb 512MB
16M x 4bank x 16bit
2 x 2Gb
16M x 4bank x 32bit
11 8 2 1 1 x 64Mb 24MB
512K x 4bank x 32bit
+
12 8 2 1 1 x 128Mb
1M x 4bank x 32bit
11 8 2 1 1 x 64Mb 40MB
512K x 4bank x 32bit
+
12 9 2 1 1 x 256Mb
13 8 2M x 4bank x 32bit
11 8 2 1 1 x 64Mb 72MB
512K x 4bank x 32bit
+
12 10 2 1 1 x 512Mb
13 9 4M x 4bank x 32bit
11 8 2 1 1 x 64Mb 136MB
512K x 4bank x 32bit
+
12 11 2 1 1 x 1Gb
13 10 8M x 4bank x 32bit
11 8 2 1 1 x 64Mb 264MB
512K x 4bank x 32bit
+
12 12 2 1 1 x 2Gb
13 11 16M x 4bank x 32bit
12 8 2 1 2 x 64Mb 48MB
1M x 4bank x 16bit
+
12 9 2 1 2 x 128Mb
13 8 2M x 4bank x 16bit
12 8 2 1 2 x 64Mb 80MB
1M x 4bank x 16bit
+
12 10 2 1 2 x 256Mb
13 9 4M x 4bank x 16bit
Spaces
Row Bits Column Bits Bank Bits Physical Address Range
(CS)
12 8 2 1 2 x 64Mb 144MB
1M x 4bank x 16bit
+
12 11 2 1 2 x 512Mb
13 10 8M x 4bank x 16bit
12 8 2 1 2 x 64Mb 272MB
1M x 4bank x 16bit
+
12 12 2 1 2 x 1Gb
13 11 16M x 4bank x 16bit
12 8 2 1 1 x 128Mb 48MB
1M x 4bank x 32bit
+
12 9 2 1 1 x 256Mb
13 8 2M x 4bank x 32bit
12 8 2 1 1 x 128Mb 80MB
1M x 4bank x 32bit
+
12 10 2 1 1 x 512Mb
13 9 4M x 4bank x 32bit
12 8 2 1 1 x 128Mb 144MB
1M x 4bank x 32bit
+
12 11 2 1 1 x 1Gb
13 10 8M x 4bank x 32bit
12 8 2 1 1 x 128Mb 272MB
1M x 4bank x 32bit
+
12 12 2 1 1 x 2Gb
13 11 16M x 4bank x 32bit
12 9 2 1 2 x 128Mb 96MB
2M x 4bank x 16bit
+
12 10 2 1 2 x 256Mb
4M x 4bank x 16bit
13 8 2 1 2 x 128Mb 96MB
2M x 4bank x 16bit
+
13 9 2 1 2 x 256Mb
4M x 4bank x 16bit
12 9 2 1 2 x 128Mb 160MB
2M x 4bank x 16bit
+
12 11 2 1 2 x 512Mb
8M x 4bank x 16bit
Spaces
Row Bits Column Bits Bank Bits Physical Address Range
(CS)
13 8 2 1 2 x 128Mb 160MB
2M x 4bank x 16bit
+
13 10 2 1 2 x 512Mb
8M x 4bank x 16bit
12 9 2 1 2 x 128Mb 288MB
2M x 4bank x 16bit
+
12 12 2 1 2 x 1Gb
16M x 4bank x 16bit
13 8 2 1 2 x 128Mb 288MB
2M x 4bank x 16bit
+
13 11 2 1 2 x 1Gb
16M x 4bank x 16bit
12 9 2 1 1 x 256Mb 96MB
2M x 4bank x 32bit
+
12 10 2 1 1 x 512Mb
4M x 4bank x 32bit
13 8 2 1 1 x 256Mb 96MB
2M x 4bank x 32bit
+
13 9 2 1 1 x 512Mb
4M x 4bank x 32bit
12 9 2 1 1 x 256Mb 160MB
2M x 4bank x 32bit
+
12 11 2 1 1 x 1Gb
8M x 4bank x 32bit
13 8 2 1 1 x 256Mb 160MB
2M x 4bank x 32bit
+
13 10 2 1 1 x 1Gb
8M x 4bank x 32bit
12 9 2 1 1 x 256Mb 288MB
2M x 4bank x 32bit
+
12 12 2 1 1 x 2Gb
16M x 4bank x 32bit
13 8 2 1 1 x 256Mb 288MB
2M x 4bank x 32bit
+
13 11 2 1 1 x 2Gb
16M x 4bank x 32bit
Spaces
Row Bits Column Bits Bank Bits Physical Address Range
(CS)
12 10 2 1 2 x256Mb 192MB
4M x 4bank x 16bit
+
12 11 2 1 2 x 512Mb
8M x 4bank x 16bit
13 9 2 1 2 x256Mb 192MB
4M x 4bank x 16bit
+
13 10 2 1 2 x 512Mb
8M x 4bank x 16bit
12 10 2 1 2 x256Mb 320MB
4M x 4bank x 16bit
+
12 12 2 1 2 x 1Gb
16M x 4bank x 16bit
13 9 2 1 2 x256Mb 320MB
4M x 4bank x 16bit
+
13 11 2 1 2 x 1Gb
16M x 4bank x 16bit
12 10 2 1 1 x 512Mb 192MB
4M x 4bank x 32bit
+
12 11 2 1 1 x 1Gb
8M x 4bank x 32bit
13 9 2 1 1 x 512Mb 192MB
4M x 4bank x 32bit
+
13 10 2 1 1 x 1Gb
8M x 4bank x 32bit
12 10 2 1 1 x 512Mb 320MB
4M x 4bank x 32bit
+
12 12 2 1 1 x 2Gb
16M x 4bank x 32bit
13 9 2 1 1 x 512Mb 320MB
4M x 4bank x 32bit
+
13 11 2 1 1 x 2Gb
16M x 4bank x 32bit
12 10 2 1 2 x 512Mb 384MB
8M x 4bank x 32bit
+
12 12 2 1 2 x 1Gb
16M x 4bank x 32bit
Spaces
Row Bits Column Bits Bank Bits Physical Address Range
(CS)
13 9 2 1 2 x 512Mb 384MB
8M x 4bank x 32bit
+
13 11 2 1 2 x 1Gb
16M x 4bank x 32bit
12 11 2 1 1 x 1Gb 384MB
8M x 4bank x 32bit
+
12 12 2 1 1 x 2Gb
16M x 4bank x 32bit
13 10 2 1 1 x 1Gb 384MB
8M x 4bank x 32bit
+
13 11 2 1 1 x 2Gb
16M x 4bank x 32bit
Figure 8-1 shows an example memory configuration of 1 space (CS) of 4 devices of 128Mbit (4M x 4 banks x 8bit) DDR SDRAM, for a total
memory size of 64MB.
7:0 15:8
DQ[7:0] DQ[7:0]
BA[1:0] BA[1:0]
CLK CLK
CLK CLK
Glue SDRAM CKE CKE
Memory Controller
CS CS
A_CS A_CS RAS RAS
0 CAS 1 CAS
DQ[31:0] 0 DQS 1 DQS
D_CS D_CS DM DM
BA[1:0]
A[11:0] A[11:0]
CLK
R/W R/W WE WE
CLK
DM[0:7] DM_I[0:7] CKE
REG_CS REG_CS
REGD_CS REGD_CS
DI[0:63] CS[0]
ADDR[4:29] CS[1]
processor bus AACK RAS
ARTRY CAS
TBST DQS[3:0]
DO[0:63] DM[3:0]
TA MA[11:0] A[11:0]
RESET WE
CLK DQ[31:0]
23:16 31:24
DQ[7:0] DQ[7:0]
BA[1:0] BA[1:0]
CLK CLK
CLK CLK
CKE CKE
CS CS
RAS RAS
2 CAS 3 CAS
2 DQS 3 DQS
DM DM
A[11:0] A[11:0]
WE WE
Both chip selects contribute together to access the whole memory. Each CS base address and size are programmed independently. Each CS
base address must be size-aligned.
The MPC5200 does not support DIMM memory modules, however it can support a DIMM-compatible EEPROM using an on-chip I2C chip
interface (with appropriate configuration of pin functions).
Outputs
MEM_CLK Memory Clock (frequency is the same as the internal XL bus clock). Maximum allowed
value is 132 MHz.
MEM_CLK_EN Memory Clock Enable (CKE). When low, the SDRAM is disabled. Used to switch memory
into and out of self-refresh/power-down modes.
MEM_CS[0], Memory Command Select. Each space has a command select to enable commands
MEM_CS[1]
MEM_RAS Memory Row Address Select
MEM_MA[12:0] Memory Multiplexed Address. These are used as row address, column address, or
Mode(Extended Mode) register data, depending on the command issued.
Row address during Active command.
Column address during Read and Write commands. MEM_MA10 is used as a control
signal instead of an address line, to control Auto Precharge operation. The Auto Precharge
control bit is not counted as a column address bit. The Memory Controller does not use
Auto Precharge.
Mode register data during Load Mode Register and Load Extended Mode Register (DDR
only) commands.
MEM_MBA[1:0] Memory Bank Address, or Mode register select, depending on the command issued.
Bank address during Precharge Selected, Active, Read, and Write commands. The
Memory Controller does not use the Precharge Selected command.
Mode register select during Load Mode Register and Load Extended Mode Register (DDR
only) commands. Although SDR memory only has a single internal Mode register, the Bank
Address bits must still be valid.
Bidirectional Signals
Note: Signals MEM_RAS, MEM_CAS, MEM_WE, and MEM_CLK_EN encode the SDRAM commands to control the
different SDRAM operations.
Col Col
Internal XL bus
ADDR[4:29] A[12:0]
Address Bk Address Bk Address
Input Row Pipeline Row Output
MUX Latches MUX
Sel BA[1:0]
A_CS
CS
MUX
CS[1:0]
External Interface
RAS
SDRAM CAS
Memory Controller
WE
D_CS State Machine
CKE
ADDR[30:31]
DQM[3:0]
TSIZ[0:2] OUT_EN[3:0]
TBST DQSOUT
DQSIN
Internal XL bus
DIN[0:63] MDOUT[31:0]
Write Data Buffer
DOUT[0:63] MDIN[31:0]
Read Data Buffer
The beat address order of the XL bus is sequential. Based on the start address issued by the internal master, the address order of the 4 XLD
beats in a burst transfer is one of the following:
• 0x00, 0x08, 0x10, 0x18 (memory data address order 0x00, 0x04, 0x08, 0x0c, ...)
• 0x08, 0x10, 0x18, 0x00
• 0x10, 0x18, 0x00, 0x08
• 0x18, 0x00, 0x08, 0x10
To implement single-beat transfers, the Memory Controller uses DM[3:0] to mask unwanted bytes or words. The Memory Controller supports
all single-beat transfer sizes from 1 to 8 contiguous bytes within a single modulo 8 address range.
A Single transfer is exactly 1 beat on the XLD bus. The relevant data for a Single transfer is always within the first 2 beats on the memory
bus, allowing the command to be aborted (interrupt) as soon as possible.
8.4.4 Commands
When an internal bus master accesses SDRAM address space, the Memory Controller generates the corresponding SDRAM command.
Table 8-3 lists SDRAM commands supported by the Memory Controller.
Table 8-3. SDRAM Commands
No Operation NOP H L H H H X X X
Read READ H L H L H V L V
Write WRIT H L H L L V L V
Note:
1. H = High
2. L = Low
3. V = Valid
4. X = Don’t care
Many commands require a delay before the next command may be issued; sometimes the delay depends on the type of the next command.
These delay requirements are managed by the values programmed in the Memory Controller Configuration registers.
These must be programmed in the Memory Controller Configuration registers separately from setting the memory Mode register.
8.5 Operation
Do not write any registers yet. Use these register values as default values for the following operations. An operation can override
the default, but overrides do not carry forward to subsequent operations.
Step 4. Write the SDRAMCS Configuration registers and the controller Config registers 1 & 2.
Step 5. Write the controller Control register with these overrides:
— assert the mode_en bit (1).
— negate ref_en (0).
Step 6. (DDR only) Write the controller Control register to issue a Precharge All Banks command (soft_pre=1); maintain mode_en=1,
ref_en=0, all other bits default.
Step 7. (DDR only) Write to the memory Extended Mode register to enable the DLL.
Step 8. (DDR only) Write to the memory Mode register to reset the DLL.
Step 9. (DDR only) Pause for the DLL lock time specified by the memory (roughly 100 µs. See memory datasheet for detailed time).
Step 10.Write to the controller Control register to issue a Precharge All Banks command (soft_pre=1); maintain mode_en=1, ref_en=0.
Step 11.Write to the controller Control register to issue 2 or more Auto Refresh commands (soft_ref=1); maintain mode_en=1, ref_en=0.
Each command requires a separate write.
Step 12.Write to the memory Mode register to specify normal operation.
Step 13.Write to the controller Control register to specify normal operation.
countGoodTap++;
}
}
If (firstGoodTap + countGoodTap - lastGoodTap - 1 != 0) {
die; // "Holes" in the range. Note 3.
}
bestTap = (lastGoodTap + firstGoodTap)/2;
If (invert) {
valid[0:31] = ~valid[0:31]; // Invert bits back to original.
firstGoodTap ^= lastGoodTap; // Swap firstGood Tap ...
lastGoodTap ^= firstGoodTap; // ... and lastGoodTap ...
firstGoodTap ^= lastGoodTap; // ... in place.
firstGoodTap = (firstGoodTap + 1) % 32;
lastGoodTap = (lastGoodTap + 31) % 32;
countGoodTap = 32 - countGoodTap;
bestTap = (bestTap + 16) % 32;
}
If (countGoodTap < magicNumber) {
die; // Note 4.
}
Write 1byte RstCfg reg (MBAR + 0x00000204) = bestTap;
xxx00200: // tea exception address, Note 5.
Restore SPRs; // No stacking or unstacking necessary.
Go to Label A;
Notes:
1. A region must be reserved in every active CS space. The minimum region size is the length of a burst. A suggested data pattern:
Write (region_base + 0x0000:0x005C) =
0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0x00000000,
0xFFFF0000, 0x0000FFFF, 0xFFFF0000, 0x0000FFFF,
0xFF00FF00, 0x00FF00FF, 0xFF00FF00, 0x00FF00FF,
0xF0F0F0F0, 0x0F0F0F0F, 0xF0F0F0F0, 0x0F0F0F0F,
0xCCCCCCCC, 0x33333333, 0xCCCCCCCC, 0x33333333,
0xAAAAAAAA, 0x55555555, 0xAAAAAAAA, 0x55555555
2. Multiple reads must be performed, and the correct data must be different for each. For the pattern suggested above, the read
addresses could be:
For (addr = 0x0000; addr < 0x0060, addr += 0x0020)
3. The definition of “die” may be different for different systems. One implementation could be “run the algorithm again”. Another
implementation could be “rerun the algorithm separately on each CS space, and boot with the space with the most margin only”.
Another implementation could be “boot a failsafe kernel in on-chip SRAM and send a service request”.
4. The larger the value of countGoodTap, the greater the tolerance for voltage and temperature drift, and the less often the delay tap
needs to be rechecked. A small value of countGoodTap indicates little margin for drift tolerance, and the delay tap should be
rechecked more often. magicNumber is a minimum acceptable margin to proceed with system boot. Different values may be
appropriate for different systems. A value somewhere in the range 3 to 9 is suggested as a guideline.
5. In DDR mode, as the SDRAM read is attempted with every possible value of tap select, it is possible for the access to hang;
therefore timeout must be enabled and a tea handler routine is necessary. Timeout cannot occur in SDR mode.
R Rsvd
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 MEM_MBA See SDRAM data sheet. Select either the memory device Mode register or the memory
[1:0] device Extended Mode register, if present.
14 — Reserved
15 cmd 1 Generate a (Extended) Mode Register Set memory command. Applied to all CS at
once.
0 Do not generate any memory command.
16:31 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
W soft soft
_ref _pre
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 hi_addr Control the use of internal address bits XLA[4:7] as row or column bits on the MEM_MA
bus. See Table 8-6.
9 drive_rule 0 “Tri-state except to write” mode: MPC5200 drives the MDQ and MDQS lines only when
necessary to perform write commands.
1 “Drive except to read” mode: MPC5200 tri-states the MDQ and MDQS lines only when
necessary to perform read commands.
“Drive except to read” mode prevents unterminated memory signals from floating for
extended periods. However, terminated routing is always recommended over
unterminated.
10:15 ref_interval[0:5] The average periodic interval at which the controller generates refresh commands to
memory; measured in increments of 64 x MEM_CLK period.
1) Multiply tREFI by the MEM_CLK frequency. (If the memory data sheet does not define
tREFI, it can be calculated by tREFI = tREF / #rows.)
Example: Assume tREF = 64ms, #rows = 4K, MEM_CLK = 133MHz. Then:
tREFI = 64ms / 4K = 15.625µs; 15.625µs x 133MHz = 2078.1
2) Divide the previous result by 64, rounding toward 0
2078.1 / 64 = 32.471; discard the fractional part.
3) Subtract 1 from the previous result. The new result is ref_interval.
32 - 1 = 31 = 0x1f
16:19 — Reserved
29 soft_ref 0 No operation.
1 Generate a non-periodic Auto Refresh command as soon as possible.
This is a write-only bit; always returns 0 on a read. A software requested refresh is
completely independent of the periodic refresh interval counter. Software refresh is only
possible when mode_en==1.
30 soft_pre 0 No operation.
1 Generate a Precharge All command as soon as possible.
This is a write-only bit; always returns 0 on a read. Software precharge is only possible
when mode_en==1.
31 — Reserved
The Table 8-6 indicates how the internal address bits XLA[4:7] are multiplexed internally to support higher column or row address bits.
Table 8-6. High Address Usage
13×8×2 1 — — — RA12
13×8×2 1 — — — RA12
MEM_CLK—Memory Controller clock—is the speed of the SDRAM interface and is equal to the internal XL bus clock.
MEM_CLK is fixed at boot time along with the XL bus clock, via the HW RESET WORD setting. It is an integer multiple of the
external reference clock (e.g., 66MHz, 99MHz or 132MHz if a 33MHz reference is used).
MEM_CLK2—double frequency of MEM_CLK—DDR uses both edges of the bus-frequency clock (MEM_CLK) to read/write
data.
Table 8-8. Memory Controller Configuration Register 1
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 srd2rwp Single Read to Read/Write/Precharge delay. Limiting case is Read to Write:
CL + burst + round trip delay + bus turnaround - tDQSS(DDR only) - 1; round up.
For DDR, tDQSS=1clk, bus turnaround=tHZ + 0.5clk:
If CL==2: 2 + 4 + 1 + 0.75ns + 0.5 - 1 - 1 = 5.5clk + 0.75ns, round to 0x6.
If CL==2.5: 2.5 + 4 + 1 + 0.75ns + 0.5 -1 - 1 = 6clk + 0.75ns, round to 0x7.
Note: This controller does not support Burst Terminate, therefore a single read will take
as long as a Burst read.
For SDR, bus turnaround=tHZ + 1clk:
If CL==2: 2 + 8 + 1 + 5.4ns + 1 - 1 = 11clk + 5.4ns, round to 0xC.
If CL==3: 3 + 8 + 1 + 5.4ns + 1 - 1 = 12clk + 5.4ns, round to 0xD.
4 — Reserved
5:7 swt2rwp Single Write to Read/Write/Precharge delay. Limiting case is Write to Precharge.
For DDR, suggested value = 0x3 (tWR + 1 clk)
For SDR, suggested value = 0x2 (tWR)
12 — Reserved
16 — Reserved
17:19 pre2act Precharge to Active or Refresh delay.
Suggested value at 132 MHz = 0x02
Rule: tRP/MEM_CLK-1. Round up to nearest integer.
EXAMPLE:
If tRP = 20ns and MEM_CLK = 99 MHz
20ns / 10.1 ns = 1.98; round to 2; write 0x1.
If tRP = 20 ns and MEM_CLK = 132 MHz
20ns / 7.5 ns = 2.66; round to 3; write 0x2.
24 — Reserved
28:31 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 brd2rp Burst Read to Read/Precharge delay. Limiting case is Read to Read.
For DDR, suggested value = 0x4 (BurstLength/2)
For SDR, suggested value = 0x8 (BurstLength)
4:7 bwt2rwp Burst Write to Read/Write/Precharge delay. Limiting case is Write to Precharge.
For DDR, suggested value = 0x6 (BurstLength/2 + tWR)
For SDR, suggested value = 0x8 (BurstLength + tWR - 2)
8:11 brd2wt Burst Read to Read/Write/Precharge delay. Limiting case is Read to Write:
CL + burst + round trip delay + bus turnaround - tDQSS(DDR only) - 1; round up.
For DDR, tDQSS=1clk, bus turnaround=tHZ + 0.5clk:
If CL==2: 2 + 4 + 1 + 0.75ns + 0.5 - 1 - 1 = 5.5clk + 0.75ns, round to 0x6.
If CL==2.5: 2.5 + 4 + 1 + 0.75ns + 0.5 -1 - 1 = 6clk + 0.75ns, round to 0x7.
For SDR, bus turnaround=tHZ + 1clk:
If CL==2: 2 + 8 + 1 + 5.4ns + 1 - 1 = 11clk + 5.4ns, round to 0xC.
If CL==3: 3 + 8 + 1 + 5.4ns + 1 - 1 = 12clk + 5.4ns, round to 0xD.
16:31 — Reserved
The Figure 8-3. Programmable Command Timings shows the timings which can be programmed by the two Controller Configuration
Register. The timing diagram uses the suggested values for a DDR memory and a 132 MHz memory clock. The displayed Commands are the
limiting cases.
MEM_CLK
(srd2rwp +1) or (brd2wt + 1) Single Read to Read/Write/Precharge
Burst Read to Write/Precharge
Read Write
CL wr_latency/3
Data
Write Prech
Ref Active
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Can be used as most significant row or column address bits: XL bus address bits 29:31
{CA12, CA11, CA9, CA8} or {CA11, CA9, CA8, RA12} control the data mask pins,
MEM_DQM[3:0].
The Memory Controller extracts the Row Address from the XL bus address.
The Row Address is presented on the MPC5200 MEM_MA[12:0] pins dur-
ing SDRAM Active commands.
Row Address bit 12 depends on the Control register hi_addr bit.
0 8
9 10 11 12 13 14 15 16 17
17 18 19 Internal XL address bus
hi_addr = 0
12 11 10 9 8 7 6 5 4 3 2 1 0 Ext MEM_MA pins, row
7 8
9 10 11 12 13 14 15 16 17 18 19 Internal XL address bus
hi_addr = 1
12 11 10 9 8 7 6 5 4 3 2 1 0 Ext MEM_MA pins, row
XL bus address bits 20:21 select the internal bank of an SDRAM device. Each SDRAM
device has 4 internal banks.
XL bus address bits 20:21 are presented on the MPC5200 MEM_BA[1:0] pins during
SDRAM Active, Read, and Write commands.
The Memory Controller extracts the Column Address from the XL bus address. The Column Address is presented on the
MPC5200 MEM_MA[12:0] pins during SDRAM Read and Write commands.
Column Address bits 12:8 depend on the Control register hi_addr bits. Auto Precharge (MEM_MA[10])is always inhibited
(0).
Chapter 9
LocalPlus Bus (External Bus Interface)
9.1 Overview
The LocalPlus Bus is the external bus interface of the MPC5200. This multi-function bus system supports interfacing to external Boot ROM
or Flash memories, external SRAM memories or other memory mapped devices. The following sections are contained herein:
• Section 9.1, Overview
• Section 9.2, Features
• Section 9.3, Interface
— Section 9.3.1, External Signals
— Section 9.3.2, Block Diagram
• Section 9.4, Modes of Operation
— Section 9.4.1, Non-MUXed Mode
— Section 9.4.2, MUXed Mode
• Section 9.5, Configuration
— Section 9.5.1, Boot Configuration
— Section 9.5.2, Chip Selects Configuration
— Section 9.5.3, Reset Configuration
• Section 9.6, DMA (BestComm) Interface (SCLPC)
• Section 9.7, Programmer’s Model
— Section 9.7.1, Interrupt and Bus Errors
— Section 9.7.1, Chip Select/LPC Registers—MBAR + 0x0300
— Section 9.7.2, SCLPC Registers—MBAR + 0x3C00
— Section 9.7.3, SCLPC FIFO Registers—MBAR + 0x3C40
The MPC5200 offers a shared external 32-bit address/data bus, which supports connections to PCI and ATA compliant devices, as well as
memory mapped devices such as Flash memories, ROM, SRAM, gate-array logic, or other simple target (slave) devices with little or no
additional circuitry. Separate control signals are used by each interface. The on-chip arbiter (called PCI Arbiter) controls the access to the
shared AD bus for the different clients.
NOTE
If the PCI interface is NOT used (and internally disabled) the PCI control pins must be terminated as
indicated by the PCI Local Bus specification. PCI control signals always require pull-up resistors on
the motherboard (not the expansion board) to ensure that they contain stable values when no agent is
actively driving the bus. This includes PCI_FRAME, PCI_TRDY, PCI_IRDY, PCI_DEVSEL,
PCI_STOP, PCI_SERR, PCI_PERR, and PCI_REQ.
The PCI signals, which are not used as address in Large Flash mode, are drive low during a Large
Flash access. This includes PCI_SERR, PCI_PERR, PCI_IDSEL, PCI_REQ, PCI_GNT and
PCI_RESET.
The PCI interface is described in Chapter 10, PCI Controller. The ATA compliant interface is described in Chapter 11, ATA Controller. The
interface for memory mapped devices, called LocalPlus Bus, is described in this chapter. The MPC5200 LocalPlus Controller (LPC) module
implements the LocalPlus Bus interface.
The LocalPlus Bus interface provides a high flexibility and all its different operating modes can be selected by means of software
configuration and in some cases minimal external logic (in multiplexed mode).
9.2 Features
LocalPlus has the following features:
• Interface to memory mapped or chip selected devices
• Two main modes of operation :
— non-MUXed Modes
Legacy Modes (Address 8, 16, or 24 bits, Data 8 or 16 bits)
Most Graphics Mode (Address 24 bits, Data 32 bits)
Large Flash Mode (Address 26 bits, Data 8 or 16 bits)
— MUXed Modes
9.3 Interface
The LocalPlus interface consists of:
• Address Bus
• Data Bus
• Chip Select signals CS0-7
• control signals:
— R/W (Read/Write)
— ALE (Address Latch Enable)
— ACK (Acknowledge)
— TS (Transfer Start)
— OE (Output Enable)
— TSIZ bits (Transfer Size)
— Bank Select bits
• reference clock PCI_CLOCK
The reference clock PCI_CLOCK is always running, even if the PCI Controller is disabled.
CS [7:0] O Chip Selects (active low), CS[4] and CS[5] shared with ATA, CS[6 ] and CS[7] shared with
PSC3.
R/W O Read/Write. 1 = Read, 0 = Write
EXT_AD[31:0] I/O AD Address / Data bus (bi-directional when used as data; bit 31=msb)
OE O Output Enable
The reference clock is the PCI_CLOCK and all clock counts are referred to this clock. All transitions are synchronized to the rising edge of
the PCI_CLOCK.
Start/Stop registers to define the CS address range for each CS output are contained in the MPC5200 MMAP register group, see
Section 3.3.3.2, Boot and Chip Select Addresses. Registers in the LPC are accessed through the address range specified in the MPC5200
Internal Register Map. For more information, see Section 9.7, Programmer’s Model. These registers control the operation of a particular CS
and peripheral, when a "hit" occurs in the MMAP module for the corresponding CS space.
XL Bus
Variable Width
IP bus Data Address
IPBI Registers
Variable Width
AD[31:0]
Shared Data R/W Data multiplexed
MMAP with PCI, ATA
8 cs “hit” R/W
LPC ACK
32 ext_add
ALE
AD bus Request TS
2 TSIZ[1:2]
8 CS[0:7]
IPB_CLK
CDM
PCI_CLOCK
NOTE
BestComm Interface + FiFo not shown
Not all pins are used in all modes.
For multiplexed bus implementation, external logic is required to capture the address phase as shown in Figure 9-2.
MPC5200 Peripheral
DATA[31:0]
CSx
OE
R/W
MUXed and non MUXed modes support a variety of device configurations and are configurable on a per CS basis.
Category Address Size Data Size Pins used Memory size Comments
NOTE
The 24-bit data width is not supported.
The total pin number requires also the addition of the control signals CS,
R/W, ACK, OE, TS (MOST/Graphis and Large Flash mode) and TSIZ (MOST/Graphics mode) where available.
The total supported memory size has been calculated taking into account that when accessing 16/32 bit devices A1 and/or
A0 can NOT be used.
The above options defined as BOOT Option are selectable via the reset configuration word. Other configurations are possible via software
configuration (e.g., 8-bit data and 16-bit address). Figure 9-4 shows the operation of Non-MUXed Read/Write accesses.
TSIZ bits are available for MOST/Graphics mode. They appear on GPIO_WKUP_7 (TSIZ most significant bit, TSIZ 1) and TEST_SEL_1
(TSIZ least significant bit, TSIZ 2). Only TSIZEs of 1, 2, or 4 are supported.
TSIZ[1:2] are driven as follows:
01 = Transaction is 1 byte.
10 = Transaction is 2 bytes.
00 = Transaction is 4 bytes.
Other values are invalid and should not be required by the external peripheral!
Table 9-3 describes the various combinations of TSIZ, address and byte lanes for MOST/Graphis mode.
Table 9-3. Non-Muxed Aligned Data Transfers
Data lanes
Transfer Size TSIZ[1:2] Addr[1:0]
AD[31:24] AD[23:16] AD[15:8] AD[7:0]
1 Byte 01 00 Data -- -- --
01 -- Data -- --
10 -- -- Data --
11 -- -- -- Data
10 -- -- Data Data
CS[x]
Valid Address
ADDR
OE
R/W
ACK
TS
TSIZ[1:2]
NOTE:
1. ACK can shorten the CS pulse width.
2. TS is only available in Large Flash and MOST Graphics mode.
3. TSIZ[1:2] are only available in MOST Graphics mode.
PCI CLK
CS[x]
OE
ACK
TS
NOTE:
1. ACK is output and indicates the burst.
In this mode, the peripheral address and data lines are limited to a total of 32 in Legacy Modes, to 40 or 48 in Large Flash or to 56 in MOST
Graphics mode. They are driven/read simultaneously on the external AD bus. A single dedicated R/W pin is driven to indicate read or write.
An individually dedicated CS pin is driven low while an external access is active.
Wait states are programmable and simply select how many PCI clocks the CS pin (and related signals) remain asserted. Separate values are
available for Read cycles versus Write Cycles. These values can be combined to create extremely long (up to 16 bits) Write cycles. Byte lane
swapping is separately programmable between Reads versus Writes and can be used to perform Endian conversions. The 24-bit data width is
not supported.
Peripherals can be marked as read-only or write-only by setting a control bit in the appropriate LPC register. Attempted accesses in violation
of this setting are prevented and result in either a Bus Error and/or an Interrupt as controlled by corresponding Enable bits. Each CS pin can
be individually enabled/disabled and the entire LPC module has a Master Enable bit. No software reset bit is provided or needed.
The non-multiplexed mode requires no external logic for interfacing to simple devices such as Flash ROM, E2PROM or SRAM. It is faster
than the multiplexed mode because data and address are provided in a single tenure. The supported address space is limited by the 26 address
lines.
NOTE
The 24-bit data width is not supported.
The total supported Memory space consists of four banks.
Bank select bits are written in a register by the G2_LE processor. They can be used as individual selects or as encoded values. They are
presented on the bus during the address tenure as additional upper address bits.
In this mode, an address tenure is generated that can be up to 25bits of active address. The additional address bits drive:
• a TSIZE value (3 bits)
• a Bank Select value (2 bits)
An ALE signal is asserted (active lo) during this address tenure. ALE width is always one PCI bus clock. The dedicated R/W output is also
driven with ALE (and throughout the cycle). When ALE negates, the appropriate CS pin asserts (low) and the AD bus enters the data tenure.
The CS pin and this data tenure remain active until the programmed wait states expire, or the peripheral responds with an ACK assertion.
ACK polarity is active low, but can be programmed to be ignored. The data tenure can contain up to the full 32-bit width. However, the data
width is programmable to support dynamically bus-sized transactions.
The MUXed mode requires external logic to latch the address during the address tenure and to decode bank selects if they are encoded. This
mode is slower than the non-MUXed mode because data and address are multiplexed in time. The supported address space is limited by the
25 address lines. In MUXed mode, LocalPlus can access up to 128 MBytes of data divided into four banks each of 32 MBytes maximum.
Data lanes
Transfer Size TSIZ[0:2] AD[1:0]
AD[31:24] AD[23:16] AD[15:8] AD[7:0]
01 -- Data -- --
10 -- -- Data --
11 -- -- -- Data
10 -- -- Data Data
The ALE signal is active low and remains asserted for 1 external PCI bus clocks. When active any external latch should be transparent.
AD[31] & AD[27] are unused and are driven low by the LPC during the address tenure, they are used as data lines during the data phase in
32-bit modes.
PCI CLK
ALE
Address latch
TS
CSx
OE
RW
ACK
Address tenure Data tenure
NOTE:
1. ACK can shorten the CS pulse width.
2. Address should be latched during the low phase of ALE with the negative edge of the PCI clock.
9.5 Configuration
The LPC supports several options in terms of modes, address and data sizes, speed, and configuration which are described below.
• The boot address/exception table can be located at 0x0000 0100 or 0xfff0 0100.
The PowerPC architecture compatible processor core requires 64-bit instruction fetches. During boot code accesses from CS Boot space
on-chip logic is provided to perform enough LocalPlus accesses to accumulate 64-bit instructions to be given to the G2_LE processor. For
example, before passing the resulting 64-bit instruction to the G2_LE processor, LocalPlus logic does either:
• 8 accesses to an 8-bit device
• 4 accesses to a 16-bit device
• 2 accesses to a 32-bit device
NOTE
The Boot space supports cached instruction reads and "critical doubleword word first" transactions.
The Boot space does NOT support:
• an 8-bit wide MUXed mode configuration during boot.
After boot, CS Boot space can be programmed to act as other MPC5200 Chip Select spaces (CS0-7). This capability is described in the
sections below.
• BootSwap
Table 9-1 describes possible boot settings.
Table 9-6. BOOT_CONFIG (RST_CONFIG) Options
LargeFlash - Large Flash boot mode when active BootSize defines data
size (8/16)
BootWait Minimum Wait states Maximum Wait states: The ACK input can shorten wait
4 ipb_clk cycles 48 ipb_clk cycles states, if BootDevice supports it.
R WaitP WaitX
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
0:7 WaitP Number of wait states to insert. Can be applied as a prescale to WaitX or used by itself, as
specified by WTyp bits below. Wait states control how many PCI clocks the corresponding
CS pin remains active.
8:15 WaitX Base number of wait states to insert, or combined with WaitP as specified by WTyp bits
below.
cfg operation—If rstcfg[11] (on pad_eth_03) is zero then 4 wait states are in effect, else 48
wait states are in effect. Wait States equals the number of PCI clocks from CS assertion to
when data must be valid from boot device.
17 — Reserved
18 AA ACK Active. This bit defines whether ACK input is active or not. If AA is 1, programmed wait
states can be overridden when/if the external device drives the ACK input low. If AA is 0, the
ACK input is ignored.
Wait states are still in effect. If no ACK is received, cycle terminates at end of wait state
period.
Note: Bit must be set to 0, to use ACK as burst indication signal during a burst transaction.
19 CE An individual Enable bit—allows CS operation for the corresponding CS pin. CE must be high
to allow operation. Chip Select Control Register ME bit must also be high, except when
CS[0] is used for boot ROM.
1 = Enable
0 = Disabled, register writes can occur but no external access is generated.
20:21 AS Address Size field—defines size of peripheral Address bus (in bytes) and must be consistent
with physical connections.
00 = 8 bits
01 = 16 bits
10 = 24 bits
11 = > 25 bits
See documentation for Physical Connection requirements.
The combination of address size, data size, and transaction type (MX) must be consistent
with the peripheral physical connection. In case of a multiplexed transaction, the entire
address is driven regardless of address size field.
cfg operation—If rstcfg[13] on pad_eth_05 is low, then the address size for non-multiplexed
boot device is set to 24 bits (AS=10), else the boot device is treated as a 16 bit address
(AS=01) device. For multiplexed mode boot devices the maximum 25 bits of address is
always driven. This rstcfg bit more particularly affects the DS field below, and can be thought
of as the “small” or “big” data size config bit.
22:23 DS Data Size field—represents the peripheral data bus size (in bytes):
00 =1Byte
01 = 2 Bytes
10 = 3 Bytes (Not Supported)
11 = 4Bytes
cfg operation—If rstcfg[13] on pad_eth_05 is low, then the data size for non-multiplexed
boot device is set to 8 bits (DS=00), else the boot device is treated as a 16 bit (DS=01)
device. For multiplexed mode boot device the selection is 16 bit data or 32 bit data
respectively.
24:25 Bank Bank bits—are reflected on external AD lines (AD[26:25]) during Address tenure of a
multiplexed transaction. Register bit 24 is the msb and appears on AD[26].
26:27 WTyp Wait state Type bits—define the application of wait states contained in WaitP and WaitX
fields, as follows:
00 = WaitX is applied to read and write cycles (WaitP is ignored).
01 = WaitX is applied to Read cycles, WaitP is applied to Write cycles.
10 = WaitX is applied to Reads, WaitP/WaitX (16-bit value) is applied to Writes.
11 = WaitP/Waitx (as a full 16-bit value) is applied to Reads and Writes.
28 WS Write Swap bit—If high, Endian byte swapping occurs during writes to a peripheral.
• For 8-bit peripherals, this bit has no effect.
• For 16-bit peripherals, byte swapping can occur.
• For 32-bit peripherals (possible in MUXed mode only) byte swap can occur.
1 = swap
0 = NO swap
2-byte swap is AB to BA, 4-byte swap is ABCD to DCBA.
Note: Transactions at less than the defined port size (i.e., data size) apply swap rules as
above, according to the current transaction size.
29 RS Read Swap bit—Same as WS, but swapping is done when reading data from a peripheral.
1 = swap
0 = NO swap
cfg operation—If rstcfg[12] on pad_eth_04 is low, data from the boot device is Endian
swapped when read. This only has effect for boot devices configured as 16- or 32-bit data
size.
30 WO Write Only bit—If high, peripheral is treated as a write-only device. An attempted Read
access doesn’t generate a transaction to the peripheral. Additionally, the Write Only error bit
is set.
31 RO Read Only bit—If high, peripheral is treated as a read-only device. An attempted Write
access doesn’t generate a transaction to the peripheral. Additionally, the Read Only error bit
is set.
Note: This bit is high from Reset, indicating Boot Device is Read-Only.
Note:
1. The reset values defined as "cfg” depends on the Reset Configuration.
2. Large Flash mode is used, if AS is set to 11 and DS is set to 00 or 01.
3. MOST/Graphics mode is used, if AS is set to 10 and DS is set to 11.
R WaitP WaitX
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 WaitP Number of Wait States to insert. Can be applied as a prescale to Wait X or used by itself, as
dictated by the WTyp bits (see below). Wait States control how many PCI clocks the
corresponding CS pin remains active.
8:15 WaitX The base number of wait states to insert, or combined with WaitP as dictated by the WTyp
bits below.
17 — Reserved
18 AA ACK Active. This bit defines whether ACK input is active or not. If AA is 1, programmed wait
states can be overridden when/if the external device drives the ACK input low. If AA is 0, the
ACK input is ignored.
Wait states are still in effect. If no ACK is received, cycle terminates at end of wait state
period.
Note: Bit must be set to 0, to use ACK as burst indication signal during a burst transaction.
19 CE Chip Enable—bit allows CS operation for the corresponding CS pin. Must be high to allow
operation. Chip Select Control Register ME bit must also be high.
Enabled.
0 = Disabled, register writes can occur but no external access is generated.
20:21 AS Address Size field—defines the peripheral address bus size in bytes, and must be consistent
with the physical connections.
00 = 8 bits
01 = 16 bits
10 = 24 bits
11 = > 25 bits
Note: The combination of address size, data size, and transaction type (MX) must be
consistent with the physical peripheral connection. In a multiplexed transaction, the entire
address is driven, regardless of the address size field.
22:23 DS Data Size field—represents the peripheral data bus size (in bytes):
00 =1Byte
01 = 2 Bytes
10 = 3 Bytes (Not Supported)
11 = 4Bytes
24:25 Bank Bank bits—are reflected on external AD lines (AD[26:25]) during address tenure of a
multiplexed transaction. Register bit 24 is the msb and appears on AD[26].
26:27 WTyp Wait state Type bits—define application of wait states contained in WaitP and WaitX fields,
as follows:
00 = WaitX is applied to Read and Write cycles (WaitP is ignored)
01 = WaitX is applied to Read cycles, WaitP is applied to Write cycles
10 = WaitX is applied to Reads, WaitP/WaitX (16-bit value) is applied to Writes
11 = WaitP/Waitx (as a full 16-bit value) is applied to Reads and Writes
28 WS Write Swap bit—If high, Endian byte swapping occurs during writes to a peripheral.
• For 8-bit peripherals, this bit has no effect.
• For 16-bit peripherals, byte swapping can occur.
• For 32-bit peripherals (possible in MUXed mode only) byte swap can occur.
1 = swap
0 = NO swap
2-byte swap is AB to BA, 4-byte swap is ABCD to DCBA.
Note: Transactions at less than the defined port size (i.e., data size) apply swap rules as
above, according to the current transaction size.
29 RS Read Swap bit—Same as WS, but swapping is done when reading data from a peripheral.
1 = swap
0 = NO swap
Note: Transactions at less than the defined port size (i.e., data size) apply swap rules as
above, according to the current transaction size.
30 WO Write Only bit—If high, peripheral is treated as a write-only device. An attempted Read
access doesn’t generate a transaction to the peripheral. Additionally, the Write Only error bit
is set.
31 RO Read Only bit—If high, peripheral is treated as a read-only device. An attempted Write
access doesn’t generate a transaction to the peripheral. Additionally, the Read Only error bit
is set.
Note:
1. Large Flash mode is used, if AS is set to 11 and DS is set to 00 or 01.
2. MOST Graphics mode is used, if AS is set to 10 and DS is set to 11.
R Reserved ME Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 ME Master Enable bit—a global module enable bit. If this bit is low, register access can still occur,
but no external transactions are accepted. However, ME does not affect boot ROM operation
on CS[0]. If software wishes to disable CS[0], it must write 0 to the Chip Select Boot ROM
Configuration Register enable bit (CE).
8:31 — Reserved
WOerr
ROerr
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2 WOerr Write Only error—If 1, it indicates a Read access was attempted on a peripheral marked as
write-only.
This is a sticky bit and must be written with 1 to be cleared. The CS number that relates to
the error is reflected in the CSxerr field.
3 ROerr Read Only error—If 1, it indicates a Write access was attempted on a peripheral marked as
read-only.
This is a sticky bit and must be written with 1 to be cleared. The CS number that relates to
the error is reflected in the CSxerr field.
4 — Reserved
5:7 CSxerr Chip Select error—Indicates CS number associated with WOerr or ROerr.
8:31 — Reserved
R CW7 SLB7 Rsvd CW6 SLB6 Rsvd CW5 SLB5 Rsvd CW4 SLB4 Rsvd
BRE7
BRE6
BRE5
BRE4
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R CW3 SLB3 Rsvd CW2 SLB2 Rsvd CW1 SLB1 Rsvd CW0 SLB0 Rsvd
BRE3
BRE2
BRE1
BRE0
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 CW7 Chip Select 7 Cache Wrap capable, set if peripheral burst can perform PPC cache wrap. This
bit setting only applies in Large Flash or MOST Graphics Mode.
1 SLB7 Chip Select 7 Short/Long Burst, 0 for Short Burst only, 1 for Long Burst capable. Short burst
is 8-bytes, used for Instruction fetches, and CDWF cache line bursts on XLB if cache wrap
not capable. Long Burst capable means that peripheral can do 32-byte burst which hardware
will generate for cache line aligned XLB bursts (and CDWF if peripheral tagged as cache
wrap capable also).
This bit setting only applies in Large Flash or MOST Graphics Mode.
2 — Reserved
3 BRE7 Chip Select 7 Burst Read Enable, 1 to enable peripheral bursting for given chip select. Must
be set to enable any Bursting reads.
This bit setting only applies in Large Flash or MOST Graphics Mode.
4 CW6 Chip Select 6 Cache Wrap capable, set if peripheral burst can perform PPC cache wrap. This
bit setting only applies in Large Flash or MOST Graphics Mode.
5 SLB6 Chip Select 6 Short/Long Burst, 0 for Short Burst only, 1 for Long Burst capable. Short burst
is 8-bytes, used for Instruction fetches, and CDWF cache line bursts on XLB if cache wrap
not capable. Long Burst capable means that peripheral can do 32-byte burst which hardware
will generate for cache line aligned XLB bursts (and CDWF if peripheral tagged as cache
wrap capable also).
This bit setting only applies in Large Flash or MOST Graphics Mode.
6 — Reserved
7 BRE6 Chip Select 6 Burst Read Enable, 1 to enable peripheral bursting for given chip select. Must
be set to enable any Bursting reads.
This bit setting only applies in Large Flash or MOST Graphics Mode.
8 CW5 Chip Select 5 Cache Wrap capable, set if peripheral burst can perform PPC cache wrap. This
bit setting only applies in Large Flash or MOST Graphics Mode.
9 SLB5 Chip Select 5 Short/Long Burst, 0 for Short Burst only, 1 for Long Burst capable. Short burst
is 8-bytes, used for Instruction fetches, and CDWF cache line bursts on XLB if cache wrap
not capable. Long Burst capable means that peripheral can do 32-byte burst which hardware
will generate for cache line aligned XLB bursts (and CDWF if peripheral tagged as cache
wrap capable also).
This bit setting only applies in Large Flash or MOST Graphics Mode.
10 — Reserved
11 BRE5 Chip Select 5 Burst Read Enable, 1 to enable peripheral bursting for given chip select. Must
be set to enable any Bursting reads.
This bit setting only applies in Large Flash or MOST Graphics Mode.
12 CW4 Chip Select 4 Cache Wrap capable, set if peripheral burst can perform PPC cache wrap. This
bit setting only applies in Large Flash or MOST Graphics Mode.
13 SLB4 Chip Select 4 Short/Long Burst, 0 for Short Burst only, 1 for Long Burst capable. Short burst
is 8-bytes, used for Instruction fetches, and CDWF cache line bursts on XLB if cache wrap
not capable. Long Burst capable means that peripheral can do 32-byte burst which hardware
will generate for cache line aligned XLB bursts (and CDWF if peripheral tagged as cache
wrap capable also).
This bit setting only applies in Large Flash or MOST Graphics Mode.
14 — Reserved
15 BRE4 Chip Select 4 Burst Read Enable, 1 to enable peripheral bursting for given chip select. Must
be set to enable any Bursting reads.
This bit setting only applies in Large Flash or MOST Graphics Mode.
16 CW3 Chip Select 3 Cache Wrap capable, set if peripheral burst can perform PPC cache wrap. This
bit setting only applies in Large Flash or MOST Graphics Mode.
17 SLB3 Chip Select 3 Short/Long Burst, 0 for Short Burst only, 1 for Long Burst capable. Short burst
is 8-bytes, used for Instruction fetches, and CDWF cache line bursts on XLB if cache wrap
not capable. Long Burst capable means that peripheral can do 32-byte burst which hardware
will generate for cache line aligned XLB bursts (and CDWF if peripheral tagged as cache
wrap capable also).
This bit setting only applies in Large Flash or MOST Graphics Mode.
18 — Reserved
19 BRE3 Chip Select 3 Burst Read Enable, 1 to enable peripheral bursting for given chip select. Must
be set to enable any Bursting reads.
This bit setting only applies in Large Flash or MOST Graphics Mode.
20 CW2 Chip Select 2 Cache Wrap capable, set if peripheral burst can perform PPC cache wrap. This
bit setting only applies in Large Flash or MOST Graphics Mode.
21 SLB2 Chip Select 2 Short/Long Burst, 0 for Short Burst only, 1 for Long Burst capable. Short burst
is 8-bytes, used for Instruction fetches, and CDWF cache line bursts on XLB if cache wrap
not capable. Long Burst capable means that peripheral can do 32-byte burst which hardware
will generate for cache line aligned XLB bursts (and CDWF if peripheral tagged as cache
wrap capable also).
This bit setting only applies in Large Flash or MOST Graphics Mode.
22 — Reserved
23 BRE2 Chip Select 2 Burst Read Enable, 1 to enable peripheral bursting for given chip select. Must
be set to enable any Bursting reads.
This bit setting only applies in Large Flash or MOST Graphics Mode.
24 CW1 Chip Select 1 Cache Wrap capable, set if peripheral burst can perform PPC cache wrap. This
bit setting only applies in Large Flash or MOST Graphics Mode.
25 SLB1 Chip Select 1 Short/Long Burst, 0 for Short Burst only, 1 for Long Burst capable. Short burst
is 8-bytes, used for Instruction fetches, and CDWF cache line bursts on XLB if cache wrap
not capable. Long Burst capable means that peripheral can do 32-byte burst which hardware
will generate for cache line aligned XLB bursts (and CDWF if peripheral tagged as cache
wrap capable also).
This bit setting only applies in Large Flash or MOST Graphics Mode.
26 — Reserved
27 BRE1 Chip Select 1 Burst Read Enable, 1 to enable peripheral bursting for given chip select. Must
be set to enable any Bursting reads.
This bit setting only applies in Large Flash or MOST Graphics Mode.
28 CW0 Chip Select 0 Cache Wrap capable, set if peripheral burst can perform PPC cache wrap. This
bit setting only applies in Large Flash or MOST Graphics Mode.
29 SLB0 Chip Select 0 Short/Long Burst, 0 for Short Burst only, 1 for Long Burst capable. Short burst
is 8-bytes, used for Instruction fetches, and CDWF cache line bursts on XLB if cache wrap
not capable. Long Burst capable means that peripheral can do 32-byte burst which hardware
will generate for cache line aligned XLB bursts (and CDWF if peripheral tagged as cache
wrap capable also).
This bit setting only applies in Large Flash or MOST Graphics Mode.
30 — Reserved
31 BRE0 Chip Select 0 Burst Read Enable, 1 to enable peripheral bursting for given chip select. Must
be set to enable any Bursting reads.
This bit setting only applies in Large Flash or MOST Graphics Mode.
Note:
1. CDWF is defined as "critical doubleword word first".
2. The bits for Chip Select 0 (CS0) control CS Boot too.
3. With a clock ratio 1:1:1 (66:66:66 MHz) it is not possible to burst in Large Flash mode.
RESET: 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
0:1 — Reserved
2:3 DC7 Deadcycles can be specified as 0 to 3. Dead cycles will be added to the end of Chip Select
7 read access and will occur in addition to any cycles which may already exist. These cycles
are to provide peripheral additional time to tri-state it's bus after a read operation. This is for
all access types.
4:5 — Reserved
6:7 DC6 Deadcycles can be specified as 0 to 3. Dead cycles will be added to the end of Chip Select
6 read access and will occur in addition to any cycles which may already exist. These cycles
are to provide peripheral additional time to tri-state it's bus after a read operation. This is for
all access types.
8:9 — Reserved
10:11 DC5 Deadcycles can be specified as 0 to 3. Dead cycles will be added to the end of Chip Select
5 read access and will occur in addition to any cycles which may already exist. These cycles
are to provide peripheral additional time to tri-state it's bus after a read operation. This is for
all access types.
12:13 — Reserved
14:15 DC4 Deadcycles can be specified as 0 to 3. Dead cycles will be added to the end of Chip Select
4 read access and will occur in addition to any cycles which may already exist. These cycles
are to provide peripheral additional time to tri-state it's bus after a read operation. This is for
all access types.
16:17 — Reserved
18:19 DC3 Deadcycles can be specified as 0 to 3. Dead cycles will be added to the end of Chip Select
3 read access and will occur in addition to any cycles which may already exist. These cycles
are to provide peripheral additional time to tri-state it's bus after a read operation. This is for
all access types.
20:21 — Reserved
22:23 DC2 Deadcycles can be specified as 0 to 3. Dead cycles will be added to the end of Chip Select
2 read access and will occur in addition to any cycles which may already exist. These cycles
are to provide peripheral additional time to tri-state it's bus after a read operation. This is for
all access types.
24:25 — Reserved
26:27 DC1 Deadcycles can be specified as 0 to 3. Dead cycles will be added to the end of Chip Select
1 read access and will occur in addition to any cycles which may already exist. These cycles
are to provide peripheral additional time to tri-state it's bus after a read operation. This is for
all access types.
28:29 — Reserved
30:31 DC0 Deadcycles can be specified as 0 to 3. Dead cycles will be added to the end of Chip Select
0 read access and will occur in addition to any cycles which may already exist. These cycles
are to provide peripheral additional time to tri-state it's bus after a read operation. This is for
all access types.
NOTE
Deadcycle counter is only used, if no arbitration to an other module (ATA or PCI) of the shared local
bus happens. If an arbitration happens the bus can be dirven within 4 IPB clocks by an other module.
Restart
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Packet Size
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 Restart Once all registers have been programmed, software writes a 1 to this bit to begin a
transfer. It will auto-clear and always reads back as zero.
8:31 Packet Size This 24-bit field represents the number of bytes SCLPC is to transact before going
idle and waiting for a Restart.
Note: The co-location of Restart bit and Packet_Size field allows Software to both
Restart a transaction AND change the Packet_Size in a single write. Maximum
packet size is 16M-1 bytes.
R Start Address
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Start Address
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 Start Address Address of the first byte in the packet to be sent. This value must be aligned with the
"BPT" (Bytes Per Transaction) field, described below. This address will appear
directly at the peripheral and is completely independent of XLB address decoding
logic.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:4 — Reserved
5:7 CSX This field should be written with the Chip Select number associated with each DMA
transaction.
Note: LPC configuration registers associated with this CS also affect SCLPC
transactions. The two work together.
8:13 — Reserved
14 Flush If set to 1, enables the assertion of SCLPC requestor at the completion of a *Read*
Packet, regardless of the actual state of the physical fifo ALarm. Requestor will
de-assert once the fifo goes empty. This is the fix for the familiar "Stale Read Data"
fifo problem.
16:22 — Reserved
23 DAI Disable Auto Increment. Normally, SCLPC and LPC will present sequential
incrementing addresses to the peripheral as the Packet proceeds. If the peripheral is
operating as a single address Fifo, then the DAI bit should be set to 1. When set,
addresses to the peripheral will be stuck at Start_Address for every transaction.
For DAI operation, the BPT field *MUST* be set to the port size of the peripheral.
24:27 — Reserved
28:31 BPT Bytes Per Transaction. Indicates number of bytes per transaction. The "only" valid
entries in this field are decimal/hex 1, 2, 4, or 8 bytes (i.e. binary 0001, 0010, 0100,
1000). BPT should not be set to less than the peripheral port size, but certainly can
be set to larger than the peripheral port size. The higher the BPT value, the greater
the throughput.
Note: Start_Address and Packet_Size values *must* be aligned/multiples of BPT.
For DAI operation, BPT must be set to the peripheral port size.
R Reserved RC Reserved RF
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 RC Reset Controller. This bit allows for a Software reset of the SCLPC state machine.
Writing a 1 to this bit will reset the SCLPC state machine. Reset will be maintained
as long as this bit is high. Software must write this bit low to release the reset and
start operation.
Note:
1. Although RC does *not* reset this register interface, it does clear interrupt and
interrupt status conditions.
2. Never reset the SCLPC Controller during a transaction (tx or rx).
8:14 — Reserved
15 RF Reset Fifo. This is the Fifo software reset bit. Writing a 1 to this bit will reset the
SCLPC Fifo. The Fifo must not be in reset for normal operation. Software reset of the
Fifo will clear the fifo of data, reset its read/write pointers, but *not* disturb previously
programmed Alarm and Granularity settings.
Note: Good Practice would be for software to set and clear the RC and RF bits prior
to programming and starting a Packet.
16:21 — Reserved
Bits Name
Notes Description
22 AIE Abort Interrupt Enable. If set, and a fifo error occurs during packet transmission, a cpu
interrupt from SCLPC will be generated. In any case, the Packet will be terminated
and an Abort Status bit will be set.
Note: This bit does *not* affect the Requestor to BestComm in any way.
23 NIE Normal Interrupt Enable. This bit, if set enables a cpu interrupt to occur at the end of
a normally terminated Packet. There is also a NT status bit which sets in any case.
Note: This bit does *not* affect the Requestor to BestComm in any way.
24:30 — Reserved
31 ME Master Enable. This bit must be set to 1 to allow a Restart to be generated to the
SCLPC state machine. Restart is achieved by writing 1 to Byte 0 of the Packet_Size
register. This ME bit must also be set for a Restart to occur.
Note: ME being low (inactive) will also clear Interrupt and Interrupt status. But it does
*NOT* affect the BestComm Requestor.
RESET: 0 0 0 0 0 0 0 0 X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Bytes Done
W Read Only
RESET: X X X X X X X X X X X X X X X X
0:2 — Reserved
3 AT Abort Termination. This bit will be set to 1 if the Packet has terminated abnormally
(which is only possible if a fifoError occurred).
Note: This bit is ANDed with the AIE bit above to generate a single CPU interrupt
signal to the core. This bit is "sticky write to 1" for clearing the bit and clearing the
interrupt.
Note: This bit (and any interrupt) is also cleared if; 1) RC bit is set, 2) ME bit is clear,
or 3) Restart occurs.
4:6 — Reserved
7 NT Normal Termination. This bit is set to 1 whenever a complete Packet has been
transferred successfully.
Note: This bit is ANDed with the NIE bit above to generate a single CPU interrupt
signal to the core. This bit is "sticky write to 1" for clearing the bit and clearing the
interrupt.
8:31 Bytes Done Bytes Done is updated dynamically by the SCLPC state machine to represent the
actual number of bytes transmitted at a given point in time. At the normal conclusion
of a Packet, the bytes_done field should match the Packet_Size field.
• Section 9-19, LPC Rx/Tx FIFO Status Register • Section 9-22, LPC Rx/Tx FIFO Read Pointer Register
(0x3C44) (0x3C50)
• Section 9-20, LPC Rx/Tx FIFO Control Register • Section 9-23, LPC Rx/Tx FIFO Write Pointer Register
(0x3C48) (0x3C54)
R FIFO_Data_Word
RESET: X X X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R FIFO_Data_Word
RESET: X X X X X X X X X X X X X X X X
0:31 FIFO_Data_Word The FIFO data port. Reading from this location “pops” data from the FIFO, writing
“pushes” data into the FIFO. During normal operation the BestComm Controller
pushes data here.
Note: ONLY full word access is allowed. If all byte enables are not asserted when
accessing this location, a FIFO error flag is generated.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:8 — Reserved
9 Err Error—flag bit is essentially the logical "OR" of other flag bits and can be polled for detection
of any FIFO error. After clearing the offending condition, writing 1 to this bit clears flag.
10 UF UnderFlow—flag indicates read pointer has surpassed the write pointer. FIFO was read
beyond empty. Resetting FIFO clears this condition; writing 1 to this bit clears flag.
11 OF OverFlow—flag indicates write pointer surpassed read pointer. FIFO was written beyond full.
Resetting FIFO clears this condition; writing 1 to this bit clears flag.
12 Full FIFO full—this is NOT a sticky bit or error condition. Full indication tracks with FIFO state.
13 HI High—FIFO requests attention, because high level alarm is asserted. To clear this condition,
FIFO must be read to a level below the setting in granularity bits.
14 LO Low—FIFO requests attention, because Low level alarm is asserted. To clear this condition,
FIFO must be written to a level in which the space remaining is less than the granularity bit
setting.
15 Emty FIFO empty—this is NOT a sticky bit or error condition. Full indication tracks with FIFO state.
16:31 — Reserved
RESET: 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2 WFR When bit sets, FIFO Controller assumes next data write is End of Frame (EOF).
Note: This module does not support Framing. This bit should remain low.
3:4 — Reserved
5:7 GR Granularity—bits control high “watermark” point at which FIFO negates Alarm condition (i.e.,
request for data). It represents the number of free bytes times 4.
000 = FIFO waits to become completely full before stopping data request.
001 = FIFO stops data request when only one long word of space remains.
8:31 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
Alarm
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:22 — Reserved
23:31 Alarm User writes these bits to set low level “watermark”, which is the point where FIFO asserts
request for BestComm Controller data filling. Value is in bytes. For example, with Alarm = 32,
alarm condition occurs when FIFO contains 32Bytes or less. Once asserted, alarm does not
negate until high level mark is reached, as specified by FIFO control register granularity bits.
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
ReadPtr
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:22 — Reserved
23:31 ReadPtr Value is maintained by FIFO hardware and is NOT normally written. It can be adjusted in
special cases, but this disrupts data flow integrity. Value represents the Read address
presented to the FIFO RAM.
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
WritePtr
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:22 — Reserved
23:31 WritePtr Value is maintained by FIFO hardware and is NOT normally written. It can be adjusted in
special cases, but this disrupts data flow integrity. Value represents the Read address
presented to the FIFO RAM.
Notes
Chapter 10
PCI Controller
10.1 Overview
The Peripheral Component Interface (PCI) Bus is a high-performance bus with multiplexed address and data lines. It is especially suitable for
high data-rate applications.
The MPC5200 PCI Controller module supports a 32-bit PCI initiator and target interface. As a target, access to the internal XL bus is
supported. As an initiator, the PCI controller is coupled directly to the XL bus (as a slave) and available on the Communication Sub-System
as a Multi-Channel DMA peripheral.
The 32-bit multiplexed address/data is shared with the ATA Controller and LocalPlus Controllers. However, control signals are on separate
pins and only one operation (PCI, ATA, or LocalPlus) can be done at any given time.
The LocalPlus Large Flash and Most/Graphic interfaces are not compatible with any PCI operation. When these interfaces are needed, the
PCI internal controller must be disabled by setting bit 16 (PCI_DIS) of the GPS Configuration register. Section 7.3.2.1.1, GPS Port
Configuration Register—MBAR + 0x0B00
The MPC5200 contains PCI central resource functions such as the PCI Arbiter (Section 10.5, PCI Arbiter) and PCI reset control. The PCI bus
clock is always sourced from the MPC5200 and either equal to 1, 1/2 the frequency of the Slave bus clock (IP bus clock) or 1/4 the frequency
of the XLB clock. Even when the PCI internal controller is disabled, the PCI clock is sourced by the MPC5200.
A PCI reset signal is provided and implemented as an open-drain pin. An external (on board) pull-up resistor (e.g. 5.6 kOhm) is then required
to ensure proper operation.
NOTE
If the PCI interface is NOT used (and internally disabled) the PCI control pins must be terminated as
indicated by the PCI Local Bus specification. PCI control signals always require pull-up resistors on
the motherboard (not the expansion board) to ensure that they contain stable values when no agent is
actively driving the bus. This includes PCI_FRAME, PCI_TRDY, PCI_IRDY, PCI_DEVSEL,
PCI_STOP, PCI_SERR, PCI_PERR, and PCI_REQ.
10.1.1 Features
• Supports system clock: Slave (IP) bus (internal peripheral slave bus) to PCI bus frequency ratios 1:1, 2:1. Or the XLB to PCI bus
frequency ratio 4:1 (e.g. PCI runs at 33 MHz while the XLB bus runs at 132 MHz).
• Compatible with PCI 2.2 specification
• PCI initiator and target operation
• Fully synchronous design
• 32-bit PCI Address/Data bus
• PCI 2.2 Type 0 Configuration Space header
• Supports the PCI 16/8 clock rule
• PCI master Multi-Channel DMA or CPU access to PCI Bus
• High transfer rates at 66Mhz PCI clock, 512 byte buffer
• PCI to system bus address translation
• Target response is medium DEVSEL generation
• Initiator latency time-outs are NOT supported.
• Automatic retry of target disconnects
• Fast Back-to-Back transactions are NOT supported.
NOTE
The corresponding FC bit in the Configuration Status Register is fixed to ‘1’ indicating the opposite.
Nonetheless no Fast Back-to-Back transaction is supported.
PCI
Controller External
Config
Config PCI bus
Interface
Master bus
Target Target
Interface
Master
bus/ Com-
mBus Initiator
CommBus
Interface
Slave bus
Initiator
XL bus
AD[31:0] I/O Multiplexed Address and Data Bus (Shared with ATA and LPC). AD31 is the most
significant bit while AD0 is the least significant as per the PCI specification. The entire
PCI external bus is little Endian ordered.
PCI_CXBE[3:0] I/O Command/Bytes Enables
PCI_DEVSEL I/O Device Select
PCI_FRAME I/O Frame
PCI_IDSEL I Initialization Device Select
PCI_IRDY I/O Initiator Ready
PCI_PAR I/O Parity
PCI_CLK O PCI Clock
PCI_PERR I/O Parity Error
PCI_RST O PCI Reset
PCI_SERR I/O System Error
PCI_STOP I/O Stop
PCI_TRDY I/O Target Ready
For detailed description of the PCI bus signals, see the PCI Local Bus Specification, Revision 2.2.
10.3 Registers
MPC5200 has several sets of registers that control and report status for the different interfaces to the PCI controller: PCI Type 0 Configuration
Space Registers, General Status/Control Registers, and Communication Sub-System Interface Registers. All of these registers are accessible
as offsets of MBAR (the PCI interface is located starting at offset 0x0D00 relative to the MBAR register’s value, while the BestComm
interface starts at offset 0x3800). As an XL bus master, an external PCI bus master can access MBAR space for register updates and the
internal SRAM.
NOTE
PCI_RST is controlled by a bit in the register space and must first be cleared before external PCI
devices wake-up. In other words, an external PCI master cannot load configuration software across
the PCI bus until this bit is cleared by internal means.
All registers are accessible at an offset of MBAR in the memory space. There are two module offsets for PCI configuration space. One is
allocated to the Communication Sub-System Interface registers and the other to all other PCI Controller Registers including the standard Type
0 PCI Configuration Space. Software reads from unimplemented registers return 0x00000000 and writes have no effect. See Section 3.2,
Internal Register Memory Map for module offsets and descriptions of module responses.
Table 10-2. PCI Register Map
Register
Mnemonic Name
Offset
0x18 Reserved
...
0x24
0x38 Reserved
0x40 Reserved
...
0x5C
Register
Mnemonic Name
Offset
0x7C Reserved
0x90 Reserved
...
0xF4
0xFC Reserved
Register
Mnemonic Name
Offset
...
0x3C
Register
Mnemonic Name
Offset
0x58 Reserved
...
0x7C
0xA0 Reserved
...
0xBC
0xD8 Reserved
...
0xFC
0x10C 0x03 PCICR1 BIST Header Type Latency Timer Cache Line Size
... ...
0x124 0x09
na 0x10 Reserved
na ...
na 0x3F
PCI Dword Reserved space (0x10 - 0x3F) can be accessed only from an external PCI Configuration access.
NOTE
A PCI Double Word (DWORD) is a 32 bit long word. A PowerPC Double Word is instead a 64 bit
word (according to the EABI rule) while a Word is a 32 bit value. In the following PCI Configuration
space a DWORD refers always to a 32 bit word.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Device ID
RESET 0x5803
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Vendor ID
RESET 0x1057
0:15 Device ID This field is read-only and represents the PCI Device Id assigned to MPC5200
Its value is: 0x5803.
16:31 Vendor ID This field is read-only and represents the PCI Vendor Id assigned to MPC5200
Its value is: 0x1057.
R PE SE MA TR TS DT DP FC R 66M C Reserved
RESET: 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved F S St PER V MW Sp B M IO
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Parity Error This bit is set when a parity error is detected, even if the Parity Error Response bit in the
Detected Command Register (bit 6) is disabled. A CPU interrupt will be generated if the
(PE) PCIGSCR[PEE] bit is set. This register is read-write-clear (RWC) via PCI configuration
cycles.
1 System Error This bit is set whenever MPC5200 generates a PCI System Error on the SERR line. This
Signalled register is read-write-clear (RWC) via PCI configuration cycles.
(SE)
2 Master Abort This bit is set whenever MPC5200 is the PCI master and terminates a transaction (except
Received for Special Cycle) with a Master-Abort. This register is read-write-clear (RWC) via PCI
(MA) configuration cycles.
3 Target Abort This bit is set whenever MPC5200 is the PCI master and a transaction is terminated by a
Received Target Abort from the currently-addressed target. This register is read-write-clear (RWC) via
(TR) PCI configuration cycles.
4 Target Abort This bit is set whenever MPC5200 is the PCI target and it terminates a transaction with a
Signalled Target Abort. This register is read-write-clear (RWC) via PCI configuration cycles.
(TS)
5:6 DEVSEL# Fixed to 01. These bits encode a medium DEVSEL timing. This defines the slowest
Timing DEVSEL timing when MPC5200 is the PCI target (except configuration accesses).
(DT)
7 Master Data This bit applies only when MPC5200 is PCI master and is set only if the following conditions
Parity are met:
Error • MPC5200-as-master sets PERR itself during a read or detected it asserted by the target
(DP) during a write
• The Parity Error Response bit in the Command Register, bit 6, is set to 1
This register is read-write-clear (RWC) via PCI configuration cycles.
8 Fast Fixed to 1. The MPC5200 PCI controller does NOT support Fast Back-to-Back transactions.
Back-to-Back
Capable
(FC)
9 Reserved Fixed to 0. Prior to the 2.2 PCI Spec, this was the UDF (User Defined Features) Supported
(R) bit.
1 = Supported User Defined Features
0 = Does not support UDF
10 66 MHz Fixed to 1. This bit indicates that the PCI controller is 66 MHz capable.
Capable
(66M)
11 Capabilities Fixed to 0. This bit indicates that the PCI controller does not implement the New Capabilities
List List Pointer Configuration Register in DWORD 13 of the Configuration Space.
(C)
22 Fast The MPC5200 PCI controller does NOT support Fast Back-to-Back transactions.
Back-to-Back Setting this bit has no effect.
Transfer Enable
(F)
23 SERR enable This bit is an enable bit for the SERR driver. A value of zero disables the SERR driver. A
(S) value of 1 enables the SERR driver. Note: Address parity errors are reported only if this bit
and bit 6 are 1.
This bit is programmable (read/write from both the IP bus and PCI bus Configuration
cycles).
24 Address and Fixed to 0. This bit indicates that the PCI controller never uses address/data stepping.
Data Stepping Initialization software should write a 0 to this bit location.
(St)
25 Parity Error This bit controls the device’s response to parity errors. When set and a parity error is
Response detected, the PCI controller asserts PERR. When the bit is “0”, the device sets its Detected
(PER) Parity Error status bit (bit 0) in the event of a parity error, but does not assert PERR.
This bit is programmable (read/write from both the IP bus and PCI bus Configuration
cycles).
26 VGA Palette Fixed to 0. This bit indicates that the PCI controller is not VGA compatible. Initialization
Snoop Enable software should write a 0 to this bit location.
(V)
27 Memory Write This bit is an enable for using the Memory Write and Invalidate command. When this bit is
and Invalidate 1, MPC5200-as-master may generate the command. When it is 0, Memory Write must be
Enable used instead. This bit is programmable (read/write from both the IP bus and PCI bus
(MW) Configuration cycles).
28 Special Cycle This bit is to determine whether or not to ignore PCI Special Cycles. Since
Monitor or MPC5200-as-target does not recognize messages delivered via the Special Cycle
Ignore operation, a value of 1 should never be programmed to this register. This bit, however, is
(Sp) programmable (read/write from both the IP bus and PCI bus Configuration cycles).
29 Bus Master This bit indicates whether or not MPC5200 has the ability to serve as a master on the PCI
Enable bus. A value of 1 indicates this ability is enabled. If MPC5200 is used as a master on the
(B) PCI bus (via XL bus or CommBus), a 1 should be written to this bit during initialization. Even
if set to 0, a transaction initiated by an internal master (the core, BestComm) is allowed to
take place. It is meant to be read by configuration software.
This bit is programmable (read/write from both the IP bus and PCI bus Configuration
cycles).
30 Memory This bit controls the PCI controller’s response to Memory Space accesses. A value of 0
Access disables the response. A value of 1 allows the controller to recognize a Memory access.
Control This bit is programmable (read/write from both the IP bus and PCI bus Configuration
(M) cycles).
31 IO access Fixed to 0. This bit is not implemented because there is no MPC5200 IO type space
Control accessible from the PCI bus. The PCI base address registers are Memory address ranges
(IO) only. Initialization software should write a 0 to this bit location.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Class Code
RESET 0x0680
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
0:23 Class Code This field is read-only and represents the PCI Class Code assigned to MPC5200
Its value is: 0x068000. (Other bridge device)
24:31 Revision ID This field is read-only and represents the PCI Revision Id for this version of MPC5200. Its
value is: 0x00.
msb 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Built-In Self Fixed to 0x00. The PCI controller does not implement the Built-In Self Test register.
Test Initialization software should write a 0x00 to this register location.
(BIST)
8:15 Header Type Fixed to 0x00. The PCI controller implements a Type 0 PCI Configuration Space Header.
Initialization software should write a 0x00 to this register location.
16:23 Latency Timer This register contains the latency timer value, in PCI clocks, used when MPC5200 is the PCI
master. The lower three bits of the register are hardwired low and the upper five bits are
programmable (read/write from both the IP bus and PCI bus Configuration cycles).
Note: The MPC5200 does NOT support initiator latency time-outs, the internal PCI Arbiter
does not support preemption of the internal masters XIPCI or SCPCI. The internal master
is granted until the transaction has been completed. The Latency Timer (LT) cannot
terminate any transfer.
28:31 Cache Line The four lower bits of this register are programmable (read/write from both the IP bus and
Size PCI bus Configuration cycles). The value programmed specifies the cacheline size in units
of DWORDs.
msb 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:13 Base Address MPC5200 PCI Base Address Register 0 (256Kbyte). Applies only when MPC5200 is target.
Register 0 These bits are programmable (read/write from both the IP bus and PCI bus Configuration
(BAR0) cycles). This BAR register should be used to point at the internal MPC5200 register space
(MBAR)
28 prefetchable Fixed to 0. This bit indicates that the memory space defined by BAR0 is NOT prefetchable.
access Configuration software should write a 0 to this bit location.
(pref)
29:30 range Fixed to 00. This register indicates that base address 0 is 32 bits wide and can be mapped
anywhere in 32-bit address space. Configuration software should write 00 to these bit
locations.
31 IO or Memory Fixed to 0. This bit indicates that BAR0 is for memory space. Configuration software should
Space write a 0 to this bit location.
(IO/M#) 0 = Memory
1 = I/O
msb 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0
R Base Reserved
Address 1
W
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0:1 Base Address MPC5200 PCI Base Address Register 1 (1Gbyte). Applies only when MPC5200 is target.
Register 1 These bits are programmable (read/write from both the IP bus and PCI bus Configuration
(BAR1) cycles). This BAR register shall be used to point at the local SDRAM/DDR Memory Space.
Note: The address ‘Window’ is much larger than the maximum theoretically supported
physical memory.
Note: This register should not point to the LocalPlus Memory Space. This is not supported.
28 prefetchable Fixed to 1. This bit indicates that the memory space defined by BAR1 is prefetchable.
access Configuration software should write a 1 to this bit location.
(pref)
29:30 range Fixed to 00. This register indicates that base address 1 is 32 bits wide and can be mapped
anywhere in 32-bit address space. Configuration software should write 00 to these bit
locations.
31 IO or Memory Fixed to 0. This bit indicates that BAR1 is for memory space. Configuration software should
Space write a 0 to this bit location.
(IO/M#) 0 = Memory
1 = I/O
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
W
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Maximum Specifies how often, in units of 1/4 microseconds, the PCI controller would like to have
Latency access to the PCI bus as master. A value of zero indicates the device has no stringent
(Max_Lat) requirement in this area. The register is read/write to/from the Slave bus, but read only from
the PCI bus.
Note: The MPC5200 does NOT support initiator latency time-outs, the internal PCI Arbiter
does not support preemption of the internal masters XIPCI or SCPCI. The internal master
is granted until the transaction has been completed. The Latency Timer (LT) cannot
terminate any transfer.
8:15 Minimum Grant The value programmed to this register indicates how long the PCI controller as master
(Min_Gnt) would like to retain PCI bus ownership whenever it initiates a transaction. The register is
programmable from the Slave bus, but read only from the PCI bus.
16:23 Interrupt Pin Fixed to 0x00. Indicates that this device does NOT use an interrupt request pin.
24:31 Interrupt Line Fixed to 0x00. The Interrupt Line register stores a value that identifies which input on a PCI
interrupt controller the function’s PCI interrupt request pin. Since no interrupt request pin is
used, as specified in the Interrupt Pin register, this register has no function.
RESET 0 0 0 0 0 x x x 0 0 0 0 0 x x x
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
1 Broken Master This bit is set when the PCI Arbiter detects a broken external PCI master.
Detected Note: In case of broken master detection the external PCI request will be ignored until
(BM) external deassertion of PCI request or until a software reset (PCI Arbiter Softreset) or by
Hardreset is detected. After broken master detection (PCI bus idle for 16 clocks) the
arbiter will ignore any FRAME# assertion.
A CPU interrupt will be generated if the PCIGSCR[BME] bit is set. This is a RWC
(Read/WriteClear) bit: to clear it, software must write a ‘1’ at this position.
2 PERR This bit is set when the PCI Parity Error line, PERR, asserts (any device). A CPU interrupt
Detected will be generated if the PCIGSCR[PEE] bit is set. This is a RWC (Read/WriteClear) bit: to
(PE) clear it, software must write a ‘1’ at this position.
3 SERR This bit is set when a PCI System Error line, SERR, asserts (any device). A CPU interrupt
Detected will be generated if the PCIGSCR[SEE] bit is set. This is a RWC (Read/WriteClear) bit: to
(SE) clear it, software must write a ‘1’ at this position.
4 Reserved Unused bit. Software should write zero to this register.
5:7 xlb_clk to This bit field stores the XL bus clock to the PCI clock divide ratio. This field is read-only
PCI_CLK and the reset value is determined by the PLL multiplier (either 1, 2, or 4). Software can
differential read these bits to determine a valid ratio. If the register contains a differential value that
(read only) does not reflect the PLL settings, the PCI controller could malfunction.
8:12 Reserved Unused bits. Software should write zero to this register.
13:15 ipg_clk to This bit field stores the Slave bus clock to the PCI clock divide ratio. This field is read-only
PCI_CLK and the reset value is determined by the PLL multiplier (either 1, 2, or 4). Software can
differential read these bits to determine a valid ratio. If the register contains a differential value that
(read only) does not reflect the PLL settings, the PCI controller could malfunction.
17 Broken Master This bit enables CPU Interrupt generation when a broken Master is detected. When
Interrupt Enable enabled, software must clear the BM status bit to clear the interrupt condition.
(BME)
18 Parity Error This bit enables CPU Interrupt generation when the PCI Parity Error signal, PERR, is
Interrupt Enable sampled asserted. When enabled and PERR asserts, software must clear the PE status
(PEE) bit to clear the interrupt condition.
19 System Error This bit enables CPU Interrupt generation when a PCI System Error is detected on the
Interrupt Enable SERR line. When enabled and SERR asserts, software must clear the SE status bit to
(SEE) clear the interrupt condition.
20:30 Reserved Unused bits. Software should write zero to this register.
31 PCI This bit controls the external PCI RST. When this bit is cleared, the external PCI RST
Reset deasserts. Setting this bit does not reset the internal PCI controller. The application
(PR) software must not initiate PCI transactions while this bit is set. It is recommended that this
bit be programmed last.
The reset value of the bit is 1 (PCI RST asserted).
Note: A global PCI reset should be asserted just by the MPC5200 controller. Any external
common reset controller signal will be ignored by the internal PCI controller.
msb 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved En
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:13 Base Address This base address register corresponds to a hit on the BAR0 in MPC5200 PCI Type 0
Translation 0 Configuration space register from PCI space. When there is a hit on MPC5200 PCI BAR0
(MPC5200 as Target), the upper 14 bits of the external PCI address (256Kbyte
boundary) are written over by this register value to address some space in MPC5200. In
normal operation, this value should be written during the initialization sequence only to
point to the internal Register space.
14:30 Reserved Unused bits. Software should write zero to this register.
31 Enable 0 This bit enables a transaction in BAR0 space. If this bit is zero and a hit on MPC5200
PCIBAR0 occurs, the target interface gasket will abort the PCI transaction.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved En
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 Base Address This base address register corresponds to a hit on the BAR1 in MPC5200 PCI Type 0
Translation 1 Configuration space register (PCI space). When there is a hit on MPC5200 PCI BAR1
(MPC5200 as Target), the upper 2 bits of the external PCI address (1Gbyte boundary) are
written over by this register value to address some 1Gbyte space in MPC5200. This
register can be reprogrammed to move the window of MPC5200 address space accessed
during a hit in PCIBAR1. It should be written by software during initialization to point to the
internal SDR/DDR memory space.
Note: This register should not point to the LocalPlus Memory Space. This is not
supported.
2:30 Reserved Unused bits. Software should write zero to this register.
31 Enable 1 This bit enables a transaction in BAR1 space. If this bit is zero and a hit on MPC5200 PCI
BAR1 occurs, the target interface gasket will abort the PCI transaction.
msb 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0
R Reserved LD Reserved P
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 Reserved Unused bits. Software should write zero to this register.
7 Latrule This control bit applies only when MPC5200 is Target. When set, it prevents the PCI
Disable Controller from automatically issuing a retry disconnect due to the PCI 16/8 clock rule.
(LD) The bit must be set before the 15th PCI clock for the first transfer and before the 7th clock
for other transfers.
8:14 Reserved Unused bits. Software should write zero to this register.
15 Prefetch Reads This bit controls fetching a line from memory in anticipation of a request from the external
(P) master. The target interface will continue to prefetch lines from memory as long as
PCI_FRAME is asserted and there is space to store the data in the target read buffer.
Note: This bit only applies to PCI reads in the address range for BAR 1 (prefetchable
memory).
Note: Prefetching is performed in response to a PCI memory-read-multiple command even
if this bit is cleared.
16:31 Reserved Unused bits. Software should write zero to this register.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Window 0 Base One of three base address registers to determine an XL bus hit on PCI. At most, the upper
Address byte of the address is decoded. The Window 0 Address Mask register determines what
bits of this register to compare the XL bus address against to generate the hit.
Note: The smallest possible Window is a 16 MByte block.
8:15 Window 0 The Window 0 Address Mask Register masks the corresponding XL bus base address bit
Address Mask of the base address for Window 0 (Window 0 Base Address) to instruct the address
decode logic to ignore or “don’t care” the bit. If the base address mask bit is set, the
associated base address bit of Window 0 is ignored when generating the PCI hit. Bit 16
masks bit 24, bit 17 masks bit 25, and so on.
0 Corresponding address bit is used in address decode
1 Corresponding address bit is ignored in address decode
For XLB accesses to Window 0 address range, this byte also determines which upper 8
bits of the XLB address to pass on for presentation as a PCI address. Any address bit
used to decode the XLB address, indicated by a “0”, will be translated. This provides a way
to overlay a PCI page address onto the XLB address. A “1” in the Address Mask byte
indicates that the XLB address bit will be passed to PCI unaltered.
16:23 Window 0 For any translated bit (described above), the corresponding value here will be driven onto
Translation the PCI address bus for the XL bus Window 0 address hit.
Address Note: The Window Translation operation can not be turned off. If a direct mapping from
XLB to PCI space is desired, program the same value to both the Window Base Address
Register and Window Translation Address Register.
24:31 Reserved Unused bits. Software should write zero to this register.
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
msb 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0:4 Reserved Unused bits. Software should write zero to this register.
5 Retry Error This bit enables CPU Interrupt generation in the case of Retry Error termination of a packet
Enable transmission. It may be desirable to mask CPU interrupts, but in such a case, software
(RE) should poll the status bits to prevent a possible lock-up condition.
6 Initiator Abort This bit enables CPU Interrupt generation in the case of Initiator Abort termination of a
Enable packet transmission. It may be desirable to mask CPU interrupts, but in such a case,
(IAE) software should poll the status bits to prevent a possible lock-up condition.
7 Target Abort This bit enables CPU Interrupt generation in the case of Target Abort termination of a packet
Enable transmission. It may be desirable to mask CPU interrupts, but in such a case, software
(TAE) should poll the status bits to prevent a possible lock-up condition.
8:23 Reserved Unused bits. Software should write zero to this register.
24:31 Maximum This bit field controls the maximum number of automatic PCI retries or master latency
Retries time-outs to permit per transaction. The retry counter is reset at the beginning of each
transaction (i.e. it is not cumulative). Setting the Maximum Retries to 0x00 allows infinite
automatic retry cycles and latency time-outs before the transaction will be abort and send
back an error on XLB. A slow or malfunctioning Target might issue infinite retry disconnects
or hold the data tenure open indefinitely, and therefore, permanently tie up the PCI bus if no
Target Abort occurs.
msb 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0
R Reserved RE IA TA Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:4 Reserved Unused bits. Software should write zero to this register.
5 Retry This flag is set if Max_Retries is set to a finite value (0x01 through 0xff) and the Target has
Error performed Max_Retries number of retry disconnects for a single transaction. A retry error
(RE) would generally indicate a broken or improperly accessed Target. A CPU interrupt will be
generated if PCIICR[RE] bit is set. This is a RWC (Read/WriteClear) bit: to clear it, software
must write a ‘1’ at this position.
6 Initiator Abort This flag bit is set if the PCI controller issues an Initiator Abort flag. This indicates that no
(IA) Target responded by asserting DEVSEL within the time allowed for subtractive decoding. A
CPU interrupt will be generated if the PCIICR[IAE] bit is set. This is a RWC
(Read/WriteClear) bit: to clear it, software must write a ‘1’ at this position.
7 Target Abort This flag bit is set if the addressed PCI Target has signalled an Abort. A CPU interrupt will
(TA) be generated if the PCIICR[TAE] bit is set. It is up to application software to query the
Target’s status register and determine the source of the error. This is a RWC
(Read/WriteClear) bit: to clear it, software must write a ‘1’ at this position.
8:31 Reserved Unused bits. Software should write zero to this register.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 Reserved Unused bits. Software should write zero to this register.
7 PCI Arbiter Soft This bit puts the PCI Arbiter in a reset condition.
Reset (ASR) 1 = reset the PCI Arbiter
0 = release the PCI Arbiter
Note: Resetting the PCI arbiter will disrupt any related transaction in progress and should
be reserved only for error conditions, or when it is known that no PCI or AD bus transactions
are in progress.
8:31 Reserved Unused bits. Software should write zero to this register.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Enable The enable flag that controls configuration space mapping. When enabled, subsequent
(E) access to initiator window space defined as I/O in the PCIIWCR is translated into a PCI
configuration access using the Configuration Address Register information (Section 10.6,
Application Information). When disabled, a read or write to the window is passed through to
the PCI bus as an I/O transaction using the.
1 = Enabled
0 = Disabled
1:7 Reserved Unused bits. Software should write zero to this register.
8:15 Bus This register field is an encoded value used to select the target bus of the configuration
Number access. For target devices on the PCI bus connected to MPC5200, this field should be set
to 0x00.
16:20 Device This field is used to select a specific device on the target bus.
Number
21:23 Function This field is used to select a specific function in the requested device. Single-function
Number devices should respond to function number 0b000.
24:29 dword This field is used to select the dword address offset in the configuration space of the target
device.
30:31 Reserved Unused bits. Software should write zero to this register.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Packet_Size[16:2] Packet_Size[1:0]
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 Packet_Size User writes the number of bytes for transmit controller to send over PCI.The two low bits
are hardwired low; only 32-bit data transfers to the FIFO are allowed. Writing to this register
also completes a Restart Sequence as long as the Master Enable bit, PCITER[ME], is high
and Reset Controller bit, PCITER[RC], is low.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Start_Add
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Start_Add
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 Start_Add User writes the PCI address to be presented for the first DWORD (32 bit) of a PCI packet.
The PCI Tx controller will track and calculate the necessary address for subsequent
transactions (addressing is assumed to be sequential from the start address).
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0111 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4:7 PCI_cmd The user writes this field with the desired PCI command to present during the address
phase of each PCI transaction. The default is Memory Write. This field is not checked for
consistency and if written to an illegal value, unpredictable results will occur. If not using
the default value, the user should write this register only once prior to any packet Restart.
8:15 Max_Retries The user writes this field with the maximum number of retries to permit “perpacket”. The
retry counter is reset when the packet completes normally or is terminated by a master
abort, target abort, or an abort due to exceeding the retry limit. A slow or malfunctioning
Target might issue infinite disconnects and therefore permanently tie up the PCI bus.
A finite (0x01 to 0xfe) Max_Retries value will detect this condition and generate an
interrupt. Setting Max_Retries to 0x00 or 0xff will not generate any interrupt.
16:20 Reserved Unused bits. Software should write zero to these bits.
21:23 Max_Beats The user writes this register with the desired number of PCI data beats to attempt on each
PCI transaction. The default setting of 0 represents the maximum of eight beats per
transaction. The transmit controller will wait until sufficient bytes are in the Transmit FIFO
to support the indicated number of beats (NOTE: Each beat is four bytes). In the case that
a packet is nearly complete and less than the Max_Beats number of bytes remain to
complete the packet, the Transmit Controller will issue single-beat transactions
automatically until the packet is finished.
27 Word Transfer The user writes this register to disable the two high byte enables of the PCI bus during
(W) scpci initiated write transactions. The default setting is 0, enable all 4 byte enables.
31 Disable address The user writes this register to disable PCI address incrementing between transactions.
Incrementing The default setting is 0, incrementing the address by 4 (4 byte data bus).
(DI) Note: This feature is recommended when an external FIFO (with a fixed address) must be
written.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Reset User writes this bit high to put Transmit Controller in a reset state. Other register bits are not
Controller affected. This Reset is intended for recovery from an error condition or to reload the Start
(RC) Address when Continuous mode is selected. This Reset bit does not prohibit register
access but it must be negated in order to initiate a Restart sequence (i.e. writing the
Packet_Size register). If it is used to reload a Start Address then the Start_Add register must
be written prior to asserting this Reset bit.
1 Reset The FIFO will be reset and flushed of any existing data when set high. The Reset Controller
FIFO bit and the Reset FIFO bit operate independently but clearly both must be low for normal
(RF) operation.
3 Continuous User writes this bit high to activate Continuous mode. In Continuous mode the Start_Add
mode value is ignored at each packet restart and the PCI address is auto-incremented from one
(CM) packet to the next. Also, the Packets_Done status byte will become active, indicating how
many packets have been transmitted since the last Reset Controller condition. If the
Continuous bit is low, software is responsible for updating the Start_Add value at each
packet Restart.
4 Bus error User writes this bit high to enable Bus Error indications. Section 10.3.3.1.8, Tx Status
Enable PCITSR(RWC) —MBAR + 0x381C for Bus Error descriptions. Normally this bit will be low
(BE) (negated) since illegal Slave bus accesses are not destructive to register contents (although
it may indicate broken software). This bit does not affect interrupt generation.
5:6 Reserved Unused. Software should write zero to these bits.
7 Master This is the Transmit Controller master enable signal. User must write it high to enable
Enable operation. It can be toggled low to permit out-of-order register updates prior to generating
(ME) a Restart sequence (in which case transmission will begin when Master Enable is written
back high), but it should not be used as such in Continuous mode because it has the side
effect of resetting the Packets_Done status counter.
10 FIFO Error User writes this bit high to enable CPU Interrupt generation in the case of FIFO error
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(FEE) that Multi-Channel DMA is controlling operation, but in such a case software should poll the
status bits to prevent a possible lock-up condition.
11 System error User writes this bit high to enable CPU Interrupt generation in the case of system error
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(SE) that Multi-Channel DMA is controlling operation, but in such a case someone should be
polling the status bits to prevent a possible lock-up condition.
12 Retry abort User writes this bit high to enable CPU Interrupt generation in the case of retry abort
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(RE) that Multi-Channel DMA is controlling operation, but in such a case software should poll the
status bits to prevent a possible lock-up condition.
13 Target Abort User writes this bit high to enable CPU Interrupt generation in the case of target abort
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(TAE) that Multi-Channel DMA is controlling operation, but in such a case software should poll the
status bits to prevent a possible lock-up condition.
14 Initiator Abort User writes this bit high to enable CPU Interrupt generation in the case of initiator abort
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(IAE) that Multi-Channel DMA is controlling operation, but in such a case software should poll the
status bits to prevent a possible lock-up condition.
15 Normal User writes this bit high to enable CPU Interrupt generation at the conclusion of a normally
termination terminated packet transmission. This may or may not be desirable depending on the nature
Enable (NE) of program control by Multi-Channel DMA or the processor core.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Next_Address
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Next_Address
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 Next_Address This status register contains the next (unwritten) PCI address and is updated at the
successful completion of each PCI data beat. It represents a byte address and is updated
with the user-written Start_Add value whenever the Start_Add is reloaded. It is intended to
be accurate even in the case of abnormal terminations on the PCI bus.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Last_Word
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Last_Word
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 Last_Word This status register indicates the last 32-bit data fetched from the FIFO and is designed for
the case in which an abnormal PCI termination has corrupted the integrity of the FIFO data
(for that word).
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Bytes_Done
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Packets_Done
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 Bytes_Done This status register indicates the number of bytes transmitted since the start of a packet. It
is updated at the end of each successful PCI data beat. For normally terminated packets
the Bytes_Done value and the Packet_Size values will be equal. If Continuous Mode is
active the Bytes_Done value will read zero at the end of a successful packet and the
Packets_Done field will be incremented.
16:31 Packets_Done This status register indicates the number of packets transmitted and is active only if
continuous mode is in effect. The counter is reset if the following occurs:
• Reset Controller bit, PCITER[RC], is asserted (normal way to restart continuous
mode)
• Master Enable bit, PCITER[ME], becomes negated
Master enable can reset Packets_Done status without disturbing continuous mode
addressing. At any point in time, the total number of Bytes transmitted can be calculated
as:
(Packets_Done x Packet_Size) + Bytes_Done
assuming Packet_Size is the same for all restart sequences
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 Normal This flag is set when any packet terminates normally. It is NOT set for abnormally terminated
Termination packets.
(NT) Note: Flag does not require clearing, but does not clear until 1 is written, in which case 0 is
read back (i.e., negated). The following flag bits operate similarly.
8 Bus Error This flag is set whenever a Slave bus transaction attempts to write to a Read-Only register.
type 3 This flag bit is set regardless of the Bus error Enable bit (BE). If software is polling this Byte
(BE3) and wishes to disregard this error it must mask this bit out.
No register bit corruption occurs for this (or any other) bus error case.
9 Bus Error This flag is set whenever a Slave bus transaction attempts to write to a Reserved register (an
type 2 entire 32-bit register, not just a Reserved bit or byte). This flag bit is set regardless of the Bus
(BE2) error Enable bit (BE). If software is polling this Byte and wishes to disregard this error it must
mask this bit out.
10 Bus Error This flag is set whenever a Slave bus transaction attempts to read a Reserved register (an
type 1 entire 32-bit register, not just a Reserved bit or byte). This flag bit is set regardless of the Bus
(BE1) error Enable bit (BE). If software is polling this Byte and wishes to disregard this error it must
mask this bit out.
11 FIFO Error This flag is set whenever the Transmit FIFO asserts its FIFO Error output. A CPU interrupt will
(FE) be generated if the FIFO Error Enable (FEE) bit is set. The source of the error must be
determined by reading the FIFO Error status register. Also, the error condition must be cleared
at the FIFO prior to clearing this Sticky bit or this flag will continue to assert.
12 System This flag is set in response to the Transmit Controller entering an illegal state. A CPU interrupt
Error will be generated if the System error Enable (SE) bit is set. In normal operation this should
(SE) never occur. The only recovery is to assert the Reset Controller bit, PCITER[RC], and clear
this flag.
13 Retry Error This flag is set if Max_Retries is set to a finite value (0x01 to 0xff) and the PCI transaction has
(RE) performed retries in excess of the setting. A CPU interrupt will be generated if the Retry error
Enable (RE) bit is set. The retry counter is reset at the beginning of each transaction (i.e. it is
not cumulative throughout a packet) and would generally indicate a broken or improperly
accessed Target.
14 Target Abort This flag bit is set if the PCI controller has issued a Target Abort (which means the addressed
(TA) PCI Target has signalled an Abort). A CPU interrupt will be generated if the Target Abort
Enable (TAE) bit is set. It is up to application software to query the Target’s status register and
determine the source of the error. The coherency of the Transmit FIFO data and the Transmit
Controller’s status registers (Next_Address, Bytes_Done, etc.) should remain valid.
15 Initiator This flag bit is set if the PCI controller issues an Initiator Abort flag. This indicates that no Target
Abort responded but further status information can be read from the PCI Configuration interface. A
(IA) CPU interrupt will be generated if the Initiator Abort error Enable (IAE) bit is set. The coherency
of the Transmit FIFO data and the Transmit Controller’s status registers (Next_Address,
Bytes_Done, etc.) should remain valid.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R FIFO_Data_Word
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R FIFO_Data_Word
0:31 FIFO_Data_Word This is the data port to the FIFO. Reading from this location will “pop” data from the
FIFO, writing data will “push” data into the FIFO. During normal operation the
Multi-Channel DMA controller will be pushing data here. The PCI controller will pop
data for transmission from a dedicated peripheral port, so the user program should not
be reading here. At reset any uninitialized random 32 bit value is read at this address.
A FIFO reset must be always performed before first accessing the FIFO.
Note: Only full 32-bit accesses are allowed. If all Byte enables are not asserted when
accessing this location, FIFO data will be corrupted.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 Receive Wait This flag bit indicates that the ipf_rcv bus is incurring wait states because there is not enough
Condition room in the FIFO to accept the data without causing overflow. This bit will cause the error
(RXW) outputs (fifoError, ipf_rcv_error, ipf_xmit_error) to assert unless the RXW_MASK bit in the
FIFO Control register is set. Resetting the FIFO will clear this condition and the flag bit is
cleared by writing a one to its bit position.
10 UnderFlow This flag bit indicates that the read pointer has surpassed the write pointer. In other words
(UF) the FIFO has been read beyond Empty. Resetting the FIFO will clear this condition and the
flag bit is cleared by writing a one to its bit position.
11 OverFlow This flag bit indicates that the write pointer has surpassed the read pointer. In other words
(OF) the FIFO has been written beyond Full. Resetting the FIFO will clear this condition and the
flag bit is cleared by writing a one to its bit position.
12 Frame Ready The FIFO has a complete Frame of data ready for transmission. This module
(FR) does not provide support for Data Framing applications, so this bit should be ignored.
13 Full The FIFO is Full. This is not a sticky bit or error condition. The Full indication tracks with the
state of the FIFO.
14 Alarm When the FIFO pointer is at or below the Alarm “watermark”, as written by the user according
to the Alarm and Control registers settings, this bit is set, automatically signalling to the DMA
engine the need to re-fill the FIFO. By writing a ‘1’ to this bit software can enforce a
re-evaluation of the ‘alarm’ condition.
15 Empty The FIFO is empty. This is not a sticky bit or error condition.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved GR Reserved
RXW_MASK
FAE_MASK
OF_MASK
UF_MASK
IP_MASK
RESET 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:4 Reserved Unused. Software shall write zero to these bits. (R/W)
5:7 Granularity Granularity bits control high “watermark” point at which FIFO negates Alarm condition (i.e.,
(GR) request for data). It represents the number of free Bytes, which is given by the granularity
value multiplied by 4.
Note: A granularity setting of zero should be avoided because it means the Alarm bit (and
the Requestor signal) will not negate until the FIFO is completely full. The Multi-Channel
DMA module may perform up to 2 additional data writes after the negation of a Requestor
due to its internal pipelining
9 FAE_MASK When this bit is set, the FIFO controller masks the Status Register’s FAE bit from generating
an error.
10 RXW_MASK When this bit is set, the FIFO controller masks the Status Register’s RXW bit from generating
an error. (To help with backward compatibility, this bit is asserted at reset.)
11 UF_MASK When this bit is set, the FIFO controller masks the Status Register’s UF bit from generating
an error.
12 OF_MASK When this bit is set, the FIFO controller masks the Status Register’s OF bit from generating
an error.
16:31 Reserved Unused. Software should write zero to these bits. (R/W)
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved ReadPtr
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20:31 ReadPtr This value is maintained by FIFO hardware and is NOT normally written. It can be adjusted
in special cases, but this disrupts data flow integrity. The value represents the Read address
presented to the FIFO RAM.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved WritePtr
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:19 Reserved Unused bits. Software should write zero to these bits.
20:31 WritePtr Value is maintained by FIFO hardware and is NOT normally written. It can be adjusted in
special cases, but this disrupts data flow integrity. Value represents the Write address
presented to the FIFO RAM.
This marks the end of the PCI Multi-Channel DMA Transmit Interface description.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Packet_Size[16:2] Packet_Size[1:
0!]
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 Packet_Size The user writes this register with the number of bytes for Receive Controller to fetch over
PCI. The two low bits are hardwired low; only 32-bit data transfers to the FIFO are allowed.
Writing to this register also completes a Restart Sequence as long as Master Enable bit,
PCIRER[ME], is high and Reset Controller bit, PCIRER[RC], is low.
16:31 Reserved Unused bits. Software should write zero to these bits. No Bus Error is generated
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Start_Add
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Start_Add
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 Start_Add The user writes this register with the desired Starting Address for the current packet. This
is the address which will be first presented on the external PCI bus and then
auto-incremented as necessary. This register will not increment as the PCI packet
proceeds.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 1100 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4:7 PCI_cmd The user writes this field with the desired PCI command to present during the address
phase of each PCI transaction. The default is Memory Read Multiple. This field is not
checked for consistency and if written to an illegal value, unpredictable results will occur. If
not using the default value, the user should write this register only once prior to any packet
Restart.
8:15 Max_Retries The user writes this field with the maximum number of retries to permit “per packet”. The
retry counter is reset when the packet completes normally or is terminated by a master
abort, target abort, or an abort due to exceeding the retry limit. A slow or malfunctioning
Target might issue infinite disconnects and therefore permanently tie up the PCI bus.
A finite (0x01 to 0xfe) Max_Retries value will detect this condition and generate an interrupt.
Setting Max_Retries to 0x00 or 0xff will not generate any interrupt.
19 Full Burst This is the Full Burst bit. If Full Burst is set, no check of the Receive Fifo emptiness is done
(FB) and the PCI transaction is immediately started when Packet_Size register is written (and
SCPCI RX gains the PCI bus).
The PCI transaction will continue with multiple data beats UNTIL THE FULL PACKET IS
TRANSFERRED (up to 65K bytes). The Full Burst operation avoids latency time-out and
will not relinquish the bus until all Packet Bytes are received.
Note: All Fifo checks (by scpci Rx) are disabled in this mode. It is up to the Multi-Channel
DMA to keep the Rx Fifo from being overrun by the continuous incoming PCI burst data.
Note: It is recommended to use the Full Burst mode only for transactions where more than
32 Bytes should be received.
Note: Max_Beats must be set to 0.
21:23 Max_Beats The user writes this register with the desired number of PCI data beats to attempt on each
PCI transaction. The default setting of 0 represents the maximum of eight beats per
transaction. The receive controller will wait until sufficient space is in the Receive FIFO to
support the indicated number of beats (Note: Each beat is four bytes). In the case that a
packet is nearly complete and less than the Max_Beats number of bytes remain to complete
the packet, the Receive Controller will issue single-beat transactions automatically until the
packet is finished.
27 Word Transfer The user writes this register to disable the two high byte enables of the PCI bus during
(W) initiated read transactions. The default setting is 0, enable all 4 byte enables.
31 Disable The user writes this register to disable PCI address incrementing between transactions. The
address default setting is 0, increment address by 4 (4 byte data bus).
Incrementing Note: This feature is recommended when reading from an external FIFO (having a fixed
(DI) address).
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 Reset User writes this bit high to put Receive Controller in a reset state. Note that other register
Controller bits are not affected. This Reset is intended for recovery from an error condition or to reload
(RC) the Start Address when Continuous mode is selected. This Reset bit does not prohibit
register access but it must be negated in order to initiate a Restart sequence (i.e. writing the
Packet_Size register). If it is used to reload a Start Address then the Start_Add register must
be written prior to asserting this Reset bit.
1 Reset The FIFO will be reset and flushed of any existing data when set high. The Reset Controller
FIFO bit and the Reset FIFO bit operate independently, but clearly both must be low for normal
(RF) operation.
2 FE Flush enable. This is an important bit which causes a flush signal to be generated to the
Receive FIFO Controller when the end of the current packet occurs. This Flush is necessary
to insure that the Multi-Channel DMA will get all data left in the Receive FIFO. FE is active
high.
3 Continuous User writes this bit high to activate Continuous mode. In Continuous mode the Start_Add
mode value is ignored at each packet restart and the PCI address is auto-incremented from one
(CM) packet to the next. Also, the Packets_Done status byte will become active, indicating how
many packets have been received since the last Reset Controller condition. If the
Continuous bit is low, software is responsible for updating the Start_Add value at each
packet Restart.
4 Bus error User writes this bit high to enable Bus Error indications. Section 10.3.3.2.8, Rx Status
Enable PCIRSR (R/sw1) —MBAR + 0x389C for Bus Error descriptions. Normally this bit will be 0
(BE) since illegal Slave bus accesses are not destructive to register contents, although it may
indicate broken software. Note that this bit does not affect interrupt generation.
7 Master This is the Receive Controller master enable signal. User must write it high to enable
Enable operation. It can be toggled low to permit out-of-order register updates prior to generating
(ME) a Restart sequence (in which case transmission will begin when Master Enable is written
back high), but it should not be used as such in Continuous mode because it has the side
effect of resetting the Packets_Done status counter.
10 FIFO Error User writes this bit high to enable CPU Interrupt generation in the case of FIFO error
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(FEE) that Multi-Channel DMA is controlling operation, but in such a case software should poll the
status bits to prevent a possible lock-up condition.
11 System error User writes this bit high to enable CPU Interrupt generation in the case of system error
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(SE) that Multi-Channel DMA is controlling operation, but in such a case someone should be
polling the status bits to prevent a possible lock-up condition.
12 Retry abort User writes this bit high to enable CPU Interrupt generation in the case of retry abort
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(RE) that Multi-Channel DMA is controlling operation, but in such a case, software should poll the
status bits to prevent a possible lock-up condition.
13 Target Abort User writes this bit high to enable CPU Interrupt generation in the case of target abort
Enable termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
(TAE) that Multi-Channel DMA is controlling operation, but in such a case software should poll the
status bits to prevent a possible lock-up condition.
14 Initiator Abort User writes this bit high to enable CPU Interrupt generation in the case of initiator abort error
error termination of a packet transmission. It may be desirable to mask CPU interrupts in the case
Enable that Multi-Channel DMA is controlling operation, but in such a case software should poll the
(IAE) status bits to prevent a possible lock-up condition.
15 Normal User writes this bit high to enable CPU Interrupt generation at the conclusion of a normally
termination terminated packet transmission. This may or may not be desirable depending on the nature
Enable (NE) of program control by Multi-Channel DMA or the processor core.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Next_Address
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Next_Address
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 Next_Address This status register contains the next (unread) PCI address and is updated at the
successful completion of each PCI data beat. It represents a Byte address and is updated
with a user-written Start_Add value when Start_Add is reloaded. This register is intended
to be accurate even if an abnormal PCI bus termination occurs.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Last_Word
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Last_Word
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 Last_Word This status register indicates the last 32-bit data fetched from the FIFO and is designed for
the case in which an abnormal PCI termination has corrupted the integrity of the FIFO data
(for that word).
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Bytes_Done
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Packets_Done
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 Bytes_Done This status register indicates the number of Bytes received since the start of a packet. It is
updated at the end of each successful PCI data beat. For normally terminated packets, the
Bytes_Done value and the Packet_Size values are equal. If continuous mode is active, the
Bytes_Done value reads 0 at the end of a successful packet and the Packets_Done field
is incremented.
16:31 Packets_Done This status register indicates the number of packets received. It is active only if continuous
mode is in effect. If the following occurs, the counter is reset:
• Reset Controller bit, PCIRER[RC], is asserted (normal way to restart continuous mode)
• Master Enable bit, PCIRER[ME], is negated
In this way, master enable can be used to reset Packets_Done status without disturbing
continuous mode addressing. At any point in time the total number of Bytes received can
be calculated as:
(Packets_Done x Packet_Size) + Bytes_Done
This assumes Packet_Size is the same for all restart sequences.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R
Reserved
W
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 Normal This flag is set when any packet terminates normally. It is not set in the case of an
Termination abnormally terminated packet. It does not require clearing but will not clear until it is written
(NT) to a one (in which case it will now read back as zero, i.e. negated).
>ALL THE FOLLOWING FLAG BITS OPERATE SIMILARLY<
8 Bus Error This flag is set whenever a Slave bus transaction attempts to write to a Read-Only register.
type 3 This flag bit is set regardless of the Bus error Enable bit (BE). If software is polling this Byte
(BE3) and wishes to disregard this error it must mask this bit out. No corruption of the register bits
occur for this (or any other) Bus Error case.
9 Bus Error This flag is set whenever a Slave bus transaction attempts to write to a Reserved register
type 2 (an entire 32-bit register, not just a Reserved bit or byte). This flag bit is set regardless of
(BE2) the Bus error Enable bit (BE). If software is polling this Byte and wishes to disregard this
error it must mask this bit out.
10 Bus Error This flag is set whenever a Slave bus transaction attempts to read a Reserved register (an
type 1 entire 32-bit register, not just a Reserved bit or byte). This flag bit is set regardless of the
(BE1) Bus error Enable bit (BE). If software is polling this Byte and wishes to disregard this error
it must mask this bit out.
11 FIFO Error This flag is set whenever the Receive FIFO asserts its FIFO Error output. A CPU interrupt
(FE) will be generated if the FIFO Error Enable (FEE) bit is set. The source of the error must be
determined by reading the FIFO Error status register. Also, the error condition must be
cleared at the FIFO prior to clearing this Sticky bit or this flag will continue to assert.
12 System Error This flag is set in response to the Transmit Controller entering an illegal state. A CPU
(SE) interrupt will be generated if the System error Enable (SE) bit is set. In normal operation this
should never occur. The only recovery is to assert the Reset Controller bit, PCIRER[RC],
and clear this flag.
13 Retry Error This flag is set if Max_Retries is set to a finite value (0x01 to 0xff) and the PCI transaction
(RE) has performed retries in excess of the setting. A CPU interrupt will be generated if the Retry
error Enable (RE) bit is set. The retry counter is reset at the beginning of each transaction
(i.e. it is not cumulative throughout a packet) and would generally indicate a broken or
improperly accessed Target.
14 Target Abort This flag bit is set if the PCI controller has issued a Target Abort (which means the
(TA) addressed PCI Target has signalled an Abort). A CPU interrupt will be generated if the
Target Abort Enable (TAE) bit is set. It is up to application software to query the Target’s
status register and determine the source of the error. The coherency of the Receive FIFO
data and the Receive Controller’s status registers (Next_Address, Bytes_Done, etc.) should
remain valid.
15 Initiator Abort This flag bit is set if the PCI controller issues an Initiator Abort flag. This indicates that no
(IA) Target responded but further status information can be read from the PCI Configuration
interface. A CPU interrupt will be generated if the Initiator Abort error Enable (IAE) bit is
set. The coherency of the Receive FIFO data and the Receive Controller’s status registers
(Next_Address, Bytes_Done, etc.) should remain valid.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R FIFO_Data_Word
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R FIFO_Data_Word
0:31 FIFO_Data_Word FIFO data port—Reading from this location “pops” data from the FIFO; writing “pushes”
data into the FIFO. During normal operation the Multi-Channel DMA controller pops
data here. The receive controller pushes data. Therefore, user programs should not
write here. At power on reset an uninitialized random value is read at this register. A
FIFO reset must be always performed before first accessing the FIFO.
Note: Only full 32-bit accesses are allowed. If all Byte enables are not asserted when
accessing this location, FIFO data will be corrupted.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:8 Reserved Unused byte. Software should write zero to these bits.
9 Receive Wait This flag bit indicates that the ipf_rcv bus is incurring wait states because there is not
Condition enough room in the FIFO to accept the data without causing overflow. This bit will cause the
(RXW) error outputs (fifoError, ipf_rcv_error, ipf_xmit_error) to assert unless the RXW_MASK bit in
the FIFO Control register is set. Resetting the FIFO will clear this condition and the flag bit
is cleared by writing a one to its bit position.
10 UnderFlow This flag bit indicates that the read pointer has surpassed the write pointer. In other words
(UF) the FIFO has been read beyond Empty. Resetting the FIFO will clear this condition and the
flag bit is cleared by writing a one to its bit position.
11 OverFlow This flag bit indicates that the write pointer has surpassed the read pointer. In other words
(OF) the FIFO has been written beyond Full. Resetting the FIFO will clear this condition and the
flag bit is cleared by writing a one to its bit position.
12 Frame Ready The FIFO has a complete Frame of data ready for transmission. This module
(FR) does not provide support for Data Framing applications, so this bit should be ignored.
13 Full The FIFO is Full. This is not a sticky bit or error condition. The Full indication tracks with the
state of the FIFO.
14 Alarm When the FIFO pointer is at or above the Alarm “watermark”, as written by the user
according to the Alarm and Control registers settings, the Alarm bit is asserted, thus
automatically signalling to the DMA engine that the FIFO needs to be ‘emptied’. By writing
a ‘1’ to this location software can enforce re-evaluation of the alarm condition.
15 Empty The FIFO is empty. This is not a sticky bit or error condition.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved GR Reserved
RXW_MASK
FAE_MASK
OF_MASK
UF_MASK
IP_MASK
W
RESET 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:4 Reserved Unused. Software shall write zero to these bits. (R/W)
5:7 Granularity Granularity bits control high “watermark” point at which FIFO negates Alarm condition (i.e.,
(GR) request for data). It represents the number of free Bytes times 4.
Note: A granularity setting of zero should be avoided because it means the Alarm bit (and
the Requestor signal) will not negate until the FIFO is completely full. The Multi-Channel
DMA module may perform up to 2 additional data writes after the negation of a Requestor
due to its internal pipelining
9 FAE_MASK When this bit is set, the FIFO controller masks the Status Register’s FAE bit from generating
an error.
10 RXW_MASK When this bit is set, the FIFO controller masks the Status Register’s RXW bit from generating
an error. (To help with backward compatibility, this bit is asserted at reset.)
11 UF_MASK When this bit is set, the FIFO controller masks the Status Register’s UF bit from generating
an error.
12 OF_MASK When this bit is set, the FIFO controller masks the Status Register’s OF bit from generating
an error.
16:31 Reserved Unused. Software shall write zero to these bits. (R/W)
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20:31 Alarm User writes these bits to set the low level watermark, which is the point at which the FIFO
[11:0] asserts its request for data emptying to the Multi-Channel DMA controller. This value is in
bytes. For example, with Alarm = 32, the alarm condition will occur when the FIFO has 32 or
less free bytes in it. The alarm, once asserted, will not negate until the high level mark is
reached, as specified by the Granularity bits in the Rx FIFO Control Register.
Note: The PCI RX FIFO is 512 bytes deep.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved ReadPtr
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20:31 ReadPtr This value is maintained by the FIFO hardware and is not normally written. It can be adjusted
in special cases but will disrupt the integrity of the data flow. This value represents the Read
address being presented to the FIFO RAM.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved WritePtr
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20:31 WritePtr This value is maintained by the FIFO hardware and is not normally written. It can be adjusted
in special cases but will of course disrupt the integrity of the data flow. This value represents
the Write address being presented to the FIFO RAM.
This marks the end of the PCI Multi-Channel DMA Receive Interface description.
0100 Reserved
0101 Reserved
1000 Reserved
1001 Reserved
A valid transfer occurs when both IRDY and TRDY are asserted. If either are negated during a data phase, it is considered a wait state. The
target asserts a wait state in cycles 3 and 5 of Figure 10-2. A master indicates that the final data phase is to occur by negating FRAME. The
final data phase occurs in cycle 6. Another agent cannot start an access until cycle 8.
1 2 3 4 5 6 7 8
CLK
FRAME
AD A1 D1 D2
IRDY
TRDY
(wait) (wait)
DEVSEL
Figure 10-3 shows a write cycle which is terminated by the target. In this diagram the target responds as a slow device, driving DEVSEL in
cycle 4. The first data is transferred in cycle 4. The master inserts a wait state at cycle 5. The target indicates that it can accept only one more
transfer by asserting both TRDY and STOP at the same time in cycle 5. The signal STOP must remain asserted until FRAME negates. The
final data phase does not have to transfer data. If STOP and IRDY are both asserted while TRDY is negated, it is considered a target disconnect
without a transfer. See the PCI specification for more details.
1 2 3 4 5 6 7 8
CLK
FRAME
AD A1 D1 D2
IRDY
TRDY
(wait)
DEVSEL
STOP
MPC5200 MPC5200
PCI Bus
C/BE[3:0] supports as supports Definition
Command
Initiator as Target
0100 Reserved No No --
0101 Reserved No No --
0110 Memory-read Yes Yes The memory read command accesses agents
mapped into PCI memory space.
MPC5200 MPC5200
PCI Bus
C/BE[3:0] supports as supports Definition
Command
Initiator as Target
0111 Memory-write Yes Yes The memory write command accesses agents
mapped into PCI memory space.
1000 Reserved No No --
1001 Reserved No No --
1010 Configuration Yes Yes The configuration read command accesses the 256
read byte configuration space of a PCI agent.
1011 Configuration Yes Yes The configuration read command accesses the 256
write byte configuration space of a PCI agent.
1100 Memory read Yes Yes For MPC5200, the memory read multiple command
multiple functions the same as the memory read command.
Cache line wrap is implemented when XLB is the
transaction initiator and it also wraps.
1110 Memory read Yes Yes The memory read line command indicates that an
line initiator is requesting the transfer of an entire cache
line.For MPC5200, the memory read line functions
the same as the memory read command. Cache
line wrap is not implemented.
1111 Memory write Yes (DMA Yes The memory write and invalidate command
and invalidate access only) indicates that an initiator is transferring an entire
cache line, and, if this data is in any cacheable
memory, that cache line needs to be invalidated.
The memory write and invalidate functions the
same as the memory write command. Cache line
wrap is implemented.
Software must make sure that the cache line
register and max_beats register are set to the same
value and the packet size must be a multiple of the
cache line size.
This instruction is supported only by the TX SCPCI
initiator interface and when the MPC5200 acts as a
target.
Though MPC5200 supports many PCI commands as an initiator, the Communication Sub-System Initiator interface is intended to use PCI
Memory Read, and Memory Write commands.
10.4.1.5 Addressing
PCI defines three physical address spaces: PCI memory space, PCI I/O space, and PCI configuration space. Address decoding on the PCI bus
is performed by every device for every PCI transaction. Each agent is responsible for decoding its own address. PCI supports two types of
address decoding: positive decoding and subtractive decoding. The address space which is accessed depends primarily on the type of PCI
command that is used.
For linear incrementing mode, the memory address is encoded/decoded using AD[31:2]. Thereafter, the address is incremented by 4 bytes
after each data phase completes until the transaction is terminated or completed (a 4 byte data width per data phase is implied). Note, the two
low-order bits of the address are still included in all the parity calculations.
MPC5200 supports both linear incrementing and cache wrap mode as an initiator. For memory transactions, when an XLB burst transaction
is wrapped, the cache wrap mode is automatically generated. For zero-word-aligned bursts and single-beat transactions, MPC5200 drives
AD[1:0] to 0b00. As a target, the MPC5200 treats cache wrap mode as a reserved memory mode. MPC5200 will return the first beat of data
and then signal a disconnect without data on the second data phase.
01 xx01 AD[15:8]
10 x011 AD[23:16]
11 0111 AD[31:24]
01 xx01 AD[23:8]
10 x011 AD[31:16]
01 xx01 AD[31:8]
31 11 10 87 21 0
Function DW
Reserved 0 0
Number Number
Figure 10-4. Contents of the AD Bus During Address Phase of a Type 0 Configuration Transaction
Address bits [10:8] identify the target function and bits AD[7:2] select one of the 64 configuration dwords within the target function’s
configuration space. For Type 0 configuration transactions, the target device’s IDSEL pin must be asserted. The upper 21 address lines are
commonly used as IDSELs since they are not used during the address phase of a type 0 configuration transaction.
If the target bus is a bus that is subordinate to the local PCI bus (bus 0), the configuration transaction is still initiated on bus 0, but indicates
that none of the devices on this bus are the target of the transaction. Rather, only PCI-to-PCI bridges residing on the bus should pay attention
to the transaction because it targets a device on a bus further out in the hierarchy beyond a PCI-to-PCI bridge that is attached to the local PCI
bus (bus 0). This is accomplished by initiating a Type 1 configuration transaction (setting AD[1:0] to 01b during the address phase). This
pattern instructs all functions other than PCI-to-PCI bridges that the transaction is not for any of them. Figure 10-5 illustrates the contents of
the AD bus during the address phase of the Type 1 configuration access.
31 24 23 16 15 11 10 8 7 21 0
Bus Device Function DW
Reserved 0 1
Number Number Number Number
Figure 10-5. Contents of the AD Bus During Address Phase of a Type 1 Configuration Transaction
During the address phase of a Type 1 configuration access, the information on the AD bus if formatted as follows:
• AD[1:0] contain a 01b, identifying this as a Type 1 configuration access.
• AD[7:2] identifies one of 64 configuration dwords within the target devices’s configuration space.
• AD[10:8] identifies one of the eight functions within the target physical device.
• AD[15:11] identifies one of 32 physical devices. This field is used by the bridge to select which device’s IDSEL line to assert.
• AD[23:16] identifies one of 256 PCI buses in the system.
• AD[31:24] are reserved and are cleared to zero.
During a Type 1 configuration access, PCI devices ignore the state of their IDSEL inputs. When any PCI-to-PCI bridge latches a Type 1
configuration access (command = configuration read or write and AD[1:0] = 01b) on its primary side, it must determine whether the bus
number field on the AD bus matches the number of its secondary bus or if it’s within the range of its subordinate buses. If the bus number
matches, it should claim and pass the configuration access onto its secondary bus as a Type 0 configuration access, decoding the device
number to select one of the IDSEL lines. If the bus number isn’t equal to its secondary bus, but is within the range of buses that are subordinate
to the bridge, the bridge claims and passes that access through as a Type 1 access.
PCI
request/grant
(to PCI Arbiter)
In addition to the configurable address window mapping logic, the register interface provides a Configuration Address Register, which
provides the ability to generate Configuration, Interrupt Acknowledge and Special Cycles. External PCI devices should be configured through
this interface. Section 10.4.4.2, Configuration Mechanism for configuration, interrupt acknowledge, and special cycle command support.
The PCI XLB Initiator interface supports all XLB transactions, including single-beat transfers and bursts (32 bytes). Single-beat 64-bit data
transactions are automatically translated into 2-beats burst transfers on the PCI bus. Standard XL bus burst transactions are supported as well,
however, buffering is implemented to boost performance during writes and avoid deadlock scenario for all reads and memory writes. If the
target for an XL bus read from PCI disconnects part way through the burst, MPC5200 may have to handle a local memory access from an
alternate PCI master before the disconnected transfer can continue.
XLB initiator read requests are decoded into four types: PCI Memory, I/O, Configuration, and Interrupt Acknowledge. The PCI Controller
must first gain access to the PCI bus before acknowledging the XLB read request. The specific timing of the address acknowledge is dependent
upon the type of transfer.
When the XL bus requests burst data from PCI space, the data received from PCI is stored in a buffer until all requested data has been latched.
The PCI Controller does not terminate the address tenure of the XLB transaction until all requested data is latched. This is because PCI targets
are allowed to disconnect in the middle of a transfer, and the XL bus requires burst transfers to be atomic. If the PCI target disconnects in the
middle of the data transfer and an alternate PCI master acquires the bus and initiates a local memory access, the Controller retries the internal
read transaction on the XL bus. The PCI Controller continues to request mastership of the PCI bus until the original request is completed.
For example, if the XL bus initiates a burst read, and the PCI target disconnects after transferring the first half of the burst, MPC5200
re-arbitrates for the PCI bus, and when granted, initiates a new transaction with the address of the third beat of the burst (4-beat XLB bus
bursts). If an alternate PCI master requests data from local memory while the PCI Controller is waiting for the PCI bus grant, the PCI controller
retries the XLB bus transaction to allow the PCI-initiated transaction to complete and the read buffer will be emptied.
PCI critical-word-first (CWF) burst operation (i.e. cache line wrap burst) is supported and the 2-bit cache line wrap address mode is driven
on the address bus when the XLB bus starts the burst at a non-zero-word-first address. Note that this option is only provided as a means to
support memory targets that support cache-line wrap.
NOTE
A processor is not permitted to cache from any external memory targets residing on the PCI bus. This
was allowed previously in the PCI spec. 2.1. The PCI spec. 2.2. took this requirements away.
XL bus writes are decoded into PCI memory, PCI I/O, PCI configuration, or special cycles. If the transaction decodes into an I/O,
configuration, or special cycle, the write is connected. The PCI controller gains access to the PCI bus and successfully transfers the data before
it asserts address acknowledge to the XL bus. If the address maps to PCI memory space, the XLB address tenure is immediately acknowledged
and write data is posted.
A 32-byte buffer is used to post memory writes from XLB to PCI. Buffering minimizes the effect of the slower PCI bus on the higher-speed
XL bus. It may contain single-beat XLB write transactions or a single burst. After the XL bus write data is latched internally, the bus is
available for subsequent transactions without having to wait for the write to the PCI target to complete. If a subsequent XLB write request to
the PCI bus comes in, the data transfer is delayed until all previous writes to the PCI bus are completed. Only when the write buffer is empty
can burst data from the XL bus be posted.
Table 10-7. XLB bus to PCI Byte Lanes for Memorya Transactions (continued)
000 011 OP5 OP6 OP7 -- -- -- -- -- 000 1000 -- OP7 OP6 OP5
001 011 -- OP5 OP6 OP7 -- -- -- -- 000 0001 OP7 OP6 OP5 --
100 011 -- -- -- -- OP5 OP6 OP7 -- 100 1000 -- OP7 OP6 OP5
001 100 -- OP4 OP5 OP6 OP7 -- -- -- 000 0001 OP6 OP5 OP4 --
010 100 -- -- OP4 OP5 OP6 OP7 -- -- 000 0011 OP5 OP4 -- --
100 100 -- -- -- -- OP4 OP5 OP6 OP7 100 0000 OP7 OP6 OP5 OP4
000 101 OP3 OP4 OP5 OP6 OP7 -- -- -- 000 0000 OP6 OP5 OP4 OP3
100 1110 -- -- -- OP7
001 101 -- OP3 OP4 OP5 OP6 OP7 -- -- 000 0001 OP5 OP4 OP3 --
010 101 -- -- OP3 OP4 OP5 OP6 OP7 -- 000 0011 OP4 OP3 -- --
Table 10-7. XLB bus to PCI Byte Lanes for Memorya Transactions (continued)
011 101 -- -- -- OP3 OP4 OP5 OP6 OP7 000 0111 OP3 -- -- --
000 110 OP2 OP3 OP4 OP5 OP6 OP7 -- -- 000 0000 OP5 OP4 OP3 OP2
001 110 -- OP2 OP3 OP4 OP5 OP6 OP7 -- 000 0001 OP4 OP3 OP2 --
010 110 -- -- OP2 OP3 OP4 OP5 OP6 OP7 000 0011 OP3 OP2 -- --
000 111 OP1 OP2 OP3 OP4 OP5 OP6 OP7 -- 000 0000 OP4 OP3 OP2 OP1
001 111 -- OP1 OP2 OP3 OP4 OP5 OP6 OP7 000 0001 OP3 OP2 OP1 --
000 000 OP0 OP1 OP2 OP3 OP4 OP5 OP6 OP7 000 0000 OP3 OP2 OP1 OP0
Reserved
Contents of Configuration Address Register
31 30 24 23 16 15 11 10 8 7 2 10
For Type 0 configuration cycles, MPC5200 translates the device number field of the Configuration Address Register into a unique IDSEL line
shown in Table 10-8. (allows for 21 different devices).
Table 10-8. Type 0 Configuration Device Number to IDSEL Translation
Device Number
IDSEL
Binary Decimal
0b0_0000-0b0_1001 0-9 -
0b0_1010 10 AD31
0b0_1011 11 AD11
0b0_1100 12 AD12
0b0_1101 13 AD13
0b0_1110 14 AD14
0b0_1111 15 AD15
0b1_0000 16 AD16
0b1_0001 17 AD17
0b1_0010 18 AD18
0b1_0011 19 AD19
0b1_0100 20 AD20
0b1_0101 21 AD21
0b1_0110 22 AD22
0b1_0111 23 AD23
0b1_1000 24 AD24
0b1_1001 25 AD25
0b1_1010 26 AD26
0b1_1011 27 AD27
0b1_1100 28 AD28
Device Number
IDSEL
Binary Decimal
0b1_1101 29 AD29
0b1_1110 30 AD30
0b1_1111 31 -
NOTE: Device numbers 0b0_0000 to 0b0_1001 are reserved. Programming to these values and issuing a configuration transaction will
result in a PCI configuration cycle with AD31-AD11 driven low.
MPC5200 can issue PCI configuration transactions to itself. A Type 0 configuration initiated by MPC5200 can access its own configuration
space by asserting its IDSEL input signal. This is the only way MPC5200 can clear its own status register bits (read-write-clear).
For Type 0 translations, the function number and dword fields are copied without modification onto the AD[10:2] signals and AD[1:0] are
driven low during the address phase.
During the data phase, AD[31:0] contain the Special Cycle message and an optional data field. The Special Cycle message is encoded on the
16 least significant bits (AD[15:0]) and the optional data field is encoded on the most significant bits (AD[31:16]). The Special Cycle message
encodings are assigned by the PCI SIG Steering Committee. The current list of defined encodings are provided in Table 10-9.
Table 10-9. Special Cycle Message Encodings
AD[15:0] Message
0x0000 SHUTDOWN
0x0001 HALT
0x0003-0xFFFF reserved
Table 10-12. Non-contiguous PCI to XL bus Transfers (require two XLB bus accesses)
010 OP3
110 OP3
011 OP3
111 OP3
011 OP3
111 OP3
011 OP3
111 OP3
The Communication Sub-System Initiator Interface consists of Receive and Transmit FIFOs, integrated as separate Multi-Channel DMA
peripherals. Therefore, it is generally controlled by the Multi-Channel DMA controller through a pre-described program loop. As with all
Communication Sub-System peripherals, it can be accessed and controlled directly through the Slave bus interface if desired, but this path
does not generally lend itself to high throughput.
The Transmit and Receive FIFOs are 512 bytes deep and support PCI bursts up to 8 beats, each beat being a 32 bit word. The burst size is
programmable. The general approach is to write a PCI command and address to the control register along with the number of bytes to be
transmitted (Packet_Size).
When transmitting data, the module will wait for the Transmit FIFO to fill at least to the minimum number of bytes required to perform the
programmed burst; then it begins transmitting the data onto the PCI bus. Multi-Channel DMA must handle filling the Transmit FIFO to
support the specified number of bytes. Transmission will continue until the specified number of bytes have been sent.
When reading data, the module will check that enough space is available in the Receive FIFO and immediately begin PCI read transactions.
Multi-Channel DMA must handle emptying the Receive FIFO to support the specified number of bytes. Transmission will continue until the
specified number of bytes have been received. To avoid stale data while receiving the last burst flushing of the RX FIFO can be forced with
the set of the flush bit FE. Section 10.3.3.2.4, Rx Enables PCIRER (RW) —MBAR + 0x388C
At this point, software must restart the procedure by at least re-writing the Packet_Size register. Each transmission of the specified number of
bytes is considered a “packet”. A new packet can be instructed to continue at the last valid PCI address or software may choose to write a new
starting address. The largest burst size is 8 PowerPC words and the largest Packet_Size is 65,535 bytes, so a packet will typically consist of
many PCI data bursts.
The Transmit Controller will wait until sufficient bytes are in the Transmit FIFO to support a full burst and will continue in this mode until
the entire packet is transmitted. Similarly, the Receive Controller will stall until sufficient space is available in the Receive FIFO to support a
full burst. If the packet is nearly done and the number of bytes remaining to complete the packet is less than Max_beats, the remaining data
will be performed as single-beat PCI transactions.
10.4.6.2 Addressing
The Communication Sub-System Initiator interface does not use the addressing windows that are set up for the XL bus Initiator Interface.
Instead, the Tx Start Address register and Rx Start Address register are used. Software programs these registers with the initial starting address
for the packet. The module contains an internal counter which will present the incremented PCI address at the beginning of each successive
burst for packet transfers.
long 00 1111 OP0 OP1 OP2 OP3 00 0000 OP3 OP2 OP1 OP0
a
The byte lane translation will be similar for other types of transactions. However, the PCI address may be dif-
ferent as explained in Section 10.4.1.5, Addressing.
10.4.6.4 Initialization
The following list is the recommended procedure for setting up either the Transmit or Receive controller.
1. Set the Start Address
10.4.6.8 Alarms
The FIFO alarm registers allow software to control when the DMA fills or empties the appropriate FIFO.
10.4.8 Interrupts
The PCI Arbiter implements a Round-Robin fairness algorithm, which avoids the domination of the bus by high-priority masters and
exclusion of low-priority masters. The PCI Arbiter is capable of Parking the current Master to stay on last master in absence of other requests.
The support of the non-PCI clients presents special challenges to the arbitration scheme.
The PCI Arbiter runs independently. The programmability consists of a Soft Reset, which allows to reset the PCI Arbiter, and one status bit
to detect the Broken Master condition. and a corresponding enable bit for the generation of a CPU interrupt for the Broken Master condition.
All these register bits are located in registers of the PCI Controller.
In case of broken master detection the external PCI REQ# will be dis-connected internally and will be re-connected after external deassertion
of PCI REQ# or by software (Softreset) or by Hardreset. After broken master detection (bus idle for 16 clocks) the arbiter will ignore any PCI
FRAME# assertion.
The PCI Arbiter does not support preemption of the internal masters XIPCI or SCPCI. The internal master is granted until the transaction has
been completed. The Latency Timer (LT) cannot terminate any transfer.
Configuration
Initiator Window
Cache Line Address PCI Transaction
Configuration bits
XL bus Transaction Size Register Controller (XLB
(XLB Slave Interface) Register= Initiator Interface) ->
8 device PCI Target
number
IO/M# PRC En
==
b1_1111
Configuration
Initiator Window
Cache Line Address PCI Transaction
Configuration bits
XL bus Transaction Size Register Controller (XLB
(XLB Slave Interface) Register= Initiator Interface) ->
8 device PCI Target
number
IO/M# PRC En
==
b1_1111
Note:
1. Dual Address Cycles and Memory Write and Invalidate Commands are not supported
2. x means “don’t care”
Inbound Translation
base address 0 Register Space TBATR0 Address
Translation System Memory
1G
1G
MPC5200
BAR1
Initiator Not Recommended
Window(s) PCI Space MPC5200
memory
TBATR1 Address
Inbound Translation 2G Translation 2G
base address 1
MPC5200 MPC5200
memory BAR0
Sdram Space
3G
3G
4G
4G
MPC5200 Space PCI Space (Memory View) PCI Space (IO View) PCI Space (Configuration View)
0
0 0 0
Window 0
MBAR Register Space
1G Window 0
Translation 1G 1G 1G
Window 0
Not Recommended
XLB Initiator
Windows MPC5200
memory
Window 1 Window 1
Translation Window 1
2G
2G 2G 2G
Not Recommended
Window 2
3G Translation 3G 3G 3G
Window 2
4G
4G 4G 4G
Associated with PCI Prefetchable Memory Window 0 Base Address = 0x40 Window 2 Base Address = 0x80
Window 0 Address Mask = 0x1F Window 2 Address Mask = 0x3F
Window 0 Translation Address = 0x00 Window 2 Translation Address = 0xC0
Associated with PCI I/O
Window 1 Base Address = 0x70
Associated with PCI Non-Prefetchable Memory Window 1 Address Mask = 0x0F
Window 1 Translation Address = 0x70
Chapter 11
ATA Controller
11.1 Overview
The following sections are contained in this document:
• Section 11.2, BestComm Key Features
— Section 11.3, ATA Register Interface, includes:
— Section 11.3.1, ATA Host Registers—MBAR + 0x3A00
— Section 11.3.2, ATA FIFO Registers—MBAR + 0x3A00
— Section 11.3.3, ATA Drive Registers—MBAR + 0x3A00
• Section 11.4, ATA Host Controller Operation
• Section 11.5, Signals and Connections
• Section 11.6, ATA Interface Description
• Section 11.7, ATA Bus Background
• Section 11.8, ATA RESET/Power-Up
• Section 11.9, ATA I/O Cable Specifications
The Advanced Technology Attachment (ATA) Controller provides full functional compatibility with ATA-4 documentation, supporting
Ultra-33. For more ATA Standards information, refer to "American National Standard for Information Technology—AT Attachment with
Packet Interface Extension (ATA/ATAPI-4)".
A dedicated MPC5200 pin for ATA reset is not provided. An appropriate signal on the board should be routed to the reset input on the ATA
connector. If ATA reset is tied to HRESET or SRESET on MPC5200 pins, they are asserted and internally held low for an appropriate
period of time to satisfy ATA reset. An MPC5200 GPIO may be used to drive ATA reset independently if special software control is needed.
Figure 11-1 shows the ATA Controller Interface.
PCI Handshake
ATA Host
Controller
Ultra DMA
Channel
(higher priority) IP bus Rx/Tx FIFO
BestComm Interface Multiword
DMA
Channel
ARB
Program Local Bus
Registers
IPBI (Host/Driver)
IPBI
PIO
Channel
4. As FIFO fills, BC is interrupted and moves data from FIFO to an internal destination.
• ATA Host Configuration Register (0x3A00) • ATA Ultra DMA Timing 1 Register (0x3A18)
• ATA Host Status Register (0x3A04) • ATA Ultra DMA Timing 2 Register (0x3A1C)
• ATA PIO Timing 1 Register (0x3A08) • ATA Ultra DMA Timing 3 Register (0x3A20)
• ATA PIO Timing 2 Register (0x3A0C) • ATA Ultra DMA Timing 4 Register (0x3A24)
• ATA Multiword DMA Timing 1 Register (0x3A10) • ATA Ultra DMA Timing 5 Register (0x3A28)
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 TIP Transaction in Progress—indicator bit MUST be polled by software before PIO access.
System bus (XL bus) locks up if PIO access is attempted while this bit is set. This bit is
read-only.
1 UREP UDMA Read Extended Pause—bit sets when drive stops strobing for an extended period
without initiating burst termination by negating DMARQ, during an UDMA read burst.
Software may initiate an Ultra DMA read burst termination, in this case by setting ATA Drive
Device Command Register HUT bit (see Table 11-29.).
2:5 — Reserved
6 RERR Read Error—An un-implemented register read.
8:31 — Reserved
R pio_t0 pio_t2_8
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R pio_t2_16 Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 pio_t0 PIO cycle time count value is based on system clock operating frequency.
8:15 pio_t2_8 PIO read/write pulse width for 8-bit transfers. Count value is based on system clock
operating frequency.
16:23 pio_t2_16 PIO read/write pulse width for 16-bit transfers. Count value is based on system clock
operating frequency.
24:31 — Reserved
R pio_t4 pio_t1
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R pio_ta Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 pio_t4 PIO write (DIOW) data hold time. Count value is based on system clock operating frequency.
8:15 pio_t1 Address valid to DIOR/DIOW setup. Count value is based on system clock operating
frequency.
16:23 pio_ta IORDY setup time. Count value is based on system clock operating frequency.
24:31 — Reserved
R dma_t0 dma_td
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R dma_tk dma_tm
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 dma_t0 Multiword DMA cycle time. Count value is based on system clock operating frequency.
8:15 dma_td Multiword DMA read/write (DIOR/DIOW) asserted pulse width. Count value is based on
system clock operating frequency.
16:23 dma_tk Multiword DMA read/write (DIOR/DIOW) negated pulse width. Count value is based on
system clock operating frequency.
24:31 dma_tm CS[0], CS[1] valid to DIOR/DIOW. Count value is based on system clock operating
frequency.
R dma_th dma_tj
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R dma_tn Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 dma_th Multiword DMA write (DIOW) data hold time. Count value is based on system clock
operating frequency.
8:15 dma_tj Multiword DMA read/write (DIOR/DIOW) asserted pulse width. Count value is based on
system clock operating frequency.
16:23 dma_tn CS[0], CS[1] hold. Count value is based on system clock operating frequency.
24:31 — Reserved
R udma_t2cyc udma_tcyc
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R udma_tds udma_tdh
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 udma_t2cyc Ultra DMA sustained average two cycle time. Count value is based on system clock
operating frequency.
8:15 udma_tcyc Ultra DMA strobe edge to strobe edge cycle time. Count value is based on system clock
operating frequency.
16:23 udma_tds Ultra DMA read data setup time. Count value is based on system clock operating
frequency.
24:31 udma_tdh Ultra DMA read data hold time. Count value is based on system clock operating frequency.
R udma_tdvs udma_tdvh
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R udma_tfs udma_tli
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 udma_tdvs Ultra DMA write data setup time. Count value is based on system clock operating
frequency.
8:15 udma_tdvh Ultra DMA write data hold time. Count value is based on system clock operating frequency.
16:23 udma_tfs First strobe time during the initiation of ultra DMA data transfer. Count value is based on
system clock operating frequency.
24:31 udma_tli Limited interlock time with a defined maximum, when drive or host are waiting for response
from each other. Count value is based on system clock operating frequency.
R udma_tmli udma_taz
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R udma_tenv udma_tsri
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 udma_tmli Limited interlock time with a defined minimum, when drive or host are waiting for response
from each other. Count value is based on system clock operating frequency.
8:15 udma_taz Maximum time allowed for output drivers to release from being driven. Count value is
based on system clock operating frequency.
16:23 udma_tenv Envelope time from DMACK to STOP and HDMARDY during data-out burst initiation.
Count value is based on system clock operating frequency.
24:31 udma_tsr Strobe to DMARDY time. If DMARDY is negated before this long after strobe edge the
recipient receives no more than one additional data word. Count value is based on system
clock operating frequency.
R udma_tss udma_trfs
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R udma_trp udma_tac
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 udma_tss Time from strobe edge to negation of DMARQ (when drive terminates burst) or assertion
of STOP (when host terminates burst). Count value is based on system clock operating
frequency.
8:15 udma_trfs Ready-to-final-strobe time. No strobe edges are sent this long after negation of DMARDY.
Count value is based on system clock operating frequency.
16:23 udma_trp Ready-to-pause time. The time that recipient waits to initiate pause after negating
DMARDY. Count value is based on system clock operating frequency.
24:31 udma_tack Setup and hold times for DMACK before negation or assertion. Count value is based on
system clock operating frequency.
R udma_tzah Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 udma_tzah Minimum delay time required for output drivers to assert or negate from release state.
Count value is based on system clock operating frequency.
8:31 — Reserved
R Reserved ata_share_cnt
RESET: 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Description
Bits Name
0:7 — Reserved
8:15 ata_share_cnt This 8-bit value controls the length of the “time slot” assigned to ATA transactions when PCI
arbiter provides a grant to the ATA device. This is in IPB clocks. The arbiter will maintain
the grant to ATA for (at least) the ata_share_cnt value. When this value has expired, ATA
may be interrupted (paused) by the arbiter, to service other pending requests for the AD
bus.
Default value at reset is 128
Note: The maximal allowed setting is 0xFE.
16:31 — Reserved
ATA FIFO is controlled by 32-bit registers. These registers are located at an offset from MBAR of 0x3a00. Register addresses are relative to
this offset. Therefore, the actual register address is: MBAR + 0x3A00 + register address
Hyperlinks to the ATA FIFO registers are provided below:
• ATA Rx/Tx FIFO Data Word Register (0x3A3C) • ATA Rx/Tx FIFO Alarm Register (0x3A48)
• ATA Rx/Tx FIFO Status Register (0x3A40) • ATA Rx/Tx FIFO Read Pointer Register (0x3A4C)
• ATA Rx/Tx FIFO Control Register (0x3A44) • ATA Rx/Tx FIFO Write Pointer Register (0x3A50)
R FIFO_Data_Word
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R FIFO_Data_Word
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 FIFO_Data_Word The FIFO data port. Reading from this location “pops” data from the FIFO, writing
“pushes” data into the FIFO. During normal operation the BestComm Controller
pushes data here.
Note: NOTE: ONLY full long-word access is allowed. If all byte enables are not
asserted when accessing this location, a FIFO error flag is generated.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:8 — Reserved
9 Err Error—flag bit is essentially the logical "OR" of other flag bits and can be polled for detection
of any FIFO error. After clearing the offending condition, writing 1 to this bit clears flag.
10 UF UnderFlow—flag indicates read pointer has surpassed the write pointer. FIFO was read
beyond empty. Resetting FIFO clears this condition; writing 1 to this bit clears flag.
11 OF OverFlow—flag indicates write pointer surpassed read pointer. FIFO was written beyond full.
Resetting FIFO clears this condition; writing 1 to this bit clears flag.
12 Full FIFO full—this is NOT a sticky bit or error condition. Full indication tracks with FIFO state.
13 HI High—FIFO requests attention, because high level alarm is asserted. To clear this condition,
FIFO must be read to a level below the setting in granularity bits.
14 LO Low—FIFO requests attention, because Low level alarm is asserted. To clear this condition,
FIFO must be written to a level in which the space remaining is less than the granularity bit
setting.
15 Emty FIFO empty—this is NOT a sticky bit or error condition. Full indication tracks with FIFO state.
16:31 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2 WFR Write End of Frame (EOF) This bis should remain low.
3:4 — Reserved
5:7 GR Granularity—bits control high “watermark” point at which FIFO negates Alarm condition (i.e.,
request for data). It represents the number of free bytes times 4.
000 = FIFO waits to become completely full before stopping data request.
001 = FIFO stops data request when only one long word of space remains.
8:31 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved Alarm
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:19 — Reserved
20:31 Alarm User writes these bits to set low level “watermark”, which is the point where FIFO asserts
request for BestComm Controller data filling. Value is in bytes. For example, with Alarm = 32,
alarm condition occurs when FIFO contains 32Bytes or less. Once asserted, alarm does not
negate until high level mark is reached, as specified by FIFO control register granularity bits.
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved ReadPtr
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:19 — Reserved
20:31 ReadPtr Value is maintained by FIFO hardware and is NOT normally written. It can be adjusted in
special cases, but this disrupts data flow integrity. Value represents the Read address
presented to the FIFO RAM.
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved WritePtr
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:19 — Reserved
20:31 WritePtr Value is maintained by FIFO hardware and is NOT normally written. It can be adjusted in
special cases, but this disrupts data flow integrity. Value represents the Read address
presented to the FIFO RAM.
• ATA Drive Device Control Register (0x3A5C), write-only • ATA Drive Sector Number Register (0x3A6C), R/W
• ATA Drive Alternate Status Register (0x3A5C), read-only • ATA Drive Cylinder Low Register (0x3A70), R/W
• ATA Drive Data Register (0x3A60), R/W • ATA Drive Cylinder High Register (0x3A74), R/W
• ATA Drive Features Register (0x3A64), write-only • ATA Drive Device/Head Register (0x3A78), R/W
• ATA Drive Error Register (0x3A64), read-only • ATA Drive Device Command Register (0x3A7C),
write-only
• ATA Drive Sector Count Register (0x3A68), R/W • ATA Drive Device Status Register, (0x3A7C) read-only
R Reserved Reserved
W SRST nIEN
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:4 — Reserved
5 SRST Software Reset—Host controlled software reset bit. Drive executes software reset protocol
when bit is set to 1 by host.
6 nIEN Interrupt Enable—Host controlled interrupt enable. INTRQ is enabled when this bit is cleared
to 0.
Note: NOTE: For MPC5200 ATA Host Controller, enabling INTRQ is mandatory for
DMA/UDMA data transfer modes.
7:31 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 BSY Drive Busy—Transactions internal to drive are in progress. Host must wait.
2:3 — Reserved
5:6 — Reserved
8:31 — Reserved
R Data H Data L
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16:31 — Reserved
R Reserved
W Data
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Data Register content is command dependent. Contents become command parameters when the
ATA drive command register is written.
8:31 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:4 Data Register content is command dependent. Contents become command parameters when the
ATA drive command register is written.
Register content is valid when BSY and DRQ bits are set to 0 and ERR bit is set to 1 in the
ATA drive status register. Register content is not valid when drive is in sleep mode.
5 ABRT Bit is set to 1 to indicate requested command has been aborted, because command code or
a command parameter is invalid or some other error occurred.
0:7 Data Register content is command dependent. Contents become command parameters when the
ATA drive command register is written.
Register content is valid when BSY and DRQ bits are set to 0 and ERR bit is set to 1 in the
ATA drive status register. Register content is not valid when drive is in sleep mode.
8:31 — Reserved
R Data Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Data Bit content is command dependent. For most read/write commands, this register indicates
the total number of sectors requested for transfer.
Register is written only when ATA drive status register bits BSY and DRQ equal 0 and
DMACK is not asserted. If register is written when BSY and DRQ bits are set to 1, the result
is indeterminate.
Register content is not valid when drive is in sleep mode.
8:31 — Reserved
R Data Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Data Bit content is command dependent. For most commands, this register indicates the data
transfer starting sector number for when CHS addressing is enabled. This register indicates
part of the LBA address when the LBA addressing is enabled.
Register is written only when ATA drive status register bits BSY and DRQ equal 0 and
DMACK is not asserted. If register is written when BSY and DRQ bits are set to 1, the result
is indeterminate.
Register content is not valid when drive is in sleep mode.
8:31 — Reserved
R Data Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Data Bit content is command dependent. For most commands, this register indicates the data
transfer starting sector number for when CHS addressing is enabled. This register indicates
part of the LBA address when the LBA addressing is enabled.
Register is written only when ATA drive status register bits BSY and DRQ equal 0 and
DMACK is not asserted. If this register is written when BSY and DRQ bits are set to 1, the
result is indeterminate.
Register content is not valid when drive is in sleep mode.
8:31 — Reserved
R Data Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Data Bit content is command dependent. For most commands, this register indicates the data
transfer starting sector number for when CHS addressing is enabled. This register indicates
part of the LBA address when the LBA addressing is enabled.
This register is written only when ATA drive status register bits BSY and DRQ equal 0 and
DMACK is not asserted. If this register is written when BSY and DRQ bits are set to 1, the
result is indeterminate.
Register content is not valid when drive is in sleep mode.
8:31 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 — Reserved
1 Data Bit is command dependent. In LBA addressing mode, this bit is set to 1 to indicate LBA
addressing is chosen for data transfer.
2 — Reserved
3 — Reserved
4:7 Data Bit content is command dependent. For most commands, this register indicates the data
transfer starting sector number for when CHS addressing is enabled. This register indicates
part of the LBA address when the LBA addressing is enabled.
This register is written only when ATA drive status register bits BSY and DRQ equal 0 and
DMACK is not asserted. If this register is written when BSY and DRQ bits are set to 1, the
result is indeterminate.
Register content is not valid when drive is in sleep mode.
8:31 — Reserved
W Data
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 Data Register contains the command code sent to the drive. When this register is written,
command execution begins immediately. Writing this register clears any pending interrupt
condition.
8 — Reserved
9 HUT Host UDMA burst Terminate—Software can terminate UDMA burst prematurely by setting
this bit. Bits 15 through 10 are unaffected and retain previous values.
10 FR FIFO Reset—Hardware resets FIFO when the direction is switched from Tx to Rx. No
hardware reset is done for Rx to Tx switch. Software must verify FIFO is empty before filling
it for Tx. When bit 10 is set, FIFO is being reset and bits 15, 14, 13, 12, 11, 9 and 8 are
invalid.
11 FE Enable FIFO flush in Rx mode—For all commands except DEVICE RESET, this register is
written only when the ATA drive status register bits BSY and DRQ equal 0 and DMACK is not
asserted. If this register is written when BSY or DRQ bits are set to 1, the result is
indeterminate except for the DEVICE RESET command.
Register content is not valid when drive is in sleep mode.
12 IE Enables drive interrupt to pass to CPU in DMA/UDMA modes. Software writes to this register
as follows:
• FE (bit 11) and IE (bit 12)
• Clear IE and set FE if SDMA task loop count is the same as the data transfer requested
from the drive.
The following is a typical sequence if the BestComm task loop is a larger count than data
request programmed for the drive:
1. Start transaction with IE set and FE cleared.
2. Repeat 1 until task loop count expires.
3. Start last transaction with IE clear and FE set.
• Controller issues flush at end.
• Task loop completes and interrupts CPU.
• CPU responds to SDMA interrupt instead of drive interrupt.
• UDMA (bit 13)—Set when UDMA protocol is selected for data transfer, cleared for DMA
protocol.
• READ (bit 14)—Set when read command for DMA/UDMA protocols is written to drive
command register, cleared otherwise.
• WRITE (bit 15)—Set when write command for DMA/UDMA protocols is written to drive
command register, cleared otherwise.
MANDATORY—Be Aware: Drive interrupt must be enabled by clearing bit 1 of drive control
register for DMA/UDMA mode transfers.
13 UDAMA Bit is set when UDMA protocol is selected, cleared when multiword DMA protocol is selected.
16:31 — Reserved
R BSY DRDY Data DRQ Reserved ERR Rsvd HUT FR FE IE UDMA Read Write
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2:3 Data Command dependent—Register is written only when ATA drive status register bits BSY and
DRQ equal 0 and DMACK is not asserted. If this register is written when BSY and DRQ bits
are set to 1, the result is indeterminate.
Register content is not valid when drive is in sleep mode.
5:6 — Reserved
7 ERR Set to 1 indicates ATA drive error register bits are valid.
8 — Reserved
9 HUT Host UDMA burst Terminate—Software can terminate UDMA burst prematurely by setting
this bit. Bits 15 through 10 are unaffected and retain previous values.
10 FR FIFO Reset—Hardware resets FIFO when the direction is switched from Tx to Rx. No
hardware reset is done for Rx to Tx switch. Software must verify FIFO is empty before filling
it for Tx. When bit 10 is set, FIFO is being reset and bits 15, 14, 13, 12, 11, 9 and 8 are
invalid.
11 FE Enable FIFO flush in Rx mode—For all commands except DEVICE RESET, this register is
written only when the ATA drive status register bits BSY and DRQ equal 0 and DMACK is not
asserted. If this register is written when BSY or DRQ bits are set to 1, the result is
indeterminate except for the DEVICE RESET command.
Register content is not valid when drive is in sleep mode.
12 IE Enables drive interrupt to pass to CPU in DMA/UDMA modes. Software writes to this register
as follows:
• FE (bit 11) and IE (bit 12)
• Clear IE and set FE if SDMA task loop count is the same as the data transfer requested
from the drive.
The following is a typical sequence if the SDMA task loop is a larger count than data request
programmed for the drive:
1. Start transaction with IE set and FE cleared.
2. Repeat 1 until task loop count expires.
3. Start last transaction with IE clear and FE set.
• Controller issues flush at end.
• Task loop completes and interrupts CPU.
• CPU responds to BestComm interrupt instead of drive interrupt.
• UDMA (bit 13)—Set when UDMA protocol is selected for data transfer, cleared for DMA
protocol.
• READ (bit 14)—Set when read command for DMA/UDMA protocols is written to drive
command register, cleared otherwise.
• WRITE (bit 15)—Set when write command for DMA/UDMA protocols is written to drive
command register, cleared otherwise.
MANDATORY—Be Aware: Drive interrupt must be enabled by clearing bit 1 of drive control
register for DMA/UDMA mode transfers.
13 UDAMA Bit is set when UDMA protocol is selected, cleared when multiword DMA protocol is selected.
16:31 — Reserved
ATA_mode_timing_spec + ipbi_clock_period – 1
Count = ------------------------------------------------------------------------------------------------------------------------
clock_period
This rounds up to the smallest integer number of clock counts that meet the minimum specification.
In the case of counters that control duration of a read strobe (pio_t2_8, pio_t2_16 and dma_td), the added transceiver propagation
delay must be taken into account so the read data meets setup time to the rising edge of the strobe. Therefore:
udma_t2cyc is another special case. Unlike the name implies, this register does not control 2 UDMA timing cycles. Rather, it
controls how long the host continues to accept data after it has de-asserted HDMARDY–. According to the ATA-4 specification—if
tSR is met, the host should accept 0–1 more data words, or if tSR is exceeded, 0–2 more data words. A safe value to ensure the host
accepts these data words after HDMARDY– de-asserts is:
4 + t2CYC_sec[mode] + clock_period – 1
Count = -----------------------------------------------------------------------------------------------------
clock_period
1. Write the calculated count in the timing registers provided in the ATA host register memory map.
2. Write ATA drive registers per ATA-4 specification using Host Controller register memory map to the setup drive for desired
operation.
3. Read/Write to unimplemented registers or read of a write-only or vice versa errors set flag bits in the ATA Host Controller status
register. The status register is cleared by writing 1 to the flag bit set to indicate an error.
4. Write ata_dma_mode register to indicate UDMA/DMA READ/WRITE operations for UDMA/DMA data transfer modes.
5. Initiate and complete data transfers according to protocols described in ATA-4 specification.
ATA host hardware does data transfers per chosen protocol. Hardware also maintains proper handshaking with the MPC5200 system.
The ATA state machine is a combination of several small state machines. The data transfers is initiated by the software. The software chooses
the mode of operation and sets up needed registers in the ATA Host Controller IPBI module.
The ATA drive registers are also set up by the software through ATA IPBI module using PIO mode. The ATA drive command and control
block registers are mapped into ATA Host Controller register memory map.
The software writes a command to be executed in the ATA drive command register. The command code is decoded by the drive electronics.
The software, at the same time indicates to the host if UDMA/DMA protocol is used for READ/WRITE of the data. This is done by setting
proper bits in the ata_dma_mode register in the ATA IPBI module.
t2i t2 — —
t4 t3 write_enable=0 —
address_enable=0 —
Note:
1. Since t1 and t1 are both minimum specs, and t1 <= t1 for PIO modes 0–2, and t1 >= t1 for PIO modes 3–4, t1 is used
to count both, by loading in an initial value that depends on the PIO mode being used. This is the responsibility of
software.
2. Since t3 (WDATA setup time) is a minimum, and t3 <= t2 for all PIO modes, t2 is used to determine when to drive
Write_Data on DD.
3. Since t4 and t9 are both minimum specs, and t4 >= t9 for all PIO modes, t4 is used to count from DIOR/DIOW negate
to CS[1]FX/CS[3]FX/ADDR negate.
If ATA drive address space is hit by microprocessor, the ATA IPBI module generates:
• a signal to enable the PIO mode state machine
• a wait state to the IPBI module to hold off any further IPBI module access
The PIO state machine indicates transfer is in progress to the IPBI module. This extends the transfer wait to the IPBI module until the PIO
transaction is complete.
SA[2:0] O Address—3-bit address, when combined with the two chip-selects, CS1FX and CS3FX, is
used to address Control and Command Block Registers in an ATA drive controller (DA2,
DA1 and DA0 on ATA cable, respectively).
IOW O I/O Write—Active low signal that denotes a WRITE transaction (DIOW on ATA cable).
IOR O I/O Read—Active low signal that denotes a READ transaction (DIOR on ATA cable).
ATA_ISOLATION O ATA Write Enable to allow sharing of the ATA DD bus with PCI Bus.
Note:
1. NC=No Connection
GND
DD[15:0] 33 Ohms ATA_DATA[15:0]
GND
KEY
DMARQ 82 Ohms ATA_DRQ
GND
DIOW:STOP 22 Ohms ATA_IOW
GND
DIOR:HDMARDY:HSTROBE 22 Ohms ATA_IOR
GND
IORDY:DDMARDY:DSTROBE 82 Ohms ATA_IOCHRDY
CSEL
DMACK 22 Ohms ATA_DACK
GND
INTRQ 82 Ohms ATA_INTRQ
Reserved
22 Ohms ATA_SA[1]
DA[1]
PDIAG
22 Ohms ATA_SA[0]
DA[0]
22 Ohms ATA_SA[2]
DA[2]
22 Ohms ATA_CS[1]FX(CS[4])
CS[0]
22 Ohms ATA_CS[3]FX(CS[5])
CS[1]
DASP
GND
Pin 40
2 GND — — — —
19 GND — — — —
22 GND — — — —
24 GND — — — —
26 GND — — — —
28 CSEL — NC — —
30 GND — — — —
32 Reserved — — — —
34 PDIAG — NC — —
39 DASP — NC — —
40 GND — — — —
NOTE
MPC5200 provides the ATA_ISOLATION output signal. This signal is shared with the A22 output
of the LocalPlus Most/Graphics mode.
The ATA_ISOLATION is not a signal defined by the ATA Standard. It is provided to support an external ATA transceiver. ATA_ISOLATION
is an active high signal to control external transceiver devices and to ‘isolate’ the ATA bus from the LocalPlus (shared) bus.
It can force the transceiver direction "MPC5200 -> disk drive". Only during an ATA read is this signal allowed to go low, forcing tranceiver
direction "disk drive ->MPC5200".
The ATA_ISOLATION should be connected to the Direction input of the transceiver.
• High = Write to drive
• Low = Read from drive
HOST DEVICE
CS[0], CS[1] Chip Select to select Command Block registers.
DIOW:STOP DIOW → Asserted by host to write drive registers or data ports. Negated by host before initiation of UDMA.
STOP → Negated by host before UDMA burst. Assertion by host signals termination of UDMA.
DMACK Host response to DMARQ by drive to initiate DMA transfers.
DMARQ Asserted by drive for DMA data transfers from/to host. For multiword DMA, data direction is
controlled by DIOR and DIOW. MARQ is negated by drive when DMACK is received from
host.drivere-asserts DMARQ for more DMA transfers.
INTRQ INTRQ used by selected drive to interrupt host. If (nIEN bit == 0 && drive is selected),
INTRQ must be enabled through tri-state and must be driven asserted or negated.
If (nIEN == 1 || drive is not selected), INTRQ = 1'bz.
When INTRQ asserted, drive must negate it within 400ns of negation of DIOR that reads
STATUS register or within 400ns of negation of DIOW that writes the COMMAND register.
When drive is selected by writing to Device/Head register and interrupt is pending, INTRQ
must be asserted within 400ns of negation of DIOW that writes the Device/Head register.
When drive is de-selected by writing to Device/Head register and interrupt is pending, INTRQ
must be negated within 400ns of negation of DIOW that writes the Device/Head register.
IORDY:DDMARDY:DSTROBE IORDY is negated by drive to extend host transfer cycle (read or write) for PIO modes 3 and above.
DDMARDY → drive ready to receive UDMA data out bursts. Negated to pause.
DSTROBE → drive signal from UDMA data in bursts. Data latched in host registers from
DD[15:0] on both edges of DSTROBE. Drive stops generating DSTROBE edges to pause.
PDIAG:CBLID PDIAG → is asserted by drive 1 to indicate to drive 0 that it has completed diagnostics.
CBLID → Host may sample CBLID after Power-ON or hardware reset is completed for all drives on
the cable, to detect presence or absence of 80 conductor cable. If CBLID is detected as connected
to ground then 80-conductor cable is present.
If drive 1 is present, Host should issue IDENTIFY DEVICE or IDENTIFY PACKET DEVICE
and use returned data to determine if drive is compliant with ATA-3 or subsequent standards.
Drives compliant with ATA-3 or above, release PDIAG no later than after the first command
following a Power-ON or hardware reset sequence.
11.7.1 Terminology
The most popular interface used in modern hard disks is the Integrated Drive Electronics (IDE) interface, also known by various other names
such as: ATA, EIDE, ATA-2, Fast ATA, Ultra ATA, etc.
• Western Digital ® used the term IDE when they first integrated the drive controller logic board on the disk drive.
• Quantum ® and Seagate ® used the term ATA (Advanced Technology Attachment) or AT-Attachment, because it has a 16-bit data
interface like original AT machines.
ATA is the interface name adopted by the American National Standards Institute (ANSI). Thus far, ANSI has published ATA, ATA-2, ATA-3
and ATA-4 interfaces. More work is underway for ATA-5 and future extensions of the ATA interface. Table 11-35 summarizes the different
ATA standards.
MPC5200 is compliant with the latest officially published ANSI ATA-4 interface.
ATA-2 ANSI 0,1,2,3,4 Single word—0,1,2 Block transfers, logical block addressing,
Multiword—0,1,2 improved identify drive command
ATA-3 Unofficial 0,1,2,3,4 Single word—0,1,2 Same as ATA-2, plus improved reliability, SMART
Multiword—0,1,2
ATAPI ANSI 0,1,2,3,4 Single word—0,1,2 Support for non-hard-disk devices CD-ROM,
Multiword—0,1,2 Tape drives, etc.
EIDE Marketing 0,1,2,3,4 Single word—0,1,2 Same as ATA-2, plus ATAPI and dual host
Multiword—0,1,2 adapters
ATA-4 ANSI 0,1,2,3,4 Multiword—0,1,2 Same as ATA-3, Single word DMA retired
Ultra DMA—0,1,2
Address Function
Note:
1. LBA mode register mapping—system addresses are for a single channel, accommodating two drives only.
Notes
1. LBA mode is only available in ATA-2 or later specifications.
2. A block mode exists (not to be confused with logical block addressing), in which sectors are grouped into a unit, called a block,
for purposes of data transfer. The number of sectors is set with SET MULTIPLE MODE command and is used by the READ
MULTIPLE and WRITE MULTIPLE commands. When specifying sectors within a block, either CHS or LBA mode may be used.
GAP1 VFO Sync Header Write Splice VFO Sync 512 Bytes data ECC GAP3
Read Read
Drive Sector Sector
DRDY
BSY
DRQ
INTRQ
Write Write
Drive Sector Sector
DRDY
BSY
DRQ
INTRQ
Execute Execute
Drive Command Command
DRDY
BSY
DRQ
INTRQ
Figure 11-7. Timing Diagram—Non-Data Command (Class 3)
3. Write command code 0xEF to command register to execute SET FEATURES command. This sets the data transfer protocol to
multiword DMA with desired mode.
Data transfers into DMA differ from a PIO transfer in that:
• Data is transferred using the DMA channel.
• A single interrupt is issued at command completion.
The Host initializes the DMA channel prior to issuing DMA mode commands. The drive asserts an interrupt when data transfer is complete.
The DMA command protocol is as follows:
1. HOST: Read status or alternate status register until BSY and DRQ are both 0. (ATA-4, 41, 48).
2. HOST: Write device/head register with appropriate DEV bit value to select drive. (ATA-4, 45).
3. HOST: Wait 400 ns, read status or alternate status register until BSY & DRQ are set to 0. The required drive is then assured to be
selected.
4. HOST: Write required command parameters to the features, sector count, sector number, cylinder high, cylinder low, and
device/head registers. (ATA-4, chapter 7).
5. HOST: Write command code to command register for drive to start processing command using parameters from the command
block registers. (ATA-4, 41).
6. DRIVE: If no drive error exists, set BSY=1 and begin processing command.
7. HOST: Wait 400ns, read status or alternate status register to ensure valid contents.
8. DRIVE: Set BSY=1 or BSY=0 && DRQ=1.
9. DRIVE: Assert DMARQ when ready, transfer data per multiword DMA timing or ultra DMA protocol.
10. HOST: Assert DMACK, negate CS [0] and CS [1] when ready to transfer data per multiword DMA timing or ultra DMA
protocol. Transfers are 16-bit wide from the data port. DMA data out (drive→host) transfers are processed by a series of reads to
the data port. Each read transfers the data that follows the previous read. DMA in data (host→drive) transfers are processed by a
series of writes to this port. Each write transfers the data that follows the previous write. Results are indeterminate if data port is
written during a DMA data out or data port is read during a DMA data in transfers.
11. DRIVE: Negate DMARQ when transfer is complete.
12. DRIVE: Set error status in error register if error exists.
13. DRIVE: Clear BSY and DRQ.
14. DRIVE: Assert INTRQ if Host has enabled nIEN (set to 0) in command control register. This register is written by the host to
enable interrupt from the drive by clearing nIEN bit to 0. INTRQ is in a high impedance state if nIEN bit is set to 1.
When host sets command control register bit SRST to 1, software can reset selected drive. However, the command control register must be
written while DMACK is not asserted. Bit 0 must be cleared to 0.
1. HOST: To clear pending interrupt, read status register (regardless of nIEN status).
2. DRIVE: If enabled by nIEN (nIEN = 0), negate INTRQ.
3. DMA command completes.
Table 11-38. DMA Command Parameters
START
Yes
Drive: No
Transfer
Done
Host: Write Device/Head
register to select drive
Yes
Yes
Host: No
BSY = 0 & Drive: Set error status
DRQ = 0
Yes
Drive: Clear BSY = 0 and DRQ = 0
Drive: Yes
Error
Drive: Negate INTRQ
No
END
Drive: Set BSY = 1, or
BSY = 0 & DRQ = 1
Set Up
Host Set Up Reset Reset
Command Carry out DMA
DMA DMA Status
/Registers
DRDY
UNDEFINED
BSY UNDEFINED
IEN
NOTE
Ultra DMA mode 2 (UDMA2) requires that the ipb_clk speed is at least 66MHz.
Table 11-39 lists the redefined ultra DMA protocol signal lines. These lines provide new functions during the ultra DMA mode. At termination
of an ultra DMA burst, the host negates DMACK and the lines revert to the definitions used for non-ultra DMA transfers.
Table 11-39. Redefinition of Signal Lines for Ultra DMA Protocol
DIOR HDMARDY Host DMA ready during Ultra DMA data in bursts
HSTROBE Host data strobe during Ultra DMA data out bursts
IORDY DDMARDY Drive DMA ready during Ultra DMA data out bursts
Both the host and drive do a CRC function during an ultra DMA burst:
• The host sends CRC data to the drive.
• The drive does a CRC data comparison.
If the CRC comparison fails, the error register ERR bit is set. The drive always reports the first error that occurs.
tM
RESET
DASP
Control
Registers
tN
BSY
Drive 1 tQ
tP
PDIAG
tS
tR Drive 1
DASP
Notes
Chapter 12
Universal Serial Bus (USB)
12.1 Overview
The following sections are contained in this document:
• Section 12.2, Data Transfer Types
• Section 12.4, Host Control (HC) Operational Registers, includes:
— Section 12.4.2, Control and Status Partition—MBAR + 0x1000
— Section 12.4.3, Memory Pointer Partition—MBAR + 0x1018
— Section 12.4.4, Frame Counter Partition—MBAR + 0x1034
— Section 12.4.5, Root Hub Partition—MBAR + 0x1048
The Universal Serial Bus (USB) is an external bus standard that supports data transfer rates of 12Mbps. Figure 12-1 shows the four main
areas of a USB system, which are:
• Client software/USB driver—software implemented
• Host Controller Driver (HCD)—software implemented
• Host Controller (HC)—hardware implemented
• USB device—hardware implemented
Client Software
USB Driver
Software
Scope of OHCI
Host Controller
Hardware
USB Device
The Open Host Controller Interface (OHCI) is a register-level description of a HC for the Universal Serial Bus (USB). OHCI specifies the
interface between and the fundamental HCD operation and the HC.
The HCD and HC work in tandem to transfer data between client software and a USB device. Data is translated from shared-memory data
structures at the client software end, to USB signal protocols at the USB device end, and vice-versa.
• Bulk Transfers—Non-periodic data transfers used to communicate large amounts of information between client software and the
USB device.
In OpenHCI the data transfer types are classified into two categories: periodic and nonperiodic. Periodic transfers are interrupt and
isochronous since they are scheduled to run at periodic intervals. Non-periodic transfers are control and bulk since they are not scheduled to
run at any specific time, but rather on a time-available basis.
Device Enumeration
OpenHCI
Operational
Registers Host Controller Communications Area
Mode Interrupt 0
HCCA Interrupt 1
Status Interrupt 2
. . .
Event
Interrupt 31
Frame Int
. . .
Ratio
Control
Bulk
. . .
Done
Device Register in
Shared RAM
Memory Space
completion status codes. Each transfer descriptor contains information that describes one or more data packets. The data buffer for each
transfer descriptor ranges in size from 0 to 8192Bytes with a maximum of one physical page crossing. Transfer descriptors are linked in a
queue; the first one queued is the first one processed.
Each data transfer type has its own linked list of endpoint descriptors to be processed. Figure 12-3 shows the data structure relationship.
Head Ptr ED ED ED ED
TD TD TD TD
TD TD
TD
The head pointers to the bulk and control endpoint descriptor lists are maintained within the operational registers in the HC. The HCD
initializes these pointers prior to the HC gaining access to them. Should these pointers need to be updated, the HCD may need to stop the HC
from processing the specific list, update the pointer, then re-enable the HC.
The head pointers to the interrupt endpoint descriptor lists are maintained within the HCCA. There is no separate head pointer for isochronous
transfers. The first isochronous endpoint descriptor simply links to the last interrupt endpoint descriptor. There are 32 interrupt head pointers.
The head pointer used for a particular frame is determined by using the last five bits of the frame counter as an offset into the interrupt array
within the HCCA.
The interrupt endpoint descriptors are organized into a tree structure with the head pointers being the leaf nodes. The desired interrupt endpoint
polling rate is achieved by scheduling the endpoint descriptor at the appropriate depth in the tree. The higher the polling rate, the closer to the
root of the tree the endpoint descriptor is placed. Figure 12-4 shows the interrupt endpoint structure. The Interrupt endpoint descriptor
placeholder indicates where zero or more endpoint descriptors may be queued. The numbers on the left are the index into the HCCA interrupt
head pointer array.
0
16
8
24
4 Interrupt
20 Endpoint
12 Descriptor
28 Placeholder
2
18
10
26
6
22
Interrupt 14
Headpointers 30
1
17
9
25
5
21
13
29
3
19
11
27
7
23
15
31
32 16 8 4 2 1
Figure 12-5 shows a sample interrupt endpoint schedule. The schedule shows:
• two endpoint descriptors at a 1ms poll interval
• two endpoint descriptors at a 2ms poll interval
• one endpoint descriptor at a 4ms poll interval
• two endpoint descriptors at an 8ms poll interval
• two endpoint descriptors at a 16ms poll interval
• two endpoint descriptors at a 32ms poll interval.
NOTE
Unused interrupt endpoint placeholders are bypassed and the link is connected to the next available
endpoint in the hierarchy.
0
16
8
24
4
20 Interrupt
12 Endpoint
28 Descriptor
2
18
10
26
6
22
Interrupt 14
Headpointers 30
1
17
9
25
5
21
13
29
3
19
11
27
7
23
15
31
32 16 8 4 2 1
Endpoint Poll Interval (ms)
Figure 12-5. Sample Interrupt Endpoint Schedule
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved REV
RESET: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0:23 – Reserved
24:31 REV Revision—a read-only field containing the BCD representation of the HCI specification
version implemented by this HC. For example, a value of 11h corresponds to version 1.1. All
HC implementations compliant with this specification have a value of 10h.
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:20 — Reserved
21 RWE RemoteWakeUpEnable—HCD uses bit to enable or disable the remote WakeUp feature on
detection of upstream resume signaling.
When this bit is set and the ResumeDetected bit in HcInterruptStatus is set, a remote
WakeUp is signaled to the host system. Setting this bit has no impact on the generation of
hardware interrupt.
29 PLE PeriodicListEnable—setting bit enables periodic list processing in next Frame. If cleared by
HCD, periodic list processing does not occur after the next SOF. HC checks this bit prior to
starting list processing.
30:31 CBSR ControlBulkServiceRatio—field specifies the service ratio between Control and Bulk EDs.
Before processing non-periodic lists, HC compares the ratio specified with its internal count
on how many non-empty Control EDs have been processed, in determining whether to
continue serving another Control ED or switching to Bulk EDs. When crossing the frame
boundary, the internal count is retained. In case of reset, HCD is responsible for restoring
this value.
CBSR=Number of Control EDs Over Bulk EDs Served
0=1:1
1=2:1
2=3:1
3=4:1
R Reserved SOC
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:13 — Reserved
14:15 SOC SchedulingOverrunCount—bits are incremented on each scheduling overrun error. SOC is
initialized to 00 and wraps at 11. SOC increments when a scheduling overrun is detected,
even if SchedulingOverrun in HcInterruptStatus has already been set. HCD uses SOC to
monitor any persistent scheduling problems.
16:27 — Reserved
29 BLF BulkListFilled—bit indicates whether there are Bulk List TDs. HCD sets this bit when it adds
a TD to a Bulk List ED. When HC begins processing the Bulk List head, it checks BF.
• If BLF is 0, HC does not start Bulk List processing.
• If BLF is 1, HC starts Bulk List processing and sets BF to 0.
• If HC finds a Bulk List TD, HC sets BLF to 1, causing Bulk List processing to continue.
• If HC does not find a Bulk List TD and HCD does not set BLF, then BLF remains 0 when
HC completes processing and Bulk List processing stops.
30 CLF ControlListFilled—bit indicates whether there are Control List TDs. HCD sets this bit when
it adds a TD to a Control List ED. When HC begins processing the Control List head, it checks
CLF.
• If CLF is 0, HC does not start Control List processing.
• If CF is 1, HC starts Control List processing and sets CLF to 0.
• If HC finds a Control List TD, CLF is set to 1, causing Control List processing to continue.
• If HC does not find a Control List TD and HCD does not set CLF, then CLF remains 0
when HC completes processing and Control List processing stops.
31 HCR HostControllerReset—HCD sets bit to initiate a software reset of HC. Regardless of the HC
functional state, it moves to the USBSUSPEND state in which most of the operational
registers are reset except those stated otherwise. For example, HcControl Interrupt Routing
field and no Host bus access is allowed.
On completion of the reset operation, HC clears this bit. Completion must be within 10ms.
When set, this bit should not cause a root hub reset and no subsequent reset signaling
should be asserted to downstream ports.
R Rsvd OC Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 — Reserved
2:24 — Reserved
26 FNO FrameNumberOverflow—bit is set when HcFmNumber msb (bit 15) changes value (from 0 to
1, or from 1 to 0) and after HccaFrameNumber is updated.
27 UE UnrecoverableError—bit is set when HC detects a system error not related to USB. HC should
not proceed with processing or signaling prior to the system error being corrected. HCD clears
this bit after HC is reset.
31 SO SchedulingOverrun—bit is set when USB schedule for the current Frame overruns and after
an HccaFrameNumber update. A scheduling overrun also causes the HcCommandStatus
SOC to increment.
R MIE OC Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 OC OwnershipChange
Ignore
Enable interrupt generation due to ownership change
2:24 — Reserved
25 RHSC RootHubStatusChange
Ignore
Enable interrupt generation due to root hub status change.
26 FNO FrameNumberOverflow
Ignore
Enable interrupt generation due to frame number overflow.
27 UE UnrecoverableError
Ignore
Enable interrupt generation due to unrecoverable error.
28 RD ResumeDetected
Ignore
Enable interrupt generation due to resume detect.
29 SF StartofFrame
Ignore
Enable interrupt generation due to start of frame.
30 WDH WritebackDoneHead
Ignore
Enable interrupt generation due to HcDoneHead writeback.
31 SO SchedulingOverrun
Ignore
Enable interrupt generation due to scheduling overrun.
R MIE OC Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 OC OwnershipChange
Ignore
Disable interrupt generation due to Ownership Change
2:24 — Reserved
25 RHSC RootHubStatusChange
Ignore
Disable interrupt generation due to root hub status change.
26 FNO FrameNumberOverflow
Ignore
Disable interrupt generation due to frame number overflow.
27 UE UnrecoverableError
Ignore
Disable interrupt generation due to unrecoverable error.
28 RD ResumeDetected
Ignore
Disable interrupt generation due to resume detect.
29 SF StartofFrame
Ignore
Disable interrupt generation due to start of frame.
30 WDH WritebackDoneHead
Ignore
Disable interrupt generation due to HcDoneHead writeback.
31 SO SchedulingOverrun
Ignore
Disable interrupt generation due to scheduling overrun.
R HCCA
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R HCCA Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
24:31 — Reserved
R PCED
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R PCED Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:27 PCED PeriodCurrentED—HC uses this field to point to the head of one of the Periodic lists, which is
processed in the current Frame. HC updates register content after a periodic ED is processed.
HCD may read the content in determining which ED is currently being processed at the time
of reading.
28:31 — Reserved
R CHED
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R CHED Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:27 CHED ControlHeadED—HC traverses the control list starting with the HcControlHeadED pointer.
Content is loaded from HCCA during HC initialization.
28:31 — Reserved
R CCED
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R CCED Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:27 CCED ControlCurrentED—pointer is advanced to next ED after serving the present one. HC
continues processing the list from where it left off in the last frame. When it reaches the control
list end, HC checks the HcCommandStatus ControlListFilled.
• If set, CCED copies HcControlHeadED content to HcControlCurrentED and clears bit.
• If not set, it does nothing.
HCD is allowed to modify this register only when the ControlListEnable of HcControl is cleared.
When set, HCD only reads the instantaneous value of this register. Initially, this is set to 0 to
indicate the end of the Control List.
28:31 — Reserved
R BHED
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R BHED Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:27 BHED BulkHeadED—HC traverses the Bulk List starting with the HcBulkHeadED pointer. The
content is loaded from HCCA during the HC initialization.
28:31 — Reserved
R BCED
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R BCED Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:27 BHED BulkCurrentED—advances to the next ED after HC has served the present ED.
HC continues processing the list from where it left off in the last Frame. When it reaches the end
of the Bulk List, HC checks the HcCommandStatus BulkListFilled.
• If set, BHED copies HcBulkHeadED content to HcBulkCurrentED and clears bit.
• If not set, it does nothing.
HCD is only allowed to modify this register when HcControl BulkListEnable is cleared. When
set, HCD only reads the instantaneous value of this register. This is initially set to 0 to indicate
the end of the Bulk List.
28:31 — Reserved
R DH
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R DH Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
28:31 — Reserved
R FIT FSMPS
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved FI
RESET: 0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 1
0 FIT FrameIntervalToggle—HCD toggles this bit when it loads a new value to the frame interval.
1:15 FSMPS FSLargestDataPacket—specifies a value that is loaded into the largest data packet counter at
the beginning of each frame. The counter value represents the largest amount of data in bits
that the HC can send or received in a single transaction at any given time without causing
scheduling overrun. HCD calculates this field value.
16:17 — Reserved
18:31 FI FrameInterval—specifies the bit-time interval between two consecutive SOFs. Nominally, this
value is set to 11,999. HCD should store the field’s current value before resetting HC. Setting
the HcCommandStatus HostControllerReset field causes the HC to reset this field to its
nominal value. HCD may choose to restore the stored value when the reset sequence
completes.
R FRT Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved FR
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1:17 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R FN
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 — Reserved
This register has a 14-bit programmable value that determines when is the earliest time HC should start processing the periodic list.
Table 12-17. USB HC Periodic Start Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved PS
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:17 — Reserved
18:31 PS PeriodicStart—field is cleared after a hardware reset. PS is then set by HCD during HC
initialization. PS value is calculated roughly as 10% off from HcFmInterval. A typical value is
3E67.
When HcFmRemaining reaches the value specified, processing of periodic lists has priority
over Control/Bulk processing. HC then starts processing the Interrupt list after completing the
current Control or Bulk transaction in progress.
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved LST
RESET: 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0
0:19 — Reserved
20:31 LST LSThreshold—field contains a value which is compared to the FrameRemaining field prior to
initiating a low speed transaction. The transaction is started only if FrameRemaining is greater
than or equal to this field. HCD calculates this value with the consideration of transmission and
setup overhead.
R POTPGT Reserved
RESET: 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0
0:7 POTPGT PowerOnToPowerGoodTime—specifies the duration HCD must wait before accessing a Root
Hub powered-on port. POTPGT is implementation-specific.
The time unit is 2ms. Duration is calculated as POTPGT x 2ms.
8:18 — Reserved
19 NOCP NoOverCurrentProtection—describes how the Root Hub port overcurrent status is reported.
When NOCP is cleared, OCPM specifies global or per-port reporting.
0 = Overcurrent status is reported collectively for all downstream ports.
1 = No overcurrent protection supported.
20 OCPM OverCurrentProtectionMode—describes how the Root Hub port overcurrent status is
reported.
At reset, OCPM should reflect the same mode as PowerSwitchingMode. OCPM is valid only
if NoOverCurrentProtection is cleared.
0 = Overcurrent status is reported collectively for all downstream ports.
1 = Overcurrent status is reported on a per-port basis.
21 DT DeviceType—specifies Root Hub is not a compound device. Root Hub is not permitted to be
a compound device. DT should always read/write 0.
23 PSM PowerSwitchingMode—specifies how the root hub port power switching is controlled. PSM is
implementation-specific and is only valid if the NoPowerSwitching field is cleared.
0 = All ports are powered at the same time.
1 = Each port is powered individually. This mode lets port power be controlled by either the
global switch or per-port switching.
• If PortPowerControlMask bit is set, port responds only to port power commands
(Set/ClearPor tPower).
• If port mask is cleared, port is controlled only by the global power switch
(Set/ClearGlobalPower).
24:31 NDP NumberDownstreamPorts—specifies the number of downstream ports supported by the Root
Hub. NDP is implementation-specific.
• Minimum number of ports is 1.
• Maximum number of ports (supported by OpenHCI) is 15.
R PPCM
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R DR
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 PPCM PortPowerControlMask—each bit indicates whether a port is affected by a global power
control command when PSM is set.
• When set, port power state is only affected by per-port power control
(Set/ClearPortPower).
• When cleared, port is controlled by the global power switch
(Set/ClearGlobalPower).
If device is configured to Global Switching Mode (PSM=0), this field is not valid.
bit 0—Reserved
bit 1—Ganged-power mask on Port #1
bit 2—Ganged-power mask on Port #2
…
bit15—Ganged-power mask on Port #15
16:31 DR NDeviceRemovable—each bit is dedicated to a Root Hub port. When cleared, the attached
device is removable. When set, the attached device is not removable.
bit 0—Reserved
bit 1—Device attached to Port #1
bit 2—Device attached to Port #2
…
bit15—Device attached to Port #15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1:13 — Reserved
14 OCIC OverCurrentIndicatorChange—is set by hardware when a change occurs to the OCI field of
this register.
• Writing 1 causes HCD to clear this bit.
• Writing 0 has no effect.
15 LPSC LocalPowerStatusChange (read)—Root Hub does not support the local power status feature.
Thus, this bit is always read as 0.
SetGlobalPower (write)
• In global power mode (PSM=0), LPSC is written to 1 to turn on power to all ports (clear
PortPowerStatus).
• In per-port power mode, LPSC sets PortPowerStatus only on ports whose PPCM bit is not
set.
Writing 0 has no effect.
17:29 — Reserved
31 LPS LocalPowerStatus—Root Hub does not support the local power status feature. This bit is
always read as 0 (write) ClearGlobalPower.
In global power mode (PSM=0), bit is written to 1 to turn off power to all ports (clear
PortPowerStatus).
In per-port power mode, bit clears PortPowerStatus only on ports whose PPCM bit is not
set.
Writing 0 has no effect.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0:10 — Reserved
11 PRSC PortResetStatusChange—bit is set at the end of the 10ms port reset signal.
• Writing 1 causes HCD to clear this bit.
• Writing 0 has no effect.
0 = Port reset not complete
1 = Port reset complete
13 PSSC PortSuspendStatusChange—bit is set when the full resume sequence completes. Sequence
includes a 20s resume pulse, LS EOP, and 3ms resychronization delay.
• Writing 1 causes HCD to clear this bit.
• Writing 0 has no effect.
This bit is also cleared when ResetStatusChange is set.
0 = Resume not complete
1 = Resume complete
14 PESC PortEnableStatusChange—bit is set when hardware events cause the PES bit to be cleared.
Changes from HCD writes do not set this bit.
• Writing 1 causes HCD to clear this bit.
• Writing 0 has no effect.
0 = No change in PES
1 = Change in PES
16:21 — Reserved
22 LSDA LowSpeedDeviceAttached (read)—bit indicates the speed of the device attached to this port.
0 = Full speed device attached
1 = Low speed device attached
This field is valid only when CurrentConnectStatus is set.
ClearPortPower (write)
• Writing 1 causes HCD to clear the PortPowerStatus bit.
• Writing 0 has no effect.
23 PPS PortPowerStatus (read)—bit reflects the port power status, regardless of the type of power
switching implemented.
If an overcurrent condition is detected, this bit is cleared. HCD sets this bit by writing
SetPortPower or SetGlobalPower. HCD clears this bit by writing ClearPortPower or
ClearGlobalPower. Which power control switches are enabled is determined by
PowerSwitchingMode and PortPortControlMask[NDP].
In global switching mode (PSM=0), only Set/ClearGlobalPower controls this bit.
In per-port power switching (PSM=1), if the PortPowerControlMask[NDP] bit for the port is
set, only Set/ClearPortPower commands are enabled.
If the mask is not set, only Set/ClearGlobalPower commands are enabled.
If port power is disabled, CurrentConnectStatus, PortEnableStatus, PortSuspendStatus, and
PortResetStatus should be reset.
0 = Port power is off
1 = Port power is on
SetPortPower (write)
• Writing causes HCD to set the PortPowerStatus bit.
• Writing 0 has no effect.
If power switching is not supported, this bit always reads ‘1b’.
24:26 — Reserved
27 PRS PortResetStatus (read)—When this bit is set by a write to SetPortReset, port reset signaling
is asserted. When reset is completed, this bit is cleared when PortResetStatusChange is set.
This bit cannot be set if CurrentConnectStatus is cleared.
0 = Port reset signal is not active
1 = Port reset signal is active
SetPortReset (write)
• Writing 1 causes HCD to set port reset signaling.
• Writing 0 has no effect.
If CurrentConnectStatus is cleared, a write does not set PortResetStatus. Instead, it sets
ConnectStatusChange. This notifies the driver that an attempt was made to reset a
disconnected port.
28 POCI PortOverCurrentIndicator (read)—bit is only valid when root hub is configured in such a way
that overcurrent conditions are reported on a per-port basis.
If per-port overcurrent reporting is not supported, this bit is set to 0.
If cleared, all power operations are normal for this port.
If set, an overcurrent condition exists on this port. This bit always reflects the overcurrent input
signal
0 = No overcurrent condition.
1 = Overcurrent condition detected.
ClearSuspendStatus (write)
• Writing 1 causes HCD to initiate a resume.
• Writing 0 has no effect.
A resume is initiated only if PSS is set.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:10 — Reserved
11 PRSC PortResetStatusChange—bit is set at the end of the 10ms port reset signal.
• Writing 1 causes HCD to clear this bit.
• Writing 0 has no effect.
0 = Port reset not complete
1 = Port reset complete
13 PSSC PortSuspendStatusChange—bit is set when the full resume sequence completes. Sequence
includes a 20s resume pulse, LS EOP, and 3ms resychronization delay.
• Writing 1 causes HCD to clear this bit.
• Writing 0 has no effect.
This bit is also cleared when ResetStatusChange is set.
0 = Resume not complete
1 = Resume complete
14 PESC PortEnableStatusChange—bit is set when hardware events cause the PES bit to be cleared.
Changes from HCD writes do not set this bit.
• Writing 1 causes HCD to clear this bit.
• Writing 0 has no effect.
0 = No change in PES
1 = Change in PES
16:21 — Reserved
22 LSDA LowSpeedDeviceAttached (read)—bit indicates the speed of the device attached to this port.
0 = Full speed device attached
1 = Low speed device attached
This field is valid only when CurrentConnectStatus is set.
ClearPortPower (write)
• Writing 1 causes HCD to clear the PortPowerStatus bit.
• Writing 0 has no effect.
23 PPS PortPowerStatus (read)—bit reflects the port power status, regardless of the type of power
switching implemented.
If an overcurrent condition is detected, this bit is cleared. HCD sets this bit by writing
SetPortPower or SetGlobalPower. HCD clears this bit by writing ClearPortPower or
ClearGlobalPower. Which power control switches are enabled is determined by
PowerSwitchingMode and PortPortControlMask[NDP].
In global switching mode (PSM=0), only Set/ClearGlobalPower controls this bit.
In per-port power switching (PSM=1), if the PortPowerControlMask[NDP] bit for the port is
set, only Set/ClearPortPower commands are enabled.
If the mask is not set, only Set/ClearGlobalPower commands are enabled.
If port power is disabled, CurrentConnectStatus, PortEnableStatus, PortSuspendStatus, and
PortResetStatus should be reset.
0 = Port power is off
1 = Port power is on
SetPortPower (write)
• Writing causes HCD to set the PortPowerStatus bit.
• Writing 0 has no effect.
If power switching is not supported, this bit always reads ‘1b’.
24:26 — Reserved
27 PRS PortResetStatus (read)—When this bit is set by a write to SetPortReset, port reset signaling
is asserted. When reset is completed, this bit is cleared when PortResetStatusChange is set.
This bit cannot be set if CurrentConnectStatus is cleared.
0 = Port reset signal is not active
1 = Port reset signal is active
SetPortReset (write)
• Writing 1 causes HCD to set port reset signaling.
• Writing 0 has no effect.
If CurrentConnectStatus is cleared, a write does not set PortResetStatus. Instead, it sets
ConnectStatusChange. This notifies the driver that an attempt was made to reset a
disconnected port.
28 POCI PortOverCurrentIndicator (read)—bit is only valid when root hub is configured in such a way
that overcurrent conditions are reported on a per-port basis.
If per-port overcurrent reporting is not supported, this bit is set to 0.
If cleared, all power operations are normal for this port.
If set, an overcurrent condition exists on this port. This bit always reflects the overcurrent input
signal
0 = No overcurrent condition.
1 = Overcurrent condition detected.
ClearSuspendStatus (write)
• Writing 1 causes HCD to initiate a resume.
• Writing 0 has no effect.
A resume is initiated only if PSS is set.
Notes
Chapter 13
BestComm
13.1 Overview
The following sections are contained in this document:
• Section 13.2, BestComm Functional Description
• Section 13.12, BestComm DMA Registers—MBAR+0x1200
• Section 13.13, On-Chip SRAM
BestComm provides an efficient, integrated approach to gathering and manipulating data sets from a broad range of communication interfaces.
BestComm consists of:
• BestComm (based on the SmartDMA [SDMA] module), with interfaces to:
— peripherals using the CommBus,
— the processor using an IP bus,
— the system main SDRAM via the processor bus interface (XLB),
• a defined set of communication-oriented peripherals,
• local buffer memory,
• standard bus interfaces.
The Direct Memory Access controller (DMA) module provides a flexible and efficient means to move blocks of data within the system. The
DMA controller reduces the workload on the microprocessor, allowing it to continue execution of system software. The DMA microcode
engine is tailored to efficiently transfer data across the internal bus architecture to memory and peripheral devices.
The DMA controller processes microcode tasks that are stored in local memory (SRAM 16 kBytes). A task is a sequence of instructions,
referred to as descriptors, that specifies a series of data movements or manipulations. The DMA controller steps through the descriptors and
executes the specified function in a similar fashion to a CPU executing a program.
For the MPC5200, BestComm consists of SDMA and the following peripheral interfaces:
• 10/100 Fast Ethernet Controller (FEC)
• I2C
• PCI
• ATA
• LocalPlus
• Peripheral Serial Controller (implementing a different mix of functionalities such as SPI, UART, CODEC 8-16-32 bits, AC97
controller, I2S, IrDA controller)
Many of the peripherals’ port pins serve multiple functions, allowing flexibility in optimizing the system to meet a specific set of integration
requirements. For a description of the pin multiplexing scheme and supported functions, refer to Chapter 2, Signal Descriptions.
Other peripheral functions are included in MPC5200, but are not directly supported by BestComm. These peripherals include:
• A separate Serial Peripheral Interface (SPI), which:
— supports a 6.25MHz rate as a master
— supports a 12.5MHz rate as a slave
• USB Host/Hub controller
• MSCAN controller
• General Purposes Timers
BestComm DMA can control data movement on the following peripherals and interfaces:
• PCI bus
• ATA Controller
• Ethernet
• PSC
• I2C
• IrDA
• LP bus interface
BestComm DMA performs general purpose DMA transfers. Most data transactions are between the peripheral/interface (typically a FIFO)
and the system SDRAM.
BestComm allows up to 16 tasks to run simultaneously under the control of up to 32 DMA hardware requestors, user selectable from a possible
64 DMA request sources.
A hardware logic unit capable of basic logic operations (boolean arbitrary operations, shift, byte swap) plus some precoded CRC (CRC-16,
CRC-CCITT, CRC-32, Internet Checksum) is also integrated in the SDMA engine.
BestComm uses internal buffers to prefetch reads and post writes such that bursting is used whenever possible. This optimizes both internal
and external bus activity.
Speculative reads from system SDRAM may also be enabled to increase performance.
FIFO interfaces are implemented between the DMA and each peripheral/interface. As FIFOs are filled or emptied, automatic requests are
made to the DMA unit. Based on programmable water mark levels (called ALARM and GRANULARITY level), the DMA unit moves data
to and from the FIFOs. This method insures uninterrupted data movement at the given peripheral/interface rate.
13.4 Descriptors
The DMA controller interprets a series of descriptors that specifies a sequence of data movements and manipulations. A collection of these
descriptors is much like a program. The two types of descriptors are Loop Control Descriptors (LCDs) and Data Routing Descriptors (DRDs).
These descriptors allow a “for”-loop programming style for the SDMA engine.
The LCDs specify the index variables (memory pointers, byte counters, etc.) along with the termination and increment values, while the DRDs
specify the nature of the operation to perform.
13.5 Tasks
A task is a microcode program that embodies a desired function. An example could be to gather an ethernet frame, store it in memory and
interrupt the processor when done. The multi-channel DMA supports sixteen simultaneously enabled tasks. By dynamically swapping task
pointers in the task table, an unlimited number of tasks could be supported.
Context Save area used during task switch/swap and some specific flags to enable performance affecting modes such as speculative reads,
prefetch enable, readline and combined write.
A task’s code should always be loaded into SRAM as the SDMA engine can fetch its descriptors from this internal memory with one cycle
access per instruction. It is not recommended to place the code in SDRAM as there will then be a few overhead clocks which are needed to
load the SDMA instruction unit.
• Section 13-1, SDMA Task Bar Register (0x1200) • Section 13-18, SDMA Initiator Priority 8 Register (0x1244)
• Section 13-2, SDMA Current Pointer Register (0x1204) • Section 13-19, SDMA Initiator Priority 12 Register (0x1248)
• Section 13-3, SDMA End Pointer Register (0x1208) • Section 13-20, SDMA Initiator Priority 16 Register (0x124C)
• Section 13-4, SDMA Variable Pointer Register (0x120C) • Section 13-21, SDMA Initiator Priority 20 Register (0x1250)
• Section 13-5, SDMA Interrupt Vector, PTD Control Register • Section 13-22, SDMA Initiator Priority 24 Register (0x1254)
(0x1210) • Section 13-23, SDMA Initiator Priority 28 Register (0x1258)
• Section 13-6, SDMA Interrupt Pending Register (0x1214) • Section 13-24, SDMA Request MuxControl (0x125C)
• Section 13-7, SDMA Interrupt Mask Register (0x1218) • Section 13-26, SDMA task Size 0/1 (0x1260)
• Section 13-8, SDMA Tas k Control 0 Register (0x121C) • Section 13-26, SDMA task Size 0/1 (0x1264)
• Section 13-9, SDMA Task Control 2 Register (0x1220) • Section 13-30, SDMA Debug Module Comparator 1, Value1
• Section 13-10, SDMA Task Control 4 Register (0x1224) Register (0x1270)
• Section 13-11, SDMA Task Control 6 Register (0x1228) • Section 13-31, SDMA Debug Module Comparator 2, Value2
• Section 13-12, SDMA Task Control 8 Register (0x122C) Register (0x1274)
• Section 13-13, SDMA Task Control A Register (0x1230) • Section 13-31, SDMA Debug Module Comparator 2, Value2
• Section 13-14, SDMA Task Control C Register (0x1234) Register (0x1278)
• Section 13-15, SDMA Task Control E Register (0x1238) • Section 13-36, SDMA Debug Module Status Register (0x127C)
• Section 13-16, SDMA Initiator Priority 0 Register (0x123C) • SDMA Reserved Register 3 (0x1280)
• Section 13-17, SDMA Initiator Priority 4 Register (0x1240)
R taskBar
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R taskBar
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 taskBar TaskBAR is the pointer to the base address of the Task Table (Entry Table)
R CurrentPointer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R CurrentPointer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 currentPointer CurrentPointer contains the address of the currently executing DMA descriptor.
R EndPointer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R EndPointer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 endPointer EndPointer contains the address of the last descriptor in the currently executing SDMA
task.
R VariablePointer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R VariablePointer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 variablePointer VariablePointer contains the starting address of the variable table for the currently
executing task.
RESET: 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 IntVect1 The Interrupt Vector register is used during interrupt acknowledge read cycles. The high
order four bits are programmed by the user, and the low order four bits are decoded from
either the current task number or execution unit. If any task interrupts are asserted,
Interrupt Vector 1 is driven during the interrupt acknowledge cycle. If the task interrupts are
negated and the execution unit interrupts are asserted, Interrupt Vector 2 is driven during
the interrupt acknowledge cycle. The registers are set to the uninitialized vector $0F by
system reset.
The interrupt A number is prioritized with IPR[15] the highest and IPR[0] the lowest. If all
interrupt mask bits are set, then INA[3:0] = 1111 is read from this location.
The interrupt B number is prioritized with the dbgInterrupt as the highest and euInterrupt[0]
the lowest. If all interrupt mask bits are set, then INB[3:0] = 1111 is read from this location.
16 T/I T/I: Task/Iniator priority. Set to ‘1’ to switch to “TASK priority” control; set to ‘0’ to revert to
INITIATOR (Requestor) Priority mode.
The priority level of either the TASK or the initiator is set in the register IPR0 through IPR31
17 TEA TEA: If set to ‘1’ a TEA received by BestComm will be ignored and the task will NOT be
halted. TEA indication can still trigger an interrupt if the proper mask bit is cleared in the
Interrupt Mask Register and the TEA status bit plus the TASK number of the task which
received the TEA are still updated in the Interrupt Pending Register.
18 HE HE = 1; allows smartDMA higher task number same request priority to block current task,
and allow arbitration.
HE = 0; disables higher task number from blocking. This bit is cleared by reset.
19:30 — Reserved
31 PE Prefetch Disable: set to ‘1’ to disable prefetch. Set to ‘0’ to enable prefetch on CommBus
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TASK[15:0]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 DBG Debug
1:2 — Reserved
3 TEA A TEA has been received by the currently running task. The corresponding
task number is written in the Error Task Number field
4:7 Etn[3:0] Error Task Number: when a TEA is received by the currently executing task its
corresponding number is indicated here . If the TEA bit of the PtdControl register
is set then the task will not be halted. If the TEA Msk bit in the Mask register is
set then no interrupt to the core will be generated.
16:31 TASK[15:0] Each bit corresponds to an interrupt source defined by the task number or execution unit.
This register contains a registered copy of the interrupt signal that the interrupting source
generates. The corresponding bit in the register reflects the state of the interrupt signal
even if the corresponding mask bit is set. An interrupt is masked by setting the
corresponding bit in the IntMask register. A bit is cleared by writing 1 to that bit location.
Writing 0 has no effect. At system reset, all bits are initialized to logic 0.
0 = The corresponding interrupt source is not pending.
1 = The corresponding interrupt source is pending.
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TASK[15:0]
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 DBG Debug: set to ‘1’ to mask the “debug” interrupt (see the SDMA Debug Control Register)
1:2 — Reserved
3 TEA Msk TEA Mask: set to ‘1’ to mask the TEA. If set to ‘1’ and a TEA is received in the currently
executing Task an interrupt is generated.
4:7 — Reserved
16:31 TASK[15:0] Each bit corresponds to an interrupt source defined by the task number or execution unit.
An interrupt is masked by setting the corresponding bit. At system reset, all bits are
initialized to logic 1.
0 = The corresponding interrupt source is not masked.
1 = The corresponding interrupt source is masked (no interrupt is generated).
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 EN Each of the sixteen tasks has an associated task control register. Only one register is
shown. At system reset, all bits are initialized to logic zeros.
Enable - Task Enable
0 = Disabled
1 = Enabled
This bit can be set or cleared by the programmer at any time when a task is enabled or
disabled. This bit is also set by the PTD logic if the auto-restart bit is set and the task
completes.
11 — Reserved
16:31 TCR1 Task control register for task 1. Same bit layout as for TCR0
R TCR2
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TCR3
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 TCR2 Task control register for task 2. Same bit layout as for TCR0
16:31 TCR3 Task control register for task 3. Same bit layout as for TCR0
R TCR4
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TCR5
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 TCR4 Task control register for task 4. Same bit layout as for TCR0
16:31 TCR5 Task control register for task 5. Same bit layout as for TCR0
R TCR6
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TCR7
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 TCR6 Task control register for task 6. Same bit layout as for TCR0
16:31 TCR7 Task control register for task 7. Same bit layout as for TCR0
R TCR8
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TCR9
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 TCR8 Task control register for task 8. Same bit layout as for TCR0
16:31 TCR9 Task control register for task 9. Same bit layout as for TCR0
R TCRA
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TCRB
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 TCRA Task control register for task 10. Same bit layout as for TCR0
16:31 TCRB Task control register for task 11. Same bit layout as for TCR0
R TCRC
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TCRD
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 TCRC Task control register for task 12. Same bit layout as for TCR0
16:31 TCRD Task control register for task 13. Same bit layout as for TCR0
R TCRE
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TCRF
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 TCRE Task control register for task 14. Same bit layout as for TCR0
16:31 TCRF Task control register for task 15. Same bit layout as for TCR0
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IPR2 IPR3
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Each of the thirty-two initiators has an associated priority level. Only one register is shown. All bits are set to ‘0 at reset.
1:4 — Reserved
8:15 IPR1 Initiator Priority register for initiator 1 (or Task1 if PtdControl[16]=1).
Same bit layout as IPR0
16:23 IPR2 Initiator Priority register for initiator 2.(or Task2 if PtdControl[16]=1)
Same bit layout as IPR0
24:31 IPR3 Initiator Priority register for initiator 3.(or Task3 if PtdControl[16]=1)
Same bit layout as IPR0
R IPR4 IPR5
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IPR6 IPR7
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R IPR8 IPR9
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IPR10 IPR11
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 IPR8 Initiator Priority register for initiator 8 (or Task8 if PtdControl[16]=1)
Same bit layout as IPR0
8:15 IPR9 Initiator Priority register for initiator 9 (or Task9 if PtdControl[16]=1)
Same bit layout as IPR0
16:23 IPR10 Initiator Priority register for initiator 10 (or Task10 if PtdControl[16]=1)
Same bit layout as IPR0
24:31 IPR11 Initiator Priority register for initiator 11 (or Task11 if PtdControl[16]=1)
Same bit layout as IPR0
R IPR12 IPR13
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IPR14 IPR15
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 IPR12 Initiator Priority register for initiator 12 (or Task12 if PtdControl[16]=1)
Same bit layout as IPR0
8:15 IPR13 Initiator Priority register for initiator 13 (or Task13 if PtdControl[16]=1)
Same bit layout as IPR0
16:23 IPR14 Initiator Priority register for initiator 14 (or Task14 if PtdControl[16]=1)
Same bit layout as IPR0
24:31 IPR15 Initiator Priority register for initiator 15 (or Task15 if PtdControl[16]=1)
Same bit layout as IPR0
R IPR16 IPR17
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IPR18 IPR19
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R IPR20 IPR21
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IPR22 IPR23
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R IPR24 IPR25
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IPR26 IPR27
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R IPR28 IPR29
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IPR30 IPR31
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
REQUESTORS Peripheral
REQ15 (RESERVED)
REQ14 PSC1_TX
REQ13 PSC1_RX
REQ12 PSC2_TX
REQ11 PSC2_RX
REQ10 PSC3_TX
REQ9 PSC3_RX
REQ8 PCI TX
REQ7 PCI RX
REQ6 ATA TX
REQUESTORS Peripheral
REQ5 ATA RX
REQ4 FEC TX
REQ3 FEC RX
REQ2 (RESERVED)
REQ1 (RESERVED)
REQ0 ALWAYS
srcSize[1:0] Each of the 16 tasks can be programmed to use the source and destination sizes
contained in one of the Task Size Registers. The task size information is used by the SDMA
module to determine the source and destination transfer size of the operands. When the
size contained the task descriptor is set to 2’b11 then the size field from the Task Size
Control register is selected.
srcSize[1:0] - source size
00 - Word (32 bit)
01 - Byte
10 - Word
11 - Word
destSize[1:0] - destination size
00 - Word (32 bit)
01 - Byte
10 - Word
11 - Word
See Table 13-26 for details. Each task has 4 bits allocated (2 for source and 2 for
destination Size)
R res1
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R res1
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R res2
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R res2
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R Value1
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Value1
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R Value2
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Value2
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R Block Tasks
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:15 Block Tasks Specify for each of tasks 15-0, whether to block that task with detection of a breakpoint (bit
0 halts TASK 15, bit 1 halts TASK 14, etc)
0 Do not block task
1 Block the task
17 B Breakpoint—This bit specifies whether or not to take a breakpoint. This bit is set to 0 at
reset.
0 Disable breakpoints
1 Enable breakpoints
18:20 Comparator Comparator 1 type—These bits specify the type of data that has been loaded into
Type 1 comparator 1; refer to Table 13-33 for the bit encoding.
21:23 Comparators Comparator 2 type—These bits specify the type of data that has been loaded into
Type 2 comparator 2; refer to Table 13-34 for the bit encoding.
24 and / or AND/OR—This specifies what type of operation is to be used with the comparators. This
bit is set to 0 at reset.
0 Indicates an OR’ing of the comparators
1 Indicates an AND’ing of the comparators
25:28 EU breakpoints euBreakpoint: These bits indicate that a breakpoint has occurred in one of the four
execution units. Each execution unit has one bit dedicated to it. A 1 in any of these bits
indicates that the associated execution unit has issued breakpoint. These bits are sticky
and must be overwritten to continue. These bits are cleared to zero at reset. See Table
13-35 for the bit encoding.
MPC5200 has integrated only EU3
31 EB Master External Breakpoint (this bit must be always set to allow any kind of breakpoint to
halt the task)
0 Disable external breakpoint
1 Enable external breakpoint
000 uninitialized
100 task #
101 reserved
110 reserved
111 reserved
000 uninitialized
100 task #
110 reserved
111 reserved
Reset 0 0 0 0
It must be noted that even if a breakpoint is issued at a specific address the SDMA engine will halt ONLY at a “data aligned” boundary (for
instance, if the task moves 32 bits of data per transaction and a breakpoint is set at address 0x02 then the task will be halted at offset 0x04).
R Reserved I E T
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R dbgStatusReg[15:0]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 I Interrupt—This bit indicates whether or not an interrupt has been taken. This bit is set to 0
at reset. It can be written by the user or the SDMA engine.
0 No Interrupt
1 Interrupt taken
16:31 dbgStatusReg[15:0] dbgTaskBlock (dbgStatusReg[15:0])—Each bit corresponds to one of the 16 task numbers.
The value of the register bit reflects the debug state of the task number. A bit is cleared by
writing a one to that bit location; writing a zero (0) has no effect. At system reset, all bits
are initialized to logic zeros (0).
0 Unblocked or normal operation
1 Blocked, task has been blocked due to a breakpoint
The last word is used by the SDMA engine in conjunction with Literal Initialization of LCD (to save variable usage). The user should not
modify the values stored there.
1 1 1 2 3
0 4 5
4 5 9 0 1
Reserved
Reserved
....................
Reserved
Reserved
Note: For each task, the start pointer, end pointer, and variable table pointer are 32-bit values. For the task control
bits, bits 0 through 23 are for the Function Descriptor Base Address, and bits 24 through 31 are RSV = Reserved, PI
= Precise Increment, E = do not reset error code if ‘1’, P = Pack data if ‘1’, I = Integer mode if ‘1’ (else fractional), SPR
= speculative enable, CW = Combined Write Enable if ‘1’, and RL = Read Line Buffer Enable if ‘1’
Precise Increment 0 Increments are allowed at any time the SDMA can do it
1 Only increment at the end of an iteration
No Error Code Reset 0 Reserved
1 Reserved
Pack 0 Do not pack data
1 Pack data
Integer Mode 0 Fractional data representation
1 Integer data representation
Speculative Reads 0 Disabled
1 Enabled
Combined Write Enable 0 Do not enable combined writes
1 Enable combined writes
Read Line Buffer Enable 0 Do not enable line reads
1 Enable line reads
13.14.1.2 Pack
This input signal indicates that packing or unpacking of data should occur if the read size does not equal the write size. The pack signal has
precedence over the integerMode signal.
This signal indicates to the SmartDMA that it should pack data when the source size does not match the destination size. When this signal is
asserted, the SmartDMA should pack data, and the integerMode signal is ignored. Otherwise, the SmartDMA should not pack data. Packing
data refers to the case where the SmartDMA will wait for a full word of data before passing the data to one of the memory interfaces.
Hex
# Contents Comments
Offset
When the user writes a program, or when the assembler converts the user’s programs, the SDMA engine will use the initialization variables
and constants that the user or processor should have loaded into the Variable Table. The initial index variables in the LCD tells the engine to
allocate space for the resulting variables in the loop registers. The space will be allocated consecutively, so the user knows with which register
each variable will be associated. This is important when the user’s program tries to reference one of these previously allocated variables. Also,
the eight increment variables in positions 24 through 31 of Table 13-38 are preloaded by the processor, as programmed by the user.
Notes
Chapter 14
Fast Ethernet Controller (FEC)
14.1 Overview
The fast Ethernet controller (FEC) is an ethernet MAC plus two 1 Kbyte FIFOs that work under the control of the processor and BestComm
DMA engine to support 10/100 Mbps Ethernet/802.3 networks. Table 14-1 shows a block diagram.
A brief introduction and overview of the major functional blocks aid in understanding and programming the FEC.
The FEC is controlled by writing through the system interface (SIF) module into control registers located in each block. The control/status
register (CSR) block provides global control and interrupt handling registers. User programming of the CSR is the primary focus of this
chapter.
The RISC based controller provides the following functions:
• Initialization
• Address recognition for receive frames
• Random number generation for transmit collision backoff timer
The FIFO controller is the focal point of all data flow in the FEC. The FIFO is divided into a transmit and receive FIFO of 1Kbyte each.
Transmit data flows from the CommBus into the transmit FIFO and through the transmit block to the physical layer device (PHY). Receive
data flows from the PHY to the receive block and is pulled out of the FIFO by BestComm. BestComm data transfers are interrupt driven.
Interrupt driven data movement from the processor is not supported.
The bus controller decides which block is to be the T-bus master for each cycle. All the blocks receive their control information over the T-bus
and, for the most part, provide status information over this same internal bus.
The media independent interface (MII) block provides a serial channel for control/status communication with the external physical layer
device (transceiver or PHY). The serial channel consists of the MDC (clock) and MDIO (bidirectional data I/O) lines of the MII interface.
The transmit and receive blocks provide the ethernet MAC functionality (with some assistance from the microcode). Internal to these blocks
are clock domain boundaries between the system clock and the network clocks supplied by the PHY.
The management information base (MIB) block maintains the counters for a variety of network events and statistics. The counters support the
RMON (RFC 1757) ethernet statistics group and some of the IEEE 802.3 counters.
The FEC supports several standard MAC-PHY interfaces to connect to an external ethernet transceiver. One is the 10/100 Mbps MII interface.
Another is the 10-Mbps only 7-Wire interface, which uses a subset of the MII pins.
FEC
SIF
tbuss_addr
tbus
requests
Bus tbus_addr
Controller
CSR
tbusd_addr FIFO Controller
RISC Tx FIFO (1KByte)
Rx FIFO (1KByte)
Controller
(RISC +
microcode)
T-bus
MIB
MII Counters Transmit Receive
MDO MDI
MDEN
14.1.1 Features
The FEC incorporates several features/design goals that are key to its use:
• Support for different ethernet physical interfaces:
— 100 Mbps IEEE 802.3 MII
— 10 Mbps IEEE 802.3 MII
— 10 Mbps 7-wire interface (industry standard)
• IEEE 802.3 full-duplex flow control
• Programmable max frame length supports IEEE 802.1 VLAN tags and priority
• Support for full-duplex operation (200 Mbps throughput) with a minimum system clock rate of 50 MHz.
• Support for half-duplex operation (100 Mbps throughput) with a minimum system clock rate of 25 MHz.
• Large (1 Kbyte) on-chip transmit and receive FIFOs to support a variety of bus latencies.
• Retransmission from transmit FIFO following a collision (no processor bus utilization).
• Automatic internal flushing of the Rx FIFO for runts (collision fragments) and address recognition rejects (no processor bus
utilization).
• Address recognition
— Frames with broadcast address may be always accepted or always rejected
— Exact match for single 48-bit individual (unicast) address
— Hash (64-bit hash) check of individual (unicast) addresses
— Hash (64-bit hash) check of group (multicast) addresses
— Promiscuous mode
Tx_EN . . . . . . . . . . . . . Assertion of this signals indicates valid nibbles are being presented on the MII. This signal is asserted with the
first nibble of preamble and is negated prior to the first Tx_CLK following the final nibble of the frame.
TxD. . . . . . . . . . . . . . . . TxD[0:3] represent a nibble of data when Tx_EN is asserted and have no meaning when Tx_EN is de-asserted.
Table 14-2 summarizes the permissible encoding of TxD.
Tx_ER . . . . . . . . . . . . . Assertion of this signal for one or more clock cycles while Tx_EN is asserted causes PHY to transmit one or
more illegal symbols. Asserting Tx_ER has no affect when operating at 10 Mbps or when Tx_EN is de-asserted
This signal transitions synchronously with respect to Tx_CLK.
Rx_DV . . . . . . . . . . . . . When this signal is asserted, PHY is indicating a valid nibble is present on the MII. This signal remains asserted
from the first recovered nibble of the frame through the last nibble. Assertion of Rx_DV must start no later than
the SFD, and exclude any EOF.
RxD. . . . . . . . . . . . . . . . RxD[0:3] represents a nibble of data to be transferred from the PHY to the MAC when Rx_DV is asserted. A
completely formed SFD must be passed across the MII. When Rx_DV is not asserted, RxD has no meaning.
There is an exception to this which is explained later. Table 14-3 summarizes the permissible encoding of RXD.
Rx_ER . . . . . . . . . . . . . When Rx_ER and Rx_DV are asserted, the PHY has detected an error in the current frame.
When Rx_DV is not asserted, Rx_ER shall have no affect. This signal transitions synchronously with Rx_CLK
CRS . . . . . . . . . . . . . . . Signal is asserted when Tx or Rx medium is not idle. If a collision occurs, CRS remains asserted through the
duration of the collision. This signal is not required to transition synchronously with Tx_CLK or Rx_CLK.
COL . . . . . . . . . . . . . . . Signal is asserted on a collision detection, and remains asserted while the collision persists. The signal behavior
is not specified when in full-duplex mode. This signal is not required to transition synchronously with Tx_CLK
or Rx_CLK.
MDC . . . . . . . . . . . . . . . Signal provides a timing reference to the PHY for data transfers on the MDIO signal. MDC is aperiodic, and
has no maximum high or low times. The minimum high and low times is 160 ns, with the minimum period being
400 ns.
MDIO . . . . . . . . . . . . . . Signal transfers control/status information between the PHY and MAC. It transitions synchronously to MDC.
The MDIO pin is a bidirectional pin. The internal FEC signals that connect to this pad are: MDI (data in), MDO
(data out), and MD_EN (direction control, high for output).
Table 14-2 lists the interpretation of possible encodings for Tx_EN and Tx_ER
Table 14-2. MII: Valid Encoding of TxD, Tx_EN and Tx_ER
A false carrier condition occurs if PHY detects a bad start-of-stream delimiter. This condition signals MII by asserting Rx_ER and placing
1110 on RxD. Rx_DV must also be de-asserted. Valid Rx_DV, Rx_ER and RxD[3:0] encodings are shown in Table 14-3.
Table 14-3. MII: Valid Encoding of RxD, Rx_ER and Rx_DV
0 1 1111 Reserved
<preamble><st><op><phyad><regad><ta><data><idle>
Table 14-4. MMI Format Definitions
Name Description
<phyad> A 5-bit field that lists up to 32 PHYs be addressed. The first address bit transmitted is the
msb of the address.
<regad> A 5-bit field that lets 32 registers be addressed within each PHY. The first register bit
transmitted is the msb of the address.
<ta> A 2-bit field that provides spacing between the register address field and the data field to
avoid contention on the MDIO signal during a read operation.
<data> Data field is 16 bits wide. Data bit 15 is first bit transmitted and received.
0 Control B
1 Status B
4 Auto-Negotiation Advertisement E
6 AN Expansion E
8:15 Reserved E
Address Function
400–7FF Reserved
00C Reserved
018-020 Reserved
028-03C Reserved
04C-060 Reserved
068-080 Reserved
08C-0C0 Reserved
0C8-0E0 Reserved
0F0-114 Reserved
128-140 Reserved
148-180 Reserved
1CC-1FF
218 RMON_T_OVERSIZE RMON Tx Packets greater than MAX_FL bytes, good CRC
298 RMON_R_OVERSIZE RMON Rx Packets greater than MAX_FL bytes, good CRC
• Section 14-8, FEC ID Register (0x3000) • Section 14-28, FEC Tx FIFO Watermark Register
• Section 14-9, FEC Interrupt Event Register (0x3004) (0x3144)
• Section 14-10, FEC Interrupt Enable Register • Section 14.7, FEC Tx FIFO Data Register—MBAR +
(0x3008) 0x31A4 (0x3184)
• Section 14-11, FEC Rx Descriptor Active Register • Section 14.6.1, FEC Rx FIFO Data Register—MBAR
(0x3010) + 0x3184 (0x31A4)
• Section 14-12, FEC Tx Descriptor Active Register • Section 14-30, FEC Rx FIFO Status Register
(0x3014) (0x3188)
• Section 14-13, FEC Ethernet Control Register • Section , FEC Tx FIFO Status Register (0x31A8)
(0x3024) • Section 14-31, FEC Rx FIFO Control Register
• Section 14-14, FEC MII Management Frame Register (0x318C)
(0x3040) • Section , FEC Tx FIFO Control Register (0x31AC)
• Section 14-15, FEC MII Speed Control Register • Section 14-32, FEC Rx FIFO Last Read Frame
(0x3044) Pointer Register (0x3190)
• Section 14-17, FEC MIB Control Register (0x3064) • Section , FEC Tx FIFO Last Read Frame Pointer
• Section 14-18, FEC Receive Control Register Register (0x31B0)
(0x3084) • Section 14-33, FEC Rx FIFO Last Write Frame
• Section 14-19, FEC Hash Register (0x3088) Pointer Register (0x3194)
• Section 14-20, FEC Tx Control Register (0x30C4) • Section , FEC Tx FIFO Last Write Frame Pointer
• Section 14-21, FEC Physical Address Low Register Register (0x31B4)
(0x30E4) • Section 14-34, FEC Rx FIFO Alarm Pointer Register
• Section 14-22, FEC Physical Address High Register (0x3198)
(0x30E8) • Section , FEC Tx FIFO Alarm Pointer Register
• Section 14-23, FEC Opcode/Pause Duration (0x31B8)
Register (0x30EC) • Section 14-35, FEC Rx FIFO Read Pointer Register
• Section 14-24, FEC Descriptor Individual Address 1 (0x319C)
Register (0x3118) • Section , FEC Tx FIFO Read Pointer Register
• Section 14-25, FEC Descriptor Individual Address 2 (0x31BC)
Register (0x311C) • Section 14-36, FEC Rx FIFO Write Pointer Register
• Section 14-26, FEC Descriptor Group Address 1 (0x31A0)
Register (0x3120) • Section , FEC Tx FIFO Write Pointer Register
• Section 14-27, FEC Descriptor Group Address 2 (0x31C0)
Register (0x3124) • Section 14-37, FEC Reset Control Register (0x31C4)
• Section 14-38, FEC Transmit FSM Register (0x31C8)
R FEC_ID
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16:20 — Reserved
XFIFO_UN
ERROR
ERROR
RFIFO_
HBERR
XFIFO_
TFINT
BABR
COL_
BABT
GRA
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 HBERR Heartbeat Error— interrupt bit indicates HBC is set in the X_CNTRL register and COL
input was not asserted within the heartbeat window following a transmission.
1 BABR Babbling Receive Error—bit indicates frame was received with a length in excess of
R_CNTRL.MAX_FL bytes.
3 GRA Graceful Stop Complete—interrupt bit is asserted for one of three reasons.
1 = A graceful stop initiated by setting X_CNTRL.GTS bit is complete.
2 = A graceful stop initiated by setting X_CNTRL.FC_PAUSE bit is complete.
3 = A graceful stop initiated by reception of a valid full duplex flow control “pause”
frame is complete. Refer to “Full Duplex Flow Control” section of the Ethernet
Operation chapter.
A "graceful stop" means the transmitter is put into a pause state after completion of
the frame currently being transmitted.
4 TFINT Transmit frame interrupt. This bit indicates that a frame has been transmitted.
5 — Reserved
6 — Reserved
7 — Reserved
8 MII MII Interrupt—bit indicates MII completed the data transfer requested.
9 — Reserved
10 LATE_COL Bit indicates a collision occurred beyond the collision window (slot time) in half-duplex
mode. The frame is truncated with a bad CRC. Remainder of the frame is discarded.
11 COL_RETRY_LIM Collision Retry Limit—bit indicates a collision occurred on each of 16 successive
attempts to transmit the frame. The frame is discarded without being transmitted and
transmission of the next frame begins.
Only occurs in half-duplex mode.
12 XFIFO_UN Transmit FIFO Underrun—bit indicates the transmit FIFO became empty before the
complete frame was transmitted. A bad CRC is appended to the frame fragment and
remainder of frame is discarded.
13 XFIFO_ERROR Transmit FIFO Error—indicates an error occurred within the forest green version
transmit FIFO. When XFIFO_ERROR bit is set, ECNTRL.ETHER_EN is cleared,
halting FEC frame processing. When this occurs, software must ensure both the FIFO
Controller and BestComm are soft-reset.
14 RFIFO_ERROR Receive FIFO Error—indicates error occurred within the forest green version RX
FIFO. When RFIFO_ERROR bit is set, ECNTRL.ETHER_EN is cleared, halting FEC
frame processing. When this occurs, software must ensure both the FIFO Controller
and BestComm are soft-reset.
15:31 — Reserved.
RFERREN
XFERREN
R Reserved Rsvd Rsvd
XFUNEN
GRAEN
HBEEN
CRLEN
TFIEN
BREN
MIIEN
BTEN
LCEN
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 — Reserved
6 — Reserved
7 — Reserved
9 — Reserved
15:31 — Reserved
R_DES_ACTIVE
R Reserved Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 R_DES_ACTIVE Set to one when this register is written, regardless of the value written. Cleared by the
FEC device whenever no additional “ready” descriptors remain in the receive ring.
8:31 — Reserved
R Reserved Reserved
X_DES_ACTIVE
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
7 X_DES_ACTIVE Set to one when this register is written, regardless of the value written. Cleared by the
FEC device whenever no additional “ready” descriptors remain in the transmit ring.
8:31 — Reserved
TESTMD
R Reserved
TAG0
TAG1
TAG2
TAG3
Rsvd
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
ETHER_EN
R Reserved
FEC_OE
RESET
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 TAG[0:3] This field allows programming and reading the TBUS tag bits. This field is used for
debug/test only, and is implemented in two separate 4-bit registers. The “tags_in”
register is written to when a sky blue write to this register takes place. This field (tags_in)
resets to 1111. During a write cycle to any FEC register other than ECNTRL the tags_in
value is driven onto the tbus data bus tag field. During a read cycle the tbus tag field bits
is latched and saved in the “tags_out” register. When the ECNTRL register is read the
value from “tags_out” shows in the TAG field.
4 — Reserved
5 TESTMD Test Mode—used for manufacturing test only. TESTMD resets to 0. This bit forces the
bus controller to ignore all bus requests except the one from the SIF.
6:28 — Reserved
29 FEC_OE FEC Output Enable—It is a spare bit and has no affect on internal operation.
30 ETHER_EN Ethernet Enable—When this bit is set, FEC is enabled and Rx/Tx can occur. When bit is
cleared, Rx stops immediately; Tx stops after a bad CRC is appended to any frame
currently being transmitted. The ETHER_EN bit is altered by hardware under the
following conditions:
• If ECNTRL.RESET is written to 1 by software, ETHER_EN is cleared.
• If error conditions causing the IEVENT.EBERR, XFIFO_ERROR or RFIFO_ERROR
bits to set occur ETHER_EN is cleared.
31 RESET Ethernet Controller Reset—When this bit is set, the equivalent of a hardware reset is
done, but it is local to the FEC. ETHER_EN is cleared and all other FEC registers take
their reset values. Also, any Tx/Rx currently in progress is abruptly aborted. This bit is
automatically cleared by hardware during the reset sequence. The reset sequence takes
approximately 8 clock cycles after RESET is written with 1.
R ST OP PA RA TA
RESET: X X X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R DATA
RESET: X X X X X X X X X X X X X X X X
0:1 ST Start of Frame Delimiter—bits must be programmed to 01 for a valid MII management frame.
2:3 OP Operation Code—field must be programmed to 10 (read) or 01 (write) to generate a valid MII
management frame.
• A value of 11 causes a “read” frame operation.
• A value of 00 causes a “write” frame operation. However, these frames are not MII
compliant.
16:31 DATA Management Frame Data—used for data written to or read from PHY register.
To do a read or write operation, the MII management interface writes to the MII_DATA register. To generate a valid read or write management
frame:
• the ST field must be written with a 01
• the OP field must be written with either:
— 01 (management register write frame), or
— 10 (management register read frame), and
• the TA field must be written with a 10
If other patterns are written to these fields, a frame is generated, but it does not comply to the IEEE 802.3 MII definition:
• OP field = 1x produces a “read” frame operation, while
• OP field = 0x produces a “write” frame operation.
To generate an IEEE 802.3 compliant MII management interface write frame (write to a PHY register), the user must write the following to
the MII_DATA register:
{01 01 PHYAD REGAD 10 DATA}
Writing this pattern causes control logic to shift out the data in the MII_DATA register following a preamble generated by the control state
machine. During this time, the MII_DATA register contents are altered as the contents are serially shifted, and is unpredictable if read by the
user. When the write management frame operation is complete, the MII_DATAIO_COMPL interrupt is generated. At this time the MII_DATA
register contents match the original value written.
To generate an MII Management Interface read frame (read a PHY register) the user must write the following to the MII_DATA register
(DATA field content is "don’t care"):
{01 10 PHYAD REGAD 10 XXXX}
Writing this pattern causes control logic to shift out data in the MII_DATA register following a preamble generated by the control state
machine. During this time, the MII_DATA register contents are altered as the contents are serially shifted, and is unpredictable if read by the
user. When the read management frame operation is complete, the MII_DATAIO_COMPL interrupt is generated. At this time the MII_DATA
register contents matches the original value written, except for the DATA field whose contents have been replaced by the value read from the
PHY register.
If the MII_DATA register is written while frame generation is in progress, frame contents are altered. Software should use the MII_STATUS
register and/or the MII_DATAIO_COMPL interrupt to avoid writing to the MII_DATA register while frame generation is in process.
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
DIS_PREAMBLE
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:23 — Reserved
24 DIS_PREAMBLE Asserting this bit causes preamble (32 1s) to not be prepended to the MII
management frame. The MII standard allows the preamble to be dropped, if not
required by the attached PHY device(s).
25:30 MII_SPEED Controls the frequency of the MII management interface clock (MDC) relative to
ipb_clk. A 0 value in this field “turns off” the MDC and leaves it in low voltage state.
Any non-zero value results in the MDC frequency of
1/(MII_SPEED*2) of the ipb_clk frequency.
The MII_SPEED field must be programmed with a value to provide an MDC frequency
of less than or equal to 2.5 MHz to be compliant with the IEEE MII characteristic. The
MII_SPEED must be set to a non-zero value in order to source a read or write
management frame. After the management frame is complete, the MII_SPEED
register may optionally be set to 0 to turn off the MDC. The MDC generated has a 50%
duty cycle except when MII_SPEED is changed during operation (change takes affect
following either a rising or falling edge of MDC).
If the ipb_clk is 25MHz, programming MII_SPEED field to 0x5 results in a MDC
frequency of 25MHz * 1/(5*2) = 2.5 MHz. Table 14-16 shows MII_SPEED optimum
values as a function of the ipb_clk frequency.
31 — Reserved
25MHz $5 2.5MHz
33MHz $7 2.36MHz
40MHz $8 2.5MHz
50MHz $A 2.5MHz
R Reserved
MIB_IDLE
MIB_DISABLE
RESET: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 MIB_DISABLE A read/write control bit. If set, MIB logic halts and MIB counters do not update.
1 MIB_IDLE A read-only status bit. If set, MIB block is not currently updating MIB counters.
2:31 — Reserved
R Reserved MAX_FL
RESET: 0 0 0 0 0 1 0 1 1 1 1 0 1 1 1 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
MII_MODE
BC_REJ
PROM
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0:4 — Reserved
5:15 MAX_FL Maximum Frame Length—User R/W field. Resets to decimal 1518. The length is measured
starting at DA and includes CRC at End Of Frame (EOF). Tx frames longer than MAX_FL
causes the BABT interrupt to occur. Rx Frames longer than MAX_FL causes BABR interrupt
to occur and sets the EOF buffer descriptor LG bit. The recommended user programmed
default value is 1518, or if VLAN Tags are supported, 1522.
16:25 — Reserved
26 FCE Flow Control Enable—If asserted, the receiver detects PAUSE frames. On PAUSE frame
detection, transmitter stops transmitting data frames for a given duration.
29 MII_MODE Selects External Interface Mode—controls the interface mode for Tx/Rx blocks.
• Setting bit to 1 selects MII mode.
• Setting bit to 0 selects 7wire mode (used only for serial 10Mbps).
31 LOOP Internal Loopback—If set, transmitted frames are looped back internal to the device and
transmit output signals are not asserted. The system clock is substituted for TX_CLK when
LOOP is asserted. DRT must be set to 0 when asserting LOOP.
R HASH Reserved
MULTI
CAST
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 MULTICAST Set if current Rx frame contained a multi-cast destination address, indicating DA LSB was
set. Cleared if current Rx frame does not correspond to a multi-cast address.
2:7 HASH Corresponds to “hash” value of current Rx frame’s destination address. Hash value is a
6-bit field extracted from least significant portion of CRC register.
8:31 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RFC_PAUSE
TFC_PAUSE
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:26 — Reserved
27 RFC_PAUSE This read-only status bit is asserted when a full-duplex flow control pause frame is
received. The transmitter is paused for the duration defined in this pause frame. Bit
automatically clears when the pause duration is complete.
28 TFC_PAUSE Assert to transmit a PAUSE frame. When this bit is set, the MAC stops transmission of
data frames after the current transmission is complete. At this time, the INTR_EVENT
register GRA interrupt is asserted. With transmission of data frames stopped, the MAC
transmits a MAC Control PAUSE frame. Next, the MAC clears the TFC_PAUSE bit and
resumes transmitting data frames.
Note: If the transmitter is paused due to user assertion of GTS or reception of a PAUSE
frame, MAC may still transmit a MAC Control PAUSE frame.
29 FDEN Full Duplex Enable—If set, frames are transmitted independent of Carrier Sense and
Collision inputs.
This bit should only be modified when ETHER_EN is deasserted.
30 HBC Heartbeat Control—If set, the heartbeat check is done following End Of Transmission
(EOT) and the Event Status Register HB bit is set if the collision input does not assert
within the heartbeat window.
This bit should only be modified when ETHER_EN is deasserted.
31 GTS Graceful Transmit Stop—When this bit is set, the MAC stops transmission after any frame
that is currently being transmitted is complete and the INTR_EVENT register GRA
interrupt is asserted.
If frame transmission is not currently underway, the GRA interrupt is immediately
asserted. Once transmission completes, a “restart” can be done by clearing the GTS bit.
The next frame in the transmit FIFO is then transmitted.
If an early collision occurs during transmission when GTS = 1, transmission stops after
the collision. The frame is transmitted again once GTS is cleared.
Note: Old frames may exist in the transmit FIFO and be transmitted when GTS is
reasserted. To avoid this, deassert ETHER_EN after the GRA interrupt.
R PADDR1
RESET: X X X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R PADDR1
RESET: X X X X X X X X X X X X X X X X
0:31 PADDR1 Bytes 0 (bits 31:24), 1 (bits 23:16), 2 (bits 15:8) and 3 (bits 7:0) of the 6-byte individual
address used for an exact match, and the Source Address field in PAUSE frames.
R PADDR2
RESET: X X X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R TYPE
RESET: 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0
0:15 PADDR2 Bytes 4 (bits 31:24) and 5 (bits 23:16) of the 6-byte individual address used for an exact match,
and the Source Address field in PAUSE frames.
R OPCODE
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R PAUSE_DUR
RESET: X X X X X X X X X X X X X X X X
0:15 OPCODE Opcode field used in PAUSE frames. Bits are a constant value, hex 0001.
R IADDR1
RESET: X X X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IADDR1
RESET: X X X X X X X X X X X X X X X X
0:31 IADDR1 The upper 32 bits of the 64-bit hash table used in the address recognition process for receive
frames with a unicast address.
• Bit 31 contains hash index bit 63.
• Bit 0 contains hash index bit 32.
R IADDR2
RESET: X X X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R IADDR2
RESET: X X X X X X X X X X X X X X X X
0:31 IADDR2 The lower 32bits of the 64-bit hash table used in the address recognition process for receive
frames with a unicast address.
• Bit 31 contains hash index bit 31.
• Bit 0 contains hash index bit 0.
R GADDR1
RESET: X X X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R GADDR1
RESET: X X X X X X X X X X X X X X X X
0:31 GADDR1 The GADDR1 register contains the upper 32bits of the 64-bit hash table used in the address
recognition process for receive frames with a multicast address.
• Bit 31 contains hash index bit 63.
• Bit 0 contains hash index bit 32.
R GADDR2
RESET: X X X X X X X X X X X X X X X X
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R GADDR2
RESET: X X X X X X X X X X X X X X X X
0:31 GADDR2 The GADDR2 register contains the lower 32bits of the 64-bit hash table used in the address
recognition process for receive frames with a multicast address.
• Bit 31 contains hash index bit 31.
• Bit 0 contains hash index bit 0.
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved X_WMRK
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:28 — Reserved
28:31 X_WMRK Transmit FIFO Watermark—Frame transmission begins:
• If the number of bytes selected by this field are written into the transmit FIFO, or
• if an EOF is written to the FIFO, or
• if the FIFO is full before the selected number of bytes are written.
Options are:
0000 = 64Bytes written to FIFO.
0001 = 128Bytes written to FIFO.
0010 = 192Bytes written to FIFO.
0011 = 256Bytes written to FIFO.
0100 = 320Bytes written to FIFO.
0101 = 384Bytes written to FIFO.
0110 = 448Bytes written to FIFO.
0111 = 512Bytes written to FIFO.
1000 = 576Bytes written to FIFO.
1001 = 640Bytes written to FIFO.
1010 = 704Bytes written to FIFO.
1011 = 768Bytes written to FIFO.
1100 = 832Bytes written to FIFO.
1101 = 896Bytes written to FIFO.
1110 = 960Bytes written to FIFO.
1111 = 1024Bytes written to FIFO.
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
0:3 — Reserved
8 --- Reserved
FRAME
R Rsvd WFR[1:0] GR[2:0] Reserved
COMP
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved LRFP[9:0]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:21 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved LRFP[9:0]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:21 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved Alarm[9:0]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:21 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved READ[9:0]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:21 — Reserved
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved WRITE[9:0]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:21 — Reserved
R Reserved Reserved
RCTL[1]
RCTL[0]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
:
Table 1-1.
Bits Name Description
0:5 — Reserved
Table 1-1.
Bits Name Description
XFSM[1]
XFSM[0]
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:5 — Reserved
6 XFSM[1] 0 = Do not append CRC.
1 = Append CRC (typical use).
7 XFSM[0] 0 = Disable CRC FSM.
1 = Enable CRC FSM (typical use is enabled).
8:31 --- Reserved
Description
Initialize IMASK
X_WMRK (optional)
IADDR2/IADDR1
GADDR1/GADDR2
PADDR1/PADDR2
R_CNTRL
X_CNTRL
MII_SPEED (optional)
Description
Activate Receiver
Activate Transmit
0 0 0 0 1 0 0 M BC MC LG NO 0 CR OV TR
(Last)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 FRAME_LENGTH
TC ABC
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
The Ethernet transmitter is designed to work with almost no intervention from software. Once ETHER_EN is asserted and data appears in the
transmit FIFO the Ethernet MAC is able to transmit onto the network.
When the transmit FIFO fills to the watermark (defined by the X_WMRK register), the MAC transmit logic will assert TX_EN and start
transmitting the preamble sequence, the start frame delimiter, and then the frame information from the FIFO. However, the controller defers
the transmission if the network is busy (carrier sense is asserted). Before transmitting, the controller waits for carrier sense to become inactive,
then determines if carrier sense stays inactive for 60 bit times. If so, then the transmission begins after waiting an additional 36 bit times (96
bit times after carrier sense originally became inactive).
If a collision occurs during transmission of the frame (half-duplex mode), the ethernet controller follows the specified backoff procedures and
attempts to retransmit the frame until the retry limit is reached. The transmit FIFO stores at least the first 64 bytes of the transmit frame, so
that they do not have to be retrieved from system memory in case of a collision. This improves bus utilization and latency in case immediate
retransmission is necessary.
When all the frame data has been transmitted, the FCS (32-bit CRC) bytes are appended if the TC bit is set in the transmit frame control word.
If the ABC bit is set in the transmit frame control word, a bad CRC will be appended to the frame data regardless of the TC bit value. Following
the transmission of the CRC, the ethernet controller writes the frame status information to the MIB block. Short frames are automatically
padded by the transmit logic (if the TC bit in the transmit buffer descriptor for the end of frame buffer = 1).
The FEC frame interrupts may be generated as determined by the settings in the IMASK register.
Transmit error interrupts are HBERR, BABT, LATE_COL, COL_RETRY_LIM, XFIFO_UN and XFIFO_ERROR. If the transmit frame
length exceeds MAX_FL bytes the BABT interrupt will be asserted, however the entire frame will be transmitted (no truncation).
To pause transmission, set the GTS (Graceful Transmit Stop) bit in the X_CNTRL register. When the GTS is set the FEC transmitter stops
immediately if transmission is not in progress; otherwise, it continues transmission until the current frame either finishes or terminates with
a collision. After the transmitter has stopped the GRA (Graceful Stop Complete) interrupt is asserted. If GTS is cleared, the FEC resumes
transmission with the next frame.
The ethernet controller transmits bytes least significant bit first.
If the DA is a broadcast address and broadcast reject (R_CNTRL.BC_REJ) is deasserted, then the frame will be accepted unconditionally as
shown in Figure 14-4. Otherwise, if the DA in not a broadcast address the microcontroller runs the address recognition subroutine as shown
in Figure 14-5.
If the DA is a group (multicast) address and flow control is disabled the microcontroller will perform a group hash table lookup using the
64-entry hash table programmed in GADDR1 and GADDR2. If a hash match occurs AR_HM_B (address recognition hash match bar) is set
to 0 and the receiver accepts the frame. If flow control is enabled the microcontroller will do an exact address match check between the DA
and the designated PAUSE DA in registers XMIT.FDXFC_DA1 and XMIT.FDXFC_DA2. In the case where a PAUSE DA exact match occurs
AR_EM_B (address recognition exact match bar) is set to 0. If the receive block determines that the received frame is a valid PAUSE frame
the frame will be rejected. Note the receiver will detect a PAUSE frame with the DA field set to either the designated PAUSE DA or the unicast
physical address.
If the DA is the individual (unicast) address the microcontroller performs an individual exact match comparison between the DA and 48-bit
physical address that the user programs in the PADDR1 and PADDR2 registers. If an exact match occurs AR_EM_B is set to 0; otherwise,
the microcontroller does an individual hash table lookup using the 64-entry hash table programmed in registers IADDR1 and IADDR2. In the
case of an individual hash match AR_HM_B is set to 0. Again, the receiver will accept or reject the frame based on PAUSE frame detection,
shown in Figure 14-4.
If neither a hash match (group or individual) nor an exact match (group or individual) occur both AR_HM_B and AR_EM_B are set to 1. In
this case, if promiscuous mode is enabled (R_CNTRL.PROM = 1), then the frame will be accepted and the MISS bit in the receive buffer
descriptor is set; otherwise, the frame will be rejected and the MISS bit will be cleared.
Similarly, if the DA is a broadcast address, broadcast reject (R_CNTRL.BC_REJ) is asserted and promiscuous mode is enabled. Then the
frame will be accepted and the MISS bit in the receive buffer descriptor is set; otherwise, the frame will be rejected and the MISS bit will be
cleared.
In general, when a frame is rejected it is flushed from the FIFO.
Accept/Reject
Frame
True False
Broadcast Addr
?
Receive
Address
Recognition
Receive Address
Recognition
Group Individual
I/G Address
?
False
False True
Pause Address
? Hash Search
Individual Table
ar_em_b = 0
Hash Search ar_em_b = 0 ar_hm_b = 1
Group Table ar_hm_b = 1
True Match
Match True
? ?
False False
ar_em_b = 1
ar_hm_b = 0
The hash table algorithm used in the group and individual hash filtering operates as follows. The 48-bit destination address is mapped into
one of 64 bits which are represented by 64 bits stored in GADDR1,2 (group address hash match) or IADDR1,2 (individual address hash
match). This mapping is performed by passing the 48-bit address through the on-chip 32-bit CRC generator and selecting the 6 most
significant bits of the CRC-encoded result to generate a number between 0 and 63. The MSB of the CRC result selects GADDR1 (MSB = 1)
or GADDR2 (MSB = 0). The least significant 5 bits of the hash result select the bit within the selected register. If the CRC generator selects
a bit that is set in the hash table, the frame is accepted; otherwise, it is rejected.
For example, if eight group addresses are stored in the hash table and random group addresses are received, the hash table prevents roughly
56/64 (or 87.5%) of the group address frames from reaching memory. Those that do reach memory must be further filtered by the processor
to determine if they truely contain one of the eight desired addresses.
The effectiveness of the hash table declines as the number of addresses increases.
The hash table registers must be initialized by the user. The user may compute the hash for a particular address in software. The CRC32
polynomial to use in computing the hash is:
X 32 + X 26 + X 23 + X 22 + X 16 + X 12 + X 11 + X 10 + X 8 + X 7 + X 5 + X 4 + X 2 + X + 1
A table of example Destination Addresses and corresponding hash values is included below for reference.
65:ff:ff:ff:ff:ff 0x0 0
55:ff:ff:ff:ff:ff 0x1 1
15:ff:ff:ff:ff:ff 0x2 2
35:ff:ff:ff:ff:ff 0x3 3
b5:ff:ff:ff:ff:ff 0x4 4
95:ff:ff:ff:ff:ff 0x5 5
d5:ff:ff:ff:ff:ff 0x6 6
f5:ff:ff:ff:ff:ff 0x7 7
db:ff:ff:ff:ff:ff 0x8 8
fb:ff:ff:ff:ff:ff 0x9 9
bb:ff:ff:ff:ff:ff 0xa 10
8b:ff:ff:ff:ff:ff 0xb 11
0b:ff:ff:ff:ff:ff 0xc 12
3b:ff:ff:ff:ff:ff 0xd 13
7b:ff:ff:ff:ff:ff 0xe 14
5b:ff:ff:ff:ff:ff 0xf 15
27:ff:ff:ff:ff:ff 0x10 16
07:ff:ff:ff:ff:ff 0x11 17
57:ff:ff:ff:ff:ff 0x12 18
77:ff:ff:ff:ff:ff 0x13 19
f7:ff:ff:ff:ff:ff 0x14 20
c7:ff:ff:ff:ff:ff 0x15 21
97:ff:ff:ff:ff:ff 0x16 22
a7:ff:ff:ff:ff:ff 0x17 23
99:ff:ff:ff:ff:ff 0x18 24
b9:ff:ff:ff:ff:ff 0x19 25
f9:ff:ff:ff:ff:ff 0x1a 26
c9:ff:ff:ff:ff:ff 0x1b 27
59:ff:ff:ff:ff:ff 0x1c 28
79:ff:ff:ff:ff:ff 0x1d 29
29:ff:ff:ff:ff:ff 0x1e 30
19:ff:ff:ff:ff:ff 0x1f 31
d1:ff:ff:ff:ff:ff 0x20 32
f1:ff:ff:ff:ff:ff 0x21 33
b1:ff:ff:ff:ff:ff 0x22 34
91:ff:ff:ff:ff:ff 0x23 35
11:ff:ff:ff:ff:ff 0x24 36
31:ff:ff:ff:ff:ff 0x25 37
71:ff:ff:ff:ff:ff 0x26 38
51:ff:ff:ff:ff:ff 0x27 39
7f:ff:ff:ff:ff:ff 0x28 40
4f:ff:ff:ff:ff:ff 0x29 41
1f:ff:ff:ff:ff:ff 0x2a 42
3f:ff:ff:ff:ff:ff 0x2b 43
bf:ff:ff:ff:ff:ff 0x2c 44
9f:ff:ff:ff:ff:ff 0x2d 45
df:ff:ff:ff:ff:ff 0x2e 46
ef:ff:ff:ff:ff:ff 0x2f 47
93:ff:ff:ff:ff:ff 0x30 48
b3:ff:ff:ff:ff:ff 0x31 49
f3:ff:ff:ff:ff:ff 0x32 50
d3:ff:ff:ff:ff:ff 0x33 51
53:ff:ff:ff:ff:ff 0x34 52
73:ff:ff:ff:ff:ff 0x35 53
23:ff:ff:ff:ff:ff 0x36 54
13:ff:ff:ff:ff:ff 0x37 55
3d:ff:ff:ff:ff:ff 0x38 56
0d:ff:ff:ff:ff:ff 0x39 57
5d:ff:ff:ff:ff:ff 0x3a 58
7d:ff:ff:ff:ff:ff 0x3b 59
fd:ff:ff:ff:ff:ff 0x3c 60
dd:ff:ff:ff:ff:ff 0x3d 61
9d:ff:ff:ff:ff:ff 0x3e 62
bd:ff:ff:ff:ff:ff 0x3f 63
Pause frame detection is performed by the receiver and microcontroller modules. The microcontroller runs an address recognition subroutine
to detect the specified pause frame destination address, while the receiver detects the type and opcode pause frame fields. On detection of a
pause frame, graceful transmit stop is asserted by the FEC internally. When transmission has paused, the GRA (Graceful Stop complete)
interrupt is asserted and the pause timer begins to increment. Note that the pause timer makes use of the transmit backoff timer hardware which
is used for tracking the appropriate collision backoff time in half-duplex mode. The pause timer increments once every slot time until
PAUSE_DURATION slot times have expired. On PAUSE_DURATION expiration, graceful transmit stop is deasserted allowing MAC data
frame transmission to resume. Note that the receive flow control pause (X_CNTRL.RFC_PAUSE) status bit is asserted while the transmitter
is paused due to reception of a pause frame.
To transmit a pause frame the FEC must operate in full-duplex mode and the user must assert flow control pause (X_CNTRL.TFC_PAUSE).
On assertion of transmit flow control pause (X_CNTRL.TFC_PAUSE) the transmitter asserts graceful transmit stop internally. When the
transmission of data frames stops the GRA (Graceful Stop complete) interrupt asserts. Following GRA assertion the Pause frame is
transmitted. On completion of pause frame transmission flow control pause (X_CNTRL.TFC_PAUSE) and graceful transmit stop are
deasserted internally.
During pause frame transmission the transmit hardware places data into the transmit data stream from the registers shown in the table below.
Table 14-46. Transmit Pause Frame Registers
The user must specify the desired pause duration in the OP_PAUSE register.
Note that when the transmitter is paused due to receiver/microcontroller pause frame detection, transmit flow control pause
(X_CNTRL.TFC_PAUSE) still may be asserted and will cause the transmission of a single pause frame. In this case the GRA interrupt will
not be asserted.
If a collision occurs within 64 byte times the retry process is initiated. The transmitter waits a random number of slot times. A slot time is 512
bit times. If a collision occurs after 64 byte times no retransmission is performed and the end of frame buffer is closed with an LC error
indication.
Notes
Chapter 15
Programmable Serial Controllers (PSC)
15.1 Overview
The following sections are contained in this document:
• Section 15.2, PSC Registers—MBAR + 0x2000, 0x2200, 0x2400, 0x2600, 0x2800, 0x2C00
• Section 15.3, PSC Operation Modes
The MPC5200 has 6 independent Programmable Serial Controllers (PSCs)
:
Each PSC can be clocked by an internal clock source or an external clock source. In addition, each PSC module interfaces directly to the CPU
and consists of the following:
• Serial Communication Channel
• Programmable Transmit (Tx) Receive (Rx) Clock Generation
• Internal Channel Control Logic
• Interrupt Control Logic
PSC
Codec IrDA
PSC
The PSC can interface to a Codec through a serial port consisting of Tx and Rx serial data and serial bit-clock and frame signals. Digital sample
data is transferred to and from the Codec through the serial port. The PSCs support Codec mode with 8, 16, 24 and 32 bit data width and the
SPI and I2S operation modes. A Codec chip provides a data conversion interface for high-speed Modem designs meeting a high range of
standards, such as ITU-T V.34 and PCM. In addition the PSC provide an Mclk for the external Codec, eliminating the need for an external
crystal for the external device. For more information about the Codec mode see section: Section 15.3.2, PSC in Codec Mode.
AC97 defines an architecture for audio-intensive personal computer applications such as gaming, authoring, and high-resolution music and
video playback. An external AC97 analog device performs mixing, analog processing, and sample-rate DAC and ADC. PSC1 and PSC2 can
interface to the AC97 device through a serial port consisting of Tx and Rx serial data, a serial bit-clock input, and a frame sync output
generated by the PSC from the serial bit-clock. An MPC5200 General-Purpose I/O (GPIO) is used to reset the AC97 device. The PSC
transfers digital sample data as well as control/status information to and from the AC97 device through the serial port. For more information
about the AC97 mode see section: Section 15.3.3, PSC in AC97 Mode.
When programmed as a UART the PSC serial communication channel provides a full-duplex asynchronous receiver and transmitter deriving
an operating frequency from an internal clock. The transmitter converts parallel data from the CPU to a serial bit-stream, inserting appropriate
start, stop, and parity bits. It outputs the resulting stream on the channel transmitter serial data output (TxD). The receiver converts serial data
from the channel receiver serial data input (RxD) to parallel format, checks for start, stop, and parity bits, or line break conditions, and
transfers the assembled character onto the bus during read operations. The receiver may be poll-driven or interrupt-driven. For more
information about the UART mode see section: Section 15.3.1, PSC in UART Mode.
15.1.2 Features
General Features:
• 512-byte receiver (Rx) FIFO
• 512-byte transmitter (Tx) FIFO
• Each channel is programmable to normal (full-duplex), automatic echo, local loop-back, or remote loop-back mode
• Automatic Walk-up mode for multidrop applications
• 6 maskable interrupt conditions
• PSC Tx and Rx FIFOs can be programmed to interrupt either the BestComm or the CPU when they require filling or emptying,
respectively.
PSC UART mode:
• Each is clocked by an internal clock source (IPB clock), eliminating the need for an external crystal
• Full-duplex asynchronous/synchronous receiver/transmitter channel
• Programmable data format:
— five to eight data bits plus parity
— Odd, even, no parity, or force parity
— One, one-and-a-half, or two STOP bits
• Parity, framing, and overrun error detection
Register
Offset Register Name Access
width
PSC module operation is controlled by writing control bytes into the appropriate registers.
RESET: 0 0 1 0 0 0 0 0
RESET: 0 0 1 1 0 0 1 1
RESET: 0 0 1 1 0 0 1 1
0 RxRTS UART / SIR—Receiver request-to-send—Allows RTS output to control the CTS input of the
transmitting device to prevent receiver overrun. If both the receiver and transmitter are incorrectly
programmed for RTS control, RTS control is disabled for both. Transmitter RTS control is configured
in MR2[TxRTS]. Not used in Codec mode.
0 = Receiver has no effect on RTS.
1 = When a valid start bit is received, RTS is negated if the PSC FIFO is full. RTS is reasserted
when the FIFO has an empty position available.
other Modes—Reserved
2 — Reserved
3:4 PM UART—Parity mode—Selects the parity or multidrop mode for the channel. The parity bit is added
to the transmitted character, and the receiver performs a parity check on incoming data. The value
of PM affects PT, as shown Table 15-6. PM is not used in Codec mode.
other Modes—Reserved
5 PT UART—Parity Type—PM and PT together select parity type (PM = 0x) or determine whether a data
or address character is transmitted (PM = 11). PT is not used in Codec mode. See Table 15-6.
other Modes—Reserved
6:7 B/C UART—Bits per Character—Select the number of data bits per character to be sent. The values
shown do not include start, parity, or stop bits. B/C is not used in Codec mode.
00 = 5 bits
01 = 6 bits
10 = 7 bits
11 = 8 bits
other Modes—Reserved
10 No parity n/a
R CM TxRTS TxCTS SB
RESET: 0 0 0 0 0 0 0 0
R CM Reserved
RESET: 0 0 0 0 0 0 0 0
0:1 CM Channel mode—Selects a channel mode.CM is used in both UART and Codec modes.
00 = Normal
01 = Automatic echo
10 = Local loop-back
11 = Remote loop-back
3 TxCTS UART / SIR—Transmitter clear-to-send—If both TxCTS and TxRTS are enabled, TxCTS controls the
operation of the transmitter. TxCTS is not used in Codec mode.
0 = CTS has no effect on the transmitter.
1 = Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready
to send a character.
If CTS is asserted, the character is sent
If it is negated, the channel TxD remains in a high state and transmission is delayed until CTS is
asserted.
Changes in CTS as a character is being sent do not affect its transmission.
other Modes—Reserved
4:7 SB UART—Stop-Bit (length control)—Selects the stop bit length that is appended to the transmitted
character. Stop-bit lengths of 9/16th to 2 bits are programmable for 6-, 8-bit characters. Lengths of 1
1/16th to 2 bits are programmable for 5-bit characters. In all cases, the receiver checks only for a high
condition at the center of the first stop-bit position, that is, one bit-time after the last data bit or after
the parity bit, if parity is enabled. If an external 1x clock is used for the transmitter, clearing bit 3
selects 1 stop bit and setting bit 3 selects 2 stop bits for transmission. Not used in Codec mode, see
Table 15-9.
other Modes—Reserved
SB 5 Bits 6–8 Bits SB 5 Bits 6–8 Bits SB 5–8 Bits SB 5–8 Bits
0000 1.063 0.563 0100 1.313 0.813 1000 1.563 1100 1.813
0001 1.125 0.625 0101 1.375 0.875 1001 1.625 1101 1.875
0010 1.188 0.688 0110 1.438 0.938 1010 1.688 1110 1.938
0011 1.250 0.750 0111 1.500 1.000 1011 1.750 1111 2.000
ORERR
TxEMP
R RB FE PE
RxRDY
CDE Reserved
TxRDY
FFULL
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
TxEMP
RxRDY
R RB FE PE Reserved
TxRDY
FFULL
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R EOF Reserved
ORERR
URERR
RxRDY
TxRDY
FFULL
DEOF
PE
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
URERR
RxRDY
R Reserved Reserved
TxRDY
FFULL
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 RB/ UART / SIR —Received Break—detects breaks originating in middle of received character. Such a
EOF break must persist until the end of next detected character time.
0 = No break received.
1 = An all-0 character of the programmed length was received without a stop bit. RB is valid
only when RxRDY = 1. Only a single FIFO position is occupied when a break is received.
Further entries to FIFO are inhibited until RxD returns to high state for at least one-half bit-time,
which equals two successive PSC clock edges.
MIR / SIR—End of frame
0 = The next byte to be read from the RX-FIFO is not the last one of the frame.
1= The next byte to be read from the RX-FIFO is the last one of the frame. This bit is
effective when RxRDY=1.
other Modes—Reserved
2 PE UART / SIR—Parity Error—valid only if RxRDY = 1. PE is not used (always 0) in Codec mode.
0 = No parity error occurred.
1 = If MR1[PM]=0x (with parity or force parity), corresponding FIFO character was received
with incorrect parity. If MR1[PM]=11 (multidrop), PE stores received A/D bit.\
other Modes—Reserved
9:15 — Reserved
NOTE
The FIFO related status bits ORERR, URERR, RxRDY, FFUL and TxRDY will be changed only if
the peripheral (transmitter or receiver) access the FIFO. These bits reflect to the related bits in the
ISR, therefore only the peripheral side can generate a FIFO access interrupt. The bits in the RFSTAT
or TFSTAT register are also set. If the CPU side read from an empty FIFO or write to a full FIFO the
status bits in the RFSTAT or TFSTAT register will be set, but the status bit in the SR register are
unchanged. An access from the CPU side to the FIFO can’t generate an interrupt.
Table 15-14. Clock Select Register (0x04) for UART / SIR Mode
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8:15 — Reserved
R Reserved
W Reserved MISC TC RC
RESET: 0 0 0 0 0 0 0 0
0 — Reserved
101 reset break Clears the delta break bit, ISR[DB]. Command has no effect in Codec mode.
change
interrupt
10 receiver Immediately disables receiver. In UART mode any character being received is
disable lost. The command does not affect receiver status bits or other control registers.
• If the PSC module is programmed for local loop-back or multidrop mode, the
receiver operates even though this command is selected.
• If the receiver is already disabled, the command has no effect.
In Codec mode, if the receiver is disabled while a character is being received,
reception completes before the receiver becomes inactive.
R RB[0:15]
W Used by Tx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R RB[16:31]
W Used by Tx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R RB[0:15]
W Used by Tx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
W Used by Tx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R RB[0:15]
W Used by Tx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R RB[16:23] Reserved
W Used by Tx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R Used by Rx Buffer
W TB[0:15]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Used by Rx Buffer
W TB[16:31]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R Used by Rx Buffer
W TB[0:15]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Used by Rx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R RB[0:15]
W Used by Tx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R RB[16:23] Reserved
W Used by Tx Buffer
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:19 RB AC97 (0:19)—Transmit data—AC97 data must be written one complete sample at a time, where
(AC97) all samples except timeslot #0 are 20 bits. Timeslot #0 data is in bits 0:15. Bit 20 is 1 in the first
or sample of a new frame.
0:31 Bit 20 contains the “Start of Frame Indicator” SOF:
(other)
0 = RB[0:19] is not the first sample in the frame.
1 = RB[0:15] is the first sample in a new frame. The number 0 slot is called the TAG slot.
The bits [21:31] are reserved at this mode.
UART/SIR/MIR/FIR/Codec8 (0:31)—Transmit data—For these modes, data can be written 1, 2
or 4 bytes at a time. For one byte at a time, all bytes must be written to bits 0:7. For 2 bytes at a
time, data must be written to bits 0:15. Lower-bit data is stored before upper-bit data.
Codec16 (0:31)—Transmit data—For these modes, data can be written 2 or 4 bytes at a time.
For 2 bytes at a time, data must be written to bits 0:15. Lower-bit data is stored before upper-bit
data.
Codec24 (0:23)—Transmit data—For these modes, data must be written 4 bytes at a time. The
lower 24 bits contain the valid data word.
Codec32 (0:31)—Transmit data—For these modes, data must be written 4 bytes at a time.
W Used by ARC
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
W Used by ARC
RESET: 0 0 0 0 0 0 0 0
4:5 — Reserved
R Used by IPCR
RESET: 0 0 0 0 0 0 0 0
0:5 — Reserved
ORERR
URERR
R IPC Reserved DB
RxRDY
Reserved
TxRDY
FFULL
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
URERR
RxRDY
TxRDY
FFULL
DEOF
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Table 15-27. Interrupt Mask Register (0x14) for UART / SIR Mode
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 lsb
R Reserved
ORERR
URERR
RxRDY
W IPC Reserved DB Reserved
TxRDY
FFULL
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R Reserved
Reserved
W IPC Reserved Reserved
ORERR
URERR
RxRDY
TxRDY
FFULL
DEOF
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 :2 — Reserved
9:15 — Reserved
R Reserved
W CTUR[0:7]
RESET: 0 0 0 0 0 0 0 0
0:7 CTUR Code—Frame Sync Length, define the number of Bit clocks during the frame sync signal is
active.
Frame Sync Lenght = CTUR[0:7]+1
UART/ SIR/ SPI —Baud rate prescale value.
See next section, Section 15.2.13, Counter Timer Lower Register (0x1C)—CTLR
Other—Reserved
R Reserved
W CTLR[0:7]
RESET: 0 0 0 0 0 0 0 0
0:7 CTLR UART—Baud rate prescale value. The Baud rate is calculated as:
CT[0:15] where:
DTL =
IPB clock frequency CT[0:15] = {CTUR[0:7], CTLR[0:7]}
Other—Reserved
R FrameSyncDiv[0:7] BitClkDiv[0:7]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
R Reserved BitClkDiv[0:7]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FrameSyncDiv[0:7] + 1)
DSCKL delay =
Mclk Frequency
other Modes—Reserved
Note: The value 0x00 stops this counter and disables the clock generator.
Mclk Frequency
SCK frequency =
BitClkDiv[0:7] + 1
Mclk Frequency
IrdaClk frequency =
BitClkDiv[0:7] + 1
other Modes—Reserved
Note: The value 0x00 stops this counter and disables the clock generator.
The Mclk frequency is generated in the Clock Distribution Module (CDM) by dividing down the fsystem frequency as follows:
fsystem
Mclk =
MclkDiv [8:0] + 1
There is a separate cdm_pscX_bitclk_config register in the CDM for each of PSC1,2,3 and 6, which are the PSCs available for use in Codec
modes. These cdm_pscX_bitclk_config registers are further described in the CDM Section 5.5.11, PSC1 Mclock Config Register—MBAR +
0x0228 to Section 5.5.14, PSC6 (IrDA) Mclock Config Register—MBAR + 0x0234.
R IVR[0:7]
RESET: 0 0 0 0 0 0 0 0
RESET: 1 1 1 1 1 1 0 0
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET 1 1 1 1 1 1 0 0
:
2:5 — Reserved
R Reserved
W RES RTS
RESET: 0 0 0 0 0 0 0 0
0:5 — Reserved
7 RTS AC97—Reserved
other Modes—Assert RTS output.
0 = No operation
1 = Asserts output port RTS, (RTS becomes 0)
R Reserved
W RES RTS
RESET: 0 0 0 0 0 0 0 0
0:5 — Reserved
7 RTS AC97—Reserved
other Modes—Assert RTS output.
0 = No operation
1 = Negates output port RTS, (RTS becomes 1).
RESET: 0 0 0 0 0 0 0 0
8 9 10 11 12 13 14 15
RESET: 0 0 0 1 0 0 0 0
16 17 18 19 20 21 22 23 msb
RESET: 0 0 0 0 0 0 0 0
0 ACRB AC97—AC97 Cold Reset to the transceiver in PSC. This bit was prepared for backward
compatibility with the MCF5407 USART. It is recommended to use OP1 and OP0 registers to
set and to reset AC97 reset line.
0 = The transceiver recovers from low power mode in AC97.
1 = The transceiver stays in the current state.
other Modes—Reserved
1 AWR AC97—AC97 Warm Reset (to the PSC and off-chip AC97 Codec)
0 = AC97 warm reset is negated. RTS output functions normally as the AC97 frame sync.
1 = Force “1” on RTS output, which is used as the AC97 frame sync, and the PSC recovers
from AC97 power down mode.
other Modes—Reserved
8 GenClk Codec—Generate Bit Clock and Frame Sync, not used to enable the SPI master mode, use
the MSTR bit of the this register
0 = use bit clock and frame sync provided by external device
1 = use bit clock and frame sync generated internally from Mclk
MIR / FIR—Generate Bit Clock and Frame Sync
0 = use for clock generation the external Clk from Pad IR_USB_CLK
1 = use for clock generation the internal Mclk
other Modes—Reserved
9 MultiWd Codec—Multi Word mode
0 = PSC send and receive only one data word per frame even if the frame length is greater
than the word length.
1 = PSC send and receive more the one data word per frame, if the frame length is greater
than the word length. The PSC send only complete data words. This bit is used to support
the I2S mode. See Figure 15-14
other Modes—Reserved
13 Cell2xClk Codec —Cell Slave 2x Clock Frequency - takes effect only when bit 12 CellSlave = 1
0 = PSC Mclk frequency = Bit Clock from PSC1 master
1 = PSC Mclk frequency = 2x the Bit Clock from PSC1 master
other Modes—Reserved
14:15 — Reserved
17 MSTR Codec—SPI Master mode - takes effect only when bit 16 SPI mode = 1
0 = PSC behaves as an SPI slave
1 = PSC behaves as an SPI master
other Modes—Reserved
18 CPOL Codec—SPI Clock Polarity - takes effect only when bit16 SPI mode = 1
This bit selects an inverted or non-inverted SPI clock. To transmit data between SPI
modules, the SPI modules must have identical CPOL values
Active-low clocks selected; SCK idles high
Active-high clocks selected; SCK idles low
other Modes—Reserved
20 UseEOF Codec—Use End-of-Frame flag takes effect only when bit 16 SPI mode = 1
0 = either 1, 2 or 4 bytes are transferred while Slave Select (SS) is held low, as determined
by Codec8, Codec16, Codec24 or Codec32 being selected by SICR[SIM]
1 = multiple bytes are transferred while maintaining SS low, up to and including the next
byte read from the Tx FIFO that has its EOF flag set
other modes—Reserved
21:23 — Reserved
RESET: 0 0 0 0 0 0 0 0
R Reserved
RESET: 0 0 0 0 0 0 0 0
0:4 — Reserved
R IRSTIM[0:7]
RESET: 0 0 1 1 0 1 1 0
Table 15-46. Infrared SIR Divide Register (0x48) for other Modes
msb 0 1 2 3 4 5 6 7 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0
Table 15-47. Infrared MIR Divide Register (0x50) for MIR Mode
msb 0 1 2 3 4 5 6 7 lsb
R FREQ M_FDIV
RESET: 0 0 0 0 0 0 0 0
Table 15-48. Infrared MIR Divide Register (0x50) for other Modes
msb 0 1 2 3 4 5 6 7 lsb
R Reserved
RESET 0 0 0 0 0 0 0
:
1:7 M_FDIV MIR—Clock divide ratio in MIR mode. The bit frequency is derived by:
f IrdaClk
f bit = -------------------------------
M_FDIV + 1
This bit frequency should be 0.576 or 1.152 MHz. In order to send a quarter bit duration pulse
and receive minimum pulse described in the IrDA spec, (M_FDIV + 1) should be a factor of 4
and larger than or equal to 8. Table 15-49 shows the selectable divide factor and the input clock
frequency on IrdaClk port. For more informations about the frequency generation see also
Figure 15-20,Section 15.2.14, Codec Clock Register (0x20)—CCR and Section 15.3.5, PSC in MIR
Mode.
other Modes—Reserved
R Reserved F_FDIV
RESET: 0 0 0 0 0 0 0 0
Table 15-51. Infrared FIR Divide Register (0x54) for other Modes
msb 0 1 2 3 4 5 6 7 lsb
R Reserved
RESET: 0 0 0 0 0 0 0
0:3 — Reserved
This bit frequency should be 8 MHz. In order to receive the minimum pulse width described in
the IrDA spec, (F_FDIV + 1) should be larger than or equal to 4. Table 15-52 shows several
frequency selection. For more informations about the frequency generation see also Figure
15-20, Section 15.2.14, Codec Clock Register (0x20)—CCR and Section 15.3.6, PSC in FIR Mode.
other Modes—Reserved
0x3 32.0
0x4 40.0
0x5 48.0
0x6 56.0
0x7 64.0
0x8 72.0
0x9 80.0
0xA 88.0
... ...
R Reserved COUNT[8:0]
W Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
R Reserved COUNT[8:0]
W Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 — Reserved
Frame[2]
Frame[1]
Frame[0]
ALARM
EMPTY
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:7 Frame[3:0] Frame indicator. Not applicable to PSC FIFO’s, since the PSCs do not recognize frame
formats in the serial data stream.
8 — Reserved
9 Error FIFO error. A FIFO error has occurred due to either underflow, overflow, or read or write
pointer out of bounds.This bit is cleared by writing a ‘1’ to it.
10 UF Underflow. The read pointer has surpassed the write pointer due to the FIFO having been
read when it contained no data. This bit is cleared by writing a ‘1’ to it.
11 OF Overflow. The write pointer has surpassed the read pointer due to the FIFO having been
written when it was already completely full of data. This bit is cleared by writing a ‘1’ to it.
12 FR Frame ready. Not applicable to PSC FIFO’s, since the PSCs do not recognize frame
formats in the serial data stream.
14 ALARM The FIFO is requesting service from either BestComm or CPU. See Section 15.2.30, Rx
FIFO Alarm (0x6E)—RFALARM for a detailed description.
RESET: 0 0 0 0 1 0 0 1
0:1 — Reserved
2 WFR Write frame. Not applicable to PSC FIFOs, since the PSCs do not recognize frame formats in
the serial data stream.
3 COMP Re-enable requests on frame transmission completion. Not applicable to PSC FIFOs, since
the PSCs do not recognize frame formats in the serial data stream.
4 FRAME Frame mode enable. THIS BIT MUST BE CLEARED BY WRITING A ‘0’ TO IT, since the PSCs
do not recognize frame formats in the serial data stream.
5:7 GR[2:0] Last transfer granularity. Amount of data remaining in the Rx FIFO at which the ALARM bit in
the status register will go low/inactive. See Section 15.3.7, PSC FIFO System for details.
R Reserved ALARM
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:15 ALARM “Almost full” threshold level. Amount of empty space remaining in the Rx FIFO at which the
ALARM bit in the status register goes high/active. See Section 15.3.7, PSC FIFO System for
details.
R Reserved R_PTR
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:15 R_PTR Read pointer.This FIFO-maintained pointer points to the next FIFO location to be read.
R Reserved W_PTR
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:15 W_PTR Write pointer.This FIFO-maintained pointer points to the next FIFO location to be written to.
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 lsb
R Reserved LFP
RESET 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
:
0:3 — Reserved
4:15 LFP Last Frame Pointer. Not applicable to PSC FIFOs, since the PSCs do not recognize frame
formats in the serial data stream.
0:3 — Reserved
4:15 LFP Last Frame Pointer. Not applicable to PSC FIFOs, since the PSCs do not recognize frame
formats in the serial data stream.
Frame[2]
Frame[1]
Frame[0]
ALARM
EMPTY
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:7 Frame[3:0] Frame indicator. Not applicable to PSC FIFOs, since the PSCs do not recognize frame
formats in the serial data stream.
8 — Reserved
9 Error FIFO error. A FIFO error has occurred due to either underflow, overflow, or read or write
pointer out of bounds.This bit is cleared by writing 1 to it.
10 UF Underflow. The read pointer has surpassed the write pointer due to the FIFO having been
read when it contained no data. This bit is cleared by writing 1 to it.
11 OF Overflow. The write pointer has surpassed the read pointer due to the FIFO having been
written when it was already completely full of data. This bit is cleared by writing 1 to it.
12 FR Frame ready. Not applicable to PSC FIFOs, since the PSCs do not recognize frame formats
in the serial data stream.
13 FULL Full. The FIFO is completely full of data.
14 ALARM The FIFO is requesting service from either BestComm or CPU. See Section 15.3.7, PSC
FIFO System for a detailed description.
15 EMPTY FIFO Empty. The FIFO is completely empty.
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 1 0 0 1
0:1 — Reserved
2 WFR Write frame. Not applicable for PSC FIFOs, since the PSCs do not recognize frame formats in
the serial data stream.
3 COMP Re-enable requests on frame transmission completion. Not applicable to PSC FIFO’s, since
the PSCs do not recognize frame formats in the serial data stream.
4 FRAME Frame mode enable. THIS BIT MUST BE CLEARED BY WRITING A ‘0’ TO IT, since the PSCs
do not recognize frame formats in the serial data stream.
5:7 GR[2:0] Last transfer granularity. Four times this value is the amount of data remaining in the FIFO at
which the ALARM bit in the status register will go low/inactive. See Section 15.3.7, PSC FIFO
System for details.
R Reserved ALARM
RESET: 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1
0:3 — Reserved
4:15 ALARM “Almost empty” threshold level. Amount of data remaining in the Tx FIFO at which the ALARM
bit in the status register goes high/active. See Section 15.3.7, PSC FIFO System for details
R Reserved R_PTR
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:15 R_PTR Read pointer.This FIFO-maintained pointer points to the next FIFO location to be read
R Reserved W_PTR
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:15 W_PTR Write pointer.This FIFO-maintained pointer points to the next FIFO location to be written to
R Reserved LFP
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:15 LFP Last Frame Pointer. Not applicable to PSC FIFOs, since the PSCs do not recognize frame
formats in the serial data stream
R Reserved LFP
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:3 — Reserved
4:15 LFP Last Frame Pointer. Not applicable to PSC FIFOs, since the PSCs do not recognize frame
formats in the serial data stream
IRDA no no no no no yes
Mclk Clock from the Mclk divider, used as clock input for internal clock generation
or as clock output to an external device. Before modify the counter value the
Mclk divider must be disable. See Section 5.5.11, PSC1 Mclock Config
Register—MBAR + 0x0228 to Section 5.5.14, PSC6 (IrDA) Mclock Config
Register—MBAR + 0x0234.
fsystem
Mclk =
MclkDiv[8:0] +1
IP bus Clock Intellectual Property Clock for the internal IP bus system, 33, 66 or 132 MHz,
see Section 5.5, CDM Registers
PSC DCD
Port RTS
Clock
Generation Unit Control
IPB Clock
CSR Logic CTS
{CTUR:CTLR}
External
IPB Interface
Interface RxD Signals
Rx FIFO Receiver
CommBus
Interface
IRQ TxD
Tx FIFO Transmitter
Controller
BestComm
Request
An internal interrupt request signal (IRQ) is provided to notify the Interrupt Controller of an interrupt condition. The output is the logical NOR
of unmasked ISR bits. The interrupt level of a PSC module is programmed in the Interrupt Controller in the system integration module:
Chapter 7, System Integration Unit (SIU). The PSC uses the autovector for the programmed interrupt level.
The PSC can automatically transfer data using the BestComm, rather than interrupting the core. When IMR[FFULL] is 1 and Rx FIFO is full,
it can send an interrupt to a BestComm channel so the FIFO data can be transferred to memory.
Table 15-71 briefly describes the PSC module signals.
NOTE
The terms “assertion” and “negation” are used to avoid confusion between active-low and active-high
signals.
– Asserted indicates a signal is active, independent of the voltage level
– Negated indicates a signal is inactive.
Table 15-71. PSC Signal Description for UART Mode
Signal Description
TxD Transmitter Serial Data Output—TxD is held high (mark condition) when Tx is disabled, idle, or operating
in the local loop-back mode. Data is shifted out on TxD on the falling edge of the clock source, with the least
significant bit (lsb) sent first.
RxD Receiver Serial Data Input—Data received on RxD is sampled on the rising edge of the clock source, with
the lsb received first.
RS-232
PSC Transceiver
RTS DI2
CTS DO2
TxD DI1
RxD DO1
IPB Clock
Baud rate =
32 x divider {CTUR:CTLR}
Let Baud rate = 9600, the divider can be calculated as follows:
66 MHz
Divider = = 215(decimal) = 0x00D7
32 x 9600
Therefore CTUR = 0x00 and CTLR = 0xD7.
PSC
TxD Tx Buffer
Tx
16-Bit
Divider 32x Prescaler
{CTUR:CTLR} IPB
Rx Clock
RxD Rx Buffer
• If the transmitter receives a disable command, it continues until any character in the Tx shift register is completely sent.
• If the transmitter is reset through a software command, operation stops immediately.
NOTE
The transmitter is re-enabled through the CR to resume operation after a disable or software reset.
• If the clear-to-send operation is enabled, CTS must be asserted for the character to be transmitted.
• If CTS is negated in the middle of a transmission, the character in the shift register is sent and TxD remains in mark state until
CTS is reasserted.
• If the transmitter is forced to send a continuous low condition by issuing a send break command, the transmitter ignores the state of
CTS.
• If the transmitter is programmed to automatically negate RTS when a message transmission completes, RTS must be asserted
manually before a message is sent.
In applications in which the transmitter is disabled after transmission is complete and RTS is appropriately programmed, RTS is negated
one bit-time after the character in the shift register is completely transmitted. The transmitter must be manually re-enabled by reasserting RTS
before the next message is to be sent.
Figure 15-5 shows the transmitter functional timing information.
C1 in transmission
Transmit
Enabled
SR [TxRDY]
internal
module W2 W W W W W W W
select C11 C2 C3 Start C4 Stop C5 C6
break break not
transmitted
CTS 3
NOTE:
1. Cn = transmit characters
2. W = write
3. MR2[TxCTS] = 1
4. MR2[TxRTS] = 1
TxD C1 C2 C3 C4 C5 C6 C7 C8
SR [RxRDY]
SR [FFULL]
Internal
Module
Select Status Status Status Status
Data Data Data Data
C5 is
(C1) lost (C2) (C3) (C4)
Overrun Reset by
SR [ORERR ] command
When the receiver detects a high-to-low (mark-to-space) transition of the start bit on RxD, the state of RxD is sampled. It samples each 16×
clock for eight clocks, starting one-half clock after the transition (asynchronous operation) or at the next rising edge of the bit-time clock
(synchronous operation).
• If RxD is sampled high, start bit is invalid; a valid start bit search begins again.
• If RxD is still low, a valid start bit is assumed and receiver continues sampling input at 1-bit time intervals at the theoretical center
of the bit. This continues until the proper number of data bits and parity, if any, is assembled and 1 stop bit is detected.
RxD input data is sampled on the rising edge of the programmed clock source. The lsb is received first. Data is then transferred to a receiver
holding register and SR[RxRDY] is set. If the character is less than 8bits, the most significant unused bits in the receiver holding register are
cleared.
If the MR2[TxRTS] bit was set to one then the user must control the RTS line by writing to the output port register. For all user generated
commands to the UART receiver, like enable RX, disable RX or set break, the user must set the associated RTS signal by writing the OP0
or OP1 register. But the UART receiver automatically deassert the RTS signal if the number of received data words reached the FIFO alarm
level and deassert the RTS line if the number of words in the FIFO falls under the granularity level.
After the stop bit is detected, the receiver immediately looks for the next start bit.
• If a non-zero character is received without a stop bit (framing error) and RxD remains low for one-half of bit period after stop bit
is sampled, the receiver operates as if a new start bit were detected. Parity error (PE), framing error (FE), overrun error (ORERR),
and received break (RB) conditions set respective error and break flags in SR at the received character boundary and are valid only
if SR[RxRDY] is set.
• If a break condition is detected (RxD is low for the entire character including the stop bit), a character of all 0s is loaded into the
Receiver Shift Register and SR[RB,RxRDY] are set. RxD must return to a high condition for at least one-half bit-time before a
search for the next start bit begins.
The receiver will detect the beginning of a break in the middle of a character, if the break persists through the next character time.
• If the break begins in the middle of a character, the receiver places the damaged character in the Rx FIFO stack and sets the
corresponding SR error bits and SR[RxRDY].
• If the break lasts until the next character time, the receiver places an all-0 character into the Rx FIFO and sets SR[RB,RxRDY].
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled by the work
before.
MR1 0xXX Select Error Mode, Parity Mode and the Parity Type
MR2 0xXX Select Channel Mode, Port Control and Stop-Bit Length
CTUR 0x00 set the Baud rate to 9600 with IPB clock frequency 66 MHz
CTLR 0xD7
Port_Config 0x00000005 Select the Pin-Muxing for UART mode for PSC1, see Chapter 2, Signal
Descriptions
The important register to configure the PSC for Codec mode are:
• SICR register - select the Codec mode
• for master mode:
— cdm_pscX_bitclk_config - select Mclk frequency, see Section 5.5.11, PSC1 Mclock Config Register—MBAR + 0x0228
— cdm_clock_enable_register- enable Mclk, see Section 5.5.6, CDM Clock Enable Register—MBAR + 0x0214
— CCR- select BitClk and Frame Frequency
— CTUR - select Frame width
• RFALARM, TFALARM - select the FIFO “Alarm” level
• CR register - enable or disable receiver and transmitter
• Port_config - select the right Pin-Muxing, Chapter 2, Signal Descriptions
BitClk
fsystem Mclk Clock
Mclk
Divider Generation Frame
MclkDiv[8:0]+1 Unit
BitClkDiv[0:7]+1
External
IPB Interface
Interface RxD Signals
Rx FIFO Receiver
CommBus
Interface
IRQ TxD
Tx FIFO Transmitter
Controller
NOTE
Here is important difference between PSC6 and the other PSCs. To work with PSC6 in slave mode
(CODEC slave, SPI slave), the ext_48MHz_en bit in the
cdm_48mhz_fractional_divider_configuration register must be set to one. If this bit was set to zero
then the internal 48 Mhz clock generator drive the clock line. For more informations see Section 5.5.5,
CDM 48MHz Fractional Divider Configuration Register—MBAR + 0x0210.
MC143416
PSC1/PSC2 Codec
FRAME SSYNC0
CLK SCLK0
TxD SRx0
RxD STx0
Signal Description
TxD Transmitter Serial Data Output—Data is shifted out on TxD on the falling or rising edge of the clock source.
Transfers can be specified as either lsb or msb first. TxD is held low when Tx is disabled or idle.
- data shifted out on the rising edge of CLK if SICR[ClkPol] = 0
- data shifted out on the falling edge of CLK if SICR[ClkPol] = 1
and
- data send msb first if SICR[SHDIR] = 0
- data send lsb first if SICR[SHDIR] = 1
RxD Receiver Serial Data Input—Data received on RxD is sampled on the falling or rising edge of the clock
signal. Transfers can be specified as either lsb or msb first.
- data sampled on the rising edge of CLK if SICR[ClkPol] = 1
- data sampled on the falling edge of CLK if SICR[ClkPol] = 0
and
- data sampled msb first if SICR[SHDIR] = 0
- data sampled lsb first if SICR[SHDIR] = 1
Frame Frame Sync—In Codec mode Frame can be driven from an external Codec or can be generate by the
internal clock logic. Frame can be programmed as active High or active Low.
- the frame sync input from the external Codec if SICR[GenClk] = 0
- the frame sync output to the external Codec if SICR[GenClk] = 1
and
- frame sync is active low if SICR[SyncPol] = 0
- frame sync is active high if SICR[SyncPol] = 1
The source for the internal clock generation is the MclkDiv clock divider in CDM module. The CDM provides for each Codec PSC (1, 2, 3
and 6) a separate Mclk and MclkDiv clock divider. For more information about the fsystem clock see also Section 5.5.11, PSC1 Mclock Config
Register—MBAR + 0x0228. The PSC provides the clock to the external Codec divided independently whether the PSC configured as a master
(provide BitClk and Frame) or as a slave (receive the clock signals). These dividers generate the Mclks by dividing the fsystem clock as follows:
fsystem
Mclk =
MclkDiv [8:0] +1
BitClk = Mclk
CCR[8:15] +1
BitClk
Frame =
CCR[0:7] +1
When the frame sync is an output its pulse width can programmed by the register CTUR. This register defines the number of BitClk cycle
during the Frame signal is active. The default reset value for this register is 0x00 therefore the default frame sync width is one BitClk. See the
calculation below:
PSC 1
Clock
multiply by 2 PSC2, 3 or 6 configured as master, provide BitClk and
Frame, but called “cell phone slave”, receive clock
from PSC1.
BitClk SICR[GenClk] = 1, master mode
Clock
Frame Gener- SICR[CellSlave] = 1, use clock from PSC1 (normal or
ation double clock)
Mclk
Baud Rate = SCK =
BitClkDiv[0:7] + 1
When in SPI master mode, the delay between SS going low/active and the first SCK transition of the serial transfer (DSCKL delay) is created
by dividing down the Mclk frequency as follows:
SCK
SS
MOSI
MISO
NEXT
FRAME
TX FIFO DSCKL DTL
EMPTY
TX
ENABLE
NOTE
The PSC starts to generate the SCK if the transmitter is enabled and the Tx FIFO is not empty!
SICR[SHDIR] controls whether bits are shifted out msb or lsb first. After the 8-, 16-, 24- or 32-bit sample is sent, 0’s are sent until the next
frame sync.
In Codec 24 mode each 24-bit data sample uses an entire 32-bit longword in the Tx FIFO. The least significant (right-hand) byte is not used.
Data should be written to the Tx FIFO four bytes at a time.
Figure 15-12 and Figure 15-13 shows a Codec interface timing diagram example.
CLK
CLK
TxD D7 D6 D5 D1 D0
RxD D7 D6 D5 D1 D0
Figure 15-13. Timing Diagram—8-Bit Codec Interface (msb First)
The Frame pulse width makes no difference. SICR[SHDIR] controls whether the sample is shifted in msb or lsb first. After the complete
sample is received, the receiver shift register shuts off until the next frame sync occurs.
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled by the work
before.
SICR 0x02100000 Select the 16 bit Codec mode, msb first, DTS1 = 0, slave mode
Port_Config 0x00000006 Select the Pin-Muxing for PSC1 Codec mode, see Chapter 2, Signal Descriptions
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled
by the work before.
SICR 0x3FA00000 Select the 32bit Codec mode, lsb first, DTS1 = 1, master mode
cdm_psc2_bitclk_config 0x800F divide the fsystem clock frequency from 528 to 33MHz Mclk, see
Section 5.5.12, PSC2 Mclock Config Register—MBAR + 0x022C
cdm_clock_enable_register 0x00000040 enable Mclk, see Section 5.5.6, CDM Clock Enable Register—MBAR +
0x0214
Port_Config 0x00000070 Select the Pin-Muxing for PSC2 Codec mode, Mclk output enabled,
see Chapter 2, Signal Descriptions
15.3.2.4.3 PSC 1 in Cell Phone Master Mode, PSC2 is Cell Phone Slave
• use PSC1 as cell phone master
• use PSC2 as cell phone slave
• both PSC work as 24bit data
• Data are sampled on the falling edge of BitClk
• Frame is high true
• msb first, transfer starts on the leading edge of Frame
• PSC2 divide the clock from PSC1 by 2
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled by the work
before.
SICR 0x07100000 Select the 24bit Codec mode, msb first, DTS1 = 0, slave mode
Port_Config 0x00000066 Select the Pin-Muxing for PSC1,PSC2 Codec mode, seeChapter 2, Signal
Descriptions
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled by the work
before.
SICR 0x07980000 Select the 24bit Codec mode, msb first, DTS1 = 0, master mode, cell phone
master
Port_Config 0x00000066 Select the Pin-Muxing for PSC12, PSC2 Codec mode, see Chapter 2, Signal
Descriptions
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled by the work
before.
SICR 0x01009000 Select the 8bit Codec SPI slave mode, msb first, CPOL = 0; CPHA = 1
Port_Config 0x00000060 Select the Pin-Muxing for PSC2 Codec mode, see Chapter 2, Signal Descriptions
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled
by the work before.
SICR 0x0F00E000 Select the 32bit Codec SPI master mode, msb first, CPOL = 1,CPHA
=0
cdm_psc345_bitclk_config 0x8020 divide the fsystem clock frequency from 528 to 16 MHz Mclk, see
Section 5.5.13, PSC3 Mclock Config Register—MBAR + 0x0230
cdm_clock_enable_register 0x00000080 enable Mclk, see Section 5.5.6, CDM Clock Enable Register—MBAR +
0x0214
CTLR 0x84
Port_Config 0x00000600 Select the Pin-Muxing for PSC3 Codec mode, see: Chapter 2, Signal
Descriptions
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled
by the work before.
SICR 0x2FE00000 Select the 32bit Codec I2S master mode, msb first, DTS1 =1, send
more than one data word per frame.
cdm_psc1_bitclk_config 0x8020 divide the fsystem clock frequency from 528 to 16 MHz Mclk, see
Section 5.5.11, PSC1 Mclock Config Register—MBAR + 0x0228
cdm_clock_enable_register 0x00000020 enable Mclk, see Section 5.5.6, CDM Clock Enable Register—MBAR +
0x0214
Port_Config 0x00000006 Select the Pin-Muxing for PSC1 Codec mode, see Chapter 2, Signal
Descriptions
Frame is active low, SyncPol = 0 Data shifted out on the falling edge, ClkPol =1
LRCK (Frame)
SCLK (CLK)
DTS1 = 1
Frame width = 32
PSC
BitClk
Clock
Generation Sync
Unit
IPB
Interface Sdata_in
Rx FIFO Receiver
CommBus External
Interface Interface
Signals
IRQ Sdata_out
Tx FIFO Transmitter
Controller
Reset Res
Logic
Figure 15-15 shows the simplified PSC Block Diagram for AC97 mode. The BitClk is an input from the external Codec. The PSC divide
BitClk by 256 to generate a Frame pulse (Sync) that is high for 16 BitClk cycles. The table below shows the Pin definition for the AC97 mode
and the Figure 15-16 shows an AC97 interface. An MPC5200 general-purpose I/O (GPIO) is used as a reset to the external AC97 device.
Table 15-82. PSC Signal Description for AC97 Mode
Signal Description
Sdata_out Transmitter Serial Data Output—Data is shifted out on TxD on the rising edge of the clock signal.
Transfers must be specified as msb first.
Sdata_in Receiver Serial Data Input—Data received on RxD is sampled on the falling edge of the clock signal.
Transfers must be specified as msb first.
Sync In AC97 mode Sync is the frame sync, or start-of-frame (SOF), output to the external AC97 Controller.
In this mode the AC97 BitClk, which is input on CLK, is divided by 256 to generate the Sync.
BitClk BitClk— In AC97 mode CLK must be driven by the serial bit-clock from the external AC97 Controller.
AC97 Controller
AC97 Codec
PSC1/PSC2
SDATA_OUT SDATA_OUT
SDATA_IN SDATA_IN
GPIO RESET
CLK
TxD bit1 bit2 bit13 bit14 bit15 bit16 20 bits 20 bits 20 bits
Slot 2 Slot 3 Slot 13 Slot 1
RxD bit1 bit2 bit13 bit14 bit15 bit16 20 bits 20 bits 20 bits
Slot 2 Slot 3 Slot 13 Slot 1
Slot 1
Frame
For more AC97 Controller interface information, refer to the Audio Codec’97 Component Specification.
Because Rx data is sampled on the falling edge of the BitClk, for transmit purposes, the frame has already started when the receiver detects
a Codec-ready condition. For this reason, transmission starts at the next frame sync after the Codec-ready condition is detected. The PSC stops
transmission at the end of the frame in which the first bit of the received frame is detected low (Codec not ready). During transmission, the
PSC fills each of the 13 AC97 frame time slots with samples from the Tx FIFO.
NOTE
Step 2 (above) is required so that the PSC knows when an AC97 cold reset is occurring.
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled by the work
before.
Port_Config 0x00000020 Select the Pin-Muxing for AC97 mode PSC 2, see Chapter 2, Signal Descriptions
PSC
IPB Clock Clock
Generation
Unit
{CTUR:CTLR}
IPB
Interface IRDA_RX
Rx FIFO Receiver
External
CommBus
Interface
Interface
Signals
IRDA_TX
IRQ Transmitter
Controller Tx FIFO
BestComm
Request
lsb msb
start data bits(8 bit) stop
bit bit
UART data 0 1 0 1 0 1 1 0 0 1
format
SIR data
format
3/16 of the bit width
or 1.6 µs
Figure 15-19. Data Format in SIR Mode
NOTE
Please choose first the desired mode (SIR mode) than configure the port (write to port_config
register). This sequence will avoid pulses on the TX line during port configuration. This is very
important for all IrDA (SIR, MIR, and FIR) modes.
For more informations regarding the pulse width and Baud rate calculations see Section 15.2.22, Infrared SIR Divide Register (0x4C)—IRSDR
and Section 15.2.12, Counter Timer Upper Register (0x18)—CTUR.
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was enabled by the work
before.
IRSDR 0x6A set counter for SIR pulse width for IPB clock 66 MHz
CTUR 0x00 set the Baud rate to 9600 with IPB clock frequency 66 MHz
CTLR 0xD7
Port_Config 0x00500000 Select the Pin-Muxing for IrDA mode, see Section 15.3.4, PSC in SIR Mode
Clock
fsystem Mclk Clock 0 Generation
Divider divider 1 Unit
MclkDiv[8:0]+1 Mclk BitClkDiv[0:7]+1 IrdaClk IRMDR[1:7] for MIR mode
IRFDR[4:7] for FIR mode
SICR[GenClk]
IPB
Interface IRDA_RX
Rx FIFO Receiver
CommBus External
Interface Interface
Signals
IRDA_TX
IRQ Transmitter
Controller Tx FIFO
BestComm
Request
For MIR and FIR mode the clock for the transmitter and receiver is generated by dividing down from the internal Mclk or from an external
clock. If the bit GenClk in the SICR was set to “1” then PSC generate the clock from the internal source. The clock from the Mclk generator
goes through a predivider to the clock generation. See Section 15.2.23, Infrared MIR Divide Register (0x50)—IRMDR or Section 15.2.24,
Infrared FIR Divide Register (0x54)—IRFDR for the possible frequencies for this mode. For more informations about the Mclk divider see
Section 5.5.11, PSC1 Mclock Config Register—MBAR + 0x0228. If the bit GenClk cleared then the PSC use the clock from an external source
for the clock generation.
NOTE
If the CCR register was not changed (reset value 0x01) then the counter divide the clock (Mclk) by
2. This is the minimum value. 0x00 deactivate the clock generation.
Flag character FE
binary data 0 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 0 1 0 1
The STA represents the start of the frame and the STO represents the end of the frame. Both of STA and STO are defined as 01111110 in
binary format. Like the UART mode, the MIR mode sends the lsb first.The FCS is a 16 bit CRC defined as
16 12 5
CRC ( x ) = x +x +x +1
NOTE
The MIR module doesn’t support the CRC generation. If the transfer require a CRC Field use the
CRC generation from the BestComm module. See also Chapter 13, BestComm.
8.7µs
1.6µs
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was
enabled by the work before.
cdm_irda_bitclk_config 0x80012 set Mclk to 27.78 Mhz, see Section 5.5.11, PSC1 Mclock Config
Register—MBAR + 0x0228
cdm_clock_enable_register 0x00000010 enable Mclk, see Section 5.5.6, CDM Clock Enable Register—MBAR
+ 0x0214
Port_Config 0x00F00000 Select the Pin-Muxing for IrDA mode, see Chapter 2, Signal
Descriptions
The preamble (PA) field is used by a receiver to establish phase lock. After receiving the start flag (STA), the receiver begin to interpret the
4PPM encoded symbols. The receiver continues receiving until it receives the stop flag (STO). Like the UART mode, the FIR mode sends the
lsb first. For more informations regarding the pulse width and Baud rate calculations see Section 15.2.24, Infrared FIR Divide Register
(0x54)—IRFDR. The FCS is 32 bit CRC defined as:
32 26 23 22 16 12 11 10 8 7 5 4 2
CRC ( x ) = x +x +x +x +x +x +x +x +x +x +x +x +x +x+1
NOTE
The FIR module doesn’t support the CRC generation. If the transfer require a CRC Field use the CRC
generation from the BestComm module. See also Chapter 13, BestComm.
The chip patterns for PA, STA and STO are defined as:
The FIR system must emit SIP (Serial Interaction Pulse), for more informations see Section 15.3.5.3, Serial Interaction Pulse (SIP).
NOTE
Please choose first the desired mode (FIR mode) than configure the port (write to port_config
register). This sequence will avoid pulses on the TX line during port configuration. This is very
important for all IrDA (SIR, MIR, and FIR) modes.
CR 0x0A Disable the Tx and Rx part for configuration if the PSC was
enabled by the work before.
cdm_irda_bitclk_config 0x8002 set Mclk to 176 Mhz, see Section 5.5.14, PSC6 (IrDA) Mclock
Config Register—MBAR + 0x0234
cdm_clock_enable_register 0x00000010 enable Mclk, see Section 5.5.6, CDM Clock Enable
Register—MBAR + 0x0214
IRFDR 0x0A set bit clock frequency = 8 MHZ with Mclk frequency = 88 MHz
Port_Config 0x00F00000 Select the Pin-Muxing for IrDA mode, see Chapter 2, Signal
Descriptions
CR 0x05 Enable Tx and Rx
CommBus or IPB
Interface
Address:
Granularity 1FF 0 first received Byte Granularity
Level Level
(value multiply by 4) (example: 0x004)
(example: 0x005) empty FIFO
Space last received Byte
Transmitter Receiver
Tx Line Rx Line
15.3.7.1 RX FIFO
The RX FIFO space is 512 Byte. For an Rx FIFO, the “Alarm” value is not the amount of “data” in the Rx FIFO. Instead, an interrupt occurs
as a result of the amount of empty space remaining in the Rx FIFO. These facts are described in Figure 15-23.
If it is known how much data is needed in the Rx FIFO to cause an interrupt, the value that must be written into the “Alarm” register is:
• the FIFO size, minus the number of data bytes in the FIFO
Unlike the “Alarm” value, ”Granularity” value represents a number of data bytes, not empty space.
NOTE
In AC97, the number of data bytes are 4-times the number of timeslot samples in the FIFO. Because,
each 20-bit sample uses an entire 32-bit longword in the FIFO.
For the Rx FIFO, the value can be between 0 and 7 bytes only. Therefore, the interrupt has hysteresis. For example, the interrupt goes active
when the Rx FIFO is “almost full” (i.e., amount of empty space is less than the “Alarm” level). It stays active until enough data is read out of
the Rx FIFO so that the amount of data left in the FIFO is less than the “Granularity” level.
For the example (see Figure 15-23) it means:
The requestor to the BestComm to emptying the RX FIFO becomes active if the empty space in the FIFO is less the 8 Bytes (504 date
Bytes are in the FIFO).
The requester became inactive if 4Bytes are left in the FIFO. (508 Byte space now)
When BestComm is servicing the FIFO’s, this process works well. However, if the CPU is servicing the FIFO’s, the interrupt has no hysteresis.
For Example, the “Alarm” level is used for both activating and deactivating the CPU interrupt.
When using BestComm you must specify a non-zero “Granularity” to get FIFO underrun errors. This is due to its internal pipelining.
BestComm does not immediately stop accessing the FIFO when the FIFO interrupt goes away.
15.3.7.2 TX FIFO
The TX FIFO space is 512 Byte. For a Tx FIFO, the “Alarm” value specifies a threshold in terms of DATA bytes, not in terms of empty space
as with the Rx FIFO. Once the amount of data in the Tx FIFO falls below the “Alarm” level, an interrupt activates. The interrupt indicates the
Tx FIFO is “almost empty” and needs more data. Tx FIFO “Granularity” is specified in terms of empty bytes, not a number of data bytes as
with the Rx FIFO. For more informations see also Figure 15-23. The “Granularity” value range is 0–7.
The Tx FIFO controller hardware multiplies this value by 4, to establish the actual level at which the FIFO alarm goes away.
For the Tx FIFO, the alarm goes away when the number of empty bytes left in the Tx FIFO is less than or equal to:
• 0 (Granularity value 0)
• 4 (Granularity value 1)
• 8 (Granularity value 2)
• 12 (Granularity value 3)
• 16 (Granularity value 4)
• 20 (Granularity value 5)
• 24 (Granularity value 6)
• 28 (Granularity value 7)
The FIFO interrupt stays active until BestComm writes enough data into the Tx FIFO to reach the Granularity level. Once the Granularity
level is reached, the interrupt goes away.
For the example (see Figure 15-23) it means:
The requestor to the BestComm to filling the TX FIFO becomes active if the amount of data in the FIFO is less then 16 data.
The requester became inactive if less than 20 (5 * 4) bytes space in the FIFO.
Rx RxD Input
CPU
Disabled Tx Disabled TxD Input
Because the transmitter is inactive, SR[TxEMP,TxRDY] is inactive and data is sent as it is received. Received parity is checked, but is not
recalculated for transmission. Character framing is also checked, but stop bits are sent as they are received. A received break is echoed as
received until the next valid start bit is detected.
Master Station
A/D A/D A/D
Transmitter
Enabled
SR [TxRDY]
internal
module
select
MR1n[PM] = 11 ADD 1 C0 ADD 2
MR1n[PT] = 1 MR1n[PT] = 0 MR1n[PT] = 2
Peripheral Station
A/D A/D A/D A/D A/D
Receiver
Enabled
SR[RxRDY]
internal
module
select
MR1n[PM] = 11 ADD 1 Status Data Status Data
MR1n[PM] = 11 (C0) (ADD 2)
Notes
Chapter 16
XLB Arbiter
16.1 Overview
This document contains the following section:
• Section 16.1, Overview
• Section 16.2, XLB Arbiter Registers—MBAR + 0x1F00
16.1.1 Purpose
The purpose of the XLB Arbiter is to manage bus requests from the XLB masters (USB, PCI, BestComm, and G2_LE core), and determine
which master should be granted the bus at any one time. The arbiter employs both master prioritization and a fair-share LRU
(least-recently-used) algorithm to reduce access latency and starvation across all masters.
The XLB Arbiter consists of five functional blocks as shown below.
Prioritization
Configuration,
Status, and
Interrupts
Watchdog
Slave Interface
16.1.1.1 Prioritization
The prioritization block signals that a master is requesting the bus and which master has priority.
Priority is determined first by using the master priority level assigned by either the hardware-wired mNpr signals, or software-programmable
Master N Priority bits in the Arbiter Master N Priority Register depending on the Master Priority Enable bit for each master. Masters at the
same level of priority will be further sorted by a least recently used algorithm (LRU). Once a requesting master is identified as having priority
and is granted the bus, that master will be continue to be granted the bus if:
1. It is requesting the bus. The request must occur immediately after the required one clock de-assertion after a qualified bus grant, and
2. It is the highest priority device, and
3. There is no address retry assertion.
Multiple masters at level 0 will only be able to perform one tenure before the bus is passed to the next master at level 0 using the LRU
algorithm.
The priority level of each master may be changed while the arbiter is running. This allows dynamic changes in priority such as an aging
scheme. It is possible for the G2_LE core to control priority by enabling the Master Priority Enable bits for a master. This causes the priority
to be determined from the Master N Priority bits in the Arbiter Master N Priority Register. The G2_LE core then may write this register to set
the master's priority.
• Arbiter Configuration Register (R/W)—MBAR + 0x1F40 • Arbiter Address Tenure Time-Out Register (R/W)—MBAR
+ 0x1F58
• Arbiter Version Register (R)—MBAR + 0x1F44 • Arbiter Data Tenure Time-Out Register (R/W)—MBAR +
0x1F5C
• Arbiter Status Register (R/W)—MBAR + 0x1F48 • Arbiter Bus Activity Time-Out Register (R/W)—MBAR +
0x1F60
• Arbiter Interrupt Enable Register (R/W)—MBAR + 0x1F4C • Arbiter Master Priority Enable Register (R/W)—MBAR +
0x1F64
• Arbiter Address Capture Register (R)—MBAR + 0x1F50 • Arbiter Master Priority Register (R/W)—MBAR + 0x1F68
• Arbiter Bus Signal Capture Register (R)—MBAR + 0x1F54 • Arbiter Snoop Window Register (RW)—MBAR + 0x1F70
R PLDIS Rsvd
RESET: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
0 PLDIS Pipeline Disable. This bit is used to enable or disable transaction pipelining on the XLB. See
note below.
0 = Enable pipelining
1 = Disable pipelining
1:15 — Reserved
16 SE Snoop Enable. This sets the address snooping enablement on the XLB.
0 = Disable address snooping. Internally on the XLB, the gbl_b signal is gated (always
negated). This overrides any setting of the Arbiter Snoop Window Register (MBAR +
0x0070).
1 = Allow address snooping. Internally on the XLB, the gbl_b signal is not gated, and
assertions of this signal during address tenures will be recognized.
17 USE_WWF Force write-with-flush transfer type (TT) for PCI, BestComm, and USB interfaces to XLB.
0 = Write-with-kill operation is allowed on burst transactions.
1 = Always use write-with-flush on burst transactions.
18 TBEN Timebase Enable. This bit is used as a “count enable” control input for the timebase counter
in the 603e core.
0 = Timebase should stop clocking.
1 = Timebase should continue clocking.
19 — Reserved
20 WS Minimum Wait State. This bit sets the minimum number of wait states for slaves to respond
with AACK assertion on the XLB.
0 = 0 minimum wait state.
1 = 1 minimum wait state.
21:23 SP[2:0] Select Parked Master. These bits set the master that is used in Park on Programmed
Master mode (000 = master 0, 001 = master 1, ..., 111 = master 7).
24 — Reserved
27 — Reserved
28 BA Bus Activity Time-out Enable. If enabled, the arbiter will set the Bus Activity Time-out Status
bit (Arbiter Status Register, bit 29) when the Bus Activity Time-out is reached. Bus Activity
Time-out is derived from the Arbiter Bus Activity Time Out Count register.
29 DT Data Tenure Time-out Enable. If enabled, the arbiter will assert TEA when the Data Tenure
Time-out is reached. Data Tenure Time-out is derived from the Arbiter Data Tenure Time
Out Count Register. Also, the arbiter will set the Data Tenure Time-out Status bit (Arbiter
Status Register, bit 30). Setting this bit will also enable the Address Tenure Time-out. This
is required to ensure that a data time-out will not occur before an address acknowledge.
30 AT Address Tenure Time-out Enable. If enabled, the arbiter will assert AACK and TEA (if
required) when the Address Tenure Time-out is reached. Address Tenure Time-out is
derived from the Arbiter Address Tenure Time Out Count register. Also, the arbiter will set
the Address Tenure Time-out Status bit (Arbiter Status Register, bit 31). Address Tenure
Time-out is also enabled by the DT bit above.
31 — Reserved
NOTE
The PLDIS reset value is 1, which means the XLB Arbiter will prohibit transaction pipelining. In
most applications, transaction pipelining will provide a significant performance increase, and
therefore the customer should consider setting this bit to 0 to take advantage of this increase.
R Version ID[0:15]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Version ID[16:31]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0:31 VER Hardware version ID. The current version number is 0x0001.
R Rsvd
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:22 — Reserved
23 SEA Slave Error Acknowledge. This bit is set when an error is detected by any slave devices
during the transfer.
24 MM Multiple Masters at Priority 0. If more than one master is recognized at priority 0, this bit is
set. Once this occurs, this bit will remain set until cleared. The arbiter recognizes priority
by the hardware-wired mNpri signals or (if enabled) the Arbiter Master N Priority Register.
This bit is intended to help in tuning dynamic priority algorithm development.
25 TTA TT Address Only. The arbiter automatically AACKs for address only TT (transfer type)
codes. This bit is set when this condition occurs.
For a description of TT codes, see the MPC603e Users’ Manual, Section 7.2.
26 TTR TT Reserved. The arbiter automatically AACKs for reserved TT (transfer type) codes. This
bit is set when this condition occurs.
For a description of TT codes, see the MPC603e Users’ Manual, Section 7.2.
27 ECW External Control Word Read/Write. External Control Word Read/Write operations are not
supported on the XLB. If either occur, the arbiter AACKs and TEAs the transaction, and
sets this bit.
28 TTM TBST/TSIZ mismatch. Set when an illegal/reserved TBST and TSIZ[0:2] combinations
occur. These combinations are TBST asserted and TSIZ[0:2] = 000, 001, 011, or 1xx
(where “x” is 0 or 1).
For a description of TBST and TSIZ, see the MPC603e Users’ Manual, Section 7.2.
29 BA Bus Activity Tenure Time-out. Set when the bus activity time-out counter expires.
30 DT Data Tenure Time-out. Set when the data tenure time-out counter expires.
31 AT Address Tenure Time-out. Set when the address tenure time-out counter expires.
R Rsvd
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Rsvd SEAE MME TTAE TTRE ECWE TTME BAE DTE ATE
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:22 — Reserved
R Address[0:15]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Address[16:31]
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 ADRCAP Address Capture Value. This is the address that is captured when a bus error occurs. This
happens after an address time-out, data time-out, or any TEA assertion.
• an address time-out,
• a data time-out, or
• a TEA from another source
These values are held until unlocked by writing any value to the Arbiter Address Capture Register or Arbiter Bus Signal Capture Register.
These values are also unlocked by writing 1 to either the Arbiter Status Register, bit 30 (Data Tenure Time-out Status) or bit 31 (Address
Tenure Time-Out Status). Unlocking the register does not clear its contents.
Table 16-6. Arbiter Bus Signal Capture Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R Rsvd
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:21 — Reserved
R Rsvd ADRTO[4:15]
RESET: 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R ADRTO[16:31]
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0:3 — Reserved
4:31 ADRTO Address Tenure Time-out. Contains the upper 28 bits of the Address Time-out Counter.
Values represent increments of 16. Default value is 0xFFFFFFF.
R Rsvd DATTO[4:15]
RESET: 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R DATTO[16:31]
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0:3 — Reserved
4:31 DATTO Data Tenure Time-out. Contains the upper 28 bits of the DataTime-out Counter. Values
represent increments of 16. Default value is 0xFFFFFFF.
R BUSTO[0:15]
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R BUSTO[16:31]
RESET: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0:31 BUSTO Bus Activity Time-out. Contains the value of the Bus Activity Time-out Counter. Values
represent increments of 1. Default value is 0xFFFFFFFF.
R Rsvd
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Rsvd M7 M6 M5 M4 M3 M2 M1 M0
RESET: 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0:23 — Reserved
M7–M4 — Unused
M2 1 BestComm
M1 2 USB
M0 7 G2_LE Core
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Rsvd M3 Priority Rsvd M2 Priority Rsvd M1 Priority Rsvd M0 Priority
W
RESET: 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0
0 — Reserved
1:3 M7P Master 7 Priority
4 — Reserved
5:7 M6P Master 6 Priority
8 — Reserved
9:11 M5P Master 5 Priority
12 — Reserved
13:15 M4P Master 4 Priority
16 — Reserved
17:19 M3P Master 3 Priority
20 — Reserved
21:23 M2P Master 2 Priority
24 — Reserved
25:27 M1P Master 1 Priority
28 — Reserved
29:31 M0P Master 0 Priority
The MPC5200 implementation of this address snooping control is shown in the figure below. At the start of a master’s address tenure, the
master interface decodes the address and determines if it needs to be snooped, based on the configuration of the Arbiter Snoop Window
Register. If the transaction requires snooping, the gbl_b signal is asserted; otherwise, gbl_b is negated. However, before the gbl_b signal
reaches the XLB for the address tenure, it is gated by a mux, controlled by the Arbiter Configuration Register SE (snoop enable) bit. If SE is
0, gbl_b will always be negated, and no XLB transaction will be snooped. If SE is 1, the gbl_b signal generated by the master bus interface
will be allowed to pass to the XLB.
For a more detailed description of address snooping and G2_LE cache-coherency, see the MCP603e Users’ Manual, Section 3.6.
Table 16-13. Arbiter Snoop Window Register
msb 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R WINBASE[0:15]
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R WINBASE[16:19] Rsvd DS Rsvd WINSIZE[0:4]
W
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:19 WINBASE Window Base Address. Defines the base address of snoopable/non-snoopable addresses for
all PCI, BestComm, and USB address transfers.
20:23 — Reserved
24 DS Default Snooping Policy:
0 = Addresses inside window are snooped. Default gbl_b = “negated”
1 = Addresses outside window are snooped. Default gbl_b = “asserted”
25:26 — Reserved
27:31 WINSIZE Window Size - Defines the size of window. The lower bits of WINBASE are effecttively
ignored/masked from snooping address comparison depending on the value set in this field.
WINSIZE = 00000: Window miss*
WINSIZE = 00001 - 01011: 4KByte (non-mask)
WINSIZE = 01100: 8KByte (1 bit mask)
WINSIZE = 01101: 16KByte (2 bits mask)
WINSIZE = 01110: 32KByte (3 bits mask)
WINSIZE = 01111: 64KByte (4 bits mask)
WINSIZE = 10000: 128KByte (5 bits mask)
WINSIZE = 10001: 256KByte (6 bits mask)
WINSIZE = 10010: 512KByte (7 bits mask)
WINSIZE = 10011: 1MByte (8 bits mask)
WINSIZE = 10100: 2MByte (9 bits mask)
WINSIZE = 10101: 4MByte (10 bits mask)
WINSIZE = 10110: 8MByte (11 bits mask)
WINSIZE = 10111: 16MByte (12 bits mask)
WINSIZE = 11000: 32MByte (13 bits mask)
WINSIZE = 11001: 64MByte (14 bits mask)
WINSIZE = 11010: 128MByte (15 bits mask)
WINSIZE = 11011: 256MByte (16 bits mask)
WINSIZE = 11100: 512MByte (17 bits mask)
WINSIZE = 11101: 1GByte (18 bits mask)
WINSIZE = : 2GByte (19 bits mask)
WINSIZE = 11111: Reserved
Note: *NOTE: Software should always write a non-zero value in this field. Otherwise, the
address comparison does not take effect (treated as a “window miss”).
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:31 — Reserved
Notes
Chapter 17
Serial Peripheral Interface (SPI)
17.1 Overview
The following sections are contained in this document:
• Section 17.2, SPI Signal Description
• Section 17.3, SPI Registers—MBAR + 0x0F00
• Section 17.4, Functional Description
The Serial Peripheral Interface (SPI) allows full-duplex, synchronous, serial communication between the MPC5200 and peripheral devices.
Software can poll the SPI status flags or the SPI operation can be interrupt driven.
Figure 17-1 shows the SPI block diagram.
DIVIDER M MISO
8-BIT Shift Register S
2 4 8 16 32 64 128 256 MOSI
Read Data Buffer
SPPR0
SPR2
SPR1
SPR0
LSBFE
Shift Control Logic
Clock S
Logic M
MSTR
SP Control SPE
SWOM
SPISWAI
WCOL
MODF
SWOM
LSBFE
SPIF
MSTR
CPHA
SSOE
SPI Interrupt
CPOL
SPC0
SPIE
SPE
Request
IP bus
17.1.1 Features
The SPI has the following features:
• Master mode and slave mode
• Bi-directional mode
• Slave-select output
• Mode fault error flag with CPU interrupt capability
• Double-buffered data register
• Serial clock with programmable polarity and phase
• Control of SPI operation during wait mode
Note:
1. SPI ports MISO, MOSI, SCK, and SS are GPIO ports when SPI is disabled (SPE=0).
The SS pin is the mode fault input when the SPI is in master mode and the associated data direction bit is clear. When the data direction bit is
clear and SSOE = 1, the SS pin is a general-purpose input.
SS is always an input when the SPI is in slave mode, regardless of the state of the data direction bit for that pin. When the SPI is configured
as a slave, the MISO (or SISO) output driver is three-stated until enabled by the slave select input (low true) so that many slaves may be
wire-ORed to the same MISO (or SISO) line.
The directions of the MOSI and MISO pins are also determined by the serial pin control (SPC[0]) bit.
RESET: 0 0 0 0 0 1 0 0
0 SPIE SPI Interrupt Enable—bit enables SPI interrupts each time the SPIF or MODF status flag is set.
0 = SPI interrupts disabled
1 = SPI interrupts enabled
1 SPE SPI System Enable—bit enables the SPI system and dedicates SPI port pins 3–0 to SPI
functions. When SPE is clear, the SPI system is initialized, but in a low-power disabled state.
0 = SPI system is in a low-power, disabled state
1 = SPI port pins 3–0 are dedicated to SPI functions
2 SWOM Unused
4 CPOL SPI Clock Polarity—bit selects an inverted or non-inverted SPI clock. To transmit data between
SPI modules, the SPI modules must have identical CPOL values
0 = Active-high clocks selected; SCK idles low
1 = Active-low clocks selected; SCK idles high
5 CPHA SPI Clock Phase—bit is used to shift the SCK serial clock.
0 = The first SCK edge is issued one-half cycle into the 8-cycle transfer operation
1 = The first SCK edge is issued at the beginning of the 8-cycle transfer operation
6 SSOE Slave Select (SS) Output Enable—bit is enabled only in master mode by asserting SSOE and
SPIDDR bit 3 as shown in Table 17-3.
7 LSBFE SPI LSB-First Enable—bit does not affect the position of the msb and lsb in the data register.
Reads and writes of the data register always have the msb in bit 7.
0 = Data is transferred most significant bit first.
1 = Data is transferred least significant bit first.
1 1 SS output SS input
RESET: 0 0 0 0 0 0 0 0
0:5 — Reserved
6 SPISWAI SPI Stop in Wait Mode—bit is used for power conservation while in wait mode.
0 = SPI clock operates normally in wait mode
1 = Stop SPI clock generation when in wait mode
7 SPC0 Serial Pin Control Bit 0—working with the MSTR control bit, this bit enables bidirectional pin
configurations as shown in Table 17-5.
Note:
1. Slave output is enabled if SPIDDR bit 0 = 1, SS = 0, and MSTR = 0 (A, C).
2. Master output is enabled if SPIDDR bit 1 = 1 and MSTR = 1 (B, D).
3. SCK output is enabled if SPIDDR bit 2 = 1 and MSTR = 1 (B, D).
4. SS output is enabled if SPIDDR bit 3 = 1, SSOE = 1, and MSTR = 1 (B, D).
5. GP I/O = General-Purpose Input/Output.
RESET: 0 0 0 0 0 0 0 0
0 — Reserved
4 — Reserved
The SPI baud rate is derived from the IPB clock. The SPI module clock divisor is calculated as following:
IPB CLock
SPI Baud Rate =
SPI module clock divisor
Table 17-7 shows some Baud rates derived from the possible IPB clock values:
Table 17-7. SPI Baud Rate Selection
....
RESET: 0 0 0 0 0 0 0 0
RESET: 0 0 0 0 0 0 0 0
0 SPIF SPI Interrupt flag—bit sets after 8th SCK cycle in a data transfer. Bit is cleared by an SPISR
register read (with SPIF set) followed by an SPI data register read or write access.
0 = Transfer not yet complete
1 = New data copied to SPIDR
1 WCOL Write Collision flag—bit indicates a serial transfer was in progress when the MCU tried to write
new data into the SPI data register. The flag is cleared automatically by an SPI status register
read (with WCOL set) followed by a SPI data register read or write access.
0 = Write collision did not occur
1 = Write collision occurred
2 — Reserved
3 MODF Mode Fault flag—bit sets if SS input goes low while SPI is configured as a master. Flag is cleared
automatically by an SPI status register read (with MODF set) followed by a SPI control register
1 write.
0 = Mode fault did not occur
1 = Mode fault occurred
4:7 — Reserved
R D7 D6 D5 D4 D3 D2 D1 D0
RESET: 0 0 0 0 0 0 0 0
0:7 D[0:7] The SPI Data register is both an input and output register for SPI data.
Attempts to write to this register while data transfers are in progress sets the WCOL flag and
disables the attempted write. Review the WCOL bit description in Table 17-8 for more
information.
Reading data can occur anytime, from after SPIF is set, to before the end of the next transfer. If
SPIF is not serviced by the end of the successive transfers, those data bytes are lost and data
within SPIDR retains the first byte until SPIF is serviced.
RESET: 0 0 0 0 0 0 0 0
RESET: 0 0 0 0 0 0 0 0
0:7 D[0:7] SPI Port Data bits—data written to SPIPORT drives pins only when they are configured as
(Note 1) general-purpose outputs.
Reading an input (data direction bit is clear) returns the pin level.
Reading an output (data direction bit is set) returns the pin driver input level.
Writes do not change the state of pins 0:3 when pin is configured for SPI output.
SPIPORT I/O function depends upon the state of the SPE bit in SPI control register 1 and
the state of each associated data direction bit in SPIDDR.
Note:
1. Bits 4:7 do not drive output pins. When programmed as inputs (data direction bit is set), they return "0".
RESET: 0 0 0 0 0 0 0 0
0:7 DDR[0:7] In SPI slave mode, SPIDDR bit 3 has no meaning or effect.
In SPI master mode, SPIDDR bit 3 determines if SPI port pin 3 is:
• an error-detect input to SPI
• a general-purpose output
• a slave select output line
Note: NOTE: When SPI is Enabled, MISO, MOSI, and SCK are:
• inputs if expected to be inputs, regardless of associated data direction bit state.
• outputs if expected to be outputs, only if associated data direction bit is set.
SPIDDR bits 0:7—SPI Port Data Direction Control bits
0 = Associated pin is an input
1 = Associated pin is an output
17.4.1 General
The SPI module allows full-duplex, synchronous, serial communication between the MCU and peripheral devices. Software can poll the SPI
status flags or SPI operation can be interrupt driven.
The SPI system is enabled by setting the SPI enable (SPE) bit in SPI control register 1. While SPE is set, the four associated SPI port pins are
dedicated to the SPI function as:
• Slave select (SS)
• Serial clock (SCK)
• Master out/slave in (MOSI)
• Master in/slave out (MISO)
While SPE is clear, SPI port pins 3, 2, 1, and 0 are general-purpose I/O (input/output) pins controlled by the SPI port data direction register.
The main element of the SPI system is the SPI data register. The 8-bit data register in the master and the 8-bit data register in the slave are
linked by the MOSI and MISO pins to form a distributed 16-bit register. When a data transfer operation is performed, this 16-bit register is
serially shifted eight bit positions by the SCK clock from the master; data is exchanged between the master and the slave. Data written to the
master SPI data register becomes the output data for the slave, and data read from the master SPI data register after a transfer operation is the
input data from the slave.
A write to the SPI data register puts data into a serial shifte. When a transfer is complete, received data is moved into a receive data register.
Data may be read from this double-buffered system any time before the next transfer is complete. This 8-bit data register acts as the SPI receive
data register for reads and as the SPI transmit data register for writes. A single SPI register address is used for reading data from the read data
buffer and for writing data to the shifter.
The clock phase control bit (CPHA) and a clock polarity control bit (CPOL) in the SPI control register 1 select one of four possible clock
formats to be used by the SPI system. The CPOL bit simply selects a non-inverted or inverted clock. The CPHA bit is used to accommodate
two fundamentally different protocols by shifting the clock by a half cycle or by not shifting the clock (17.4.4 Transmission Formats).
The SPI can be configured to operate as a master or as a slave. When MSTR in SPI control register 1 is set, the master mode is selected; when
the MSTR bit is clear, the slave mode is selected.
Although the SPI is capable of full-duplex operation, some SPI peripherals are capable of only receiving SPI data in a slave mode. For these
simpler devices, there is no serial data out pin
NOTE
When peripherals with full-duplex capability are used, take care not to simultaneously enable two
receivers whose serial outputs drive the same system slave’s serial data output line.
As long as no more than one slave device drives the system slave’s serial data output line, it is possible for several slaves to receive the same
transmission from a master, although the master would not receive return information from all of the receiving slaves.
If the CPHA bit in SPI control register 1 is clear, odd numbered edges on the SCK input cause the data at the serial data input pin to be latched.
Even numbered edges cause the value previously latched from the serial data input pin to shift into the LSB of the SPI shifter.
If the CPHA bit is set, even numbered edges on the SCK input cause the data at the serial data input pin to be latched. Odd numbered edges
cause the value previously latched from the serial data input pin to shift into the LSB of the SPI shifter.
When CPHA is set, the first edge is used to get the most significant data bit onto the serial data output pin. When CPHA is clear and the SS
input is low (slave selected), the msb of the SPI data is driven out of the serial data input pin. After the eighth shift, the transfer is considered
complete and the received data is transferred into the SPI data register. To indicate transfer is complete, the SPIF flag in the SPI status register
is set.
MISO MISO
SHIFT REGISTER
MOSI MOSI
SHIFT REGISTER
SCK SCK
BAUD RATE
GENERATOR SS SS
VDD
After this second edge, the next bit of the SPI master data is transmitted out of the serial data output pin of the master to the serial input pin
on the slave. This process continues for a total of 16 edges on the SCK line, with data being latched on odd numbered edges and shifted on
even numbered edges.
Data reception is double buffered. Data is shifted serially into the SPI shift register during the transfer and is transferred to the parallel SPI
data register after the last bit is shifted in.
After the 16th (last) SCK edge:
• Data that was previously in the master SPI data register should now be in the slave data register and the data that was in the slave
data register should be in the master.
• The SPIF flag in the SPI status register is set and the clock is stopped, indicating that the transfer is complete.
Table 17-3 is a timing diagram of an SPI transfer where CPHA = 0. SCK waveforms are shown for CPOL = 0 and CPOL = 1. The diagram
may be interpreted as a master or slave timing diagram since the SCK, MISO, and MOSI pins are connected directly between the master and
the slave. The MISO signal is the output from the slave and the MOSI signal is the output from the master. The SS pin of the master must be
either high or reconfigured as a general-purpose output not affecting the SPI.
SCK (CPOL = 0)
SCK (CPOL = 1)
SAMPLE I
MOSI/MISO
CHANGE O
MISO pin
SEL SS (O)
Master only
SEL SS (I)
tL tT tI tL
MSB first (LSBFE = 0): MSB Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 LSB Minimum 1/2 SCK
LSB first (LSBFE = 1): LSB Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 MSB for tT, tl, tL
tL = Minimum leading time before the first SCK edge
tT = Minimum trailing time after the last SCK edge
tI = Minimum idling time between transfers (minimum SS high time)
tL, tT, and tI are guaranteed for the master mode and required for the slave mode.
In slave mode, if the SS line is not deasserted between the successive transmissions then the content of the SPI Data Register is not transmitted,
instead the last received byte is transmitted. If the SS line is deasserted for at least minimum idle time ( half SCK cycle) between successive
transmissions content of the SPI Data Register is transmitted.
In master mode, with slave select output enabled the SS line is always deasserted and reasserted successive transfers for at least minimum idle
time.
A half SCK cycle later, the second edge appears on the SCK pin. This is the latching edge for both the master and slave.
When the third edge occurs, the value previously latched from the serial data input pin is shifted into the LSB of the SPI shifter. After this
edge, the next bit of the master data is coupled out of the serial data output pin of the master to the serial input pins on the slave.
This process continues for a total of 16 edges on the SCK line with data being latched on even numbered edges and shifting taking place on
odd numbered edges.
Data reception is double buffered; data is serially shifted into the SPI shift register during the transfer and is transferred to the parallel SPI
data register after the last bit is shifted in.
After the 16th SCK edge:
• Data that was previously in the SPI data register of the master is now in the data register of the slave, and data that was in the data
register of the slave is in the master.
• The SPIF flag bit in SPISR is set and the clock is stopped, indicating that the transfer is complete.
Table 17-4 shows two clocking variations for CPHA = 1. The diagram may be interpreted as a master or slave timing diagram since the SCK,
MISO, and MOSI pins are connected directly between the master and the slave. The MISO signal is the output from the slave, and the MOSI
signal is the output from the master. The SS line is the slave select input to the slave. The SS pin of the master must be either high or
reconfigured as a general-purpose output not affecting the SPI.
SCK (CPOL = 0)
SCK (CPOL = 1)
SAMPLE I
MOSI/MISO
CHANGE O
MISO pin
SEL SS (O)
Master only
SEL SS (I)
tL tT tI tL
MSB first (LSBFE = 0): MSB Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 LSB Minimum 1/2 SCK
LSB first (LSBFE = 1): LSB Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 MSB for tT, tl, tL
tL = Minimum leading time before the first SCK edge
tT = Minimum trailing time after the last SCK edge
tI = Minimum idling time between transfers (minimum SS high time)
tL, tT, and tI are guaranteed for the master mode and required for the slave mode.
When CPHA = 1, the SS line can remain active low between successive transfers (can be tied low at all times). This format is sometimes
preferred in systems having a single fixed master and a single slave that drive the MISO data line.
The SPI interrupt request flag (SPIF) is common to both the master and slave modes. SPIF gets set after the last SCK cycle in a data transfer
operation to indicate that the transfer is complete SPIF is cleared automatically when the SPI status register is read (with SPIF set) followed
by a read or write to the SPI data register. If the SPIE bit is set when the SPIF flag is set, a hardware interrupt is requested.
A warning flag (WCOL) is set if a write to the SPI data register is attempted while a transfer is in progress. This is a conflict since the write
would erroneously overwrite the current contents of the SPI serial shift register. If this situation arises, the write to the SPI data register is
inhibited so as not to disturb the transfer in progress, and the WCOL flag is set to indicate the error. No interrupt is generated by WCOL
because an interrupt comes at the end of the transfer that was in progress at the time of the error.
( SPR + 1 )
BaudRateDivisor = ( SPPR + 1 ) • 2
Figure 17-5. Baud Rate Divisor Equation
17.4.6.1 SS Output
The SS output feature automatically drives the SS pin low during transmission to select external devices and drives it high during idle to
deselect external devices. When SS output is selected, the SS output pin is connected to the SS input pin of the external device.
The SS output is available only in master mode during normal SPI operation by asserting SSOE and SPIDDR bit 3 as shown in Table 17-3.
The mode fault feature is disabled while SS output is enabled.
NOTE
Care must be taken when using the SS output feature in a multimaster system since the mode fault
feature is not available for detecting system errors between masters.
SWOM enables open drain output. SWOM enables open drain output.
SWOM enables open drain output. SWOM enables open drain output.
SPI port pin 0 becomes general-purpose I/O. SPI port pin 1 becomes general-purpose I/O.
The direction of each serial I/O pin depends on the corresponding data direction register bit If the pin is configured as an output, serial data
from the shift register is driven out on the pin. The same pin is also the serial input to the shift register.
If the pin is configured as an input, serial data from the shift register is discarded, but the external serial data through the pin is the serial input
to the shift register.
The SCK is output for the master mode and input for the slave mode.
The SS is the input or output for the master mode, and it is always the input for the slave mode.
The bidirectional mode does not affect SCK and SS functions; however, the SPIDDR bit 0 is not cleared by the mode fault error in the
bidirectional mode.
In the special case where SPIDDR bit 3 is set, the SS pin is either a general-purpose output pin or SS output pin rather than being dedicated
as the SS input for the SPI system. In this special case, the mode error function is inhibited and MODF remains cleared.
When a mode fault error occurs, the SPE and MSTR bits are cleared and data direction bits controlling the output enable for the SCK, MISO,
and MOSI (or MOMI) pins are cleared. This forces those pins to be high impedance inputs to avoid any possibility of conflict with another
output driver.
If the mode fault error occurs in the bidirectional mode, the data direction bit associated with MISO (SISO) is not affected, since this bit is
dedicated for general purpose.
This flag is cleared automatically by a read of the SPI status register (with MODF set) followed by a write to SPI control register 1.
The MODF interrupt is reflected in the status register MODF flag. Clearing the flag will also clear the interrupt. This interrupt will stay active
while the MODF flag is set. MODF has an automatic clearing process which is described in 18.2.5.3.4 SPI Status Register.
Chapter 18
Inter-Integrated Circuit (I 2 C)
18.1 Overview
The following sections are contained in this document:
• Section 18.2, I2C Controller
• Section 18.3, I2C Interface Registers
• Section 18.4, Initialization Sequence
• Section 18.5, Transfer Initiation and Interrupt
The Inter-Integrated Circuit (I 2 C) is a two-wire, bidirectional serial bus that provides a simple, efficient method for data exchange between
devices. This two-wire bus minimizes the interconnection between devices.
The MPC5200 contains 2 identical and independent I 2 C modules:
• I2C1 = MBAR + 0x3D00
• I2C2 = MBAR + 0x3D40
The I 2 C module is connected to the IP bus, and the CommBus.
Each module operates up to 100Kbps with a maximum bus load and timing. Both I 2 C modules are capable of operating at higher baud rates,
up to a maximum of clock/20, with reduced bus loading.
The maximum communication length and the number of devices that can be connected are limited by a maximum bus capacitance of 400pF.
This bus is suitable for applications requiring occasional communications over a short distance between a number of devices. It also provides
flexibility, allowing more devices to be connected to the bus for further expansion and system development.
I 2 C is a true multi-master bus including collision detection and arbitration to prevent data corruption if two or more masters attempt to control
the bus simultaneously. This feature provides the capability for complex applications with multi-processor control. It may also be used for
rapid testing and alignment of end products via external connections to an assembly-line computer.
18.1.1 Features
The I2C module has the following key features:
• Compatible with I2C bus standard
• Multi-master operation
• Software programmable for one of 64 different serial clock frequencies
• Software selectable acknowledge bit
• Interrupt driven Byte-by-Byte data transfer
• Arbitration loss with automatic mode switching from master to slave
• Calling address identification interrupt
• Start and stop signal generation/detection
• Repeated start signal generation
• Acknowledge bit generation/detection
• Bus busy detection
Figure 18-1 shows a block diagram of the I2C module.
IP Bus SCL
Clock In/Out
Control Data Shift
Register
CommBus SDA
Address
Compare
Term Description
Master Device that initiates transfer, generates SCL, and terminates transfer.
The master terminates communication by generating a STOP signal, which frees the bus. The master can generate a STOP even if the slave
has generated an acknowledge, at which point the slave must release the bus.
The master can generate a START signal followed by a calling command without generating a STOP signal first. This is called repeated
START.
SCL 1 2 3 4 5 6 7 8 9
SCL 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
SDA Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0(R/W) Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Acknowledgement
Start From Receiver No Ack Bit Stop
18.2.2.3 Acknowledge
Figure 18-4 shows the transmitter releases the SDA line HIGH during the acknowledge clock pulse. The receiver pulls the SDA line low
during the acknowledge clock pulse so that it remains stable LOW during the clock pulse high period.
If a slave-receiver does not acknowledge the byte transfer, SDA must be left HIGH by the slave. The master then generates a STOP condition
to abort the transfer.
If a master-receiver does not acknowledge the slave transmitter after a byte transmission, it means End-Of-Data (EOD) to the slave. The slave
then releases the SDA line for the master to generate a STOP or START signal.
SCL 1 2 3 4 5 6 7 8 9
SDA by Bit5
Bit7 Bit6 Bit4 Bit3 Bit2 Bit1 Bit0(R/W)
Transmitter
SDA by
Receiver
Start
R/W
R/W
R/W R/W
7-bit Rept 7-bit
ST Slave Address 1 A DATA A/A Slave Address 0 A DATA A DATA A/A SP
ST
ST = Start
SP = Stop From Master to Slave
A = Acknowledge (SDA low)
A = Not Acknowledge (SDA high)
From Slave to Master
Rept ST = Repeated Start
Start Counting
High Period
Wait State
SCL by
Master1
SCL by
Master2
SCL
A data arbitration procedure determines the relative priority of contending masters. A bus master loses arbitration if it transmits logic “1”
while another master transmits logic “0”. Losing masters immediately switch to slave-receive mode and stop driving SDA output. In this case,
transition from master to slave mode does not generate a STOP condition. A status bit is hardware set to indicate loss of arbitration. See
Figure 18-7.
SCL
SDA by
Master1
SDA by
Master2 Master 2 Loses Arbitration,
and becomes slave-receiver
SDA
• I2C Frequency Divider Register (0x3D04) • I2C Data I/O Register (0x3D10)
R ADR[7:1] Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:6 ADR[7:1] Bits 0 to 6 contains the address I2C responds to, when addressed as a slave.
Note: This is not the address sent on the bus during address transfer.
7:31 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:1 — Reserved
2:7 FDR[5:0] This field is used to prescale the clock for bit-rate selection.
8:31 — Reserved
The Frequency Divide register determines the SCL or serial bit-clock frequency. The bit-clock generator is implemented as a prescaled shift
register. FDR bits are decoded to give the tap and prescale values as shown in Table 18-4.
• FDR[2:4] selects the prescaler divider.
• FDR[0:5] select the shift register tap point.
Table 18-4. I2C Tap and Prescale Values
000 9 3 0 4 1
001 10 3 1 4 2
010 12 4 10 6 4
011 15 4 11 6 8
100 5 1 100 14 16
101 6 1 101 30 32
110 7 2 110 62 64
111 8 2 111 126 128
Tap and prescale values are used to determine the SCL period and SDA hold time. Use the following equation to calculate the SCL period
from FDR bits:
SCL Period = 2 x (scl2tap + [(SCL_Tap -1) x tap2tap] +2)
SDA hold time is defined as the delay from the SCL falling edge, to SDA changing. Use the following equation to generate the SDA hold
value from FDR bits:
SDA Hold = scl2tap + [(SDA_Tap –1) x tap2tap] +3
For example, if %000100 is selected for bits FDR5, FDR4, FDR3, FDR2, FDR1, FDR0] value, SCL period is:
SCL Period = 2 x (4 + [(9 –1) x 2] +2) = 44 clocks
The delay from the falling edge of SCL to SDA changing is:
SDA Hold = 4 + [(3 –1) x 2] +3 = 11 clocks wide
Serial bit clock frequency then equals system clock frequency divided by the SCL period.
System
Clock
SCL
SCL Period
SDA
SDA Hold
Timing Diagram—SCL Period and SDA Hold Time
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 TXAK Transmit Acknowledge enable—bit specifies value driven to SDA during acknowledge cycles for
both master and slave receivers. Values are used only when I2C is a receiver, not a transmitter.
0 = Acknowledge signal is sent to bus at 9th clock bit after receiving 1Byte of data.
1 = No acknowledge signal response is sent (i.e., acknowledge bit = 1)
5 RSTA Repeat Start—writing 1 to this bit generates a repeated START condition on the bus, provided it is
the current bus master. Bit is always read low.
If the bus is owned by another master, attempting a repeated start at the wrong time results in loss
of arbitration.
1 = Generate repeat start cycle
6:31 — Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 CF Data transferring—bit clears while 1Byte of data is being transferred. Bit is set by falling edge of
9th clock of a byte transfer.
0 = Transfer in progress
1 = Transfer complete
1 AAS Addressed As Slave—bit sets when its own specific address (I2C Address Register) is matched
with the calling address. The CPU is interrupted provided IEN is set. The CPU then needs to check
the SRW bit and set its Tx/Rx mode accordingly. Writing to the I2C Control Register clears this bit.
0 = Not addressed
1 = Addressed as a slave
2 BB Bus Busy—bit indicates bus status. When a START signal is detected, BB is set. If a STOP signal
is detected, it is cleared.
0 = Bus is idle
1 = Bus is busy
3 AL Arbitration Lost—bit is set by hardware when the arbitration procedure is lost. Arbitration is lost in
the following circumstances:
1. SDA sampled low when master drives high during an address or data Tx cycle.
2. SDA sampled low when master drives high during a data Rx cycle acknowledge bit.
3. Start cycle is attempted when bus is busy.
4. A repeated start cycle is requested in slave mode.
5. Stop condition is detected when not requested by master. Software must clear bit
by writing it low.
4 — Reserved
5 SRW Slave Read/Write—when set, bit indicates the R/W command bit value of the calling address sent
from the master.
BE AWARE: Bit is valid only when I2C is in slave mode, a complete address transfer occurred with
an address match, and no other transfers were initiated. Checking this bit, the CPU can select
slave Tx/Rx mode according to the master command.
0 = Slave receive, master writing to slave
1 = Slave transmit, master reading from slave
6 IF I2
C Interrupt—sets when an interrupt is pending. If IEN is set, a processor interrupt request is
generated. IF sets when one of the following events occurs:
1. Complete 1Byte transfer (set at falling edge of 9th clock).
2. A Rx calling address matches its own specific address in slave Rx mode.
3. Arbitration is lost.
This bit must be cleared by software writing it low in the interrupt routine.
7 RXAK Receive Acknowledge—SDA value during the bus cycle acknowledge bit.
• If bit is low, it indicates an acknowledge signal was received after completion of 8 bits of data
transmission on the bus.
• If bit is high, it means no acknowledge signal is detected at the 9th clock.
0 = Acknowledge received
1 = No acknowledge received
8:31 — Reserved
Note: This status register is read-only with the exception of bit6 (IF) and bit3 (AL), which are software clearable.
R D7 D6 D5 D4 D3 D2 D1 D0 Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0:7 D[7:0] In Master Transmit Mode—when data is written to this register, a data transfer is initiated. The
most significant bit is sent first.
Note: In this mode, the first data byte written to DR. Assertion of STA is used for the address
transfer and should be comprise of the calling address (in position D[7]:D[1]) concatenated with
the required R/W bit (in position D0).
In Master Receive Mode—reading this register initiates next byte data receiving.
In Slave Mode—the same functions are available after an address match occurs.
8:31 — Reserved
BNBE1
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lsb
R Reserved
RESET: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 BNBE2 Bus Not Busy Enable 2—lets module 2 generate an interrupt when the bus is not busy. BNBE2
indicates an idle condition.
To clear the interrupt, software must write 0 to the bit position.
Reset condition disables BNBE2.
1 TE2 Transmit Enable 2—routes the interrupt for module 2 to the TX requestor at SDMA.
Clear by writing 0 to this bit position.
Reset condition disables TE2.
2 RE2 Receive Enable 2—routes the interrupt for module 2 to the RX requestor at SDMA.
Clear by writing 0 to this bit position.
Reset condition disables RE2.
3 IE2 Interrupt Enable 2—routes the interrupt for module 2 to the CPU.
Clear by writing 0 to this bit position.
Reset condition enables IE2.
4 BNBE1 Bus Not Busy Enable 1—lets module 1 generate an interrupt when the bus is not busy. BNBE1
indicates an idle condition.
To clear the interrupt, software must write 0 to the bit position.
Reset condition disables this bit.
5 TE1 Transmit Enable 1—routes the interrupt for module 1 to the TX requestor at SDMA.
Clear by writing 0 to this bit position.
Reset condition disables TE1.
6 RE1 Receive Enable 1—routes the interrupt for module 1 to the RX requestor at SDMA.
Clear by writing a 0 to this bit position.
Reset condition disables RE1.
7 IE1 Interrupt Enable 1—routes the interrupt for module 1 to the CPU.
Clear by writing 0 to this bit position.
Reset condition enables IE1.
8:31 — Reserved
The Interrupt Control register is common to both MPC5200 I2C modules. Each module generates an internal interrupt that can be routed as
follows:
• To the CPU interrupt, if IE is set to 1.
• To the TX requestor at SDMA, if TE is set to 1.
• To the RX requestor at SDMA, if RE is set to 1.
Typically, only one (or none) of the above destinations would be specified. Although, it may be useful to send an interrupt to both the CPU
and SDMA. Selecting between TX and RX is based on whether the module is:
• sending data (master or slave TX)
• receiving data (master or slave RX)
Individual requests trigger different SDMA tasks. Reset condition is, IE set and all other enable bits clear.
The BNBE bit lets the module generate an interrupt when the bus becomes not-busy. This implies receipt of a STOP condition, for which the
module normally does not generate an interrupt. Because bus-not-busy is an idle condition, it is necessary for software responding to this
interrupt to clear the BNBE bit to clear the interrupt condition. Otherwise, the interrupt condition persists until another I2C transaction is
initiated.
In slave mode, the same functions as are available after an address match occurs. Data transfer is initiated by:
• writing to the DATA register for slave transmits, or
• a dummy reading from the DATA register in slave receive mode occurs.
The I2C interrupt STATUS register bit is set when an interrupt is pending. If the CONTROL register interrupt enable bit is set, setting the I2C
interrupt STATUS register bit causes a processor interrupt request. The interrupt bit sets when one of the following events occurs:
• A complete 1Byte transfer (set at falling edge of 9th clock) occurs.
• A receive calling address matches its own specific address in slave receive mode.
• Arbitration is lost.
Chapter 19
Controller Area Network ( MSCAN )
19.1 Overview
The following sections are contained in this document:
• Section 19.1, Overview
• Section 19.2, Features
• Section 19.3, External Signals
• Section 19.4, CAN System
• Section 19.5, Memory Map / Register Definition
• Section 19.6, Programmer’s Model of Message Storage
• Section 19.7, Functional Description
The MPC5200 contains 2 identical and independent MSCAN Controller :
• MSCAN1 = MBAR + 0x0900
• MSCAN2 = MBAR + 0x0980
The Motorola Scalable Controller Area Network (MSCAN) definition is based on the MSCAN12 definition which is the specific
implementation of the Motorola Scalable CAN concept targeted for the Freescale Semiconductor, Inc. (formerly Motorola) MC68HC12
Microcontroller Family.
The module is a communication controller implementing the CAN 2.0 A/B protocol as defined in the BOSCH specification dated September
1991. For users to fully understand the MSCAN specification, it is recommended that the Bosch specification be read first to familiarize the
reader with the terms and concepts contained within this document.
The CAN protocol was primarily, but not only, designed to be used as a vehicle serial data bus, meeting the specific requirements of this field:
real-time processing, reliable operation in the EMI environment of a vehicle, cost-effectiveness and required bandwidth.
MSCAN utilizes an advanced buffer arrangement resulting in a predictable real-time behavior and simplifies the application software.
MSCAN
Oscillator Clock CANCLK Tq Clk
MUX Presc.
IP bus clock (PLL) RXCAN
Receive/
Transmit
Engine
TXCAN
Message
Interrupt Req. Control Filtering
and and
Status Buffering
Configuration
Registers Wake-Up
19.2 Features
The basic features of the MSCAN are as follows:
• Implementation of the CAN protocol - Version 2.0A/B
— Standard and extended data frames
— 0 - 8 bytes data length
— Programmable bit rate up to 1 Mbps (Depending on the actual bit timing and the clock jitter of the PLL)
— Support for remote frames
— 4 receive buffers with FIFO storage scheme
• 3 transmit buffers with internal prioritization using a “local priority” concept
• Flexible maskable identifier filter supports two full size extended identifier filters (two 32-bit) or four 16-bit filters or eight 8-bit
filters
• Programmable wake-up functionality
• Programmable loop back mode supports self-test operation
• Programmable listen-only mode for monitoring of CAN bus
• Separate signalling and interrupt capabilities for all CAN receiver and transmitter error states (Warning, Error Passive, Bus-Off)
• Programmable MSCAN clock source either IP bus clock or Oscillator clock
• Internal timer for time-stamping of received and transmitted messages
• Three low power modes: Sleep, Power Down and MSCAN Enable
• Global initialization of configuration registers
MCU
CAN Controller
(MSCAN)
TXCAN RXCAN
Transceiver
CAN_H CAN_L
CAN Bus
Address
Offset
$__18 RESERVED
2 BYTES
$__19
Table 19-1 shows the individual registers associated with the MSCAN and their relative offset from the base address. The detailed register
descriptions follow in the order they appear in the register map (see Table 19-2).
Table 19-2. Module Memory Map
$__18 RESERVED
-$__19
$__1C MSCAN Receive Error Counter Register (CANRXERR) R
R
RXFRM
SLPRQ
INITRQ
CSWAI
WUPE
TIME
RESET: 0 0 0 0 0 0 0 1
The MSCAN Control Register 0, CANCTL0, provides for various control of the MSCAN Module.
NOTE: The MSCAN Control Register 0, except the WUPE, INITRQ and SLPRQ bits, is held in the reset state when the Initialization Mode
is active (INITRQ = 1 and INITAK = 1). This register is writable again as soon as the Initialization Mode is exited (INITRQ = 0 and INITAK
= 0).
Read: Anytime
Write: Anytime when out of Initialization; exceptions are bits RXACT and SYNCH which are read-only and bit RXFRM which is set by the
module. A write of ‘1’ to the RXFRM register clears the flag and a write of ‘0’ is ignored.
0 RXFRM Received Frame—flag bit is read and clear only. It is set when a receiver has received a valid
message correctly, independently of the filter configuration. Once set, it remains set until
cleared by software or reset. Clear by writing 1 to the bit. This bit is not valid in loop-back mode.
0 = No valid message was received since last clearing this flag
1 = A valid message was received since last clearing of this flag
1 RXACT Receiver Active Status—flag bit indicates MSCAN is receiving a message. The flag is
controlled by the receiver front end. This bit is not valid in loop-back mode.
0 = MSCAN is transmitting or idle1
1 = MSCAN is receiving a message (including when arbitration is lost)
2 CSWAI CAN Stops in Wait Mode—enabling this bit allows lower power consumption in wait mode by
disabling all clocks at the bus interface to the MSCAN module.
0 = Module is not affected during WAIT mode
1 = Module ceases to be clocked during WAIT mode
3 SYNCH Synchronized Status—flag bit indicates whether MSCAN is synchronized to the CAN bus and,
as such, can participate in the communication process. It is set and cleared by MSCAN.
0 = MSCAN is not synchronized to the CAN bus
1 = MSCAN is synchronized to the CAN bus
4 TIME Timer Enable—bit activates an internal 16-bit wide free running timer, clocked by the bit-clock.
If timer is enabled, a 16-bit time stamp is assigned to each transmitted/received message
within the active Tx/Rx buffer. As soon as a message is acknowledged on CAN, the time stamp
is written to the highest bytes ($_E, $_F) in the appropriate buffer. The internal timer is reset
(all bits set to “0”) when Initialization Mode is active.
0 = Disable internal MSCAN timer
1 = Enable internal MSCAN timer
5 WUPE WakeUp Enable—bit lets MSCAN restart when being locked in idle state during sleep mode
and traffic on CAN is detected.
0 = WakeUp disabled—MSCAN ignores traffic on CAN
1 = WakeUp enabled—MSCAN is able to restart
6 SLPRQ Sleep Mode Request—bit requests MSCAN enter sleep mode, an internal power saving mode.
If a CAN message transfer is occurring when receiving this request, MSCAN waits until end of
current message before entering sleep mode. The module indicates entry to Sleep Mode by
setting SLPAK=1. MSCAN Control 1 Register (CANCTL1). Sleep mode is active until the CPU
clears SLPRQ or, depending on the WUPE bit setting, MSCAN detects CAN bus activity and
clears SLPRQ.
0 = Running—MSCAN functions normally
1 = Sleep Mode Request—MSCAN locks in idle state
7 INITRQ Initialization Mode Request—When the CPU sets this bit, MSCAN skips to initialization mode.
Any ongoing transmission or reception is aborted and bus synchronization lost. The module
indicates entry to initialization mode by setting INITAK=1
INITAK
R
CLKSRC
LISTEN
LOOPB
WUPM
CANE
Rsvd
RESET: 0 0 0 1 0 0 0 1
The MSCAN Control Register 1 provides for various control and handshake status information of the MSCAN module.
READ: Anytime
WRITE: Anytime when INITRQ = 1 and INITAK = 1, except CANE which is write once in normal modes and anytime in special modes
when the MSCAN is in Initialization Mode (INITRQ = 1 and INITAK = 1).
1 CLKSRC MSCAN Clock Source—bit defines MSCAN module clock source (only for systems with a
system clock generation module.
0 = MSCAN clock source is the IP bus clock (IP CLK)
1 = MSCAN clock source is the oscillator clock (SYS_XTAL_IN)
NOTE: Both MSCAN modules can have only the same selected clock source.To select the
oscillator clock the CLKSRC bit in the CANCTL1 register must be set in MSCAN1 OR/AND in
MSCAN2.
2 LOOPB Loop-Back Self-Test Mode—when bit is set, MSCAN does an internal loop-back that can be
used for self test operation. Tx bit-stream output feeds back to receiver internally. RxCAN input
pin is ignored and TxCAN output goes to recessive state (logic ‘1’). MSCAN behaves as it does
normally when transmitting and treats its own transmitted message as a message received
from a remote node. In this state, MSCAN ignores bit sent during ACK slot in CAN frame
acknowledge field to ensure proper reception of its own message. Both Tx and Rx interrupts
are generated.
3 LISTEN Listen-Only Mode—bit configures MSCAN as bus monitor1. When bit is set, all valid CAN
messages with matching ID are received, but no acknowledgement or error frames are sent
out. In addition, error counters are frozen. Listen-only mode supports applications that require
“hot plugging” or throughput analysis. MSCAN is unable to transmit any messages, when
listen-only mode is active.
0 = normal operation
1 = Listen Only Mode activated
4 — Reserved
5 WUPM WakeUp Mode—bit defines whether the integrated low-pass filter is applied to protect the
MSCAN from spurious WakeUp.
0 = MSCAN wakes-up the CPU after any recessive to dominant edge on the CAN bus and
WUPE=1 in CANCTL0
1 = MSCAN wakes-up the CPU only in case of a dominant pulse on the bus which has a
length of Twup and WUPE=1 in CANCTL0
6 SLPAK Sleep Mode Acknowledge—flag indicates whether MSCAN module has entered sleep mode.
It is used as a handshake flag for SLPRQ sleep mode request. Sleep mode is active when
INITRQ=1 and INITAK=1. Depending on the WUPE bit setting, MSCAN clears the flag if it
detects bus activity on CAN while in Sleep Mode.
0 = Running—MSCAN operates normally
1 = Sleep Mode Active—MSCAN has entered Sleep Mode
R SJW[1:0] BRP[5:0]
RESET: 0 0 0 0 0 0 0 0
The MSCAN Bus Timing Register 0 provides for various bus timing control of the MSCAN module.
Read: Anytime
Write: Anytime in Initialization Mode (INITRQ = 1 and INITAK = 1)
0:1 SJW[1:0] Synchronization Jump Width—defines the maximum number of time quanta (Tq) clock
cycles a bit can be shortened or lengthened to achieve re-synchronization to data transitions
on the bus.
00 = 1 Tq clock cycle
10 = 2 Tq clock cycles
01 = 3 Tq clock cycles
11 = 4 Tq clock cycles
2:7 BRP[5:0] Baud Rate Prescaler—bits determine time quanta (Tq) clock used to build up individual bit
timing, see Table 19-6.
0 0 0 0 0 0 1
0 0 0 0 0 1 2
0 0 0 0 1 0 3
0 0 0 0 1 1 4
........................................................................................................................................
1 1 1 1 1 0 63
1 1 1 1 1 1 64
R TSEG[22:20] TSEG[13:10]
SAMP
RESET: 0 0 0 0 0 0 0 0
The MSCAN Bus Timing Register 1 provides for various bus timing control of the MSCAN module.
Read: Anytime
Write: Anytime in Initialization Mode (INITRQ = 1 and INITAK = 1)
0 SAMP Sampling—bit determines number of serial bus samples taken per bit-time. If set, three
samples per bit are taken; the regular one (sample point) and two preceding samples using
a majority rule. For higher bit-rates, it is recommended that SAMP be cleared, which
means only one sample is taken per bit.
0 = One sample per bit
1 = Three samples per bit
1:3 TSEG[22:20] Time Segment 2—time segments within the bit-time, fix the number of clock cycles per
bit-time and the location of the sample point. Time segment 2 (TSEG2) values are
programmable as shown in Table 19-9.
4:7 TSEG[13:10] Time Segment 1—time segments within the bit-time, fix the number of clock cycles per
bit-time and the location of the sample point. Time segment 1 (TSEG1) values are
programmable as shown in Table 19-8.
Read: Anytime
Write: Anytime in Initialization Mode (INITRQ = 1 and INITAK = 1)
Bit-time, as shown below, is determined by:
• oscillator frequency
• baud rate prescaler
• number of time quanta (Tq) clock cycles per bit
Table 19-8 and Table 19-9 give time segment values.
(Prescaler value)
Bit Time =
• (Number of Time Quanta)
fCANCLK
0 0 1 1 4 Tq clock cycles
...................................................................................................................................
1 1 1 0 15 Tq clock cycles
1 1 1 1 16 Tq clock cycles
0 0 1 2 Tq clock cycles
....................................................................................................................................
1 1 0 7 Tq clock cycles
1 1 1 8 Tq clock cycles
WUPIF
R RSTAT[1:0] TSTAT[1:0]
CSCIF
OVRIF
RXF
W
RESET: 0 0 0 0 0 0 0 0
Note: This register is held in the reset state when the initialization mode is active (INITRQ = 1 and INITAK = 1). This register is
writable again as soon as the initialization mode is exited (INITRQ = 0 and INITAK = 0).
A flag can only be cleared when the condition which caused the setting is no longer valid and can only be cleared by software (writing a “1”
to the corresponding bit position). Every flag has an associated interrupt enable bit in the MSCAN Receive Interrupt Enable Register.
Read: Anytime
Write: Anytime when out of initialization mode, except RSTAT(1:0) & TSTAT(1:0) flags which are read only; write of “1” clears flag; write
of “0” ignored.
0 WUPIF WakeUp Interrupt Flag—If MSCAN detects bus activity while in sleep mode and WUPE=1
in CANTCTL0, it sets the WUPIF flag. If not masked, a WakeUp interrupt is pending while
this flag is set.
0 = No WakeUp activity observed while in Sleep Mode.
1 = MSCAN detected bus activity and requested WakeUp.
1 CSCIF CAN Status Change Interrupt Flag—flag is set when MSCAN changes its current bus
status due to actual value of Tx error counter (TEC) and Rx error counter (REC). An
additional 4-bit (RSTAT[1:0], TSTAT[1:0]) status register, split into separate sections for
TEC/REC, notifies system of actual bus status.
If not masked, an error interrupt is pending while this flag is set. CSCIF provides a blocking
interrupt. That guarantees the Rx/Tx status bits (RSTAT/TSTAT) are updated only when
no CAN Status Change interrupt is pending.
If TECs/RECs change their current value after CSCIF is asserted and therefore cause an
additional state change in RSTAT/TSTAT bits, these bits keep their old state bits until the
current CSCIF interrupt is again cleared.
0 = No change in bus status occurred since last interrupt
1 = MSCAN changed current bus status.
2:3 RSTAT[1:0] Receiver Status bits—values of the error counters control the actual bus status of the
MSCAN. As soon as the status change interrupt flag (CSCIF) is set these bits indicate the
appropriate receiver related bus status of the MSCAN. The coding for the bits RSTAT1,
RSTAT0 is:
00 = RxOK: 0 ≤ Receive Error Counter ≤ 96
01 = RxWRN: 96 < Receive Error Counter ≤ 127
10 = RxERR: 127 < Receive Error Counter
11 = BusOff: 255 > Transmit Error Counter
4:5 TSTAT[1:0] Transmitter Status bits—values of the error counters control the actual bus status of the
MSCAN. As soon as the status change interrupt flag (CSCIF) is set these bits indicate the
appropriate transmitter related bus status of the MSCAN. The coding for the bits TSTAT1,
TSTAT0 is:
00 = TxOK: 0 ≤ Transmit Error Counter ≤ 96
01 = TxWRN: 96 < Transmit Error Counter ≤ 127
10 = TxERR: 127 < Transmit Error Counter ≤ 255
11 = BusOff: 255 > Transmit Error Counter
6 OVRIF Overrun Interrupt Flag—flag is set when a data overrun condition occurs. If not masked,
an Error interrupt is pending while this flag is set.
0 = No data overrun condition.
1 = data overrun detected.
7 RXF Receive Buffer Full—flag is set by MSCAN when a new message is shifted into RX FIFO.
Flag indicates whether the shifted buffer is loaded with a correctly received message
(matching identifier, matching cyclic redundancy code (CRC) and no other errors
detected). After CPU reads message from RxFG buffer in Rx FIFO, RxF flag must be
cleared to release the buffer.
A set RxF flag prohibits shifting of next FIFO entry into foreground buffer (RxFG). If not
masked, RX interrupt is pending while this flag is set.
To ensure data integrity, do not read the Rx buffer registers while RxF flag is cleared. For
MCUs with dual CPUs, reading Rx buffer registers while RxF flag is cleared may result in
a CPU fault condition.
0 = No new message available within RxFG.
1 = Rx FIFO not empty. New message is available in RxFG.
Note:
1. Every flag has an associated interrupt enable bit in the CANRIER register. A flag can only be cleared:
• when the condition that caused the setting is no longer valid.
• by software writing 1 to the corresponding bit position.
WARNING: To ensure data integrity, do not read the receive buffer registers while the RX Flag is cleared.
R RSTATE[1:0] TSTATE[1:0]
WUPIE
CSCIE
OVRIE
W RXFIE
RESET: 0 0 0 0 0 0 0 0
2:3 RSTATE[1:0] Receiver Status Change Enable—bits control sensitivity level in which Rx state changes
cause CSCIF interrupts. Independent of the chosen sensitivity level, RSTATE flags still
indicate the actual Rx state and are only updated if no CSCIF interrupt is pending.
00 = Do not generate CSCIF interrupt caused by Rx state changes.
01 = Generate CSCIF interrupt only if receiver enters or leaves “BusOff” state. Discard other
Rx state changes for generating CSCIF interrupt.
10 = Generate CSCIF interrupt only if receiver enters or leaves “RxErr” or “BusOff” state.
Discard other Rx state changes for generating CSCIF interrupt.
11 = Generate CSCIF interrupt on all state changes.
4:5 TSTATE[1:0] Transmitter Status Change Enable—bits control sensitivity level in which Tx state changes
cause CSCIF interrupts. Independent of the chosen sensitivity level, TSTATE flags still
indicate the actual Tx state and are only updated if no CSCIF interrupt is pending.
00 = Do not generate CSCIF interrupt caused by Tx state changes.
01 = Generate CSCIF interrupt only if transmitter enters or leaves “BusOff” state.
Discard other Tx state changes for generating CSCIF interrupt.
10 = Generate CSCIF interrupt only if transmitter enters or leaves “TxErr” or “BusOff”
state. Discard other Tx state changes for generating CSCIF interrupt.
11 = Generate CSCIF interrupt on all state changes.
Note: The MSCAN Receive Interrupt Enable Register is held in reset state when the initialization mode is active (INITRQ = 1
and INITAK = 1). This register is writable again as soon as the initialization mode is exited (INITRQ = 0 and INITAK = 0).
R Reserved TXE[2:0]
RESET: 0 0 0 0 0 1 1 1
0:4 — Reserved
5:7 TXE[2:0] Transmitter Buffer Empty—flag indicates the associated Tx message buffer is empty, and
thus not scheduled for transmission. CPU must clear the flag after a message is set up in
the Tx buffer and is due for transmission. MSCAN sets flag after message is successfully
sent. Flag is also set by MSCAN when Tx request is successfully aborted due to a pending
abort request. If not masked, a Tx interrupt is pending while this flag is set.
Clearing a TxEx flag also clears the corresponding ABTAKx. When a TxEx flag is set, the
corresponding ABTRQx bit is cleared. When listen-mode is active TxEx flags cannot be
cleared and no transmission is started.
0 = associated message buffer full (loaded with message due for Tx)
1 = associated message buffer empty (not scheduled)
Note: This register is held in the reset state when the initialization mode is active (INITRQ = 1 and INITAK = 1). This register is
writable again as soon as the initialization mode is exited (INITRQ = 0 and INITAK = 0).
Read: Anytime
Write: Anytime for TXEx flags when not in Initialization Mode; write of “1” clears flag, write of ‘0’ is ignored.
R Reserved TXEIE[2:0]
RESET: 0 0 0 0 0 0 0 0
0:4 — Reserved
Note: This register is held in the reset state when the initialization mode is active (INITRQ = 1 and INITAK = 1). This register is
writable again as soon as the initialization mode is exited (INITRQ = 0 and INITAK = 0).
Read: Anytime
Write: Anytime when not in Initialization Mode.
R Reserved ABTRQ[2:0]
RESET: 0 0 0 0 0 0 0 0
0:4 — Reserved
5:7 ABTRQ[2:0] Abort Request—CPU sets bit to request a scheduled message buffer (TxEx=0) be
aborted. MSCAN grants request if message has not already started transmission, or if
transmission is not successful (lost arbitration or error). When message is aborted, the
associated TxE and abort acknowledge flags (ABTAK) are set and a Tx interrupt occurs if
enabled. The CPU cannot reset ABTRQx. ABTRQx is reset whenever the associated TxE
flag is set.
0 = No abort request
1 = Abort request pending
Note: This register is held in the reset state when the initialization mode is active (INITRQ = 1 and INITAK = 1). This register is
writable again as soon as the initialization mode is exited (INITRQ = 0 and INITAK = 0).
Read: Anytime
Write: Anytime when not in Initialization Mode; write of “1” clears flag, write of ‘0’ is ignored.
R Reserved ABTAK[2:0]
RESET: 0 0 0 0 0 0 0 0
Note: This register is held in the reset state when the initialization mode is active (INITRQ = 1 and INITAK = 1).
READ: Anytime
WRITE: Not writable at any time
.
0:4 — Reserved
5:7 ABTAK[2:0] Abort Acknowledge—flag acknowledges message was aborted due to pending CPU abort
request. After a specific message buffer is flagged empty, application software can use this
flag to identify whether message was successfully aborted or was sent. Flag is cleared
whenever the corresponding TxE flag is cleared.
0 = message not aborted
1 = message aborted
R Reserved TX[2:0]
RESET: 0 0 0 0 0 0 0 0
0:4 — Reserved
5:7 TX[2:0] Transmit Buffer Select—lowest numbered bit places respective Tx buffer in CANTxFG
register space (e.g., Tx1=1 and Tx0=1 selects Tx buffer Tx0, Tx1=1 and Tx0=0 selects Tx
buffer Tx1)
0 = associated message buffer deselected
1 = associated message buffer selected, if lowest numbered bit
Note: This register is held in the reset state when the initialization mode is active (INITRQ = 1 and INITAK = 1). This register is
writable again as soon as the initialization mode is exited (INITRQ = 0 and INITAK = 0).
READ: Find the lowest ordered bit set to ‘1’, all other bits will be read as ‘0’
WRITE: Anytime when not in Initialization Mode
RESET: 0 0 0 0 0 0 0 0
READ: Anytime
WRITE: Anytime in Initialization Mode (INITRQ = 1 and INITAK =1)
0:1 — Reserved
2:3 IDAM[1:0] Identifier Acceptance Mode—CPU sets these flags to define the identifier acceptance filter
organization. In filter closed mode, no message is accepted such that the foreground buffer
is never reloaded. See Table 19-19.
4 — Reserved
5:7 IDHIT[2:0] Identifier Acceptance Hit Indicator—MSCAN sets these flags to indicate an identifier
acceptance hit. See Table 19-18.
0 0 0 Filter 0 Hit
0 0 1 Filter 1 Hit
0 1 0 Filter 2 Hit
0 1 1 Filter 3 Hit
1 0 0 Filter 4 Hit
1 0 1 Filter 5 Hit
1 1 0 Filter 6 Hit
1 1 1 Filter 7 Hit
1 1 Filter Closed
R RxERR[7:0]
RESET: 0 0 0 0 0 0 0 0
Note: This register reflects the status of the MSCAN receive error counter.
READ: Only when in Sleep Mode (SLPRQ = 1 and SLPAK = 1) or Initialization Mode (INITRQ = 1 and INITAK =1).
WRITE: Unimplemented
NOTE
Reading this register when in any other mode other than sleep or Initialization may return an incorrect
value.
NOTE
Writing to these registers when in special modes can alter the MSCAN functionality.
0:7 RxERR[7:0] This register reflects the status of the MSCAN receive error counter.
R TxERR[7:0]
RESET: 0 0 0 0 0 0 0 0
Note: This register reflects the status of the MSCAN transmit error counter.
READ: Only when in Sleep Mode (SLPRQ = 1 and SLPAK = 1) or Initialization Mode (INITRQ = 1 and INITAK =1).
WRITE: Unimplemented
NOTE
Reading this register when in any other mode other than sleep or Initialization may return an incorrect
value.
NOTE
Writing to these registers when in special modes can alter the MSCAN functionality.
0:7 TxERR[7:0] This register reflects the status of the MSCAN receive error counter.
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
0:7 AC[7:0] Acceptance Code—bits comprise a user defined sequence with which corresponding bits
of the related identifier register (IDRn) of the receive message buffer are compared. Result
of this comparison is then masked with the corresponding identifier mask register.
READ: Anytime
WRITE: Anytime in initialization mode (INITRq + 1 and INITAK = 1).
On reception, each message is written into the background receive buffer. The CPU is only signalled to read the message if it passes the criteria
in the identifier acceptance and identifier mask registers (accepted); otherwise, the message is overwritten by the next message (dropped).
On reception, each message is written into the background receive buffer. The CPU is only signalled to read the message if it passes the criteria
in the identifier acceptance and identifier mask registers (accepted); otherwise, the message is overwritten by the next message (dropped).
The acceptance registers of the MSCAN are applied on the IDR0 to IDR3 registers of incoming messages in a bit by bit manner.
For extended identifiers, all four acceptance and mask registers are applied. For standard identifiers, only the first two (CANIDAR0/1,
CANIDMR0/1) are applied.
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
msb 0 1 2 3 4 5 6 7 lsb
RESET: 0 0 0 0 0 0 0 0
READ: Anytime
WRITE: Anytime in initialization mode (INITRq + 1 and INITAK = 1).
0:7 AM[7:0] Acceptance Mask bits—If a particular bit in this register is cleared, this indicates the
corresponding bit in the identifier acceptance register must be the same as its identifier bit
before a match is detected. The message is accepted if all such bits match. If a bit is set,
it indicates the state of the corresponding bit in the identifier acceptance register does not
affect whether or not message is accepted.
0 = Match corresponding acceptance code register and identifier bits
1 = Ignore corresponding acceptance code register bit
The identifier mask register specifies which of the corresponding bits in the identifier acceptance register are relevant for acceptance filtering.
• To receive standard identifiers in 32-bit filter mode, the last three bits (AM[0:2]) in the following mask registers must be
programmed as "don’t care”:
— CANIDMR1
— CANIDMR5
• To receive standard identifiers in 16-bit filter mode, the last three bits (AM[0:2]) in the following mask registers must be
programmed as "don’t care”:
— CANIDMR1
— CANIDMR3
— CANIDMR5
— CANIDMR7
Figure 19-27 shows the common 13 byte data structure of receive and transmit buffers for extended identifiers. The mapping of standard
identifiers into the IDR registers is shown in Figure 19-28. All bits of the receive and transmit buffers are ‘x’ out of reset because of RAM
based implementation1.All reserved or unused bits of the receive and transmit buffers are always read ‘x’.
Table 19-27. Receive / Transmit Message Buffer Extended Identifier
Register Bit 7 6 5 4 3 2 1 Bit 0 ADDR
IDR0 Read: ID28 ID27 ID26 ID25 ID24 ID23 ID22 ID21 $__00
Write:
IDR1 Read: ID20 ID19 ID18 SRR (=1) IDE (=1) ID17 ID16 ID15 $__01
Write:
= Unuseda
IDR2 Read: ID14 ID13 ID12 ID11 ID10 ID9 ID8 ID7 $__04
Write:
IDR3 Read: ID6 ID5 ID4 ID3 ID2 ID1 ID0 RTR $__05
Write:
DSR0 Read: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 $__08
Write:
DSR1 Read: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 $__09
Write:
DSR2 Read: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 $__0C
Write:
DSR3 Read: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 $__0D
Write:
DSR4 Read: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 $__10
Write:
DSR5 Read: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 $__11
Write:
DSR6 Read: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 $__14
Write:
DSR7 Read: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 $__15
Write:
= Unuseda
a
Unused bits are always read ‘x’
Read: anytime for transmit buffers; only when RXF flag is set for receive buffers (see Section 19.5.7, MSCAN Receiver Flag Register
(CANRFLG)—MBAR+0x0908).
Write: anytime for transmit buffers when TXEx flag is set (see Section 19.5.9, MSCAN Transmitter Flag Register (CANTFLG)—MBAR +
0x090C) and the corresponding transmit buffer is selected in CANTBSEL (see Section 19.5.13, MSCAN Transmit Buffer Selection
(CANTBSEL)—MBAR + 0x0914); unimplemented for receive buffers
Reset: $xx because of RAM based implementation
Table 19-28. Standard Identifier Mapping
Register Bit 7 6 5 4 3 2 1 Bit 0 ADDR
IDR0 Read: ID10 ID9 ID8 ID7 ID6 ID5 ID4 ID3 $__x0
Write:
= Unuseda
Write:
Write:
Write:
= Unuseda
a
Unused bits are always read ‘x’
This register keeps the data length field of the CAN frame.
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
R
PRIO7
PRIO6
PRIO5
PRIO4
PRIO3
PRIO2
PRIO1
PRIO0
W
RESET: 0 0 0 0 0 0 0 0
0:7 PRIO[7:0] Register defines local priority of associated message buffer. Local priority is used for
MSCAN internal prioritization process and is defined to be highest for the smallest binary
number. MSCAN implements the following internal prioritization mechanisms:
• All transmission buffers with a cleared TXEx flag participate in prioritization
immediately before start of frame (SOF) is sent.
• Transmission buffer with lowest local priority field wins prioritization.
• If more than one buffer has the same lowest priority, message buffer with lower index
number wins.
TSR14
TSR13
TSR12
TSR11
TSR10
R
TSR9
TSR8
RESET: 0 0 0 0 0 0 0 0
READ: Anytime
WRITE: Unimplemented
0:7 TSR[15:8] If TIME bit is enabled, MSCAN writes a special time stamp to respective registers in active
Tx or Rx buffer as soon as a message is acknowledged on the CAN bus. Time stamp is
written on bit sample point for recessive bit of ACK delimiter in CAN frame. If Tx, CPU can
only read time stamp after respective Tx buffer is flagged empty.
Timer value, used for stamping, is taken from a free running internal CAN bit-clock. Timer
overrun is not indicated by MSCAN. Timer is reset (all bits set to 0) during initialization
mode. CPU can only read time stamp registers.
TSR6
TSR5
TSR4
TSR3
TSR2
TSR1
TSR0
R
RESET: 0 0 0 0 0 0 0 0
READ: Anytime
WRITE: Unimplemented
0:7 TSR[7:0] If TIME bit is enabled, MSCAN writes a special time stamp to respective registers in active
Tx or Rx buffer as soon as message is acknowledged on CAN bus. Time stamp is written
on bit sample point for recessive bit of ACK delimiter in CAN frame. If Tx, CPU can only
read time stamp after respective Tx buffer is flagged empty.
Timer value, used for stamping, is taken from a free running internal CAN bit-clock. Timer
overrun is not indicated by MSCAN. Timer is reset (all bits set to 0) during initialization
mode. CPU can only read time stamp registers.
19.7.1 General
This section provides a complete functional description of the MSCAN. It describes each of the features and modes listed in the introduction.
Rx0
Rx1
Rx2
MSCAN Rx3
Rx3
RxBG
RXF
CPU bus
RxFG
Receiver
Tx0 TXE0
TxBG
PRIO
Tx1 TXE1
CPU bus
MSCAN
TxFG
PRIO
Tx2 TXE2
TxBG
Transmitter PRIO
MSCAN facilitates a sophisticated message storage system which addresses the requirements of a broad range of network applications.
1. Reference the Bosch CAN 2.0A/B protocol specification dated September 1991.
A double buffer scheme de-couples the reloading of the transmit buffer from the actual message sending and, as such, reduces the reactiveness
requirements on the CPU. Problems can arise if the sending of a message is finished while the CPU re-loads the second buffer. No buffer
would then be ready for transmission and the bus would be released.
At least three transmit buffers are required to meet the first of the above requirements under all circumstances. The MSCAN has three transmit
buffers.
The second requirement calls for some sort of internal prioritization which the MSCAN implements with the “local priority” concept
described in Section 19.7.2.2, Transmit Structures.
1. The transmit interrupt occurs only if not masked. A polling scheme can be applied on TXEx also.
2. Reference the Bosch CAN 2.0A/B protocol specification dated September 1991 for details.
3. Only if the RXF flag is not set.
flag, and generates a receive interrupt Section 19.7.9.2, Receive Interrupt to the CPU1. The user’s receive handler has to read the received
message from the RxFG and then reset the RXF flag to acknowledge the interrupt and to release the foreground buffer. A new message, which
can follow immediately after the IFS field of the CAN frame, is received into the next available RxBG. If the MSCAN receives an invalid
message in its RxBG (wrong identifier, transmission errors etc.) the actual contents of the buffer will be over-written by the next message.
The buffer will then not be shifted into the FIFO.
When the MSCAN module is transmitting, the MSCAN receives its own transmitted messages into the background receive buffer, RxBG, but
does not shift it into the receiver FIFO, generate a receive interrupt, or acknowledge its own messages on the CAN bus. The exception to this
rule is in loop back mode Section 19.5.4, MSCAN Control Register 1 (CANCTL1)—MBAR + 0x0901 where the MSCAN treats its own
messages exactly like all other incoming messages. The MSCAN receives its own transmitted messages in the event that it loses arbitration2.
If arbitration is lost, the MSCAN must be prepared to become a receiver.
An overrun condition occurs when all receive message buffers in the FIFO are filled with correctly received messages with accepted identifiers
and another message is correctly received from the bus with an accepted identifier. The latter message is discarded and an error interrupt with
overrun indication is generated if enabled Section 19.7.9.4, Error Interrupt. The MSCAN is still able to transmit messages while the receiver
FIFO being filled, but all incoming messages are discarded. As soon as a receive buffer in the FIFO is available again, new valid messages
will be accepted.
1. The receive interrupt occurs only if not masked. A polling scheme can be applied on RXF also.
2. Reference the Bosch CAN 2.0A/B protocol specification dated September 1991 for details.
3. For a better understanding of references made within the filter mode description, reference the Bosch specification dated September 1991
which details the CAN 2.0A/B protocol.
4. Although this mode can be used for standard identifiers, it is recommended to use the four or eight identifier acceptance filters for standard
identifiers
CAN 2.0B
Extended Identifier ID28 IDR0 ID21 ID20 IDR1 ID15 ID14 IDR2 ID7 ID6 IDR3 RTR
CAN 2.0A/B
Standard Identifier ID10 IDR0 ID3 ID2 IDR1 IDE ID10 IDR2 ID3 ID10 IDR3 ID3
AM7 CANIDMR0 AM0 AM7 CANIDMR1 AM0 AM7 CANIDMR2 AM0 AM7 CANIDMR3 AM0
AC7 CANIDAR0 AC0 AC7 CANIDAR1 AC0 AC7 CANIDAR2 AC0 AC7 CANIDAR3 AC0
CAN 2.0B
Extended Identifier ID28 IDR0 ID21 ID20 IDR1 ID15 ID14 IDR2 ID7 ID6 IDR3 RTR
CAN 2.0A/B ID10 IDR0 ID3 ID2 IDR1 IDE ID10 IDR2 ID3 ID10 IDR3 ID3
Standard Identifier
CAN 2.0B
Extended Identifier ID28 IDR0 ID21 ID20 IDR1 ID15 ID14 IDR2 ID7 ID6 IDR3 RTR
CAN 2.0A/B
Standard Identifier ID10 IDR0 ID3 ID2 IDR1 IDE ID10 IDR2 ID3 ID10 IDR3 ID3
• All registers which control the configuration of the MSCAN cannot be modified while the MSCAN is on-line. The MSCAN has to
be in Initialization Mode. The corresponding INITRQ/INITAK handshake bits in the CANCTL0/CANCTL1 registers Section
19.5.3, MSCAN Control Register 0 (CANCTL0)—MBAR + 0x0900 serve as a lock to protect the following registers:
— MSCAN Control 1 Register (CANCTL1)
— MSCAN Bus Timing Registers 0 and 1 (CANBTR0, CANBTR1)
— MSCAN Identifier Acceptance Control Register (CANIDAC)
— MSCAN Identifier Acceptance Registers (CANIDAR0-7)
— MSCAN Identifier Mask Registers (CANIDMR0-7)
• The TXCAN pin is immediately forced to a recessive state when the MSCAN goes into the Power Down Mode or Initialization
Mode (see Section 19.7.8.6, MSCAN Power Down Mode and Section 19.7.8.5, MSCAN Initialization Mode).
• The MSCAN enable bit (CANE) is only writable once in normal modes as further protection against inadvertently disabling the
MSCAN.
MSCAN
IP bus clock
CLKSRC
Oscillator Clock
The clock source bit (CLKSRC) in the CANCTL1 register Section 19.5.4, MSCAN Control Register 1 (CANCTL1)—MBAR + 0x0901 defines
whether the internal CANCLK is connected to the output of the system oscillator clock (SYS_XTAL_IN) or to the IP bus clock.
NOTE
Both MSCAN modules can have only the same selected clock source. To select the oscillator clock
the CLKSRC bit in the CANCTL1 register must be set in MSCAN1 OR/AND in MSCAN2.
The clock source has to be chosen such that the tight oscillator tolerance requirements (up to 0.4%) of the CAN protocol are met. Additionally,
for high CAN bus rates (1 Mbps), a 45%-55% duty cycle of the clock is required.
Because the Bus Clock is generated from a PLL, it is recommended to select the Oscillator Clock rather than the Bus Clock due to jitter
considerations, especially at the faster CAN bus rates.
A programmable prescaler generates the time quanta (Tq) clock from CANCLK. A time quantum is the atomic unit of time handled by the
MSCAN.
f CANCLK
f Tq = -------------------------------------------------------
( Prescaler Þ value )
A bit time is subdivided into three segments1 2 (reference Figure 19-8):
• SYNC_SEG: This segment has a fixed length of one time quantum. Signal edges are expected to happen within this section.
• Time Segment 1: This segment includes the PROP_SEG and the PHASE_SEG1 of the CAN standard. It can be programmed by
setting the parameter TSEG1 to consist of 4 to 16 time quanta.
1. For further explanation of the under-lying concepts please refer to ISO/DIS 11519-1, Section 10.3.
2. Reference the Bosch CAN 2.0A/B protocol specification dated September 1991 for bit timing.
• Time Segment 2: This segment represents the PHASE_SEG2 of the CAN standard. It can be programmed by setting the TSEG2
parameter to be 2 to 8 time quanta long.
f Tq
Bit Þ Rate = ----------------------------------------------------------------------------------------
-
( number Þ of Þ Time Þ Quanta )
NRZ Signal
1 4 ... 16 2 ... 8
Syntax Description
SYNC_SEG System expects transitions to occur on the bus during this period.
Transmit Point A node in transmit mode transfers a new value to the CAN bus at this
point.
Sample Point A node in receive mode samples the bus at this point. If the three
samples per bit option is selected, then this point marks the position
of the third sample.
The Synchronization Jump Width1 can be programmed in a range of 1 to 4 time quanta by setting the SJW parameter.
The above parameters are set by programming the MSCAN Bus Timing Registers (CANBTR0, CANBTR1) (see Section 19.5.3, MSCAN
Control Register 0 (CANCTL0)—MBAR + 0x0900 and Section 19.5.6, MSCAN Bus Timing Register 1 (CANBTR1)—MBAR + 0x0905).
Table 19-34 gives an overview of the CAN compliant segment settings and the related parameter values.
NOTE
It is the user’s responsibility to ensure the bit time settings are in compliance with the CAN standard.
Synchronization
Time Segment 1 TSEG1 Time Segment 2 TSEG2 SJW
Jump Width
5 .. 10 4 .. 9 2 1 1 .. 2 0 .. 1
4 .. 11 3 .. 10 3 2 1 .. 3 0 .. 2
5 .. 12 4 .. 11 4 3 1 .. 4 0 .. 3
1. Reference the Bosch CAN 2.0A/B protocol specification dated September 1991 for bit timing.
Table 19-34. CAN Standard Compliant Bit Time Segment Settings (continued)
Synchronization
Time Segment 1 TSEG1 Time Segment 2 TSEG2 SJW
Jump Width
6 .. 13 5 .. 12 5 4 1 .. 4 0 .. 3
7 .. 14 6 .. 13 6 5 1 .. 4 0 .. 3
8 .. 15 7 .. 14 7 6 1 .. 4 0 .. 3
9 .. 16 8 .. 15 8 7 1 .. 4 0 .. 3
SLPRQ
SLPRQ SYNC
sync. Flag
CPU SLPRQ
Sleep Request
SLPAK sync.
Flag
SYNC SLPAK
SLPAK MSCAN
in Sleep Mode
NOTE
The application software must avoid setting up a transmission (by clearing one or more TXEx flag(s))
and immediately request Sleep Mode (by setting SLPRQ). It depends on the exact sequence of
operations whether the MSCAN starts transmitting or goes into Sleep Mode directly.
If Sleep Mode is active, the SLPRQ and SLPAK bits are set (Figure 19-9). The application software must use SLPAK as a handshake
indication for the request (SLPRQ) to go into Sleep Mode.
When in Sleep Mode (SLPRQ=1 and SLPAK=1), the MSCAN stops its internal clocks. However, clocks to allow register accesses from the
CPU side still run. If the MSCAN is in Bus-Off state, it stops counting the 128*11 consecutive recessive bits due to the stopped clocks. The
TXCAN pin remains in a recessive state. If RXF=1, the message can be read and RXF can be cleared. Shifting a new message into the
foreground buffer of the receiver FIFO (RxFG) does not take place while in Sleep Mode. It is possible to access the transmit buffers and to
clear the associated TXE flags. No message abort takes place while in Sleep Mode. If the WUPE bit in CANCLT0 is not asserted, the MSCAN
will mask any activity it detects on CAN. The RXCAN pin is therefore held internally in a recessive state. This locks the MSCAN in Sleep
Mode (Section Figure 19-10., Simplified State Transitions for Entering/Leaving Sleep Mode).
The MSCAN is only able to leave Sleep Mode (wake-up) when
• bus activity occurs and WUPE=1 or
• the MCU clears the SLPRQ bit
NOTE
The MCU cannot clear the SLPRQ bit before Sleep Mode (SLPRQ=1 and SLPAK=1) is active.
After wake-up, the MSCAN waits for 11 consecutive recessive bits to synchronize to the bus. As a consequence, if the MSCAN is woken-up
by a CAN frame, this frame is not received. The receive message buffers (RxFG and RxBG) contain messages if they were received before
Sleep Mode was entered. All pending actions will be executed upon wake-up; copying of RxBG into RxFG, message aborts and message
transmissions. If the MSCAN is still in Bus-Off state after Sleep Mode was left, it continues counting the 128*11 consecutive recessive bits.
CAN Activity
CAN Activity
SLPRQ
SYNC
INIT
INITRQ sync. Flag
CPU INITRQ
Init Request
Due to independent clock domains within the MSCAN the INITRQ has to be synchronized to all domains by using a special handshake
mechanism. This handshake causes additional synchronization delay (). If there is no message transfer ongoing on the CAN bus, the minimum
delay will be two additional bus clocks and three additional CAN clocks. When all parts of the MSCAN are in Initialization Mode the INITAK
flag is set. The application software must use INITAK as a handshake indication for the request (INITRQ) to go into Initialization Mode.
NOTE
The MCU cannot clear the INITRQ bit before Initialization Mode (INITRQ=1 and INITAK=1) is
active.
Notes
Chapter 20
Byte Data Link Controller (BDLC)
20.1 Overview
The BDLC module is a serial communication module which allows the user to send and receive messages across a Society of Automotive
Engineers (SAE) J1850 serial communication network. The user’s software handles each transmitted or received message on a byte-by-byte
basis, while the BDLC performs all of the network access, arbitration, message framing and error detection duties.
It is recommended that the reader be familiar with the operation and requirements of the SAE J1850 protocol as described in the document
“SAE Standard J1850 Class B Data Communications Network Interface” prior to proceeding with this specification.
The BDLC module is designed in a modular structure for use as an IP block. A general working knowledge of the IP bus signals and bus
control is assumed in the writing of this document.
20.2 Features
Features of the BDLC module include the following:
• SAE J1850 Class B Data Communications Network Interface Compatible and ISO Compatible for Low-Speed (≤ 125 Kbps) Serial
Data Communications in Automotive Applications
• 10.4 Kbps Variable Pulse Width (VPW) Bit Format
• Digital Noise Filter
• Digital Loopback Mode
• 4X Receive and Transmit Mode, 41.6 Kbps, Supported
• BREAK symbol generation Supported
• Block Mode Receive and Transmit Supported
• Collision Detection
• Hardware Cyclical Redundancy Check (CRC) Generation and Checking
• Dedicated Register for Symbol Timing Adjustments
• IP bus Interface
• In-Frame Response (IFR) Types 0, 1, 2, and 3 Supported
• Polling and CPU Interrupt Generation with Vector Lookup Available
Power Off
Reset
Any MCU reset source asserted No MCU reset source asserted
(from any mode)
BDLC
Disabled
BDLCE cleared in DLCSCR BDLCE set in DLCSCR
Run
Network activity or Network activity or
other MCU wake-up other MCU wake-up
• Power Off
This mode is entered from the Reset mode whenever the BDLC module supply voltage Vdd drops below its minimum specified
value for the BDLC module to guarantee operation. The BDLC module will be placed in the Reset mode by a system Low Voltage
Reset (LVR) before being powered down. In this mode, the pin input and output specifications are not guaranteed.
• Reset
This mode is entered from the Power Off mode whenever the BDLC module supply voltage Vdd rises above its minimum specified
value (Vdd(MIN)) and some MCU reset source is asserted. To prevent the BDLC from entering an unknown state, the internal MCU
reset is asserted while powering up the BDLC module. BDLC Reset mode is also entered from any other mode as soon as one of
the MCU’s possible reset sources (e.g. LVR, POR, COP watchdog, Reset pin etc.) is asserted.
In this mode, the internal BDLC module voltage references are operative, Vdd is supplied to the internal circuits, which are held in
their reset state and the internal BDLC module system clock is running. Registers will assume their reset condition. Outputs are held
in their programmed Reset state, inputs and network activity are ignored.
• BDLC Disabled
This mode is entered from the Reset mode after all MCU reset sources are no longer asserted. It is entered from the Run mode
whenever the BDLCE bit in the BDLC Control Register is cleared.
In this mode the mux interface clock (fbdlc) is stopped to conserve power and allow the BDLC module to be configured for proper
operation on the J1850 bus. The IP bus interface clocks are left running in this mode to allow access to all BDLC module registers
for initialization.
• Run
This mode is entered from the BDLC Disabled mode when the BDLCE bit in the BDLC Control Register is set. It is entered from
the BDLC Wait mode whenever activity is sensed on the J1850 bus or some other MCU source wakes the CPU out of Wait mode.
It is entered from the BDLC Stop mode whenever network activity is sensed or some other MCU source wakes the CPU out of Stop
mode. Messages will not be received properly until the clocks have stabilized and the CPU is also in the Run mode.
• BDLC Wait
This power conserving mode is automatically entered from the Run mode whenever the CPU executes a WAIT instruction and if
the WCM bit in the BDLC Control Register 1 register is previously cleared. In this mode, the BDLC module internal clocks continue
to run. Any activity on the J1850 network will cause the BDLC module to exit BDLC Wait mode and generate an unmaskable
interrupt of the CPU. This wakeup interrupt state is reflected in the BDLC State Vector Register, encoded as the highest priority
interrupt. This interrupt can be cleared by the CPU with a read of the BDLC State Vector Register.
– Wakeup from BDLC Wait with CPU in WAIT
If the CPU executes the WAIT instruction and the BDLC module enters the WAIT mode (WCM = 0), the clocks to the BDLC
module as well as the clocks in the MCU continue to run. Therefore, the message which wakes up the BDLC module from WAIT
and the CPU from WAIT mode will also be received correctly by the BDLC module. This is because all of the required clocks
continue to run in the BDLC module in WAIT mode.The wakeup behavior of the BDLC module applies regardless of whether the
BDLC module is in normal or 4X mode when the WAIT instruction is executed.
• BDLC Stop
This power conserving mode is automatically entered from the Run mode whenever the CPU executes a STOP instruction, or if the
CPU executes a WAIT instruction and the WCM bit in the BDLC Control Register 1 register is previously set. In this mode, the
BDLC internal clocks are stopped. Any activity on the network will cause the BDLC module to exit BDLC Stop mode and generate
an unmaskable interrupt of the CPU. This wakeup interrupt state is reflected in the BDLC State Vector Register, encoded as the
highest priority interrupt. This interrupt can be cleared by the CPU with a read of the BDLC State Vector Register. Depending upon
which low-power mode instruction the CPU executes to cause the BDLC module to enter BDLC Stop, the message which wakes
up the BDLC module (and the CPU) may or may not be received. There are two different possibilities, both of which is described
below. These descriptions apply regardless of whether the BDLC module is in normal or 4X mode when the STOP or WAIT
instruction is executed.
– Wakeup from BDLC Stop with CPU in STOP
When the CPU executes the STOP instruction, all clocks in the MCU, including clocks to the BDLC module, are turned off.
Therefore, the message which wakes up the BDLC module and the CPU from STOP mode will not be received. This is due primarily
to the amount of time required for the MCU’s oscillator to stabilize before the clocks can be applied internally to the other MCU
modules, including the BDLC module.
– Wakeup from BDLC Stop with CPU in WAIT
If the CPU executes the WAIT instruction and the BDLC module enters the Stop mode (WCM = 1), the clocks to the BDLC module
are turned off, but the clocks in the MCU continue to run. Therefore, the message which wakes up the BDLC module from Stop and
the CPU from WAIT mode will be received correctly by the BDLC module. This is because very little time is required for the CPU
to turn the clocks to the BDLC module back on once the wakeup interrupt occurs.
NOTE
While the BDLC module will correctly receive a message which arrives when the BDLC module is
in Stop mode or Wait mode and the MCU is in WAIT mode, if the user enters this mode while a
message is being received, the data in the message will become corrupted. This is due to the steps
required for the BDLC module to resume operation upon exiting Stop mode or Wait mode, and its
subsequent resynchronization with the SAE J1850 bus.
• Digital Loopback
When a bus fault has been detected, the digital loopback mode is used to determine if the fault condition is caused by failure in the
node’s internal circuits or elsewhere in the network, including the node’s analog physical interface. In this mode, the input to the
digital filter is disconnected from the receive pin input (RXB). The input to the digital filter is then connected to the transmitter
output to form the loopback connection. The transmit pin (TXB) is negated and will always drive a passive state onto the bus. Digital
loopback mode is entered by setting the DLOOP bit in Section 20.7.3.3, BDLC Control Register 2 (DLCBCR2) - MBAR + 0x1304.
• Normal and Emulation Mode Operation
The BDLC module operates in the same manner in all Normal and Emulation Modes. All BDLC module registers can be read and
written except those that are reserved, unimplemented, or write once. The user must be careful not to unintentionally write a register
when using 16-bit writes in order to avoid unexpected BDLC module behavior.
• Special Mode Operation
Some aspects of BDLC module operation can be modified in special test mode. This mode is reserved for internal use only.
To CPU
bus clock
CPU INTERFACE
CPU Interface BCR1 BSVR BCR2 BDR BARD
8 Control/ Status 8
TX Data RX Data
bus clock
TX Shadow Register RX Shadow Register
8 8
TX Data RX Data
bus clock
Symbol Encoder/Decoder
RX Data
TX Data RX Digital
MUX Interface Filter
RX Data
Loopback
Multiplexer
RX Data
Figure 20-2 shows the organization of the BDLC module. The Buffers provide storage for data received and data to be transmitted onto the
J1850 bus. The Protocol Handler is responsible for the encoding and decoding of data bits and special message symbols during transmission
and reception. The MUX Interface provides the link between the BDLC digital section and the analog Physical Interface. The wave shaping,
driving and digitizing of data is performed by the Physical Interface.
NOTE
The Physical Interface is not implemented in the BDLC module and must be provided externally.
The main functional blocks of the BDLC module are explained in greater detail in the following
sections.
Use of the BDLC module in message networking fully implements the “SAE Standard J1850 Class
B Data Communication Network Interface” specification.
20.6 Overview
The BDLC module has a total of 2 external pins.
20.7.1 Overview
This section provides a detailed description of all memory and registers accessible to the end user.
MBAR + 0x1308 BDLC Analog Round Trip Delay Register (DLCBARD) R/W
RESET: 1 1 0 0 0 0 0 0
= Unimplemented or Reserved
R 0 0 I3 I2 I1 I0 0 0
RESET: 0 0 0 0 0 0 0 0
= Unimplemented or Reserved
The state encoding of the interrupt sources mean that only one interrupt source is dealt with at a time. Once the highest priority interrupt source
is dealt with, if another interrupt event of a lower priority has also occurred, the value corresponding to that interrupt source appears in the
BDLC State Vector Register. This continues until all BDLC interrupt sources have been dealt with and all bits in the BDLC State Vector
Register are cleared.
• Wakeup
The BDLC has two different power-conserving modes, stop and wait. Wakeup from these modes is described below.
• Wakeup from BDLC Wait with CPU in Wait
If the CPU executes a WAIT instruction and the BDLC enters the BDLC wait mode, the clocks to the BDLC as well as the clocks
in the MCU continue to run. The message which generates a Wake-up interrupt of the BDLC and the CPU will be received correctly.
• Wakeup from BDLC Stop with CPU in Wait
If the CPU executes a WAIT instruction and the BDLC enters the BDLC stop mode, the clocks to the BDLC are turned off, but the
clocks in the MCU continue to run. The message which generates a Wake-up interrupt of the BDLC and the CPU will be received
correctly. To ensure this, the EOF following the last message appearing on the bus must be received; otherwise, the message will
not be received correctly.
• Wakeup from BDLC Stop with CPU in Stop
MPC5200 Users Guide, Rev. 3.1
If the CPU executes a STOP all clocks to the BDLC as well as the clocks in the MCU are turned off including clocks to the BDLC.
The message which generates a Wake-up interrupt of the BDLC and the CPU will not be received correctly.
• Symbol Invalid or Out of Range
• CRC Error
The Cyclical Redundancy Check Byte is used by the receiver(s) of each message to determine if any errors have occurred during
the transmission of the message. If the message is not error free, the CRC error status is shown in the BDLC State Vector Register.
• Loss of Arbitration
The Loss of Arbitration status is entered when a loss of arbitration occurs while the BDLC is transmitting onto the bus.
• Tx Data Register Empty
The Tx Data Register Empty (TDRE) Byte is used to tell when data has been unloaded from the BDLC Data Register.
• Rx Data Register Full
The Rx Data Register Full (RDRF) Byte is used to tell when data has been loaded in the BDLC Data Register.
• Received IFR Byte
The BDLC can transmit and receive all four types of in-frame responses. As each byte of an IFR is received, the BDLC State Vector
Register indicates this by setting this state.
• Received EOF
When a 280us passive period on the bus is received, it signifies an EOF. Whenever this occurs, the EOF flag is set.
• No Interrupts Pending
This interrupt cannot generate an interrupt of the CPU.
RESET: 0 1 0 0 0 0 0 0
0 = When cleared, digital filter input is connected to receive pin (RXB) and the transmitter output is connected to the transmit pin
(TXB). The BDLC module is taken out of Digital Loopback Mode and can now drive and receive from the J1850 bus normally.
After writing DLOOP to zero, the BDLC module requires the bus to be idle for a minimum of an End of Frame symbol time before
allowing a reception of a message. The BDLC module requires the bus to be idle for a minimum of an Inter-Frame Separator symbol
time before allowing any message to be transmitted.
NOTE
The DLOOP bit is a fault condition aid and should never be altered after the BDLC Data Register is
loaded for transmission. Changing DLOOP during a transmission may cause corrupted data to be
transmitted onto the J1850 network.
4XE — 4X Mode Enable (Bit 5)
This bit determines if the BDLC operates at normal transmit and receive speed (10.4 kbps) or in 4X Mode at 41.6 kbps. This feature is
useful for fast download of data into a J1850 node for diagnostic or factory programming of the node.
1 = When set, the BDLC module is put in 4X (41.6 kbps) operation.
0 = When cleared, the BDLC module transmits and receives at 10.4 kbps. Reception of a BREAK symbol automatically clears this
bit and sets the symbol invalid or out of range flag BDLC State Vector Register = $1C).
The effect of 4X receive operation on receive symbol timing boundaries is described in Section 20.8.1.3, J1850 VPW Valid/Invalid Bits
& Symbols.
NBFS — Normalization Bit Format Select (Bit 4)
This bit controls the format of the Normalization Bit (NB). SAE J1850 strongly encourages the use of an active long: ‘0’ for In-Frame
Responses containing CRC and active short, ‘1’ for In-Frame Responses without CRC.
1 = NB that is received or transmitted is a ‘0’ when the response part of an In-Frame Response (IFR) ends with a CRC byte. NB
that is received or transmitted is a ‘1’ when the response part of an In-Frame Response (IFR) does not end with a CRC byte.
0 = NB that is received or transmitted is a ‘1’ when the response part of an In-Frame Response (IFR) ends with a CRC byte. NB
that is received or transmitted is a ‘0’ when the response part of an In-Frame Response (IFR) does not end with a CRC byte.
TEOD — Transmit End of Data (Bit 3)
This bit is set by the programmer to indicate the end of a message being sent by the BDLC. It will append an 8-bit CRC after completing
transmission of the current byte in the Tx Shift Register followed by the EOD symbol. If the transmit shadow register (refer to Section
20.8.3.1, Protocol Architecture for a description of the transmit shadow register) is full when TEOD is set, the CRC byte and EOD will
be transmitted after the current byte in the Tx Shift Register and the byte in the Tx Shadow Register have been transmitted. Once TEOD
is set, the transmit data register empty flag (TDRE) in the BDLC State Vector Register (BDLC State Vector Register) is cleared to allow
lower priority interrupts to occur. This bit is also used to end an IFR. Bits TSIFR, TMIFR1, and TMIFR0 determine whether a CRC byte
is appended before EOD transmission for IFRs.
1 = Transmit EOD symbol.
0 = The TEOD bit will be automatically cleared after the first CRC bit is sent, or if an error or loss of arbitration is detected on the
bus. When TEOD is used to end an IFR transmission, TEOD is cleared when the BDLC receives back a valid EOD symbol, or an
error condition or loss of arbitration occurs.
TSIFR, TMIFR1, TMIFR0 — Transmit In-Frame Response Control (Bits 2-0)
These three bits control the type of In-Frame Response being sent. The programmer should not set more than one of these control bits to
a one at any given time. However, if more than one of these three control bits are set to one, the priority encoding logic will force the
internal register bits to a known value as shown in the following table. But, when these bits are read, they will be the same as written
earlier. For instance, if “011” is written to TSIFR, TMIFR1, TMIFR0, then internally, they’ll be encoded as “010”. However, when these
bits are later read back, it’ll still be “011”.
Table 1-2. Transmit In-Frame Response Control Bit Priority Encoding
WRITE READ ACTUAL (internal register)
0 0 0 0 0 0 0 0 0
1 X X 1 X X 1 0 0
0 1 X 0 1 X 0 1 0
0 0 1 0 0 1 0 0 1
The BDLC supports the In-frame Response (IFR) feature of J1850 by setting these bits correctly. The four types of J1850 IFR are shown
in Figure 20-3. The purpose of the in-frame response modes is to allow single or multiple nodes to acknowledge receipt of the data by
responding to a received message after they have seen the EOD symbol. For VPW modulation, the first bit of the IFR is always passive;
therefore, an active normalization bit must be generated by the responder and sent prior to its ID/address byte. When there are multiple
responders on the J1850 bus, only one normalization bit is sent which assists all other transmitting nodes to sync their responses.
SOF
EOD
EOF
Header Data Field CRC
Type 0 - No IFR
EOD
EOD
EOF
SOF
EOD
EOF
EOD
SOF
EOD
EOF
EOD
SOF
After the byte in the BDLC Data Register has been loaded into the transmit shift register, the TDRE flag will be set in the BDLC State Vector
Register register, similar to the main message transmit sequence. If the interrupt enable bit (IE in BDLC Control Register 1) is set, an interrupt
request from the BDLC module is generated.The programmer should then load the next byte of the IFR into the BDLC Data Register for
transmission. When the last byte of the IFR has been loaded into the BDLC Data Register, the programmer should set the TEOD bit in the
BDLC control register 2. This will instruct the BDLC module to transmit a CRC byte once the byte in the BDLC Data Register is transmitted,
and then transmit an EOD symbol, indicating the end of the IFR portion of the message frame.
However, if the programmer wishes to transmit a single byte followed by a CRC byte, the programmer should load the byte into the BDLC
Data Register and then set the TMIFR1 bit before the EOD symbol has been received. Once the TDRE flag is set and interrupt occurs (if
enabled), the programmer should then set the TEOD bit in BDLC Control Register 2. This will result in the byte in the BDLC Data Register
being the only byte transmitted before the IFR CRC byte.
The user must set the TMIFR1 bit before the EOF following the main part of the message frame is received, or no IFR transmit attempts will
be made for the current message. If another node transmits an IFR to this message, the user must set the TMIFR1 bit before the normalization
bit is received or no IFR transmit attempts will be made for the message. If another node does transmit a successful IFR or a reception error
occurs, the TMIFR1 bit will be cleared. If not, the IFR will be transmitted after the EOD of the next received message.
If a transmitter underrun error occurs during transmission (caused by the programmer not writing another byte to the BDLC Data Register
following the TDRE flag being set) the BDLC module will automatically disable the transmitter after the byte currently in the shifter plus two
extra 1-bits have been transmitted. The receiver will pick this up as an framing error and relay it in the State Vector Register as an invalid
symbol error. The TMIFR1 bit will also be cleared.
If a loss of arbitration occurs when the BDLC module is transmitting a multiple byte IFR with CRC, the BDLC module will go to the loss of
arbitration state, set the appropriate flag and cease transmission. The TMIFR1 bit will be cleared and no attempt will be made to retransmit
the byte in the BDLC Data Register. If loss of arbitration occurs in the last bit of the IFR byte, two additional one bits (a passive long followed
by an active short) will be sent out.
NOTE
The extra logic 1s are an enhancement to the J1850 protocol which forces a byte boundary condition
fault. This is helpful in preventing noise on the J1850 bus from corrupting a message.
TMIFR0 — Transmit Multiple Byte IFR with no CRC (Type 3)
This bit is used to request the BDLC module to transmit the byte in the BDLC Data Register as the first byte of a multiple byte IFR without
CRC. Response IFR bytes are still subject to J1850 message length maximums.
1 = If this bit is set prior to a valid EOD being received with no CRC error, once the EOD symbol has been received the BDLC
module will attempt to transmit the appropriate normalization bit followed by IFR bytes. The programmer should set TEOD after
the last IFR byte has been written into BDLC Data Register. After TEOD has been set, the last IFR byte to be transmitted will be
the last byte which was written into the BDLC Data Register.
0 = The TMIFR0 bit will be automatically cleared once the BDLC module has successfully transmitted the EOD symbol, by the
detection of an error on the multiplex bus, a transmitter underrun, or loss of arbitration.
After the byte in the BDLC Data Register has been loaded into the transmit shift register, the TDRE flag will be set in the BDLC State Vector
Register register, similar to the main message transmit sequence. If the interrupt enable bit (IE in BDLC Control Register 1) is set, an interrupt
request from the BDLC module is generated. The programmer should then load the next byte of the IFR into the BDLC Data Register for
transmission. When the last byte of the IFR has been loaded into the BDLC Data Register, the programmer should set the TEOD bit in the
BDLC Control Register 2. This will instruct the BDLC to transmit an EOD symbol, indicating the end of the IFR portion of the message frame.
The BDLC module will not append a CRC.
However, if the programmer wishes to transmit a single byte, the programmer should load the byte into the BDLC Data Register and then set
the TMIFR0 bit before the EOD symbol has been received. Once the TDRE flag is set and interrupt occurs (if enabled), the programmer should
then set the TEOD bit in BDLC Control Register 2. This will result in the byte in the BDLC Data Register being the only byte transmitted.
The user must set the TMIFR0 bit before the EOF following the main part of the message frame is received, or no IFR transmit attempts will
be made for the current message. If another node transmits an IFR to this message, the user must set the TMIFR0 bit before the normalization
bit is received or no IFR transmit attempts will be made for the message. If another node does transmit a successful IFR or a reception error
occurs, the TMIFR0 bit will be cleared. If not, the IFR will be transmitted after the EOD of the next received message.
If a transmitter underrun error occurs during transmission (caused by the programmer not writing another byte to the BDLC Data Register
following the TDRE flag being set) the BDLC module will automatically disable the transmitter after the byte currently in the shifter plus two
extra 1-bits have been transmitted. The receiver will pick this up as an framing error and relay it in the State Vector Register as an invalid
symbol error. The TMIFR0 bit will also be cleared.
If a loss of arbitration occurs when the BDLC module is transmitting a multiple byte IFR without CRC, the BDLC module will go to the loss
of arbitration state, set the appropriate flag and cease transmission. The TMIFR0 bit will be cleared and no attempt will be made to retransmit
the byte in the BDLC Data Register. If loss of arbitration occurs in the last bit of the IFR byte, two additional one bits (a passive long followed
by an active short) will be sent out.
NOTE
The extra logic 1s are an enhancement to the J1850 protocol which forces a byte boundary condition
fault. This is helpful in preventing noise on the J1850 bus from corrupting a message.
R D7 D6 D5 D4 D3 D2 D1 D0
RESET: 0 0 0 0 0 0 0 0
20.7.3.5 BDLC Analog Round Trip Delay Register (DLCBARD) - MBAR + 0x1308
This register is used to program the BDLC module so that it compensates for the round trip delays of different external transceivers. Also the
polarity of the receive pin (RXB) is set in this register.
RESET: 0 1 0 1 0 0 0 0
= Unimplemented
Table 20-7. BARD Values vs. Transceiver Delay and Transmitter Timing Adjustment
Table 20-7. BARD Values vs. Transceiver Delay and Transmitter Timing Adjustment (continued)
01111 15 15
10000 16 16
10001 17 17
10010 18 18
10011 19 19
10100 20 20
10101 21 21
10110 22 22
10111 23 23
11000 24 24
11001 25 25
11010 26 26
11011 27 27
11100 28 28
11101 29 29
11110 30 30
11111 31 31
Note:
1. The transmitter symbol timing adjustment is the same for binary and integer bus frequencies.
R R7 R6 R5 R4 R3 R2 R1 R0
RESET: 0 0 0 0 0 0 0 0
R 0 0 0 BDLCE 0 0 0 BREAK
RESET: 0 0 0 0 0 0 0 0
= Unimplemented
R 0 0 0 0 0 0 0 IDLE
RESET: 0 0 0 0 0 0 0 0
= Unimplemented
20.8.1 General
The BDLC module is a serial communication module which allows the user to send and receive messages across a Society of Automotive
Engineers (SAE) J1850 serial communication network. The user’s software handles each transmitted or received message on a byte-by-byte
basis, while the BDLC performs all of the network access, arbitration, message framing and error detection duties.
Optional
E I
Priority Message O F
Idle SOF (Data0) ID (Data1) Datan CRC D IFR EOF S Idle
SAE J1850 states that each message has a maximum length of 101 bit times or 12 bytes (excluding SOF, EOD, NB and EOF).
• SOF - Start of Frame Symbol
All messages transmitted onto the J1850 bus must begin with an long active SOF symbol. This indicates to any listeners on the
J1850 bus the start of a new message transmission. The SOF symbol is not used in the CRC calculation.
• Data - In Message Data Bytes
The data bytes contained in the message include the message priority/type, message I.D. byte, and any actual data being transmitted
to the receiving node. See SAE J1850 - Class B Data Communications Network Interface, for more information about 1 and 3 Byte
Headers.
Messages transmitted by the BDLC module onto the J1850 bus must contain at least one data byte, and therefore can be as short as
one data byte and one CRC byte. Each data byte in the message is 8 bits in length, transmitted MSB to LSB.
• CRC - Cyclical Redundancy Check Byte
This byte is used by the receiver(s) of each message to determine if any errors have occurred during the transmission of the message.
The BDLC calculates the CRC byte and appends it onto any messages transmitted onto the J1850 bus, and also performs CRC
detection on any messages it receives from the J1850 bus.
CRC generation uses the divisor polynomial X8+X4+X3+X2+1. The remainder polynomial is initially set to all ones, and then each
byte in the message after the SOF symbol is serially processed through the CRC generation circuitry. The one’s complement of the
remainder then becomes the 8-bit CRC byte, which is appended to the message after the data bytes, in MSB to LSB order.
When receiving a message, the BDLC uses the same divisor polynomial. All data bytes, excluding the SOF and EOD symbols, but
including the CRC byte, are used to check the CRC. If the message is error free, the remainder polynomial will equal X7+X6+X2
($C4), regardless of the data contained in the message. If the calculated CRC does not equal $C4, the BDLC will recognize this as
a CRC error and set the CRC error flag in the BDLC State Vector Register.
• EOD - End of Data Symbol
The EOD symbol is a long passive period on the J1850 bus used to signify to any recipients of a message that the transmission by
the originator has completed. No flag is set upon reception of the EOD symbol.
• IFR - In Frame Response Bytes
The IFR section of the J1850 message format is optional. Users desiring further definition of in-frame response should review the
“SAE J1850 Class B Data Communications Network Interface” specification.
• EOF - End of Frame Symbol
This symbol is a passive period on the J1850 bus, longer than an EOD symbol, which signifies the end of a message. Since an EOF
symbol is longer than an EOD symbol, if no response is transmitted after an EOD symbol, it becomes an EOF, and the message is
assumed to be completed. The EOF flag is set upon receiving the EOF symbol.
• IFS - Inter-Frame Separation Symbol
The IFS symbol is a passive period on the J1850 bus which allows proper synchronization between nodes during continuous
message transmission. The IFS symbol is transmitted by a node following the completion of the EOF period.
When the last byte of a message has been transmitted onto the J1850 bus, and the EOF symbol time has expired, all nodes must then
wait for the IFS symbol time to expire before transmitting an SOF, marking the beginning of another message.
However, if the BDLC module is waiting for the IFS period to expire before beginning a transmission and a rising edge is detected
before the IFS time has expired, it will internally synchronize to that edge.
A rising edge may occur during the IFS period because of varying clock tolerances and loading of the J1850 bus, causing different
nodes to observe the completion of the IFS period at different times. Receivers must synchronize to any SOF occurring during an
IFS period to allow for individual clock tolerances.
• Break
If the BDLC module is transmitting at the time a BREAK is detected, it treats the BREAK as if a transmission error had occurred,
and halts transmission.The BDLC module can transmit a BREAK symbol. If while receiving a message the BDLC module detects
a BREAK symbol, it treats the BREAK as a reception error and sets the invalid symbol flag. If while receiving a message in 4X
mode, the BDLC module detects a BREAK symbol, it treats the BREAK as a reception error, sets BDLC State Vector Register
register to $1C, and exits 4X mode.The 4XE bit in BDLC Control Register 2 is automatically cleared upon reception of the BREAK
symbol.
• Idle Bus
An idle condition exists on the bus during any passive period after expiration of the IFS period. Any node sensing an idle bus
condition can begin transmission immediately.
Active
128µs OR 64µs
Passive
Logic “0”
(a)
Active
128µs OR 64µs
Passive
Logic “1”
(b)
Active
200µs 200µs
Passive
Active 20µs
EOD EOF
Passive 300µs
Each message will begin with an SOF symbol, an active symbol, and therefore each data byte (including the CRC byte) will begin with a
passive bit, regardless of whether it is a logic one or a logic zero. All VPW bit lengths stated in the following descriptions are typical values
at a 10.4kbps bit rate.
• Logic “0”
A logic zero is defined as either an active to passive transition followed by a passive period 64µs in length, or a passive to active
transition followed by an active period 128µs in length (Figure 20-5(a)).
• Logic “1”
A logic one is defined as either an active to passive transition followed by a passive period 128µs in length, or a passive to active
transition followed by an active period 64µs in length (Figure 20-5(b)).
• NB - Normalization Bit
The NB symbol has the same property as a logic “1” or a logic “0”.It is only used in IFR message responses. This bit is defined as
an active bit.
• SOF - Start of Frame Symbol
The SOF symbol is defined as passive to active transition followed by an active period 200µs in length (Figure 20-5(c)). This allows
the data bytes which follow the SOF symbol to begin with a passive bit, regardless of whether it is a logic one or a logic zero.
• EOD - End of Data Symbol
The EOD symbol is defined as an active to passive transition followed by a passive period 200µs in length (Figure 20-5(d)).
• EOF - End of Frame Symbol
The EOF symbol is defined as an active to passive transition followed by a passive period 280µs in length (Figure 20-5(e)). If there
is no IFR byte transmitted after an EOD symbol is transmitted, after another 80µs the EOD becomes an EOF, indicating the
completion of the message.
• IFS - Inter-Frame Separation Symbol
The IFS symbol is defined as a passive period 300µs in length. The IFS symbol contains no transition, since when used it always
follows an EOF symbol.(Figure 20-5(g))
• BREAK - Break Signal
The BREAK signal is defined as a passive to active transition followed by an active period of at least 240µs (Figure 20-5(f)).
• IDLE
An IDLE is defined as a passive period greater than 300µs in length.
Table 20-13. BDLC Transmitter VPW Symbol Timing for Integer Frequencies (continued)
Note:
1. The transmitter timing for this symbol depends upon the minimum detection time of the symbol by the receiver.
Table 20-14. BDLC Transmitter VPW Symbol Timing for Binary Frequencies
Note:
1. The transmitter timing for this symbol depends upon the minimum detection time of the symbol by the receiver.
Table 20-15. BDLC Receiver VPW Symbol Timing for Integer Frequencies
Note:
1. The receiver symbol timing boundaries are subject to an uncertainty of 1 tbdlc due to sampling considerations.
Table 20-16. BDLC Receiver VPW Symbol Timing for Binary Frequencies
Table 20-17. BDLC Receiver VPW 4X Symbol Timing for Integer Frequencies
Table 20-18. BDLC Receiver VPW 4X Symbol Timing for Binary Frequencies
The min and max symbol limits shown in the following sections (Invalid Passive Bit - Valid BREAK Symbol) and figures (Figure 20-6 -
Figure 20-9) refer to the values listed in Table 20-13 throughTable 20-18.
• Invalid Passive Bit
If the passive to active transition beginning the next data bit or symbol occurs between the active to passive transition beginning the
current data bit or symbol and Trvp1(Min), the current bit would be invalid. See Figure 20-6(1).
200µs
128µs
64µs
Active
(1) Invalid Passive
Bit
Passive
Trvp1(Min)
Active
(2) Valid Passive
Logic Zero
Passive
Trvp1(Min) Trvp1(Max)
Active
(3) Valid Passive
Logic One
Passive
Trvp2(Min) Trvp2(Max)
Active
(4) Valid EOD
Symbol
Passive
Trvp3(Min) Trvp3(Max)
300µs
280µs
200µs
128µs
64µs
Active
(1) Invalid Active
Bit
Passive
Trva2(Min)
Active
(2) Valid Active
Logic One
Passive
Trva2(Min) Trva2(Max)
Active
(3) Valid Active
Logic Zero
Passive
Trva1(Min) Trva1(Max)
Active
(4) Valid SOF
Symbol
Passive
Trva3(Min) Trva3(Max)
240µs
Active
(2) Valid BREAK
Symbol
Passive
Trv6(Min)
Active
Transmitter B Transmitter B wins
Passive arbitration and
“0” “1” “1” “0” “0” continues
transmitting
Active
J1850 Bus
Passive
Data Data Data Data Data
SOF Bit 1 Bit 2 Bit 3 Bit 4 Bit 5
During arbitration, or even throughout the transmitting message, when an opposite bit is detected, transmission is immediately
stopped unless it occurs on the 8th bit of a byte. In this case the BDLC module will automatically append up to two extra 1 bits and
then stop transmitting. These two extra bits will be arbitrated normally and thus will not interfere with another message. The second
1 bit will not be sent if the first loses arbitration. If the BDLC module has lost arbitration to another valid message then the two extra
ones will not corrupt the current message. However, if the BDLC module has lost arbitration due to noise on the bus, then the two
extra ones will ensure that the current message will be detected and ignored as a noise-corrupted message.
Since a “0” dominates a “1”, the message with the lowest value will have the highest priority, and will always win arbitration, i.e.
a message with priority 000 will win arbitration over a message with priority 011. This method of arbitration will work no matter
how many bits of priority encoding are contained in the message.
If a BREAK symbol is received while the BDLC module is transmitting or receiving, the symbol invalid or out of range flag (in
BDLC State Vector Register) is set. Further transmission/reception will be disabled until the J1850 bus returns to the passive state
and a valid EOF symbol is detected on the J1850 bus. If the interrupt enable bit (IE in BDLC Control Register 1) is set, an interrupt
request from the BDLC module is generated. Reading the BDLC State Vector Register register will clear this flag.
The BDLC module can transmit a BREAK symbol. And it can receive a BREAK symbol from the J1850 bus.
• Bus Error Summary
The possible J1850 bus errors and the actions taken by the BDLC module are summarized in Table 20-19.
Table 20-19. BDLC module J1850 Error Summary
Cyclical Redundancy Check (CRC) CRC error flag set and interrupt generated if enabled.
Error
Symbol Error The symbol invalid or out of range flag will be set and interrupt
generated if enabled. Transmission and reception will be disabled
until a valid EOF symbol is detected.
Framing Error The symbol invalid or out of range flag will be set and interrupt
generated if enabled. Transmission and reception will be disabled
until a valid EOF symbol is detected.
Bus short to VDD. The BDLC module will not transmit until short is corrected and a
valid EOF is detected. Depending upon when short occurs and is
corrected, this error condition may set the symbol invalid or out of
range, crc error, or loss of arbitration flags.
Bus short to GND. Short will be seen as an idle bus by BDLC module. If a transmission
attempt is made before short is corrected, the symbol invalid or out
of range flag will be set and interrupt generated if enabled. Another
transmission can be initiated as soon as short is corrected.
BREAK symbol reception If doing so, the BDLC module will immediately cease transmitting.
Symbol invalid or out of range flag set and interrupt generated if
enabled.Transmission and reception will be disabled until a valid
EOF symbol is detected.
Input Filtered
Sync 4-Bit Up/Down Counter Rx Data Out
Rx Data 4
Edge &
from d q up/down out Count d q
RXB pad Comparator
• Operation
The clock for the digital filter is provided by the MUX Interface clock.At each positive edge of the clock signal, the current state of
the Receiver input signal from the RXB pad is sampled.The RXB signal state is used to determine whether the counter should
increment or decrement at the next positive edge of the clock signal.
The counter will increment if the input data sample is high but decrement if the input sample is low.The counter will thus progress
up towards ‘15’ if, on average, the RXB signal remains high or progress down towards ‘0’ if, on average, the RXB signal remains
low.
When the counter eventually reaches the value ‘15’, the digital filter decides that the condition of the RXB signal is at a stable logic
level one and the Data Latch is set, causing the Filtered Rx Data signal to become a logic level one. Furthermore, the counter is
prevented from overflowing and can only be decremented from this state.
Alternatively, should the counter eventually reach the value ‘0’, the digital filter decides that the condition of the RXB signal is at
a stable logic level zero and the Data Latch is reset, causing the Filtered Rx Data signal to become a logic level zero. Furthermore,
the counter is prevented from underflowing and can only be incremented from this state.
The Data Latch will retain its value until the counter next reaches the opposite end point, signifying a definite transition of the RXB
signal.
• Performance
The performance of the digital filter is best described in the time domain rather than the frequency domain.
If the signal on the RXB signal transitions, then there will be a delay before that transition appears at the Filtered Rx Data output
signal. This delay will be between 15 and 16 clock periods, depending on where the transition occurs with respect to the sampling
points. This ‘filter delay’ must be taken into account when performing message arbitration.
For example, if the frequency of the MUX Interface clock (fbdlc) is 1.0486MHz, then the period (tbdlc) is 954ns and the maximum
filter delay in the absence of noise will be 15.259us.
The effect of random noise on the RXB signal depends on the characteristics of the noise itself. Narrow noise pulses on the RXB
signal will be completely ignored if they are shorter than the filter delay. This provides a degree of low pass filtering.
If noise occurs during a symbol transition, the detection of that transition may be delayed by an amount equal to the length of the
noise burst. This is just a reflection of the uncertainty of where the transition is truly occurring within the noise.
Noise pulses that are wider than the filter delay, but narrower than the shortest allowable symbol length will be detected by the next
stage of the BDLC module’s receiver as an invalid symbol.
Noise pulses that are longer than the shortest allowable symbol length will normally be detected as an invalid symbol or as invalid
data when the frame’s CRC is checked.
To Pad Drivers
RXB TXB
BDLC
Control
TXB
State Machine
8 8
Control
Tx Data
Rx Data
NOTE
Due to the byte-level architecture of the BDLC module, the 12-byte limit on message length as
defined in SAE J1850 must be enforced by the user’s software. The number of bytes in a message
(transmitted or received) has no meaning to the BDLC module.
— Step 1: Write the First Byte into the BDLC Data Register
To initiate a message transmission, the CPU simply loads the first byte of the message to be transmitted into the BDLC Data
Register. The BDLC module will then perform the necessary bus acquisition duties to determine when the message transmission
can begin.
Once the BDLC module determines that the SAE J1850 bus is free, a Start of Frame (SOF) symbol will be transmitted, followed
by the byte written to the BDLC Data Register. Once the BDLC module readies this byte for transmission, the BDLC State Vector
Register will reflect that the next byte can be written to the BDLC Data Register (TDRE interrupt).
NOTE
If the user writes the first byte of a message to be transmitted to the BDLC Data Register and then
determines that a different message should be transmitted, the user can write a new byte to the BDLC
Data Register up until the transmission begins. This new byte will replace the original byte in the
BDLC Data Register.
— Step 2: When TDRE is Indicated, Write the Next Byte into the BDLC Data Register
When a TDRE state is reflected in the BDLC State Vector Register, the CPU writes the next byte to be transmitted into the BDLC
Data Register. This step is repeated until the last byte to be transmitted is written to the BDLC Data Register.
NOTE
Due to the design and operation of the BDLC module, when transmitting a message the user may
write two, or possibly even three of the bytes to be transmitted into the BDLC Data Register before
the first RDRF interrupt occurs. For this reason, the user should never use receive interrupts to control
the sequencing of bytes to be transmitted.
— Step 3: Write the Last Byte to the BDLC Data Register and Set TEOD
Once the user has written the last byte to be transmitted into the BDLC Data Register, the user then sets the TEOD bit in BDLC
Control Register 2. When the TEOD bit is set, once the byte written to the BDLC Data Register is transmitted onto the bus, the
BDLC module will begin transmitting the 8-bit CRC byte, as specified in SAE J1850. Following the CRC byte, the BDLC module
will transmit an EOD symbol onto the SAE J1850 bus, indicating that this part of the message has been completed. If no IFR bytes
are transmitted following the EOD, an EOF will be recognized and the message will be complete.
Setting the TEOD bit is the last step the CPU needs to take to complete the message transmission, and no further
transmission-related interrupts will occur. Once the message has been completely received by the BDLC module, an EOF interrupt
will be generated. However, this is technically a receive function which can be handled by the message reception routine.
NOTE
While the TEOD bit is typically set immediately following the write of the last byte to the BDLC Data
Register, it is also acceptable to wait until a TDRE interrupt is generated before setting the TEOD bit.
While the example flowchart in Figure 20-13 shows the TEOD bit being set after the write to the
BDLC Data Register, either method is correct. If a TDRE interrupt is pending, it will be cleared when
the TEOD bit is set.
Similar to a loss of arbitration, if any error (except a CRC error) is detected on the SAE J1850 bus during a transmission, the BDLC
module will stop transmitting immediately. The byte which was being transmitted will be discarded, and the “Symbol Invalid or
Out of Range” status will be reflected in the BDLC State Vector Register. As with the loss of arbitration, if the TEOD bit was set,
it will be cleared automatically, and any attempt to transmit the same message will have to start from the beginning.
If a CRC error occurs following a transmission, this will also be reflected in the BDLC State Vector Register. However, since the
CRC error is really a receive error based on the received CRC byte, at this point all bytes of the message will have been transmitted.
It is therefore up to the user’s software to determine if another attempt should be made to transmit the message in which the error
occurred.
• Transmitter Underrun
A transmitter underrun can occur when a TDRE interrupt is not serviced in a timely fashion. If the last byte loaded into the BDLC
Data Register is completely transmitted onto the network before the next byte is loaded into the BDLC Data Register, a transmitter
underrun will occur. If this does happen, the BDLC module will transmit two additional logic ones to ensure that the partial message
which was transmitted onto the bus does not end on a byte boundary. This will be followed by an EOD and EOF symbol. The only
indication to the CPU that an underrun occurred is the Symbol Invalid or Out of Range error which will be indicated in the BDLC
State Vector Register. As with the other errors, it is up to the user’s software to determine if another transmission attempt should be
made.
• In-Frame Response to a Transmitted Message
If an In-Frame Response (IFR) is received following the transmission of a message, the status indicating that an IFR byte has been
received will be indicated in the BDLC State Vector Register before an EOF is indicated. Refer to Section 20.8.7, Receiving An
In-Frame Response (IFR) for a description of how to handle the reception of IFR bytes.
C A
No
Is this the last
byte?
Yes Yes
Is DLCBSVR = $00?
For interrupt driven systems,
this marks the beginning of the
transmit section of the BDLC No Set TEOD bit
module interrupt service in DLCBCR2
routine
No
B
B
Yes
Jump to BDLC module Once BDLC module detects
Is DLCBSVR = $14?
Receive Routine EOF, transmit
(LOA)
attempt is complete
No
Yes
No Attempt another
Is DLCBSVR = $10? transmission?
C
(TDRE)
No
Yes
A
NOTE: The EOF and CRC Error interrupts
are handled in the BDLC module Receive
Routine
Once a message byte has been received, the CPU must service the BDLC Data Register before the next byte is received, or the first
byte will be lost. If the BDLC Data Register is not serviced quickly enough, the next byte received will be written over the previous
byte in the BDLC Data Register. No receiver overrun indication is made to the CPU. If the CPU fails to service the BDLC module
during the reception of an entire message, the byte remaining in the BDLC Data Register will be last byte received (usually a CRC
byte).
Once a receiver overrun occurs, there is no way for the CPU to recover the lost byte(s), so the entire message should be discarded.
To prevent receiver overrun, the user should ensure that a BDLC RDRF interrupt will be serviced before the next byte can be
received. When polling the BDLC State Vector Register, the user should select a polling interval which will provide timely
monitoring of the BDLC module.
• CRC Error
If a CRC error is detected during a message reception, this will be reflected in the BDLC State Vector Register once an EOD time
is recognized by the BDLC module. Since all bytes of the message will have been received when this error is detected, it is up to
the user to ensure that all the received message bytes are discarded.
• Invalid or Out of Range Symbol
If an invalid or out of range symbol, a framing error or a BREAK symbol is detected on the SAE J1850 bus during the reception of
a message, the BDLC module will immediately stop receiving the message and discard any partially received byte. The “Symbol
Invalid or Out of Range” status will immediately be reflected in the BDLC State Vector Register. Following this the BDLC module
will wait until the bus has been idle for a time period equal to an EOF symbol before receiving another message. As with the CRC
error, the user should discard any partially received message if this occurs.
• In-Frame Response to a Received Message
As mentioned above, if one or more IFR bytes are received following the reception of a message, the status indicating the reception
of the IFR byte(s) will be indicated in the BDLC State Vector Register before the EOF is indicated. Refer to Section 20.8.7,
Receiving An In-Frame Response (IFR) for a description of how to deal with the reception of IFR bytes.
No
Is DLCBSVR Yes
= $0C? Read byte in DLCBDR
(RDRF)
No
No
Is this a transmit Filter received byte
Yes reflection?
Jump to Receive IFR Is this an IFR
Handling Routine reception?
Yes
No
B
Once BDLC module Detects Yes
EOF, message Is DLCBSVR = $04?
reception is complete (EOF)
Yes
Is this message
No of any interest?
A
No
Exit BDLC module Receive
Routine
Yes A
Jump to Transmit IFR Is an IFR to
Handling Routine be transmitted?
No
READ/WRITE ACTUAL
0 0 0 0 0 0
1 X X 1 0 0
0 1 X 0 1 0
0 0 1 0 0 1
No Yes
Is DLCBSVR = $1C? Is DLCBSVR = $14? IFR byte is discarded
(Error Detected) (LOA)
Yes No
— Step 1: Load the IFR Byte into the BDLC Data Register
As with the Type 1 IFR, the user begins initiation of a Type 2 IFR by loading the desired IFR byte into the BDLC Data Register. If
a byte has already been written into the BDLC Data Register for transmission as a new message, the user can simply write the IFR
byte to the BDLC Data Register, replacing the previously written byte. This must be done before the first EOD symbol is received.
— Step 2: Set the TSIFR Bit
The second step necessary for transmitting a Type 2 IFR is to set the TSIFR bit in BDLC Control Register 2. Setting this bit will
direct the BDLC module to attempt to transmit the byte in the BDLC Data Register as an IFR until it is successful. If the byte is
transmitted successfully, or if an error or loss of arbitration occurs, TSIFR will be cleared and no further transmit attempts will be
made.
— Step 3: If Necessary, Set the TEOD Bit
The third step in transmitting a Type 2 IFR is only necessary if the user wishes to halt the transmission attempts. This may be
necessary if the BDLC module’s attempt to transmit the byte loaded into the BDLC Data Register continually loses arbitration, and
the overall message length approaches the 12-byte limit as defined in SAE J1850.
If it becomes necessary to halt the IFR transmission attempts, the user simply sets the TEOD bit in BDLC Control Register 2. If the
BDLC module is between transmission attempts, it will make one more attempt to transmit the IFR byte. If it is transmitting the
MPC5200 Users Guide, Rev. 3.1
byte when TEOD is set, the BDLC module will continue the transmission until it is successful or it loses arbitration to another
transmitter. At this point it will then discard the byte and make no more transmit attempts.
NOTE
When transmitting a Type 2 IFR, the user should monitor the number of IFR bytes received to ensure
that the overall message length does not exceed the 12-byte limit for the length of SAE J1850
messages. The user should set the TEOD bit when the 11th byte is received, which will prevent the
12-byte limit from being exceeded.
No Yes No No
Is DLCBSVR = $1C? Is DLCBSVR = $14? Was this the last Was the 11th
(Error Detected) (LOA) transmit attempt? msg byte received?
The user begins initiation of a Type 3 IFR, as with each of the other IFR types, by loading the desired IFR byte into the BDLC Data
Register. If a byte has already been written into the BDLC Data Register for transmission as a new message, the user can simply
write the first IFR byte to the BDLC Data Register, replacing the previously written byte. This must be done before the first EOD
symbol is received.
— Step 2: Set the TMIFR Bit
The second step necessary for transmitting a Type 3 IFR is to set the desired TMIFR bit in BDLC Control Register 2, depending
upon whether or not a CRC is desired. As previously described in Section 20.8.6.2, BDLC IFR Transmit Control Bits, the TMIFR1
bit should be set if the user requires a CRC byte to be appended following the last byte of the Type 3 IFR, and TMIFR0 if no CRC
byte is required.
Setting the TMIFR1 or TMIFR0 bit will direct the BDLC module to transmit the byte in the BDLC Data Register as the first byte
of a single or multi-byte IFR preceded by the appropriate Normalization Bit. Once this has occurred, the BDLC State Vector Register
will reflect that the next byte of the IFR can be written to the BDLC Data Register (TDRE interrupt).
NOTE
The user must set the TMIFR1 or TMIFR0 bit before the EOD following the main part of the message
frame is received, or no IFR transmit attempts will be made for the current message. If another node
does transmit an IFR to this message or a reception error occurs, the TMIFR1 or TMIFR0 bit will be
cleared. If not, the IFR will be transmitted after the EOD of the next received message.
— Step 3: When TDRE is Indicated, Write the Next IFR Byte into the BDLC Data Register
When a TDRE state is reflected in the BDLC State Vector Register, the CPU writes the next IFR byte to be transmitted into the
BDLC Data Register, clearing the TDRE interrupt. This step is repeated until the last IFR byte to be transmitted is written to the
BDLC Data Register.
NOTE
As when transmitting a message, when transmitting a Type 3 IFR the user may write two, or possibly
even three of the bytes to be transmitted into the BDLC Data Register before the first RxIFR interrupt
occurs. For this reason, the user should never use receive IFR byte interrupts to control the sequencing
of IFR bytes to be transmitted.
— Step 4: Write the Last IFR Byte into the BDLC Data Register and Set TEOD
Once the last IFR byte to be transmitted is written to the BDLC Data Register, the CPU then sets the TEOD bit in BDLC Control
Register 2. Once the TEOD bit is set, after the last IFR byte written to the BDLC Data Register is transmitted onto the bus, if the
TMIFR1 bit has been set the BDLC module will begin transmitting the CRC byte, followed by an EOD. If the TMIFR0 bit has been
set, the last IFR byte will immediately be followed by the transmission of an EOD. Following the EOD, and EOF will be recognized
and the message will be complete.
If at any time during the transmission of a Type 3 IFR a loss of arbitration occurs, the TMIFR bit which is set and the TEOD bit (if
set) will be cleared, any IFR byte being transmitted will be discarded and the loss of arbitration state will be reflected in the BDLC
State Vector Register. Likewise, if an error is detected during the transmission of a Type 3 IFR the IFR control bits will be cleared,
the byte being transmitted will be discarded and the BDLC State Vector Register will reflect the detected error.
NOTE
If the Type 3 IFR being transmitted is made up of a single byte, the appropriate TMIFR bit and the
TEOD bit can be set at the same time. The BDLC module will then treat that byte as both the first and
last IFR byte to be sent.
A
Set desired
TMIFR bit in DLCBCR2
No
No
Is this the last
byte?
Yes Yes
For interrupt driven systems, Is DLCBSVR = $00?
this marks the beginning of the
transmit Type 3 IFR section of
the BDLC module interrupt No Set TEOD bit
in DLCBCR2
service routine
Yes
B
Abandon IFR Is DLCBSVR = $1C?
transmit attempt (Invalid Symbol)
Once BDLC module detects
EOF, IFR transmit
No attempt is complete
B
Exit Type 3 IFR
Transmit Routine
Yes
Jump to IFR Is DLCBSVR = $14?
Receive Routine (LOA)
No
No
Is DLCBSVR = $10?
(TDRE)
Yes
NOTE
As with a message transmission, the IMSG bit should never be used to ignore the BDLC module’s
own IFR transmissions. This is again due to the BDLC State Vector Register bits being inhibited from
updating until IMSG is cleared, preventing the CPU from detecting any IFR-related state changes
which may be of interest.
Yes
Is DLCBSVR = $1C/$18? Discard received
(Error Detected) IFR bytes B
No
Yes
Is DLCBSVR = $08? Read byte in DLCBDR
(RxIFR)
No
No
Is this an IFR Filter received IFR byte
xmit reflection?
Yes
Because of the BDLC module’s architecture, it can both transmit and receive messages of unlimited length. The CRC calculations, both for
transmitting and receiving, are not limited to eight bytes, but will instead be calculated and verified using all bytes in the message, regardless
of the number. All control bits, including TEOD and IMSG, also work in an identical manner, regardless of the length of the message.
To transmit or receive these “Block Mode” messages, no extra BDLC module control functions must be performed. The user simply transmits
or receives as many bytes as desired in one message frame, and the BDLC module will operate just as if a message of normal length was being
used.
C A
No
Is this the last
byte?
Yes Yes
Is DLCBSVR = $00?
For interrupt driven systems,
this marks the beginning of the
transmit section of the BDLC No Set TEOD bit
module interrupt service in DLCBCR2
routine
No
B
B
Yes
Jump to BDLC module Once BDLC module detects
Is DLCBSVR = $14? EOF, transmit
Receive Routine (LOA) attempt is complete
No
Yes
No Attempt another
Is DLCBSVR = $10? transmission?
C
(TDRE)
No
Yes
A
NOTE: The EOF and CRC Error interrupts
are handled in the BDLC module Receive
Routine
time passes between the exit from loopback modes and enabling the BDLC module and the enabling of interrupts. It is a good
practice to always clear any source of interrupts before enabling interrupts on any MCU subsystem.
If any interrupts are pending (BDLC State Vector Register not %00000000), then each interrupt source should be dealt with
accordingly. Once all of the interrupt sources have been dealt with, the BDLC State Vector Register should read %00000000, and
the user is then free to enable BDLC interrupts.
• Step 8- Enable BDLC Interrupts
The last step in initializing the BDLC module is to enable interrupts to the CPU, if so desired. This is done by simply setting the IE
bit in the BDLC Control Register 1. Following this, the BDLC module is ready for operating in interrupt mode. If the user chooses
not to enable interrupts, the BDLC State Vector Register must be polled periodically to ensure that state changes in the BDLC
module are detected and dealt with appropriately.
Preform
Loopback Tests Enable BDLC module by
setting BDLCE bit in
DLCSCR
Read DLCBSVR
Process pending
BDLC interrupt
No
Is DLCBSVR = $00?
Yes
Proceed to remaining
MCU initialization
20.9 Resets
20.9.1 General
The reset state of each individual bit is listed within Section 20.7, Memory Map and Registers which details the registers and their bit-fields.
Chapter 21
Debug Support and JTAG Interface
21.1 Overview
The following sections are contained in this document:
• Section 21.2, TAP Link Module (TLM) and Slave TAP Implementation
• Section 21.3, TLM and TAP Signal Descriptions
• Section 21.4, Slave Test Reset (STRST)
• Section 21.5, TAP State Machines
• Section 21.6, G2_LE Core JTAG/COP Serial Interface
• Section 21.7, TLM Link DR Instructions
• Section 21.8, TLM Test Instructions, includes:
— Section 21.8.1, IDCODE
— Section 21.8.1.1, Device ID Register
• Section 21.9, G2_LE COP/BDM Interface
The MPC5200 provides the user an IEEE 1149.1 JTAG interface to facilitate board/system testing. It also provides a Common On-Chip
Processor (COP) Interface, which shares the IEEE 1149.1 JTAG port. The COP Interface provides access to the MPC5200's imbedded
Freescale MPC603e G2_LE processor. This interface provides a means for executing test routines and for performing software development
& debug functions.
TRST-
TRST-
TCK
TCK TDO
TMS TMS TAP Link Module
TDI (TLM)
TDI
STD0[0:n]
ENA[0:n]
SEL[0:n]
STRST-
ENA[0:n]
STRST-
[0]
ENA [0]
SEL
TRST-
TCK
TCK TAP [0]
TMS TDO
TMS
TDI
TDI
STDO[0:n]
SEL[0:n]
[1]
ENA [1]
TRST- SEL
TCK
TCK TAP [1]
TMS TDO
TMS
TDI
TDI
ENA[0:n]
TLMENA
Link
&
& &
& ShiftDR
ClockDR
UpdateDR
STDO[0:n]
DeviceID
BdyScan
Bypass
&
ShiftDR
ClockDR
edoce
UpdateDR
SEL[0:n] TLMSEL
TDO
TDI IR
&
ShiftDR
ClockDR
TMS UpdateDR
TCK TAP State ShiftIR
Machine
TRST- ClockIR
UpdateIR
STRST-
DeviceID
BdyScan
Bypass
ShiftDR
edoce
ClockDR SEL
UpdateDR
TDI
IR
Update-DR or Run-Test/Idle TDO
ENA
& 1
0
TMS
ShiftDR
TCK TAP State ClockDR
Machine UpdateDR
ShiftIR
TRST- ClockIR
UpdateIR
1 Test-Logic-Reset
0
1 1 1
0 Run-Test/Idle Select-DR Scan Select-IR Scan
0 0
1 1
Capture-DR Capture-IR
0 0
Shift-DR 0 Shift_IR 0
1 1
1 1
Exit1-DR Exit1-IR
0 0
Pause-DR 0 Pause-IR 0
1 1
0 0
Exit2-DR Exit2-IR
1 1
Update-DR Update-IR
1 0 1 0
Instructions are loaded by stepping the state machine to the Shift-IR state by applying an appropriate sequence of values on TMS at successive
rising edges of TCK. Once in the Shift-IR state, TMS is held low and appropriate values are applied at TDI (lsb-first) at successive rising
edges of TCK. As the last (ms) bit is applied at TDI, TMS is set high and the state machine is advanced through the Exit1-IR and Update-IR
states. The instruction becomes effective at the falling edge of TCK in the Update-IR state.
Data registers are loaded by first selecting the desired data register with an appropriate instruction, then stepping the state machine to the
Shift-DR state. Once in the Shift-DR state, TMS is held low and appropriate values are applied at TDI (lsb-first) at successive rising edges of
TCK. As the last (ms) bit is applied at TDI, TMS is set high and the state machine is advanced through the Exit1-DR and Update-DR states.
The data becomes effective at the falling edge of TCK in the Update-DR state.
RunN Counter
COP_PVR TDO
TDI
D
Q
Instruction/Status Register
TCK
TMS TAP Controller COP Controller
TRST
TLM:TLMENA 01 N3
TLM:PPCENA 10 N
Note:
1. Reset = TLM:TLMENA
2. Capture = Current Value
3. Link Pseudo-instructions are persistent with respect to the enabled IR, but not with respect to the contents of the
TLM:Link DR itself.
Link pseudo-instructions are loaded into the 2-bit TLM:Link DR when it is selected by instructions of the TLM or slave TAP blocks. The
value shifted into the TLM:Link DR determines which IR will be active after the Update-DR state. The selection remains in effect until the
TLM:Link register is selected again, and modified.
21.7.1 TLM:TLMENA
The TLM:TLMENA pseudo-instruction selects the 6-bit TLM IR.
21.7.2 TLM:PPCENA
The TLM:PPCENA pseudo-instruction selects the 8-bit microprocessor CPU test IR.
0 1 1 1 0 1
21.8.1 IDCODE
The IDCODE instruction selects the 32-bit DeviceID DR to be logically connected between TDI and TDO during DR shift operations. The
capture value of the DeviceID DR identifies the manufacturer (Freescale), device type (MPC5200), and device revision level.
21.8.2 BYPASS
The BYPASS instruction selects the 1-bit Bypass DR to be logically connected between TDI and TDO during DR shift operations. It performs
no testing function. The Bypass register provides for a minimum-length serial datapath from TDI to TDO. This allows more rapid test data
movement to and from other JTAG scan chain components. The Bypass register capture value is 0. The Bypass register update value has no
effect.
21.8.3 SAMPLE/PRELOAD
The SAMPLE/PRELOAD instruction selects the Boundary Scan DR to be logically connected between TDI and TDO during DR shift
operations. As the name implies, the SAMPLE/PRELOAD instruction has two distinct uses:
Sample: To capture and examine the device pins state without disturbing normal system operation. Signals are captured at the TCK rising
edge in the Capture-DR state, and examined by shifting out. For captured values to be meaningful, TCK may need to be synchronized
to the normal system clock. The update value has no effect.
Preload: To shift an initial value into the boundary scan register prior to loading the EXTEST or CLAMP instruction into the Instruction
register. Capture value may be examined or ignored. Update value has no effect until EXTEST/CLAMP instruction is loaded. It is then
presented at the device pins.
21.8.4 EXTEST
The EXTEST instruction selects the Boundary Scan DR to be logically connected between TDI and TDO during DR shift operations. It also
forces the Boundary Scan register contents to appear at the pins of the device. The state of all pins is captured at the TCK rising edge in the
Capture-DR TAP Controller state. The update value appears on the pins at the TCK falling edge in the Update-DR state. EXTEST does not
affect on-chip pull-up or pulldown resistors.
21.8.5 CLAMP
The CLAMP instruction forces the contents of the Boundary Scan DR to appear at the boundary of the microprocessor block, just like the
EXTEST instruction, but selects the 1-bit Bypass DR to be logically connected between TDI and TDO during DR shift operations. This allows
a static data pattern to be driven onto the device pins, while at the same time minimizing the length of shifts to access test data registers on
other devices in the JTAG scan chain. CLAMP does not affect on-chip pull-up or pull-down resistors.
21.8.6 HIGHZ
The HIGHZ instruction selects the 1-bit Bypass DR to be logically connected between TDI and TDO during DR shift operations, and also
forces all output and bidirectional pins of the device into a non-driving state. Input pins, and the input portion of bidirectional pins, are not
affected.
Notes
Appendix A
Acronyms and Terms
This section contains an alphabetical list of terms, phrases, acronyms, and abbreviations used in this book. Some terms and definitions
included are reprinted from IEEE Std. 754-1985, IEEE Standard for Binary Floating-Point Arithmetic, copyright ©1985 by the Institute of
Electrical and Electronics Engineers, Inc. with permission of the IEEE.
A
AAL . . . . . . . . . . . . . . . . . . . ATM Adaptation Layer
ABR . . . . . . . . . . . . . . . . . . . Available Bit-Rate. See also CBR and UBR.
ACR . . . . . . . . . . . . . . . . . . . Allowed Cell Rate
addr, adr . . . . . . . . . . . . . . . . address
alm . . . . . . . . . . . . . . . . . . . . alarm
ALE. . . . . . . . . . . . . . . . . . . . Address Latch Enable
ALU . . . . . . . . . . . . . . . . . . . Arithmetic Logic Unit
APC. . . . . . . . . . . . . . . . . . . . ATM Pace Control unit
ARB . . . . . . . . . . . . . . . . . . . Microprocessor Arbitor
Architecture . . . . . . . . . . . . . A detailed specification of requirements for a processor or computer system. It does not specify details of how
the processor or computer system must be implemented; instead it provides a template for a family of
compatible implementations.
Asynchronous exception. . . . Exceptions that are caused by events external to the processor’s execution. In this document, the term
‘asynchronous exception’ is used interchangeably with the word interrupt.
AT . . . . . . . . . . . . . . . . . . . . . Address Types
ATA . . . . . . . . . . . . . . . . . . . . Advanced Technology Attachment—a standard interface used with storage devices such as hard disk drives.
ATA drives are also referred to as Integrated Drive Electronics (IDE) drives.
ATAPI . . . . . . . . . . . . . . . . . . ATA Packet Interface
ATM . . . . . . . . . . . . . . . . . . . Asynchronous Transfer Mode
Atomic access . . . . . . . . . . . . A bus access that attempts to be part of a read-write operation to the same address uninterrupted by any other
access to that address (the term refers to the fact that the transactions are indivisible). The PowerPC architecture
implements atomic access through the lwarx/stwcx instruction pair.
Autobaud. . . . . . . . . . . . . . . . The process of determining a serial data rate by timing the width of a single bit.
B
BAT . . . . . . . . . . . . . . . . . . . . Block Address Translation
BB . . . . . . . . . . . . . . . . . . . . . Bus Busy
BD. . . . . . . . . . . . . . . . . . . . . Buffer Descriptor
BG. . . . . . . . . . . . . . . . . . . . . Bus Grant
BI . . . . . . . . . . . . . . . . . . . . . Burst Inhibit
Big-Endian (BE). . . . . . . . . . A byte-ordering method in memory where the address n of a word corresponds to the Most-Significant Byte. In
an addressed memory word, the bytes are ordered (left to right) 0, 1, 2, 3, with 0 being the Most-Significant
Byte. See also Little-Endian.
. . . . . . . . . . . . . . . . . . . . . . . In Big-Endian architectures, the leftmost bytes (those with a lower address) are most significant. For example,
consider the number 1025 stored in a 4Byte integer as shown in the table below.
00 00000000 00000001
01 00000000 00000100
02 00000100 00000000
03 00000001 00000000
C
Cache . . . . . . . . . . . . . . . . . . High-speed memory component containing recently accessed data and/or instructions (subset of main
memory).
Cache coherency . . . . . . . . . . An attribute in which an accurate and common view of memory is provided to all devices that share a memory
system. Caches are coherent if a processor performing a read from its cache is supplied with data corresponding
to the most recent value written to memory or to another processor’s cache.
Cache flush . . . . . . . . . . . . . . An operation that removes from a cache any data from a specified address range. This operation ensures any
modified data within the specified address range is written back to main memory. This operation is generated
typically by a Data Cache Block Flush (dcbf) instruction.
Caching-inhibited . . . . . . . . . A memory update policy in which the cache is bypassed and the load or store is done to or from main memory.
CAM . . . . . . . . . . . . . . . . . . . Content Addressable Memory
CAN . . . . . . . . . . . . . . . . . . . Controller Area Network
Cast-outs . . . . . . . . . . . . . . . . Cache blocks that must be written to memory when a cache miss causes a cache block to be replaced.
CBR . . . . . . . . . . . . . . . . . . . Constant Bit-Rate. See also UBR and ABR.
CD. . . . . . . . . . . . . . . . . . . . . Carrier Detect
CDM . . . . . . . . . . . . . . . . . . . Clock Distribution Module
CDV . . . . . . . . . . . . . . . . . . . Cell Delay Variation
CEPT . . . . . . . . . . . . . . . . . . . Conference des administrations Europeanes des Postes et Telecommunications (European Conference of Postal
and Telecommunications Administrations).
CES . . . . . . . . . . . . . . . . . . . . Circuit Emulation Service
cfg . . . . . . . . . . . . . . . . . . . . . configuration
Changed bit . . . . . . . . . . . . . . One of two page history bits found in each page table entry (PTE). The processor sets the changed bit if any
store is performed into the page. See also Page access history bits and Referenced bit.
C/I. . . . . . . . . . . . . . . . . . . . . Condition/Indication (channel used in GCI protocol)
Clear . . . . . . . . . . . . . . . . . . . To cause a bit or bit field to register a value of 0. The opposite of set.
CLP . . . . . . . . . . . . . . . . . . . . Cell Loss Priority
cmd . . . . . . . . . . . . . . . . . . . . command
cnt . . . . . . . . . . . . . . . . . . . . . count
CODEC. . . . . . . . . . . . . . . . . COder/DECoder, or COmpression/DECommpression
D
DABR . . . . . . . . . . . . . . . . . . Data Address Breakpoint Register
DAR . . . . . . . . . . . . . . . . . . . Data Address Register
DDR . . . . . . . . . . . . . . . . . . . Dual-Data Rate
DEC . . . . . . . . . . . . . . . . . . . Decrementer (register)
Denormalized number. . . . . . A non-zero floating-point number whose exponent has:
a reserved value, usually the format's minimum, and
whose explicit or implicit leading significant bit is 0.
Direct-mapped cache . . . . . . A cache in which each main memory address can appear in only one location within the cache, operates more
quickly when the memory request is a cache hit.
Direct-store . . . . . . . . . . . . . . Interface available only on microprocessors that use the PowerPC architecture; supports direct-store devices
from the POWER architecture. When the T-bit of a segment descriptor is set, the descriptor defines the region
of memory to be used as a direct-store segment.
This facility is being phased out of the architecture and is not likely be supported in future devices. Therefore, software should not depend on
it and new software should not use it.
DMA . . . . . . . . . . . . . . . . . . . Direct Memory Access
DPLL . . . . . . . . . . . . . . . . . . Digital Phase-Locked Loop
DPR. . . . . . . . . . . . . . . . . . . . Dual-Port RAM
DR. . . . . . . . . . . . . . . . . . . . . Data Register
DRAM . . . . . . . . . . . . . . . . . Dynamic Random Access Memory
DSI . . . . . . . . . . . . . . . . . . . . Data Storage Interrupt
DSISR . . . . . . . . . . . . . . . . . . DSI Source Register—a register used for determining the source of a DSI exception.
DTLB . . . . . . . . . . . . . . . . . . Data Translation Lookaside Buffer
DTV . . . . . . . . . . . . . . . . . . . Digital TV
DWPCI . . . . . . . . . . . . . . . . . designware PCI—synopsys designware component
E
EA . . . . . . . . . . . . . . . . . . . . . Effective Address—The 32- or 64-bit address specified for a load, store, or instruction fetch. This address is
then submitted to the MMU for translation to either a physical memory address or an I/O address.
ED . . . . . . . . . . . . . . . . . . . . . Endpoint Descriptor
EEST . . . . . . . . . . . . . . . . . . . Enhanced Ethernet Serial Transceiver
en. . . . . . . . . . . . . . . . . . . . . . enable
EPROM. . . . . . . . . . . . . . . . . Erasable Programmable Read-Only Memory
err . . . . . . . . . . . . . . . . . . . . . error
ESAR . . . . . . . . . . . . . . . . . . Enhanced Segmentation And Reassembly
ETH. . . . . . . . . . . . . . . . . . . . Ethernet
Exception . . . . . . . . . . . . . . . A condition encountered by the processor that requires special, supervisor-level processing.
Exception handler . . . . . . . . . A software routine that executes when an exception is taken. Normally, the exception handler corrects the
condition that caused the exception, or performs some other meaningful task, which may include aborting the
program that caused the exception. The address for each exception handler is identified by an exception vector
offset defined by the architecture and a prefix selected by the MSR.
Extended opcode. . . . . . . . . . A secondary opcode field generally located in instruction bits 21–30, that further defines the instruction type.
All instructions are one word in length. The most significant 6 bits of the instruction are the primary opcode,
identifying the type of instruction. See also Primary opcode.
Execution synchronization. . . A mechanism by which all instructions in execution are architecturally complete before beginning execution
(appearing to begin execution) of the next instruction. Similar to context synchronization, but doesn't force
contents of the instruction buffers to be deleted and refetched.
Exponent . . . . . . . . . . . . . . . . In a floating-point number binary representation, the exponent is the component that signifies the integer power
to which the value two is raised in determining the value of the represented number. See also Biased exponent.
EXTAL . . . . . . . . . . . . . . . . . External Crystal. See also XTAL.
F
FBP . . . . . . . . . . . . . . . . . . . . Free Buffer Pool
FEC . . . . . . . . . . . . . . . . . . . . Fast Ethernet Controller
Fetch . . . . . . . . . . . . . . . . . . . Retrieving instructions from either the cache or main memory and placing them into the instruction queue.
FIFO . . . . . . . . . . . . . . . . . . . First-In-First-Out (buffer)
FIR . . . . . . . . . . . . . . . . . . . . Fast Infrared. See also MIR and SIR.
FMC . . . . . . . . . . . . . . . . . . . Forward Monitor Cells
FPR . . . . . . . . . . . . . . . . . . . . Floating Point Register
FPSCR . . . . . . . . . . . . . . . . . Floating Point Status and Control Register
FPU . . . . . . . . . . . . . . . . . . . . Floating Point Unit
FRM . . . . . . . . . . . . . . . . . . . Forward Resource Management
flg . . . . . . . . . . . . . . . . . . . . . flag
FLT . . . . . . . . . . . . . . . . . . . . First-Level Table. See also SLT.
Fully-associative . . . . . . . . . . Addressing scheme where every cache location (every byte) can have any possible address.
G
Gb, Gbit . . . . . . . . . . . . . . . . Gigabit (written with lowercase b; 1024 megabits)
GB, GByte . . . . . . . . . . . . . . Giga-Byte (written with upper case B; 1024 MegaBytes)
GCI . . . . . . . . . . . . . . . . . . . . General Circuit Interface
GCRA . . . . . . . . . . . . . . . . . . Generic Cell Rate Algorithm (leaky bucket)
GFC. . . . . . . . . . . . . . . . . . . . Generic Flow Control
GPCM . . . . . . . . . . . . . . . . . . General-Purpose Chip-select Machine
GPIO . . . . . . . . . . . . . . . . . . . General Purpose Input Output (standard)
GPR. . . . . . . . . . . . . . . . . . . . General-Purpose Register—Any of the 32 registers in the general-purpose register file. These registers provide
the source operands and destination results for all integer data manipulation instructions. Integer load
instructions move data from memory to GPRs and store instructions move data from GPRs to memory.
GPTMR . . . . . . . . . . . . . . . . . General Purpose Timer
GUI . . . . . . . . . . . . . . . . . . . . Graphical User Interface
H
Harvard architecture . . . . . . . An architectural model featuring separate caches for instruction and data.
HC, Hc . . . . . . . . . . . . . . . . . Host Controller
HCD . . . . . . . . . . . . . . . . . . . Host Controller Driver
HDLC . . . . . . . . . . . . . . . . . . High-level Data Link Control—a transmission protocol used at the data link layer (layer 2) of the OSI seven
layer model for data communications. The HDLC protocol embeds information in a data frame that allows
devices to control data flow and correct errors.
. . . . . . . . . . . . . . . . . . . . . . . HDLC is an ISO standard developed from the Synchronous Data Link Control (SDLC) standard proposed by
IBM.
HEC . . . . . . . . . . . . . . . . . . . Header Error Control
I
ICTL . . . . . . . . . . . . . . . . . . . Interrupt Controller
IEEE . . . . . . . . . . . . . . . . . . . Institute of Electrical and Electronics Engineers
IEEE754 . . . . . . . . . . . . . . . . A standard, written by the Institute of Electrical and Electronics Engineers, which defines operations and
representations of binary floating-point arithmetic.
I2C. . . . . . . . . . . . . . . . . . . . . Inter-Integrated Circuit
IC . . . . . . . . . . . . . . . . . . . . . Input Capture. Also see OC and PWM.
IDE . . . . . . . . . . . . . . . . . . . . Integrated Drive Electronics—Interface for connecting additional hard drives to a computer.
IDL . . . . . . . . . . . . . . . . . . . . Inter-chip Digital Link
IDMA . . . . . . . . . . . . . . . . . . Internal Direct Memory Access
Illegal instructions. . . . . . . . . A class of instructions not implemented for a particular microprocessor. These include instructions not defined
by the PowerPC architecture. In addition:
. . . . . . . . . . . . . . . . . . . . . . . For 32-bit implementations, instructions defined for 64-bit implementations only are considered illegal
instructions.
. . . . . . . . . . . . . . . . . . . . . . . For 64-bit implementations, instructions defined for 32-bit implementations only are considered illegal
instructions.
Implementation . . . . . . . . . . . A particular processor that conforms to the PowerPC architecture, but may differ from other
architecture-compliant implementations; for example, in design, feature set, and implementation of optional
features. The PowerPC architecture has many different implementations.
Implementation-dependent . . An aspect of a feature in a processor’s design that is defined by a processor’s design specifications, rather than
by the PowerPC architecture.
Implementation-specific . . . . An aspect of a feature in a processor’s design that is not required by the PowerPC architecture, but for which
the PowerPC architecture may provide concessions to ensure processors implementing the feature do so
consistently.
Imprecise exception . . . . . . . A type of synchronous exception that is allowed not to adhere to the precise exception model. See also Precise
exception. The PowerPC architecture lets only floating-point exceptions be handled imprecisely.
individual serial controllers . SCC, SMC, SPI, I2C, and USB—these individual serial controllers request service from the CPM.
Internal bus . . . . . . . . . . . . . . bus that connects the core and System Interface Unit (SIU).
Instruction latency. . . . . . . . . The total number of clock cycles necessary to execute an instruction and make ready the results of that
instruction.
int . . . . . . . . . . . . . . . . . . . . . interrupt
Interrupt . . . . . . . . . . . . . . . . An asynchronous exception—on processors that use the PowerPC architecture, interrupts are a special case of
exceptions. See also asynchronous exception.
IP. . . . . . . . . . . . . . . . . . . . . . Intellectual Property—a unique number that identifies a particular computer in a network of computers. The IP
part of TCP/IP; a protocol used to route a data packet from its source to its destination.
IPBI, IP bus. . . . . . . . . . . . . . IP Bus Interface—the Intellectual Property Bus Interface
IR . . . . . . . . . . . . . . . . . . . . . Infrared
IR . . . . . . . . . . . . . . . . . . . . . Instruction Register
IrDA, IRDA . . . . . . . . . . . . . Infrared Data Association
IRQ . . . . . . . . . . . . . . . . . . . . Interrupt Request
ISI . . . . . . . . . . . . . . . . . . . . . Instruction Storage Interrupt
ITLB . . . . . . . . . . . . . . . . . . . Instruction Translation Lookaside Buffer
IU . . . . . . . . . . . . . . . . . . . . . Integer Unit
J
JAVA™ . . . . . . . . . . . . . . . . . From Sun Microsystems, Inc.—a robust and versatile programming language that enables developers to:
• Write software on one platform and run it on another.
• Create programs to run within a web browser.
• Develop server-side applications for online forums, stores, polls, processing HTML forms, and more.
• Write applications for cell phones, two-way pagers, and other consumer devices.
JTAG . . . . . . . . . . . . . . . . . . . Joint Test Action Group
K
Kbps . . . . . . . . . . . . . . . . . . . thousand (K) bits per second
Kb, Kbit . . . . . . . . . . . . . . . . Kilobit (written with lowercase b; 1024 Bytes)
KB, KByte . . . . . . . . . . . . . . KiloByte (written with uppercase B; 1024 bits)
L
LAN . . . . . . . . . . . . . . . . . . . Local Area Network—A computer network that spans a relatively small area. Most LANs are confined to a
single building or group of buildings. However, one LAN can be connected to other LANs over any distance
via telephone lines and radio waves. A system of LANs connected in this way is called a Wide-Area Network
(WAN).
LANs are capable of transmitting data at fast rates, much faster than data can be transmitted over a telephone line. However, distances are
limited. There is also a limit on the number of computers that can be attached to a single LAN.
Latency . . . . . . . . . . . . . . . . . The time an operation requires. For example:
• execution latency is the number of processor clocks an instruction takes to execute.
• memory latency is the number of bus clocks needed to perform a memory operation.
ld . . . . . . . . . . . . . . . . . . . . . . load
LIFO . . . . . . . . . . . . . . . . . . . Last-In-First-Out (buffer)
Little-Endian (LE) . . . . . . . . A byte-ordering method in memory where the address n of a word corresponds to the Least-Significant Byte. In
an addressed memory word, the bytes are ordered (left to right) 3, 2, 1, 0, with 3 being the Most-Significant
Byte. See also Big-Endian.
. . . . . . . . . . . . . . . . . . . . . . . In Little-Endian architectures, the rightmost bytes (those with a higher address) are most significant. For
example, consider the number 1025 stored in a 4Byte integer as shown in the table below.
00 00000000 00000001
01 00000000 00000100
02 00000100 00000000
03 00000001 00000000
LP . . . . . . . . . . . . . . . . . . . . . LocalPlus
LR . . . . . . . . . . . . . . . . . . . . . Link Register
LRU . . . . . . . . . . . . . . . . . . . Least Recently Used
lsb . . . . . . . . . . . . . . . . . . . . . least significant bit—the bit of least value in an address, register, data element, or instruction encoding.
LSB . . . . . . . . . . . . . . . . . . . . Least Significant Byte—the Byte of least value in an address, register, data element, or instruction encoding.
LSU. . . . . . . . . . . . . . . . . . . . Load/Store Unit
M
MA . . . . . . . . . . . . . . . . . . . . Memory Address
MAC . . . . . . . . . . . . . . . . . . . Media Access Control
N
NaN . . . . . . . . . . . . . . . . . . . . Not a Number
NCITS . . . . . . . . . . . . . . . . . . Number of Cells In Time Slot
NIC . . . . . . . . . . . . . . . . . . . . Network Interface Card
NMI. . . . . . . . . . . . . . . . . . . . Non-Maskable Interrupt
NMSI . . . . . . . . . . . . . . . . . . Non-Multiplexed Serial Interface
No-op . . . . . . . . . . . . . . . . . . No-operation—a single-cycle operation that does not affect registers or generate bus activity
NRT. . . . . . . . . . . . . . . . . . . . Non-Real Time
O
OC. . . . . . . . . . . . . . . . . . . . . Output Compare
OE . . . . . . . . . . . . . . . . . . . . . Output Enable signal
OEA . . . . . . . . . . . . . . . . . . . Operating Environment Architecture—the level of PowerPC architecture that describes memory
management model, supervisor-level registers, synchronization requirements, and the exception model. It also
defines the time-base feature from a supervisor-level perspective.
OHCI. . . . . . . . . . . . . . . . . . . Open Host Controller Interface—an "Open Host" standard.
Option, Optional . . . . . . . . . . A feature, such as an instruction, register, or exception, defined by the PowerPC architecture, but not required
to be implemented.
OSI . . . . . . . . . . . . . . . . . . . . Open Systems Interconnection
Out-of-order . . . . . . . . . . . . . An aspect of an operation that lets it be performed ahead of one that may have preceded it in the sequential
model. For example, speculative operations. An operation is said to be performed out-of-order if, at the time it
is performed, it is not known to be required by the sequential execution model. See also In-order.
Out-of-order execution . . . . . A technique that lets instructions be issued and completed in an order that differs from their sequence in the
instruction stream.
Overflow . . . . . . . . . . . . . . . . An error condition that occurs during arithmetic operations when the result cannot be stored accurately in the
destination register(s). For example, if two 32-bit numbers are multiplied, the result may not be representable
in 32 bits.
P
Pace control. . . . . . . . . . . . . . Controls the data flow rate between a master and slave.
Page. . . . . . . . . . . . . . . . . . . . A region in memory. The OEA defines a page as a 4KByte area of memory, aligned on a 4KByte boundary.
Page fault . . . . . . . . . . . . . . . A page fault is a condition that occurs when the processor attempts to access a memory location that does not
reside within a page not currently resident in physical memory. On microprocessors that use the PowerPC
architecture, a page fault exception condition occurs when a matching, valid page table entry (PTE[V]=1)
cannot be located.
PCI . . . . . . . . . . . . . . . . . . . . Peripheral Component Interconnect
PCMCIA . . . . . . . . . . . . . . . . Personal Computer Memory Card International Association
PCR. . . . . . . . . . . . . . . . . . . . Peak Cell Rate
PDU . . . . . . . . . . . . . . . . . . . Protocol Data Unit
PHY . . . . . . . . . . . . . . . . . . . Physical Layer Device
Physical memory. . . . . . . . . . The actual memory that can be accessed through the system memory bus.
PIP. . . . . . . . . . . . . . . . . . . . . Parallel Interface Port
Pipelining . . . . . . . . . . . . . . . A technique that breaks operations (such as instruction processing or bus transactions) into smaller distinct
stages or tenures (respectively) so that a subsequent operation can begin before the previous one has completed.
PIT . . . . . . . . . . . . . . . . . . . . Periodic Interrupt Timer
PLL . . . . . . . . . . . . . . . . . . . . Phase-Locked Loop
PM. . . . . . . . . . . . . . . . . . . . . Performance Monitors
PMD . . . . . . . . . . . . . . . . . . . Physical Media-Dependent
POTS. . . . . . . . . . . . . . . . . . . Plain Old Telephone Service—refers to the standard telephone service that most homes use. The main
distinctions between POTS and non-POTS services are speed and bandwidth. POTS is generally restricted to
about 52Kbps. The POTS network is also called the public switched telephone network (PSTN).
PPC . . . . . . . . . . . . . . . . . . . . Port Power Control
PPM . . . . . . . . . . . . . . . . . . . Pulse-Position Modulation
Precise exceptions. . . . . . . . . A category of exception for which the pipeline can be stopped so that instructions preceding the faulting
instruction can complete. Subsequent instructions can then be flushed and redispatched after exception handling
has completed. See also Imprecise exceptions.
pri . . . . . . . . . . . . . . . . . . . . . priority
Primary opcode . . . . . . . . . . . The most-significant 6 bits (bits 0–5) of the instruction encoding that identifies the type of instruction. See also
Secondary opcode.
Protection boundary . . . . . . . A boundary between protection domains.
Protection domain . . . . . . . . . a segment, virtual page, BAT area, or range of unmapped effective addresses. It is defined only when the
appropriate relocate bit in the MSR (IR or DR) is 1.
PSC . . . . . . . . . . . . . . . . . . . . Programmable Serial Controller
Q
QNX . . . . . . . . . . . . . . . . . . . From QNX Software Systems—a hybrid realtime platform that represents a cross between a realtime operating
system and a platform OS. The first integrated, self-hosted, graphical platform for embedded developers.
Quad word. . . . . . . . . . . . . . . A group of 16 contiguous locations starting at an address divisible by 16.
R
rA . . . . . . . . . . . . . . . . . . . . . The rA instruction field specifies a GPR used as a source or destination.
rB . . . . . . . . . . . . . . . . . . . . . The rB instruction field specifies a GPR used as a source.
rD . . . . . . . . . . . . . . . . . . . . . The rD instruction field specifies a GPR used as a destination.
rS. . . . . . . . . . . . . . . . . . . . . . The rS instruction field specifies a GPR used as a source.
RCT. . . . . . . . . . . . . . . . . . . . Receive Connection Table
RD. . . . . . . . . . . . . . . . . . . . . Read
Real address mode . . . . . . . . An MMU mode when no address translation is done and the effective address specified is the same as the
physical address. The processor’s MMU is operating in real address mode if its ability to perform address
translation has been disabled through the MSR registers IR and/or DR bits.
Record bit . . . . . . . . . . . . . . . Bit 31 (or the Rc bit) in the instruction encoding. When set, it updates the condition register (CR) to reflect the
result of the operation.
Registers . . . . . . . . . . . . . . . . See Section XXX
Register indirect addressing. . A form of addressing that specifies one GPR that contains the address for the load or store.
Register indirect with . . . . . . A form of addressing that specifies an immediate value to
immediate index addressing. . be added to the contents of a specified GPR to form the target address for the load or store.
Register indirect with . . . . . . A form of addressing that specifies that the contents of two
index addressing . . . . . . . . . . GPRs be added together to yield the target address for the load or store.
Reservation . . . . . . . . . . . . . . The processor establishes a reservation on a cache block of memory space when it executes an lwarx instruction
to read a memory semaphore into a GPR.
Reserved field . . . . . . . . . . . . In a register, a reserved field is one not assigned a function. A reserved field may be a single bit. The handling
of reserved bits is implementation-dependent. Software is allowed to write any value to such a bit. A subsequent
reading of the bit returns 0 if the value last written to the bit was 0; otherwise, it returns an undefined value (0
or 1).
RISC . . . . . . . . . . . . . . . . . . . Reduced Instruction Set Computing—an architecture characterized by fixed-length instructions with
non-overlapping functionality and a separate set of load and store instructions that perform memory access.
RM . . . . . . . . . . . . . . . . . . . . Resource Management
rst . . . . . . . . . . . . . . . . . . . . . reset
RSV. . . . . . . . . . . . . . . . . . . . Reservation
RT . . . . . . . . . . . . . . . . . . . . . Real Time
RTC . . . . . . . . . . . . . . . . . . . . Real-Time Clock
RTOS. . . . . . . . . . . . . . . . . . . Real-Time Operating System
R/W . . . . . . . . . . . . . . . . . . . Read/Write
rwc . . . . . . . . . . . . . . . . . . . . read-write-clear
RWITM . . . . . . . . . . . . . . . . . Read With Intent To Modify
Rx, RX . . . . . . . . . . . . . . . . . Receive
S
SAR. . . . . . . . . . . . . . . . . . . . Segment And Reassemble
Scalability . . . . . . . . . . . . . . . The capability of an architecture to generate implementations specific for a wide range of purposes, and in
particular implementations of significantly greater performance and/or functionality than at present, while
maintaining compatibility with current implementations.
Scan chain . . . . . . . . . . . . . . . The peripheral buffers of a device, linked in JTAG test mode, that are addressed in a shift-register fashion.
SCC. . . . . . . . . . . . . . . . . . . . Serial Communication Controller
SCP . . . . . . . . . . . . . . . . . . . . Serial Control Port
SCR . . . . . . . . . . . . . . . . . . . . Sustained Cell Rate
SDLC . . . . . . . . . . . . . . . . . . Synchronous Data Link Control
SDRAM . . . . . . . . . . . . . . . . Synchronous Dynamic RAM—a faster version of DRAM. SDRAM is generally synchronized with the clock
speed for which the microprocessor is optimized. This tends to increase the number of instructions the processor
can perform in a given time. The speed of SDRAM is rated in MHz rather than in nanoseconds (ns). This makes
it easier to compare the bus speed and the RAM chip speed. You can convert the RAM clock speed to
nanoseconds by dividing the chip speed into 1 billion ns (which is one second). For example, an 83MHz RAM
would be equivalent to 12ns.
sel . . . . . . . . . . . . . . . . . . . . . select
Set (v) . . . . . . . . . . . . . . . . . . To write a non-zero value to a bit or bit field; the opposite of clear. The term "set" may also be used to generally
describe the updating of a bit or bit field.
Set (n) . . . . . . . . . . . . . . . . . . A subdivision of a cache. Cacheable data can be stored in a given location in any one of the sets, typically
corresponding to its lower-order address bits. Because several memory locations can map to the same location,
cached data is typically placed in the set whose cache block corresponding to that address was least recently
used (LRU). See also Set-associative.
Set-associative . . . . . . . . . . . Aspect of cache organization in which cache space is divided into sections, called sets. The cache controller
associates a particular main memory address with the contents of a particular set, or region, within the cache.
Signals. . . . . . . . . . . . . . . . . . See Section XXX
Significand . . . . . . . . . . . . . . The component of a binary floating-point number that consists of an explicit or implicit leading bit to the left
of its implied binary point and a fraction field to the right.
SI . . . . . . . . . . . . . . . . . . . . . . Serial Interface
SIM . . . . . . . . . . . . . . . . . . . . System Integration Module
SIMM . . . . . . . . . . . . . . . . . . Signed IMMediate Value, or Single In-line Memory Module
SIP. . . . . . . . . . . . . . . . . . . . . Serial Infrared Interaction Pulse
SIR . . . . . . . . . . . . . . . . . . . . Slow Infrared. See also FIR and MIR.
SIU . . . . . . . . . . . . . . . . . . . . Systems Interface Unit
Slave . . . . . . . . . . . . . . . . . . . A device that responds to the master’s address. A slave receives data on a write cycle and gives data to the
master on a read cycle.
SLT . . . . . . . . . . . . . . . . . . . . Second-Level Tables. See also FLT.
SLTMR . . . . . . . . . . . . . . . . . Slice Timer
SMC . . . . . . . . . . . . . . . . . . . Serial Management Controllers
SNA . . . . . . . . . . . . . . . . . . . Systems Network Architecture
SPI. . . . . . . . . . . . . . . . . . . . . Serial Peripheral Interface—the SPI channel supports the out-of-band control channel to external physical
chips. The SPI module allows full-duplex, synchronous, serial communication between the MPC5200 and
peripheral devices. It supports master and slave mode, double-buffered operation and can operate in a polling
or interrupt driven environment.
SPR . . . . . . . . . . . . . . . . . . . . Special-Purpose Register
SR . . . . . . . . . . . . . . . . . . . . . Segment Register
SRAM . . . . . . . . . . . . . . . . . . Static Random Access Memory—a type of memory that is faster and more reliable than the more common
DRAM (Dynamic RAM). The term "static" is derived from the fact that it does not need to be refreshed like
DRAM.
SRR0. . . . . . . . . . . . . . . . . . . machine Status save/Restore Register 0
SRR1. . . . . . . . . . . . . . . . . . . machine Status save/Restore Register 1
SRTS . . . . . . . . . . . . . . . . . . . Synchronous Residual Time Stamp
SRU. . . . . . . . . . . . . . . . . . . . System Register Unit
sta . . . . . . . . . . . . . . . . . . . . . status
Static branch prediction . . . . Mechanism by which software (for example, compilers) can give a hint to the machine hardware about the
direction a branch is likely to take.
STB . . . . . . . . . . . . . . . . . . . . Set-Top Box
Sticky bit . . . . . . . . . . . . . . . . A bit that when set must be cleared explicitly.
MPC5200 Users Guide, Rev. 3.1
stp . . . . . . . . . . . . . . . . . . . . . stop
str . . . . . . . . . . . . . . . . . . . . . start
STS . . . . . . . . . . . . . . . . . . . . Special Transfer Start
Superscalar machine . . . . . . . A machine that can issue multiple instructions concurrently from a conventional linear instruction stream.
Supervisor mode . . . . . . . . . . The privileged operation state of a processor. In supervisor mode, software (typically the operating system) can
access all control registers and the supervisor memory space, among other privileged operations.
SWT . . . . . . . . . . . . . . . . . . . Software Watchdog Timer
Synchronization . . . . . . . . . . A process to ensure operations occur in order. See also Context synchronization and Execution synchronization.
Synchronous exception . . . . . An exception generated by the execution of a particular instruction or instruction sequence. There are two types
of synchronous exceptions, precise and imprecise.
System memory . . . . . . . . . . The physical memory available to a processor.
T
TA . . . . . . . . . . . . . . . . . . . . . Transfer Acknowledge
TAP . . . . . . . . . . . . . . . . . . . . Test Access Port
TB . . . . . . . . . . . . . . . . . . . . . Time Base (register)
TC . . . . . . . . . . . . . . . . . . . . . Transmission Convergence
TCT . . . . . . . . . . . . . . . . . . . . Transmit Connection Table
TDM . . . . . . . . . . . . . . . . . . . Time-Division Multiplex—a single serial channel used by several channels taking turns.
TE . . . . . . . . . . . . . . . . . . . . . Terminal Endpoint
TEA. . . . . . . . . . . . . . . . . . . . Transfer Error Acknowledge
Throughput . . . . . . . . . . . . . . A measure of the number of instructions processed per clock cycle.
TLB. . . . . . . . . . . . . . . . . . . . Translation Lookaside Buffer—A cache that holds recently-used page table entries.
TLE . . . . . . . . . . . . . . . . . . . . True Little-Endian
TMR, tmr . . . . . . . . . . . . . . . Timer
TO, to . . . . . . . . . . . . . . . . . . Timeout
TS . . . . . . . . . . . . . . . . . . . . . Transfer Start
TSA. . . . . . . . . . . . . . . . . . . . Time-Slot Assigner
tst. . . . . . . . . . . . . . . . . . . . . . test
TSIZ . . . . . . . . . . . . . . . . . . . Transfer Size
Tx, TX. . . . . . . . . . . . . . . . . . Transmit
U
UART . . . . . . . . . . . . . . . . . . Universal Asynchronous Receiver-Transmitter—a component that handles asynchronous serial
communication.
UARTe . . . . . . . . . . . . . . . . . UART enhanced (simple UART with carrier detect input)
UBR . . . . . . . . . . . . . . . . . . . Unspecified Bit-Rate. See also CBR and ABR.
UBR+ . . . . . . . . . . . . . . . . . . Unspecified Bit-Rate with minimum cell rate guarantee
UIMM . . . . . . . . . . . . . . . . . . Unsigned IMMediate value
UISA . . . . . . . . . . . . . . . . . . . User Instruction Set Architecture—the level of the architecture to which user-level software should conform.
The UISA defines the base user-level instruction set, user-level registers, data types, floating-point memory
conventions and exception model as seen by user programs, and the memory and programming models.
UPM . . . . . . . . . . . . . . . . . . . User-Programmable Machine
USART . . . . . . . . . . . . . . . . . Universal Synchronous/Asynchronous Rx/Tx
USB. . . . . . . . . . . . . . . . . . . . Universal Serial Bus—a new external bus standard that supports data transfer rates of 12Mbps.
User mode . . . . . . . . . . . . . . . The unprivileged operating state of a processor used typically by application software. In user mode, software
can only access certain control registers and can access only user memory space. No privileged operations can
be performed. Also referred to as problem state.
UTOPIA . . . . . . . . . . . . . . . . Universal Test and Operations Physical Interface for ATM
V
VA . . . . . . . . . . . . . . . . . . . . . Virtual Address—an intermediate address used in translation of an effective address to a physical address.
W
WAN . . . . . . . . . . . . . . . . . . . Wide Area Network—A computer network that spans a relatively large geographical area. Typically, a WAN
consists of two or more local-area networks (LANs).
Watchpoint . . . . . . . . . . . . . . A reported event, but does not change machine timing.
WE . . . . . . . . . . . . . . . . . . . . Write Enable signals
WKIO . . . . . . . . . . . . . . . . . . GPIO WakeUp
Word . . . . . . . . . . . . . . . . . . . A 32-bit data element.
Note: Other processors may have a different word size.
WR . . . . . . . . . . . . . . . . . . . . Write
Write-back. . . . . . . . . . . . . . . A cache memory update policy in which processor write cycles are directly written only to the cache. External
memory is updated only indirectly. For example, when a modified cache block is cast out to make room for
newer data.
Write-through . . . . . . . . . . . . A cache memory update policy in which all processor write cycles are written to both cache and memory.
X
XCPCI. . . . . . . . . . . . . . . . . . PCI_CFG (PCI configuration)
XER . . . . . . . . . . . . . . . . . . . Register used primarily for indicating conditions such as carries and overflows for integer operations.
XFC. . . . . . . . . . . . . . . . . . . . External Filter Capacitor
XTAL . . . . . . . . . . . . . . . . . . Crystal. See also EXTAL.
VxWorks . . . . . . . . . . . . . . . . From Wind River Systems, is a networked real-time operating system designed to be used in a distributed
environment.