MC9S12G Family
Reference Manual
S12
Microcontrollers
MC9S12GRMV1
Rev.1.10
February 10, 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.
MC9S12G Family Reference Manual, Rev.1.10
Freescale Semiconductor
2
The following revision history table summarizes changes contained in this document.
Revision History
Date
Apr, 2011
Revision
Level
1.00
Description
• Public relasease for the launch of the S12G96 and the S12G128
• Updated
Chapter 1, “Device Overview MC9S12G-Family”
(Reason: Typos and formatting)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Chapter 2, “Port Integration Module (S12GPIMV0)”
(Reason: Updated spec)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Chapter 1, “Device Overview MC9S12G-Family”
(Reason: Typos and formatting)
• Updated
Chapter 2, “Port Integration Module (S12GPIMV1)”
(Reason: Updated spec)
• Updated
Chapter 3, “5V Analog Comparator (ACMPV1)”
(Reason: Typos and formatting)
• Updated
Chapter 4, “Reference Voltage Attenuator (RVAV1)”
(Reason: Typos and formatting)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)Added
Appendix E, “Notes on the S12GS32”
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Fixed typos)
• Updated
Chapter 1, “Device Overview MC9S12G-Family”
(Reason: Updated mask set numbers and part IDs)
May, 2011
1.01
Jun, 2011
Jun, 2011
Jul, 2011
Jul, 2011
1.02
1.03
1.04
1.05
Nov, 2011
1.06
Jan, 2012
1.07
Feb, 2012
Feb, 2012
Feb, 2012
1.08
1.09
1.10
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
MC9S12G Family Reference Manual, Rev.1.10
Freescale Semiconductor
3
MC9S12G Family Reference Manual,
Rev.1.10
4
Freescale Semiconductor
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
Chapter 18
Chapter 19
Chapter 20
Chapter 21
Chapter 22
Chapter 23
Chapter 24
Chapter 25
Chapter 26
Chapter 27
Chapter 28
Appendix A
Appendix B
Appendix C
Appendix D
Device Overview MC9S12G-Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Port Integration Module (S12GPIMV1) . . . . . . . . . . . . . . . . . . . . . . . . . . .117
5V Analog Comparator (ACMPV1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217
Reference Voltage Attenuator (RVAV1) . . . . . . . . . . . . . . . . . . . . . . . . . .225
S12G Memory Map Controller (S12GMMCV1) . . . . . . . . . . . . . . . . . . . . .229
Interrupt Module (S12SINTV1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
Background Debug Module (S12SBDMV1) . . . . . . . . . . . . . . . . . . . . . . .251
S12S Debug Module (S12SDBG). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275
Security (S12XS9SECV2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .317
S12 Clock, Reset and Power Management Unit (S12CPMU) . . . . . . . . .323
Analog-to-Digital Converter (ADC10B8CV2) . . . . . . . . . . . . . . . . . . . . . .371
Analog-to-Digital Converter (ADC10B12CV2) . . . . . . . . . . . . . . . . . . . . .393
Analog-to-Digital Converter (ADC10B16CV2) . . . . . . . . . . . . . . . . . . . . .417
Analog-to-Digital Converter (ADC12B16CV2) . . . . . . . . . . . . . . . . . . . . .441
Digital Analog Converter (DAC_8B5V) . . . . . . . . . . . . . . . . . . . . . . . . . . .465
Freescale’s Scalable Controller Area Network (S12MSCANV3) . . . . . .477
Pulse-Width Modulator (S12PWM8B8CV2) . . . . . . . . . . . . . . . . . . . . . . .531
Serial Communication Interface (S12SCIV5) . . . . . . . . . . . . . . . . . . . . . .561
Serial Peripheral Interface (S12SPIV5) . . . . . . . . . . . . . . . . . . . . . . . . . . .599
Timer Module (TIM16B8CV3). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .627
16 KByte Flash Module (S12FTMRG16K1V1) . . . . . . . . . . . . . . . . . . . . .655
32 KByte Flash Module (S12FTMRG32K1V1) . . . . . . . . . . . . . . . . . . . . .703
48 KByte Flash Module (S12FTMRG48K1V1) . . . . . . . . . . . . . . . . . . . . .755
64 KByte Flash Module (S12FTMRG64K1V1) . . . . . . . . . . . . . . . . . . . . .807
96 KByte Flash Module (S12FTMRG96K1V1) . . . . . . . . . . . . . . . . . . . . .859
128 KByte Flash Module (S12FTMRG128K1V1) . . . . . . . . . . . . . . . . . . .911
192 KByte Flash Module (S12FTMRG192K2V1) . . . . . . . . . . . . . . . . . . .963
240 KByte Flash Module (S12FTMRG240K2V1) . . . . . . . . . . . . . . . . . .1015
Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1067
Detailed Register Address Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1115
Ordering Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1135
Package Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1137
MC9S12G Family Reference Manual, Rev.1.10
Freescale Semiconductor
5