MC9S12G Family
Reference Manual
and Data Sheet
S12
Microcontrollers
MC9S12GRMV1
Rev.1.27
October 23, 2017
nxp.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:
nxp.com/
A full list of family members and options is included in the appendices.
MC9S12G Family Reference Manual Rev.1.27
NXP Semiconductors
2
The following revision history table summarizes changes contained in this document.
Revision History
Date
Revision
Level
Description
• Added
Chapter 12, “Analog-to-Digital Converter (ADC12B8CV2)”
• Added
Chapter 14, “Analog-to-Digital Converter (ADC12B12CV2)”
• Updated
Chapter 11, “Analog-to-Digital Converter (ADC10B8CV2)”
(Reason: Spec update)
• Updated
Chapter 13, “Analog-to-Digital Converter (ADC10B12CV2)”
(Reason: Spec update)
• Updated
Chapter 15, “Analog-to-Digital Converter (ADC10B16CV2)”
(Reason: Spec update)
• Updated
Chapter 16, “Analog-to-Digital Converter (ADC12B16CV2)”
(Reason: Spec update)
• Corrected order of chapters
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Added AEC Grade 0 spec)
• Updated
Appendix C, “Ordering and Shipping Information”
(Reason: Added temperature option W)
• Separated description of 8-channel timer
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Chapter 1, “Device Overview MC9S12G-Family”
(Reason: added KGD option for the S12GA192 and the S12GA240)
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Up[dated
Appendix C, “Ordering and Shipping Information”
(Reason: Added KGD information)
• Added
Appendix D, “Package and Die Information”
(Reason: Added KGD information)
• Updated
Appendix C, “Ordering and Shipping Information”
(Reason: Removed KGD information)
• Updated
Chapter 1, “Device Overview MC9S12G-Family”
(Reason: Spec update)
• Fixed wordingFixed typos and formatting, improved wording
• Updated
Appendix A, “Electrical Characteristics”
(Reason: Updated electricals)
• Updated
Chapter 17, “Digital Analog Converter (DAC_8B5V)”
(Reason: Spec update)
• Fixed issues with hidden text throughout the document
• Updated
Chapter 1, “Device Overview MC9S12G-Family
(added mask set information to
Table 1-5)
• Updated
Appendix A, “Electrical Characteristics
(updated
Table A-44
and
Table A-45)
Nov, 2012
1.18
Nov, 2012
1.19
Jan, 2013
1.20
Jan, 2013
1.21
Jan, 2013
1.22
Feb, 2013
1.23
Jul, 2014
1.24
Aug, 2014
Jun, 2017
Oct, 2017
1.25
1.26
1.27
MC9S12G Family Reference Manual Rev.1.27
NXP Semiconductors
3
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.27
4
NXP Semiconductors
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
Chapter 29
Chapter 30
Chapter 31
Device Overview MC9S12G-Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Port Integration Module (S12GPIMV1) . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
5V Analog Comparator (ACMPV1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249
Reference Voltage Attenuator (RVAV1) . . . . . . . . . . . . . . . . . . . . . . . . . . 255
S12G Memory Map Controller (S12GMMCV1) . . . . . . . . . . . . . . . . . . . . . 259
Interrupt Module (S12SINTV1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
Background Debug Module (S12SBDMV1) . . . . . . . . . . . . . . . . . . . . . . .281
S12S Debug Module (S12SDBGV2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Security (S12XS9SECV2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
S12 Clock, Reset and Power Management Unit (S12CPMU) . . . . . . . . . 353
Analog-to-Digital Converter (ADC10B8CV2) . . . . . . . . . . . . . . . . . . . . . . 405
Analog-to-Digital Converter (ADC12B8CV2) . . . . . . . . . . . . . . . . . . . . . . 429
Analog-to-Digital Converter (ADC10B12CV2) . . . . . . . . . . . . . . . . . . . . . 455
Analog-to-Digital Converter (ADC12B12CV2) . . . . . . . . . . . . . . . . . . . . . 481
Analog-to-Digital Converter (ADC10B16CV2) . . . . . . . . . . . . . . . . . . . . . 507
Analog-to-Digital Converter (ADC12B16CV2) . . . . . . . . . . . . . . . . . . . . . 533
Digital Analog Converter (DAC_8B5V) . . . . . . . . . . . . . . . . . . . . . . . . . . .559
Scalable Controller Area Network (S12MSCANV3) . . . . . . . . . . . . . . . . . 569
Pulse-Width Modulator (S12PWM8B8CV2) . . . . . . . . . . . . . . . . . . . . . . . 623
Serial Communication Interface (S12SCIV5) . . . . . . . . . . . . . . . . . . . . . . 653
Serial Peripheral Interface (S12SPIV5) . . . . . . . . . . . . . . . . . . . . . . . . . . .691
Timer Module (TIM16B6CV3). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
Timer Module (TIM16B8CV3). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
16 KByte Flash Module (S12FTMRG16K1V1) . . . . . . . . . . . . . . . . . . . . . 765
32 KByte Flash Module (S12FTMRG32K1V1) . . . . . . . . . . . . . . . . . . . . . 813
48 KByte Flash Module (S12FTMRG48K1V1) . . . . . . . . . . . . . . . . . . . . . 865
64 KByte Flash Module (S12FTMRG64K1V1) . . . . . . . . . . . . . . . . . . . . . 917
96 KByte Flash Module (S12FTMRG96K1V1) . . . . . . . . . . . . . . . . . . . . . 969
128 KByte Flash Module (S12FTMRG128K1V1) . . . . . . . . . . . . . . . . . . 1021
192 KByte Flash Module (S12FTMRG192K2V1) . . . . . . . . . . . . . . . . . . 1073
240 KByte Flash Module (S12FTMRG240K2V1) . . . . . . . . . . . . . . . . . . 1125
MC9S12G Family Reference Manual Rev.1.27
NXP Semiconductors
5