MC9S12VR-Family
Reference Manual
S12
Microcontrollers
MC9S12VRRMV2
Rev. 2.8
October 2, 2012
freescale.com
To provide the most up-to-date information, the revision of our documents on the World Wide Web will be
the most current. Your printed copy may be an earlier revision. To verify you have the latest information
available, refer to: http://freescale.com/
A full list of family members and options is included in the appendices.
The following revision history table summarizes changes contained in this document.
This document contains information for all constituent modules, with the exception of the CPU. For CPU
information please refer to
CPU12-1
in the
CPU12 & CPU12X Reference Manual.
Table 0-1. Revision History
Date
27-June-2011
29-July-2011
Revision
Level
Rev 2.3
Rev 2.4
Description
• Corrected ADC conditional text settings, ADC resolution is 10 bit
• Corrected ETRIG0/ETRIG1 in pinouts
•
•
•
•
Corrected register name in register summary page 585 address 0x024F
Corrected PartID
Added Maskset 2N05E
Updated electricals: Num 5 & 6 Table I-2, Num 2 Table D-2, Num 2 Table J-1,
Table A-12, A-13 & A-14, Num 13 & 14 Table A-8, Table A-4
06-February-2012
Rev 2.5
09-February-2012
Rev 2.6
• Added HVI[3:0] to Table A-4 Num 11
•
•
•
•
•
•
•
•
•
•
•
Correced NVM timing parameter
Updated stop current values
Added 1.16 ADC Result Reference
Added Bandgap Spec Table B-1 Num 15 & 16
Added Order Info Appendix
15-May-2012
Rev 2.7
02-October-2012
Rev 2.8
Minor Corrections
Corrected
Table B-1
Num 8 ACLK frequency is typ 20KHz
Added Max value to
Table A-13
Num 5
Table M-1New
NVM timing parameters
Added
Section C.3.2, “ATD Analog Input Parasitics
See
Section Chapter 2, “Port Integration Module (S12VRPIMV2)
Revision
History
• See
Section Chapter 4, “S12 Clock, Reset and Power Management Unit
(S12CPMU_UHV)
Revision History
• Added
Table B-2
• Changed Num 2 in
Table H-2
inductive load max 450mH
MC9S12VR Family Reference Manual, Rev. 2.8
Freescale Semiconductor
2
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Device Overview MC9S12VR-Family . . . . . . . . . . . . . . . . . . . . 21
Port Integration Module (S12VRPIMV2) . . . . . . . . . . . . . . . . . . 49
S12G Memory Map Controller (S12GMMCV1) . . . . . . . . . . . . 105
Clock, Reset and Power Management (S12CPMU_UHV) . . . 119
Background Debug Module (S12SBDMV1) . . . . . . . . . . . . . . 175
S12S Debug Module (S12SDBGV2) . . . . . . . . . . . . . . . . . . . . 199
Interrupt Module (S12SINTV1). . . . . . . . . . . . . . . . . . . . . . . . . 243
Analog-to-Digital Converter (ADC12B6CV2) . . . . . . . . . . . . . 251
Pulse-Width Modulator (S12PWM8B8CV2) . . . . . . . . . . . . . . 277
Serial Communication Interface (S12SCIV5) . . . . . . . . . . . . . 307
Serial Peripheral Interface (S12SPIV5) . . . . . . . . . . . . . . . . . . 345
Timer Module (TIM16B8CV3) . . . . . . . . . . . . . . . . . . . . . . . . . . 371
High-Side Drivers - HSDRV (S12HSDRV1) . . . . . . . . . . . . . . . 399
Low-Side Drivers - LSDRV (S12LSDRV1). . . . . . . . . . . . . . . . 411
LIN Physical Layer (S12LINPHYV1) . . . . . . . . . . . . . . . . . . . . 425
Supply Voltage Sensor - (BATSV2). . . . . . . . . . . . . . . . . . . . . 443
64 KByte Flash Module (S12FTMRG64K512V1). . . . . . . . . . . 457
Appendix A MCU Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 509
Appendix B VREG Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . 523
Appendix C ATD Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 525
Appendix D HSDRV Electrical Specifications. . . . . . . . . . . . . . . . . . . . . . . 531
Appendix E PLL Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 533
Appendix F IRC Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . 535
Appendix G LINPHY Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . 537
Appendix H LSDRV Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . 541
Appendix I
Appendix J
BATS Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . 543
PIM Electrical Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . 547
Appendix K SPI Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . 549
MC9S12VR Family Reference Manual, Rev. 2.8
Freescale Semiconductor
3
Appendix L XOSCLCP Electrical Specifications . . . . . . . . . . . . . . . . . . . . 555
Appendix M FTMRG Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . 557
Appendix N Package Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
Appendix O Detailed Register Address Map. . . . . . . . . . . . . . . . . . . . . . . . 571
MC9S12VR Family Reference Manual,
Rev. 2.8
4
Freescale Semiconductor
Chapter 1
Device Overview MC9S12VR-Family
1.1
1.2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.2.1 MC9S12VR-Family Member Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.3 Chip-Level Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.4 Module Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.4.1 HCS12 16-Bit Central Processor Unit (CPU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.4.2 On-Chip Flash with ECC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.4.3 On-Chip SRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.4.4 Main External Oscillator (XOSCLCP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.4.5 Internal RC Oscillator (IRC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.4.6 Internal Phase-Locked Loop (IPLL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.4.7 Clock and Power Management Unit (CPMU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.4.8 System Integrity Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.4.9 Timer (TIM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.4.10 Pulse Width Modulation Module (PWM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.4.11 LIN physical layer transceiver (LINPHY) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.4.12 Serial Peripheral Interface Module (SPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.4.13 Serial Communication Interface Module (SCI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.4.14 Analog-to-Digital Converter Module (ATD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.4.15 Supply Voltage Sense (BATS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.4.16 On-Chip Voltage Regulator system (VREG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.4.17 Low-side drivers (LSDRV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.4.18 High-side drivers (HSDRV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.4.19 Background Debug (BDM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.4.20 Debugger (DBG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.5 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
1.6 Family Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.6.1 Part ID Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.7 Signal Description and Device Pinouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.7.1 Pin Assignment Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.7.2 Detailed Signal Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
1.7.3 Power Supply Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1.8 Device Pinouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.8.1 Pinout 48-pin LQFP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
1.8.2 Pinout 32-pin LQFP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
1.9 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.9.1 Chip Configuration Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.9.2 Low Power Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.10 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
1.11 Resets and Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
1.11.1 Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
1.11.2 Interrupt Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
1.11.3 Effects of Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
MC9S12VR Family Reference Manual, Rev. 2.8
Freescale Semiconductor
5