To provide the most up-to-date information, the online revision of our documents is the most current. Your
printed copy may be an earlier revision. To verify you have the latest information available, refer to:
freescale.com
The following revision history table summarizes changes. This document contains information for all
constituent modules, with the exception of the S12Z CPU. For S12ZCPU information please refer to the
CPU S12Z Reference Manual. A full list of family members and options is included in the appendices.
Revision History
Date
Sep, 20131.00
Sep, 20131.01
Mar, 20141.02
Revision
Level
Description
First external release version
- replace the ZVH64 100pin with ZVH128 100pin
- CANPHY update to pass conformance test for 2N65E
- Update OSC etc electrical spec
Corrected footers in TOC, S12ZBDC and Appendix N
Removed list of chapters
Corrected TOC format of appendix listing
Corrected SCIBDL reset value
SPI added MISO pin name to block diagram
Changed V
Changed VDDC load current in RPM to 2.5mA
Changed STOP IDD max. to 700uA at 150C
Changed STOP IDD max. to 65uA at -40C
Changed WAIT IDD max to 21mA at 105C
Changed RUN IDD max to 32mA at 105C
Removed incorrect reference to over-temperature protection
Corrected vector mapping of ADC CONIF_OIE interrupt
Changed STOP mode BDC enabled dependency description (section 1.10.3)
Added frequency spec. for WSTAT disable to Operating Conditions table
Updated ADC section (formatting and wording improvements).
Updated BDC section (improved description of NORESP bit)
Updated CPMU section (improved description of CSAD bit)
Updated FTMRZ section (description of protection in SSC Mode)
Removed electrical parameter classification
Removed references to production test (Tables B-3 and L-2)
Added NVM shipping information to appendix G.3
minimum to 2.95V
LVRXA
Jun, 20141.03Corrected ordering information controller family encoding in Appendix N
Updated BKGD pin I/O specification
Sep, 20141.04
Mar, 20151.05
Specified ADC accuracy for a range of VDDA and VREF
Updated CANPHY over current detection specification.
CPMU chapter updated. See chapter revision history
Minor BDC chapter correction. See chapter revision history
Corrected 100LQFP diagram pins 76-79 and Table 1-7 Pin 103 mapping
Removed reference to PortP wake-up capability. It has no wake-up capability
Added Startup from reset parameters based on simulation to Table I-1
Corrected ADC result reference alignment.
Extended BKGD V
0.5Sep 2012 • Update the ADC conversion reference IFR location
0.6Oct 2012 • Add Section 1.3, “Maskset 0N65E and 1N65E device compare“ and update description
0.7Nov 2012 • Update BDC related change on 1N65E
0.8Nov 2012 • Update CANPHY related change on 1N65E
0.9July 2013 • Replace the 64K 100pin with 128K 100pin
Revision
Date
Description of Changes
• update the pin names for ADC/CAN/IIC/CANPHY/SPI/SSG with index number
• Add note on VDDC handle for 100pin
• Fix base on review feedback
• Add FTMRZ related connection
for 1N65E device
• Add 2N65E related update
1.1Introduction
The MC9S12ZVH-Family is an optimized automotive 16-bit microcontroller product line focused on lowcost, high-performance and application component count reduction. This family integrates the components
of an S12HY or S12XHY-family micr ocontroller with a CAN Physical interface, a 5V regulator system to
supply the microcontroller and other components. The MC9S12ZVH-Family is targeted at automotive &
motorcycle instrument cluster applications requiring CAN connectivity, stepper motor gauges, and
segment LCD displays.
The MC9S12ZVH-Family features a 4x40 liquid crystal display (LCD) controller/driver and a pulse
width modulated motor controller (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 MC9S12ZVH-Family delivers an optimized solution with the integration of several key system
components into a single device, optimizing system architecture and achieving significant PCB space
savings. The MC9S12ZVH-Family delivers 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. The MC9S12ZVH-Family also features
S12ZVH Family Reference Manual, Rev. 1. 05
Freescale Semiconductor19
Chapter 1 Device Overview MC9S12ZVH-Family
the revolutionary S12Z CPU with code size & execution efficiencies even higher than our class leading
S12X CPU. This also provides a linear memory map for flash memory for all members of the family,
eliminating the awkwardness and performance impact of page swapping. 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 MC9S12ZVH-Family.
1.2.1MC9S12ZVH-Family Member Comparison
Table 1-2 provides a summary of feature set differences within the MC9S12ZVH-Family. All other
features are common to all MC9S12ZVH-Family members.
Table 1-2. MC9S12ZVH-Family features
FeatureMC9S12ZVH128MC9S12ZVH64
CPUHCS12ZHCS12Z
Flash memory (ECC)128 KB64 KB
EEPROM (ECC)4 KB4 KB
RAM (ECC)8 KB4 KB
Stepper Motor Drive (with HW SSD)244
Segment LCD4 x 324 x 404 x 40
Simple Sound Generator (SSG)YesYesYes
SCI22
SPI11
IIC11
CAN (digital communication
FeatureMC9S12ZVH128MC9S12ZVH64
Frequency modulated PLLYesYes
Internal 1 MHz RC oscillatorYesYes
Autonomous window watchdog1 (with independent clock sourc e )
Direct Battery Voltage sense pinYesYes
Vsup senseYesYes
Chip temperature sensor1 General sensor1 General sensor
VSUP Supply voltage
VDDX Output current
Maximum Bus Frequency32 MHz32 MHz
Package100 pins (LQFP)144 pins (LQFP)144 pins (LQFP)
5.5 V – 18 V (normal operation)
up to 40V (protected operation)
Determined by power dissipation of external
ballast
1 (with independent
clock source)
5.5 V – 18 V (normal
operation)
up to 40V (protected
operation)
Determined by power
dissipation of external
ballast
1. The channles show here just reflect the avaiable IOC pins, the timer are still 2 x 8 channles
1.3Maskset 0N65E and 1N65E device compare
0N65E and 1N65E devices have difference on some module versions. Table 1-3 shows the difference.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 21
Chapter 1 Device Overview MC9S12ZVH-Family
NOTE User should take care when switch from 0N65E to 1N65E device
Table 1-3. Device Difference for 0N65E and 1N65E
0N65E1N65E
RTCV1V2
CPMUV4V6
DBGV1V2
SCIV5V6
FTMRZV1V2
BDCV1V2
CANPHYV1V2
MCUBDC fast clock source to CORE clockBDC fast clock source to Bus clock
ADC reference voltage to IFR
1.4Maskset 2N65E and 1N65E/0N65E device compare
on 2N65E, the CANPHY is update in order to pass conformance test. It changes the bus error behavior to
keep CANH bus driver operational if CANH and/or CANL sensed below ground. See CANPHY block
guide for the detailed information.
1.5Chip-Level Features
On-chip modules available within the family include the following features:
•S12Z CPU core
•128 or 64 KB on-chip flash with ECC
•4 KB EEPROM with ECC
•8 or 4 KB on-chip SRAM with ECC
•Phase locked loop (IPLL) frequency multiplier with internal filter
•1 MHz internal RC oscillator with +/-1.3% accuracy over rated temperature range
•4-20 MHz amplitude controlled pierce oscillator
•32 KHz oscillator for RTC and LCD
•Internal COP (watchdog) module
•LCD driver for segment LCD with 40 frontplanes x 4 backplanes
•Stepper Motor Controller with drivers for up to 4 motors
•Up to 4 Stepper Stall Detector (SSD) modules (one for each motor)
•Real Time Clock (RTC) support the Hour/Minute/Second function and frequency compensation
•One Analog-to-Digital Converters (ADC) with 10-bit resolution and up to 8 channels available on
external pins
•Two Timer module (TIM) supporting input/output channels that provide a range of 16-bit input
capture & output compare (8 channels)
S12ZVH Family Reference Manual, Rev. 1.05
22Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
•One Pulse Width Modulation (PWM) modules with up to 8 x 8-bit channels
•Simple Sound Generation (SSG) for monotonic tone generation
•One Inter-Integrated Circuit (IIC) module
•One Serial Peripheral Interface (SPI) module
•Two Serial Communication Interface (SCI) module supporting LIN 1.3, 2.0, 2.1 and SAE J2602
communications
•Up to one on-chip high-speed CAN physical layer transceiver
•One MSCAN (up to 1 Mbp/s, CAN 2.0 A, B compliant) module
•On-chip Voltage Regulator (VREG) for regulation of input supply and all internal voltages
— Optional VREG ballast control output to supply an external or internal CAN physical layer
•Autonomous Periodic Interrupt (API) (combination with cyclic, watchdog)
•Supply voltage sense with low battery warning.
•Chip temperature sensor
1.6Module Features
The following sections provide more details of the integrated modules.
1.6.1S12Z Central Processor Unit (CPU)
The S12Z CPU is a revolutionary high-speed core, with code size and execution efficiencies over the S12X
CPU. The S12Z CPU also provides a linear memory map eliminating the inconvenience & performance
impact of page swapping.
•Harvard Architecture - parallel data and code access
•3 stage pipeline
•32-Bit wide instruction and databus
•32-Bit ALU
•24-bit addressing, i.e. 16 MB linear address space
•Instructions and Addressing modes optimized for C-Programming & Compiler
— MAC unit 32bit += 32bit*32bit
— Hardware divider
— Single cycle multi-bit shifts (Barrel shifter)
— Special instructions for fixed point match
•Unimplemented opcode traps
•Unprogrammed byte value (0xFF) defaults to SWI instruction
— Supports in-circuit programming of on-chip nonvolatile memory
1.6.1.2Debugger (DBG)
•Enhanced DBG module including:
— Four comparators (A, B, C and D) each configurable to monitor PC addresses or addresses of
data accesses
— A and C compare full address bus and full 32-bit data bus with data bus mask register
— B and D compare full address bus only
— Three modes: simple address/data match, inside address range, or outside address range
— Tag-type or force-type hardware breakpoint requests
•State sequencer control
•64 x 64-bit circular trace buffer to capture change-of-flow addresses or address and data of every
access
— Begin, End and Mid alignment of tracing to trigger
•Profiling mode
1.6.2Embedded Memory
1.6.2.1Flash
On-chip flash memory :
•Up to 128 KB of program flash memory
— 32 data bits plus 7 syndrome ECC (error correction code) bits allow single bit fault correction
and double fault detection
— Erase sector size 512 bytes
— Automated program and erase algorithm
— User margin level setting for reads
— Protection scheme to prevent accidental program or erase
1.6.2.2EEPROM
•Up to 4 KB EEPROM
— 16 data bits plus 6 syndrome ECC (error correction code) bits allow single bit error correction
and double fault detection
— Erase sector size 4 bytes
— Automated program and erase algorithm
— User margin level setting for reads
1.6.2.3SRAM
•Up to 8 KB of general-purpose RAM with ECC
S12ZVH Family Reference Manual, Rev. 1.05
24Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
— Single bit error correction and double bit error detection
1.6.3Clocks, Reset & Power Management Unit (CPMU)
•Real Time Interrupt (RTI)
•Clock Monitor, supervising the correct function of the oscillator (CM)
•System reset generation
•Autonomous periodic interrupt (API) (combination with cyclic, watchdog)
•Low Power Operation
— RUN mode is the main full performance operating mode with the entire device clocked.
— WAIT mode when the internal CPU clock is switched off, so the CPU does not execute
instructions.
— Pseudo STOP - system clocks are stopped but the RTI, COP, API, RTC and LCD modules can
be enabled with clock source from the osc.
— STOP - the oscillator is stopped in this mode, all clocks are switched off and all counters and
dividers remain frozen. The 32 KHz oscillator can be enabled, RTC and LCD can be still
function if enabled. The API and COP can still function if their clock source are from API
clock(ACLK).
1.6.3.1Internal 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)
— Reference clock sources:
•Trimmable internal reference clock.
— Frequency: 1 MHz; Trimmed accuracy over -40C to 150C junction temperature range:
1.3%
1.6.4Main External Oscillator (XOSCLCP)
•Loop control Pierce oscillator using 4 MHz to 20 MHz crystal
— Current gain control on amplitude output
— Signal with low harmonic distortion
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 25
Chapter 1 Device Overview MC9S12ZVH-Family
— Low power
— Good noise immunity
— Eliminates need for external current limiting resistor
— Transconductance sized for optimum start-up margin for typical crystals
— Oscillator pins shared with GPIO functionality
1.6.532K External Oscillator
•Low speed oscillator using 32 KHz to 40 KHz crystal
— Low power
— Good noise immunity
— Oscillator pins shared with GPIO functionality
1.6.6System Integrity Support
•Power-On Reset (POR)
•Illegal address detection
•Low-voltage detection and low voltage reset generation
•Clock monitor
•High temperature Interrupt
•Computer Operating Properly (COP) watchdog
— Configurable as window COP for enhanced failure detection
— Can be initialized out of reset using option bits located in flash memory
•Unimplemented opcode traps
•Unprogrammed byte value (0xFF) defaults to SWI instruction
•ECC support on embedded NVM
1.6.7Real Time Clock (RTC)
•Basic Clock functions with separate counters for Hour, Minutes and Seconds.Hardware
Compensation to reduce the effects of frequency variation on the 1 Hz clock (to the counters)
caused by temperature changes of crystal characteristics. Correction factor calculated by firmware.
(Programmable correction factor).
•16-bit CPU register programming interface with protection against run-away code.
•Option to output the buffered 32.768 kHz clock or the compensated 1 Hz clock for calibration.
1.6.8Timer (TIM)
•Up to two timer modules for input capture or output compare
— 8 x 16-bit channels per module
•16-bit free-running counter with 8-bit precision prescaler
S12ZVH Family Reference Manual, Rev. 1.05
26Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
•16-bit pulse accumulator
1.6.9Pulse Width Modulation Module (PWM)
•8 channels x 8-bit (4 channels x 16-bit)
•Programmable period and duty cycle per channel
•Center-aligned or edge-aligned outputs
•Programmable clock select logic with a wide range of frequencies
1.6.10Simple Sound Generator (SSG)
•Programmable amplitude level with maximum 11 bit resolution from zero amplitude to max
amplitude
•Sound STOP function to stop sound generation immediately
•Registers double-buffered synchronously reload at edge of tone to avoid distortion of output tone.
•Interrupt generated when SSG configure registers reload occurs
•Input clock prescaler with 11 bit resolution
•Module disable for power saving when SSG is not in use
•Separate or mixed frequency and amplitude outputs for flexibility in external hardware variation.
•Decay/attack function which can decrease/increase sound amplitude automatically without cpu
interaction. The function includs linear, gong and exponential decay/attack profiles
1.6.11Liquid Crystal Display driver (LCD)
•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.6.12Stepper Motor Controller (MC)
•PWM motor controller (MC) with up to 16 high current outputs
•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.6.13Stepper Stall Detect (SSD)
•Up to four SSD
•Programmable Full Step State
•Programmable Integration polarity
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 27
Chapter 1 Device Overview MC9S12ZVH-Family
•Blanking (recirculation) state
•16-bit Integration Accumulator register
•16-Bit Modulus Down Counter with interrupt
1.6.14CAN Physical Layer (CANPHY) transceiver
•High speed CAN interface for baud rates of up to 1 Mbit/s
•ISO 11898-2 and ISO 11898-5 compliant for 12 V battery systems
•SPLIT pin driver for bus recessive level stabilization
•Low power mode with remote CAN wake-up handled by MSCAN module
•Over-current shutdown for CANH and CANL
•Voltage monitoring on CANH and CANL
•CPTXD-dominant timeout feature monitoring the CPTXD signal on 1N65E/2N65E
1.6.15Multi-Scalable Controller Area Network (MSCAN)
•Implementation of the CAN protocol — Version 2.0A/B
•Five receive buffers with FIFO storage scheme
•Three transmit buffers with internal prioritization using a “local priority” concept
•Flexible maskable identifier filter supports two full-size (32-bit) extended identifier filters, or four
16-bit filters, or either 8-bit filters
•Programmable wake-up functionality with integrated low-pass filter
1.6.16Inter-IC Bus Module (IIC)
•Compatible with I2C bus standard
•Multi-master operation
•Software programmable for one of 256 different serial clock frequencies
•Software selectable acknowledge bit
•Interrupt driven byte-by-byte data transfer
•Arbitration lost interrupt with automatic mode switching from master to slave
•Calling address identification interrupt
•Start and stop signal generation/detection
•Repeated start signal generation
•Acknowledge bit generation/detection
•Bus busy detection
•General Call Address detection
•Compliant to ten-bit address
S12ZVH Family Reference Manual, Rev. 1.05
28Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
1.6.17Serial Communication Interface Module (SCI)
•Full-duplex or single-wire operation
•Standard mark/space non-return-to-zero (NRZ) format
•13-bit baud rate selection for 0N65E device
•16-bit baud rate selection for 1N65E device
•Programmable character length
•Programmable polarity for transmitter and receiver
•Active edge receive wakeup
•Break detection/generation supporting LIN communications
1.6.18Serial 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.6.19Analog-to-Digital Converter Module (ADC)
•One ADC
— 10-bit resolution
— Up to 8 external channels & 8 internal channels
— Left or right aligned result data
— Continuous conversion mode
•ADC directly writes results to RAM, preventing stall of further conversions
•Internal signals monitored with the ADC module
— Vrh, Vrl, Vrl+Vrh/2, Vsup or Vsense monitor, Vbg, TempSense.
•External pins can also be used as digital I/O
1.6.20Supply Voltage Sensor (BATS)
•VSENSE & VSUP pin low or a high voltage interrupt
•VSENSE & VSUP pin can be routed via an internal divider to the internal ADC channel
•Generation of low or high voltage interrupts
1.6.21On-Chip Voltage Regulator system (VREG)
•Voltage regulator
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 29
Chapter 1 Device Overview MC9S12ZVH-Family
— Linear voltage regulator directly supplied by V
— Low-voltage detect with low-voltage interrupt V
(protected V
SUP
SUP
BAT
)
— Power-On Reset (POR)
— Low-Voltage Reset (LVR)
— External ballast device support to reduce internal power dissipation
— Capable of supplying both the MCU internally plus external components
— Over-temperature interrupt
S12ZVH Family Reference Manual, Rev. 1.05
30Freescale Semiconductor
1.7Block Diagram
ADC0
SCI1
AN0_[7:0]
10-bit 8-channel
Analog-Digital Converter
TIM1
Asynchronous Serial IF
ECLK
RXD1
VDDA/VRH
VSSA/VRL
VDDX3,2,1/VSSX3,2,1
VDDM2/VSSM2
5V IO Supply
VDDM1/VSSM1
PTU
Motor Driver0
IIC0
SDA0
SCL0
VLCD
VDDA/VSSA
CAN0
RXCAN0
TXCAN0
msCAN 2.0B
PA[ 7:0]
PTA
SSD 0
PB[3:0]
PTB
PH[7:0]
PTH
PD[7:0]
PTD
PF[7:0]
PTF
PG[7:0]
PTG
PC[7:0]
PTC
PP[7:0]
PTP
PT[7:0]
PTT(KWT)
PS[7:0]
PTS(KWS)
IOC1_[7:0]
XIRQ/IRQ function
PWM0
PWM[7:0]
SCI0
Asynchronous Serial IF
SS0
SCK0
MOSI0
MISO0
SPI0
Synchronous Serial IF
40 X 4 LCD display
PU[7:0]
PTAD(KWAD)
SSG0
SGA0
SGT0
4 KB, 8KB RAM with ECC
4 KB EEPROM with ECC
VSUP
64 KB, 128 KB Flash with ECC
S12ZCPU
VDDA
VSS1
Voltage Regulator
(Nominal 12 V)
BATS
Voltage Supply Monitor
BCTL
VDDX1
VDD
VDDF
VSS2
BCTLC
VDDC
RESET
EXTAL
XTAL
BKGD
Real Time Interrupt
Clock Monitor
Background
TEST
Debug Controller
Interrupt Module
COP Watchdog
PLL with Frequency
Modulation option
Debug Module
4 Comparators
64 Byte Trace Buffer
Reset Generation
and Test Entry
Auto. Periodic Int.
Low Power Pierce
Oscillator
PE0
PTE[1:0]
PE1
BDC
DBG
CANPHY
CANH0
CANL0
VDDC
SPLIT0
VSSC
32K_EXTAL
32K_XTAL
PE2
PTE[3:2]
PE3
32.768K OSC
Motor Driver1
SSD 1
PTV
Motor Driver2
SSD 2
PV[7:0]
Motor Driver3
SSD 3
VSENSE
TIM0
IOC0_[7:0]
PS7
PS6
RTC
Internal 1 MHz
Oscillator
TXD1
RXD0
TXD0
PAD[7:0]
Figure 1-1. MC9S12ZVH-Family Block Diagram
Chapter 1 Device Overview MC9S12ZVH-Family
Freescale Semiconductor 31
S12ZVH Family Reference Manual , Rev. 1.05
Chapter 1 Device Overview MC9S12ZVH-Family
1.7.1Device Memory Map
Table 1-4 shows the device register memory map.
Table 1-4. Module Register Address Ranges
AddressModule
0x0000-0x0003ID Registers4
0x0004-0x000F
0x0010-0x001FINT 16
0x0020-0x006F
0x0070-0x00FFMMC 144
0x0100-0x017FDBG 128
0x0180-0x01FF
0x0200-0x037FPIM 384
0x0380-0x039FFTMRZ 32
0x03A0-0x03BF
0x03C0-0x03CFRAM ECC 16
0x03D0-0x03FF
0x0400-0x042FTIM148
0x0430-0x047F
0x0480-0x04AF PWM 48
Reserved12
Reserved80
Reserved128
Reserved32
Reserved48
Reserved80
Size
(Bytes)
0x04B0-0x05BF
0x05C0-0x05EF TIM048
0x05F0-0x05FF
0x0600-0x063F ADC0 64
0x0640-0x06BF
0x06C0-0x06DF CPMU 32
0x06E0-0x06EF
0x06F0-0x06F7 BATS 8
0x06F8-0x06FF
0x0700-0x0707 SCI0 8
0x0708-0x070F
0x0710-0x0717 SCI1 8
0x0718-0x077F
0x0780-0x0787 SPI0 8
S12ZVH Family Reference Manual, Rev. 1.05
Reserved272
Reserved16
Reserved128
Reserved16
Reserved8
Reserved8
Reserved104
32Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-4. Module Register Address Ranges
AddressModule
0x0788-0x07BFReserved56
0x07C0-0x07C7 IIC0 8
0x07C8-0x07FF
0x0800-0x083F CAN0 64
0x0840-0x098F
0x0990-0x0997 CANPHY0 8
0x0998-0x09FF
0x0A00-0x0A1FLCD32
0x0A20-0x0A3F
0x0A40-0x0A7FMC64
0x0A80-0x0A87SSD08
0x0A88-0x0A8F
0x0A90-0x0A97SSD18
0x0A98-0x0A9F
0x0AA0-0x0AA7SSD28
Reserved56
Reserved336
Reserved104
Reserved32
Reserved8
Reserved8
Size
(Bytes)
0x0AA8-0x0AAF
0x0AB0-0x0AB7SSD38
0x0AB8-0x0ADF
0x0AE0-0x0AEFRTC16
0x0AF0-0x0AFF
0x0B00-0x0B17SSG024
0x0B18-0x0FFF
Reserved8
Reserved40
Reserved16
Reserved1256
NOTE
Reserved register space shown in the table is not allocated to any module.
This register space is reserved for future use. W riting to these locations ha s
no effect. Read access to these locations returns zero.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 33
Chapter 1 Device Overview MC9S12ZVH-Family
0x00_1000
0x00_0000
0x10_0000
0x1F_4000
0x80_0000
0xFF_FFFF
RAM
EEPROM
Unimplemented
Program NVM
Register Space
4 KByte
max. 1 MB - 4 KB
max. 1 MB - 48 KB
max. 8 MB
6 MB
High address aligned
Low address aligned
0x1F_8000
Unimplemented
address range
0x1F_C000
Reserved (read only)
6 KB
NVM IFR
256 Byte
Reserved
512 Byte
0x20_0000
34Freescale Semiconductor
Figure 1-2. MC9S12ZVH-Family Global Memory Map.
S12ZVH Family Reference Manual, Rev. 1.05
Chapter 1 Device Overview MC9S12ZVH-Family
1.7.2Part ID registers Assignments
The Part ID registers is located in four 8-bit registers at addresses 0x0000-0x0003. The read-only value is
a unique ID for each revision of the chip. Table 1-5 shows the assigned Part ID register value.
Table 1-5. Assigned IDs Numbers
DeviceMask Set numberPart ID
MC9S12ZVH1280N65E32’h01170000
MC9S12ZVH640N65E32’h01170000
MC9S12ZVH1281N65E32’h01171000
MC9S12ZVH641N65E32’h01171000
MC9S12ZVH1282N65E32’h01171100
MC9S12ZVH642N65E32’h01171100
1.8Signal Description and Device Pinouts
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.8.1Pin Assignment Overview
Table 1-6 provides a summary of which ports are available for 100-pin and 144-pin package option.
Table 1-6. Port Availability by Package Option
Port144 LQFP100 LQFP
Port ADPAD[7:0]PAD[3:0]
Port APA[7:0]PA[7:2]
Port B PB[3:0]PB[3:0]
Port CPC[7:0]PC[5:4]
Port DPD[7:0]PD[7:3]
Port E PE[3:0]PE[3:0]
Port FPF[7:0]PF[7:0]
Port GPG[7:0]PG[7:0]
Port HPH[7:0]PH[3:0]
Port PPP[7:0]PP[1,3,5,7]
Port SPS[7:0]PS[7:0]
Port TPT[7:0]PT[7:6], PT[4:0]
Port UPU[7:0]PU[7:0]
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 35
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-6. Port Availability by Package Option
Port144 LQFP100 LQFP
Port VPV[7:0]—
sum of ports10472
NOTE
T o avoid current drawn from floating inputs, all non-bonded pins should be
configured as output or configured as input with a pull up or pull down
device enabled
1.8.2Detailed Signal Descriptions
1.8.2.1RESET — External Reset Signal
The RESET signal is an active low bidirectional control signal. It acts as an input to initialize the MCU to
a known start-up state, and an output when an internal MCU function causes a reset. The RESET pin has
an internal pull-up device.
1.8.2.2TEST — 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 ground in all applications.
1.8.2.3MODC — Mode C Signal
The MODC signal is used as a MCU operating mode select during reset. The state of this signal is latched
to the MODC bit at the rising edge of RESET. The signal has an internal pull-up device.
1.8.2.4PAD[7:0] / KWAD[7:0] — Port AD, Input Pins of ADC
P AD[7:0] are general-purpose input or output signals. The signals can be configured on per signal basis as
interrupt inputs with wake-up capability (KWAD[7:0]). These signals can have a pull-up or pull-down
device selected and enabled on per signal basis. Out of reset the pull devices are disabled.
1.8.2.5PA[7:0] — Port A I/O Signals
P A[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull-down devices are enabled.
S12ZVH Family Reference Manual, Rev. 1.05
36Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
1.8.2.6PB[3:0] — Port B I/O Signals
PB[3:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull-down devices are enabled.
1.8.2.7PC[7:0] — Port C I/O Signals
PC[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull devices are disabled.
1.8.2.8PD[7:0] — Port D I/O Signals
PD[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull-down devices are enabled.
1.8.2.9PE[3:0] — Port E I/O Signals
PE[3:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull-down devices are enabled.
1.8.2.10PF[7:0] — Port F I/O Signals
PF[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull-down devices are enabled.
1.8.2.11PG[7:0] — Port G I/O Signals
PG[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull-down devices are enabled.
1.8.2.12PH[7:0] — Port H I/O Signals
PH[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull-down devices are enabled.
1.8.2.13PP[7:0] — Port P I/O Signals
PP[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. Out of reset the pull devices are disabled.
1.8.2.14PS[7:0] / KWS[7:0] — Port S I/O signals
PS[7:0] are general-purpose input or output signals. The signals can be configured on per signal basis as
interrupt inputs with wake-up capability (KWS[7:0]). These signals can have a pull-up or pull-down
device selected and enabled on per signal basis. The signals can be configured on per signals basis as open
drain output. Out of reset the pull-up devices are enabled.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 37
Chapter 1 Device Overview MC9S12ZVH-Family
1.8.2.15PT[7:0] / KWT[7:0] — Port T I/O signals
PT[7:0] are general-purpose input or output signals. The signals can be configured on per signal basis as
interrupt inputs with wake-up capability (KWT[7:0]). These signals can have a pull-up or pull-down
device selected and enabled on per signal basis. Out of reset the pull devices are disabled.
1.8.2.16PU[7:0] — Port U I/O Signals
PU[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. They can have a slew rate enabled per signal basis also. Out of reset the
pull devices are disabled.
1.8.2.17PV[7:0] — Port V I/O Signals
PV[7:0] are general-purpose input or output signals. They can have a pull-up or pull-down device selected
and enabled on per signal basis. They can have a slew rate enabled per signal basis also. Out of reset the
pull devices are disabled.
1.8.2.18AN0_[7:0] — ADC0 Input Signals
AN0_[7:0] are the analog inputs of the Analog-to-Digital Converters.
1.8.2.19VRH, VRL — ADC0 Reference Signals
VRH and VRL are the reference voltage input pins for the analog-to-digital converter.
1.8.2.20SPI0 Signals
1.8.2.20.1SS0 Signal
This signal is associated with the slave select SS functionality of the serial peripheral interface SPI0.
1.8.2.20.2SCK0 Signal
This signal is associated with the serial clock SCK functionality of the serial peripheral interface SPI0.
1.8.2.20.3MISO0 Signal
This signal is associated with the MISO functionality of the serial peripheral interface SPI0. This signal
acts as master input during master mode or as slave output during slave mode.
1.8.2.20.4MOSI0 Signal
This signal is associated with the MOSI functionality of the serial peripheral interface SPI0. This signal
acts as master output during master mode or as slave input during slave mode
S12ZVH Family Reference Manual, Rev. 1.05
38Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
1.8.2.21SCI[1:0] Signals
1.8.2.21.1RXD[1:0] Signals
These signals are associated with the receive functionality of the serial communication interfaces
(SCI[1:0]).
1.8.2.21.2TXD[1:0] Signals
These signals are associated with the transmit functionality of the serial communication interfaces
(SCI[1:0]).
1.8.2.22CAN0 Signals
1.8.2.22.1RXCAN0 Signal
This signal is associated with the receive functionality of the scalable controller area network controller
(MSCAN0).
1.8.2.22.2TXCAN0 Signal
This signal is associated with the transmit functionality of the scalable controller area network controller
(MSCAN0).
1.8.2.23Timer IOC0_[7:0] & IOC1_[7:0] Signals
The signals IOC0_[7:0] are associated with the input capture or output compare functionality of the timer
(TIM0) module.
The signals IOC1_[7:0] are associated with the input capture or output compare functionality of the timer
(TIM1) module.
1.8.2.24PWM[7:0] Signals
The signals PWM[7:0] are associated with the PWM module digital channel outputs.
1.8.2.25LCD Signals
1.8.2.25.1FP[39:0] Signals
These signals are associated with the segment LCD frontplane driver output.
1.8.2.25.2BP[3:0] Signals
These signals are associate the segment LCD backplane driver output.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 39
Chapter 1 Device Overview MC9S12ZVH-Family
1.8.2.26RTC Signals
1.8.2.26.1RTC_CAL Signal
The signal can be the R TC output clock CALCLK for external clock calibration or external 1HZ standard
clock input for on chip clock calibration.
1.8.2.27SSG0 Signals
1.8.2.27.1SGT0 Signals
The signal is from SSG0 output, it contain tone or tone mixed with amplitude digital output.
1.8.2.27.2SGA0 Signals
The signal is from SSG0 output, it contain the amplitude digital output.
1.8.2.28IIC0 Signals
1.8.2.28.1SDA0 Signal
This signal is associated with the serial data pin of IIC0.
1.8.2.28.2SCL0 Signal
This signal is associated with the serial clock pin of IIC0.
1.8.2.29MC Signals
1.8.2.29.1M0C0M, M0C0P, M0C1M and M0C1P Signals
These signal are associated with the high current PWM out pin for the motor driver.
1.8.2.29.2M1C0M, M1C0P, M1C1M and M1C1P Signals
These signal are associated with the high current PWM out pin for the motor driver.
1.8.2.29.3M2C0M, M2C0P, M2C1M and M2C1P Signals
These signal are associated with the high current PWM out pin for the motor driver.
1.8.2.29.4M3C0M, M3C0P, M3C1M and M3C1P Signals
These signal are associated with the high current PWM out pin for the motor driver.
S12ZVH Family Reference Manual, Rev. 1.05
40Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
1.8.2.30SSD[3:0] Signals
1.8.2.30.1M0COSM, M0COSP, M0SINM and M0SINP Signals
These signal are used to measure the back EMF to calibrate the pointer reset position which are associated
with SSD[0].
1.8.2.30.2M1COSM, M1COSP, M1SINM and M1SINP Signals
These signal are used to measure the back EMF to calibrate the pointer reset position which are associated
with SSD[1].
1.8.2.30.3M2COSM, M2COSP, M2SINM and M2SINP Signals
These signal are used to measure the back EMF to calibrate the pointer reset position which are associated
with SSD[2].
1.8.2.30.4M3COSM, M3COSP, M3SINM and M3SINP Signals
These signal are used to measure the back EMF to calibrate the pointer reset position which are associated
with SSD[3].
1.8.2.31Interrupt Signals — IRQ and XIRQ
IRQ is a maskable level or falling edge sensitive input. XIRQ is a non-maskable level-sensitive interrupt.
1.8.2.32Oscillator and Clock Signals
1.8.2.32.14-20MHZ main Oscillator Pins — EXTAL and XTAL
EXT AL and XT AL are the crystal driver . On reset, the OSC is not enabled, all the d evice clocks are derived
from the internal reference clock. EXTAL is the oscillator input. XTAL is the oscillator output.
1.8.2.32.232.768KHZ Oscillator Pins — 32K_EXTAL and 32K_XTAL
32K_EXTAL and 32K_XTAL are the 32.768KHZ crystal driver. On reset the OSC is not enabled.
32K_EXTAL is the oscillator input. 32K_XTAL is the oscillator output. Figure 1-3 is the 32K OSC
connection diagram. Refer to the Appendix T able L-1., “OSC32K DC Electrical Specifications for the Cx,
Cy and RF requirement. Both R TC and LCD clock source can from the 32K OSC. The OSC enable control
is from the RTC. If the RTCCTL2’s CLKSRC is set, then it will enable the 32K OSC. After enable the
OSC, it needs to wait enough time before enable the RTC and LCD. Refer to Appendix Table L-2.,
“OSC32K Frequency Specifications for the startup time requirement.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 41
Chapter 1 Device Overview MC9S12ZVH-Family
32K OSC
32K_XTAL32K_EXTAL
C
x
C
y
Crystal or Resonator
R
F
R
s
Figure 1-3. 32K OSC Crystal/Resonator Connection
1.8.2.32.3API_EXTCLK
This signal is associated with the output of the API.
1.8.2.32.4ECLK
This signal is associated with the output of the divided bus clock (ECLK).
NOTE
This feature is only intended for debug purposes at room temperature.
It must not be used for clocking external devices in an application.
1.8.2.33BDC and Debug Signals
1.8.2.33.1BKGD — Background Debug signal
The BKGD signal is used as a pseudo-open-drain signal for the background debug communication. The
BKGD signal has an internal pull-up device.
1.8.2.33.2PDO — Profiling Data Output
This is the profiling data output signal used when the DBG module profiling feature is enabled. This signal
is output only and provides a serial, encoded data stream that can be used by external development tools
to reconstruct the internal CPU code flow.
S12ZVH Family Reference Manual, Rev. 1.05
42Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
1.8.2.33.3PDOCLK — Profiling Data Output Clock
This is the PDO clock signal used when the DBG module profiling feature is enabled. This signal is output
only. During code profiling this is the clock signal that can be used by external development tools to
sample the PDO signal.
1.8.2.33.4DBGEEV — External Event Input
This signal is the DBG external event input. It is input only . W ithin the DBG module, it allows an external
event to force a state sequencer transition, or trace buffer entry, or to gate trace buffer entries. A falling
edge at the external event signal constitutes an event. Rising edges have no effect. The maximum
frequency of events is half the internal core bus frequency.
1.8.2.34CAN Physical Layer Signals(CANPHY0)
1.8.2.34.1CANH0 — CAN Bus High Pin0
The CANH0 signal either connects directly to CAN bus high line or through an optional external common
mode choke.
1.8.2.34.2CANL0 — CAN Bus Low Pin0
The CANL0 signal either connects directly to CAN bus low line or through an optional external common
mode choke.
1.8.2.34.3SPLIT0 — CAN Bus Termination Pin0
The SPLIT0 pin can drive a 2.5 V bias for bus termination purpose (CAN bus middle point). Usage of this
pin is optional and depends on bus termination strategy for a given bus network.
1.8.2.34.4CPTXD0
This is the CAN physical layer transmitter input signal.
1.8.2.34.5CPRXD0
This is the CAN physical layer receiver output signal.
1.8.3VSENSE - Voltage Sensor Input
This pin can be connected to the supply (Battery) line for voltage measurements. The voltage present at
this input is scaled down by an internal voltage divider , and can be routed to the internal ADC via an analog
multiplexer. The pin itself is protected against reverse battery connections. T o protect the pin from external
fast transients an external resistor is needed.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 43
Chapter 1 Device Overview MC9S12ZVH-Family
1.8.4BCTLC
BCTLC provides the base current of an external bipolar that supplies an external or internal CAN physical
interface.
1.8.5VDDC
This is connect to the output voltage of the external bipolar. It is the feed back pin to the MCU also. When
VDDC is not used, it must be shorted with VDDX and user must keep the EXTCON in CPMUVREGCTL
be enabled.
1.8.6BCTL
BCTL provides the base current of an external bipolar of the VDDM, VDDA and VDDX supplies.
1.8.7Power Supply Pins
The 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 ground pins must be connected together in the application.
1.8.7.1VDDX1, VDDX2, VDDX3, VSSX1, VSSX2, VSSX3 — Digital I/O Power and
Ground Pins
VDDX1 is a dedicated voltage regulator output for the digital I/O drivers. It must be connected externally
to the VDDX2 and VDDX3 pin, which supplies the VDDX domain pads. The VSSX1, VSSX2 and
VSSX3 pins are the ground pin for the digital I/O drivers.
Bypass requirements on VDDX1/VSSX1, VDDX2/VSSX2 and VDDX3/VSSX3 depend on how heavily
the MCU pins are loaded.
1.8.7.2VDDA, VSSA — External Power Supply Pins for ADC and VREG
These are the power supply and ground pins for the analog-to-digital converter and the voltage regulator.
1.8.7.3VDDM1, VDDM2, VSSM1, VSSM2 — External Power Supply Pins for
Motor PAD
These are the power supply and ground pins for the motor driver pads. It should be supply by external
power transistor.
S12ZVH Family Reference Manual, Rev. 1.05
44Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
1.8.7.4VLCD- 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.8.7.5VDD, VSS2 — Core Power and Ground Pin
The VDD voltage supply of nominally 1.8V is generated by the internal voltage regulator. The return
current path is through the VSS2 pin.
1.8.7.6VDDF, VSS1 — NVM Power and Ground Pin
The VDDF voltage supply of nominally 2.8V is generated by the internal voltage regulator. The return
current path is through the VSS1 pin.
1.8.7.7VSSC — CANPHY0 Ground Pin
VSSC is the ground pin for the CAN physical layer CANPHY0.
1.8.7.8VSUP — Voltage Supply Pin f or Voltage Regulator
VSUP is the 12V/18V supply voltage pin for the on chip voltage regulator. This is the voltage supply input
from which the voltage regulator generates the on chip voltage supplies. It must be protected externally
against a reverse battery connection.
1.9Package and Pinouts
The MC9S12ZVH-Family will be offered in 100 pin and 144 pin LQFP packages.
1. signal with () means that this is an alternative routing option location for this signal.
Figure 1-5. MC9S12ZVH-Family 100-pin LQFP pin out
1st
Func.
Func.
Table 1-7. Pin Summary
Function
2nd
Func.
3rd
4th
Func.
5th
Func.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 47
Reset
State
Pull
Down
Pull
Down
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-7. Pin Summary
LQFP
Option
144100 Pin
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
Power
Supply
34PG0FP24————VDDXPERG/
Internal Pull
Resistor
CTRL
PPSG
Reset
State
Pull
Down
45VLCD—————VDDX——
56PF7FP23————VDDXPERF/
PPSF
67PT7IOC1_7KWT7———V
DDX
PERT/
Pull
Down
Disabled
PPST
7— ———————— —
8— ———————— —
9 8PU0IOC0_0M0C0MM0COSM——VDDM PERU/
Disabled
PPSU
109PU1—M0C0PM0COSP——VDDM PERU/
Disabled
PPSU
1110PU2IOC0_1M0C1MM0SINM——VDDM PERU/
Disabled
PPSU
1211PU3—M0C1PM0SINP——VDDM PERU/
Disabled
PPSU
1312VDDM1————————
1413VSSM1—————VDDM——
1514PU4IOC0_2M1C0MM1COSM——VDDM PERU/
Disabled
PPSU
1615PU5—M1C0PM1COSP——VDDM PERU/
Disabled
PPSU
1716PU6IOC0_3M1C1MM1SINM——VDDM PERU/
Disabled
PPSU
1817PU7—M1C1PM1SINP——VDDM PERU/
Disabled
PPSU
19—PV0IOC0_4M2C0MM2COSM——VDDM PERV/
Disabled
PPSV
20—PV1—M2C0PM2COSP——VDDM PERV/
Disabled
PPSV
21—PV2IOC0_5M2C1MM2SINM——VDDM PERV/
Disabled
PPSV
22—PV3—M2C1PM2SINP——VDDM PERV/
Disabled
PPSV
S12ZVH Family Reference Manual, Rev. 1.05
48Freescale Semiconductor
Table 1-7. Pin Summary
Chapter 1 Device Overview MC9S12ZVH-Family
LQFP
Option
144100 Pin
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
Power
Supply
Internal Pull
Resistor
CTRL
Reset
State
23—VDDM2————————
24—VSSM2—————VDDM——
25—PV4IOC0_6M3C0MM3COSM——VDDM PERV/
Disabled
PPSV
26—PV5—M3C0PM3COSP——VDDM PERV/
Disabled
PPSV
27—PV6IOC0_7M3C1MM3SINM——VDDM PERV/
Disabled
PPSV
28—PV7—M3C1PM3SINP——VDDM PERV/
Disabled
PPSV
2918—————————
3019—————————
3120PT6ECLKIOC1_6KWT6——V
DDX
PERT/
Disabled
PPST
3221PF6FP22————VDDXPERF/
PPSF
3322PF5FP21————VDDXPERF/
PPSF
3423PF4FP20————VDDXPERF/
PPSF
3524PF3FP19————VDDXPERF/
PPSF
3625PF2FP18————VDDXPERF/
PPSF
3726PF1FP17————VDDXPERF/
PPSF
3827PF0FP16————VDDXPERF/
PPSF
3928PD7FP15————VDDXPERD/
PPSD
4029PD6FP14————VDDXPERD/
PPSD
4130PD5FP13————VDDXPERD/
PPSD
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 49
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-7. Pin Summary
LQFP
Option
144100 Pin
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
Power
Supply
CTRL
4231PD4FP12————VDDXPERD/
PPSD
4332PD3FP11————VDDXPERD/
PPSD
44—PD2FP10————VDDXPERD/
PPSD
45—PD1FP9————VDDXPERD/
PPSD
46—PD0FP8————VDDXPERD/
PPSD
4733PA7(PWM6)FP7———VDDXPERA/
PPSA
4834PA6(PWM4)FP6———VDDXPERA/
PPSA
4935PA5(PWM2)FP5———VDDXPERA/
PPSA
Internal Pull
Resistor
Reset
State
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
5036PA4(PWM0)FP4———VDDXPERA/
PPSA
5137PA3(SDA0)FP3———VDDXPERA/
PPSA
5238PA2(SCL0)FP2———VDDXPERA/
PPSA
53—PA1FP1————VDDXPERA/
PPSA
54—PA0FP0————VDDXPERA/
PPSA
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
5539TEST—————VDDX——
5640PP1PWM1————V
DDX
PERP/
Disabled
PPSP
5741PP3PWM3————V
DDX
PERP/
Disabled
PPSP
5842PP5PWM5(RXD1)———V
DDX
PERP/
Disabled
PPSP
5943PP7PWM7(TXD1)———V
DDX
PERP/
Disabled
PPSP
6044VSS1————————
S12ZVH Family Reference Manual, Rev. 1.05
50Freescale Semiconductor
Table 1-7. Pin Summary
Chapter 1 Device Overview MC9S12ZVH-Family
LQFP
Option
144100 Pin
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
6145VDDF—————V
62—PC0RXCAN0————V
Power
Supply
DDF
DDX
Internal Pull
Resistor
CTRL
Reset
State
——
PERC/
Disabled
PPSC
63—PC1TXCAN0————V
DDX
PERC/
Disabled
PPSC
64—PC2CPRXD0————V
DDX
PERC/
Disabled
PPSC
65—PC3CPTXD0————V
DDX
PERC/
Disabled
PPSC
6646RESET—————V
6747PE0EXTAL————V
6848PE1XTAL————V
DDX
DDX
DDX
TEST pinPull Up
PERE/
PPSE
Down
PERE/
PPSE
Down
6949VSSX1————————
Pull
Pull
7050VDDX1—————V
71—PP6PWM6————V
DDX
DDX
——
PERP/
Disabled
PPSP
72—PT5IOC1_5KWT5———V
DDX
PERT/
Disabled
PPST
7351VSUP—————V
SUP
——
7452—————————
7553VDDC————————
76——————————
77—CANH0————————
78——————————
7954VSSC————————
80——————————
81—CANL0————————
82——————————
83—SPLIT0————————
84——————————
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 51
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-7. Pin Summary
LQFP
Option
144100 Pin
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
Power
Supply
Internal Pull
Resistor
CTRL
Reset
State
85——————————
8655VSENS
—— — ———— —
E
8756BCTL————————
8857BCTLC————————
8958PS0MISO0KWS0———V
DDX
PERS/
Pull Up
PPSS
9059PS1MOSI0KWS1———V
DDX
PERS/
Pull Up
PPSS
9160PS2SCK0KWS2———V
DDX
PERS/
Pull Up
PPSS
9261PS3SS
0KWS3———V
DDX
PERS/
Pull Up
PPSS
9362PS4(RXCAN
0)
SCL0KWS4——V
DDX
PERS/
PPSS
Pull Up
9463PS5(TXCAN
0)
9564PS6RXD0XIRQ
SDA0KWS5——V
KWS6——V
DDX
DDX
PERS/
PPSS
PERS/
Pull Up
Pull Up
PPSS
9665PS7TXD0IRQ
KWS7——V
DDX
PERS/
Pull Up
PPSS
9766VDDX2—————V
DDX
——
9867VSSX2————————
9968PT0API_EXT
CLK
10069PT1RTC_CALIOC1_1KWT1——V
IOC1_0KWT0——V
DDX
DDX
PERT/
PPST
PERT/
Disabled
Disabled
PPST
10170PT2DBGEEVIOC1_2KWT2——V
DDX
PERT/
Disabled
PPST
10271PT3PDOCLKIOC1_3KWT3——V
DDX
PERT/
Disabled
PPST
10372PT4PDOIOC1_4KWT2——V
DDX
PERT/
Disabled
PPST
10473PC4SGT0————V
DDX
PERC/
Disabled
PPSC
S12ZVH Family Reference Manual, Rev. 1.05
52Freescale Semiconductor
Table 1-7. Pin Summary
Chapter 1 Device Overview MC9S12ZVH-Family
LQFP
Option
144100 Pin
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
Power
Supply
10574PC5SGA0————V
DDX
Internal Pull
Resistor
CTRL
PERC/
Reset
State
Disabled
PPSC
106—PC6RXD1————V
DDX
PERC/
Disabled
PPSC
107—PC7TXD1————V
DDX
PERC/
Disabled
PPSC
10875BKGDMODC————VDDAPull Up
10976PAD0AN0_0KWAD0———V
DDA
PER1AD/
Disabled
PPS1AD
11077PAD1AN0_1KWAD1———V
DDA
PER1AD/
Disabled
PPS1AD
11178PAD2AN0_2KWAD2———V
DDA
PER1AD/
Disabled
PPS1AD
11279PAD3AN0_3KWAD3———V
DDA
PER1AD/
Disabled
PPS1AD
113—PAD4AN0_4KWAD4———V
DDA
PER1AD/
Disabled
PPS1AD
114—PAD5AN0_5KWAD5———V
DDA
PER1AD/
Disabled
PPS1AD
115—PAD6AN0_6KWAD6———V
DDA
PER1AD/
Disabled
PPS1AD
116—PAD7AN0_7KWAD7———V
DDA
PER1AD/
Disabled
PPS1AD
11780VDDA—————V
DDA
——
11881VSSA————————
11982PE232K_EX
TAL
12083PE332K_XT
AL
————V
————V
DDX
DDX
PERE/
PPSE
PERE/
PPSE
Pull
Down
Pull
Down
12184VSS2————————
12285VDD—————V
123—PP0PWM0————V
DD
DDX
——
PERP/
Disabled
PPSP
124—PP2PWM2————V
DDX
PERP/
Disabled
PPSP
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 53
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-7. Pin Summary
LQFP
Option
144100 Pin
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
Power
Supply
125—PP4PWM4————V
DDX
Internal Pull
Resistor
CTRL
PERP/
Reset
State
Disabled
PPSP
12686PB3BP3————V
12787PB2BP2————V
12888PB1BP1————V
12989PB0BP0————V
13090VDDX3—————V
DDX
DDX
DDX
DDX
DDX
PERB/
PPSB
PERB/
PPSB
PERB/
PPSB
PERB/
PPSB
Pull
Down
Pull
Down
Pull
Down
Pull
Down
——
13191VSSX3————————
132—PH7FP39————VDDXPERH/
PPSH
133—PH6FP38————VDDXPERH/
PPSH
Pull
Down
Pull
Down
134—PH5FP37————VDDXPERH/
PPSH
13592PH4FP36————VDDXPERH/
PPSH
13693PH3FP35————VDDXPERH/
PPSH
13794PH2FP34————VDDXPERH/
PPSH
13895PH1FP33————VDDXPERH/
PPSH
13996PH0FP32————VDDXPERH/
PPSH
14097PG7FP31————VDDXPERG/
PPSG
14198PG6FP30————VDDXPERG/
PPSG
14299PG5FP29————VDDXPERG/
PPSG
143100PG4FP28————VDDXPERG/
PPSG
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
Pull
Down
S12ZVH Family Reference Manual, Rev. 1.05
54Freescale Semiconductor
Table 1-7. Pin Summary
Chapter 1 Device Overview MC9S12ZVH-Family
LQFP
Option
144100 Pin
1441PG3FP27————VDDXPERG/
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
Power
Supply
Internal Pull
Resistor
CTRL
PPSG
Reset
State
Pull
Down
1.10Modes of Operation
The MCU can operate in different modes. These are described in 1.10.1 Chip Configuration Modes.
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.3 Low Power Modes.
Some modules feature a software programmable option to freeze the module status whilst the background
debug module is active to facilitate debugging. This is referred to as freeze mode at module level.
1.10.1Chip Configuration Modes
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 (Table 1-8).
The MODC bit in the MODE register shows the current operating mode and provides limited mode
switching during operation. The state of the MODC signal is latched into this bit on the rising edge of
RESET
Table 1-8. Chip Modes
Chip ModesMODC
Normal single chip1
Special single chip0
1.10.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.10.1.2Special Single-Chip Mode
This mode is used for debugging operation, boot-strapping, or security related operations. The background
debug mode BDM is active on leaving reset in this mode.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 55
Chapter 1 Device Overview MC9S12ZVH-Family
1.10.2Debugging Modes
The background debug mode (BDM) can be activated by the BDC module or directly when resetting into
Special Single-Chip mode. Detailed information can be found in the BDC module section.
Writing to internal memory locations using the debugger, whilst code is running or at a breakpoint, can
change the flow of application code.
The MC9S12ZVH-Family supports BDC communication throughout the device Stop mode. During Stop
mode, writes to control registers can alter the operation and lead to unexpected results. It is thus
recommended not to reconfigure the peripherals during STOP using the debugger.
1.10.3Low Power Modes
The device has two dynamic-power modes (run and wait) and two static low-power modes stop and pseudo
stop). For a detailed description refer to Chapter 7, “S12 Clock, Reset and Power Management Unit
(S12CPMU_UHV_V6)“ .
•Dynamic power mode: Run
— Run mode is the main full performance operating mode with the entire device clocked. The user
can configure the device operating speed through selection of the clock source and the phase
locked loop (PLL) frequency. To save power, unused peripherals must not be enabled.
•Dynamic power mode: Wait
— This mode is entered when the CPU executes the WAI instruction. In this mode the CPU does
not execute instructions. The internal CPU clock is switched off. All peripherals can be active
in system wait mode. For further power consumption reduction, 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.
•Static power mode Pseudo-stop:
— In this mode the system clocks are stopped but the oscillator is still running and the real time
interrupt (RTI), watchdog (COP), RTC, LCD and Autonomous Periodic Interrupt (API) 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.
•Static power mode: Stop
— 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), Key Wake-Up, RTC,
CAN and the CAN physical layer transceiver modules may be enabled to wake the device.
— If the BDC is enabled in Stop mode, the VREG remains in full performance mode and the
CPMU continues operation as in run mode. With BDC enabled and BDCCIS bit set, then all
clocks remain active to allow BDC access to internal peripherals. If the BDC is enabled and
BDCCIS is clear, then the BDCSI clock remains active, but bus and core clocks are disabled.
S12ZVH Family Reference Manual, Rev. 1.05
56Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
With the BDC enabled during S top, the VREG fu ll performance mode and clock activity lead
to higher current consumption than with BDC disabled
— If the BDC is enabled in Stop mode, then the voltage monitoring remains enabled.
1.11Security
The MCU security mechanism prevents unauthorized access to the flash memory. It must be emphasized
that part of the security must lie with the application code. An extreme example would be application code
that dumps the contents of the internal memory. This would defeat the purpose of security. Also, if an
application has the capability of downloading code through a serial port and then executing that code (e.g.
an application containing bootloader code), then this capability could potentially be used to read the
EEPROM and Flash memory contents even when the microcontroller is in the secure state. In this
example, the security of the application could be enhanced by requiring a response authentication before
any code can be downloaded.
Device security details are also described in the 21.5 Security.
1.11.1Features
The security features of the S12Z chip family are:
•Prevent external access of the non-volatile memories (Flash, EEPROM) content
•Restrict execution of NVM commands
•Prevent BDC access of internal resources
1.11.2Securing the Microcontroller
The chip can be secured by programming the security bits located in the options/security byte in the Flash
memory array. These non-volatile bits keep the device secured through reset and power-down.
This byte can be erased and programmed like any other Flash location. Two bits of this byte are used for
security (SEC[1:0]). The contents of this byte are copied into the Flash security register (FSEC) during a
reset sequence.
The meaning of the security bits SEC[1:0] is shown in Table 1-9. For security reasons, the state of device
security is controlled by two bits. To put the device in unsecured mode, these bits must be programmed to
SEC[1:0] = ‘10’. All other combinations put the device in a secured mode. The recommended value to put
the device in secured state is the inverse of the unsecured state, i.e. SEC[1:0] = ‘01’.
Table 1-9. Security Bits
SEC[1:0]Security State
001 (secured)
011 (secured)
100 (unsecured)
111 (secured)
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 57
Chapter 1 Device Overview MC9S12ZVH-Family
NOTE
Please refer to the 21.5 Security for more security byte details.
1.11.3Operation of the Secured Microcontroller
By securing the device, unauthorized access to the EEPROM and Flash memory contents is prevented.
Secured operation has the following effects on the microcontroller:
1.11.3.1Normal Single Chip Mode (NS)
•Background Debug Controller (BDC) operation is completely disabled.
•Execution of Flash and EEPROM commands is restricted (described in flash block description).
1.11.3.2Special Single Chip Mode (SS)
•Background Debug Controller (BDC) commands are restricted
•Execution of Flash and EEPROM commands is restricted (described in flash block description).
In special single chip mode the device is in active BDM after reset. In special single chip mode on a secure
device, only the BDC mass erase and BDC control and status register commands are possible. BDC access
to memory mapped resources is disabled. The BDC can only be used to erase the EEPROM and Flash
memory without giving access to their contents.
1.11.4Unsecuring the Microcontroller
Unsecuring the microcontroller can be done using three different methods:
1. Backdoor key access
2. Reprogramming the security bits
3. Complete memory erase
1.11.4.1Unsecuring the MCU Using the Backdoor Key Access
In normal single chip mode, security can be temporarily disabled using the backdoor key access method.
This method requires that:
•The backdoor key has been programmed to a valid value.
•The KEYEN[1:0] bits within the Flash options/security byte select ‘enabled’.
•The application program programmed into the microcontroller has the capability to write to the
backdoor key locations.
The backdoor key values themselves would not normally be stored within the application data, which
means the application program would have to be designed to receive the backdoor key values from an
external source (e.g. through a serial port).
The backdoor key access method allows debugging of a secured microcontroller without having to erase
the Flash. This is particularly useful for failure analysis.
S12ZVH Family Reference Manual, Rev. 1.05
58Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
NOTE
No word backdoor key word is allowed to have the value 0x0000 or
0xFFFF.
1.11.5Reprogramming the Security Bits
In normal single chip mode, security can also be disabled by erasing and reprogramming the security bits
within Flash options/security byte to the unsecured value. Because the erase operation will erase the entire
sector from (0xFF_FE00–0xFF_FFFF), the backdoor key and the interrupt vectors will also be erased; this
method is not recommended for normal single chip mode. The application software can only erase and
program the Flash options/security byte if the Flash sector containing the Flash options/security byte is not
protected (see Flash protection). Thus Flash protection is a useful means of preventing this method. The
microcontroller will enter the unsecured state after the next reset following the programming of the
security bits to the unsecured value.
This method requires that:
•The application software previously programmed into the microcontroller has been designed to
have the capability to erase and program the Flash options/security byte.
•The Flash sector containing the Flash options/security byte is not protected.
1.11 .6Complete Memory Erase
The microcontroller can be unsecured by erasing the entire EEPROM and Flash memory contents. If
ERASE_FLASH is successfully completed, then the Flash unsecures the device and programs the security
byte automatically.
1.12Resets and Interrupts
1.12.1Resets
Table 1-10. lists all reset sources and the vector locations. Resets are explained in detail in the Chapter 7,
“S12 Clock, Reset and Power Management Unit (S12CPMU_UHV_V6)“.
Table 1-10. Reset Sources and Vector Locations
Vector AddressReset Source
0xFFFFFCPower-On Reset (POR)NoneNone
Low Voltage Reset (LVR)NoneNone
External pin RESET
Clock monitor resetNoneCPMUOSC[OSCE]
CCR
Mask
NoneNone
Local Enable
COP watchdog resetNoneCR[2:0] in CPMUCOP register
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 59
Chapter 1 Device Overview MC9S12ZVH-Family
1.12.2Interrupt Vectors
Table 1-11 lists all interrupt sources and vectors in the default order of priority. The interrupt module
description provides an Interrupt Vector Base register (IVBR) to relocate the vectors.
Table 1-11. Interrupt Vector Locations (Sheet 1 of 3)
Vector Address
Vector base + 0x1F8Unimplemented page1 op-code trap
Vector base + 0x1F4Unimplemented page2 op-code trap
Vector base + 0x1F0Software interrupt instruction (SWI)NoneNone--
Vector base + 0x1ECSystem call interrupt instruction
Vector base + 0x1E8Machine exceptionNoneNone--
Vector base + 0x1E4
Vector base + 0x1E0
Vector base + 0x1DCSpurious interrupt—None--
Vector base + 0x1D8XIRQ interrupt requestX bitNoneYesYes
Vector base + 0x1D4IRQ
Vector base + 0x1D0RTI time-out interruptI bitCPMUINT (RTIE)
Vector base + 0x1CCTIM0 timer channel 0I bitTIM0TIE (C0I) NoYes
Vector base + 0x1C8TIM0 timer channel 1I bitTIM0TIE (C1I) NoYes
(1)
Interrupt Source
(SPARE)
(TRAP)
(SYS)
interrupt requestI bitIRQCR(IRQEN)YesYes
CCR
Mask
NoneNone--
NoneNone--
NoneNone--
Reserved
Reserved
Local Enable
Wake up
from STOP
See CPMU
section
Wak e up
from WAIT
Yes
Vector base + 0x1C4TIM0 timer channel 2I bitTIM0TIE (C2I) NoYes
Vector base + 0x1C0TIM0 timer channel 3I bitTIM0TIE (C3I) NoYes
Vector base + 0x1BCTIM0 timer channel 4I bitTIM0TIE (C4I) NoYes
Vector base + 0x1B8TIM0 timer channel 5I bitTIM0TIE (C5I) NoYes
Vector base + 0x1B4TIM0 timer channel 6I bitTIM0TIE (C6I) NoYes
Vector base + 0x1B0TIM0 timer channel 7I bitTIM0TIE (C7I) NoYes
Vector base + 0x1ACTIM0 timer overflowI bitTIM0TSCR2(TOI)NoYes
Vector base + 0x1A8TIM0 Pulse accumulator A overflowI bitTIM0PACTL(PAOVI)NoYes
Vector base + 0x1A4TIM0 Pulse accumulator input edgeI bitTIM0PACTL(PAI)NoYes
Vector base + 0x1A0SPI0I bitSPI0CR1 (SPIE, SPTIE) NoYes
Vector base + 0x19CSCI0I bitSCI0CR2YesYes
Vector base + 0x198SCI1I bitSCI1CR2YesYes
Vector base + 0x194
Vector base + 0x190
S12ZVH Family Reference Manual, Rev. 1.05
Reserved
Reserved
60Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-11. Interrupt Vector Locations (Sheet 2 of 3)
Vector Address
(1)
Interrupt Source
CCR
Mask
Local Enable
Vector base + 0x18CADC0 ErrorI bitADC0EIE(IA_EIE,CMD_EIE,
Wake up
from STOP
NoYes
Wak e up
from WAIT
EOL_EIE,TRIG_EIE,RSTAR_
EIE,LDOK_EIE)
ADC0IE(CONIF_OIE)
Vector base + 0x188ADC0 conversion sequence abortI bitADC0IE(SEQAR_IE)NoYes
Vector base + 0x184ADC0 conversion completeI bitADC0CONIE[15:0]NoYes
Vector base + 0x180
Oscillator status interruptI bitCPMUINT (OSCIE) NoYes
Vector base + 0x17C PLL lock interruptI bitCPMUINT (LOCKIE) NoYes
Vector base + 0x178
to
Reserved
Vector base + 0x174
Vector base + 0x170RAM errorI bit ECCIE (SBEEIE) NoYes
Vector base + 0x16C
to
Reserved
Vector base + 0x168
Vector base + 0x164FLASH errorI bit FERCNFG (SFDIE) NoYes
Vector base + 0x160FLASH commandI bitFCNFG (CCIE) NoYes
Vector base + 0x15CCAN0 wake-upI bitCAN0RIER (WUPIE)YesYes
Vector base + 0x158CAN0 errorsI bitCAN0RIER (CSCIE, OVRIE)NoYes
Vector base + 0x154CAN0 receiveI bitCAN0RIER (RXFIE)NoYes
Vector base + 0x150CAN0 transmitI bitCAN0RIER (TXEIE[2:0])NoYes
Vector base + 0x14C
to
Reserved
Vector base + 0x144
Vector base + 0x140 BATS supply voltage monitor interruptI bitBATIE (BVHIE,BVLIE) NoYes
Vector base + 0x13C
to
Reserved
Vector base + 0x130
Vector base + 0x12CPort T interruptI bitPIET(PIET[7:0])YesYes
Vector base + 0x128CANPHY0 Interrupt (CP0I)I bitCP0IE(CPVFIE, CPOCIE)NoYes
Vector base + 0x124Port S interruptI bitPIES(PIES[7:0])YesYes
Vector base + 0x120
to
Reserved
Vector base + 0x108
Vector base + 0x104Low-voltage interrupt (LVI)I bitCPMUCTRL (LVIE) NoYes
Vector base + 0x100Autonomous periodical interrupt
(API)
I bit
CPMUAPICTRL (APIE)
YesYe s
Vector base + 0xFCHigh temperature interruptI bitCPMUHTCTL(HTIE) NoYes
Vector base + 0xF8
Reserved
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 61
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-11. Interrupt Vector Locations (Sheet 3 of 3)
Vector Address
Vector base + 0xF4Port AD interruptI bitPIEADL(PIEADL[7:0]) YesYes
Vector base + 0xF0
to
Vector base + 0xB8
Vector base + 0xB4IICI bitIIC0IBCR(IBIE)NoYes
Vector base + 0xB0Reserved
Vector base + 0xACTIM1 timer channel 0I bitTIM1TIE (C0I) NoYes
Vector base + 0xA8TIM1 timer channel 1I bitTIM1TIE (C1I) NoYes
Vector base + 0xA4TIM1 timer channel 2I bitTIM1TIE (C2I) NoYes
Vector base + 0xA0TIM1 timer channel 3I bitTIM1TIE (C3I) NoYes
Vector base + 0x9CTIM1 timer channel 4I bitTIM1TIE (C4I) NoYes
Vector base + 0x98TIM1 timer channel 5I bitTIM1TIE (C5I) NoYes
Vector base + 0x94TIM1 timer channel 6I bitTIM1TIE (C6I) NoYes
Vector base + 0x90TIM1 timer channel 7I bitTIM1TIE (C7I) NoYes
Vector base + 0x8CTIM1 timer overflowI bitTIM1TSCR2(TOI)NoYes
Vector base + 0x88TIM1 Pulse accumulator A overflowI bitTIM1PACTL(PAOVI)NoYes
Vector base + 0x84TIM1 Pulse accumulator input edgeI bitTIM1PACTL(PAI)NoYes
(1)
Interrupt Source
CCR
Mask
Local Enable
Reserved
Wake up
from STOP
Wak e up
from WAIT
Vector base + 0x80
to
Vector base + 0x7C
Vector base + 0x78Motor Control Timer OverflowI bitMCCTL1(MCOCIE)NoYes
Vector base + 0x74SSD0I bitMDC0CTL(MCZIE,AOVIE)NoYes
Vector base + 0x70SSD1I bitMDC1CTL(MCZIE,AOVIE)NoYes
Vector base + 0x6CSSD2I bitMDC2CTL(MCZIE,AOVIE)NoYes
Vector base + 0x68SSD3I bitMDC3CTL(MCZIE,AOVIE)NoYes
Vector base + 0x64RTCI bitRTCCTL4(HRIE,MINIE,SECI
Vector base + 0x60SSG0 Ready For Next Data(RNDI)I bitSSG0IE(RNDIE)NoYes
Vector base + 0x5C
to
Vector base + 0x10
1. 15 bits vector address based
Reserved
YesYe s
E,COMPIE,TB0IE)
Reserved
1.12.3Effects of Reset
When a reset occurs, MCU registers and control bits are initialized. For RTC block, some registers are
power on reset only. Refer to the respective block sections for register reset states.
S12ZVH Family Reference Manual, Rev. 1.05
62Freescale Semiconductor
Chapter 1 Device Overview MC9S12ZVH-Family
On each reset, the Flash module executes a reset sequence to load Flash configuration registers
1.12.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 21.6 Initialization.
1.12.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.12.3.3I/O Pins
Refer to Chapter 2, “Port Integration Module (S12ZVHPIMV0)“ for reset configurations of all peripheral
module ports.
1.12.3.4RAM
The system RAM arrays, including their ECC syndromes, are initialized following a power on reset, but
not out of warm reset. All other RAM arrays are not initialized out of any type of reset.
With the exception of resets resulting from low voltage conditions, the RAM content is unaltered by a reset
occurrence.
1.13COP Configuration
The COP time-out rate bits CR[2:0] and the WCOP bit in the CPMUCOP register are loaded from the
Flash configuration field byte at global address 0xFF_FE0Eduring the reset sequence. See Table 1-12 and
Table 1-13 for coding
Table 1-12. Initial COP Rate Configuration
NV[2:0] in
FOPT Register
000111
001110
010101
011100
100011
101010
110001
111000
CR[2:0] in
COPCTL Register
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 63
Chapter 1 Device Overview MC9S12ZVH-Family
Table 1-13. Initial WCOP Configuration
NV[3] in
FOPT Register
10
01
WCOP in
COPCTL Register
1.14ADC0 Internal Channels
Table 1-14 lists the internal sources which are connected to these special conversion channels.
Table 1-14. ADC0 Channel Assignment
ADC0CMD_1 CH_SEL[5:0]
[5][4][3][2][1][0]
001000Internal_0ADC temperature sensor
001001Internal_1Bandgap Voltage V
001010Internal_2RESERVED
001011Internal_3RESERVED
001100Internal_4V
001101Internal_5RESERVED
001110Internal_6RESERVED
001111Internal_7RESERVED
Analog Input
Channel
Usage
or
or V
SUP
BG
Vreg temperature sensor
V
HT(see Chapter 7, “S12
Clock, Reset and Power
Management Unit
(S12CPMU_UHV_V6)“ on how
to config)
SENSE
selectable in BATS
module
1.15The ADC0 VRH/VRL
The ADC0 offers two possible sources for both reference voltages VRH[1:0] and VRL[1:0]. On the
MC9S12ZVH-Family only VRH[1], VRL[1] sources are connected at device level(to VDDA, VSSA
respectively), the VRH[0], VRL[0] sources are not connected. Thus the application must set both
VRH_SEL and VRL_SEL in the 10.4.2.16 ADC Command Register 1 (ADCCMD_1) to 1.
1.16The ADC0 Conversion Resolution
The MC9S12ZVH-Family only support 10 and 8 bit conversion resolution, although ADC block guide still
has 12 bit related descrition.
MCUs of the MC9S12ZVH-Family are able to measure the internal reference voltage VBG(see Table 1-
14). VBG is a constant voltage with a narrow distribution over temperature and external voltage supply (see
Table I-1).
A 10-bit right justified ADC conversion result of VBG is provided at address 0x1F_C040/0x1F_C041 in
the NVM’s IFR for reference.The measurement conditions of the reference conversion are listed in
Section A.1.9, “ADC Conversion Result Reference“”. By measuring the voltage VBG (see Table 1-14) and
comparing the result to the reference value in the IFR, it is possible to determine the ADC’s reference
voltage VRH in the application environment:
The exact absolute value of an analog conversion can be determined as follows:
With:
ConvertedADInput:Result of the analog to digital conversion of the desired pin
ConvertedReference:Result of channel “Internal_1” conversion
StoredReference:Value in IFR location 0x1F_C040/0x1F_C041
n:ADC resolution (10 bit)
1.18BDC Clock Source Connectivity
The BDC clock, BDCCLK, is mapped to the IRCCLK generated in CPMU module. On 0N65E device, the
BDCFCLK is mapped to the Core clock. On 1N65E device, the BDCFCLK is mapped to the bus clock.
1.19FTMRZ Connectivity
The soc_erase_all_req input to the flash module is driven directly by a BDC erase flash request resulting
from the BDC ERASE_FLASH command.
The FTMRZ FCLKDIV register is forced to 0x05 by the BDC ERASE_FLASH command. This
configures the clock frequency correctly for the initial bus frequency on leaving reset. The bus frequency
must not be changed before launching the ERASE_FLASH command.
1.20RTC Clock Source
The RTC has three clock source, the 32K OSC, main OSC, refer to 18.4.2 RTC Control Register 2
(RTCCTL2) for more information. On 1N65E device, it also has IRC clock source. When select main
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 65
Chapter 1 Device Overview MC9S12ZVH-Family
OSC, user need to config the registers in CPMU block, refer to Chapter 7, “S12 Clock, Reset and Power
Management Unit (S12CPMU_UHV_V6)“ for more detailed information. And main OSC will be stop if
silicon enter full stop mode. On 1N65E device, if the clock source is from IRC, it will be stop if silicon
enter stop mode.
1.21LCD Clock Source Connectivity
The LCD’s clock is connected to the RTC’s RTCCLK output.User need to set the RTCCTL2[RTCPS] to
get the expect RTCCLK frequency if it uses the main OSC as clock source. Refer to 18.4.2 RTC Control
Register 2 (RTCCTL2) for more information.
1.2232K OSC enable control
The 32K OSC enable is controlled by the RTCCTL2[CLKSRC] in 18.4.2 RTC Control Register 2
(RTCCTL2). Setting it to 1 enable the 32K OSC. Setting it to 1 also selects the 32K OSC as the LCD and
RTC clock source. RTCCTL2 is write one time only in NSC mode, once enable the 32K OSC, it will be
not able to switch off.
S12ZVH Family Reference Manual, Rev. 1.05
66Freescale Semiconductor
Chapter 2
Port Integration Module (S12ZVHPIMV0)
Revision History
Rev. No.
(Item No.)
V00.0118 Mar 2011 • Initial Version
V00.0918 Mar 2012 • update the MODRR0 related description
V00.1012 Oct 2012 • fix typos, add XIRQ function explain
Date (Submitted
By)
Sections
Affected
Substantial Change(s)
2.1Introduction
2.1.1Overview
The S12ZVH-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:
•8-pin port A associated with the LCD FP[7:0] and rerouting of PWM0, PWM2, PWM4, PWM6
channels and rerouting of IIC
•4-pin port B associated with the LCD BP[3:0]
•8-pin port C associated with MSCAN0, SCI1, SSG0 and CANPHY0’s CPTXD0&CPRXD0
•8-pin port D associated with LCD FP[15:8]
•4-pin port E associated with the external 4-20MHZ oscillator and 32.768KHZ oscillator
•8-pin port F associated with LCD FP[23:16]
•8-pin port G associated with LCD FP[31:24]
•8-pin port H associated with LCD FP[39:32]
•8-pin port P associated with 8 PWM channels; associated with the rerouting SCI1 function also.
•8-pin port S associated with SCI0, IIC0, SPI0 modules and rerouting of MSCAN0. PS7 and PS6
also associated with IRQ, XIRQ interrupt inputs; associated with the key wakeup functions also
•8-pin port T with the key wakeup function and 8 TIM1 channels, also associated with
— API_EXTCLK
•8-pin port AD associated with 8 ADC0 channels; associated with the key wakeup function also
•8-pin port U associated with SSD0, SSD1, 2 Motor controls and 4 TIM0 channels
•8-pin port V associated with SSD2, SSD3 , 2 Motor controls and 4 TIM0 channels
Most I/O pins can be configured by register bits to select data direction and to enable and select pullup or
pulldown devices.
NOTE
This document assumes the availability of all features (144-pin package
option). Some functions are not available on lower pin count package
options. Refer to the pin-out summary in the SOC Guide.
2.1.2Features
The PIM includes these distinctive registers:
•Data registers and data direction registers for ports A, B, C, D, E, F, G, H, T, S, P, AD, U and V
when used as general-purpose I/O
•Control registers to enable pull devices and select pullups/pulldowns on ports A, B, C, D, E, F, G,
H, T, S, P, AD, U and V
•Single control register bit to enable pullups on BKGD pin
•Control register to enable open-drain (wired-or) mode on port S and port A (only PA3, PA2)
•Control register to enable digital input buffers on port AD
•Control register to enable the slew rate control on Port U and V
•Interrupt flag register for pin interrupts on port S, T and AD
•Control register to configure IRQ pin operation
•Control register to enable ECLK output
•Control register to enable the RTC_CAL input or output
•Routing registers to support signal relocation on external pins and control internal routings:
— IIC0 to alternative pins
— SCI1 to alternative pins
— Various CAN0-CANPHY0 routing options supporting standalone use and conformance testing
— MSCAN0 to alternative pins
— PWM0, PWM2, PWM4, PWM6 to alternative pins
— rerouting the RTC_CAL to TIM1 channel
— rerouting the RXD0 and RXD1 to TIM1 channel for the baud rate detection
A standard port pin has the following minimum features:
•Input/output selection
•5V output drive
S12ZVH Family Reference Manual, Rev. 1.05
68Freescale Semiconductor
Chapter 2 Port Integration Module (S12ZVHPIMV0)
•5V digital and analog input
•Input with selectable pullup or pulldown device
Optional features supported on dedicated pins:
•Open drain for wired-or connections
•Interrupt input with glitch filtering
•Slew rate control on motor pads
2.2External Signal Description
This section lists and describes the signals that do connect off-chip.
Table 2-1 shows all pins with the pins and functions that are controlled by the PIM. Routing options are
denoted in parenthesis.
NOTE
If there is more than one function associated with a pin, the output priority
is indicated by the position in the table from top (highest priority) to bottom
(lowest priority).
Port Pin Name
-BKGDMODC
Pin Function
& Priority
Table 2-1. Pin Functions and Priorities
I/ODescriptionRouting Register
(1)
(2)
BKGDI/O S12ZBDC communication
IMODC input during RESETBKGD
Pin
Function
after Reset
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 69
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Port Pin Name
Pin Function
& Priority
I/ODescriptionRouting Register
(1)
Function
after Reset
APA7FP7O LCD FP7 signalGPIO
(PWM6)O PWM channel 6PWM6RR
PTA[7]I/O General-purpose
PA6FP6O LCD FP6 signal
(PWM4)O PWM channel 4PWM4RR
PTA[6]I/O General-purpose
PA5FP5O LCD FP5 signal
(PWM2)O PWM channel 2PWM2RR
PTA[5]I/O General-purpose
PA4FP4O LCD FP4 signal
(PWM0)O PWM channel 0PWM6RR
PTA[4]I/O General-purpose
PA3FP3O LCD FP3 signal
(SDA0)I/O SDA of IIC0 signalIIC0RR
PTA[3]I/O General-purpose
PA2FP2O LCD FP2 signal
(SCL0)I/O SCL of IIC0 signalIIC0RR
PTA[2]I/O General-purpose
PA1FP1O LCD FP1 signal
PTA[1]I/O General-purpose
PA0FP0O LCD FP0 signal
PTA[0]I/O General-purpose
BPB3BP3O LCD BP3 signalsGPIO
PTB[3]I/O General-purpose
PB2BP2O LCD BP2 signal
PTB[2]I/O General-purpose
PB1BP1O LCD BP1 signal
PTB[1]I/O General-purpose
PB0BP0O LCD BP0 signal
PTB[0]I/O General-purpose
Pin
S12ZVH Family Reference Manual, Rev. 1.05
70Freescale Semiconductor
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Port Pin Name
Pin Function
& Priority
I/ODescriptionRouting Register
(1)
Function
after Reset
CPC7TXD1O TXD of SCI1GPIO
PTC[7]I/O General-purpose
PC6RXD1IRXD of SCI1
PTC[6]I/O General-purpose
PC5SGA0O SGA of SSG0
PTC[5]I/O General-purpose
PC4SGT0O SGT of SSG0
PTC[4]I/O General-purpose
PC3CPTXD0ITXD of CANPHY0C0CP0RR3-0
PTC[3]I/O General-purpose
PC2CPRXD0O RXD of CANPHY0C0CP0RR3-0
PTC[2]I/O General-purpose
PC1TXCAN0O TX of MSCAN0C0CP0RR3-0
PTC[1]I/O General-purpose
PC0RXCAN0IRX of MSCAN0C0CP0RR3-0
PTC[0]I/O General-purpose
DPD7FP15O LCD FP15 signalGPIO
PTD[7]I/O General-purpose
PD6FP14O LCD FP14 signal
PTD[6]I/O General-purpose
PD5FP13O LCD FP13 signal
PTD[5]I/O General-purpose
PD4FP12O LCD FP12 signal
PTD[4]I/O General-purpose
PD3FP11O LCD FP11 signal
PTD[3]I/O General-purpose
PD2FP10O LCD FP10 signal
PTD[2]I/O General-purpose
PD1FP9O LCD FP9 signal
PTD[1]I/O General-purpose
PD0FP8O LCD FP8 signal
PTD[0]I/O General-purpose
Pin
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 71
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Port Pin Name
Pin Function
& Priority
I/ODescriptionRouting Register
(1)
Function
after Reset
PE332K_XTAL-32K OSC signal
PTE[3]I/O General-purpose
PE232K_EXTAL-32K OSC signal
E
PE1XTAL-CPMU OSC signal
PTE[2]I/O General-purpose
GPIO
PTE[1]I/O General-purpose
PE0EXTAL-CPMU OSC signal
PTE[0]I/O General-purpose
FPF7FP23O LCD FP23 signalGPIO
PTF[7]I/O General-purpose
PF6FP22O LCD FP22 signal
PTF[6]I/O General-purpose
PF5FP21O LCD FP21 signal
PTF[5]I/O General-purpose
PF4FP20O LCD FP20 signal
PTF[4]I/O General-purpose
PF3FP19O LCD FP19 signal
PTF[3]I/O General-purpose
PF2FP18O LCD FP18 signal
PTF[2]I/O General-purpose
PF1FP17O LCD FP17 signal
PTF[1]I/O General-purpose
PF0FP16O LCD FP16 signal
PTF[0]I/O General-purpose
Pin
S12ZVH Family Reference Manual, Rev. 1.05
72Freescale Semiconductor
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Port Pin Name
Pin Function
& Priority
I/ODescriptionRouting Register
(1)
Function
after Reset
GPG7FP31O LCD FP31 signalGPIO
PTG[7]I/O General-purpose
PG6FP30O LCD FP30 signal
PTG[6]I/O General-purpose
PG5FP29O LCD FP29 signal
PTG[5]I/O General-purpose
PG4FP28O LCD FP28 signal
PTG[4]I/O General-purpose
PG3FP27O LCD FP27 signal
PTG[3]I/O General-purpose
PG2FP26O LCD FP26 signal
PTG[2]I/O General-purpose
PG1FP25O LCD FP25 signal
PTG[1]I/O General-purpose
PG0FP24O LCD FP24 signal
PTG[0]I/O General-purpose
HPH7FP39O LCD FP39 signalGPIO
PTH[7]I/O General-purpose
PH6FP38O LCD FP38 signal
PTH[6]I/O General-purpose
PH5FP37O LCD FP37 signal
PTH[5]I/O General-purpose
PH4FP36O LCD FP36 signal
PTH[4]I/O General-purpose
PH3FP35O LCD FP35 signal
PTH[3]I/O General-purpose
PH2FP34O LCD FP34 signal
PTH[2]I/O General-purpose
PH1FP33O LCD FP33 signal
PTH[1]I/O General-purpose
PH0FP32O LCD FP32 signal
PTH[0]I/O General-purpose
Pin
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 73
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Port Pin Name
Pin Function
& Priority
I/ODescriptionRouting Register
(1)
Function
after Reset
PPP7(TXD1)O TXD of SCI1SCI1RRGPIO
PWM7O PWM channel 7
PP[7]I/O General-purpose
PP6PWM6O PWM channel 6
PP[6]I/O General-purpose
PP5(RXD1)O RXD of SCI1SCI1RR
PWM5O PWM channel 5
PP[5]I/O General-purpose
PP4PWM4O PWM channel 4
PP[4]I/O General-purpose
PP3PWM3O PWM channel 3
PP[3]I/O General-purpose
PP2PWM2O PWM channel 2
PP[2]I/O General-purpose
PP1PWM1O PWM channel 1
PP[1]I/O General-purpose
PP0PWM0O PWM channel 0
PP[0]I/O General-purpose
SPS7IRQ
O IRQ interrupt inputGPIO
TXD0I/O TXD of SCI0
PTS[7]/KWS[7]I/O General-purpose; with interrupt and wakeup
PS6XIRQ
O XIRQ interrupt input
(3)
RXD0I/O RXD of SCI0
PTS[6]/KWS[6]I/O General-purpose; with interrupt and wakeup
PS5SDA0O SDA of IIC0
(TXCAN0)I/O TX of MSCAN0C0CP0RR3-0
PTS[5]/KWS[5]I/O General-purpose; with interrupt and wakeup
PS4SCL0O SCL of IIC0
(RXCAN)I/O RX of MSCAN0C0CP0RR3-0
PTS[4]/KWS[4]I/O General-purpose; with interrupt and wakeup
PS3S
S0I/O SPI0 slave select
PTS[3]/KWS[3]I/O General-purpose; with interrupt and wakeup
PS2SCK0I/O SPI0 serial clock
PTS[2]/KWS[2]I/O General-purpose; with interrupt and wakeup
PS1MOSI0I/O SPI0 master out/slave in
PTS[1]/KWS[1]I/O General-purpose; with interrupt and wakeup
PS0MISO0I/O SPI0 master in/slave out
PTS[0]/KWS[0]I/O General-purpose; with interrupt and wakeup
Pin
S12ZVH Family Reference Manual, Rev. 1.05
74Freescale Semiconductor
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Port Pin Name
Pin Function
& Priority
I/ODescriptionRouting Register
(1)
Function
after Reset
TPT7IOC1_7O TIM1 channel 7GPIO
PTT[7]/KWT[7]I/O General-purpose; with interrupt and wakeup
PT6IOC1_6I/O TIM1 channel 6
ECLKO Free running clock output
PTT[6]/KWT[6]I/O General-purpose; with interrupt and wakeup
PT5IOC1_5I/O TIM1 channel 5
PTT[5]/KWT[5]I/O General-purpose; with interrupt and wakeup
PT4IOC1_4I/O TIM1 channel 4
PDOODBG profiling data output
PTT[4]/KWT[4]I/O General-purpose; with interrupt and wakeup
PT3IOC1_3I/O TIM1 channel 3
PDOCLKO DBG profiling clock
PTT[3]/KWT[3]I/O General-purpose; with interrupt and wakeup
PT2IOC1_2I/O TIM1 channel 2
DBGEEVIDBG external event input
PTT[2]/KWT[2]I/O General-purpose; with interrupt and wakeup
PT1IOC1_1I/O TIM1 channel 1
RTC_CALI/O RTC CALCLK output or external 1HZ input
PTT[1]/KWT[1]I/O General-purpose; with interrupt and wakeup
PT0(IOC1_0)I/O TIM1 channel 0T1IC0RR1-0
API_EXTCLKO API clock output
PTT[0]/KWT[0]I/O General-purpose; with interrupt and wakeup
Pin
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 75
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Port Pin Name
PAD7AN0_7IADC0 analog input 7
PAD6AN0_6IADC0 analog input 6
PAD5AN0_5IADC0 analog input 5
PAD4AN0_4IADC0 analog input 4
AD
PAD3AN0_3IADC0 analog input 3
PAD2AN0_2IADC0 analog input 2
PAD1AN0_1IADC0 analog input 1
PAD0AN0_0IADC0 analog input 0
Pin Function
& Priority
(1)
PTADL[7]/
KWADL[7]
PTADL[6]/
KWADL[6]
PTADL[5]/
KWADL[5]
PTADL[4]/
KWADL[4]
PTADL[3]/
KWADL[3]
PTADL[2]/
KWADL[2]
PTADL[1]/
KWADL[1]
PTADL[0]/
KWADL[0]
I/ODescriptionRouting Register
I/O General-purpose; with interrupt and wakeup
I/O General-purpose; with interrupt and wakeup
I/O General-purpose; with interrupt and wakeup
I/O General-purpose; with interrupt and wakeup
I/O General-purpose; with interrupt and wakeup
I/O General-purpose; with interrupt and wakeup
I/O General-purpose; with interrupt and wakeup
I/O General-purpose; with interrupt and wakeup
Pin
Function
after Reset
GPIO
S12ZVH Family Reference Manual, Rev. 1.05
76Freescale Semiconductor
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Port Pin Name
Pin Function
& Priority
I/ODescriptionRouting Register
(1)
Function
after Reset
UPU[7]M1SINPI/O SSD1 Sine+ NodeGPIO
M1C1PO Motor control output for motor 1
PTU[7]I/O General purpose
PU[6]M1SINMI/O SSD1 Sine- Node
M1C1MO Motor control output for motor 1
IOC0_3 I/O TIM0 channel 3
PTU[6]I/O General purpose
PU[5]M1COSPI/O SSD1 Cosine+ Node
M1C0PO Motor control output for motor 1
PTU[5]I/O General purpose
PU[4]M1COSMI/O SSD1 Cosine- Node
M1C0MO Motor control output for motor 1
IOC0_2 I/OTIM0 channel2
PTU[4]I/O General purpose
PU[3]M0SINPI/O SSD0 Sine+ Node
M0C1PO Motor control output for motor 0
PTU[3]I/O General purpose
PU[2]M0SINMI/O SSD0 Sine- Node
M0C1MO Motor control output for motor 0
IOC0_1 I/O TIM0 channel 1
PTU[2]I/O General purpose
PU[1]M0COSPI/O SSD0 Cosine+ Node
M0C0PO Motor control output for motor 0
PTU[1]I/O General purpose
PU[0]M0COSMI/O SSD0 Cosine- Node
M0C0MO Motor control output for motor 0
IOC0_0I/O TIM0 channel 0
PTU[0]I/O General purpose
Pin
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 77
Chapter 2 Port Integration Module (S12ZVHPIMV0)
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
V
1. Signals in parenthesis denote alternative module routing pins
2. Function active when RESET
3. The interrupt is enabled by clearing the X mask bit in the CPU CCR. The pin is forced to input upon first clearing of the X bit
and is held in this state until reset. A stop or wait recovery with the X bit set (refer to S12ZCPU reference manual) is not
available.
PV3M2SINPI/O SSD2 sine+ node
PV2M2SINMI/O SSD2 sine- node
PV1M2COSPI/O SSD2 cosine+ node
PV0M2COSMI/O SSD2 cosine- node
Pin Function
& Priority
M3C1PO Motor control output for motor 3
PTV[7]I/O General purpose
M3C1MO Motor control output for motor 3
IOC0_7I/O TIM0 channel 7
PTV[6]I/O General purpose
M3C0PO Motor control output for motor 3
PTV[5]I/O General purpose
M3C0MO Motor control output for motor 3
IOC0_6 I/O TIM0 channel 6
PTV[4]I/O General purpose
M2C1PO Motor control output for Motor 2
PTV[3]I/O General purpose
M2C1MO Motor control output for Motor 2
IOC0_5I/O TIM0 channel 5
PTV[2]I/O General purpose
M2C0PO Motor control output for Motor 2
PTV[1]I/O General purpose
M2C0MO Motor control output for Motor 2
IOC0_4I/O TIM0 channel 4
PTV[0]I/O General purpose
asserted.
I/ODescriptionRouting Register
(1)
Pin
Function
after Reset
2.3Memory Map and Register Definition
This section provides a detailed description of all port integration module registers.
This section describes the details of all configuration registers.
•If not stated differently, writing to reserved bits has no effect and read returns zero.
•All register read accesses are synchronous to internal clocks.
•All registers can be written at any time, however a specific configuration might not become active.
E.g. a pullup device does not become active while the port is used as a push-pull output.
•General-purpose data output availability depends on prioritization; input data registers always
reflect the pin status independent of the use.
•Pull-device availability, pull-device polarity, wired-or mode, key-wake up functionality are
independent of the prioritization unless noted differently.
•The description of registers PTx, PTIx, DDRx, DIENx, PERx, PPSx, SRRx, WOMx, PIEx and
PIFx generically assumes a fully implemented 8-bit register . For availability of individual bits refer
to Section 2.3.1, “Register Map”.
S12ZVH Family Reference Manual, Rev. 1.05
86Freescale Semiconductor
2.3.2.1Module Routing Register 0 (MODRR0)
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Address 0x0200Access: User read/write
76543210
R0000
W
— — — — CAN0-CANPHY0 (see Figure 2-2)
Reset00000000
C0CP0RR3C0CP0RR2C0CP0RR1C0CP0RR0
Figure 2-1. Module Routing Register 0 (MODRR0)
1. Read: Anytime
Write: Once in normal, anytime in special mode
For routing options refer to Figure 2-2.
.
FieldDescription
3
C0CP0RR3
2
C0CP0RR2
1
C0CP0RR1
Module Routing Register—
When set to 1, the internal interface is visible on the alternate external pins.
Module Routing Register—
When set to 1, the internal interface is visible on external pins.
Module Routing Register—
When set to 1, the internal interface is opened and CPTXD0 and RXCAN0 are routed to external pins.
Table 2-2. Module Routing Register 0 Field Descriptions
(1)
0
C0CP0RR0
Module Routing Register—
When set to 1, CPTXD0 is driven by CANPHY0 internal register bit CPDR1.
Table 2-3. Preferred Interface Configurations
C0CP0RR[3:0]Signal RoutingDescription
0000TXCAN0->CPTXD0
CPRXD0->RXCAN0
0001CPDR1->CPTXD0
CPRXD0->RXCAN0
0100TXCAN0-
>CPTXD0,PC1
CPRXD0-
>RXCAN0,PC2
0110 TXCAN0->PC1
PC3->CPTXD0
CPRXD0->PC2
PC0->RXCAN0
MSCAN0 connects to CANPHY0, interface internal
only
CPDR1 connects to CPTXD0, interface internal only
Probe mode, MCSAN0 connects to CANPHY0,
interface visible on 2 external pins
Conformance test mode, interface opened and all 4
signals routed externally
(1)
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 87
Chapter 2 Port Integration Module (S12ZVHPIMV0)
MSCAN0
CANPHY0
TXCAN0
RXCAN0
CPTXD0
CPRXD0
PC2/CPRXD0
PC3/CPTXD0
PC1/TXCAN0
PC0/RXCAN0
0
1
0
1
0
1
1
0
1
0
CPDR1
C0CP0RR0
SPLIT0
CANH0
CANL0
0
1
0
1
PS5/(TXCAN0)
PS4/(RXCAN0)
C0CP0RR1
C0CP0RR2C0CP0RR3
C0CP0RR[3:0]Signal RoutingDescription
1110 TXCAN0->PS5
PC3->CPTXD0
CPRXD0->PC2
PS4->RXCAN0
Conformance test mode, interface opened and all 4
signals routed externally
1
1. if CANPHY is not enabled, then PC3/PC2 will be controlled by other functions. The
configure can be use for standalone MSCAN connection.
These reserved registers are designed for factory test purposes only and are
not intended for general user access. Writing to these registers when in
special modes can alter the modules functionality
These reserved registers are designed for factory test purposes only and are
not intended for general user access. Writing to these registers when in
special modes can alter the modules functionality
2.3.2.8Port C Polarity Select Register
Address 0x0248 PPSCAccess: User read/write
76543210
R
PPSx7PPSx6PPSx5PPSx4PPSx3PPSx2PPSx1PPSx0
W
Reset00000000
Figure 2-10. Port C Polarity Select Register
1. Read: Anytime
Write: Anytime
(1)
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 93
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Table 2-9. Port C Polarity Select Register Field Descriptions
FieldDescription
7-1
PPSC
0
PPSC
Pull Polarity Select — Configure pull device on input pin
This bits select a pullup or a pulldown device if enabled on the associated port input pin.
Port P Pull Polarity Select — Configure pull device on input pin
This bit selects a pullup or a pulldown device if enabled on the associated port input pin.
If MSCAN0 is active and routing to this pin, a pullup device can be activated on the RXCAN0 input; attempting to
select a pulldown disables the pull-device.
Port P Pull Polarity Select — Configure pull device and pin interrupt edge polarity on input pin
This bit selects a pullup or a pulldown device if enabled on the associated port input pin.
If MSCAN0 is active and routing to this pin, a pullup device can be activated on the RXCAN0 input; attempting to
select a pulldown disables the pull-device.
Pull Polarity Select — Configure pull device and pin interrupt edge polarity on input pin
This bit selects a pullup or a pulldown device if enabled on the associated port input pin.
This bit also selects the polarity of the active interrupt edge.
1. Read: Anytime. The data source is depending on the data direction value.
Write: Anytime
(1)
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 95
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Table 2-11. Port Data Register Field Descriptions
FieldDescription
7-0
PTx
Port — General purpose input/output data
This register holds the value driven out to the pin if the pin is used as a general purpose output.
When not used with the alternative function (refer to Ta b le 2 -1 ), these pins can be used as general purpose I/O.
If the associated data direction bits of these pins are set to 1, a read returns the value of the port register, otherwise
the buffered pin input state is read.
Table 2-13. Data Direction Register Field Descriptions
(1)
FieldDescription
7-0
DDRx
Data Direction — Select general-purpose data direction
This bit determines whether the pin is a general-purpose input or output.
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 two bus clock
cycles until the correct value is read on port data and port input registers,
when changing the data direction register.
The general-purpose data direction configuration can be overruled by an enabled peripheral function
shared on the same pin (Table 2-22). If more then one peripheral function is available and enabled at the
same time, the highest ranked module according the predefined priority scheme in Table 2-1 will take
precedence on the pin.
S12ZVH Family Reference Manual , Rev. 1.05
Freescale Semiconductor 97
Chapter 2 Port Integration Module (S12ZVHPIMV0)
2.3.2.13Digital Input Enable Register
Address 0x0299 DIENADLAccess: User read/write
76543210
R
DIENx7DIENx6DIENx5DIENx4DIENx3DIENx2DIENx1DIENx0
W
Reset00000000
Figure 2-15. Digital Input Enable Register
1. Read: Anytime
Write: Anytime
Table 2-14. Digital Input Enable Register Field Descriptions
FieldDescription
7-0
DIENx
Digital Input Enable — Input buffer control
This bit controls the digital input function. If set to 1 the input buffers are enabled and the pin can be used with the
digital function. If the pin is used with an analog function this bit shall be cleared to avoid shoot-through current.
1 Associated pin is configured as digital input
0 Associated pin digital input is disabled
(1)
S12ZVH Family Reference Manual, Rev. 1.05
98Freescale Semiconductor
2.3.2.14Pull Device Enable Register
Chapter 2 Port Integration Module (S12ZVHPIMV0)
Address 0x0226 PERA
0x0227 PERB
0x0246 PERC
0x0247 PERD
0x0266 PERE
0x0267 PERF
0x0287 PERADL
0x02C3 PERT
0x02D3 PERS
0x02F3 PERP
0x0303 PERH
0x0323 PERG
0x0353 PERU
0x0363 PERV
76543210
R
PERx7PERx6PERx5PERx4PERx3PERx2PERx1PERx0
W
Reset
Ports B, E:00001111
Ports C, P T,
ADL, U, V:
Others:11111111
00000000
Access: User read/write
(1)
1. Read: Anytime
Write: Anytime
Table 2-15. Pull Device Register Field Descriptions
FieldDescription
Figure 2-16. Pull Device Enable Register
7-0
PERx
Pull Enable — Activate pull device on input pin
This bit controls whether a pull device on the associated port input or open-drain output pin is active. If a pin is used
as push-pull output this bit has no effect. The polarity is selected by the related polarity select register bit. On opendrain output pins only a pullup device can be enabled.
Table 2-16. Polarity Select Register Field Descriptions
FieldDescription
Figure 2-17. Polarity Select Register
7-0
PPSx
Pull Polarity Select — Configure pull device and pin interrupt edge polarity on input pin
This bit selects a pullup or a pulldown device if enabled on the associated port input pin.
If a port has interrupt functionality this bit also selects the polarity of the active edge.
If MSCAN0 is active a pullup device can be activated on the RXCAN0 input; attempting to select a pulldown disables
the pull-device.