To provide the most up-to-date information, the revision of our documents on the World Wide Web will be
the most current. Your printed copy may be an earlier revision. To verify you have the latest information
available, refer to:
http://freescale.com/
The following revision history table summarizes changes contained in this document.
Revision History
Date
April, 200502.07New Book
May, 200502.08Minor corrections
May, 200502.09
May 200502.10Improvements to NVM reliabity spec, added part numbers
July 200502.11Added ROM parts to App.
Revision
Level
Description
removed ESD Machine Model from electrical characteristics
added thermal characteristics
added more details to run current measurement configurations
VDDA supply voltage range 3.15V - 3.6V fot ATD Operating Characteristics
I/O Chararcteristics for alll pins except EXTAL, XTAL ....
corrected VREG electrical spec
IDD wait max 95mA
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
This product incorporates SuperFlash® technology licensed from SST.
The MC9S12XD family will retain the low cost, power consumption, EMC and code-size efficiency
advantages currently enjoyed by users of Freescale's existing 16-Bit MC9S12 MCU Family.
Based around an enhanced S12 core, the MC9S12XD-Family will deliver 2 to 5 times the performance of
a 25-MHz S12 whilst retaining a high degree of pin and code compatibility with the S12.
The MC9S12XD-Family introduces the performance boosting XGATE module. Using enhanced DMA
functionality, this parallel processing module offloads the CPU by providing high-speed data processing
and transfer between peripheral modules, RAM, and I/O ports. Providing up to 80 MIPS of performance
additional to the CPU, the XGATE can access all peripherals and the RAM block.
The MC9S12XDP512 is composed of standard on-chip peripherals including 512 Kbytes of Flash
EEPROM,32 Kbytes of RAM, 4 Kbytes of EEPROM, six asynchronous serial communications interfaces
(SCI), three serial peripheral interfaces (SPI), an 8-channel IC/OC enhanced capture timer, an 8-channel,
10-bit analog-to-digital converter, a 16-channel, 10-bit analog-to-digital converter, an 8-channel
pulse-width modulator (PWM), five CAN 2.0 A, B software compatible modules (MSCAN12), two
inter-IC bus blocks, and a periodic interrupt timer. The MC9S12XDP512 has full 16-bit data paths
throughout. The non-multiplexed expanded bus interface available on the 144-pin versions allows an easy
interface to external memories.
The inclusion of a PLL circuit allows power consumption and performance to be adjusted to suit
operationalrequirements. System power consumption can befurther improvedwith the new “fast exit from
stop mode” feature.
In addition to the I/O ports available in each module, up to 25 further I/O ports are available with interrupt
capability allowing wake-up from stop or wait mode.
The MC9S12XDP512 will be availablein 144-pin LQFP with external bus interface and in 112-pin LQFP
or 80-pin QFP package without external bus interface.
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor23
Chapter 1 Device Overview (MC9S12XDP512V2)
1.1.1Features
•HCS12X Core
— 16-bit HCS12X CPU
– Upward compatible with MC9S12 instruction set
– Interrupt stacking and programmer’s model identical to MC9S12
– Instruction queue
– Enhanced indexed addressing
– Enhanced instruction set
— EBI (external bus interface)
— MMC (module mapping control)
— INT (interrupt controller)
— DBG (debug module to monitor HCS12X CPU and XGATE bus activity)
— BDM (background debug mode)
•XGATE (peripheral coprocessor)
— Parallel processing module off loads the CPU by providing high-speed data processing and
transfer
— Data transfer between Flash EEPROM, RAM, peripheral modules, and I/O ports
•PIT (periodic interrupt timer)
— Four timers with independent time-out periods
24
— Time-out periods selectable between 1 and 2
bus clock cycles
•CRG (clock and reset generator)
— Low noise/low power Pierce oscillator
— PLL
— COP watchdog
— Real time interrupt
— Clock monitor
— Fast wake-up from stop mode
•8-bit ports with interrupt functionality
— Digital filtering
— Programmable rising or falling edge trigger
• One 8-channel and one 16-channel ADC (analog-to-digital converter)
— 10-bit resolution
— External conversion trigger capability
MC9S12XDP512 Data Sheet, Rev. 2.11
24Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
•Five 1 M bit per second, CAN 2.0 A, B software compatible modules
— Five receive and three transmit buffers
— Flexible identifier filter programmable as 2 x 32 bit, 4 x 16 bit, or 8 x 8 bit
— Four separate interrupt channels for Rx, Tx, error, and wake-up
— Low-pass filter wake-up function
— Loop-back for self-test operation
•ECT (enhanced capture timer)
— 16-bit main counter with 7-bit prescaler
— 8 programmable input capture or output compare channels
— Four 8-bit or two 16-bit pulse accumulators
•8 PWM (pulse-width modulator) channels
— Programmable period and duty cycle
— 8-bit 8-channel or 16-bit 4-channel
— Separate control for each pulse width and duty cycle
— Center-aligned or left-aligned outputs
— Programmable clock select logic with a wide range of frequencies
— Fast emergency shutdown input
— Usable as interrupt inputs
•Serial interfaces
— Six asynchronous serial communication interfaces (SCI) with additional LIN support and
selectable IrDA 1.4 return-to-zero-inverted (RZI) format with programmable pulse width
— Three Synchronous Serial Peripheral Interfaces (SPI)
• Two IIC (Inter-IC bus) Modules
— Compatible with IIC bus standard
— Multi-master operation
— Software programmable for one of 256 different serial clock frequencies
•On-Chip Voltage Regulator
— Two parallel, linear voltage regulators with bandgap reference
— Low-voltage detect (LVD) with low-voltage interrupt (LVI)
— Power-on reset (POR) circuit
— 3.3-V–5.5-V operation
— Low-voltage reset (LVR)
— Ultra low-power wake-up timer
•144 -pin LQFP, 112-pin LQFP, and 80-pin QFP packages
— I/O lines with 5-V input and drive capability
— Input threshold on external bus interface inputs switchable for 3.3-V or 5-V operation
— 5-V A/D converter inputs
— Operation at 80 MHz equivalent to 40-MHz bus speed
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor25
Chapter 1 Device Overview (MC9S12XDP512V2)
•Development support
— Single-wire background debug™ mode (BDM)
— Four on-chip hardware breakpoints
1.1.2Modes of Operation
User modes:
•Normal and emulation operating modes
— Normal single-chip mode
— Normal expanded mode
— Emulation of single-chip mode
— Emulation of expanded mode
•Special Operating Modes
— Special single-chip mode with active background debug mode
— Special test mode (Freescale use only)
Reserved register space shown in Table 1-1 is not allocated to any module.
This register space is reserved for future use. Writing to these locations have
no effect. Read access to these locations returns zero.
Standard IDRID10ID9ID8ID7ID6ID5ID4ID3
CANxRIDR0 W
Extended ID RID20ID19ID18SRR=1IDE=1ID17ID16ID15
Standard IDRID2ID1ID0RTRIDE=0
CANxRIDR1 W
Extended ID RID14ID13ID12ID11ID10ID9ID8ID7
Standard IDR
CANxRIDR2 W
Extended ID RID6ID5ID4ID3ID2ID1ID0RTR
Standard IDR
CANxRIDR3 W
CANxRDSR0–
–
CANxRDSR7
Extended ID R
CANxTIDR0 W
Standard IDR
RDB7DB6DB5DB4DB3DB2DB1DB0
W
R
W
R
W
RTSR15TSR14TSR13TSR12TSR11TSR10TSR9TSR8
W
RTSR7TSR6TSR5TSR4TSR3TSR2TSR1TSR0
W
ID28ID27ID26ID25ID24ID23ID22ID21
ID10ID9ID8ID7ID6ID5ID4ID3
W
DLC3DLC2DLC1DLC0
MC9S12XDP512 Data Sheet, Rev. 2.11
52Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
Detailed MSCAN Foreground Receive and Transmit Buffer Layout (continued)
The part ID is located in two 8-bit registers PARTIDH and PARTIDL (addresses 0x001A and 0x001B).
The read-only value is a unique part ID for each revision of the chip. Table 1-2 shows the assigned part ID
number and Mask Set number.
Table 1-2. Assigned Part ID Numbers
DeviceMask Set NumberPart ID
MC9S12XDP512L15Y0xC410
MC9S12XDT384L15Y0xC410
1
The coding is as follows:
Bit 15-12: Major family identifier
Bit 11-8: Minor family identifier
Bit 7-4: Major mask set revision number including FAB transfers
Bit 3-0: Minor — non full — mask set revision
1
1.2Signal Description
This section describes signals that connect off-chip. It includes a pinout diagram, a table of signal
properties, and detailed discussion of signals. It is built from the signal description sections of the Block
User Guides of the individual IP blocks on the device.
1.2.1Device Pinout
The XD-Family of devices offers pin-compatible packaged devicesto assist with system developmentand
accommodate expansion of the application.
The MC9S12XD-Family and MC9S12XA-Family devices are offered in the following package options:
•144-pin LQFP package with an external bus interface (address/data bus)
•112-pin LQFP without external bus interface
•80-pin QFP without external bus interface
Most pins perform two or more functions, as described in more detail in Section 1.2.2, “Signal Properties
Summary”. Figure 1-5, Figure 1-6, and Figure 1-7 show the pin assignments for the various packages.
PAD07/AN07
PAD06/AN06
PAD05/AN05
PAD04/AN04
PAD03/AN03
PAD02/AN02
PAD01/AN01
PAD00/AN00
V
SS2
V
DD2
PA 7
PA 6
PA 5
PA 4
PA 3
PA 2
PA 1
PA 0
MC9S12XDP512 Data Sheet, Rev. 2.11
74Freescale Semiconductor
1.2.2Signal Properties Summary
Table 1-3 summarizes the pin functionality.
Table 1-3. Signal Properties Summary (Sheet 1 of 4)
Chapter 1 Device Overview (MC9S12XDP512V2)
Pin
Name
Function 1
Pin
Name
Function 2
Pin
Name
Function 3
Pin
Name
Function 4
Pin
Name
Function 5
Supply
EXTAL————V
XTAL————V
RESET————V
TEST————N.A.
V
REGEN
————V
XFC————V
BKGDMODC———V
PAD[23:08]AN[23:8]———V
PAD[07:00]AN[7:0]———V
PA[7:0]ADDR[15:8] IVD[15:8]——V
PB[7:1]ADDR[7:1]IVD[7:0]——V
PB0ADDR0
UDSV
PC[7:0]DATA[15:8]———V
PD[7:0]DATA[7:0]———V
PE7ECLKX2
PE6
PE5
TAGHIMODB——V
REMODATAGLO—V
XCLKS——V
PE4ECLK———V
PE3
PE2R/
PE1
PE0
LSTRBLDSEROMCTL—V
WWE——V
IRQ———V
XIRQ———V
Power
DDPLL
DDPLL
DDR
DDX
DDPLL
DDR
DDA
DDA
DDR
DDR
DDR
DDR
DDR
DDR
DDR
DDR
DDR
DDR
DDR
DDR
DDR
Internal Pull
Resistor
Description
CTRL
Reset
State
NANAOscillator pins
NANA
PULLUPExternal reset
RESET pinDOWN Test input
PUCRUpVoltage regulator enable
Input
NANAPLL loop filter
Always onUpBackground debug
PER0
AD1/
Disabled Port AD inputs of ATD1,
analog inputs of ATD1
PER1
AD1
PER1
AD0
Disabled Port AD inputs of ATD0,
analog inputs of ATD0
PUCRDisabled Port A I/O, address bus,
internal visibility data
PUCRDisabled Port B I/O, address bus,
internal visibility data
PUCRDisabled Port B I/O, address bus,
upper data strobe
PUCRDisabled Port C I/O, data bus
PUCRDisabled Port D I/O, data bus
PUCRUpPort E I/O, system clock
output, clock select
While RESET
pin is low: down
While RESET
pin is low: down
Port E I/O, tag high, mode
input
Port E I/O, read enable,
mode input, tag low input
PUCRUpPort E I/O, bus clock output
PUCRUpPort E I/O, low byte data
strobe, EROMON control
PUCRUpPort E I/O, read/write
PUCRUpPort E Input, maskable
interrupt
PUCRUpPort E input, non-maskable
interrupt
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor75
Chapter 1 Device Overview (MC9S12XDP512V2)
Table 1-3. Signal Properties Summary (Sheet 2 of 4)
Pin
Name
Function 1
PH7KWH7
Pin
Name
Function 2
Pin
Name
Function 3
Pin
Name
Function 4
Pin
Name
Function 5
SS2TXD5—V
PH6KWH6SCK2RXD5—V
PH5KWH5MOSI2TXD4—V
PH4KWH4MISO2RXD4—V
PH3KWH3SS1——V
PH2KWH2SCK1——V
PH1KWH1MOSI1——V
PH0KWH0MISO1——V
PJ7KWJ7TXCAN4SCL0TXCAN0V
PJ6KWJ6RXCAN4SDA0RXCAN0V
PJ5KWJ5SCL1
PJ4KWJ4SDA1
PJ2KWJ2
CS1——V
CS2—V
CS0—V
PJ1KWJ1TXD2——V
PJ0KWJ0RXD2
PK7
PK[6:4]ADDR
EWAITROMCTL——V
ACC[2:0]——V
CS3—V
[22:20]
PK3ADDR19IQSTAT3——V
PK2ADDR18IQSTAT2——V
PK1ADDR17IQSTAT1——V
Power
Supply
DDR
DDR
DDR
DDR
DDR
DDR
DDR
DDR
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
Internal Pull
Resistor
Description
CTRL
Reset
State
PERH/PPSH Disabled Port H I/O, interrupt, SS of
SPI2, TXD of SCI5
PERH/
PPSH
PERH/
PPSH
Disabled Port H I/O, interrupt, SCK of
SPI2, RXD of SCI5
Disabled Port H I/O, interrupt, MOSI
of SPI2, TXD of SCI4
PERH/PPSH Disabled Port H I/O, interrupt, MISO
of SPI2, RXD of SCI4
PERH/PPSH Disabled Port H I/O, interrupt, SS of
SPI1
PERH/PPSH Disabled Port H I/O, interrupt, SCK of
SPI1
PERH/PPSH Disabled Port H I/O, interrupt, MOSI
of SPI1
PERH/PPSH Disabled Port H I/O, interrupt, MISO
of SPI1
PERJ/
PPSJ
UpPort J I/O, interrupt, TX of
CAN4, SCL of IIC0, TX of
CAN0
PERJ/
PPSJ
UpPort J I/O, interrupt, RX of
CAN4, SDA of IIC0, RX of
CAN0
PERJ/
PPSJ
PERJ/
PPSJ
PERJ/
PPSJ
PERJ/
PPSJ
PERJ/
PPSJ
UpPort J I/O, interrupt, SCL of
IIC1, chip select 2
UpPort J I/O, interrupt, SDA of
IIC1, chip select 0
UpPort J I/O, interrupt, chip
select 1
UpPort J I/O, interrupt, TXD of
SCI2
UpPort J I/O, interrupt, RXD of
SCI2
PUCRUpPort K I/O, EWAIT input,
ROM on control
PUCRUpPort K I/O, extended
addresses, access source
for external access
PUCRUpExtended address, PIPE
status
PUCRUpExtended address, PIPE
status
PUCRUpExtended address, PIPE
status
MC9S12XDP512 Data Sheet, Rev. 2.11
76Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
Table 1-3. Signal Properties Summary (Sheet 3 of 4)
Pin
Name
Function 1
Pin
Name
Function 2
Pin
Name
Function 3
Pin
Name
Function 4
Pin
Name
Function 5
PK0ADDR16IQSTAT0——V
PM7TXCAN3TXD3TXCAN4—V
PM6RXCAN3RXD3RXCAN4—V
PM5TXCAN2TXCAN0TXCAN4SCK0V
PM4RXCAN2RXCAN0RXCAN4MOSI0V
PM3TXCAN1TXCAN0—
SS0V
PM2RXCAN1RXCAN0—MISO0V
PM1TXCAN0——V
PM0RXCAN0——V
PP7KWP7PWM7SCK2—V
PP6KWP6PWM6
SS2—V
PP5KWP5PWM5MOSI2—V
PP4KWP4PWM4MISO2—V
PP3KWP3PWM3
SS1—V
PP2KWP2PWM2SCK1—V
PP1KWP1PWM1MOSI1—V
PP0KWP0PWM0MISO1—V
PS7
SS0———V
PS6SCK0———V
PS5MOSI0———V
PS4MISO0———V
Power
Supply
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
DDX
Internal Pull
Resistor
Description
CTRL
Reset
State
PUCRUpExtended address, PIPE
status
PERM/
PPSM
Disabled Port M I/O, TX of CAN3 and
CAN4, TXD of SCI3
PERM/PPSM Disabled Port M I/O RX of CAN3 and
CAN4, RXD of SCI3
PERM/PPSM Disabled Port M I/OCAN0, CAN2,
CAN4, SCK of SPI0
PERM/PPSM Disabled Port M I/O, CAN0, CAN2,
CAN4, MOSI of SPI0
PERM/PPSM Disabled Port M I/O TX of CAN1,
CAN0,
SS of SPI0
PERM/PPSM Disabled Port M I/O, RX of CAN1,
CAN0, MISO of SPI0
PERM/PPSM Disabled Port M I/O, TX of CAN0
PERM/PPSM Disabled Port M I/O, RX of CAN0
PERP/
PPSP
Disabled Port P I/O, interrupt, channel
7
of PWM, SCK of SPI2
PERP/
PPSP
PERP/
PPSP
PERP/
PPSP
PERP/
PPSP
PERP/
PPSP
PERP/
PPSP
PERP/
PPSP
PERS/
Disabled Port P I/O, interrupt, channel
6 of PWM,
SS of SPI2
Disabled Port P I/O, interrupt, channel
5 of PWM, MOSI of SPI2
Disabled Port P I/O, interrupt, channel
4 of PWM, MISO2 of SPI2
Disabled Port P I/O, interrupt, channel
3 of PWM,
SS of SPI1
Disabled Port P I/O, interrupt, channel
2 of PWM, SCK of SPI1
Disabled Port P I/O, interrupt, channel
1 of PWM, MOSI of SPI1
Disabled Port P I/O, interrupt, channel
0 of PWM, MISO2 of SPI1
UpPort S I/O, SS of SPI0
PPSS
PERS/
UpPort S I/O, SCK of SPI0
PPSS
PERS/
UpPort S I/O, MOSI of SPI0
PPSS
PERS/
UpPort S I/O, MISO of SPI0
PPSS
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor77
Chapter 1 Device Overview (MC9S12XDP512V2)
Table 1-3. Signal Properties Summary (Sheet 4 of 4)
Pin
Name
Function 1
PS3TXD1———V
PS2RXD1———V
PS1TXD0———V
PS0RXD0———V
PT[7:0]IOC[7:0]———V
Pin
Name
Function 2
Pin
Name
Function 3
Pin
Name
Function 4
Pin
Name
Function 5
NOTE
For devices assembled in 80-pin and 112-pin packages all non-bonded out
pins should be configured as outputs after reset in order to avoid current
drawn from floating inputs. Refer to Table 1-3 for affected pins.
1.2.3Detailed Signal Descriptions
Power
Supply
DDX
DDX
DDX
DDX
DDX
Internal Pull
Resistor
CTRL
PERS/
PPSS
PERS/
PPSS
PERS/
PPSS
PERS/
PPSS
PERT/
PPST
Reset
Description
State
UpPort S I/O, TXD of SCI1
UpPort S I/O, RXD of SCI1
UpPort S I/O, TXD of SCI0
UpPort S I/O, RXD of SCI0
Disabled Port T I/O, timer channels
1.2.3.1EXTAL, XTAL — Oscillator Pins
EXTAL and XTAL are the crystal driverand external clock pins. On reset all the device clocks are derived
from the EXTAL input frequency. XTAL is the crystal output.
1.2.3.2RESET — External Reset Pin
The RESET pin is an active low bidirectional control signal. It acts as an input to initialize the MCU to a
known start-up state, and an output when an internal MCU function causes a reset.The
RESET pin has an
internal pullup device.
1.2.3.3TEST — Test Pin
This input only pin is reserved for test. This pin has a pulldown device.
NOTE
The TEST pin must be tied to V
1.2.3.4V
REGEN
— Voltage Regulator Enable Pin
This input only pin enables or disables the on-chip voltage regulator. The input has a pullup device.
in all applications.
SS
MC9S12XDP512 Data Sheet, Rev. 2.11
78Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
1.2.3.5XFC — PLL Loop Filter Pin
Please ask your Freescale representative for the interactive application note to compute PLL loop filter
elements. Any current leakage on this pin must be avoided.
V
DDPLL
C
MCU
XFC
Figure 1-8. PLL Loop Filter Connections
S
R
0
V
DDPLL
C
P
1.2.3.6BKGD / MODC — Background Debug and Mode Pin
The BKGD/MODC pin is used as a pseudo-open-drain pin for the background debug communication. It
is used as a MCU operating mode select pin during reset. The state of this pin is latched to the MODC bit
at the rising edge of
RESET. The BKGD pin has a pullup device.
1.2.3.7PAD[23:8] / AN[23:8] — Port AD Input Pins of ATD1
PAD[23:8] are general-purpose input or output pins and analog inputs AN[23:8] of the analog-to-digital
converter ATD1.
1.2.3.8PAD[7:0] / AN[7:0] — Port AD Input Pins of ATD0
PAD[7:0] are general-purpose input or output pins and analog inputs AN[7:0] of the analog-to-digital
converter ATD0.
1.2.3.9PA[7:0] / ADDR[15:8] / IVD[15:8] — Port A I/O Pins
PA[7:0] are general-purpose input or output pins. In MCU expanded modes of operation, these pins are
used for the external address bus. In MCU emulation modes of operation, these pins are used for external
address bus and internal visibility read data.
1.2.3.10PB[7:1] / ADDR[7:1] / IVD[7:1] — Port B I/O Pins
PB[7:1] are general-purpose input or output pins. In MCU expanded modes of operation, these pins are
used for the external address bus. In MCU emulation modes of operation, these pins are used for external
address bus and internal visibility read data.
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor79
Chapter 1 Device Overview (MC9S12XDP512V2)
1.2.3.11PB0 / ADDR0 / UDS / IVD[0] — Port B I/O Pin 0
PB0 is a general-purpose input or output pin. In MCU expanded modes of operation, this pin is used for
the external address bus ADDR0 or as upper data strobe signal. In MCU emulation modes of operation,
this pin is used for external address bus ADDR0 and internal visibility read data IVD0.
1.2.3.12PC[7:0] / DATA [15:8] — Port C I/O Pins
PC[7:0] are general-purpose input or output pins. In MCU expanded modes of operation, these pins are
used for the external data bus.
Theinput voltage thresholds for PC[7:0]can be configured to reduced levels,to allow data from anexternal
3.3-V peripheral to be read by the MCU operating at 5.0 V. The input voltage thresholds for PC[7:0] are
configured to reduced levels out of reset in expanded and emulation modes. The input voltage thresholds
for PC[7:0] are configured to 5-V levels out of reset in normal modes.
1.2.3.13PD[7:0] / DATA [7:0] — Port D I/O Pins
PD[7:0] are general-purpose input or output pins. In MCU expanded modes of operation, these pins are
used for the external data bus.
The input voltage thresholds for PD[7:0] can be configured to reduced levels, to allow data from an
external 3.3-V peripheral to be read by the MCU operating at 5.0 V. The input voltage thresholds for
PD[7:0] are configured to reduced levels out of reset in expanded and emulation modes. The input voltage
thresholds for PC[7:0] are configured to 5-V levels out of reset in normal modes.
1.2.3.14PE7 / ECLKX2 / XCLKS — Port E I/O Pin 7
PE7 is a general-purpose input or output pin. The XCLKS is an input signal which controls whether a
crystal in combination with the internal loop controlled (low power) Pierce oscillator is used or whether
full swing Pierce oscillator/external clock circuitry is used.
XCLKS signal selects the oscillator configuration during reset low phase while a clock quality check
The
is ongoing. This is the case for:
• Power on reset or low-voltage reset
• Clock monitor reset
• Any reset while in self-clock mode or full stop mode
The selected oscillator configuration is frozen with the rising edge of reset.
The pin can be configured to drive the internal system clock ECLKX2.
Figure 1-10. Full Swing Pierce Oscillator Connections (PE7 = 0)
EXTAL
MCU
XTAL
Not Connected
CMOS-Compatible
External Oscillator
Figure 1-11. External Clock Connections (PE7 = 0)
1.2.3.15PE6 / MODB / TAGHI — Port E I/O Pin 6
PE6 is a general-purpose input or output pin. It is used as a MCU operating mode select pin during reset.
The state of this pin is latched to the MODB bit at the rising edge of
pull-down device which is only active when
RESET is low. TAGHI is used to tag the high half of the
instruction word being read into the instruction queue.
The input voltage threshold for PE6 can be configured to reduced levels, to allow data from an external
3.3-V peripheral to be read by the MCU operating at 5.0 V. The input voltage threshold for PE6 is
configured to reduced levels out of reset in expanded and emulation modes.
RESET. This pin is an input with a
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor81
Chapter 1 Device Overview (MC9S12XDP512V2)
1.2.3.16PE5 / MODA / TAGLO / RE — Port E I/O Pin 5
PE5 is a general-purpose input or output pin. It is used as a MCU operating mode select pin during reset.
The state of this pin is latched to the MODA bit at the rising edge of
read enable
TAGLO is used to tag the low half of the instruction word being read into the instruction queue.
low.
RE output. This pin is an input with a pull-down device which is only active when RESET is
RESET. This pin is shared with the
The input voltage threshold for PE5 can be configured to reduced levels, to allow data from an external
3.3-V peripheral to be read by the MCU operating at 5.0 V. The input voltage threshold for PE5 is
configured to reduced levels out of reset in expanded and emulation modes.
1.2.3.17PE4 / ECLK — Port E I/O Pin 4
PE4 is a general-purpose input or output pin. It can be configured to drive the internal bus clock ECLK.
ECLK can be used as a timing reference.
1.2.3.18PE3 / LSTRB / LDS / EROMCTL— Port E I/O Pin 3
PE3 is a general-purpose input or output pin. In MCU expanded modes of operation, LSTRB or LDS can
be used for the low byte strobe function to indicate the type of bus access. At the rising edge of
the state of this pin is latched to the EROMON bit.
RESET
1.2.3.19PE2 / R/W / WE— Port E I/O Pin 2
PE2 is a general-purpose input or output pin. In MCU expanded modes of operations, this pin drives the
read/write output signal or write enable output signal for the external bus. It indicates the direction of data
on the external bus.
1.2.3.20PE1 / IRQ — Port E Input Pin 1
PE1 is a general-purpose input pin and the maskable interrupt request input that provides a means of
applying asynchronous interrupt requests. This will wake up the MCU from stop or wait mode.
1.2.3.21PE0 / XIRQ — Port E Input Pin 0
PE0 is a general-purpose input pin and the non-maskable interrupt request input that provides a means of
applying asynchronous interrupt requests. This will wake up the MCU from stop or wait mode.
1.2.3.22PH7 / KWH7 / SS2 / TXD5 — Port H I/O Pin 7
PH7 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured as slave select pin
interface 2 (SPI2). It can be configured as the transmit pin TXD of serial communication interface 5
(SCI5).
SS of the serial peripheral
MC9S12XDP512 Data Sheet, Rev. 2.11
82Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
1.2.3.23PH6 / KWH6 / SCK2 / RXD5 — Port H I/O Pin 6
PH6 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured as serial clock pin SCK of the serial peripheral
interface 2 (SPI2). It can be configured as the receive pin (RXD) of serial communication interface 5
(SCI5).
1.2.3.24PH5 / KWH5 / MOSI2 / TXD4 — Port H I/O Pin 5
PH5 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured as master output (during master mode) or slave input
pin (during slave mode) MOSI of the serial peripheral interface 2 (SPI2). It can be configured as the
transmit pin TXD of serial communication interface 4 (SCI4).
1.2.3.25PH4 / KWH4 / MISO2 / RXD4 — Port H I/O Pin 4
PH4 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured as master input (during master mode) or slave output
(duringslavemode) pin MISO of the serial peripheral interface 2 (SPI2). It can be configured as the receive
pin RXD of serial communication interface 4 (SCI4).
1.2.3.26PH3 / KWH3 / SS1 — Port H I/O Pin 3
PH3 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured as slave select pin
SS of the serial peripheral
interface 1 (SPI1).
1.2.3.27PH2 / KWH2 / SCK1 — Port H I/O Pin 2
PH2 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured as serial clock pin SCK
of the serial peripheral
interface 1 (SPI1).
1.2.3.28PH1 / KWH1 / MOSI1 — Port H I/O Pin 1
PH1 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured as master output (during master mode) or slave input
pin (during slave mode) MOSI of the serial peripheral interface 1 (SPI1).
1.2.3.29PH0 / KWH0 / MISO1 — Port H I/O Pin 0
PH0 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured as master input (during master mode) or slave output
(during slave mode) pin MISO of the serial peripheral interface 1 (SPI1).
PJ7 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as the transmit pin TXCAN for the scalable controller area
network controller 0 or 4 (CAN0 or CAN4) or as the serial clock pin SCL of the IIC0 module.
PJ6 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as the receive pin RXCAN for the scalable controller area
network controller 0 or 4 (CAN0 or CAN4) or as the serial data pin SDA of the IIC0 module.
PJ5 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as the serial clock pin SCL of the IIC1 module. It can be
configured to provide a chip-select output.
PJ4 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as the serial data pin SDA of the IIC1 module. It can be
configured to provide a chip-select output.
1.2.3.34PJ2 / KWJ2 / CS1 — PORT J I/O Pin 2
PJ2 is a general-purpose input or output pins. It can be configured to generate an interrupt causing the
MCU to exit stop or wait mode. It can be configured to provide a chip-select output.
1.2.3.35PJ1 / KWJ1 / TXD2 — PORT J I/O Pin 1
PJ1 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as the transmit pin TXD of the serial communication
interface 2 (SCI2).
PJ0 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
toexit stop or waitmode. It can be configured as the receivepin RXD of the serial communication interface
2 (SCI2).It can be configured to provide a chip-select output.
1.2.3.37PK7 / EWAIT / ROMCTL — Port K I/O Pin 7
PK7 is a general-purpose input or output pin. During MCU emulation modes and normal expanded modes
of operation, this pin is used to enable the Flash EEPROM memory in the memory map (ROMCTL). At
the rising edge of
RESET, the state of this pin is latched to the ROMON bit. The EWAIT input signal
MC9S12XDP512 Data Sheet, Rev. 2.11
84Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
maintains the external bus access until the external device is ready to capture data (write) or provide data
(read).
The input voltage threshold for PK7 can be configured to reduced levels, to allow data from an external
3.3-V peripheral to be read by the MCU operating at 5.0 V. The input voltage threshold for PK7 is
configured to reduced levels out of reset in expanded and emulation modes.
1.2.3.38PK[6:4] / ADDR[22:20] / ACC[2:0] — Port K I/O Pin [6:4]
PK[6:4] are general-purpose input or output pins. During MCU expanded modes of operation, the
ACC[2:0] signals are used to indicate the access source of the bus cycle. This pins also provide the
expanded addresses ADDR[22:20] for the external bus. In Emulation modes ACC[2:0] is available and is
time multiplexed with the high addresses
1.2.3.39PK[3:0] / ADDR[19:16] / IQSTAT[3:0] — Port K I/O Pins [3:0]
PK3-PK0 are general-purpose input or output pins. In MCU expanded modes of operation, these pins
provide the expanded address ADDR[19:16] for the external bus and carry instruction pipe information.
1.2.3.40PM7 / TXCAN3 / TXCAN4 / TXD3 — Port M I/O Pin 7
PM7 is a general-purpose input or output pin. It can be configured as the transmit pin TXCAN of the
scalable controller area network controller 3 or 4 (CAN3 or CAN4). PM7 can be configured as the transmit
pin TXD3 of the serial communication interface 3 (SCI3).
1.2.3.41PM6 / RXCAN3 / RXCAN4 / RXD3 — Port M I/O Pin 6
PM6 is a general-purpose input or output pin. It can be configured as the receive pin RXCAN of the
scalable controller area network controller 3 or 4 (CAN3 or CAN4). PM6 can be configured as the receive
pin RXD3 of the serial communication interface 3 (SCI3).
1.2.3.42PM5 / TXCAN0 / TXCAN2 / TXCAN4 / SCK0 — Port M I/O Pin 5
PM5 is a general-purpose input or output pin. It can be configured as the transmit pin TXCAN of the
scalable controller area network controllers 0, 2 or 4 (CAN0, CAN2, or CAN4). It can be configured as
the serial clock pin SCK of the serial peripheral interface 0 (SPI0).
1.2.3.43PM4 / RXCAN0 / RXCAN2 / RXCAN4 / MOSI0 — Port M I/O Pin 4
PM4 is a general-purpose input or output pin. It can be configured as the receive pin RXCAN of the
scalable controller area network controllers 0, 2, or 4 (CAN0, CAN2, or CAN4). It can be configured as
the master output (during master mode) or slave input pin (during slave mode) MOSI for the serial
peripheral interface 0 (SPI0).
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor85
Chapter 1 Device Overview (MC9S12XDP512V2)
1.2.3.44PM3 / TXCAN1 / TXCAN0 / SS0 — Port M I/O Pin 3
PM3 is a general-purpose input or output pin. It can be configured as the transmit pin TXCAN of the
scalable controller area network controllers 1 or 0 (CAN1 or CAN0). It can be configured as the slave
select pin
SS of the serial peripheral interface 0 (SPI0).
1.2.3.45PM2 / RXCAN1 / RXCAN0 / MISO0 — Port M I/O Pin 2
PM2 is a general-purpose input or output pin. It can be configured as the receive pin RXCAN of the
scalable controller area network controllers 1 or 0 (CAN1 or CAN0). It can be configured as the master
input (during master mode) or slave output pin (during slave mode) MISO for the serial peripheral
interface 0 (SPI0).
1.2.3.46PM1 / TXCAN0 — Port M I/O Pin 1
PM1 is a general-purpose input or output pin. It can be configured as the transmit pin TXCAN of the
scalable controller area network controller 0 (CAN0).
1.2.3.47PM0 / RXCAN0 — Port M I/O Pin 0
PM0 is a general-purpose input or output pin. It can be configured as the receive pin RXCAN of the
scalable controller area network controller 0 (CAN0).
1.2.3.48PP7 / KWP7 / PWM7 / SCK2 — Port P I/O Pin 7
PP7 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as pulse width modulator (PWM) channel 7 output. It can
be configured as serial clock pin SCK of the serial peripheral interface 2 (SPI2).
1.2.3.49PP6 / KWP6 / PWM6 / SS2 — Port P I/O Pin 6
PP6 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as pulse width modulator (PWM) channel 6 output. It can
be configured as slave select pin
SS of the serial peripheral interface 2 (SPI2).
1.2.3.50PP5 / KWP5 / PWM5 / MOSI2 — Port P I/O Pin 5
PP5 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as pulse width modulator (PWM) channel 5 output. It can
be configured as master output (during master mode) or slave input pin (during slave mode) MOSI of the
serial peripheral interface 2 (SPI2).
1.2.3.51PP4 / KWP4 / PWM4 / MISO2 — Port P I/O Pin 4
PP4 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as pulse width modulator (PWM) channel 4 output. It can
MC9S12XDP512 Data Sheet, Rev. 2.11
86Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
be configured as master input (during master mode) or slave output (during slave mode) pin MISO of the
serial peripheral interface 2 (SPI2).
1.2.3.52PP3 / KWP3 / PWM3 / SS1 — Port P I/O Pin 3
PP3 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as pulse width modulator (PWM) channel 3 output. It can
be configured as slave select pin
SS of the serial peripheral interface 1 (SPI1).
1.2.3.53PP2 / KWP2 / PWM2 / SCK1 — Port P I/O Pin 2
PP2 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as pulse width modulator (PWM) channel 2 output. It can
be configured as serial clock pin SCK of the serial peripheral interface 1 (SPI1).
1.2.3.54PP1 / KWP1 / PWM1 / MOSI1 — Port P I/O Pin 1
PP1 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as pulse width modulator (PWM) channel 1 output. It can
be configured as master output (during master mode) or slave input pin (during slave mode) MOSI of the
serial peripheral interface 1 (SPI1).
1.2.3.55PP0 / KWP0 / PWM0 / MISO1 — Port P I/O Pin 0
PP0 is a general-purpose input or output pin. It can be configured to generate an interrupt causing the MCU
to exit stop or wait mode. It can be configured as pulse width modulator (PWM) channel 0 output. It can
be configured as master input (during master mode) or slave output (during slave mode) pin MISO of the
serial peripheral interface 1 (SPI1).
1.2.3.56PS7 / SS0 — Port S I/O Pin 7
PS7 is a general-purpose input or output pin. It can be configured as the slave select pin SS of the serial
peripheral interface 0 (SPI0).
1.2.3.57PS6 / SCK0 — Port S I/O Pin 6
PS6 is a general-purpose input or output pin. It can be configured as the serial clock pin SCK of the serial
peripheral interface 0 (SPI0).
1.2.3.58PS5 / MOSI0 — Port S I/O Pin 5
PS5 is a general-purpose input or output pin. It can be configured as master output (during master mode)
or slave input pin (during slave mode) MOSI of the serial peripheral interface 0 (SPI0).
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor87
Chapter 1 Device Overview (MC9S12XDP512V2)
1.2.3.59PS4 / MISO0 — Port S I/O Pin 4
PS4 is a general-purpose input or output pin. It can be configured as master input (during master mode) or
slave output pin (during slave mode) MOSI of the serial peripheral interface 0 (SPI0).
1.2.3.60PS3 / TXD1 — Port S I/O Pin 3
PS3 is a general-purpose input or output pin. It can be configured as the transmit pin TXD of serial
communication interface 1 (SCI1).
1.2.3.61PS2 / RXD1 — Port S I/O Pin 2
PS2 is a general-purpose input or output pin. It can be configured as the receive pin RXD of serial
communication interface 1 (SCI1).
1.2.3.62PS1 / TXD0 — Port S I/O Pin 1
PS1 is a general-purpose input or output pin. It can be configured as the transmit pin TXD of serial
communication interface 0 (SCI0).
1.2.3.63PS0 / RXD0 — Port S I/O Pin 0
PS0 is a general-purpose input or output pin. It can be configured as the receive pin RXD of serial
communication interface 0 (SCI0).
1.2.3.64PT[7:0] / IOC[7:0] — Port T I/O Pins [7:0]
PT[7:0] are general-purpose input or output pins. They can be configured as input capture or output
compare pins IOC[7:0] of the enhanced capture timer (ECT).
1.2.4Power Supply Pins
MC9S12XDP512 power and ground pins are described below.
NOTE
All V
1.2.4.1V
DDX1
External power and ground for I/O drivers. Because fast signal transitions place high, short-duration
current demands on the power supply, use bypass capacitors with high-frequency characteristics and place
them as close to the MCU as possible. Bypass requirements depend on how heavily the MCU pins are
loaded.
pins must be connected together in the application.
SS
, V
DDX2
, V
SSX1,VSSX2
— Power and Ground Pins for I/O Drivers
MC9S12XDP512 Data Sheet, Rev. 2.11
88Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
1.2.4.2V
DDR1
, V
DDR2
, V
SSR1
, V
— Power and Ground Pins for I/O Drivers
SSR2
and for Internal Voltage Regulator
External power and ground for I/O drivers and input to the internal voltage regulator. Because fast signal
transitions place high, short-duration current demands on the power supply, use bypass capacitors with
high-frequency characteristics and place them as close to the MCU as possible. Bypass requirements
depend on how heavily the MCU pins are loaded.
1.2.4.3V
Power is supplied to the MCU through VDD and VSS. Because fast signal transitions place high,
short-duration current demands on the power supply, use bypass capacitors with high-frequency
characteristics and place them as close to the MCU as possible. This 2.5-V supply is derived from the
internal voltage regulator. There is no static load on those pins allowed. The internal voltage regulator is
turned off, if V
1.2.4.4V
V
DDA,VSSA
converters.
are the powersupply and ground input pins for the voltage regulator and the analog-to-digital
, V
DD1
REGEN
DD2
, V
SS1
, V
is tied to ground.
— Core Power Pins
SS2
NOTE
No load allowed except for bypass capacitors.
DDA
, V
— Power Supply Pins for ATD and V
SSA
REG
1.2.4.5VRH, VRL — ATD Reference Voltage Input Pins
VRH and VRL are the reference voltage input pins for the analog-to-digital converter.
1.2.4.6V
DDPLL
Provides operating voltage and ground for the oscillator and the phased-locked loop. This allows the
supply voltage to the oscillator and PLL to be bypassed independently. This 2.5-V voltage is generated by
the internal voltage regulator.
No load allowed except for bypass capacitors.
1.2.4.7V
REGEN
Enables the internal 5 V to 2.5 V voltage regulator. If this pin is tied low, V
supplied externally.
, V
SSPLL
— Power Supply Pins for PLL
NOTE
— On--Chip Voltage Regulator Enable
DD1,2
and V
DDPLL
must be
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor89
Chapter 1 Device Overview (MC9S12XDP512V2)
Table 1-4. MC9S12XDP512 Power and Ground Connection Summary
Pin Number
Mnemonic
144-Pin
LQFP
112-Pin
LQFP
80-Pin
QFP
Nominal
Voltage
Description
V
DD1, 2
V
SS1, 2
V
DDR1
V
SSR1
V
DDX1
V
SSX1
V
DDX2
V
SSX2
V
DDR2
V
SSR2
V
DDA
V
SSA
V
V
V
DDPLL
V
SSPLL
RL
RH
15, 8713, 659, 492.5 VInternal power and ground generated by
16, 8814, 6610, 500V
internal regulator
5341295.0 VExternal power and ground, supply to pin
5240280 V
drivers and internal voltage regulator
139107775.0 VExternal power and ground, supply to pin
138106760 V
drivers
26N.A.N.A.5.0 VExternal power and ground, supply to pin
27N.A.N.A.0 V
drivers
82N.A.N.A.5.0 VExternal power and ground, supply to pin
81N.A.N.A.0 V
drivers
10783595.0 VOperating voltage and ground for the
11086620 V
analog-to-digital converters and the
reference for the internal voltage regulator,
allows the supply voltage to the A/D to be
bypassed independently.
10985610 VReference voltages for the analog-to-digital
10884605.0 V
converter.
5543312.5 VProvides operating voltage and ground for
5745330 V
the phased-locked loop. This allows the
supply voltage to the PLL to be bypassed
independently. Internal power and ground
generated by internal regulator.
V
REGEN
12797N.A.5VInternal voltage regulator enable/disable
MC9S12XDP512 Data Sheet, Rev. 2.11
90Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
1.3System Clock Description
The clock and reset generator module (CRG) provides the internal clock signals for the core and all
peripheral modules. Figure 1-12 shows the clock connections from the CRG to all modules.
Consult the CRG Block User Guide for details on clock generation.
SCI0 . . SCI 5
CAN0 . . CAN4
SPI0 . . SPI2
IIC0 & IIC1
Bus Clock
ATD0 & ATD1
PIT
EXTAL
CRG
XTAL
Core Clock
RAMS12XXGATEEEPROMFLASH
Figure 1-12. Clock Connections
Oscillator Clock
ECT
PIM
The MCU’ssystemclock can besupplied in severalwaysenablinga range of system operating frequencies
to be supported:
•The on-chip phase locked loop (PLL)
•the PLL self clocking
•the oscillator
The clock generated by the PLL or oscillator provides the main system clock frequencies core clock and
bus clock. As shown in Figure 1-12, this system clocks are used throughout the MCU to drive the core, the
memories, and the peripherals.
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor91
Chapter 1 Device Overview (MC9S12XDP512V2)
The program Flash memory and the EEPROM are supplied by the bus clock and the oscillator clock.The
oscillator clock is used as a time base to derive the program and erase times for the NVM’s. Consult the
FTX512k4 Block Guide and the EETX4K Block Guide for more details on the operation of the NVM’s.
The CAN modules may be configured to have their clock sources derived either from the bus clock or
directly from the oscillator clock. This allows the user to select its clock based on the required jitter
performance. Consult MSCAN block description for more details on the operation and configuration of
the CAN blocks.
In order to ensure the presence of the clock the MCU includes an on-chip clock monitor connected to the
output of the oscillator. The clock monitor can be configured to invoke the PLL self-clocking mode or to
generate a system reset if it is allowed to time out as a result of no oscillator clock being present.
In addition to the clock monitor, the MCU also provides a clock quality checker which performs a more
accurate check of the clock. The clock quality checker counts a predetermined number of clock edges
within a defined time window to insure that the clock is running. The checker can be invoked following
specific events such as on wake-up or clock monitor failure.
1.4Chip Configuration Summary
The MCU can operate in six different modes. The different modes, the state of ROMCTL and EROMCTL
signal on rising edge of
characteristics:
RESET, and the security state of the MCU affects the following device
•External bus interface configuration
•Flash in memory map, or not
•Debug features enabled or disabled
The operating mode out of reset is determined by the states of the MODC, MODB, and MODA signals
during reset (see Table 1-5). The MODC, MODB, and MODA bits in the MODE register showthe current
operating mode and provide limited mode switching during operation. The states of the MODC, MODB,
and MODA signals are latched into these bits on the rising edge of
RESET.
In normal expanded mode and in emulation modes the ROMON bit and the EROMON bit in the
MMCCTL1 register defines if the on chip flash memory is the memory map, or not. (See Table 1-5.) For
a detailed description of the ROMON and EROMON bits refer to the S12X_MMC Block Guide.
The state of the ROMCTL signal is latched into the ROMON bit in the MMCCTL1 register on the rising
edge of
on the rising edge of
RESET. The state of the EROMCTL signal is latched into the EROMON bit in the MISC register
RESET.
MC9S12XDP512 Data Sheet, Rev. 2.11
92Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
Table 1-5. Chip Modes and Data Sources
Chip Modes
Normal single chip100XXInternal
Special single chip000
Emulation single chip001X0Emulation memory
Normal expanded1010XExternal application
Emulation expanded0110XExternal application
Special test0100XExternal application
1
Internal means resources inside the MCU are read/written.
Internal Flash means Flash resources inside the MCU are read/written.
Emulation memory means resources inside the emulator are read/written (PRU registers, Flash replacement, RAM, EEPROM,
and register space are always considered internal).
External application means resources residing outside the MCU are read/written.
BKGD =
MODC
PE6 =
MODB
PE5 =
MODA
PK7 =
ROMCTL
X1Internal Flash
1XInternal Flash
10Emulation memory
11Internal Flash
1XInternal Flash
PE3 =
EROMCTL
Data Source
1
The configuration of the oscillator can be selected using the XCLKS signal (see Table 1-6). For a detailed
description please refer to the CRG Block Guide.
Table 1-6. Clock Selection Based on PE7
PE7 = XCLKSDescription
0Full swing Pierce oscillator or external clock source selected
1Loop controlled Pierce oscillator selected
The logic level on the voltage regulator enable pin V
regulator is enabled or disabled (see Table 1-7).
Table 1-7. Voltage Regulator VREGEN
V
REGEN
1Internal voltage regulator enabled
0Internal voltage regulator disabled, V
supplied externally
REGEN
Description
determines whether the on-chip voltage
DD1,2
and V
DDPLL
must be
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor93
Chapter 1 Device Overview (MC9S12XDP512V2)
1.5Modes of Operation
1.5.1User Modes
1.5.1.1Normal Expanded Mode
Ports K, A, and B are configured as a 23-bit address bus, ports C and D are configured as a 16-bit data bus,
and port E provides bus control and status signals. This mode allows 16-bit external memory and
peripheral devices to be interfaced to the system. The fastest external bus rate is divide by 2 from the
internal bus rate.
1.5.1.2Normal Single-Chip Mode
There is no external bus in this mode. The processor program is executed from internal memory. Ports A,
B,C,D, K, and most pins of port E are available as general-purpose I/O.
1.5.1.3Special Single-Chip Mode
This mode is used for debugging single-chip operation, boot-strapping, or security related operations. The
background debug module BDM is active in this mode. The CPU executes a monitor program located in
an on-chip ROM. BDM firmware is waiting for additional serial commands through the BKGD pin. There
is no external bus after reset in this mode.
1.5.1.4Emulation of Expanded Mode
Developers use this mode for emulation systems in which the users target application is normal expanded
mode. Code is executed from external memory or from internal memory depending on the state of
ROMON and EROMON bit. In this mode the internal operation is visible on external bus interface.
1.5.1.5Emulation of Single-Chip Mode
Developers use this mode for emulation systems in which the user’s target application is normal
single-chipmode. Code is executedfrom external memory or from internal memory depending on the state
of ROMON and EROMON bit. In this mode the internal operation is visible on external bus interface.
1.5.1.6Special Test Mode
Freescale internal use only.
1.5.2Low-Power Modes
The microcontroller features two main low-power modes. Consult the respective Block Guide for
information on the module behavior in system stop, system pseudo stop, and system wait mode. An
important source of information about the clock system is the Clock and Reset Generator Block Guide
(CRG).
MC9S12XDP512 Data Sheet, Rev. 2.11
94Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
1.5.2.1System Stop Modes
The system stop modes are entered if the CPU executes the STOP instruction and the XGATE doesn’t
execute a thread and the XGFACT bit in the XGMCTL register is cleared. Depending on the state of the
PSTP bit in the CLKSEL register the MCU goes into pseudo stop mode or full stop mode. Please refer to
CRG Block Guide. Asserting
RESET, XIRQ, IRQ or any other interrupt ends the system stop modes.
1.5.2.2Pseudo Stop Mode
In this mode the clocks are stopped but the oscillator is still running and the real time interrupt (RTI) or
watchdog (COP) submodule can stay active. Other peripherals are turned off. This mode consumes more
current than the system stop mode, but the wake up time from this mode is significantly shorter.
1.5.2.3Full Stop Mode
The oscillator is stopped in this mode. All clocks are switched off. All counters and dividers remain frozen.
1.5.2.4System Wait Mode
This mode is entered when the CPU executes the WAI instruction. In this mode the CPU will not execute
instructions. The internal CPU clock is switched off. All peripherals and the XGATE can be active in
system wait mode. For further power consumption the peripherals can individually turn off their local
clocks. Asserting
mode.
RESET, XIRQ, IRQ or any other interrupt that has not been masked ends system wait
1.5.3Freeze Mode
The enhanced capture timer, pulse width modulator, analog-to-digital converters, the periodic interrupt
timer and the XGATE module provide a software programmable option to freeze the module status during
the background debug module is active. This is useful when debugging application software. For detailed
description of the behaviorof the ATD0, ATD1, ECT,PWM,XGATE and PITwhen the background debug
module is active consult the corresponding Block Guides.
1.6Resets and Interrupts
Consult the S12XCPU Block Guide for information on exception processing.
1.6.1Vectors
Table 1-8 lists all interrupt sources and vectors in the default order of priority. The interrupt module
(S12XINT) provides an interrupt vector base register (IVBR) to relocate the vectors. Associated with each
I-bit maskable service request is a configuration register. It selects if the service request is enabled, the
service request priority level and whether the service request is handled either by the S12X CPU or by the
XGATE module.
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor95
Chapter 1 Device Overview (MC9S12XDP512V2)
Table 1-8. Interrupt Vector Locations (Sheet 1 of 3)
Vector Address
1
XGATE
Channel ID
2
Interrupt Source
CCR
Mask
Local Enable
$FFFE—System reset or illegal access resetNoneNone
$FFFC—Clock monitor resetNonePLLCTL (CME, SCME)
$FFFA—COP watchdog resetNoneCOP rate select
Vector base + $F8—Unimplemented instruction trapNoneNone
Vector base+ $F6—SWINoneNone
Vector base+ $F4—
Vector base+ $F2—
XIRQX BitNone
IRQI bitIRQCR (IRQEN)
Vector base+ $F0$78Real time interruptI bitCRGINT (RTIE)
Vector base + $80$40Low-voltage interrupt (LVI)I bitVREGCTRL (LVIE)
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor97
Chapter 1 Device Overview (MC9S12XDP512V2)
Table 1-8. Interrupt Vector Locations (Sheet 3 of 3)
Vector Address
Vector base + $7E$3FAutonomous periodical interrupt (API)I bitVREGAPICTRL (APIE)
Vector base + $7C$3EReserved
Vector base + $7A$3DPeriodic interrupt timer channel 0I bitPITINTE (PINTE0)
Vector base + $78$3CPeriodic interrupt timer channel 1I bitPITINTE (PINTE1)
Vector base + $76$3BPeriodic interrupt timer channel 2I bitPITINTE (PINTE2)
Vector base + $74$3APeriodic interrupt timer channel 3I bitPITINTE (PINTE3)
Vector base + $72$39XGATE software trigger 0I bit XGMCTL (XGIE)
Vector base + $70$38XGATE software trigger 1I bit XGMCTL (XGIE)
Vector base + $6E$37XGATE software trigger 2I bit XGMCTL (XGIE)
Vector base + $6C$36XGATE software trigger 3I bitXGMCTL (XGIE)
Vector base + $6A$35XGATE software trigger 4I bit XGMCTL (XGIE)
Vector base + $68$34XGATE software trigger 5I bit XGMCTL (XGIE)
Vector base + $66$33XGATE software trigger 6I bit XGMCTL (XGIE)
Vector base + $64$32XGATE software trigger 7I bit XGMCTL (XGIE)
Vector base + $62—XGATE software error interruptI bit XGMCTL (XGIE)
Vector base + $60—S12XCPU RAM access violationI bitRAMWPC (AVIE)
Vector base+ $12
to
Vector base + $5E
1
XGATE
Channel ID
2
Interrupt Source
Reserved
CCR
Mask
Local Enable
Vector base + $10—Spurious interrupt—None
1
16 bits vector address based
2
For detailed description of XGATE channel ID refer to XGATE Block Guide
1.6.2Effects of Reset
When a reset occurs, MCU registers and control bits are changed to known start-up states. Refer to the
respective module Block Guides for register reset states.
1.6.2.1I/O Pins
Refer to the PIM Block Guide for reset configurations of all peripheral module ports.
1.6.2.2Memory
The RAM array is not initialized out of reset.
MC9S12XDP512 Data Sheet, Rev. 2.11
98Freescale Semiconductor
Chapter 1 Device Overview (MC9S12XDP512V2)
1.7COP Configuration
The COP timeout rate bits CR[2:0] and the WCOP bit in the COPCTL register are loaded on rising edge
RESET from the Flash control register FCTL ($0107) located in the Flash EEPROM block. See
of
Table 1-9 and Table 1-10 for coding. The FCTL register is loaded from the Flash configuration field byte
at global address $7FFF0E during the reset sequence
NOTE
If the MCU is secured the COP timeout rate is always set to the longest
period (CR[2:0] = 111) after COP reset.
Table 1-9. Initial COP Rate Configuration
NV[2:0] in
FCTL Register
000111
001110
010101
011100
100011
101010
110001
111000
Table 1-10. Initial WCOP Configuration
NV[3] in
FCTL Register
10
01
CR[2:0] in
COPCTL Register
WCOP in
COPCTL Register
1.8ATD0 External Trigger Input Connection
The ATD_10B8C module includes four external trigger inputs ETRIG0, ETRIG1, ETRIG, and ETRIG3.
The external trigger allows the user to synchronize ATD conversion to external trigger events. Table 1-11
shows the connection of the external trigger inputs on MC9S12XDP512.
Table 1-11. ATD0 External Trigger Sources
External Trigger
Input
ETRIG0Pulse width modulator channel 1
ETRIG1Pulse width modulator channel 3
ETRIG2Periodic interrupt timer hardware trigger 0
ETRIG3Periodic interrupt timer hardware trigger 1
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor99
Connectivity
Chapter 1 Device Overview (MC9S12XDP512V2)
Consult the ATD_10B8C Block Guide for information about the analog-to-digital converter module.
When the ATD_10B8C Block Guide refers to freeze mode this is equivalent to active BDM mode.
1.9ATD1 External Trigger Input Connection
The ATD_10B16C module includes four external trigger inputs ETRIG0, ETRIG1, ETRIG, and ETRIG3.
The external trigger feature allows the user to synchronize ATD conversion to external trigger events.
Table 1-12 shows the connection of the external trigger inputs on MC9S12XDP512.
Table 1-12. ATD1 External Trigger Sources
External Trigger
Input
ETRIG0Pulse width modulator channel 1
ETRIG1Pulse width modulator channel 3
ETRIG2Periodic interrupt timer hardware trigger 0
ETRIG3Periodic interrupt timer hardware trigger 1
Connectivity
Consult the ATD_10B16C Block Guide for information about the analog-to-digital converter module.
When the ATD_10B16C Block Guide refers to freeze mode this is equivalent to active BDM mode.
MC9S12XDP512 Data Sheet, Rev. 2.11
100Freescale Semiconductor
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.