herunterladen

1 Introduction
This application note provides the demonstration lab software
examples of MC9S12G128/A240 MCUs. The examples show
how to configure and use the modules to users getting started
with the MC9S12G128/A240 MCUs.
The examples included here illustrate a basic configuration of
the modules to allow users to quickly start developing their
own applications.
Complete code is available for all the examples. This can be
downloaded onto an MC9S12G128 target such as the TWR-
S12G128 demo board on which this demonstration lab is
based, except for the DAC module. The DAC exists only on
the MC9S12GA240 MCU.
Every module except the LIN module of the MC9S12G128/
A240 has its own standalone software and is discussed within
its own section of this document. For the LIN code, the user
will need to get the software that comes with the
DEMO9S12PFAME which is available at http://
www.freescale.com.
AN4455SW.zip, containing the complete CodeWarrior
projects for the lab examples, is available with this application
note. The file can be downloaded from http://
www.freescale.com.
Freescale Semiconductor
Document Number: AN4455
Application Note
Rev. 0, 4/2012
MC9S12G128/A240 Demonstration
Lab Training
by:
Jamaal Fraser
Automotive and Industrial Solutions Group
© 2012 Freescale Semiconductor, Inc.
Contents
1 Introduction................................................................1
2 Setup..........................................................................2
3 Demonstration lab examples.....................................2
3.1 CPMU clocks...............................................2
3.2 Flash overview.............................................3
3.3 LIN communications...................................7
3.4 MSCAN module .........................................7
3.5 PWM module...............................................8
3.6 Low-power modes.......................................9
3.7 MMC program flash paging
window .....................................................10
3.8 ADC Module .............................................11
3.9 DAC module..............................................12
3.10 Timer module.............................................13
3.11 SCI communications..................................14
3.12 SPI communications..................................14
4 Conclusion...............................................................15
5 References...............................................................16