The MC9S12ZVMB-Family is targeted for safety relevant systems and has been developed using
an ISO26262 compliant development system under the NXP Safe Assure program. For details of
device usage in safety relevant systems refer to the MC9S12ZVMB Safety Manual.
The document revision on the Internet is the most current. To verify this is the latest revision, refer to:
nxp.com
This document contains information for all modules except the CPU. For CPU information please refer to
the CPU S12Z Reference Manual. The following revision history table summarizes changes to this
document. The individual module sections contain revision history tables with more detailed information..
Table 0-1. Revision History
DateRevisionDescription
Updated family member comparison table
26 Nov 20151.1
24 Mar 20161.2
16 Sep 2016
07 Mar 20171.3
1.3
DRAFT A
Corrected Figure 1-10
Updated ordering information in Appendix K
Added Grade0 row to device summary Table 1-2
Corrected number of external ADC channels Section 1.4.11
Specified unused VSUPHS must be connected to VSUP or VDDX Section 1.7.3.6
Adjusted VREG temperature sensor electrical parameter valuesTa b le B -1
Changed ADC maximum frequency from 8.34MHz to 8MHz Table C-1
Adjusted HVI input resistance in PIM chapter Figure 2-42
Corrected pin name from VRH0 to VRH_0 Figure 1-4
Minor formating and error corrections (see PIM, GDU, SRAM_ECC revision histories)
Corrected write access limitations for GDU registers
Added bootstrap switch diode to GDU Figure 18-17
Added GDU current sense unity bandwidth and input resistance to Ta bl e E- 1
Changed RESET pin input pulse passed parameter minimum value Ta b le A -11
Added bootstrap diode resistance parameter Table E-1
Added to applications list in device overview
Added temperature sensor application information Section 1.13.1
Renamed CPMU alternate temperature sensor to DVBE temperature sensor
Enhanced power dissipation info Table A-7, Figure A-2
Updated PT2 leakage values Table A-10
Updated current consumption values Table A-16, Tab l e A -1 7
Updated DVBE temperature sensor values Ta bl e B - 1
Updated VBG temperature dependence value, Ta b le B -1
Added desaturation thresholds to GDU electrical specification Ta bl e E -1
Updated VLS current limit threshold Table E-1
Added parameter GHD division ratio through phase mux.Ta bl e E - 1
Clarified VDDX range for test and characterization Ta b le A -1 0, Ta bl e C - 1
Updated ISUPS values at 105C Ta b le A -1 7
Updated V
Updated temperature sensor application information Section 1.13.1
Updated GDU t
Added R
Updated gate drive footnote Ta bl e E -1
Updated current injection considerations C.1.1.4/C-692, Table A-12
Added GDU to TIM1 IC2 connection
Changed pin order to improve VLS bond out
1.1Introduction
The S12 MagniV product line is a highly optimized, automotive family of devices which integrate, beside
the typical digital peripherals, additional analog battery level (12 V) components.
The MC9S12ZVMB-Family is a new member of the S12 MagniV product line based on the enhanced
performance, linear address space S12Z core and delivers an optimized solution with the integration of
several key system components into a single device, optimizing system architecture and achieving
significant space savings.
The particular differentiating features of this family are the enhanced S12Z core, the combination of an
ADC synchronized to PWM signals using a Programmable Trigger Unit (PTU) and the integration of
“high-voltage” analog modules, including the voltage regulator (VREG), Gate Drive Unit (GDU) and a
Local Interconnect Network (LIN) physical layer. These features enable a fully integrated single chip
solution to drive external power MOSFETs for motor drive applications.
The MC9S12ZVMB-Family includes error correction code (ECC) on RAM and flash memory, EEPROM
for diagnostic or data storage, a fast analog-to-digital converter (ADC) and a frequency modulated phase
locked loop (PLL) that improves the EMC performance. The MC9S12ZVMB-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 existing S12 families. In addition to the
peripheral module I/O ports, further I/O ports are available with interrupt capability allowing wake-up
from stop or wait modes.
The MC9S12ZVMB-Family is a general-purpose family of devices suitable for a range of applications,
including:
•Brush DC motors that need driving in 2 directions, along with PWM control for
— Window lift
— Trunk opener
— Sun roof
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductor17
Page 18
Chapter 1 Device Overview MC9S12ZVMB-Family
— Sliding doors
— Seat positioning
1.2Features
This section describes the key features of the MC9S12ZVMB-Family.
1.2.1MC9S12ZVMB-Family member comparison
Table 1-2 provides a summary of feature set differences within the MC9S12ZVMB-Family. All other
1. One SCI internally mapped to LIN physical layer
2. Four PWM channels internally mapped to GDU, 2 PWM channels for GPIO/HS
(2)
(1)
6
Max. PWM frequency 1 kHz
2 HS + 2 LS
MC9S12ZVMB Family Reference Manual Rev. 1.3
18NXP Semiconductors
Page 19
Chapter 1 Device Overview MC9S12ZVMB-Family
1.2.2ADC module versions
This device family features ADC V3. The ADC module description includes a superset of features for V1,
V2 and V3. It also summarizes these minor version differences.
1.2.3S12ZVMBA versions
The FET-Predriver on the S12ZVMB version cannot be driven directly from the PMF PWM channels at a
frequency of greater than 1KHz. Otherwise the S12ZVMB device is identical to the S12ZVMBA device.
1.3Chip-Level features
On-chip modules available within the family include the following features:
•S12Z CPU core
•64 KB or 48 KB on-chip flash with ECC
•512 Byte EEPROM with ECC
•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 junction temperature range up to 150C
•4-20 MHz amplitude controlled pierce oscillator
•Internal COP (watchdog) module
•6-channel, 15-bit pulse width modulator with fault protection (PMF)
•Low-side and High-side FET pre-drivers for each phase
— Gate drive pre-regulator (11 V LDO)
— High-side gate supply generated using bootstrap circuit with internal diode and external
capacitor
— Sustaining charge pump with two external capacitors and diodes
— High-side drain (GHD) monitoring on internal ADC channel using GHD/5 voltage
•Analog-to-digital converter (ADC) with 10-bit resolution and up to 9 channels available on
external pins
•One serial peripheral interface (SPI) module
•One serial communication interface (SCI) module with interface to internal LIN physical layer
transceiver (with RX connected to a timer channel for frequency calibration purposes, if desired)
•One additional SCI (not connected to LIN physical layer)
•On-chip LIN physical layer transceiver fully compliant with the LIN 2.2 and SAE J2602-2
standards
•Two 4-channel timer modules (TIM) with input capture/output compare
•One programmable trigger unit (PTU) for ADC trigger synchronization
•On-chip voltage regulator (VREG) for regulation of input supply and all internal voltages
•One current sense circuit for over-current detection or torque measurement
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors19
Page 20
Chapter 1 Device Overview MC9S12ZVMB-Family
•Autonomous periodic interrupt (API)
•Two High-side Driver outputs
•Three High Voltage Input (HVI) pins
•One 20mA high-current output for use as Hall sensor supply
•Supply voltage sensor with low battery warning
•One high current (25 mA sink) NGPIO
•Chip temperature sensor
1.4Module features
The following sections provide more details of the integrated modules.
1.4.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 and performance
impact of page swapping.
•Harvard Architecture - parallel data and code access
•3 stage pipeline
•32-Bit wide instruction and databus
•32-Bit arithmetic logic unit (ALU)
•24-bit addressing, of 16 MByte linear address space
•Instruction and addressing modes optimized for C-programming & compilation
— Multiply and accumulate (MAC) unit 32bit += 32bit*32bit
— Hardware divider
— Single cycle multi-bit shifts (Barrel shifter)
— Special instructions for fixed point math
•Unimplemented opcode traps
•Unprogrammed byte value (0xFF) defaults to SWI instruction
— Supports in-circuit programming of on-chip nonvolatile memory
1.4.1.2Debugger (DBG)
•Three comparators (A, B and D)
— Comparator A compares the full address bus and full 32-bit data bus
— Comparators B and D compare the full address bus only
MC9S12ZVMB Family Reference Manual Rev. 1.3
20NXP Semiconductors
Page 21
— Each comparator can be configured to monitor PC addresses or addresses of data accesses
— Each comparator can select either read or write access cycles
— Comparator matches can force state sequencer state transitions
•Three comparator modes
— Simple address/data comparator match mode
— Inside address range match
— Outside address range match
•State sequencer control
— State transitions forced by comparator matches
— State transitions forced by software write to TRIG
— State transitions forced by an external event
•The following types of breakpoints
— CPU breakpoint entering active BDM on breakpoint (BDM)
— CPU breakpoint executing SWI on breakpoint (SWI)
1.4.2Embedded memory
Chapter 1 Device Overview MC9S12ZVMB-Family
1.4.2.1Memory access integrity
•Illegal address detection
•ECC support on embedded NVM and SRAM
1.4.2.2Flash
On-chip flash memory features the following:
•Up to 64KB of program flash memory
— 32 data bits plus 7 syndrome ECC (error correction code) bits allow single bit fault correction
and double bit fault detection
— Erase sector size of 512 bytes
— Automated program and erase algorithm
— User margin level setting for reads
— Protection scheme to prevent accidental program or erase
1.4.2.3EEPROM
•Up to 512 Bytes EEPROM
— 16 data bits plus 6 syndrome ECC bits
— Single bit error correction, double bit error detection
— Erase sector size 4 bytes, program with word resolution
— Automated program and erase algorithm
— User margin level setting for reads
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors21
Page 22
Chapter 1 Device Overview MC9S12ZVMB-Family
1.4.2.4SRAM
•Up to 4 Kbytes of general-purpose RAM with ECC
— Single bit error correction and double bit error detection
1.4.3Clocks, reset & power management unit (CPMU)
•Real time interrupt (RTI)
•Clock monitor, supervising the correct function of the oscillator (CM)
•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
•System reset generation
•Autonomous periodic interrupt (API) (combination with cyclic, watchdog)
— Trimmable RC oscillator timebase that can remain active in STOP mode
•Low Power Operation
— RUN mode - main full performance operating mode with the entire device clocked
— WAIT mode - the internal CPU clock is switched off, so the CPU does not execute instructions
— Pseudo STOP - system clocks are stopped but the oscillator, RTI, COP, and API modules can
be enabled
— STOP - the oscillator is stopped in this mode, all clocks are switched off and all counters and
dividers remain frozen, with the exception of the COP and API which can optionally run from
ACLK
1.4.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 1 MHz reference clock.
— Trimmed accuracy for temperature options V, M: 1.3%max.
— Trimmed accuracy for temperature option W: 1.45%max
MC9S12ZVMB Family Reference Manual Rev. 1.3
22NXP Semiconductors
Page 23
Chapter 1 Device Overview MC9S12ZVMB-Family
1.4.4External oscillator (XOSCLCP)
•Amplitude controlled Pierce oscillator using 4 MHz to 20 MHz crystal
— Current gain control on amplitude output
— Signal with low harmonic distortion
— Low power
— Good noise immunity
— Eliminates need for external current limiting resistor
— Trans conductance sized for optimum start-up margin for typical crystals
— Oscillator pins shared with GPIO functionality
1.4.54 channel timer (TIM)
•4 x 16-bit channels Timer module for input capture or output compare
•16-bit free-running counter with 8-bit precision prescaler
1.4.6Pulse width modulator with fault protection (PMF)
•6 x 15-bit channel PWM resolution
•Each pair of channels can be combined to generate a PWM signal (with independent control of
edges of PWM signal)
•Dead time insertion available for each complementary pair
•Center-aligned or edge-aligned outputs
•Programmable clock select logic with a wide range of frequencies
•Programmable fault detection
1.4.7Programmable trigger unit (PTU)
•Synchronizes ADC triggers based on PMF signal edges
•One 16 bit counter as time base for all trigger events
•One trigger generator(TG0) Up to 32 trigger events per trigger generator
•Global Load OK support, to guarantee coherent update of all control loop modules
•Trigger values stored in system memory
•Software generated reload event and trigger event generation for debugging
1.4.8LIN physical layer transceiver
•Compliant with LIN physical layer 2.2 specification
•Compliant with the SAE J2602-2 LIN standard
•Standby mode with glitch-filtered wake-up
•Slew rate selection optimized for the baud rates:
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors23
Page 24
Chapter 1 Device Overview MC9S12ZVMB-Family
— 10.4 kBit/s
— 20 kBit/s
— Fast Mode (up to 250 kBit/s)
•Selectable pull-up of 34 k or 330 k (in Shutdown Mode, 330 k only)
•Current limitation for LIN Bus pin falling edge.
•Over-current protection.
•LIN TxD-dominant timeout feature monitoring the LPTxD signal.
•Automatic transmitter shutdown in case of an over-current or TxD-dominant timeout.
•Fulfills the OEM “Hardware Requirements for LIN (CAN and FlexRay) Interfaces in Automotive
Applications” v1.3.
1.4.9Serial communication interface module (SCI)
•Full-duplex or single-wire operation
•Standard mark/space non-return-to-zero (NRZ) format
•Selectable IrDA 1.4 return-to-zero-inverted (RZI) format with programmable pulse widths
•16-bit baud rate selection
•Programmable character length
•Programmable polarity for transmitter and receiver
•Active edge receive wakeup
•Break detect and transmit collision detect supporting LIN
1.4.10Serial 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.4.11Analog-to-digital converter module (ADC)
•Selectable 10-bit or 8-bit resolution
•Up to 12 external channels & 8 internal channels
•2.2us for single 10-bit resolution conversion
•Left or right aligned result data
•Continuous conversion mode
•Programmers model with list based command and result storage architecture
MC9S12ZVMB Family Reference Manual Rev. 1.3
24NXP Semiconductors
Page 25
Chapter 1 Device Overview MC9S12ZVMB-Family
•ADC directly writes results to RAM, preventing stall of further conversions
•Internal signals monitored by the ADC module
— VRH, VRL, (VRL+VRH)/2
— Vsup monitor
— VREG Vbg, and Temperature Sensor
— Delta VBE Temperature Sensor
— GDU phase, GDU DC-link
— High Voltage Inputs (PL[2:0])
•External pins can also be used as digital I/O with keyboard wake-up interrupt capability
1.4.12Supply voltage sensor (BATS)
•Monitoring of supply (VSUP) voltage
•Internal ADC interface from an internal resistive divider
•Optional generation of low or high voltage interrupts
1.4.13On-chip voltage regulator system (VREG)
•Voltage regulator
— Linear voltage regulator directly supplied by VSUP
— Low-voltage detect on VSUP
— Power-on reset (POR)
— Low-voltage reset (LVR) for VDDX domain
— Over-temperature interrupt
•Internal voltage regulator
— Linear voltage regulator with bandgap reference
— Low-voltage detect on VDDA
— Power-on reset (POR) circuit
— Low-voltage reset for VDD domain
1.4.14Gate drive unit (GDU)
•Low-side and High-side FET pre-drivers for 2 phases of 2 half bridges
•Gate drive pre-regulator LDO (Low Dropout Voltage Regulator)
•High-side gate supply done via bootstrap circuit with internal diode and external capacitor
•Sustaining charge pump with two external capacitors and diodes
•FET-Predriver short circuit (desaturation) detection
•Over and under voltage detection and shutdown
•Over current monitor with optional shutdown
•Monitoring of FET High-side drain (GHD) voltage
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors25
Page 26
Chapter 1 Device Overview MC9S12ZVMB-Family
•Diagnostic failure management
•Integrated OP-amp functionality
1.4.15High side driver
•Selectable gate control: HSDR[HSDRx] register bits or PWM or timer channels
•Open-load detection
•Slew rate control
•Over-current shutdown, comprising of:
— Interrupt flag generation
— Driver shutdown
— Optional masking window
MC9S12ZVMB Family Reference Manual Rev. 1.3
26NXP Semiconductors
Page 27
1.5Block diagram
RESET
EXTAL
XTAL
BKGD
VSUP
Real Time Interrupt
Clock Monitor
Background
TEST
Debug Controller
Interrupt Module
PAD[8:0]/KWAD[8:0]
S12ZCPU
COP Watchdog
PLL with Frequency
Modulation option
Debug Module
Reset Generation
and Test Entry
Auton. Periodic Int.
MOSI0
SS0
SCK0
MISO0
SPI0
5V Voltage
(Nominal input 12V)
Block Diagram shows the maximum configuration
Not all pins or all peripherals are available on all devices and packages.
Table 1-3 shows the device register memory map. All modules that can be instantiated more than once on
S12 devices are listed with an index number, even if they are only instantiated once on this device family.
Table 1-3. Module register address ranges
AddressModule
0x0000–0x0003Part ID Register Section 1.6.14
0x0004–0x000F
0x0010–0x001FINT 16
0x0020–0x006FReserved80
0x0070–0x008FMMC 32
0x0090–0x00FFMMC Reserved112
0x0100–0x017FDBG 128
0x0180–0x01FF
0x0200–0x037FPIM384
0x0380–0x039FFTMRZ32
0x03A0–0x03BF
0x03C0–0x03CFSRAM ECC 16
0x03D0–0x03FFReserved48
0x0400–0x042FTIM148
0x0430–0x043FReserved 16
0x0440–0x04FF
0x0500–0x053FPMF64
Reserved12
Reserved128
Reserved32
Reserved192
Size
(Bytes)
0x0540–0x057FReserved64
0x0580–0x059FPTU32
0x05A0–0x05BF
0x05C0–0x05EFTIM048
0x05F0–0x05FF
0x0600–0x063FADC0 64
0x0640–0x067FReserved64
0x0680–0x069F
0x06A0–0x06BFGDU32
0x06C0–0x06DFCPMU32
0x06E0–0x06EF
0x06F0–0x06F7BATS8
0x06F8–0x06FF
0x0700–0x0707SCI08
MC9S12ZVMB Family Reference Manual Rev. 1.3
28NXP Semiconductors
Reserved32
Reserved 16
Reserved32
Reserved16
Reserved8
Page 29
Chapter 1 Device Overview MC9S12ZVMB-Family
Table 1-3. Module register address ranges
AddressModule
0x0708–0x070FReserved8
0x0710–0x0717SCI18
0x0718–0x077FReserved104
0x0780–0x0787SPI08
0x0788–0x097FReserved504
0x0980–0x0987LINPHY08
0x0988–0x09BF
0x09C0–0x09C7HSDRV08
0x09C8–0x0FFFReserved1592
Reserved56
Size
(Bytes)
NOTE
Reserved register space shown above is not allocated to any module. This
register space is reserved for future use. Writing to these locations has no
effect. Read access to these locations returns zero.
The part ID is located in four 8-bit registers at addresses 0x0000-0x0003. The read-only value is a unique
part ID for each revision of the chip. Table 1-5 shows the assigned part ID number and mask set number.
Table 1-5. Assigned part ID numbers
DeviceMask Set NumberPart ID
MC9S12ZVMB64N17S0x06160000
1.7Signal description and device pinouts
This section describes signals that connect off-chip. It includes pin out diagrams, a table of signal
properties, and detailed discussion of signals. Internal inter module signal mapping at device level is
described in 1.8 Internal signal mapping.
1.7.1Pin assignment overview
Table 1-6 provides a summary of which ports are available.
Table 1-6. Port availability by package option
Port64 LQFP48 LQFP
Port ADPAD[8:0]PAD[4:0]
Port E PE[1:0]PE[1:0]
Port L (HVI)PL[2:0]PL[2:0]
Port PPP[1:0]PP[1:0]
Port TPT[7:0]PT[2:0]
sum of ports2415
NOTE
To 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.7.2Detailed external signal descriptions
This section describes the properties of signals available at device pins. Signal names associated with
modules that can be instantiated more than once are indexed, even if the module is only instantiated once.
If a signal already includes a channel number, then the index is inserted before the channel number. Thus
TIMx_y corresponds to TIM instance x, channel number y.
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors31
Page 32
Chapter 1 Device Overview MC9S12ZVMB-Family
1.7.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.7.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.7.2.3MODC — Mode C signal
The MODC signal is used as an 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.7.2.4PAD[8:0] / KWAD[8:0] — Port AD, input pins of ADC
PAD[8: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[8:0]). These signals can have a pull-up or pull-down
device selected and enabled on per signal basis. During and out of reset the pull devices are disabled.
1.7.2.5PE[1:0] — Port E I/O signals
PE[1:0] are general-purpose input or output signals. The signals can have a pull-up or pull-down device,
enabled by on a per pin basis. Out of reset the pull-down devices are enabled.
1.7.2.6PL[2:0] / KWL[2:0] — Port L input signals
PL[2:0] are the high voltage input signals. These signals can be configured on a per signal basis as interrupt
inputs with wake-up capability (KWL[2:0]). These signals can alternatively be used as analog inputs
measured by the ADC.
1.7.2.7PP[1:0] / KWP[1:0] — Port P I/O signals
PP[1:0] are general-purpose input or output signals. The signals can be configured on per signal basis as
interrupt inputs with wake-up capability (KWP[1:0]). They can have a pull-up or pull-down device
selected and enabled on per signal basis. During and out of reset the pull devices are disabled.
The PP0 pin features the EVDD option, for an increased high-side current drive with low voltage drop.
1.7.2.8PT[7:0] — Port T I/O signals
PT[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. During and out of reset the pull devices are disabled.
The PT2 pin features the NGPIO option, for an increased Low-side current drive with low voltage drop.
MC9S12ZVMB Family Reference Manual Rev. 1.3
32NXP Semiconductors
Page 33
Chapter 1 Device Overview MC9S12ZVMB-Family
1.7.2.9AN0_[11:0] — ADC input signals
These are the analog inputs of the Analog-to-Digital Converter. ADC0 has up to 9 analog input channels
connected to PAD[8:0] port pins. The channels AN_[11:9] are connected to HVI[2:0] respectively.
1.7.2.10VRH_0, VRL_0— ADC reference inputs
VRH_0 and VRL_0 are the reference voltage inputs for the analog-to-digital converter.
1.7.2.11SPI0 signals
1.7.2.11.1SS0 signal
This signal is associated with the slave select SS functionality of the serial peripheral interface SPI0.
1.7.2.11.2SCK0 signal
This signal is associated with the serial clock SCK functionality of the serial peripheral interface SPI0.
1.7.2.11.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.7.2.11.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
1.7.2.12SCI[1:0] signals
1.7.2.12.1RXD[1:0] signals
These signals are associated with the receive functionality of the serial communication interfaces
(SCI[1:0]).
1.7.2.12.2TXD[1:0] signals
These signals are associated with the transmit functionality of the serial communication interfaces
(SCI[1:0]).
1.7.2.13Timer IOC0_[3:0] signals
The signals IOC0_[3:0] are associated with the input capture or output compare functionality of the timer
(TIM0) module.
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors33
Page 34
Chapter 1 Device Overview MC9S12ZVMB-Family
1.7.2.14Timer IOC1_[3:0] signals
The signals IOC1_[3:0] are associated with the input capture or output compare functionality of the timer
(TIM1) module.
1.7.2.15PWM[5:4] signals
The signals PWM[5:4] are associated with the PMF module digital channel outputs.
1.7.2.16PTU signals
1.7.2.16.1PTUT0 signal
This is the PTU trigger output signal, routed to a pin for debugging purposes.
1.7.2.16.2PTURE signal
This signal is the PTU reload enable output signal. This signal is routed to a pin for debugging purposes.
1.7.2.17Interrupt signals — IRQ and XIRQ
IRQ is a maskable level or falling edge sensitive input. XIRQ is a non-maskable level-sensitive interrupt.
1.7.2.18Oscillator and clock signals
1.7.2.18.1Oscillator pins — EXTAL and XTAL
EXTAL and XTAL are the crystal driver and external clock pins. On reset all the device clocks are derived
from the internal PLLCLK, independent of EXTAL and XTAL. XTAL is the oscillator output.
1.7.2.18.2ECLK
This signal is associated with the output of the 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.7.2.19BDC and debug signals
1.7.2.19.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.
MC9S12ZVMB Family Reference Manual Rev. 1.3
34NXP Semiconductors
Page 35
Chapter 1 Device Overview MC9S12ZVMB-Family
1.7.2.19.2DBGEEV — External event input
This signal is the DBG external event input. It is input only. Within the DBG module, it allows an external
event to force a state sequencer transition 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.7.2.20FAULT5 — External fault input
This is the PMF fault input signal, with configurable polarity, that can be used to disable PMF operation
when asserted.
1.7.2.21LIN Physical layer signals
1.7.2.21.1LIN0
This pad is connected to the single-wire LIN data bus.
1.7.2.21.2LP0TXD
This is the LIN physical layer transmitter input signal.
1.7.2.21.3LP0RXD
This is the LIN physical layer receiver output signal.
1.7.2.21.4LP0DR1
This is the LIN LP0DR1 register bit, visible at the designated pin for debug purposes.
1.7.2.22HS[1:0] High-Side driver output signals
Outputs of the two high-side drivers.
1.7.2.23Gate drive unit (GDU) signals
These are associated with driving the external FETs.
1.7.2.23.1GHD — FET predriver high-side drain input
This is the drain connection of the external high-side FETs. The voltage present at this input is scaled down
by an internal voltage divider, and can be routed to the internal ADC.
These signals are the bootstrap capacitor connections for phases HS[1:0]. The capacitor connected
between HS[1:0] and these signals provides the gate voltage and current to drive the external FET.
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors35
Page 36
Chapter 1 Device Overview MC9S12ZVMB-Family
1.7.2.23.3GHG[1:0] - High-side gate signals
These pins are the gate drives for the high-side power FETs. The drivers provide a high current with low
impedance to turn on and off the high-side power FETs.
1.7.2.23.4GHS[1:0] - High-side source signals
These pins are the source connection for the high-side power FETs and the drain connection for the lowside power FETs. The low voltage end of the bootstrap capacitor is also connected to this pin.
1.7.2.23.5VLS - Voltage supply for low -side drivers
This pin is the voltage supply pin for the low-side FET pre-drivers. It should be connected to the voltage
regulator output pin VLS_OUT.
1.7.2.23.6GLG[1:0] - Low-side gate signals
These pins are the gate drives for the low-side power FETs. The drivers provide a high current with low
impedance to turn on and off the low-side power FETs.
1.7.2.23.7GLS[1:0] - Low-side source signals
These pins are the low-side source connections for the low-side power FETs. The pins are the power
ground pins used to return the gate currents from the low-side power FETs.
1.7.2.23.8CP - Charge pump output signal
This pin is the switching node of the charge pump circuit. The supply voltage for charge pump driver is
the output of the voltage regulator VLS_OUT. The output voltage of this pin switches typically between
0V and 11V. This pin must be left unconnected if not used.
1.7.2.23.9VCP - Charge pump input for high-side driver supply
This is the charge pump input for the FET high-side gate drive supply circuit. The pin must be left
unconnected if not used.
1.7.2.23.10VLS_OUT - 11V Voltage regulator output
This pin is the output of the GDU integrated voltage regulator. The output voltage is typically 11V. The
input voltage to the voltage regulator is the VSUP pin.
1.7.2.23.11AMPP0 - Current sense amplifier non-inverting input
This is the current sense amplifier non-inverting input.
1.7.2.23.12AMPM0 - Current sense amplifier inverting input
This is the current sense amplifier inverting input.
MC9S12ZVMB Family Reference Manual Rev. 1.3
36NXP Semiconductors
Page 37
Chapter 1 Device Overview MC9S12ZVMB-Family
1.7.2.23.13AMP0 - Current sense amplifier output
This is the current sense amplifier output.
1.7.3Power 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.7.3.1VDDX1, VSSX[5:1] — Digital I/O power and ground pins
VDDX1 is the voltage regulator output to supply the digital I/O drivers. The VSSX pins are the ground
pins for the output drivers and GDU drivers.
Bypass requirements on VDDX/VSSX depend on how heavily the MCU pins are loaded.
1.7.3.2VDDA, VSSA — Power supply pins for ADC
These are the power supply and ground pins for the analog-to-digital converter and the voltage regulator.
1.7.3.3VSS — Core ground pin
The voltage supply of nominally 1.8V is generated by the internal voltage regulator.
1.7.3.4LGND — LINPHY ground pin
LGND is the ground pin for the LIN physical layer LINPHY.
1.7.3.5VSUP — Voltage supply pin for voltage regulator
VSUP is the main supply pin typically coming from the car battery/alternator in the 12V supply voltage
range. 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.7.3.6VSUPHS Voltage supply pin for high-side drivers
VSUPHS is the 12V/18V shared supply voltage pin for the high-side drivers. It must be protected
externally against a reverse battery connection.
NOTE
If not used VSUPHS must be connected either to VSUP or VDDX. It must
not be connected to VSSX
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors37
Page 38
Chapter 1 Device Overview MC9S12ZVMB-Family
1.7.3.7EVDD
This is a high current, low voltage drop output intended for supplying external devices in a range of up to
20mA. Configuring the pin direction as output automatically enables the high current capability. It
includes an over current protection feature.
1.7.3.8NGPIO
This is a high current, low voltage drop output intended for increased low side current driving capability
in a range of up to 25mA. Configuring the pin direction as output automatically enables the high current
capability. It includes an over current protection feature.
Please refer to the PIM chapter for priority and routing information.
Table 1-7. Pin summary (Sheet 1 of 3)
Chapter 1 Device Overview MC9S12ZVMB-Family
LQFP
Option
6448Pin
1st
Func.
2nd
Func.
Function
3rd
Func.
4th
Func.
5th
Func.
6th
Func.
Power
Domai
n
Internal Pull
Resistor
CTRL
Rese
t
State
11VSUP——————— ——
22VLS_OU
——————— ——
T
33CP——————— ——
44VSSX1——————— ——
55VCP——————— ——
66GHD——————— ——
7—N.C.——————— ——
87PL2HVI2KWL2IC1_2AN0_11—————
98PL1HVI1KWL1IC1_1AN0_10—————
109PL0HVI0KWL0IC1_0AN0_9—————
11—N.C.——————— ——
1210HS1OC1_2PWM5————V
1311VSSX2——————V
1412HS0OC1_1PWM4————V
1513VSUPHS——————V
SUPHS
SUPHS
SUPHS
SUPHS
——
——
——
——
16—N.C.——————— ——
1714BKGDMODC—————V
1815RESET——————V
DDX
DDX
—Up
TEST pinUp
1916TEST———————RESETDown
20—PAD8KWAD8AN0_8————V
DDA
PERADH/
Off
PPSADH
21—PAD7KWAD7AN0_7————V
DDA
PERADL/
Off
PPSADL
22—PAD6KWAD6AN0_6————V
DDA
PERADL/
Off
PPSADL
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors41
Page 42
Chapter 1 Device Overview MC9S12ZVMB-Family
Table 1-7. Pin summary (Sheet 2 of 3)
LQFP
Option
Function
Power
Domai
6448Pin
1st
Func.
23—PAD5KWAD5AN0_5————V
2417PAD4KWAD4AN0_4SS0———V
2518PAD3KWAD3AN0_3PTUT0———V
2619PAD2KWAD2AN0_2AMP0———V
2720PAD1KWAD1AN0_1AMPM0———V
28—VRH_0——————V
—21VDDAVRH_0—————V
29—VDDA——————V
3022VSSAVRL_0—————V
3123PAD0KWAD0AN0_0AMPP0———V
2nd
Func.
3rd
Func.
4th
Func.
5th
Func.
6th
Func.
n
DDA
DDA
DDA
DDA
DDA
DDA
DDA
DDA
DDA
DDA
Internal Pull
Resistor
Rese
CTRL
t
State
PERADL/
Off
PPSADL
PERADL/
Off
PPSADL
PERADL/
Off
PPSADL
PERADL/
Off
PPSADL
PERADL/
Off
PPSADL
——
——
——
——
PERADL/
Off
PPSADL
3224GLS0——————— ——
3325GLG0——————— ——
3426VSSX3——————— ——
3527VBS0——————— ——
3628GHG0——————— ——
3729GHS0——————— ——
3830GHS1——————— ——
3931GHG1——————— ——
4032VBS1——————— ——
4133VSSX4——————— ——
4234VLS——————— ——
4335GLG1——————— ——
4436GLS1——————— ——
45—PT7IOC1_3—————V
DDX
PERT/
Off
PPST
MC9S12ZVMB Family Reference Manual Rev. 1.3
42NXP Semiconductors
Page 43
Chapter 1 Device Overview MC9S12ZVMB-Family
Table 1-7. Pin summary (Sheet 3 of 3)
LQFP
Option
Function
Power
Domai
6448Pin
1st
Func.
46—PT6IOC1_2—————V
2nd
Func.
3rd
Func.
4th
Func.
5th
Func.
6th
Func.
n
DDX
Internal Pull
Resistor
CTRL
PERT/
Rese
t
State
Off
PPST
47—PT5IOC1_1—————V
DDX
PERT/
Off
PPST
48—PT4IOC1_0—————V
DDX
PERT/
Off
PPST
4937LGND——————— ——
5038LIN0——————— —Up
(weak
)
5139BCTL——————— ——
52—PT3IOC0_3—————V
DDX
PERT/
Off
PPST
5340PT0IOC0_0MOSI0RXD0RXD1XIRQ—V
DDX
PERT/
Off
PPST
5441PT1IOC0_1MISO0PWM2TXD0TXD1LP0DR1V
DDX
PERT/
Off
PPST
5542PP1KWP1PWM5FAULT5SCK0——V
DDX
PERP/
Off
PPSP
56—N.C.——————— ——
5743PE1 XTALTXD1PWM1DBGEE
V
5844PE0EXTALRXD1PWM0——V
——V
DDX
DDX
PERE/
PPSE
PERE/
Down
Down
PPSE
5945VSS——————— ——
60—VSSX5——————— ——
6146PT2
(NGPIO)
6247VDDX1——————V
6348PP0
(EVDD)
IOC0_2PWM3LP0RXDFAULT5ECLK—V
KWP0PWM4PTUREIRQLP0TXD—V
DDX
DDX
DDX
PERT/
Off
PPST
——
PERP/
Off
PPSP
64—N.C.——————— ——
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors43
Page 44
Chapter 1 Device Overview MC9S12ZVMB-Family
1.8Internal signal mapping
This section specifies the mapping of inter-module signals at device level.
1.8.1ADC connectivity
1.8.1.1ADC reference voltages
VRH_[2:1] are always mapped to VDDA, VRH_0 is mapped to VDDA in the 48LQFP package option
but mapped to a dedicated VRH_0 pin in the 64LQFP package option. The preferred reference is VRH_0.
VRL_0 is always mapped to VSSA.
1.8.1.2ADC internal channels
The ADC0 internal channel mapping is shown in Table 1-8.
Table 1-8. Usage of ADC0 internal channels
ADCCMD_1 CH_SEL[5:0]
001000Internal_0ADC0 temperature sensor
001001Internal_1VREG temperature sensor or bandgap (V
001010Internal_2GDU phase multiplexer voltage
001011Internal_3GDU DC link voltage monitor
001100Internal_4BATS VSUP sense voltage
001101Internal_5Reserved
001110Internal_6Reserved
001111Internal_7Delta VBE temperature sensor
1. Selectable in CPMU
ADC Channel
Usage
BG
The PL[2:0] High Voltage Inputs are connected to ADC0 external channels, AN[11:9] respectively.
1.8.1.3ADC digital input signals
The ADC input Seq_abort is unused and forced to an inactive state at device level
The ADC Restart input is connected to ptu_reload.
The ADC input LoadOK is connected to the glb_ldok at device level
The ADC Trigger input has routing options to the following sources:
(1)
)
•Internal TIM0 OC2
•Internal PTUT0 signal (Default)
•Internal PMF reload event (PWM generator A)
MC9S12ZVMB Family Reference Manual Rev. 1.3
44NXP Semiconductors
Page 45
1.8.2GDU timer connectivity
Chapter 1 Device Overview MC9S12ZVMB-Family
TIM1 IC3 can be mapped to the GDU using PIM (see the PIM specification) in order to measure the t
and
tdeloff
times.
1.8.3PTU connectivity
PTU reload_is_async is unused and forced to an inactive state at device level.
1.8.4PMF connectivity
Table 1-9. Internal mapping of PMF signals
PMF Connection
PWM0GDU HS driver GHG[0]
PWM1GDU LS driver GLG[0]
PWM2GDU HS driver GHG[1]
PWM3GDU LS driver GLG[1]
FAULT5External FAULT5 pin
FAULT4GHD Over voltage (GOVA = 0) or GDU over current (GOCA = 0)
FAULT3VLS under voltage
FAULT2Tied to b0
FAULT1GDU Desaturation[1] or GDU over current (GOCA = 1)
or GHD over voltage (GOVA =1)
FAULT0GDU Desaturation[0] or GDU over current (GOCA = 1)
IS2Tied to 0x1
IS1GDU Phase Status[1]
IS0GDU Phase Status[0]
async_eventTied to 0x0
async_event_edge_sel[1:0]Tied to 0x3(both edges active)
Usage
delon
1.8.5Motor control loop interface connectivity overview
Table 1-10 and Figure 1-5 describe motor control loop connectivity that concerns device level inter
module operation specific for motor control.
.
Table 1-10. Control loop interface connectivity
Device Level EventPMF PTUADC0GDU
pmf_reloadreloada
ptu_reloadptu_reloadRestartreload
glb_ldokglb_ldokglb_ldokLoadOKPhase MUX
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors45
(1)
reload
selector
Page 46
Chapter 1 Device Overview MC9S12ZVMB-Family
PMF
ADC0
GDU
M
pmf_reload
dc_bus_voltage
sine/
sensor
cosine
reloada
Restart
PTU
ptu_reload
&
PTUE
Trigge r
OC2
glb_ldok
PTUT0
async_event
reload
Table 1-10. Control loop interface connectivity
Device Level EventPMF PTUADC0GDU
trigger_0PTUT0Trigger
1. PMF events reloadb and reloadc are not connected at device level
Figure 1-5. Motor control module interfaces
(MUX Option)
1.8.6BDC clock source connectivity
The BDC clock, BDCCLK, is mapped to the IRCCLK generated in the CPMU module.
The BDC clock, BDCFCLK is mapped to the device bus clock, generated in the CPMU module.
MC9S12ZVMB Family Reference Manual Rev. 1.3
46NXP Semiconductors
Page 47
Chapter 1 Device Overview MC9S12ZVMB-Family
1.8.7LINPHY connectivity
The VLINSUP supply is internally connected to the device VSUP pin.
1.8.8FTMRZ 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.8.9CPMU connectivity
The API_EXTCLK clock generated in the CPMU is not mapped to a device pin in the MC9S12ZVMBFamily.
The VDDF supply voltage is not mapped to device pins.
1.9Modes of operation
The MCU can operate in different configuration modes, as described in 1.9.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.9.3 Low power modes.
The MCU features a Background Debug Mode (BDM), as described in 1.9.2 Debugging modes.
1.9.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-11).
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-11. Chip modes
Chip ModesMODC
Normal single chip1
Special single chip0
1.9.1.1Normal single-chip mode
This mode is intended for normal device operation. The opcode from the on-chip memory is being
executed after reset (requires the reset vector to be programmed correctly). The processor program is
executed from internal memory.
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors47
Page 48
Chapter 1 Device Overview MC9S12ZVMB-Family
1.9.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.
1.9.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.
Some modules feature a software programmable option to freeze the module status whilst the background
debug mode is active to facilitate debugging. This is referred to as freeze mode at module level.
Writing to internal memory locations using the debugger, whilst code is running or at a breakpoint, can
change the flow of application code.
The MC9S12ZVMB-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.9.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 the CPMU section.
•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 internal
CPU clock is switched off. All peripherals can be active in system wait mode. For further
power consumption the peripherals can individually turn off their local clocks. Asserting
RESET
, XIRQ, IRQ, or any other interrupt that is not masked, either locally or globally by a
CCR bit, ends system wait mode.
•Static power modes:
Static power (Stop) modes are entered following the CPU STOP instruction. If NVM commands
are being processed then Stop mode entry is delayed, until they have been completed, then the Stop
request is acknowledged and the device enters either Stop or Pseudo Stop 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) 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.
— Stop: In this mode, if the BDC is disabled, the oscillator is stopped, clocks are switched off and
the VREG enters reduced power mode (RPM). The counters and dividers remain frozen. The
autonomous periodic interrupt (API) may remain active but has a very low power consumption.
MC9S12ZVMB Family Reference Manual Rev. 1.3
48NXP Semiconductors
Page 49
Chapter 1 Device Overview MC9S12ZVMB-Family
The key pad and SCI transceiver modules can be configured to wake the device, whereby
current consumption is negligible.
If the BDC is enabled, when the device enters Stop mode, the VREG remains in full
performance 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 to allow further BDC communication, but other clocks (with the
exception of the API) are switched off. With the BDC enabled during Stop, the VREG full
performance mode and clock activity lead to higher current consumption than with BDC
disabled.
If the BDC is enabled in Stop mode, then the BATS voltage monitoring remains enabled.
1.10Security
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 if 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 flash block description.
1.10.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.10.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-12. 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’.
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors49
Page 50
Chapter 1 Device Overview MC9S12ZVMB-Family
Table 1-12. Security bits
SEC[1:0]Security State
001 (secured)
011 (secured)
100 (unsecured)
111 (secured)
NOTE
Please refer to the flash block description for more security byte details.
1.10.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.10.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.10.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.10.4Unsecuring the microcontroller
Unsecuring the microcontroller can be done using three different methods:
1. Back-door key access
2. Reprogramming the security bits
3. Complete memory erase
1.10.4.1Unsecuring the MCU using the back-door key access
In normal single chip mode, security can be temporarily disabled using the back-door key access method.
This method requires that:
•The back-door key has been programmed to a valid value
•The KEYEN[1:0] bits within the flash options/security byte select ‘enabled’.
MC9S12ZVMB Family Reference Manual Rev. 1.3
50NXP Semiconductors
Page 51
Chapter 1 Device Overview MC9S12ZVMB-Family
•The application program programmed into the microcontroller has the capability to write to the
back-door key locations
The back-door key values themselves should not normally be stored within the application data, which
means the application program would have to be designed to receive the back-door key values from an
external source (e.g. through a serial port).
The back-door key access method allows debugging of a secured microcontroller without having to erase
the flash. This is particularly useful for failure analysis.
NOTE
No back-door key word is allowed to have the value 0x0000 or 0xFFFF.
1.10.5Reprogramming the security bits
Security can also be disabled by erasing and reprogramming the security bits within the flash
options/security byte to the unsecured value. Since the erase operation will erase the entire sector
(0x7F_FE00–0x7F_FFFF) the back-door 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
enters 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.10.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.11Resets and interrupts
1.11.1Resets
Table 1-13. lists all reset sources and the vector locations. Resets are explained in detail in the S12CPMU
module description.
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors51
Page 52
Chapter 1 Device Overview MC9S12ZVMB-Family
Table 1-13. Reset sources and vector locations
Vector AddressReset Source
0xFFFFFCPower-On Reset (POR)NoneNone
Low Voltage Reset (LVR)NoneNone
External pin RESETNoneNone
Clock monitor resetNoneOSCE Bit in CPMUOSC register
COP watchdog resetNoneCR[2:0] in CPMUCOP register
CCR
Mask
Local Enable
OMRE Bit in CPMUOSC2 register
1.11.2Interrupt vectors
Table 1-14 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-14. Interrupt vector locations (Sheet 1 of 4)
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
(1)
Interrupt Source
(SPARE)
(TRAP)
(SYS)
CCR
Mask
NoneNone--
NoneNone--
NoneNone--
Reserved
Local Enable
Wake up
from STOP
Wake up
from WAIT
Vector base + 0x1E0
Vector base + 0x1DCSpurious interrupt—None--
Vector base + 0x1D8XIRQ
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
Vector base + 0x1C4TIM0 timer channel 2I bitTIM0TIE (C2I) NoYes
Vector base + 0x1C0TIM0 timer channel 3I bitTIM0TIE (C3I) NoYes
Vector base + 0x1BC
to
Vector base + 0x1B0
Vector base + 0x1ACTIM0 timer overflow I bitTIM0TSCR2(TOI)NoYes
Vector base + 0x1A8Reserved
52NXP Semiconductors
interrupt requestX bitNoneYesYes
interrupt requestI bitIRQCR(IRQEN)YesYes
MC9S12ZVMB Family Reference Manual Rev. 1.3
Reserved
Reserved
See CPMU
section
Yes
Page 53
Chapter 1 Device Overview MC9S12ZVMB-Family
Table 1-14. Interrupt vector locations (Sheet 1 of 4)
Vector Address
(1)
Vector base + 0x1A4
Interrupt Source
CCR
Mask
Local Enable
Reserved
Wake up
from STOP
Wake up
from WAIT
Vector base + 0x1A0SPI0 I bitSPI0CR1 (SPIE, SPTIE) NoYes
Vector base + 0x19CSCI0 I bitSCI0CR2
NoYes
(TIE, TCIE, RIE, ILIE)
SCI0ACR1(RXEDGIE) YesYes
Vector base + 0x198SCI1 I bitSCI1CR2
NoYes
(TIE, TCIE, RIE, ILIE)
SCI0ACR1(RXEDGIE) YesYes
Vector base + 0x194Reserved
Vector base + 0x190
Vector base + 0x18CADC0 ErrorI bitADC0EIE (IA_EIE, CMD_EIE,
Reserved
NoYes
EOL_EIE, TRIG_EIE,
RSTAR_EIE, LDOK_EIE)
ADC0IE(CONIF_OIE)
Vector base + 0x188ADC0 sequence abort doneI bitADC0IE(SEQAD_IE)NoYes
Vector base + 0x184ADC0 conversion completeI bitADC0CONIE[15:0]NoYes
Vector base + 0x180
Oscillator status interrupt
I bitCPMUINT (OSCIE)
No
Yes
Vector base + 0x17C PLL lock interruptI bitCPMUINT (LOCKIE) NoYes
Vector base + 0x178
to
Reserved
Vector base + 0x174
Vector base + 0x170 RAM errorI bit EECIE (SBEEIE) NoYes
Vector base + 0x16C
to
Reserved
Vector base + 0x168
Vector base + 0x164 FLASH errorI bit FERCNFG (SFDIE)NoYes
Vector base + 0x160FLASH commandI bitFCNFG (CCIE) NoYes
Vector base + 0x15C
to
Reserved
Vector base + 0x148
Vector base + 0x144LINPHY over-current interruptI bitLPIE (LPERR) NoYes
Vector base + 0x140 BATS supply voltage monitor
I bitBATIE (BVHIE,BVLIE) NoYes
interrupt
Vector base + 0x13CGDU Desaturation ErrorI bitGDUIE (GDSEIE)NoYes
Vector base + 0x138 GDU Voltage/Current Limit DetectedI bitGDUIE (GOCIE[0],
NoYes
GHHDFIE, GLVLSFIE)
Vector base + 0x134HSDRV over-current interruptI bitHSIE (HSOCIE) NoYes
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors53
Page 54
Chapter 1 Device Overview MC9S12ZVMB-Family
Table 1-14. Interrupt vector locations (Sheet 1 of 4)
Vector Address
(1)
Interrupt Source
CCR
Mask
Local Enable
Wake up
from STOP
Wake up
from WAIT
Vector base + 0x130
to
Reserved
Vector base + 0x114
Vector base + 0x110NGPIO over-current (Port T)I bitOCIET[2]NoYes
Vector base + 0x10CPort P interruptI bitPIEP[1:0] YesYes
Vector base + 0x108EVDD over-current I bitOCIEP[0]NoYes
Vector base + 0x104
Vector base + 0x100
Low-voltage interrupt (LVI)
Autonomous periodical interrupt
(API)
I bit
I bit
CPMUCTRL (LVIE)
CPMUAPICTRL (APIE)
NoYes
YesYes
Vector base + 0x0FCHigh temperature interruptI bitCPMUHTCTL(HTIE) NoYes
Vector base + 0x0F8
Vector base + 0x0F4Port AD interruptI bitPIEADH(PIEADH0)
Reserved
YesYes
PIEADL(PIEADL[7:0])
Vector base + 0x0F0PTU Reload OverrunI bitPTUIEH(PTUROIE)NoYes
Vector base + 0x0ECPTU Trigger0 ErrorI bitPTUIEL(TG0AEIE,TG0REIE,
NoYes
TG0TEIE)
Vector base + 0x0E8
Reserved
Vector base + 0x0E4PTU Trigger0 DoneI bitPTUIEL[TG0DIE]NoYes
Vector base + 0x0E0
to
Reserved
Vector base + 0x0D4
Vector base + 0x0D0PMF Reload AI bitPMFENCA(PWMRIEA)NoYes
Vector base + 0x0CCPMF Reload BI bitPMFENCB(PWMRIEB)NoYes
Vector base + 0x0C8PMF Reload CI bitPMFENCC(PWMRIEC)NoYes
Vector base + 0x0C4PMF FaultI bitPMFFIE(FIE[5:0])NoYes
Vector base + 0x0C0PMF Reload OverrunI bitPMFROIE(PMFROIEA,PMF
NoYes
ROIEB,PMFROIEC)
Vector base + 0x0BCPort L interruptI bitPIEL[2:0] YesYes
Vector base + 0x0B8
to
Reserved
Vector base + 0x0B0
Vector base + 0x0ACTIM1 timer channel 0I bitTIM1TIE (C0I) NoYes
Vector base + 0x0A8TIM1 timer channel 1I bitTIM1TIE (C1I) NoYes
Vector base + 0x0A4TIM1 timer channel 2I bitTIM1TIE (C2I) NoYes
Vector base + 0x0A0TIM1 timer channel 3I bitTIM1TIE (C3I) NoYes
Vector base + 0x09C
to
Reserved
Vector base + 0x090
MC9S12ZVMB Family Reference Manual Rev. 1.3
54NXP Semiconductors
Page 55
Chapter 1 Device Overview MC9S12ZVMB-Family
Table 1-14. Interrupt vector locations (Sheet 1 of 4)
Vector Address
Vector base + 0x08CTIM1 timer overflowI bitTIM1TSCR2(TOI)NoYes
Vector base + 0x088
to
Vector base + 0x010
1. 15 bits vector address based
(1)
Interrupt Source
CCR
Mask
Local Enable
Reserved
Wake up
from STOP
Wake up
from WAIT
1.11.3Effects of reset
When a reset occurs, MCU registers and control bits are initialized. Refer to the respective block sections
for register reset states.
On each reset, the flash module executes a reset sequence to load flash configuration registers.
1.11.3.1Flash configuration reset sequence phase
On each reset, the flash module will hold CPU activity while loading flash module registers from the flash
memory If double faults are detected in the reset phase, flash module protection and security may be active
on leaving reset. This is explained in more detail in the flash module description.
1.11.3.2Reset while flash command active
If a reset occurs while any Flash command is in progress, that command will be immediately aborted. The
state of the word being programmed or the sector/block being erased is not guaranteed.
1.11.3.3I/O pins
Refer to the PIM section for reset configurations of all peripheral module ports.
1.11.3.4RAM
The system RAM arrays, including their ECC syndromes, are initialized following a power on reset. All
other RAM arrays are not initialized out of any type of reset.
With the exception of a power-on-reset the RAM content is unaltered by a reset occurrence.
1.12Module device level dependencies
1.12.1CPMU COP and GDU GSUF 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_FE0E during the reset sequence. The GSUF bit in the
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors55
Page 56
Chapter 1 Device Overview MC9S12ZVMB-Family
GDUF register is also loaded from the Flash configuration field byte at global address 0xFF_FE0E during
the reset sequence. See Table 1-15 , Table 1-17 and Table 1-17 for coding.
Table 1-15. Initial COP rate configuration
NV[2:0] in
FOPT Register
000111
001110
010101
011100
100011
101010
1100 01
111000
CR[2:0] in
CPMUCOP Register
Table 1-16. Initial WCOP configuration
NV[3] in
FOPT Register
10
01
WCOP in
CPMUCOP Register
Table 1-17. Initial GSUF configuration
NV[7] in
FOPT Register
10
01
GSUF in
GDUF Register
1.12.2Flash IFR mapping
Table 1-18. Flash IFR mapping
1514131211109876543210IFR Byte Address
DVBE Temperature sensor ADC result (probe)0x1F_C054 & 0x1F_C055
1.12.3BDC command restriction
The BDC command READ_DBGTB returns 0x00 on this device because the DBG module does not
feature a trace buffer.
MC9S12ZVMB Family Reference Manual Rev. 1.3
56NXP Semiconductors
Page 57
Chapter 1 Device Overview MC9S12ZVMB-Family
1.13Application information
1.13.1Temperature sensor
The DVBE temperature sensor output is mapped to the ADC internal channel 7. It is tested in production
at 26C, using conversions of ADC internal channel 7 and storing the result to the flash location
0x1F_C054, 0x1F_C055 as a 12-bit right aligned value.
The accuracy of the controlled production test temperature is 26 C +/-3 °C.
The slope is linear over the device operating temperature range.
The accuracy of the slope dV/dT is 6 mV/C +/-0.2 mV/C.
The typical application is to use the temperature sensor to warn if device or application temperature is
approaching the maximum limit in order to take precautionary measures.
The following example uses an application aiming to detect a maximum temperature of 126°C, whereby
the difference between the maximum level and tested level is 100C (for calculation simplicity)
Figure 1-6 illustrates the effect of the slope variation alone.
Typically a 100C difference corresponds to 600 mV (100 x 6 mV) change in the DVBE output compared
to the stored value from 26C production test (V26). Thus the application could be configured to detect a
600 mV change with respect to V26.
Considering the dV/dT slope minimum/maximum specification, an inaccuracy of +/-20 mV may exist
over the 100C range, whereby +/-20 mV corresponds to a +/-3.3C. Thus, if configured to detect V26 +
600 mV, the detection could occur at 129.3C, as shown by the red 5.8 mV/C slope of Figure 1-6.
To compensate for the minimum dV/dT the application could be configured to detect a 580 mV change
with respect to V26.
Note that the result stored in flash is a 12-bit value. However the ADC is only specified to 10-bit accuracy
for applications. Thus the full 12-bit value in flash should be considered for V26 calculation.
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors57
Page 58
Chapter 1 Device Overview MC9S12ZVMB-Family
Voltage (V)
Temperature (C)
26
V
26
126
6 mV/C
5.8 mV/C
6.2 mV/C
0.6 V
0.58 V
129.3
Figure 1-6. DVBE effect of slope inaccuracy
MC9S12ZVMB Family Reference Manual Rev. 1.3
58NXP Semiconductors
Page 59
Chapter 1 Device Overview MC9S12ZVMB-Family
Voltage (V)
Temperature (C)
29
V
26
126
6 mV/C
5.8 mV/C
0.6 V
0.562 V
129 26
Typical slope from V
26
Typical offset slope from V
26
Minimum dV/dT offset slope from V
26
132.3
Furthermore the production test temperature control accuracy is limited to +/-3C. Figure 1-7 illustrates
the effect of this limitation, whereby the value V26 actually corresponds to a test temperature of 29C.
Thus, if configured to detect V26 + 600mV, the detection could be offset by 3C and in this case would
occur at 129C for a typical slope. Considering further inaccuracy for the minimum slope results in an
actual temperature limit detection at 132.3C as shown in Figure 1-7. Further compensation can be
applied, if necessary by adjusting the detection level.
Figure 1-7. Effect of slope plus V
reference inaccuracy
26
The ADC uses the on chip generated VDDA as the VRH reference. The accuracy of VRH can also be
considered. In order to compensate for VRH load variation, the reference voltage can be indirectly
measured using the internal reference voltage V
VRH reference can be obtained by applying a clean, unloaded VRH and converting V
ADC conversion result of V
BG can be stored to flash for reference.
BG. VBG is mapped to ADC channel internal_1. Thus a
BG. The resulting
By measuring the voltage VBG in the application environment and comparing the result to the reference
value stored in flash, it is possible to determine the current ADC reference voltage V
MC9S12ZVMB Family Reference Manual Rev. 1.3
RH:
NXP Semiconductors59
Page 60
Chapter 1 Device Overview MC9S12ZVMB-Family
VRH = (StoredReference/ConvertedReference) x 5VEqn. 1-1
The absolute value of the DVBE conversion can be determined as follows:
V
DVBE
= ConvertedDVBE x (StoredReference/ConvertedReference) x 5V/2
n
Eqn. 1-2
ConvertedDVBE: Result of the analog to digital conversion of the DVBE
ConvertedReference: Result of internal channel conversion
StoredReference: Reference value from clean, unloaded VRH, V
conversion
BG
n: ADC resolution (10 bit)
VRH variation over temperature can also be considered, whereby the maximum VRH differential between
26C and 126C is typically -46mV (126C value is always less than the 26C value).
This correlates to a maximum VRH induced error of -4C when applied to the V
of Equation 1-2.
DVBE
1.13.2SCI baud rate detection
The baud rate for SCI0 and SCI1 is achieved by using a timer channel to measure the data rate on the RXD
signal.
1. Establish the link:
— For SCI0: Set [T0IC3RR1:T0IC3RR0]=0b01 to reroute TIM0 input capture channel 3 (IC0_3)
to the RXD0 signal of SCI0.
— For SCI1: Set [T0IC3RR1:T0IC3RR0]=0b11 to reroute TIM0 input capture channel 3 (IC0_3)
to the RXD1 signal of SCI1.
2. Determine pulse width of incoming data: Configure TIM0 IC3 to measure time between incoming
signal edges.
1.13.3BDCM complementary mode operation
This section describes BDCM control using center aligned complementary mode with deadtime insertion.
The brushed DC motor power stage topology is a classical full bridge as shown in Figure 1-8. The brushed
DC motor is driven by the DC voltage source. A rotational field is created by means of commutator and
brushes on the motor.
MC9S12ZVMB Family Reference Manual Rev. 1.3
60NXP Semiconductors
Page 61
Chapter 1 Device Overview MC9S12ZVMB-Family
PWM
0
PWM
2
PWM
3
PWM
1
+ 1/2 U
- 1/2 U
A
B
PWM0
PWM1
PWM2
PWM3
T
PWM
PWM0, PWM1 base
PWM2, PWM3 base
Figure 1-8. DC brushed motor external configuration
Usually the control consists of an outer, speed control loop with inner current (torque) control loop. The
inner loop controls DC voltage applied onto the motor winding. The control loop is calculated regularly
within a given period. In most cases, this period matches the PWM reload period.
Driving the DC motor from a DC voltage source, the motor can work in all four quadrants. The
complementary mode of operation with deadtime insertion is needed for smooth reversal of the motor
current (motor torque), hence smooth full four quadrant control. Usually the center-aligned PWM is
chosen to lower electromagnetic emissions.
The PWM frequency selection is always a compromise between audible noise, electromagnetic emissions,
current ripples and power switching losses.
The BDCM control loop goal is to provide a controlled DC voltage to the motor winding, whereby it is
controlled cycle-by-cycle using a speed, current or torque feedback loop.
The center aligned PWM waveforms generated by the PMF module are applied to the bridge as shown in
Figure 1-9 whereby the base waveform for PWM0 and PWM1 is depicted at the top and the
complementary PWM0 and PWM1 waveforms are shown with deadtime insertion depicted by the gray
phases before the rising edges.
Figure 1-9. BDCM complementary mode waveform
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors61
Page 62
Chapter 1 Device Overview MC9S12ZVMB-Family
PWM with
PWM base
PWM cycle
deadtime
GDU
propagation
FET
turn on
Current sense
settling time
ADC delay
T
DEAD_x
t
delon
t
HGON
(tcslsst)
Assuming first quadrant operation, forward accelerating operation, the applied voltage at node A must
exceed the applied voltage at node B (Figure 1-8). Thus the PWM0 duty cycle must exceed the PWM2
duty cycle.
The PWM duty cycle of PWM0 defines the voltage at the first power stage branch.
The PWM duty cycle of PWM2 defines the voltage at the second power stage branch.
Modulating the PWM duty cycle every period using the function F
PWM0 duty-cycle = 0.5 + (0.5 * F
PWM2 duty-cycle = 0.5 - (0.5 * F
); For -1<=F
PWM
)
PWM
PWM
<= 1;
then the duty cycle is expressed as:
PWM
1.13.3.1Control loop timing considerations
Delays within the separate control loop elements require consideration to ensure correct synchronization.
Regarding the raw PWM signal as the starting point and stepping through the control loop stages, the
factors shown in Figure 1-10 contribute to delays within the control loop, starting with the deadtime
insertion, going through the external FETs and back into the internal ADC measurements of external
voltages and currents.
Figure 1-10. Control loop delay overview
The PWM deadtime (T
DEAD_X
) is an integral number of bus clock cycles, configured by the PMF
deadtime registers.
The GDU propagation delays (t
The FET turn on times (t
parameter Table E-1.
GHGON
, t
delon
) are load dependent but are specified for particular loads in the electrical
) are specified in the electrical parameter Table E- 1.
deloff
The current sense amplifier delay is highly dependent on external components.
The ADC delay until a result is available is specified as the conversion period N
62NXP Semiconductors
MC9S12ZVMB Family Reference Manual Rev. 1.3
in Table C-1.
CONV
Page 63
Chapter 1 Device Overview MC9S12ZVMB-Family
GHHDF
CORE
RAM’s
PLL
IRC
OSC
FLASH
PAD S
GDU
LDO
LINPHY
VREG_AUTO
1.8 V
2.8 V
5 V
VDDA
VSSA
VSS
VLS_OUT
GHD
GLG
GLS
GPIO
VSSX
VSUP (12 V/18 V)
VDDX
LIN
LGND
GFDE
PORF
LVRF
GLVLSF
CPS
INT
INT
RES
RES
BATS
INTADC
VRH_SEL
VRL_SEL
VRH
VRL
VSSA
VDDA
ADC
GCPE
VLS
(11V)
CP
VCP
VRBATP
VSUPHS (12 V/18 V)
HS
VDD
VDDF
VRH_0
1.13.4Power domain considerations
The MC9S12ZVMB-Family power domains are illustrated in Figure 1-11. More detailed information is
included in the individual module descriptions.
Figure 1-11. Power domain overview
The system supply voltage VRBATP is a reverse battery protected input voltage. It must be protected
against reverse battery connections and must not be connected directly to the battery voltage (VBAT).
The device supply voltage VSUP provides the input voltage for the internal regulator, VREG_AUTO, and
to the GDU LDO. The VDDX domain supplies the device I/O pins, VDDA supplies the ADC and internal
bias current generators. The VDDA and VDDX pins must be connected at board level, they are not
NXP Semiconductors63
MC9S12ZVMB Family Reference Manual Rev. 1.3
Page 64
Chapter 1 Device Overview MC9S12ZVMB-Family
connected directly internally. ESD protection diodes exist between VDDX and VDDA, therefore forcing
a common operating range.
The VDD domain supplies the internal device logic. The VDDF domain supplies sections of the internal
Flash NVM circuitry.
The LINPHY pull-up resistor is internally connected to the VSUP voltage. The external connections for
the VSUP pin must ensure a reverse battery protection.
The High-side driver supply, VSUPHS, also requires an external reverse battery protection.
1.13.4.1Voltage domain monitoring
The BATS module monitors the voltage on the VSUP pin, providing status and flag bits, an interrupt and
a connection to the ADC, for accurate measurement of the scaled VSUP level.
The POR circuit monitors the VDD (internal) and VDDA domains, ensuring a reset assertion until an
adequate voltage level is attained. The LVR circuit monitors the VDD, VDDF and VDDX domains,
generating a reset when the voltage in any of these domains drops below the specified assert level. The
VDDX LVR monitor is disabled when the VREG is in reduced power mode. A low voltage interrupt circuit
monitors the VDDA domain.
The GDU High-side drain voltage, pin GHD, is monitored within the GDU and mapped to an interrupt. A
connection to the ADC is provided for accurate measurement of a scaled GHD level.
1.13.4.2FET-predriver (GDU) supplies
A dedicated low drop regulator is used to generate the VLS_OUT voltage from VSUP. The VLS_OUT
voltage is used to supply the Low-side drivers and can be externally, directly connected to the VLS input.
1.13.4.3Bootstrap precharge
The FET-predriver High-side driver must provide a sufficient gate-source voltage and sufficient charge for
the gate capacitance of the external FETs. A bootstrap circuit is used to provide sufficient charge, whereby
the capacitor CBS is first charged to VLS_OUT via an internal diode, when the Low-side driver is active
Figure 1-12. When the High-side driver switches on, the charge on this capacitor, supplies the FET-
predriver via the VBSx pin. The C
a long period of inactivity of the Low-side driver, the CBS capacitor becomes discharged. In this case, the
Low-side driver must be switched on to charge C
takes to discharge the bootstrap capacitor CBS can be calculated from the size of the bootstrap capacitor
C
and the leakage current on VBSx pin.
BS
The bootstrap capacitors must be precharged before turning on the high-side drivers for the first time. This
can be done by using the PMF software output control mechanism:
PMFOUTC = 0x0F; // SW control on all outputs
PMFOUTB = 0x0A; // All high-sides off, all low-sides on
capacitor can only be charged if the Low-side driver is active, so after
BS
before commencing High-side driving. The time it
BS
The PWM signals should be configured to start with turning on the low-side before the high-side drivers
in order to assure precharged bootstraps. Therefore invert the PWM signals:
MC9S12ZVMB Family Reference Manual Rev. 1.3
64NXP Semiconductors
Page 65
Chapter 1 Device Overview MC9S12ZVMB-Family
PMFCINV = 0x0F; // Invert all channels to precharge bootstraps
1.13.4.4High-side charge pump for 100% duty cycle
A charge pump voltage is used to supply the High-side FET-predriver with enough current to maintain the
gate source voltage. To generate this voltage an external charge pump is driven by the pin CP, switching
between 0 V and 11 V. The pumped voltage is then applied to the pin VCP.
At 100% duty cycle operation the low-side turn on time is zero, which can cause bootstrap charge to decay.
In order to speed-up the high-side gate voltage level directly after commutation, the software should drive
the first PWM cycle with a duty cycle meeting an on-time of at least t
minpulse
then switch back to 100% again.
The GDU High-side drain voltage, pin GHD, is supplied from VBAT through a reverse battery protection
circuit. In a typical application the charge pump is used to switch on an external NMOS, N1, with source
connected to VBAT, by generating a voltage of VBAT+VLS-(2 x Vdiode). In a reverse battery scenario,
the external bipolar turns on, ensuring that the GHD pin is isolated from VBAT by the external NMOS, N1.
for the low-side drivers and
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors65
Page 66
Chapter 1 Device Overview MC9S12ZVMB-Family
GCPE
VLS_OUT
(11 V)
CP
VCP
VBSx
0 V
11 V
1000 uF
(Motor Dependent)
S
D
1 nF
N1
GHSx
GHD
High-side
Low-side
VBAT
C
BS
10 nF
Diode voltage drop = Vdiode
GCPCD
GHGx
Figure 1-12. High-side supply and charge pump concept
MC9S12ZVMB Family Reference Manual Rev. 1.3
66NXP Semiconductors
Page 67
Chapter 2
Port Integration Module (S12ZVMBPIMV3)
Table 2-1. Revision History
Rev. No.
(Item No.)
V03.0019 Jun 2015 • Initial release for S12ZVMB-family
V03.017 Jul 2015 • Incorporated feedback from review
V03.0424 Jul 20152.3.2.5/2-86 • Changed write restrictions of MODRR4 register
V03.0530 Jul 2015 • Typos and formatting
V03.065 Aug 20152.1.1/2-68
V03.065 Aug 20152.1.1/2-68
Date (Submitted
By)
Sections
Affected
2.2/2-71
2.3.1/2-77
2.3.2.6/287
2.2/2-71
2.3.1/2-77
2.3.2.6/287
Substantial Change(s)
• Typos and formatting
• Added PT7
• Typos and formatting
• Added PT7
• Typos and formatting
V03.0713 Aug 2015Table 2-4
Ta bl e 2 - 44
V03.0828 Aug 20152.1.1/2-68
2.3.1/2-77
2.3.2.1/2-
83Table 2-
5
Table 2-6
V03.091 Sep 20152.3.4.5/2-
99
Ta bl e 2 - 45
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductor67
• Typos and formatting
• Changed SPI0 (SCLK) routing
• Corrections
Page 68
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Rev. No.
(Item No.)
V03.1016 Sep 20152.1.1/2-68
V03.1123 Nov 20152.4.6/2-
V03.1223 Mar 2016 • Corrections
Date (Submitted
By)
Sections
Affected
2.2/2-71
110
Substantial Change(s)
• Corrections
• Corrections
2.1Introduction
2.1.1Overview
The S12ZVMB-family port integration module establishes the interface between the peripheral modules
and the I/O pins for all ports. It controls the electrical pin properties as well as the signal prioritization and
multiplexing on shared pins.
This document covers:
•Port E
GPIODBGSCI1PMF
PTE1
DBGEE
V
TXD1PWM1XTALPE1
External
Oscillator
Pins
PTE0RXD1PWM0EXTALPE0
•Port AD
GPIO/KWU ADC0SPI0GDUPTUPins
PTADH0AN0_8PAD 8
PTADL7AN0_7PAD7
PTADL6AN0_6PAD6
PTADL5AN0_5PAD5
MC9S12ZVMB Family Reference Manual Rev. 1.3
68NXP Semiconductors
Page 69
PTADL4AN0_4SS0PAD4
PTADL3AN0_3PTUT0PAD3
PTADL2AN0_2AMP0PAD2
PTADL1AN0_1AMPM0PAD 1
PTADL0AN0_0AMPP0PAD0
•Port T
GPIOTIM0TIM1PMFSPI0SCI0SCI1LINPHY0PMF
PTT7IOC1_3PT7
PTT6IOC1_2PT6
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
ECLK/
XIRQPins
PTT5IOC1_1PT5
PTT4IOC1_0PT4
PTT3IOC0_3PT3
PTT2IOC0_2PWM3LP0RXDFAULT5ECLKPT2
PTT1IOC0_1PWM2MISO0TXD0TXD1LP0DR1PT1
PTT0IOC0_0MOSI0RXD0RXD1XIRQ
•Port P
GPIO/KWUPMFSPI0PTUPMFLINPHY0IRQPins
PTP1PWM5SCK0FAULT5PP1
PTP0PWM4PTURELP0TXDIRQ
PT0
PP0
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors69
Page 70
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
•Port L
HVI/KWUADC0TIM1Pins
PTIL2AN0_11IC1_2PL2
PTIL1AN0_10IC1_1PL1
PTIL0AN0_9IC1_0PL0
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 shows the superset of all available features offered by the
S12ZVMB device family. Refer to the package and pinout section in the
device overview for functions not available for a particular device or
package option.
2.1.2Features
The PIM includes these distinctive registers:
•Data registers for ports E, AD, T, P when used as general-purpose I/O
•Data direction registers for ports E, AD, T, P when used as general-purpose I/O
•Control registers to enable pull devices on ports E, AD, T, P
•Control registers to select pullups or pulldowns on ports E, AD, T, P
•Control register to enable digital input buffers on port AD and L
•Interrupt enable register for pin interrupts and key-wakeup (KWU) on port AD, P and L
•Interrupt flag register for pin interrupts and key-wakeup (KWU) on port AD, P and L
•Control register to configure IRQ pin operation
•Control register to enable ECLK output
•Routing registers to support signal relocation on external pins and control internal routings:
— 2 PWM channels to alternative pins (1 option each)
— 4 TIM0 channels to alternative pins
— Various SCI0-LINPHY0 routing options for standalone use and conformance testing
— SCI1 to alternative pins (1 option)
— HSDRV control selection from PWMTIM OC or related register bit
— Internal RXD0 and RXD1 link to TIM0 input capture channel (IC0_3) for baud rate detection
— Internal ACLK link to TIM0 input capture channel (IC0_2) for calibration and clock
monitoring purposes
MC9S12ZVMB Family Reference Manual Rev. 1.3
70NXP Semiconductors
Page 71
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
A standard port pin has the following minimum features:
•Input/output selection
•5V output drive
•5V digital and analog input
•Input with selectable pullup or pulldown device
Optional features supported on dedicated pins:
•Interrupt input with glitch filtering
•High current drive strength from VDDX with over-current protection
•High current drive strength to VSSX with over-current protection
•Selectable drive strength for high current capable outputs
2.2External Signal Description
This section lists and describes the signals that do connect off-chip.
Table 2-8 shows all pins with the pins and functions that are controlled by the PIM. Routing options are
denoted in parentheses.
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). Inputs do not arbitrate priority unless noted differently in
Table 2-45.
Table 2-2. BKGD Pin Functions and Priorities
Port Pin
BKGDBKGDMODC
1. Function active when RESET asserted
Pin Function
& Priority
(1)
BKGDI/O S12ZBDC communication—
NOTE
I/ODescription
IMODC input during RESET
Routing
Register Bit
—BKGD
Func.
after
Reset
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors71
Page 72
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Table 2-3. Port E Pin Functions and Priorities
Func.
Reset
Port Pin
Pin Function
& Priority
I/ODescription
Routing
Register Bit
EPE1XTAL—CPMU OSC signal—GPIO
(PWM1)OPWM channel 1P0C1RR
(TXD1)I/O SCI1 transmitSCI1RR
DBGEEVIDBG external event—
PTE[1]I/O GPIO —
PE0EXTAL—CPMU OSC signal—
(PWM0)OPWM channel 0P0C0RR
(RXD1)ISCI1 receive SCI1RR
PTE[0]I/O GPIO —
after
MC9S12ZVMB Family Reference Manual Rev. 1.3
72NXP Semiconductors
Page 73
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Table 2-4. Port AD Pin Functions and Priorities
Func.
after
Reset
Port Pin
Pin Function
& Priority
I/ODescription
Routing
Register Bit
ADPAD8AN8IADC0 analog input—GPIO
PTADH[0]/
I/O GPIO with pin-interrupt and key-wakeup—
KWADH[0]
PAD7-5AN7-5IADC0 analog input—
PTADL[7:5]/
I/O GPIO with pin-interrupt and key-wakeup—
KWADL[7:5]
PAD4S S0
I/O SPI0 slave select—
AN4IADC0 analog input—
PTADL[4]/
I/O GPIO with pin-interrupt and key-wakeup—
KWADL[4]
PAD3PTUT0OPTU trigger 0—
AN3IADC0 analog input—
PTADL[3]/
I/O GPIO with pin-interrupt and key-wakeup—
KWADL[3]
PAD2AMP0OGDU AMP0 output—
AN2IADC0 analog input—
PTADL[2]/
I/O GPIO with pin-interrupt and key-wakeup—
KWADL[2]
PAD1AMPM0IGDU AMP0 inverting input (-)—
AN1IADC0 analog input—
PTADL[1]/
I/O GPIO with pin-interrupt and key-wakeup—
KWADL[1]
PAD0AMPP0IGDU AMP0 non-inverting input (+)—
AN0IADC0 analog input—
PTADL[0]/
I/O GPIO with pin-interrupt and key-wakeup—
KWADL[0]
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors73
Page 74
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Table 2-5. Port T Pin Functions and Priorities
Port Pin
Pin Function
& Priority
I/ODescription
Routing
Register Bit
TPT7IOC1_3I/O TIM1 channel 3T1IC3RRGPIO
PTT[7]I/O GPIO—
PT6IOC1_2I/O TIM1 channel 2T1IC2RR,T1OC2RR
PTT[6]I/O GPIO—
PT5IOC1_1I/O TIM1 channel 1T1IC1RR,T1OC1RR
PTT[5]I/O GPIO—
PT4IOC1_0I/O TIM1 channel 0T1IC0RR
PTT[4]I/O GPIO—
PT3IOC0_3I/O TIM0 channel 3T0IC3RR1-0
PTT[3]I/O GPIO—
PT2
(1)
ECLKOFree-running clock—
FAULT5IPMF faultFAULT5RR
(LP0RXD)OLINPHY0/HVPHY0 receive outputS0L0RR2-0
(PWM3)OPMF channel 3P0C3RR
IOC0_2I/O TIM0 channel 2T0IC2RR
PTT[2]/
I/O GPIO—
NGPIO
PT1(LP0DR1)OLPTXD0 direct control by LP0DR[LP0DR1]S0L0RR2-0
TXD1I/O SCI1 transmitSCI1RR
(TXD0)I/O SCI0 transmitS0L0RR2-0
MISO0I/O SPI0 master in/slave out—
(PWM2)OPMF channel 2P0C2RR
IOC0_1I/O TIM0 channel 1—
PTT[1]I/O GPIO—
PT0XIRQ
(2)
INon-maskable level-sensitive interrupt—
RXD1ISCI1 receiveSCI1RR
(RXD0)ISCI0 receiveS0L0RR2-0
MOSI0I/O SPI0 master out/slave in—
IOC0_0I/O TIM0 channel 0—
PTT[0]I/O GPIO—
1. High current capable low-side output with over-current interrupt and protection for all sources (see 2.4.5.3/2-110)
Func.
after
Reset
2. 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 using XIRQ with the X bit set is not available.
MC9S12ZVMB Family Reference Manual Rev. 1.3
74NXP Semiconductors
Page 75
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Table 2-6. Port P Pin Functions and Priorities
Port Pin
Pin Function
& Priority
I/ODescription
Routing
Register Bit
PPP1(FAULT5)IPMF faultFAULT5RRGPIO
SCK0I/O SPI0 serial clock —
PWM5OPMF channel 5P0C5RR
PTP[1]/
I/O GPIO with pin-interrupt and key-wakeup—
KWP[1]
PP0
(1)
IRQIMaskable level- or falling edge-sensitive
—
interrupt
(LP0TXD)ILINPHY0/HVPHY0 transmit inputS0L0RR2-0
PTUREOPTU reload event with over-current interrupt;
—
high-current capable (20 mA)
PWM4OPMF channel 4 with over-current interrupt;
P0C4RR
high-current capable (20 mA)
PTP[0]/
KWP[0]/
EVDD
I/OGeneral-purpose; with interrupt and wakeup
Switchable external power supply output with
over-current interrupt; high-current capable
—
(20 mA)
1. High current capable high-side output with over-current interrupt and protection for all sources (see 2.4.5.3/2-110)
Func.
after
Reset
Table 2-7. Port L Pin Functions and Priorities
Port Pin
Pin Function
& Priority
I/ODescription
LPL2IOC1_2ITIM1 input capture channel 2T1IC2RRHVI
AN11IADC0 analog inputAN11
PTIL[2]/
IHVI with pin-interrupt and key-wakeup—
KWL[2]
PL1IOC1_1ITIM1 input capture channel 1T1IC1RR
AN10IADC0 analog inputAN10
PTIL[1]/
IHVI with pin-interrupt and key-wakeup—
KWL[1]
PL0IOC1_0ITIM1 input capture channel 0T1IC0RR
AN9IADC0 analog inputAN9
PTIL[0]/
IHVI with pin-interrupt and key-wakeup—
KWL[0]
Routing
Register Bit
Func.
after
Reset
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors75
Page 76
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Table 2-8. HSDRV Pin Functions and Priorities
Port Pin
N/A
(1)
1. Not a PIM port. Listed here for priority information only. Refer to section S12HSDRV.
HS1(PWM5)OPMF channel 5P0C5RRHSDRV
HS0(PWM4)OPMF channel 4P0C4RR
Pin Function
& Priority
(OC1_2)OTIM1 output compare channel 2T1OC2RR
HSDR[HSDR1]OHigh-side driver 1—
(OC1_1)OTIM1 output compare channel 1T1OC1RR
HSDR[HSDR0]OHigh-side driver 0—
I/ODescription
2.2.1Internal Routing Options
The following table summarizes the internal routing options.
Table 2-9. Internal Routing Options
Internal SignalConnects toRouting Bits
ACLKIC0_2T0IC2RR
RXD0, RXD1IC0_3T0IC3RR1-0
Routing
Register Bit
Func.
after
Reset
TIM0 OC2ADC0 TriggerTRIG0RR1-0
PMF reload
PTU trigger 0
HVI0IC1_0T1IC0RR
HVI1IC1_1T1IC1RR
HVI2IC1_2T1IC2RR
2.3Memory Map and Register Definition
This section provides a detailed description of all port integration module registers. Subsection 2.3.1
shows all registers and bits at their related addresses within the global SOC register map. A detailed
description of every register bit is given in subsections 2.3.2 to 2.3.4.
This section describes registers implemented in address range 0x0200-0x020F. These registers serve for
specific PIM related functions not part of the generic port 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.
•Register bits can be written at any time if not stated differently.
MC9S12ZVMB Family Reference Manual Rev. 1.3
82NXP Semiconductors
Page 83
2.3.2.1Module Routing Register 0 (MODRR0)
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Address 0x0200Access: User read
76543210
R00
W
Routing
Option
Reset00000000
————SCI1SCI0-LINPHY0 interface
Reserved
0
SCI1RRS0L0RR2-0
Figure 2-1. Module Routing Register 0 (MODRR0)
1. Read: Anytime
Write: Once in normal, anytime in special mode
Table 2-10. MODRR0 Routing Register Field Descriptions
FieldDescription
3
SCI1RR
2-0
S0L0RR2-0
Module Routing Register — SCI1 routing
1 TXD1 on PE1; RXD1 on PE0
0 TXD1 on PT1; RXD1 on PT0
Module Routing Register — SCI0-LINPHY0 routing
Selection of SCI0-LINPHY0 interface routing options to support probing and conformance testing. Refer to
Figure 2-2 for an illustration and Table 2-11 for preferred settings.
Note: SCI0 must be enabled for TXD0 routing to take effect on pin. LINPHY0 must be enabled for LPRXD0 and
LP0DR[LPDR1] register bit controls LPTXD0, interface internal only
100Probe setting:
SCI0 connects to LINPHY0, interface accessible on 2 external pins
110Conformance test setting:
Interface opened and all 4 signals routed externally
NOTE
For standalone usage of SCI0 on external pins set S0L0RR[2:0]=0b110 and
disable LINPHY0 (LPCR[LPE]=0). This releases the LINPHY0 associated
pins to other shared functions.
MC9S12ZVMB Family Reference Manual Rev. 1.3
84NXP Semiconductors
Page 85
2.3.2.2Module Routing Register 1 (MODRR1)
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Address 0x0201Access: User read/write
76543210
R000000
W
—————— ADC0 trigger
Reset00000000
TRIG0RR2-0
Figure 2-3. Module Routing Register 1 (MODRR1)
1. Read: Anytime
Write: Anytime
Table 2-12. MODRR1 Routing Register Field Descriptions
FieldDescription
1-0
TRIG0RR
1-0
1. Output compare function on pin remains active unless disabled in timer config register TIM0OCPD[OCPD2]=1
Module Routing Register — ADC0 trigger source
11 R e s e r ved
10 TIM0 output compare channel 2 connected to ADC0 trigger input
01 PMF reload connected to ADC0 trigger input
00 PTU trigger 0 connected to ADC0 trigger input
(1)
(1)
2.3.2.3Module Routing Register 2 (MODRR2)
Address 0x0202Access: User read/write
76543210
R00000000
W
————————
Reset00000000
Figure 2-4. Module Routing Register 2 (MODRR2)
1. Read: Anytime
Write: Never
(1)
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors85
Page 86
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
2.3.2.4Module Routing Register 3 (MODRR3)
Address 0x0203Access: User read/write
76543210
R000
T0IC3RR1-0T0IC2RR
W
———IC0_3IC0_2——
Reset00000000
00
Figure 2-5. Module Routing Register 3 (MODRR3)
1. Read: Anytime
Write: Anytime
Table 2-13. MODRR3 Routing Register Field Descriptions
FieldDescription
4-3
T0IC3RR1
-0
Module Routing Register — IC0_3 routing
If timer channel is not used with a pin (T0IC3RR0=1) then one out of two internal sources can be selected as input.
11 TIM0 input capture channel 3 connected to RXD1
10 Reserved
01 TIM0 input capture channel 3 connected to RXD0
00 TIM0 input capture channel 3 connected to PT3
No ECLK — Disable ECLK output
This bit controls the availability of a free-running clock on the ECLK pin. This clock has a fixed rate equivalent to the
internal bus clock.
1 ECLK disabled
0 ECLK enabled
2.3.2.8IRQ Control Register (IRQCR)
Address 0x0209Access: User read/write
(1)
76543210
R
IRQEIRQEN
W
Reset00000000
000000
Figure 2-9. IRQ Control Register (IRQCR)
1. Read: Anytime
Write:
IRQE: Once in normal mode, anytime in special mode
IRQEN: Anytime
Table 2-17. IRQCR Register Field Descriptions
FieldDescription
7
IRQE
6
IRQEN
IRQ select edge sensitive only —
pin configured to respond only to falling edges. Falling edges on the IRQ pin are detected anytime when
1 IRQ
IRQE=1 and will be cleared only upon a reset or the servicing of the IRQ
This reserved register is designed for factory test purposes only and is not
intended for general user access. Writing to this register when in special
modes can alter the modules functionality.
This reserved register is designed for factory test purposes only and is not
intended for general user access. Writing to this register when in special
modes can alter the modules functionality.
This reserved register is designed for factory test purposes only and is not
intended for general user access. Writing to this register when in special
modes can alter the modules functionality.
2.3.3PIM Generic Registers
This section describes the details of all PIM registers.
•Writing to reserved bits has no effect and read returns zero.
•All register read accesses are synchronous to internal clocks.
(1)
•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.
•For availability of individual bits refer to Section 2.3.1, “Register Map” and Table 2-44.
NOTE
This is a generic description of the standard PIM registers. Refer to Table 2-
44 to determine the implemented bits in the respective register.
MC9S12ZVMB Family Reference Manual Rev. 1.3
NXP Semiconductors91
Page 92
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
2.3.3.1Port Data Register
Address 0x0260 PTE
0x0280 PTADH
0x0281 PTADL
0x02C0 PTT
0x02F0 PTP
76543210
R
PTx7PTx6PTx5PTx4PTx3PTx2PTx1PTx0
W
Reset00000000
Access: User read/write
Figure 2-13. Port Data Register
1. Read: Anytime. The data source is depending on the data direction value.
Write: Anytime
Table 2-18. Port Data Register Field Descriptions
FieldDescription
7-0
PTx7-0
Port Data — 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 -8 ), 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.
(1)
2.3.3.2Port Input Register
Address 0x0262 PTIE
0x0282 PTIADH
0x0283 PTIADL
0x02C1 PTIT
0x02F1 PTIP
0x0331 PTIL
76543210
RPTIx7PTIx6PTIx5PTIx4PTIx3PTIx2PTIx1PTIx0
W
Reset00000000
Figure 2-14. Port Input Register
1. Read: Anytime
Write:Never
Table 2-19. Port Input Register Field Descriptions
FieldDescription
7-0
PTIx7-0
Port Input — Data input
A read always returns the buffered input state of the associated pin. It can be used to detect overload or short circuit
conditions on output pins.
Table 2-20. Data Direction Register Field Descriptions
FieldDescription
7-0
DDRx7-0
Data Direction — Select general-purpose data direction
This bit determines whether the pin is a general-purpose input or output. If a peripheral module controls the pin the
content of the data direction register is ignored. Independent of the pin usage with a peripheral module this register
determines the source of data when reading the associated data register address.
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.
1 Associated pin is configured as output
0 Associated pin is configured as input
Table 2-21. Pull Device Enable Register Field Descriptions
FieldDescription
7-0
PERx7-0
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.
1 Pull device enabled
0 Pull device disabled
2.3.3.5Polarity Select Register
Address 0x0268 PPSE
0x0288 PPSADH
0x0289 PPSADL
76543210
R
PPSx7PPSx6PPSx5PPSx4PPSx3PPSx2PPSx1PPSx0
W
Reset
Ports E:00000011
Others:00000000
Access: User read/write
Figure 2-17. Polarity Select Register
1. Read: Anytime
Write: Anytime
(1)
Table 2-22. Polarity Select Register Field Descriptions
FieldDescription
7-0
PPSx7-0
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.
1 Pulldown device selected; rising edge selected
0 Pullup device selected; falling edge selected
2.3.3.6Port Interrupt Enable Register
Address 0x028C PIEADH
0x028D PIEADL
0x02F6 PIEP
0x0336 PIEL
76543210
R
PIEx7PIEx6PIEx5PIEx4PIEx3PIEx2PIEx1PIEx0
W
Reset00000000
Access: User read/write
Figure 2-18. Port Interrupt Enable Register
(1)
MC9S12ZVMB Family Reference Manual Rev. 1.3
94NXP Semiconductors
Page 95
1. Read: Anytime
Write: Anytime
Table 2-23. Port Interrupt Enable Register Field Descriptions
FieldDescription
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
7-0
PIEx7-0
Port Interrupt Enable — Activate pin interrupt (KWU)
This bit enables or disables the edge sensitive pin interrupt on the associated pin. An interrupt can be generated if
the pin is operating in input or output mode when in use with the general-purpose or related peripheral function.
1 Interrupt is enabled
0 Interrupt is disabled (interrupt flag masked)
2.3.3.7Port Interrupt Flag Register
Address 0x028E PIFADH
0x028F PIFADL
0x02F7 PIFP
0x0337 PIFL
76543210
R
PIFx7PIFx6PIFx5PIFx4PIFx3PIFx2PIFx1PIFx0
W
Reset00000000
Figure 2-19. Port Interrupt Flag Register
1. Read: Anytime
Write: Anytime, write 1 to clear
Table 2-24. Port Interrupt Flag Register Field Descriptions
Access: User read/write
(1)
FieldDescription
7-0
PIFx7-0
NXP Semiconductors95
Port Interrupt Flag — Signal pin event (KWU)
This flag asserts after a valid active edge was detected on the related pin (see Section 2.4.5.2, “Pin Interrupts and
Key-Wakeup (KWU)”). This can be a rising or a falling edge based on the state of the polarity select register. An
interrupt will occur if the associated interrupt enable bit is set.
Writing a logic “1” to the corresponding bit field clears the flag.
1 Active edge on the associated bit has occurred
0 No active edge occurred
MC9S12ZVMB Family Reference Manual Rev. 1.3
Page 96
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
2.3.3.8Digital Input Enable Register
Address 0x0298 DIENADH
0x0299 DIENADL
76543210
R
DIENx7DIENx6DIENx5DIENx4DIENx3DIENx2DIENx1DIENx0
W
Reset00000000
Access: User read/write
Figure 2-20. Digital Input Enable Register
1. Read: Anytime
Write: Anytime
Table 2-25. Digital Input Enable Register Field Descriptions
FieldDescription
7-0
DIENx7-0
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 a peripheral module is enabled which uses the pin with a digital function, the input buffer is activated
and the register bit is ignored. 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)
2.3.3.9Reduced Drive Register
Address 0x02CD RDRT
0x02FD RDRP
76543210
R
RDRx7RDRx6RDRx5RDRx4RDRx3RDRx2RDRx1RDRx0
W
Reset00000000
Figure 2-21. Reduced Drive Register
1. Read: Anytime
Write: Anytime
Table 2-26. Reduced Drive Register Field Descriptions
FieldDescription
7-0
RDRx7-0
Reduced Drive Register — Select reduced drive for output pin
This bit configures the drive strength of the associated output pin as either full or reduced. If a pin is used as input
this bit has no effect. The reduced drive function is independent of which function is being used on a particular pin.
1 Reduced drive selected (approx. 1/10 of the full drive strength)
0 Full drive strength enabled
Access: User read/write
(1)
MC9S12ZVMB Family Reference Manual Rev. 1.3
96NXP Semiconductors
Page 97
2.3.3.10PIM Reserved Register
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
Address (any reserved)Access: User read
76543210
R00000000
W
Reset00000000
Figure 2-22. PIM Reserved Register
1. Read: Always reads 0x00
Write: Unimplemented
2.3.4PIM Generic Register Exceptions
This section lists registers with deviations from the generic description in one or more register bits.
2.3.4.1Port T Polarity Select Register (PPST)
Address 0x02C4 PPSTAccess: User read/write
76543210
R
PPST7PPST6PPST5PPST4PPST3PPST2PPST1PPST0
W
(1)
(1)
Reset00000000
Figure 2-23. Port T Polarity Select Register (PPST)
1. Read: Anytime
Write: Anytime
Table 2-27. Port T Polarity Select Register Field Descriptions
FieldDescription
7-3
PPST7-3
2
PPST2
1-0
PPST1-0
See Section 2.3.3.5, “Polarity Select Register”.
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.
This bit selects whether a high or a low level on FAULT5 generates a fault event in PMF, if FAULT5RR is set.
Over-Current Protection Enable — Activate over-current detector on PT2
Refer to Section 2.5.3, “Over-Current Protection on PP0 (EVDD)”
1 PT2 over-current detector enabled
0 PT2 over-current detector disabled
2.3.4.3Port T Over-Current Interrupt Enable Register (OCIET)
Address 0x02CAAccess: User read/write
(1)
(1)
76543210
R00000
OCIET2
W
Reset00000000
00
Figure 2-25. Port T Over-Current Interrupt Enable Register
1. Read: Anytime
Write: Anytime
Table 2-29. OCIET Register Field Descriptions
FieldDescription
2
OCIET2
Over-Current Interrupt Enable —
This bit enables or disables the over-current interrupt on PT2.
1 PT2 over-current interrupt enabled
0 PT2 over-current interrupt disabled (interrupt flag masked)
MC9S12ZVMB Family Reference Manual Rev. 1.3
98NXP Semiconductors
Page 99
Chapter 2 Port Integration Module (S12ZVMBPIMV3)
2.3.4.4Port T Over-Current Interrupt Flag Register (OCIFT)
Address 0x02CBAccess: User read/write
76543210
R00000
OCIFT2
W
Reset00000000
00
Figure 2-26. Port T Over-Current Interrupt Flag Register (OCIFT)
1. Read: Anytime
Write: Anytime, write 1 to clear
Table 2-30. OCIFT Register Field Descriptions
FieldDescription
2
OCIFT2
Over-Current Interrupt Flag —
This flag asserts if an over-current condition is detected on PT2 (Section 2.4.5.3, “Over-Current Interrupt and
Protection”). Writing a logic “1” to the corresponding bit field clears the flag.
Figure 2-27. Port P Polarity Select Register (PPSP)
1. Read: Anytime
Write: Anytime
Table 2-31. Port P Polarity Select Register Field Descriptions
FieldDescription
1
PPSP1
0
PPSP0
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.
This bit selects whether a high or a low level on FAULT5 generates a fault event in PMF, if FAULT5RR is cleared
Over-Current Protection Enable — Activate over-current detector on PP0
Refer to Section 2.5.4, “Over-Current Protection on PT2”
1 PP0 over-current detector enabled
0 PP0 over-current detector disabled
2.3.4.7Port P Over-Current Interrupt Enable Register (OCIEP)
Address 0x02FAAccess: User read/write
(1)
(1)
76543210
R0000000
W
Reset00000000
OCIEP0
Figure 2-29. Port P Over-Current Interrupt Enable Register
1. Read: Anytime
Write: Anytime
Table 2-33. OCIEP Register Field Descriptions
FieldDescription
0
OCIEP0
Over-Current Interrupt Enable —
This bit enables or disables the over-current interrupt on PP0.
1 PP0 over-current interrupt enabled
0 PP0 over-current interrupt disabled (interrupt flag masked)
MC9S12ZVMB Family Reference Manual Rev. 1.3
100NXP Semiconductors
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.