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