MC9S12XHY256
Reference Manual
Covers MC9S12XHY Family
Data Sheet: Advance Information
This document contains information on a new product. Specifications and information here in are subject to change without notice.
S12
Microcontrollers
MC9S12XHY256RMV1
Rev. 1.01
03/2011
freescale.com
Downloaded from Elcodis.comelectronic components distributor
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/
A full list of family members and options is included in the appendices.
The following revision history table summarizes changes contained in this document.
This document contains information for all constituent modules, with the exception of the CPU. For CPU
information please refer to CPU12-1 in the CPU12 & CPU12X Reference Manual.
Revision History
Date
Jun,3,20100.11
Jun,11,20100.12
Mar,25,20111.01
Revision
Level
Description
update block: TIM SCI PIM Chapter1
update Table A-6., “5-V I/O Characteristics, item 11/12,unit is KΩ and uA
update A.1.10.1, “Typical Run Current Measurement Conditions
update Table A-6., “5-V I/O Characteristics, 4(a) , remove V C contitions
update Table A-6., “5-V I/O Characteristics,4(b), remove temperature
update Table A-10., “Run and Wait Current Characteristics, remove item
update Table A-11., “Pseudo Stop and Full Stop Current,
-10a/10b/11/12/13/14,remove temperature except -40/25/150
-15, change to FSP mode
remove Typeical Run supply table
update Table A-11., “Pseudo Stopand Full Stop Current, add LCP FSP mode
Table A-11., “Pseudo Stop and Full Stop Current,10a,11a,12a,14,15
-Table A-4./A-721 LCD/Motor Driver pad can only be work under >4.5V
-A.1.3.1/A-718, change to 4.5v to 5.5v
-remove 12 bit resolution at table Table A-12./A-731
update chapter MMC to Ver04.11 3.1/3-157
update chapter MSCAN to Ver03.12
update Table D-2./D-768,all parts has 2x CAN and SCI
update Appendix electrical parameter value
Table A-11., “Pseudo Stop and Full Stop Current,
Table A-9., “Module Run Supply Currents
Table A-6., “5-V I/O Characteristics, item 4b
update Appendix, change classifications or conditions
Table A-6., “5-V I/O Characteristics, item 4b, change from 80c to 150c
Table A-11., “Pseudo Stop and Full Stop Current,item 11b,change from P to C
fix typo Table A-6., “5-V I/O Characteristics, 11 and 12, resistance not current
Downloaded from Elcodis.comelectronic components distributor
How to Reach Us:
USA/Europe/Locations not listed:
Freescale Semiconductor Literature Distribution
P.O. Box 5405, Denver, Colorado 80217
1-800-521-6274 or 480-768-2130
Japan:
Freescale Semiconductor Japan Ltd.
SPS, Technical Information Center
3-20-1, Minami-Azabu
Minato-ku
Tokyo 106-8573, Japan
81-3-3440-3569
Asia/Pacific:
Freescale Semiconductor H.K. Ltd.
2 Dai King Street
Tai Po Industrial Estate
Tai Po, N.T. Hong Kong
852-26668334
Learn More:
For more information about Freescale
Semiconductor products, please visit
http://www.freescale.com
Information in this document is provided solely to enable system and software implementers to use
Freescale Semiconductor products. There are no express or implied copyright licenses granted
hereundertodesignor fabricateany integrated circuitsor integratedcircuits basedon theinformation
in this document.
FreescaleSemiconductor reserves the right to make changes without further notice to any products
herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the
suitability of its products for any particular purpose,nor does Freescale Semiconductor assume any
liability arising out of the application or use of any product or circuit, and specifically disclaims any
andall liability,includingwithout limitation consequential or incidental damages. “Typical”parameters
which may be provided in Freescale Semiconductor data sheets and/or specifications can and do
vary in different applications and actual performance may vary over time. All operating parameters,
including “Typicals”must be validated foreach customer application by customer’stechnical experts.
FreescaleSemiconductor does not conveyanylicense under itspatent rights northe rights of others.
FreescaleSemiconductor productsare not designed,intended, or authorizedfor useas components
in systems intended for surgical implant into the body, or other applications intended to support or
sustain life, or for any other application in which the failure of the Freescale Semiconductor product
could create a situation where personal injury or death may occur. Should Buyer purchase or use
FreescaleSemiconductor products forany such unintended or unauthorized application, Buyer shall
indemnifyand hold Freescale Semiconductor and its officers,employees,subsidiaries, affiliates,and
distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney
fees arising out of, directly or indirectly, any claim of personal injury or death associated with such
unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was
negligent regarding the design or manufacture of the part.
Downloaded from Elcodis.comelectronic components distributor
Chapter 1
Device Overview MC9S12XHY-Family
1.1Introduction
The MC9S12XHY family is an optimized, automotive, 16-bit microcontroller product line that is
specifically designed for entry level instrument clusters. This family also services generic automotive
applications requiring CAN, LCD, Motor driver control or LIN/SAE J2602. Typical examples of these
applications include instrument clusters for automobiles and 2 or 3 wheelers, HVAC displays, general
purpose motor control and body controllers.
The MC9S12XHY family uses many of the same features found on the MC9S12XS family and
MC9S12HY/HA family, including error correction code (ECC) on flash memory, a separate data-flash
module for diagnostic or data storage, a fast analog-to-digital converter (ATD) and a frequency modulated
phase locked loop (IPLL) that improves the EMC performance. The MC9S12XHY family features a 40x4
liquid crystal display (LCD) controller/driver and a motor pulse width modulator (MC) consisting of up to
16 high current outputs. The device is capable of stepper motor stall detection (SSD) via hardware or
software, please contact Freescale sales office for detailed information on software SSD.
The MC9S12XHY family deliver all the advantages and efficiencies of a 16-bit MCU while retaining the
low cost, power consumption, EMC, and code-size efficiency advantages currently enjoyed by users of
Freescale’s existing 8-bit and 16-bit MCU families. Like the MC9S12HY/HA family, the MC9S12XHY
family run 16-bit wide accesses without wait states for all peripherals and memories. The MC9S12XHY
family is available in 112-pin LQFP and 100-pin LQFP package options. In addition to the I/O ports
available in each module, further I/O ports are available with interrupt capability allowing wake-up from
stop or wait modes.
1.2Features
This section describes the key features of the MC9S12XHY family.
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor13
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.2.1MC9S12XHY Family Comparison
Table 1-1 provides a summary of different members of the MC9S12XHY family and their proposed
features. This information is intended to provide an understanding of the range of functionality offered by
this microcontroller family.
Table 1-1. MC9S12XHY Family
Feature
CPU
Flash memory
(ECC)
Data flash (ECC)
RAM
Pin Quantity
CAN
SCI
SPI
IIC
Timer 0
Timer 1
PWM
ADC (10-bit)
Stepper Motor
Controller
MC9S12XHY128MC9S12XHY256
HCS12X V1
128Kbytes256 Kbytes
8 Kbytes
8 Kbytes12kbyte
100112100112
2
2
1
1
8 ch x 16-bit
8 ch x 16-bit
8 ch x 8-bit or 4ch x16-bit
8 ch12ch8ch12 ch
4
Stepper Stall
Detecter
LCD Driver
(FPxBP)
Key Wakeup Pins
Frequency Modulated PLL
External osc
(4–16 MHz Pierce
with loop control)
14Freescale Semiconductor
38x440x438x440x4
23252325
MC9S12XHY-Family Reference Manual, Rev. 1.01
4
Yes
Yes
Downloaded from Elcodis.comelectronic components distributor
Table 1-1. MC9S12XHY Family
Device Overview MC9S12XHY-Family
Feature
Internal 1 MHz RC
osc
Supply voltage
RTI, LVI, CRG,
RST, COP, DBG,
POR, API
Execution speed
MC9S12XHY128MC9S12XHY256
No
4.5 V – 5.5 V
Yes
Static-40MHz
1.2.2Chip-Level Features
On-chip modules available within the family include the following features:
•CPU12XV1 CPU core
•Up to 256 Kbyte on-chip flash with ECC
•8Kbyte data flash with ECC
•Up to 12Kbyte on-chip SRAM
•Phase locked loop (IPLL) frequency multiplier with internal filter
•4–16 MHz amplitude controlled Pierce oscillator
•Two timer modules (TIM0 and TIM1) supporting input/output channels that provide a range of 16bit input capture, output compare, counter and pulse accumulator functions
•Pulse width modulation (PWM) module with up to 8 x 8-bit channels
•Up to 12-channel, 10-bit resolution successive approximation analog-to-digital converter (ATD)
•Up to 40x4 LCD driver
•PWM motor controller (MC) with up to 16 high current drivers
•Output slew rate control on Motor driver pad
•One serial peripheral interface (SPI) module
•One Inter-IC bus interface (IIC) module
•Two serial communication interface (SCI) module supporting LIN communications
•Two multi-scalable controller area network (MSCAN) module (supporting CAN protocol 2.0A/B)
•On-chip voltage regulator (VREG) for regulation of input supply and all internal voltages
•Autonomous periodic interrupt (API)
•Stepper Motor Controller with up to drivers for up to 4 motors
•Four Stepper Stall Detector modules (one for each motor)
•Up to 25 key wakup inputs
1.3Module Features
The following sections provide more details of the modules implemented on the MC9S12XHY family.
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor15
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.3.1S12 16-Bit Central Processor Unit (CPU)
The CPU12X is a high-speed, 16-bit processing unit that has a programming model identical to that of the
industry standard M68HC11 central processor unit (CPU).
•Upward compatible with S12 instruction set, with the exception of five Fuzzy instructions (MEM,
WAV, WAVR, REV, REVW) which have been removed
•Enhanced indexed addressing
•Access to large data segments independent of PPAGE
1.3.2On-Chip Flash with ECC
On-chip flash memory on the MC9S12XHY features the following:
•Up to 256Kbyte of program flash memory
— 64data bits plus 8 syndrome ECC (error correction code) bits allow single bit error correction
and double fault bit detection
— Erase sector size 1024bytes
— Automated program and erase algorithm
— Protection scheme to prevent accidental program or erase
— Security option to prevent unauthorized access
— Sense-amp margin level setting for reads
•8Kbyte data flash space
— 16 data bits plus 6 syndrome ECC (error correction code) bits allow single bit error correction
and double fault detection
— Erase sector size 256 bytes
— Automated program and erase algorithm
—
1.3.3On-Chip SRAM
•Up to 12Kbytes of general-purpose RAM
1.3.4Main External Oscillator (XOSC)
•Loop control Pierce oscillator using a 4 MHz to 16 MHz crystal
— Current gain control on amplitude output
— Signal with low harmonic distortion
— Low power
— Good noise immunity
— Eliminates need for external current limiting resistor
— Transconductance sized for optimum start-up margin for typical crystals
MC9S12XHY-Family Reference Manual, Rev. 1.01
16Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
1.3.5Internal Phase-Locked Loop (IPLL)
•Phase-locked-loop clock frequency multiplier
— No external components required
— Reference divider and multiplier allow large variety of clock rates
— Automatic bandwidth control mode for low-jitter operation
— Automatic frequency lock detector
— Configurable option to spread spectrum for reduced EMC radiation (frequency modulation)
–
1.3.6Clocks and reset generation(CRG)
•COP watchdog
• Real time interrupt
• Clock monitor
• Fast wake up from STOP in self clock mode
1.3.7System Integrity Support
Device Overview MC9S12XHY-Family
•Power-on reset (POR)
•System reset generation
•Illegal address detection with reset
•Low-voltage detection with interrupt or reset
•Real time interrupt (RTI)
•Computer operating properly (COP) watchdog
— Configurable as window COP for enhanced failure detection
— Initialized out of reset using option bits located in flash memory
•Clock monitor supervising the correct function of the oscillator
•Temperature sensor
1.3.8Timer (TIM0)
•8x 16-bit channels for input capture
•8x 16-bit channels for output compare
•16-bit free-running counter with 8-bit precision prescaler
•1 x 16-bit pulse accumulator
1.3.9Timer (TIM1)
•8x 16-bit channels for input capture
•8x 16-bit channels for output compare
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor17
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
•16-bit free-running counter with 8-bit precision prescaler
•1 x 16-bit pulse accumulator
1.3.10Liquid crystal display driver (LCD)
•Configurable for up to 40 frontplanes and 4 backplanes or general-purpose input or output
•5 modes of operation allow for different display sizes to meet application requirements
•Unused frontplane and backplane pins can be used as general-purpose I/O
1.3.11Motor Controller (MC)
•PWM motor controller (MC) with up to 16 high current drivers
•Each PWM channel switchable between two drivers in an H-bridge configuration
•Left, right and center aligned outputs
•Support for sine and cosine drive
•Dithering
•Output slew rate control
1.3.12Pulse Width Modulation Module (PWM)
•8channel x 8-bit or 4channel x 16-bit pulse width modulator
— Programmable period and duty cycle per channel
— Center-aligned or left-aligned outputs
— Programmable clock select logic with a wide range of frequencies
1.3.13Inter-IC bus Module (IIC)
•1 Inter-IC (IIC) bus module which has following feature
— Multi-master operation
— Soft programming for one of 256 different serial clock frequencies
— General Call(Broadcast) mode support
— 10-bit address support
1.3.14Controller Area Network Module (MSCAN)
•1 Mbit per second, CAN 2.0 A, B software compatible
— Standard and extended data frames
— 0–8 bytes data length
— Programmable bit rate up to 1 Mbps
•Five receive buffers with FIFO storage scheme
•Three transmit buffers with internal prioritization
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
— 2 x 32-bit
— 4 x 16-bit
— 8 x 8-bit
•Wakeup with integrated low pass filter option
•Loop back for self test
•Listen-only mode to monitor CAN bus
•Bus-off recovery by software intervention or automatically
•16-bit time stamp of transmitted/received messages
1.3.15Serial Communication Interface Module (SCI)
•Full-duplex or single-wire operation
•Standard mark/space non-return-to-zero (NRZ) format
•Selectable IrDA 1.4 return-to-zero-inverted (RZI) format with programmable pulse widths
•13-bit baud rate selection
•Programmable character length
•Programmable polarity for transmitter and receiver
•Active edge receive wakeup
•Break detect and transmit collision detect supporting LIN
1.3.16Serial Peripheral Interface Module (SPI)
•Configurable 8- or 16-bit data size
•Full-duplex or single-wire bidirectional
•Double-buffered transmit and receive
•Master or slave mode
•MSB-first or LSB-first shifting
•Serial clock phase and polarity options
1.3.17Analog-to-Digital Converter Module (ATD)
•Up to 12-channel, 10-bit analog-to-digital converter
— 3 us single conversion time
— 8-/10 bit resolution
— Left or right justified result data
— Internal oscillator for conversion in stop modes
— Wakeup from low power modes on analog comparison > or <= match
— Continuous conversion mode
— Multiple channel scans
•Pins can also be used as digital I/O
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor19
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.3.18On-Chip Voltage Regulator (VREG)
•Linear voltage regulator with bandgap reference
•Low-voltage detect (LVD) with low-voltage interrupt (LVI)
•Power-on reset (POR) circuit
•Low-voltage reset (LVR)
1.3.19Background Debug (BDM)
•Background debug module (BDM) with single-wire interface
•Non-intrusive memory access commands
•Supports in-circuit programming of on-chip nonvolatile memory
1.3.20Debugger (DBG)
•Three comparators A, B, C, and D to monitor CPU buses
•Trace buffer with depth of 64 entries
•Comparator A and C compares full address bus and 16-bit data bus with mask register
•Three modes: simple address/data match, inside address range, or outside address range
1.3.21SSD
•Programmable Full Step State
•Programmable Integration polarity
•Blanking (recirculation) state
•16-bit Integration Accumulator register
•16-Bit Modulus Down Counter with interrupt
•Multiplex two stepper motors
1.3.22INT (interrupt module)
• Seven levels of nested interrupts
• Flexible assignment of interrupt sources to each interrupt level.
• External non-maskable high priority interrupt (XIRQ)
• The following inputs can act as Wake-up Interrupts
— IRQ and non-maskable XIRQ
— CAN receive pins
— SCI receive pins
— Depending on the package option up to 25 pins on ports R, S, T and AD, configurable as rising
or falling edge sensitive
•
MC9S12XHY-Family Reference Manual, Rev. 1.01
20Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor21
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.4Block Diagram
Figure 1-1 shows a block diagram of the MC9S12XHY-Family devices
Reserved register space shown in Table 1-2 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.
Figure 1-2 shows MC9S12XHY family CPU and BDM local address translation to the global memory
map. It indicates also the location of the internal resources in the memory map.
Accessing the reserved area in the range of 0x0C00 to 0x0FFF will return undefined data values.
A CPU access to any unimplemented space causes an illegal address reset.
The range between 0x10_0000 and 0x13_FFFF is mapped to DFLASH (Data Flash). The DFLASH block
sizes are listed in Table 1-3.
MC9S12XHY-Family Reference Manual, Rev. 1.01
24Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
Table 1-3. Derivative Dependent Memory Parameters of Device Internal Resources
1. Number of 16K pages addressable via PPAGE register
2. Number of 4K pages addressing the RAM.
3. Number of 1K pages addressing the DFLASH
SIZE/
EPAGE
(3)
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor25
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
Figure 1-2. MC9S12XHY-Family Global Memory Map
CPU and BDM
Local Memory Map
0x0000
0x0800
0x0C00
0x1000
0x2000
0x4000
2K REGISTERS
1K DFLASH window
4K RAM window
Reserved
8K RAM
Unpaged
16K FLASH
EPAGE
RPAGE
0x00_0000
0x00_07FF
RAM_LOW
0x0F_FFFF
DF_HIGH
0x13_FFFF
2K REGISTERS
Unimplemented
RAM
RAM
RAMSIZE
DFLASH
DFLASH
Resources
0x8000
0xC000
0xFFFF
16K FLASH window
Unpaged
16K FLASH
Vectors
PPAGE
Unimplemented
Space
0x3F_FFFF
Unimplemented
FLASH
FLASH_LOW
FLASH
FLASHSIZE
0x7F_FFFF
MC9S12XHY-Family Reference Manual, Rev. 1.01
26Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
NOTE
MC9S12XHY-Family memory map is difference with MCU9S12HY64
Family device
1.6Part ID Assignments
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-4 shows the assigned part ID
number and Mask Set number.
The Version ID in Table 1-4. is a word located in a flash information row at address 0x40_00E8. The
version ID number indicates a specific version of internal NVM controller.
Bit 15-12: Major family identifier
Bit 11-6: Minor family identifier
Bit 5-4: Major mask set revision number including FAB transfers
Bit 3-0: Minor — non full — mask set revision
(1)
Version ID
1.7Signal 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
individual IP blocks on the device.
1.7.1Device Pinout
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor27
Downloaded from Elcodis.comelectronic components distributor
Downloaded from Elcodis.comelectronic components distributor
FP1 /PWM1 /PP1
FP2 /PWM2 /PP2
FP3 /PWM3 /PP3
FP4 /PWM4 /PP4
FP5 /PWM5 /PP5
FP6 /PWM6 /PP6
FP7 /PWM7 /PP7
TXD0 /PWM7 /PS1
RXD0 /PWM6 /PS0
KWS3 /TXCAN0 /PWM5 /PS3
KWS2 /RXCAN0 /PWM4 /PS2
KWR0 /RXCAN1 /IOC0_6 /PR0
SS /SDA /PWM3 /PS7
MISO /SCL /PWM0 /PS4
KWS6 /SCK /PWM2 /PS6
FP8 /KWT0 /IOC1_4 /PT0
KWS5 /MOSI /PWM1 /PS5
KWR1 /TXCAN1 /IOC0_7 /PR1
FP9 /KWT1 /IOC1_5 /PT1
FP12 /KWR4 /PR4
FP10 /KWT2 /IOC1_6 /PT2
FP11 /KWT3 /IOC1_7 /PT3
Device Overview MC9S12XHY-Family
1.7.2Pin Assignment Overview
Table 1-5 provides a summary of which Ports are available for each package option. Routing of pin
functions is summarized in Table 1-6.
Table 1-5. Port Availability by Package Option
Port112 LQFP100 LQFP
Port AD/ADC Channels12/128/8
Port A88
Port B86
Port H88
Port P88
Port R86
Port S88
Port T88
Port U88
Port V88
Port M40
Sum of Ports8876
I/O Power Pairs VDDM/VSSM2/22/2
I/O Power Pairs VDDX/VSSX2/22/2
I/O Power Pairs VDDA/VSSA
VREG Power Pairs VDDR/VSS31/11/1
VDD/VSS21/11/1
VDDF/VSSF1/11/1
I/O Power Pair VDDPLL/VSSPLL1/11/1
VLCD power11
Sum of power pins1919
OSC pairs XTAL/EXTAL1/11/1
other pins RESET/TEST/BKGD1/1/11/1/1
1. VRH/VRL are sharing with VDDA/VSSA pins
(1)
1/11/1
MC9S12XHY-Family Reference Manual, Rev. 1.01
30Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
Table 1-6. Peripheral - Port Routing Options
IIC
TIM0
[7:6]
PR[6:5]O
PV[3,0]O
PS[7,4]X
PT[7:6]X
2-23
2-16
PR[1:0]O
PV6,PV4O
PT[5:4]X
PV2,PV0O
PU6,PU4X
PM[1:0]O
PT[3:2]X
PR[3:2]O
PV6,PV4X
TIM0
[5:4]
2-16
TIM0
[3:2]
2-72
TIM1
[7:6]
2-16
TIM1
[3:2]
2-79
SPI
(1)
PWM
[7:4]
PWM
[3:0]
SCI1
PM[3:2]O
PS[7:4]X
2-23
PV[3:0]O
PH[3:0]O
PP[7:4]X
2-36
PS[1:0,3:2]O
PV[3:0]O
PM[3:0]O
PP[3:0]X
2-37
PS[7:4]O
PH[1:0]X
2-45
PM[1:0]O
1. “O” denotes a possible rerouting under software control, “X” denotes as default routing option
Table 1-7 provides a pin out summary listing the availability and functionality of individual pins for each
package option.
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor31
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor32
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
11PAD05AN05
KWA
D5
VDDAPERAD
Dis-
abled
Port AD I/O, analog input of
ATD, key wakeup
22PAD06AN06
KWA
D6
VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD, key wakeup
33PAD07AN07
KWA
D7
VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD, key wakeup
4-PAD08AN08VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD
5-PAD09AN09VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD
6-PAD10AN10VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD
7-PAD11AN11VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD
84TESTVDDA
RESET
pin
DOW
N
Test input
95PU0
IOC0
_0
M0C0MM0C
OSM
VDDM
PERU/P
PSU
Disabled
Port U I/O, Motor0 coil
nodes of MC,TIM0 channel
106PU1
M0C0PM0C
OSP
VDDM
PERU/P
PSU
Disabled
Port U I/O, Motor0 coil
nodes of MC
117PU2
IOC0
_1
M0C1MM0SI
NM
VDDM
PERU/P
PSU
Disabled
Port U I/O, Motor0 coil
nodes of MC,TIM0 channel
128PU3
M0C1PM0SI
NP
VDDM
PERU/P
PSU
Disabled
Port U I/O, Motor0 coil
nodes of MC
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor33
139VDDM1
1410VSSM1
1511PU4
IOC0
_2
M1C0MM1C
OSM
VDDM
PERU/P
PSU
Disabled
Port U I/O, Motor1 coil
nodes of MC,TIM0 channel
1612PU5
M1C0PM1C
OSP
VDDM
PERU/P
PSU
Disabled
Port U I/O, Motor1 coil
nodes of MC
1713PU6
IOC0
_3
M1C1MM1SI
NM
VDDM
PERU/P
PSU
Disabled
Port U I/O, Motor1 coil
nodes of MC,TIM0 channel
1814PU7
M1C1PM1SI
NP
VDDM
PERU/P
PSU
Disabled
Port U I/O, Motor1 coil
nodes of MC
1915PV0MISO
PW
M4
SCL
IOC1_0IOC0_4M2C0MM2C
OSM
VDDM
PERV/P
PSV
Disabled
Port V I/O, Motor2 coil
nodes of MC, MISO of SPI,
SCL of IIC, PWM channel
4,TIM0/1 channel
2016PV1PWM5
MOS
I
M2C0PM2C
OSP
VDDM
PERV/P
PSV
Disabled
Port V I/O, Motor2 coil
nodes of MC, MOSI of SPI,
PWM channel 5
2117PV2PWM6SCK
IOC1_1IOC0_5M2C1MM2SI
NM
VDDM
PERV/P
PSV
Disabled
Port V I/O, Motor2 coil
nodes of MC, SCK of SPI,
PWM channel 6,TIM0/1
channel
2218PV3SS
PW
M7
SDA
M2C1PM2SI
NP
VDDM
PERV/P
PSV
Disabled
Port V I/O, Motor2 coil
nodes of MC, SS of SPI
SDA of IIC, PWM channel 7
2319VDDM2
2420VSSM2
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor34
2521PV4
IOC1_2IOC0_6M3C0MM3C
OSM
VDDM
PERV/P
PSV
Disabled
Port V I/O, Motor3 coil
nodes of MC,TIM0/1 chan-
nel
2622PV5
M3C0PM3C
OSP
VDDM
PERV/P
PSV
Disabled
Port V I/O, Motor3 coil
nodes of MC
2723PV6
IOC1_3IOC0_7M3C1MM3SI
NM
VDDM
PERV/P
PSV
Disabled
Port V I/O, Motor3 coil
nodes of MC,TIM0/1 chan-
nel
2824PV7
M3C1PM3SI
NP
VDDM
PERV/P
PSV
Disabled
Port V I/O, Motor3 coil
nodes of MC
2925PP0PWM0FP0VDDX
PERP/P
PSP
Down
Port R I/O, timer1 Channel,
Key wakeup
3026PP1PWM1FP1VDDX
PERP/P
PSP
Down
Port R I/O, timer1 Channel,
Key wakeup
3127PP2PWM2FP2VDDX
PERP/P
PSP
Down
Port P I/O, LCD Frontplane
driver, PWM channel
3228PP3PWM3FP3VDDX
PERP/P
PSP
Down
Port P I/O, LCD Frontplane
driver, PWM channel
3329PP4PWM4FP4VDDX
PERP/P
PSP
Down
Port P I/O, LCD Frontplane
driver, PWM channel
3430PP5PWM5FP5VDDX
PERP/P
PSP
Down
Port P I/O, LCD Frontplane
driver, PWM channel
3531PP6PWM6FP6VDDX
PERP/P
PSP
Down
Port P I/O, LCD Frontplane
driver, PWM channel
3632PP7PWM7FP7VDDX
PERP/P
PSP
Down
Port P I/O, LCD Frontplane
driver, PWM channel
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor35
37-PR2
IOC1_6KWR
2
VDDX
PERR/P
PSR
Down
Port R I/O, timer1 Channel,
Key wakeup
38-PR3
IOC1_7KWR
3
VDDX
PERR/P
PSR
Down
Port R I/O, timer1 Channel,
Key wakeup
3933PS0PWM6
RXD
0
VDDX
PERS/P
PSS
Up
Port S I/O, RXD of SCI0,
PWM channel6
4034PS1PWM7
TXD
0
VDDX
PERS/P
PSS
Up
Port S I/O, TXD of SCI0,
PWM channel 7
4135VSSX2
4236VDDX2
4337PS2PWM4
RXC
AN0
KWS
2
VDDX
PERS/P
PSS
Up
Port S I/O, PWM channel
4,RX of CAN0 , Key wakeup
4438PS3PWM5
TXC
AN0
KWS
3
VDDX
PERS/P
PSS
Up
Port S I/O,PWM channel 5,
TX of CAN0 , Key wakeup
4539PR0
IOC0_6RXC
AN1
KWR
0
VDDX
PERR/P
PSR
Down
Port R I/O, timer0 Chan-
nel,RX of CAN1,Key
wakeup
4640PR1
IOC0_7TXC
AN1
KWR
1
VDDX
PERR/P
PSR
Down
Port R I/O, timer0 Chan-
nel,TX of CAN1 ,Key
wakeup
4741PS4PWM0SCL
MIS
O
VDDX
PERS/P
PSS
Up
Port S I/O, MISO of SPI,
SCL of IIC, PWM channel 0
4842PS5PWM1
MOS
I
KWS
5
VDDX
PERS/P
PSS
Up
Port S I/O, MOSI of SPI,
PWM channel 1, key
wakeup
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor36
4943PS6PWM2SCK
KWS
6
VDDX
PERS/P
PSS
Up
Port S I/O, SCK of SPI,
PWM channel2 , key
wakeup
5044PS7PWM3SDASSVDDX
PERS/P
PSS
Up
Port S I/O, SS of SPI, SDA
of IIC, PWM channel 3
5145RESETVDDXPULLUPExternal reset
5246PT0
IOC1_4KWT
0
FP8VDDX
PERT/P
PST
Down
Port T I/O, LCD Frontplane
driver, timer1 channel, key
wakeup
5347PT1
IOC1_5KWT
1
FP9VDDX
PERT/P
PST
Down
Port T I/O, LCD Frontplane
driver, timer1 channel, key
wakeup
5448PT2
IOC1_6KWT
2
FP10VDDX
PERT/P
PST
Down
Port T I/O, LCD Frontplane
driver, timer1 channel, key
wakeup
5549PT3
IOC1_7KWT
3
FP11VDDX
PERT/P
PST
Down
Port T I/O, LCD Frontplane
driver, timer1 channel, key
wakeup
5650PR4KWR4FP12VDDX
PERR/P
PSR
Down
Port R I/O, LCD Frontplane
driver , Key wakeup
5751PT4
IOC0_4KWT
4
FP13VDDX
PERT/P
PST
Down
Port T I/O, LCD Frontplane
driver, timer0 channel, key
wakeup
5852PT5
IOC0_5KWT
5
FP14VDDX
PERT/P
PST
Down
Port T I/O, LCD Frontplane
driver, timer0 channel, key
wakeup
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor37
5953PT6
IOC0_6KWT
6
FP15VDDX
PERT/P
PST
Down
Port T I/O, LCD Frontplane
driver, timer0 channel,key
wakeup
6054PT7
IOC0_7KWT
7
FP16VDDX
PERT/P
PST
Down
Port T I/O, LCD Frontplane
driver, timer0 channel, key
wakeup
6155PR5SDAFP17VDDX
PERR/P
PSR
Down
Port R I/O, LCD Frontplane
driver, SDA of IIC
6256PR6SCLFP18VDDX
PERR/P
PSR
Down
Port R I/O, LCD Frontplane
driver, SCL of IIC
6357PH0MISO
RXD
1
FP19VDDX
PERH/P
PSH
Down
Port H I/O, LCD Frontplane
driver, MISO of SPI, RXD of
SCI1
6458PH1MOSI
TXD
1
FP20VDDX
PERH/P
PSH
Down
Port HI/O, LCD Frontplane
driver, MOSI of SPI ,TXD of
SCI1
6559PH2ECLKSCKFP21VDDX
PERH/P
PSH
Down
Port HI/O, LCD Frontplane
driver, SCK of SPI, Bus
clock output
6660PH3SSFP22VDDX
PERH/P
PSH
Down
Port H I/O, LCD Frontplane
driver, SS of SPI
6761VDDF0
6862VSS10
69-PM0PWM4
IOC0_2RXD
1
VDDX
PERM/P
PSM
Up
Port M I/O, PWM channel4 ,
timer0 Channe 2, RXD of
SCI1
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor38
70-PM1PWM5
IOC0_3TXD
1
VDDX
PERM/P
PSM
Up
Port M I/O, PWM channel5 ,
timer0 Channe 3, TXD of
SCI1
71-PM2PWM6
IOC1
_2
VDDX
PERM/P
PSM
Up
Port M I/O, PWM channel6 ,
timer1 Channe 2
72-PM3PWM7
IOC1
_3
VDDX
PERM/P
PSM
Up
Port M I/O, PWM channel7 ,
timer1 Channe 3
7363VSSX1
7464VDDX1
7565PH4FP23VDDX
PERH/P
PSH
Down
Port HI/O, LCD Frontplane
driver
7666PH5FP24VDDX
PERH/P
PSH
Down
Port H I/O, LCD Frontplane
driver
7767VDDR
7868VSS3
7969
VSSPLL
8070EXTAL
VDDP
LL
OSCI0llator pin
8171XTAL
VDDP
LL
OSCI0llator pin
8272
VDDPL
L
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor39
8373PH6FP25VDDX
PERH/P
PSH
Down
Port H I/O, LCD Frontplane
driver
8474PH7FP26VDDX
PERH/P
PSH
Down
Port H I/O, LCD Frontplane
driver
8575PR7FP27VDDX
PERR/P
PSR
Down
Port R I/O, LCD Frontplane
driver
8676PB0FP28VDDXPUCRDown
Port B I/O, LCD Frontplane
driver
8777PA0IRQFP29VDDXPUCRDown
Port A I/O, LCD Frontplane
driver, API output
8878PA1XIRQFP30VDDXPUCRDown
Port A I/O, LCD Frontplane
driver
8979PA2FP31VDDXPUCRDown
Port A I/O, LCD Frontplane
driver
9080PA3
API_E
XTCL
K
XCL
KS
FP32VDDXPUCRDown
Port A I/O, LCD Frontplane
driver
9181PA4FP33VDDXPUCRDown
Port A I/O, LCD Frontplane
driver
9282PA5FP34VDDXPUCRDown
Port A I/O, LCD Frontplane
driver
9383PA6FP35VDDXPUCRDown
Port A I/O, LCD Frontplane
driver
9484PA7FP36VDDXPUCRDown
Port A I/O, LCD Frontplane
driver
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor40
9585PB1FP37VDDXPUCRDown
Port BI/O, LCD Frontplane
driver
96-PB2FP38VDDXPUCRDown
Port B I/O, LCD Frontplane
driver
97-PB3FP39VDDXPUCRDown
Port B I/O, LCD Frontplane
driver
9886VSS2
9987VDD
100 88PB4BP0VDDXPUCRDown
Port B I/O, LCD Backplane
driver
101 89PB5BP1VDDXPUCRDown
Port B I/O, LCD Backplane
driver
102 90PB6BP2VDDXPUCRDown
Port B I/O, LCD Backplane
driver
103 91PB7BP3VDDXPUCRDown
Port B I/O, LCD Backplane
driver
104 92VLCDVDDX
Voltagereference pin for the
LCD driver.
105 93BKGDMODCVDDX
Always
on
Up
Background debug, Mode
selection pin
106 94VSSAVRL
107 95VDDAVRH
108 96PAD00AN00
KWA
D0
VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD, key wakeup
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor41
NOTE
For devices assembled in 100-pin package 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-7 for affected pins.
109 97PAD01AN01
KWA
D1
VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD, key wakeup
110 98PAD02AN02
KWA
D2
VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD, key wakeup
111 99PAD03AN03
KWA
D3
VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD, key wakeup
112
10
0
PAD04AN04
KWA
D4
VDDAPERAD
Disabled
Port AD I/O, analog input of
ATD, key wakeup
1. Table shows a superset of pin functions. Not all functions are available on all derivatives
2. When Routing the IIC to PR/PH port, in order to overwrite the internal pull-down during reset, the external IIC pull-up resistor should be < =4.7K
3. When
IRQ/XIRQ is enabled, the internal pulldown function will be disabled, the external pullup resistor is required
Table 1-7. Pin-Out Summary
(1)
Package
Pin
Function
Power
Supply
Internal Pull
Resistor
Description
LQ
FP
100
LQ
FP64Pin
2nd
Func.
3rd
Func
.
4th
Func
.
5th
Func
.
6th
Func
.
7th
Func
.
8th
Func
.
CTRL
Reset
State
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.7.3Detailed Signal Descriptions
1.7.3.1EXTAL, XTAL — Oscillator Pins
EXTAL and XTAL are the crystal driver and external clock pins. On reset all the device clocks are derived
from the internal reference clock. XTAL is the oscillator output.
1.7.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
internal pull-up device.
1.7.3.3TEST — Test Pin
This input only pin is reserved for factory test. This pin has an internal pull-down device.
NOTE
The TEST pin must be tied to V
in all applications.
SSA
RESET pin has an
1.7.3.4BKGD / 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 an internal pull-up device.
1.7.3.5PAD[7:0] / AN[7:0] / KWAD[7:0]— Port AD Input Pins of ATD [7:0]
PAD[7:0] are a general-purpose input or output pins and analog inputs AN[7:0] of the analog-to-digital
converter ATD. They can be configured as keypad wakeup inputs.
1.7.3.6PA[7:4] / FP[36:33]— Port A I/O Pins [7:4]
PA[7:4] are a general-purpose input or output pins. They can be configured as frontplane segment driver
outputs FP[36:33].
1.7.3.7PA[3:2] / API_EXTCLK / XCLKS / FP[32:31]— Port A I/O Pins [3:2]
PA[3:2] are a general-purpose input or output pins. They can be configured as frontplane segment driver
outputs FP[32:31]. PA3 can also be configure as API_EXTCLK.The XCLKS is an input signal which
controls whether a crystal in combination with the internal loop controlled Pierce oscillator is used or
whether full swing Pierce oscillator/external clock circuitry is used (refer to Section 1.16, “Oscillator
Configuration ). An internal pull-down is enabled during reset.
MC9S12XHY-Family Reference Manual, Rev. 1.01
42Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.7.3.8PA1 / XIRQ / FP[30]— Port A I/O Pin 1
PA1 is a general-purpose input or output pin. It can be configured as frontplane segment driver outputs
FP[30]. It also provide 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. The XIRQ interrupt
is level sensitive and active low. As XIRQ is level sensitive, while this pin is low the MCU will not enter
STOP mode. After Reset, the XIRQ default is not enabled.
1.7.3.9PA0 / IRQ / FP[29]— Port A I/O Pin 0
PA0 is a general-purpose input or output pin. It can be configured as frontplane segment driver outputs
FP[29].Tthe maskable interrupt request input that provides a means of applying asynchronous interrupt
requests.
1.7.3.10PB[7:4] / BP[3:0] — Port B I/O Pins [7:4]
PB[7:4] are a general-purpose input or output pins. They can be configured as backplane segment driver
output BP[3:0].
1.7.3.11PB[3:0] / FP[39:37,28] — Port B I/O Pins [3:0]
PB[3:0] are a general-purpose input or output pins. They can be configured as frontplane segment driver
output FP[
39:37,28].
1.7.3.12PS7 / PWM3 / SDA / SS — Port S I/O Pin 7
PS7 is a general-purpose input or output pin. It can be configured as the slave selection pin SS for the serial
peripheral interface (SPI). It can be configured as the serial data pin SDA as IIC module. It can be
configured as PWM channel 3.
1.7.3.13PS6 / PWM2 / SCK / KWS6 — Port S I/O Pin 6
PS6 is a general-purpose input or output pin. It can be configured as the serial clock SCK of the serial
peripheral interface (SPI). It can be configured as PWM channel 2. It can be configured as keypad wakeup
input.
1.7.3.14PS5 / PWM1 / MOSI / KWS5 — Port S I/O Pin 5
PS5 is a general-purpose input or output pin. It can be configured as the master output (during master
mode) or slave input pin (during slave mode) MOSI of the serial peripheral interface (SPI). It can be
configured as PWM channel1. It can configured as keypad wakeup input.
1.7.3.15PS4 / PWM0 / SCL / MISO — Port S I/O Pin 4
PS4 is a general-purpose input or output pin. It can be configured as the master input (during master mode)
or slave output pin (during slave mode) MISO for the serial peripheral interface (SPI).It can be configured
as the serial clock pin SCL as IIC module.It can be configured as PWM channel0
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor43
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.7.3.16PS3 / PWM5 / TXCAN / KWS3 — Port S I/O Pin 3
PS3 is a general-purpose input or output pin. It can be configured as the transmit pin TXCAN of the
scalable controller area network controller (CAN). It can be configured as PWM channel5. It can
configured as keypad wakeup input.
1.7.3.17PS2 / PWM4 / RXCAN / KWS2 — Port S I/O Pin 2
PS3 is a general-purpose input or output pin. It can be configured as the receive pin RXCAN of the scalable
controller area network controller (CAN). It can be configured as PWM channel4. It can configured as
keypad wakeup input.
1.7.3.18PS1 / PWM7 / TXD — 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(SCI). It can be configured as PWM channel 7.
1.7.3.19PS0 / PWM6 / RXD — 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(SCI). It can be configured as PWM channel 6.
1.7.3.20PR7 / FP[27] — Port R I/O Pin 7
PR7 is a general-purpose input or output pin. It can be configured as frontplane segment driver output
FP[27].
1.7.3.21PR6 / SCL / FP[18]— Port R I/O Pin 6
PR6 is a general-purpose input or output pin. It can be configured as frontplane segment driver output
FP[18]. It can be configured as the serial clock pin SCL of IIC.
1.7.3.22PR5 / SDA / FP[17]— Port R I/O Pin 5
PR5 is a general-purpose input or output pin. It can be configured as frontplane segment driver output
FP[17]. It can be configured as the serial data pin SDA of IIC.
1.7.3.23PR4 / KWR4 / FP[12] — Port R I/O Pin 4
PR4 is a general-purpose input or output pin. It can be configured as frontplane segment driver output
FP[12].They can be configured as keypad wakeup inputs.
1.7.3.24PR[3:2] / IOC1[7:6] / KWR[3:2] — Port R I/O Pins [3:2]
PR[3:2] are a general-purpose input or output pins. They can be configured as timer (TIM1) channel 7-6.
They can be configured as keypad wakeup inputs.
MC9S12XHY-Family Reference Manual, Rev. 1.01
44Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.7.3.25PR1 / IOC0_7 / TXCAN1 / KWR1 — Port R I/O Pins 1
PR[1:0] are a general-purpose input or output pins. They can be configured as timer (TIM0) channel 7-6.
It can be configured as the transmit pin TXCAN of the scalable controller area network controller
(CAN1).They can be configured as keypad wakeup inputs.
1.7.3.26PR0 / IOC0_6 / RXCAN1 / KWR0 — Port R I/O Pins 0
PR[1:0] are a general-purpose input or output pins. They can be configured as timer (TIM0) channel 7-6.
It can be configured as the receive pin RXCAN of the scalable controller area network controller
(CAN1).They can be configured as keypad wakeup inputs.
1.7.3.27PP[7:0] / PWM[7:0] / FP[7:0] — Port P I/O Pins [7:0]
PP[7:0] are a general-purpose input or output pins. They can be configured as frontplane segment driver
output FP[7:0]. They can be configured as pulse width modulator (PWM) channel 7-0 output.
1.7.3.28PH[7:4] / FP[26:23] — Port H I/O Pins [7:4]
PH[7:4] are a general-purpose input or output pins. They can be configured as frontplane segment driver
output FP[26:23].
1.7.3.29PH3 / SS / FP[22]— Port H I/O Pin 3
PH3 is a general-purpose input or output pin. It can be configured as frontplane segment driver output
FP[22]. It can be configured as the slave selection pin
SS for the serial peripheral interface (SPI).
1.7.3.30PH2 / ECLK / SCK / FP[21] — Port H I/O Pin 2
PH2 is a general-purpose input or output pin. It can be configured as frontplane segment driver output
FP[21]. It can be configured as the serial clock SCK of the serial peripheral interface (SPI). It can be
configured to drive the internal bus clock ECLK. ECLK can be used as a timing reference. The ECLK
output has a programmable prescaler.
1.7.3.31PH1 / MOSI / TXD1 / FP[20] — Port H I/O Pin 1
PH1 is a general-purpose input or output pin. It can be configured as frontplane segment driver output
FP[20]. It can be configured as the master output (during master mode) or slave input pin (during slave
mode) MOSI of the serial peripheral interface (SPI).It can be configured as the transmitpin TXD of serial
communication interface(SCI1).
1.7.3.32PH0 / MISO / RXD1 / FP[19] — Port H I/O Pin 0
PH0 is a general-purpose input or output pin. It can be configured as frontplane segment driver output
FP[19]. It can be configured as the master input (during master mode) or slave output pin (during slave
mode) MISO for the serial peripheral interface (SPI).It can be configured as the receive pin RXD of serial
communication interface(SCI1).
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor45
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.7.3.33PT[7:4] / IOC0[7:4] / KWT[7:4] / FP[16:13] — Port T I/O Pins [7:4]
PT[7:4] are a general-purpose input or output pins. They can be configured as frontplane segment driver
output FP[16:13]. They can be configured as timer (TIM0) channel 7-4. They can be configured as key
wakeup inputs.
1.7.3.34PM3 / PMW7 / IOC1_3 — Port M I/O Pins [3]
PM3 is a general-purpose input or output pin. . It can be configured as timer (TIM1) channels 3.It can be
configured as PWM channel7.
1.7.3.35PM2 / PMW6 / IOC1_2 — Port M I/O Pins [2]
PM2 is a general-purpose input or output pin. .It can be configured as timer (TIM1) channels 2. It can be
configured as PWM channel6.
1.7.3.36PM1 / PMW5 / IOC0_3 / TXD1— Port M I/O Pins [1]
PM1 is a general-purpose input or output pin. It can be configured as the transmitpin TXD of serial
communication interface(SCI). It can be configured as timer (TIM0) channels 3.It can be configured as
PWM channel5.
1.7.3.37PM0 / PMW4 / IOC0_2 / RXD1— Port M I/O Pins [0]
PM0 is a general-purpose input or output pin. It can be configured as the receive pin RXD of serial
communication interface(SCI).It can be configured as timer (TIM0) channels 2. It can be configured as
PWM channel4.
1.7.3.38PT[3:0] / IOC1[7:4] /KWT [3:0] / FP[11:8] — Port T I/O Pin [3:0]
PT[3:0] are a general-purpose input or output pins. They can be configured as frontplane segment driver
output FP[11:8]. They can be configured as timer (TIM1) channels 7-4. They can be configured as key
wakeup inputs.
1.7.3.39PU[7] / M1C1P / M1SINP — Port U I/O Pin [7]
PU[7] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 1.
1.7.3.40PU[6] / IOC0_3 / M1C1M / M1SINM — Port U I/O Pin [6]
PU[6] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 1. It can aslo be configured as timer (TIM0) channel 3
MC9S12XHY-Family Reference Manual, Rev. 1.01
46Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.7.3.41PU[5] / M1C0P / M1COSP— Port U I/O Pin [5]
PU[5] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 1.
1.7.3.42PU[4] / IOC0_2 / M1C0M / M1SINP— Port U I/O Pin [4]
PU[4] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 1. It can aslo be configured as timer (TIM0) channel 2
1.7.3.43PU[3] / M0C1P / M0SINP— Port U I/O Pin [3]
PU[3] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 0.
1.7.3.44PU[2] / IOC0_1 / M0C1M / M0SINM — Port U I/O Pin [2]
PU[2] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 0. It can aslo be configured as timer(TIM0) channel 1
1.7.3.45PU[1] / M0C0P / M0COSP— Port U I/O Pin [1]
PU[1] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 0.
1.7.3.46PU[0] / IOC0_0 / M0C0M / M0COSM— Port U I/O Pin [0]
PU[0] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 0. It can aslo be configured as timer(TIM0) channel 0
1.7.3.47PV[7] / M3C1P / M3SINP— Port V I/O Pin [7]
PV[7] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 3.
1.7.3.48PV[6] / IOC1_3 / IOC0_7 / M3C1M / M3SINM — Port V I/O Pin [6]
PV[6] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor47
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
interfaces to the coils of motor 3. It can aslo be configured as timer (TIM1) channel 3 or timer (TIM0)
channel 7.
1.7.3.49PV[5] / M3C0P / M3COSP — Port V I/O Pin [5]
PV[5] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 3.
1.7.3.50PV[4] / IOC1_2 / IOC0_6 / M3C0M / M3COSM — Port V I/O Pin [4]
PV[4] is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor drive or to measure the back EMF to calibrate the pointer reset position. The pin
interfaces to the coils of motor 3. It can aslo be configured as timer (TIM1) channel 2 or timer (TIM0)
channel 6.
1.7.3.51PV3 / SS / PWM7 / SDA / M2C1P / M2SINP — Port V I/O Pin 3
PV3 is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor driver or to measure the back EMF to calibrate the pointer reset position. It interface
to the coil of motor 2. It can be configured as the slave selection pin
(SPI). It can be configured as the serial data pin SDA as IIC module. It can be configured as PWM channel
PV2 is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor driver or to measure the back EMF to calibrate the pointer reset position. It interface
to the coil of motor 2. It can be configured as timer(TIM1) channel 1 or timer (TIM0) channel 5. It can be
configured as the serial clock SCK of the serial peripheral interface (SPI). It can be configured as PWM
channel 6.
1.7.3.53PV1 / PWM5 / MOSI / M2C0P / M2COSP — Port V I/O Pin 1
PV1 is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor driver or to measure the back EMF to calibrate the pointer reset position. It interface
to the coil of motor 2. It can be configured as the master output (during master mode) or slave input pin
(during slave mode) MOSI of the serial peripheral interface (SPI). It can be configured as PWM channel 5.
PV0 is a general-purpose input or output pin. It can be configured as high current PWM output pin which
can be used for motor driver or to measure the back EMF to calibrate the pointer reset position. It interface
to the coil of motor 2. It can be configured as timer (TIM1) channel 0 or timer (TIM0) channel 4. It can be
configured as the master input (during master mode) or slave output pin (during slave mode) MISO for the
MC9S12XHY-Family Reference Manual, Rev. 1.01
48Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
serial peripheral interface (SPI). It can be configured as the serial clock pin SCL of IIC module. It can be
configured as PWM channel 4.
1.7.4Power Supply Pins
MC9S12XHY-Family power and ground pins are described below. 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.
NOTE
All V
1.7.4.1VDDX[2:1] / VSSX[2:1] — Power and Ground Pins for I/O Drivers
External power and ground for I/O drivers. Bypass requirements depend on how heavily the MCU pins are
loaded. All V
DDX
1.7.4.2VDDR — Power Pin for Internal Voltage Regulator
pins must be connected together in the application.
SS
pins are connected together internally. All V
SSX
pins are connected together internally.
Power supply input to the internal voltage regulator.
1.7.4.3VDD / VSS2 / VSS3 — Core power Pins
The voltage supply of nominally 1.8V is derived from the internal voltage regulator. The return current
path is through the VSS2 and VSS3 pin. No static external loading of these pins is permitted.
1.7.4.4VDDF / VSS1 — NVM Power Pins
The voltage supply of nominally 2.8 V is derived from the internal voltage regulator. The return current
path is through the VSS1 pin. No static external loading of these pins is permitted.
1.7.4.5VDDA / VSSA — Power Supply Pins for ATD and Voltage Regulator
These are the power supply and ground input pins for the analog-to-digital converters and the voltage
regulator.
1.7.4.6VDDPLL / VSSPLL — Power Supply Pins for PLL
This pin provides operating voltage and ground for the oscillator and the phased-locked loop. The voltage
supply of nominally 1.8V is derived from the internal voltage regulator. This allows the supply voltage to
the oscillator and PLL to be bypassed independently. This voltage is generated by the internal voltage
regulator. No static external loading of these pins is permitted
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor49
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.7.4.7VDDA/VRH / VSSA/VRL — Power Supply Pins for ATD and Voltage
Regulator and ATD Reference Voltage inputs
These are the power supply and ground input pins for Port AD IO, the analog-to-digital converter and the
voltage regulator. And also server as the reference voltage input pins for the analog-to-digital converter.
1.7.4.8VDDM[2:1] / VSSM[2:1]— Power Supply Pins for Motor 0 to 3
External power supply pins for the Port U and Port V. VDDM2 and VDDM1 as well as VSSM2 and
VSSM1 are internal connected together.
1.7.4.9VLCD— Power Supply Reference Pin for LCD driver
VLCD is the voltage reference pin for the LCD driver. Adjusting the voltage on this pin will change the
display contrast.
1.7.4.10Power and Ground Connection Summary
Table 1-8. Power and Ground Connection Summary
Mnemonic
VDDR5.0 VExternal power supply to internal voltage
VDDX[2:1]5.0 VExternal power and ground, supply to pin
VSSX[2:1]0 V
VDDA/VRH5.0 VOperating voltage and ground for the
VSSA/VRL0 V
VDD1.8VInternal power and ground generated by
VSS1/VSS2/
VSS3
VDDF2.8VInternal power and ground generated by
VDDPLL1.8VProvides operating voltage and ground for
VSSPLL0V
Nominal
Voltage
0V
Description
regulator
drivers
analog-to-digital converters and the
reference for the internal voltage regulator,
allows the supply voltage to the A/D to be
bypassed independently.AlsorReference
voltages for the analog-to-digital converter.
internal regulator for the internal core.
internal regulator for the internal NVM.
the phased-locked loop. This allows the
supply voltage to the PLL to be bypassed
independently. Internal power and ground
generated by internal regulator.
VDDM[2:1]5.0 VExternal power and ground, supply to Port
VSSM[2:1]0 V
VLCD5.0 VExternal voltage reference for the LCD
MC9S12XHY-Family Reference Manual, Rev. 1.01
50Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
U/V motor drivers
driver
Device Overview MC9S12XHY-Family
1.8System Clock Description
For the LCD CLK in Table 1-8. LCD Clock and Frame Frequency, it is always connected to the CRG LCD
clok output, which is from OSC clock, see Figure 7-16. System Clocks Generator.The clock and reset
generator module (CRG) provides the internal clock signals for the core and all peripheral modules.
Figure 1-5 shows the clock connections from the CRG to all modules.
Consult the S12XECRG section for details on clock generation.
NOTE
The XHY and XS family uses the XE family clock and reset generator
module. Therefore all CRG references are related to S12XECRG.
SCI0 . . SCI 1
EXTAL
XTAL
Bus Clock
CRG
IIC
Core Clock
SPI0
Oscillator Clock
Lcd Clock
CAN0..CAN1
ATD0
LCD
SSD
MC
TIM
PIM
RAMS12XFLASH
The system clock can be supplied in several ways enabling a range of system operating frequencies to be
supported:
•The on-chip phase locked loop (PLL)
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor51
Downloaded from Elcodis.comelectronic components distributor
PWM
Figure 1-5. Clock Connections
Device Overview MC9S12XHY-Family
•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-5, these system clocks are used throughout the MCU to drive the core,
the memories, and the peripherals.
The program Flash memory is 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 NVMs.
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.
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.9Modes of Operation
The MCU can operate in different modes. These are described in 1.9.1 Chip Configuration Summary.
The MCU can operate in different power modes to facilitate power saving when full system performance
is not required. These are described in 1.10.2 Power Modes Low Power Operation.
Some modules feature a software programmable option to freeze the module status whilst the background
debug module is active to facilitate debugging.
1.9.1Chip Configuration Summary
The different modes and the security state of the MCU affect the debug features (enabled or disabled). The
operating mode out of reset is determined by the state of the MODC signal during reset (see Table 1-9).
The MODC bit in the MODE register shows the current operating mode and provides limited mode
MC9S12XHY-Family Reference Manual, Rev. 1.01
52Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
switching during operation. The state of the MODC signal is latched into this bit on the rising edge of
RESET.
Table 1-9. Chip Modes
Chip ModesMODC
Normal single chip1
Special single chip0
1.9.1.1Normal Single-Chip Mode
This mode is intended for normal device operation. The opcode from the on-chip memory is being
executed after reset (requires the reset vector to be programmed correctly). The processor program is
executed from internal memory.
1.9.1.2Special 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 waits for additional serial commands through the BKGD pin.
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor53
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.9.2Power Modes
The MCU features two main low-power modes. Consult the respective section for module specific
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 section (CRG).
1.9.2.1System Stop Modes
The system stop modes are entered if the CPU executes the STOP instruction unless an NVM command
is active. 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 section. Asserting
that is not masked exits system stop modes. System stop modes can be exited by CPU activity, depending
on the configuration of the interrupt request.
If the CPU executes the STOP instruction whilst an NVM command is being processed, then the system
clocks continue running until NVM activity is completed. If a non-masked interrupt occurs within this time
then the system does not effectively enter stop mode although the STOP instruction has been executed.
1.9.2.2Full Stop Mode
RESET, XIRQ, IRQ or any other interrupt
The oscillator is stopped in this mode. By default all clocks are switched off and all counters and dividers
remain frozen. The Autonomous Periodic Interrupt (API) and ATD module may be enabled to self wake
the device. A Fast wake up mode is available to allow the device to wake from Full Stop mode immediately
on the PLL internal clock without starting the oscillator clock.
1.9.2.3Pseudo Stop Mode
In this mode the system clocks are stopped but the oscillator is still running and the real time interrupt
(RTI) and watchdog (COP), API and ATD and LCD modules may be enabled. Other peripherals are turned
off. This mode consumes more current than system stop mode but, as the oscillator continues to run, the
full speed wake up time from this mode is significantly shorter.
1.9.2.4Wait 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 can be active in system wait mode.
For further power consumption the peripherals can individually turn off their local clocks. Asserting
RESET, XIRQ, IRQ or any other interrupt that is not masked ends system wait mode.
1.9.2.5Run Mode
Although this is not a low-power mode, unused peripheral modules should not be enabled in order to save
power.
MC9S12XHY-Family Reference Manual, Rev. 1.01
54Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.9.3Freeze Mode
The timer module, pulse width modulator, and analog-to-digital converters provide a software
programmable option to freeze the module status when the background debug module is active. This is
useful when debugging application software. For detailed description of the behavior of the ATD, TIM,
PWM when the background debug module is active consult the corresponding section.
1.10Security
The MCU security mechanism prevents unauthorized access to the Flash memory. Refer to Section 5.4.1
Security and Section 15.5 Security
1.11Resets and Interrupts
Consult the S12X CPU manual and the S12XINT section for information on exception processing.
NOTE
When referring to the S12XINT section please be aware that the XHY
family neither features an XGATE nor an MPU module.
1.11.1Resets
Table 1-10. lists all Reset sources and the vector locations. Resets are explained in detail in the
(TIE, TCIE, RIE, ILIE)
Vector base + $D2ATDI bitATDCTL2 (ASCIE)
Vector base + $D0
Vector base + $CEPort ADI bitPIEAD (PIEAD7-PIEAD0)
Vector base + $CCPort RI bitPIER (PIER3-PIER0)
Vector base + $CAPort SI bitPIES (PIES6-PIES5)
Vector base + $C8ReservedI bit
Vector base + $C6CRG PLL lockI bitCRGINT(LOCKIE)
Vector base + $C4CRG self-clock modeI bitCRGINT(SCMIE)
Vector base + $C2
MC9S12XHY-Family Reference Manual, Rev. 1.01
56Freescale Semiconductor
Reserved
Reserved
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
Table 1-11. Interrupt Vector Locations (Sheet 2 of 3)
Vector Address
(1)
Interrupt Source
CCR
Mask
Local Enable
Vector base + $C0IIC busI bit IBCR(IBIE)
Vector base + $BE
to
Reserved
Vector base + $BC
Vector base + $BAFLASH Fault DetectI bit FCNFG2 (SFDIE, DFDIE)
Vector base + $B8FLASHI bitFCNFG (CCIE)
Vector base + $B6CAN0 wake-upI bitCANRIER (WUPIE)
Vector base + $B4CAN0 errorsI bitCANRIER (CSCIE, OVRIE)
Vector base + $B2CAN0 receiveI bitCANRIER (RXFIE)
Vector base + $B0CAN0 transmitI bitCANTIER (TXEIE[2:0])
Vector base + $88SSD1I bitMDC1CTL(MCZIE,AOVIE)
Vector base + $86SSD2I bitMDC2CTL(MCZIE,AOVIE)
Vector base + $84SSD3I bitMDC3CTL(MCZIE,AOVIE)
Vector base + $82
Reserved
Vector base + $80Low-voltage interrupt (LVI)I bitVREGCTRL (LVIE)
Vector base + $7EAutonomous periodical interrupt (API)I bitVREGAPICTRL (APIE)
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor57
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
Table 1-11. Interrupt Vector Locations (Sheet 3 of 3)
Vector Address
Vector base + $7CHigh Temperature Interrupt(HTI)I bitVREGHTCL (HTIE)
Vector base + $7ACAN1 wake-upI bitCANRIER (WUPIE)
Vector base + $78CAN1 errorsI bitCANRIER (CSCIE, OVRIE)
Vector base + $76CAN1 receiveI bitCANRIER (RXFIE)
Vector base + $74CAN1 transmitI bitCANTIER (TXEIE[2:0])
Vector base + $72
to
Vector base + $40
Vector base + $3EATD Compare InterruptI bitATDCTL2 (ACMPIE)
Vector base + $3C
to
Vector base + $14
Vector base + $12System Call Interrupt (SYS)—None
Vector base + $10Spurious interrupt—None
1. 16 bits vector address based
(1)
Interrupt Source
CCR
Mask
Reserved
Reserved
Local Enable
NOTE
9S12HY64 family LVI/API/HTI vector number is $8A-$86,
while 9S12XHY256 is $80-$7C;9S12HY64 family ATD
Compare interrupt number is $84, while 9S12HY64 family is
$3E;9S12HY64 family has no SYS vector; 9S12HY64 family
Spurious interrupt vector number is $80.
1.11.3Effects of Reset
When a reset occurs, MCU registers and control bits are initialized. Refer to the respective block sections
for register reset states.
On each reset, the Flash module executes a reset sequence to load Flash configuration registers.
1.11.3.1Flash Configuration Reset Sequence Phase
On each reset, the Flash module will hold CPU activity while loading Flash module registers from the
Flash memory. If double faults are detected in the reset phase, Flash module protection and security may
be active on leaving reset. This is explained in more detail in the Flash module section.
MC9S12XHY-Family Reference Manual, Rev. 1.01
58Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.11.3.2Reset While Flash Command Active
If a reset occurs while any Flash command is in progress, that command will be immediately aborted. The
state of the word being programmed or the sector/block being erased is not guaranteed.
1.11.3.3I/O Pins
Refer to the PIM section for reset configurations of all peripheral module ports.
1.11.3.4Memory
The RAM arrays are not initialized out of reset.
1.12COP Configuration
The COP time-out rate bits CR[2:0] and the WCOP bit in the COPCTL registerare loaded from the Flash
register FOPT. See Table 1-12 and Table 1-13 for coding. The FOPT register is loaded from the Flash
configuration field byte at global address 0x7_FF0E during the reset sequence.
If the MCU is secured the COP time-out rate is always set to the longest period (CR[2:0] = 111) after any
reset into Special Single Chip mode.{mcu_9s12xhy256_cop_resetval.s}
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
The ATD module includes external trigger inputs ETRIG[3:0]. The external trigger allows the user to
synchronize ATD conversion to external trigger events. Table 1-14 shows the connection of the external
trigger inputs.
1. When LCD segment output driver is enabled on PP1/PP3, the ATD
external trigger function will be unavailable
2. Independ on the TIM0OCPD3/2 bit setting
Connectivity
(1)
1
(2)
2
Consult the ATD section for information about the analog-to-digital converter module. References to
freeze mode are equivalent to active BDM mode.
1.14ATD Channel[17] Connection
Further to the 12 externally available channels, ATD0 features an extra channel[17] that is connected to
the internal temperature sensor at device level. To access this channel ATD must use the channel encoding
SC:CD:CC:CB:CA = 1:0:0:0:1 in ATDCTL5. For more temperature sensor information, please refer to
1.15.1 Temperature Sensor Configuration.
1.15VREG Configuration
The device must be configured with the internal voltage regulator enabled. Operation in conjunction with
an external voltage regulator is not supported.
The API trimming register APITR is loaded from the Flash IFR option field at global address 0x40_00F0
bits[5:0] during the reset sequence. Currently factory programming of this IFR range is not supported.
Read access to reserved VREG register space returns “0”. Write accesses have no effect. This device does
not support access abort of reserved VREG register space.
1.15.1Temperature Sensor Configuration
The VREG high temperature trimming register bits VREGHTTR[3:0] are loaded from the internal Flash
during the reset sequence. To use the high temperature interrupt within the specified limits (T
T
) these bits must be loaded with 0x8. Currently factory programming is not supported.
HTID
The device temperature can be monitored on ATD0 channel[17]. The internal bandgap reference voltage
can also be mapped to ATD0 analog input channel[17]. The voltage regulator VSEL bit when set, maps
the bandgap and, when clear, maps the temperature sensor to ATD0 channel[17].
MC9S12XHY-Family Reference Manual, Rev. 1.01
HTIA
and
60Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
1.16Oscillator Configuration
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.
The XCLKS signal selects the oscillator configuration during reset low phase while a clock quality check
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 the
described reset cases.
NOTE
Unlike XS family, XCLKS signal is applied in MC9S12XHY family instead
The terms S12P, S12X , S12HY,S12XHY and S12S which appear in some of the following chapters refer
to the original architecture which those modules were designed to work with. Please do not confuse them
with the S12XHY product families.
S12XHY will support only 10-bit ATD resolution, although in ATD12B block it still has the 12-bit
descriptions.
SSD block says one SSD can be configed to control two motors, while in chip level, this feature is not
supported.
MC9S12XHY-Family Reference Manual, Rev. 1.01
62Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
fix Section Table 1-2., “Device Register Memory Map, SSD name
update Table 1-1,bus speed is 40MHz
update 1.8 System Clock Description, for lcd clock
Rev0.11Jun-03-2010Danielupdate Table 1-7., “Pin-Out Summary, reset state of pin RESET
fix 1.12, “COP Configuration, FOPT address is 0x7_FF0E
Rev0.12Nov-16-2010DanielFix typo of Table 1-2./1-23, size of Moudle INT is 16, 0x130~ is 16
update Table 1-1./1-14,all parts has 2x MSCAN and SCI
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor63
Downloaded from Elcodis.comelectronic components distributor
Device Overview MC9S12XHY-Family
MC9S12XHY-Family Reference Manual, Rev. 1.01
64Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Chapter 2
Port Integration Module (S12XHYPIMV1)
Revision History
Version
Number
0.0118 May
0.028 Jun
0.039 Jun
0.0410 Jun
0.0523 Jun
0.0625 Jun
0.0729 Jul
0.0830 Jul
Revision
Date
2009
2009
2009
2009
2009
2009
2009
2009
Effective
Date
AuthorDescription of Changes
Initial Version
add pin routing of IOC0[7:4] to PV(Table 2-1)
add port M to pin functions in Table 2-1
fix typo
remove WOMM in register map Table 2-2./2-74
update link in register map Table 2-2./2-74
PERM reserved bit reset value is 0 in 2.3.18/2-96
update by steven’s review on v0.01
update by team review based on Ver0.04
update PWM re-route PTRRH&PTRRL
Change IOC re-route on PM to PU/PV. SCI re-route on PM to PH
update by team review
add SSD pin functions in pinmap
update wire-or options on port M
fix, add IOC1_1 IOC1_0 to Table 2-1., “Pin Functions and Priorities
fix, add IOC0_7 to 2.3.89, “Port V Data Register (PTV)
0.0927 OCT
2009
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor65
Downloaded from Elcodis.comelectronic components distributor
Fix wong figure name in Section 2.3.54, “Port H Routing Register
(PTHRR)
remove reduded drive strength descript in Section 2.1.2, “Features
update ranget for Section 2.3.9, “PIM Reserved Register
fix Table 2-2, add PTTRR{7:4]
fix table/figure name Table 2-58,Table 2-59,Figure 2-70,Figure 2-71
fix table/figure name Table 2-62,Figure 2-75
update WOMM[1:0] at Figure 2-34,Figure 2-2, Figure 2-80
update Figure 2-80,reduced drive,Routing,Wire-Or
fix Table 2-38, un-hidePMM5:4] routing
fix Table 2-95, port name for glitch
Port Integration Module (S12XHYPIMV1)
Version
Number
0.1003 Jun
0.1115 Nov
Revision
Date
2010
2010
Effective
Date
AuthorDescription of Changes
fix on page 2-146, no open drain output when portV route to IIC
fix Table 2-1., “Pin Functions and Priorities, PM[1:0] connect to SCI
add NCLKX2 bit on ECLKCTL register2.3.10/2-91
fix typo,it is PTIM and PTM 2.3.16/2-95
remove Reduced drive at section 2.4.2.4 and 2.3.2/2-84
fix table Table 2-1./2-67, PM[1:0] is for TXD/RXD
fix table Table 2-16./2-97, PTTRR[4], PT4 instead of PT6
2.1Introduction
2.1.1Overview
The S12XHY Family Port Integration Module establishes the interface between the peripheral modules
and the I/O pins for all ports. It controls the electrical pin properties as well as the signal prioritization and
multiplexing on shared pins.
This document covers:
•Port A associated with the XLKS,IRQ, XIRQ interrupt inputs and API_EXTCLK. Also associated
with the LCD driver output
•Port B used as general purpose I/O and LCD driver output(including BP and FP pins)
•Port R associated with 2 timer module - port 4:0 inputs can be used as an external interrupt
source.Also associated with the LCD driver output. PR also associated with the IIC and CAN1
•Port T associated with 2 timer module. Also associated with the LCD driver output. It can be used
as external interrupt source
•Port S associated with 1 SPI module, 1 SCI module, 1 IIC module and 1 MSCAN, and PWM. Port
6-5and 3-2 can be used as an external interrupt source.
•Port P connected to the PWM, also associated with LCD driver output
•Port H associated with 1 SPI, 1 SCI. Also associated with LCD driver output
•Port M associated with SCI1 PWM and TIM
•Port AD associated with one 12-channel ATD module. It an be used as an external interrupt source
•Port U/V associated with the Motor driver output. Also PV3-0 associated with 1 SPI, 1 IIC and 4
PWM channels. PU0/PU2/PU4/PU6 and PV0/PV2/PV4/PV6 associated with TIM0 channels 0 -3
and TIM1 channels 0 -3
Most I/O pins can be configured by register bits to select data direction, to enable and select pull-up or
pull-down devices. Port U/V have register bits to select the slew rate control.
NOTE
This document assumes the availability of all features (112-pin package
option). Some functions are not available on lower pin count package
options. Refer to the pin-out summary section.
MC9S12XHY-Family Reference Manual, Rev. 1.01
66Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
2.1.2Features
The Port Integration Module includes these distinctive registers:
•Data registers and data direction registers for Ports A, B, H, T, S, P, R, M,U, V and AD when used
as general purpose I/O
•Control registers to enable/disable pull devices and select pull-ups/pull-downs on Ports H, T, S, P,
R,M, U and V on per-pin basis
•Control registers to enable/disable pull-up devices on Port AD on per-pin basis
•Single control register to enable/disable pull-down on Ports A and B, on per-port basis and
•Single control register to enable/disable pull-up on BKGD pin
•Control registers to enable/disable open-drain (wired-or) mode on Ports H, R,M and S.Control
register to enable/disable slew rate control on Port U and Port V
•Interrupt flag register for pin interrupts on Ports R, Port S, Port T and AD
•Control register to configure
•Routing register to support module port relocation
•Free-running clock outputs
A standard port pin has the following minimum features:
IRQ/XIRQ pin operation
•Input/output selection
•5V output drive 5V digital and analog input
•Input with selectable pull-up or pull-down device
Optional features supported on dedicated pins:
•Open drain for wired-or connections
•Interrupt inputs with glitch filtering
•The output slew rate control
2.2External Signal Description
This section lists and describes the signals that do connect off-chip.
Table 2-1 shows all the pins and their functions that are controlled by the Port Integration Module.
NOTE
If there is more than one function associated with a pin, the priority is
indicated by the position in the table from top (highest priority) to bottom
(lowest priority).
Table 2-1. Pin Functions and Priorities
Port Pin Name
-BKGDMODC
Freescale Semiconductor67
Downloaded from Elcodis.comelectronic components distributor
IOC1[7:6]I/O TIM1 channel, mappable through software
GPIOI/O General purpose
PR[1]KWR[1]IKey Wakeup
TXCAN1O TX of CAN1
IOC0[7]I/O TIM0 channel, mappable through software
GPIOI/O General purpose
PR[0]KWR[0]IKey Wakeup
RXCAN1IRX of CAN1
IOC0[6]I/O TIM0 channel, mappable through software
GPIOI/O General purpose
MC9S12XHY-Family Reference Manual, Rev. 1.01
70Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Port Pin Name
Pin Function
& Priority
1
I/ODescription
Pin Function
after Reset
SSI/O SS of SPIGPIO
PS7
SDAI/O SDA of IIC
PWM3O PWM channel 3, mappable through software
GPIOI/O General purpose
PS6KWS[6]IKey Wakeup
SCKI/O SCK of SPI
PWM2O PWM channel 2, mappable through software
GPIOI/O General purpose
KWS[5]IKey Wakeup
PS5
MOSII/O MOSI of SPI
PWM1O PWM channel 1, mappable through software
GPIOI/O General purpose
MISOI/O MISO of SPI
PS4
S
SCLI/O SCL of IIC
PWM0O PWM channel 0, mappable through software
GPIOI/O General purpose
TXCAN0O TX of CAN0
PS3
KWS3IKey Wakeup
PWM5O PWM channel 5, mappable through software
GPIOI/O General purpose
RXCAN0IRX of CAN0
PS2
KWS2IKey Wakeup
PWM4O PWM channel 4, mappable through software
GPIOI/O General purpose
TXD0I/O Serial Communication Interface(SCI0) transmit pin
PS1
PWM7I/O PWM channel 7, mappable through software
GPIOI/O General purpose
RXD0I/O Serial Communication Interface(SCI0) receive pin
PS0
PWM6O PWM channel 6, mappable through software
GPIOI/O General purpose
TPT[7:4]FP[16:13]O LCD segment driver outputGPIO
KWT[7:4]IKey Wakeup
IOC0[7:4]I/O Timer0 Channels 7-4
GPIOI/O General purpose
PT[3:0]FP[11:8]O LCD segment driver output
KWT[3:0]IKey Wakeup
IOC1[7:4]I/O Timer1 Channels 7-4
GPIOI/O General purpose
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor71
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Port Pin Name
Pin Function
& Priority
1
I/ODescription
Pin Function
after Reset
UPU[7]M1SINPI/O SSD1 Sine+ NodeGPIO
M1C1PO Motor control output for motor 1
GPIOI/O General purpose
PU[6]M1SINMI/O SSD1 Sine- Node
M1C1MO Motor control output for motor 1
IOC0_3I/O TIM0 channel 3
GPIOI/O General purpose
PU[5]M1COSPI/O SSD1 Cosine+ Node
M1C0PO Motor control output for motor 1
GPIOI/O General purpose
PU[4]M1COSMI/O SSD1 Cosine- Node
M1C0MO Motor control output for motor 1
IOC0_2I/O TIM0 channel2
GPIOI/O General purpose
PU[3]M0SINPI/O SSD0 Sine+ Node
M0C1PO Motor control output for motor 0
GPIOI/O General purpose
PU[2]M0SINMI/O SSD0 Sine- Node
M0C1MO Motor control output for motor 0
IOC0_1I/O TIM0 channel 1
GPIOI/O General purpose
PU[1]M0COSPI/O SSD0 Cosine+ Node
M0C0PO Motor control output for motor 0
GPIOI/O General purpose
PU[0]M0COSMI/O SSD0 Cosine- Node
M0C0MO Motor control output for motor 0
IOC0_0I/O TIM0 channel 0
GPIOI/O General purpose
MC9S12XHY-Family Reference Manual, Rev. 1.01
72Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Port Pin Name
PV[7]M3SINPI/O SSD3 Sine+ NodeGPIO
PV[6]M3SINMI/O SSD3 Sine- Node
PV[5]M3COSPI/O SSD3 Cosine+ Node
PV[4]M3COSMI/O SSD3 cosine- node
PV3M2SINPI/O SSD2 sine+ node
V
PV2M2SINMI/O SSD2 sine- node
PV1M2COSPI/O SSD2 cosine+ node
PV0M2COSMI/O SSD2 cosine- node
Pin Function
& Priority
I/ODescription
1
M3C1PO Motor control output for motor 3
GPIOI/O General purpose
M3C1MO Motor control output for motor 3
IOC0_7I/O TIM0 channel 7
IOC1_3I/O TIM1 channel 3
GPIOI/O General purpose
M3C0PO Motor control output for motor 3
GPIOI/O General purpose
M3C0MO Motor control output for motor 3
IOC0_6I/O TIM0 channel 6
IOC1_2I/O TIM1 channel 2
GPIOI/O General purpose
M2C1PO Motor control output for Motor 2
SDAI/O SDA of IIC, mappable through software
PWM7I/O PWM channel 7, mappable through software
SSI/O SS of SPI, mappable through software
GPIOI/O General purpose
M2C1MO Motor control output for Motor 2
IOC0_5I/O TIM0 channel 5
IOC1_1I/O TIM1 channel 1
SCKI/O SCK of SPI, mappable through software
PWM6I/O PWM channel 6, mappable through software
GPIOI/O General purpose
M2C0PO Motor control output for Motor 2
MOSII/O MOSI of SPI, mappable through software
PWM5O PWM channel 5, mappable through software
GPIOI/O General purpose
M2C0MO Motor control output for Motor 2
IOC0_4I/O TIM0 channel 4
IOC1_0I/O TIM1 channel 0
SCLI/O SCL of IIC, mappable through software
PWM4O PWM channel 4, mappable through software
MISOI/O MISO of SPI, mappable through software
Pin Function
after Reset
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor73
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
1
Signals in brackets denote alternative module routing pins.
2
Function active when RESET asserted.
2.3Memory Map and Register Definition
This section provides a detailed description of all Port Integration Module registers.
2.3.1Memory Map
Table 2-2 shows the register map of the Port Integration Module.
Table 2-2. Block Memory Map
Offset or
Port
Address
AB0x0000PORTA—Port A Data RegisterR/W0x002.3.3/2-86
0x0001PORTB—Port B Data RegisterR/W0x002.3.4/2-87
0x0002DDRA—Port A Data Direction RegisterR/W0x002.3.5/2-87
0x0003DDRB—Port B Data Direction RegisterR/W0x002.3.6/2-88
RegisterAccess Reset Value Section/Page
0x0004
0x0009
0x000A
0x000B
AB0x000CPUCR—Pull-up Up Control RegisterR/W
0x000DPIM ReservedR/W0x002.3.9/2-90
0x000E
0x001B
0x001CECLKCTL—ECLK Control RegisterR/W0x802.3.10/2-91
0x001DPIM ReservedR0x002.3.11/2-91
0x001EIRQCR—IRQ Control RegisterR/W
0x001FPIM ReservedR0x002.3.13/2-92
0x0020
0x023F
PIM ReservedR0x002.3.9/2-90
:
:
Non-PIM address range
:
Non-PIM address range
:
Non-PIM address range
:
1
1
1
---
2
---
2
---
0x432.3.8/2-89
0x002.3.12/2-92
MC9S12XHY-Family Reference Manual, Rev. 1.01
74Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Table 2-2. Block Memory Map (continued)
Offset or
Port
Address
T0x0240PTT—Port T Data RegisterR/W0x002.3.14/2-93
0x0241PTIT—Port T Input RegisterR
0x0242DDRT—Port T Data Direction RegisterR/W0x002.3.16/2-95
0x0243PIM ReservedR/W0x002.3.34/2-109
0x0244PERT—Port T Pull Device Enable RegisterR/W0xFF2.3.18/2-96
0x0245PPST—Port T Polarity Select RegisterR/W0xFF2.3.19/2-96
0x0246PIM ReservedR0x002.3.38/2-111
0x0247PTTRR— Port T Routing RegisterR/W0x002.3.21/2-97
S0x0248PTS—Port S Data RegisterR/W0x002.3.22/2-98
0x0249PTIS—Port S Input RegisterR
0x024ADDRS—Port S Data Direction RegisterR/W0x002.3.24/2-101
0x024BPIM ReservedR/W0x002.3.25/2-102
RegisterAccess Reset Value Section/Page
3
3
2.3.15/2-94
2.3.23/2-100
0x024CPERS—Port S Pull Device Enable RegisterR/W0xFF2.3.26/2-103
0x024DPPSS—Port S Polarity Select RegisterR/W0x002.3.27/2-103
0x024EWOMS—Port S Wired-Or Mode RegisterR/W0x002.3.28/2-104
0x024FPTSRR— Port S Routing RegisterR/W0x002.3.29/2-104
M0x0250PTM—Port M Data RegisterR/W0x002.3.31/2-106
0x0251PTIM—Port M Input RegisterR
3
2.3.32/2-107
0x0252DDRM—Port M Data Direction RegisterR/W0x002.3.16/2-95
0x0253PIM ReservedR/W0x002.3.42/2-113
0x0254PERM—Port M Pull Device Enable RegisterR/W0xFF2.3.18/2-96
0x0255PPSM—Port M Polarity Select RegisterR/W0x002.3.19/2-96
0x0256WOMM—Port MWired-Or Mode RegisterR/W0x002.3.38/2-111
0x0257PIM ReservedR/W0x002.3.21/2-97
P0x0258PTP—Port P Data RegisterR/W0x002.3.39/2-111
0x0259PTIP—Port P Input RegisterR
3
2.3.40/2-112
0x025ADDRP—Port P Data Direction RegisterR/W0x002.3.41/2-112
0x025BPIM ReservedR/W0x002.3.42/2-113
0x025CPERP—Port P Pull Device Enable RegisterR/W0xFF2.3.43/2-113
0x025DPPSP—Port P Polarity Select RegisterR/W0xFF2.3.44/2-114
0x025EPTPRRH— Port P Routing Register HighR/W0x002.3.45/2-114
0x025FPTPRRL— Port P Routing Register LowR/W0x002.3.46/2-115
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor75
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Table 2-2. Block Memory Map (continued)
Offset or
Port
Address
H0x0260PTH—Port H Data RegisterR/W0x002.3.47/2-116
0x0261PTIH—Port H Input RegisterR
0x0262DDRH—Port H Data Direction RegisterR/W0x002.3.49/2-118
0x0263PIM ReservedR/W0x002.3.50/2-120
0x0264PERH—Port H Pull Device Enable RegisterR/W0xFF2.3.51/2-120
0x0265PPSH—Port H Polarity Select RegisterR/W0xFF2.3.52/2-120
0x0266WOMH—Port H Wired-Or Mode RegisterR/W0x002.3.53/2-121
0x0267PTHRR— Port H Routing RegisterR0x002.3.54/2-122
RegisterAccess Reset Value Section/Page
3
2.3.48/2-118
0x0268
PIM ReservedR0x002.3.55/2-122
:
0x026F
AD0x0270PT0AD—Port AD Data RegisterR0x002.3.56/2-123
0x0271PT1AD—Port AD Data RegisterR/W0x002.3.56/2-123
0x0272DDR0AD - Port AD Data Direction RegisterR0x002.3.58/2-124
0x0273DDR1AD - Port AD Data Direction RegisterR/W0x002.3.58/2-124
0x0274PIM ReservedR0x002.3.60/2-125
0x0275PIM ReservedR/W0x002.3.42/2-113
0x0276PER0AD—Port AD Pull Up Enable RegisterR0x002.3.62/2-126
0x0277PER1AD—Port AD Pull Up Enable RegisterR/W0x002.3.62/2-126
0x0278
PIM ReservedR0x002.3.64/2-127
:
0x027F
R0x0280PTR—Port R Data RegisterR/W0x002.3.65/2-127
0x0281PTIR—Port R Input RegisterR
3
2.3.66/2-129
0x0282DDRR—Port R Data Direction RegisterR/W0x002.3.67/2-130
0x0283PIM ReservedR/W0x002.3.68/2-131
0x0284PERR—Port R Pull Device Enable RegisterR/W0xFF2.3.69/2-131
0x0285PPSR—Port R Polarity Select RegisterR/W0xFF2.3.70/2-132
0x0286WOMR—Port R Wired-Or Mode RegisterR/W0x002.3.71/2-132
0x0287PIM ReservedR0x002.3.72/2-133
MC9S12XHY-Family Reference Manual, Rev. 1.01
76Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Table 2-2. Block Memory Map (continued)
Offset or
Port
Address
Key
0x0288PIET—Port T Interrupt Enable RegisterR/W0x002.3.73/2-133
Wak
0x0289PIFT—Port T Interrupt Flag RegisterR/W0x002.3.74/2-134
eup
0x028APIES—Port S Interrupt Enable RegisterR/W0x002.3.75/2-134
0x028BPIFS—Port S Interrupt Flag RegisterR/W0x002.3.76/2-135
0x028CPIE1AD—Port AD Interrupt Enable RegisterR/W0x002.3.77/2-135
0x028DPIF1AD—Port AD Interrupt Flag RegisterR/W0x002.3.78/2-136
0x028EPIER—Port R Interrupt Enable RegisterR/W0x002.3.79/2-136
0x028FPIFR—Port R Interrupt Flag RegisterR/W0x002.3.80/2-137
U0x0290PTU—Port U Data RegisterR/W0x002.3.81/2-137
0x0291PTIU—Port U input RegisterR
0x0292DDRU—Port U Data Direction RegisterR/W0x002.3.83/2-139
0x0293PIM ReservedR0x002.3.84/2-139
RegisterAccess Reset Value Section/Page
3
2.3.82/2-138
0x0294PERU—Port U Pull Device Enable RegisterR/W0x002.3.85/2-140
0x0295PPSU—Port U Polarity Select RegisterR/W0x002.3.86/2-140
0x0296SRRU—Port U Slew Rate RegisterR/W0x002.3.87/2-141
0x0297PTURR— Port S Routing Register PIM ReservedR0x002.3.88/2-141
V0x0298PTV—Port V Data RegisterR/W0x002.3.89/2-143
0x0299PTIV—Port V Input RegisterR
3
2.3.90/2-145
0x029ADDRV—Port V Data Direction RegisterR/W0x002.3.91/2-146
0x029BPIM ReservedR0x002.3.92/2-148
0x029CPERV—Port V Pull Device Enable RegisterR/W0x002.3.93/2-148
0x029DPPSV—Port V Polarity Select RegisterR/W0x002.3.94/2-148
0x029ESRRV—Port V Slew Rate RegisterR/W0x002.3.95/2-149
0x029FPTVRR— Port S Routing RegisterR0x002.3.96/2-150
1
Refer to memory map in SoC Guide to determine related module
2
Write access not applicable for one or more register bits. Refer to register description
3
Read always returns logic level on pins.
Register
Name
Bit 7654321Bit 0
0x0000
PORTA
R
PA7PA6PA5PA4PA3PA2PA1PA0
W
= Unimplemented or Reserved
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor77
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Register
Name
0x0001
PORTB
0x0002
DDRA
0x0003
DDRB
0x0004
-0x0009
Reserved
0x000A
0x000B
Non-PIM
Address
Range
0x000C
PUCR
Bit 7654321Bit 0
R
PB7PB6PB5PB4PB3PB2PB1PB0
W
R
DDRA7DDRA6DDRA5DDRA4DDRA3DDRA2DDRA1DDRA0
W
R
DDRB7DDRB6DDRB5DDRB4DDRB3DDRB2DDRB1DDRB0
W
R00000000
W
R
W
R0
W
BKPUE
0000
Non-PIM Address Range
PUPBEPUPAE
0x000D
Reserved
0x000E–
0x001B
Non-PIM
Address
Range
0x001C
ECLKCTL
0x001D
Reserved
0x001E
IRQCR
0x001F
Reserved
R00000000
W
R
W
W
R
NECLK
0
DIV16EDIV4EDIV3EDIV2EDIV1EDIV0
Non-PIM Address Range
R00000000
W
R
IRQEIRQENXIRQEN
W
00000
R00000000
W
= Unimplemented or Reserved
MC9S12XHY-Family Reference Manual, Rev. 1.01
78Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Register
Name
0x0020–
0x023F
Non-PIM
Address
Range
0x0240
PTT
0x0241
PTIT
0x0242
DDRT
0x0243
Reserved
0x0244
PERT
Bit 7654321Bit 0
R
W
R
PTT7PTT6PTT5PTT4PTT3PTT2PTT1PTT0
W
Non-PIM Address Range
RPTIT7PTIT6PTIT5PTIT4PTIT3PTIT2PTIT1PTIT0
W
R
DDRT7DDRT6DDRT5DDRT4DDRT3DDRT2DDRT1DDRT0
W
R00000000
W
R
PERT7PERT6PERT5PERT4PERT3PERT2PERT1PERT0
W
0x0245
PPST
0x0246
Reserved
0x0247
PTTRR
0x0248
PTS
0x0249
PTIS
0x024A
DDRS
0x024B
Reserved
0x024C
PERS
R
PPST7PPST6PPST5PPST4PPST3PPST2PPST1PPST0
W
R00000000
W
R
PTTRR7PTTRR6PTTRR5PTTRR4PTTRR3PTTRR2PTTRR1PTTRR0
W
R
PTS7PTS6PTS5PTS4PTS3PTS2PTS1PTS0
W
RPTIS7PTIS6PTIS5PTIS4PTIS3PTIS2PTIS1PTIS0
W
R
DDRS7DDRS6DDRS5DDRS4DDRS3DDRS2DDRS1DDRS0
W
R00000000
W
R
PERS7PERS6PERS5PERS4PERS3PERS2PERS1PERS0
W
= Unimplemented or Reserved
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor79
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Register
Name
0x024D
PPSS
0x024E
WOMS
0x024F
PTSRR
0x0250
PTM
0x0251
PTIM
0x0252
DDRM
0x0253
Reserved
Bit 7654321Bit 0
R
PPSS7PPSS6PPSS5PPSS4PPSS3PPSS2PPSS1PPSS0
W
R
WOMS7WOMS6WOMS5WOMS4WOMS3WOMS2WOMS1WOMS0
W
R00
W
PTSRR5PTSRR4
R0000
W
00
PTSRR1PTSRR0
PTM3PTM2PTM1PTM0
R0000PTIM3PTIM2PTIM1PTIM0
W
R0000
W
DDRM3DDRM2DDRM1DDRM0
R00000000
W
0x0254
PERM
0x0255
PPSM
0x0256
WOMM
0x0257
Reserved
0x0258
PTP
0x0259
PTIP
0x025A
DDRP
0x025B
Reserved
R0000
W
R0000
W
R000000
W
PERM3PERM2PERM1PERM0
PPSM3PPSM2PPSM1PPSM0
WOMM1WOMM0
R00000000
W
R
PTP7PTP6PTP5PTP4PTP3PTP2PTP1PTP0
W
RPTIP7PTIP6PTIP5PTIP4PTIP3PTIP2PTIP1PTIP0
W
R
DDRP7DDRP6DDRP5DDRP4DDRP3DDRP2DDRP1DDRP0
W
R00000000
W
= Unimplemented or Reserved
MC9S12XHY-Family Reference Manual, Rev. 1.01
80Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Register
Name
0x0297
PTURR
0x0298
PTV
0x0299
PTIV
0x029A
DDRV
0x029B
Reserved
0x029C
PERV
0x0294D
PPSV
0x029E
SRRV
Bit 7654321Bit 0
R0000
W
R
PTV7PTV6PTV5PTV4PTV3PTV2PTV1PTV0
W
RPTIV7PTIV6PTIV5PTIV4PTIV3PTIV2PTIV1PTIV0
W
R
DDRV7DDRV6DDRV5DDRV4DDRV3DDRV2DDRV1DDRV0
W
R00000000
W
R
PERV7PERV6PERV5PERV4PERV3PERV2PERV1PERV0
W
R
PPSV7PPSV6PPSV5PPSV4PPSV3PPSV2PPSV1PPSV0
R
SRRV7SRRV6SRRV5SRRV4SRRV3SRRV2SRRV1SRRV0
W
PTURR3PTURR2
00
0x029F
PTVRR
R0000
W
= Unimplemented or Reserved
PTVRR3PTVRR2
00
2.3.2Register Descriptions
The following table summarizes the effect of the various configuration bits, i.e. data direction (DDR),
output level (IO), pull enable (PE), pull select (PS) on the pin function and pull device activity.
The configuration bit PS is used for two purposes:
1. Configure the sensitive interrupt edge (rising or falling), if interrupt is enabled.
2. Select either a pull-up or pull-down device if PE is active.
MC9S12XHY-Family Reference Manual, Rev. 1.01
84Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Table 2-3. Pin Configuration Summary
Port Integration Module (S12XHYPIMV1)
1
DDRIORDR
0xx0x0InputDisabledDisabled
0xx100InputPull UpDisabled
0xx110InputPull DownDisabled
0xx001InputDisabledFalling edge
0xx011InputDisabledRising edge
0xx101InputPull UpFalling edge
0xx111InputPull DownRising edge
100xx0Output, full drive to 0DisabledDisabled
110xx0Output, full drive to 1DisabledDisabled
101xx0Output, reduced drive to 0DisabledDisabled
111xx0Output, reduced drive to 1DisabledDisabled
100x01Output, full drive to 0DisabledFalling edge
110x11Output, full drive to 1DisabledRising edge
101x01Output, reduced drive to 0DisabledFalling edge
111x11Output, reduced drive to 1DisabledRising edge
1
not Applicable only on MC9S12XHY
2
Always “1” on Port A, B, and always “0” on AD.
3
Applicable only on Port T, S, R,M and AD.
PEPS
2
IE
3
FunctionPull DeviceInterrupt
NOTE
All register bits in this module are completely synchronous to internal
clocks during a register read.
NOTE
Figure of port data registers also display the alternative functions if
applicable on the related pin as defined in Table 2-1. Names in brackets
denote the availability of the function when using a specific routing option.
NOTE
Figures of module routing registers also display the module instance or
module channel associated with the related routing bit.
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor85
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
2.3.3Port A Data Register (PORTA)
Address 0x0000 (PRR)Access: User read/write
76543210
R
PA7PA6PA5PA4PA3PA2PA1PA0
W
————API_EXTCLK—XIRQIRQ
Altern.
Function
FP36FP35FP34FP33FP32FP31FP30FP29
Reset00000000
Figure 2-1. Port A Data Register (PORTA)
1
Read: Anytime. The data source is depending on the data direction value.
Write: Anytime
Table 2-4. PORTA Register Field Descriptions
FieldDescription
7-4,2PAPort A general purpose input/output data—Data Register, LCD segment driver output
The associated pin can be used as general purpose I/O when not used as alternative function is not enabled. In
general purpose output mode the register bit value is driven to the pin. If the associated data direction bit is set to 1,
a read returns the value of the port register bit, otherwise the buffered pin input state is read.
• The LCD segment driver output takes precedence over the general purpose I/O function if the related LCD
segment is enabled.
1
PA
PA
PA
3
Port A general purpose input/output data—Data Register, LCD segment driver output, API_EXTCLK
The associated pin can be used as general purpose I/O when not used as alternative function. In general purpose
output mode the register bit value is driven to the pin. If the associated data direction bit is set to 1, a read returns
the value of the port register bit, otherwise the buffered pin input state is read.
• The LCD segment driver output takes precedence over the API_EXTCLK and general purpose I/O function if the
related LCD segment is enabled.
• The API_EXTCLKtakesprecedence overthe general purpose I/Ofunction if the API_EXTCLK functionis enabled
1
Port A general purpose input/output data—Data Register, LCD segment driver output,
XIRQ
The associated pin can be used as general purpose I/O when not used as alternative function. In general purpose
output mode the register bit value is driven to the pin. If the associated data direction bit is set to 1, a read returns
the value of the port register bit, otherwise the buffered pin input state is read.
• The LCD segment driver output takes precedence over the
XIRQ and general purpose I/O function if the related
LCD segment is enabled.
• The
XIRQ takes precedence over the general purpose I/O function if the XIRQ function is enabled
0
Port A general purpose input/output data—Data Register, LCD segment driver output,IRQ
The associated pin can be used as general purpose I/O when not used as alternative function. In general purpose
output mode the register bit value is driven to the pin. If the associated data direction bit is set to 1, a read returns
the value of the port register bit, otherwise the buffered pin input state is read.
• The LCD segment driver output takes precedence over the
IRQ and general purpose I/O function if the related
LCD segment is enabled.
• The
IRQ takes precedence over the general purpose I/O function if the IRQ function is enabled
MC9S12XHY-Family Reference Manual, Rev. 1.01
86Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
2.3.4Port B Data Register (PORTB)
Port Integration Module (S12XHYPIMV1)
Address 0x0001 (PRR)Access: User read/write
76543210
R
W
Altern.
Function
Reset00000000
PB7PB6PB5PB4PB3PB2PB1PB7
BP3BP2BP1BP0FP39FP38FP37FP28
Figure 2-2. Port B Data Register (PORTB)
1
Read: Anytime. The data source is depending on the data direction value.
Write: Anytime
Table 2-5. PORTB Register Field Descriptions
FieldDescription
7-0
PB
Port B general purpose input/output data—Data Register, LCD segment driver output
The associated pin can be used as general purpose I/O when not used as alternative function. In general purpose
output mode the register bit value is driven to the pin. If the associated data direction bit is set to 1, a read returns
the value of the port register bit, otherwise the buffered pin input state is read.
• The LCD segment driver output takes precedence over the general purpose I/O function if the related LCD
segment is enabled.
1
2.3.5Port A Data Direction Register (DDRA)
Address 0x0002 (PRR)Access: User read/write
76543210
R
DDRA7DDRA6DDRA5DDRA4DDRA3DDRA2DDRA1DDRA0
W
Reset00000000
Figure 2-3. Port A Data Direction Register (DDRA)
1
Read: Anytime
Write: Anytime
1
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor87
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Table 2-6. DDRA Register Field Descriptions
FieldDescription
7-4,2
DDRA
3
DDRA
1
DDRA
0
DDRA
Port A Data Direction—
This bit determines whether the associated pin is an input or output.
If corresponding LCD segment is enabled, it will be forced as input/output disable
1 Associated pin is configured as output
0 Associated pin is configured as input
Port A Data Direction—
This bit determines whether the associated pin is an input or output.
If corresponding LCD segment is enabled, it will be forced as input/output disabled
Else if API_EXTCLK is enabled, it will be forced as output
1 Associated pin is configured as output
0 Associated pin is configured as input
Port A Data Direction—
This bit determines whether the associated pin is an input or output.
If corresponding LCD segment is enabled, it will be forced as input/output disabled
Else if
XIRQ is enabled, it will be forced as input
1 Associated pin is configured as output
0 Associated pin is configured as input
Port A Data Direction—
This bit determines whether the associated pin is an input or output.
If corresponding LCD segment is enabled, it will be forced as input/output disabled
Else if /
IRQ is enabled, it will be forced as input
1 Associated pin is configured as output
0 Associated pin is configured as input
2.3.6Port B Data Direction Register (DDRB)
Address 0x0003 (PRR)Access: User read/write
76543210
R
DDRB7DDRB6DDRB5DDRB4DDRB3DDRB2DDRB1DDRB0
W
Reset00000000
Figure 2-4. Port B Data Direction Register (DDRB)
1
Read: Anytime
Write: Anytime
1
MC9S12XHY-Family Reference Manual, Rev. 1.01
88Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Table 2-7. DDRB Register Field Descriptions
FieldDescription
Port Integration Module (S12XHYPIMV1)
7-0
DDRB
Port B Data Direction—
This bit determines whether the associated pin is an input or output.
If corresponding LCD segment is enabled, it will be forced as input/output disabled
1 Associated pin is configured as output
0 Associated pin is configured as input
NOTE
Due to internal synchronization circuits, it can take up to 2 bus clock cycles
until the correct value is read on PTA, PTB registers, when changing the
DDRA,DDRB register.
2.3.7PIM Reserved Register
Address 0x0004 (PRR) to 0x0009 (PRR)Access: User read
76543210
R00000000
W
Reset00000000
1
= Unimplemented or Reserved
Figure 2-5. PIM Reserved Register
1
Read: Always reads 0x00
Write: Unimplemented
2.3.8Ports A, B, BKGD pin Pull Control Register (PUCR)
Address 0x000C (PRR)Access: User read/write
76543210
R0
W
Reset01000011
BKPUE
= Unimplemented or Reserved
Figure 2-6. Ports AB, BKGD pin Pull Control Register (PUCR)
1
Read:Anytime in single-chip modes.
Write:Anytime, except BKPUE which is writable in Special Single-Chip Mode only.
0000
PUPBEPUPAE
1
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor89
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Table 2-8. PUCR Register Field Descriptions
FieldDescription
6
BKPUE
BKGD pin pull-up Enable—Enable pull-up device on pin
This bit configures whether a pull-up device is activated, if the pin is used as input. If a pin is used as output this bit
has no effect.
Port B Pull-down Enable—Enable pull-down devices on all port input pins
This bit configures whether a pull-down deviceis activated on all associated portinput pins. If a pin is used as output
this bit has no effect.
Port A Pull-down Enable—Enable pull-down devices on all port input pins
This bit configures whether a pull-down deviceis activated on all associated portinput pins. If a pin is used as output
this bit has no effect.
Downloaded from Elcodis.comelectronic components distributor
2.3.10ECLK Control Register (ECLKCTL)
Port Integration Module (S12XHYPIMV1)
Address 0x001C (PRR)Access: User read/write
76543210
R
NECLK
0
DIV16EDIV4EDIV3EDIV2EDIV1EDIV0
1
W
Reset:10000000
= Unimplemented or Reserved
Figure 2-8. ECLK Control Register (ECLKCTL)
1
Read: Anytime
Write: Anytime
Table 2-9. ECLKCTL Register Field Descriptions
FieldDescription
7
NECLK
5
DIV16
No ECLK—Disable ECLK output
This bit controls the availability of a free-running clock on the ECLK pin. This clock has a fixed rate of equivalent to
the internal bus clock.
1 ECLK disabled
0 ECLK enabled
Free-running ECLK predivider—Divide by 16
This bit enables a divide-by-16 stage on the selected EDIV rate.
Free-running ECLK Divider—Configure ECLK rate
These bits determine the rate of the free-running clock on the ECLK pin.
00000 ECLK rate = bus clock rate
1
00001 ECLK rate = bus clock rate divided by 2
00010 ECLK rate = bus clock rate divided by 3,...
11111 ECLK rate = bus clock rate divided by 32
1
when EDIV=00000 DIV16-0,and bus clock>=32MHz, ECLK output maybe cannot work
2.3.11PIM Reserved Register
Address 0x001D (PRR)Access: User read
76543210
R00000000
W
Reset00000000
= Unimplemented or Reserved
Figure 2-9. PIM Reserved Register
1
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor91
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
1
Read: Always reads 0x00
Write: Unimplemented
2.3.12IRQ Control Register (IRQCR)
Address 0x001EAccess: User read/write
76543210
R
IRQEIRQENXIRQEN
W
Reset00000000
= Unimplemented or Reserved
00000
Figure 2-10. IRQ Control Register (IRQCR)
1
Read: See individual bit descriptions below.
Write: See individual bit descriptions below.
Table 2-10. IRQCR Register Field Descriptions
FieldDescription
7
IRQE
IRQ select edge sensitive only—
Special mode: Read or write anytime.
Normal mode: Read anytime, write once.
1
IRQ pin configured to respond only to fallingedges. Falling edges on the IRQ pin will be detected anytime IRQE=1
and will be cleared only upon a reset or the servicing of the
0
IRQ pin configured for low level recognition
IRQ interrupt.
1
6
IRQEN
5
XIRQEN
IRQ enable—
Read or write anytime.
1
IRQ pin is connected to interrupt logic
0
IRQ pin is disconnected from interrupt logic
XIRQ enable—
Special mode: Read or write anytime.
Normal mode: Read anytime, write once.
1
XIRQ pin is connected to interrupt logic
0
XIRQ pin is disconnected from interrupt logic
2.3.13PIM Reserved Register
This register is reserved for factory testing of the PIM module and is not available in normal operation.
MC9S12XHY-Family Reference Manual, Rev. 1.01
92Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Address 0x001FAccess: User read
76543210
R00000000
W
Reset00000000
= Unimplemented or Reserved
Figure 2-11. PIM Reserved Register
1
Read: Always reads 0x00
Write: Unimplemented
2.3.14Port T Data Register (PTT)
Address 0x0240Access: User read/write
76543210
R
PTT7PTT6PTT5PTT4PTT3PTT2PTT1PTT0
W
1
1
IOC0_7IOC0_6IOC0_5IOC0_4IOC1_7IOC1_6IOC1_5IOC1_4
Altern.
Function
FP16FP15FP14FP13FP11FP10FP9FP8
Reset00000000
Figure 2-12. Port T Data Register (PTT)
1
Read: Anytime. The data source is depending on the data direction value.
Write: Anytime
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor93
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Table 2-11. PTT Register Field Descriptions
FieldDescription
7-4
PTT
Port T general purpose input/output data—Data Register, LCD segment driver output, TIM0 output
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin. If the associated data direction bit is set to 1, a read
returns the value of the port register bit, otherwise the buffered pin input state is read.
• The LCD segment driver output takes precedence overthe TIM0 and general purpose I/O function if related LCD
segment is enabled
3-0
PTT
• The TIM0 output function takes precedence over the general purpose I/O function if the related channel is
enabled.
Port T general purpose input/output data—Data Register, LCD segment driver output, TIM1 output
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
1
purpose output mode the register bit value is driven to the pin. If the associated data direction bit is set to 1, a read
returns the value of the port register bit, otherwise the buffered pin input state is read.
• The LCD segment driver output takes precedence overthe TIM1 and general purpose I/O function if related LCD
segment is enabled
• The TIM1 output function takes precedence over the general purpose I/O function if the related channel is
enabled.
1
In order TIM input capture to be function correctly, the corresponding DDRT bit should be set to 0
1
2.3.15Port T Input Register (PTIT)
Address 0x0241Access: User read
76543210
RPTIT7PTIT6PTIT5PTIT4PTIT3PTIT2PTIT1PTIT0
1
W
Resetuuuuuuuu
= Unimplemented or Reservedu = Unaffected by reset
Figure 2-13. Port T Input Register (PTIT)
1
Read: Anytime
Write:Never, writes to this register have no effect.
Table 2-12. PTIT Register Field Descriptions
FieldDescription
7-0
PTIT
Port T input data—
A read alwaysreturns the bufferedinput state of the associated pin. It can be used to detect overload or short circuit
conditions on output pins.
MC9S12XHY-Family Reference Manual, Rev. 1.01
94Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
2.3.16Port T Data Direction Register (DDRT)
Port Integration Module (S12XHYPIMV1)
Address 0x0242Access: User read/write
76543210
R
DDRT7DDRT6DDRT5DDRT4DDRT3DDRT2DDRT1DDRT0
W
Reset00000000
Figure 2-14. Port T Data Direction Register (DDRT)
1
Read: Anytime
Write: Anytime
Table 2-13. DDRT Register Field Descriptions
FieldDescription
7-4
DDRT
3-0
DDRT
Port T data direction—
This bit determines whether the pin is an input or output.
If corresponding LCD segment is enabled, it will be forced as input/output disabled
Else If corresponding TIM0 output compare channel is enabled, it will be forced as output.
1 Associated pin is configured as output
0 Associated pin is configured as input
Port T data direction—
This bit determines whether the pin is an input or output.
If corresponding LCD segment is enabled, it will be forced as input/output disabled
Else If corresponding TIM1 output compare channel is enabled, it will be forced as output.
1
1 Associated pin is configured as output
0 Associated pin is configured as input
NOTE
Due to internal synchronization circuits, it can take up to 2 bus clock cycles
until the correct valueis read on PTT or PTIT registers, when changing the
DDRT register.
2.3.17PIM Reserved Register
Address 0x0243Access: User read/write
76543210
R00000000
W
W
Reset00000000
Figure 2-15. PIM Reserved Register
1
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor95
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
1
Read: Anytime
Write: Anytime
2.3.18Port T Pull Device Enable Register (PERT)
Address 0x0244Access: User read/write
76543210
R
PERT7PERT6PERT5PERT4PERT3PERT2PERT1PERT0
W
Reset11111111
Figure 2-16. Port T Pull Device Enable Register (PERT)
1
Read: Anytime
Write: Anytime
Table 2-14. PERT Register Field Descriptions
FieldDescription
7-0
PERT
Port T pull device enable—Enable pull device on input pin
This bit controls whether a pull device on the associated port input pin is active. If a pin is used as output this bit has
no effect. The polarity is selected by the related polarity select register bit.
1 Pull device enabled
0 Pull device disabled
2.3.19Port T Polarity Select Register (PPST)
1
Address 0x0245Access: User read/write
76543210
R
PPST7PPST6PPST5PPST4PPST3PPST2PPST1PPST0
W
Reset11111111
Figure 2-17. Port T Polarity Select Register (PPST)
1
Read: Anytime
Write: Anytime
Table 2-15. PPST Register Field Descriptions
FieldDescription
7-0
PPST
96Freescale Semiconductor
Port T pull device select—Configure pull device polarity on input pin
This bit selects a pull-up or a pull-down device if enabled on the associated port input pin.
1 A pull-down device is selected
0 A pull-up device is selected
MC9S12XHY-Family Reference Manual, Rev. 1.01
1
Downloaded from Elcodis.comelectronic components distributor
2.3.20PIM Reserved Register
Port Integration Module (S12XHYPIMV1)
Address 0x0246Access: User read
76543210
R00000000
W
Reset00000000
= Unimplemented or Reserved
Figure 2-18. PIM Reserved Register
1
Read: Always reads 0x00
Write: Unimplemented
2.3.21Port T Routing Register (PTTRR)
Address 0x0247Access: User read
76543210
R
PTTRR7PTTRR6PTTRR5PTTRR4PTTRR3PTTRR2PTTRR1PTTRR0
W
Routing
Option
IOC0_7IOC0_5IOC0_4IOC0_6IOC1_7IOC1_6
1
1
Reset00000000
= Unimplemented or Reserved
Figure 2-19. Port T Routing Register (PTTRR)
1
Read: Anytime
Write: Anytime
This register configures the re-routing of TIM0/1 channels on alternative pins on Port R/T.
Table 2-16. Port T Routing Register Field Descriptions
FieldDescription
[7:6]
PTTRR
5
PTTRR
Port T data direction—
This register controls the routing of IOC0_7.
00 IOC0_7 routed to PT7
01 IOC0_7 routed to PR1
10 IOC0_7 routed to PV6
11 IOC0_7 routed to PT7(reserved)
Port T data direction—
This register controls the routing of IOC0_5.
0 IOC0_5 routed to PT5
1 IOC0_5 routed to PV2
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor97
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Table 2-16. Port T Routing Register Field Descriptions (continued)
FieldDescription
4
PTTRR
Port T data direction—
This register controls the routing of IOC0_4.
0 IOC0_4 routed to PT4
1 IOC0_4 routed to PV0
[3:2]
PTTRR
Port T data direction—
This register controls the routing of IOC0_6.
00 IOC0_6 routed to PT6
01 IOC0_6 routed to PR0
10 IOC0_6 routed to PV4
11 IOC0_6 routed to PT6(reserved)
1
PTTRR
Port T data direction—
This register controls the routing of IOC1_7.
0 IOC1_7routed to PT3
1 IOC1_7 routed to PR3
0
PTTRR
Port T data direction—
This register controls the routing of IOC1_6.
0 IOC1_6 routed to PT2
1 IOC1_6 routed to PR2
2.3.22Port S Data Register (PTS)
Address 0x0248Access: User read/write
76543210
R
PTS7PTS6PTS5PTS4PTS3PTS2PTS1PTS0
W
PWM3PWM2PWM1PWM0——PWM7PWM6
SDA——SCL————
Altern.
Function
SSSCKMOSIMISOTXCANRXCANTXDRXD
Reset00000000
Figure 2-20. Port S Data Register (PTS)
1
Read: Anytime The data source is depending on the data direction value.
Write: Anytime
1
MC9S12XHY-Family Reference Manual, Rev. 1.01
98Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
Table 2-17. PTS Register Field Descriptions
FieldDescription
Port Integration Module (S12XHYPIMV1)
7
PTS
6
PTS
5
PTS
Port S general purpose input/output data—Data Register, SPI
SS inout, IIC SDA inout, PWM channel3
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The SPI takes precedence over the IIC, PWM3 and the general purpose I/O function if enabled
• The IIC takes precedence over the PWM3 and the general purpose I/O function if enabled
• The PWM3 takes precedence over the general purpose I/O function if enabled
Port S general purpose input/output data—Data Register, SPI SCK inout, PWM channel2
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The SPI takes precedence over the PWM2 and the general purpose I/O function if enabled
• The PWM2 takes precedence over the general purpose I/O function if enabled
Port S general purpose input/output data—Data Register, SPI MOSI inout, PWM channel1
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The SPI takes precedence over the PWM1 and the general purpose I/O function if enabled
• The PWM1 takes precedence over the general purpose I/O function if enabled
4
PTS
3
PTS
2
PTS
Port S general purpose input/output data—Data Register, SPI MISO inout, IIC SCL inout, PWM channel0
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The SPI takes precedence over the IIC, PWM0 and the general purpose I/O function if enabled
• The IIC takes precedence over the PWM0 and the general purpose I/O function if enabled
• The PWM0 takes precedence over the general purpose I/O function if enabled
Port S general purpose input/output data—Data Register, CAN TX
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The CAN takes precedence over the general purpose I/O function if enabled
Port S general purpose input/output data—Data Register, CAN RX
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The CAN takes precedence over the general purpose I/O function if enabled
MC9S12XHY-Family Reference Manual, Rev. 1.01
Freescale Semiconductor99
Downloaded from Elcodis.comelectronic components distributor
Port Integration Module (S12XHYPIMV1)
Table 2-17. PTS Register Field Descriptions (continued)
FieldDescription
1
PTS
0
PTS
Port S general purpose input/output data—Data Register, SCI TXD, PWM channel7
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The SCI takes precedence over the PWM7 and general purpose I/O function if enabled
• The PWM7 takes precedence over the general purpose I/O function if enabled
Port S general purpose input/output data—Data Register, SCI RXD, PWM channel6
When not used with the alternative function, the associated pin can be used as general purpose I/O. In general
purpose output mode the register bit value is driven to the pin.
If the associated data direction bit is set to 1, a read returns the value of the port register bit, otherwise the buffered
pin input state is read.
• The SCI takes precedence over the PWM6 and general purpose I/O function if enabled
• The PWM6 takes precedence over the general purpose I/O function if enabled
2.3.23Port S Input Register (PTIS)
Address 0x0249Access: User read
76543210
RPTIS7PTIS6PTIS5PTIS4PTIS3PTIS2PTIS1PTIS0
W
1
Resetuuuuuuuu
= Unimplemented or Reservedu = Unaffected by reset
Figure 2-21. Port S Input Register (PTIS)
1
Read: Anytime.
Write:Never, writes to this register have no effect.
Table 2-18. PTIS Register Field Descriptions
FieldDescription
7-0
PTIS
Port S input data—
This register always reads back the buffered state of the associated pins. This can also be used to detect overload
or short circuit conditions on output pins.
MC9S12XHY-Family Reference Manual, Rev. 1.01
100Freescale Semiconductor
Downloaded from Elcodis.comelectronic components distributor
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.