Quick Start Guide
S12VR64EVB
S12 MagniV Mixed-Signal MCUs
S12 MagniV
Quick Start Guide
Get to Know the S12VR64EVB
LIN Connectors
Potentiometer
SW2 Analog Input
SW1
Header
External Power
Supply Banana
Connectors
JM60
Integrated
BDM
OSJTAG
Mini-B USB
Connector
GPIO
LED’s
DB9
Connector
RS-232
Comms
GPIO Header
Connector
SPI Header
Connector
LS/HS
Driver Header
Connector
Figure 1: Front Side of S12VR64EVB
Interrupt Wake
Up Input Header
Connector
Relay Motor
Output Header
Connectors
Barrel
Power
Connector
ON/OFF Switch
Relay
Reset
Switch
LS/HS
Driver LED’s
S12VR64
Microcontroller
Introduction and Default Settings
The S12VR64EVB features the S12VR64,
an automotive 16-bit MCU. This family
integrates an S12 microcontroller with a
LIN physical interface, a 5-volt regulator
system to supply the microcontroller and
analog blocks to control other elements
of the system which operate at vehicle
battery level. The S12VR family uses
many of the same features found on the
S12G family, including error correction
code (ECC) on flash memory, EEPROM
for diagnostic or data storage, a fast
analog-to-digital converter (ADC) and
a frequency modulated internal phase
locked loop (IPLL) that improves the EMC
performance. This guide will show how to
quickly connect the board to a host PC
and execute a demonstration application
preloaded into flash memory. Default
jumper positions are for applications
loaded on the S12VR64EVB-board and
are shown in Figure 2.
Figure 2 - S12VR64EVB Option Settings
S12 MagniV Mixed-Signal MCUs
Quick Start Guide
Install CodeWarrior
1 2
Development Studio
The S12VR64EVB board ships with
the latest version of CodeWarrior
Development Studio for Freescale
HCS12(X) Microcontrollers. CodeWarrior
Development Studio is a complete
Integrated Development Environment
(IDE) that provides a highly visual and
automated framework to accelerate
the development of the most complex
embedded applications.
NOTE: CodeWarrior Development Studios must
be properly installed before attempting to connect
the target board to the host PC. Otherwise, the
necessary USB drivers will not be available and the
host PC will not recognize the board.
CodeWarrior Development Studio for HCS12(X) V5.1
is included on the DVD provided and can be found
on the main screen or on the software tab.
Install CodeWarrior
Service Pack for S12VR
Family Microcontrollers
Double click on the link for the S12VR
service pack. This patch contains
header files for the S12VR family
microcontrollers.
NOTE: CodeWarrior Service Pack for S12VR is
included on the DVD provided and can be found on
the main screen or on the software tab.
Launch the Demo
3
Program
The DVD contains a CodeWarrior project
to exercise the BATS module, ADC, highside drivers, the relay using low-side
drivers, Port T and SCI module. Please
follow the instructions below to compile
and load this code.
NOTE: If you want to connect a load on the relay
outputs, you’ll need to use a power supply with
a higher current output connected to the power
supply banana connectors J4 and J5.
S12 MagniV Mixed-Signal MCUs
1. Open CodeWarrior Development Studio.
2. Unzip the content of the file \files\training\
LabExamples.zip located on the training tab
of the DVD.
3. Drag the unzipped file “evb demo
application.mcp” into CodeWarrior’s Window
(the file is located below directory “evb
demo application”). This action should open
CodeWarriors’ project explorer.
4. Press “F7” key to build the project.
5. Verify the option jumpers are set in default
positions. Refer to Figure 1.
6. Connect the included A/B USB cable
between an open USB port on the host PC
and the USB connector on the target board.
7. Follow the on-screen instructions to install
the necessary USB drivers.
8. Connect a serial cable to the COM
connector at J32. Open a terminal program
and configure for 57600, 8, none, 1, none.
9. Move the ON/OFF Switch 3 to the
ON position.
10. While in CodeWarrior’s window press
“F5”; this action will attempt to establish a
connection between the evaluation board
and the PC.
11. Follow the instructions presented to connect
to the embedded debugger and download
the code recently compiled.
12. While in the debugger screen “True-Time
Simulator & Real-Time Debugger”, press
“F5” to start the code recently downloaded.
13. The relay will click on base time defined by
the potentiometer.
14. Rotate the potentiometer and notice that the
relay switching time will change according to
the potentiometer.
15. Notice that the LEDs D5, D6, D7 and D8 will
flash according to the relay changes.
16. Notice that the terminal program is reporting
the status of the system.
17. Program is reporting the status of the
VSENSE pin with an 8-bit resolution,
the current relay timer configuration on
milliseconds and the battery voltage status.
18. Vary the supply voltage below and over
the thresholds and check on the terminal
program and the battery voltage status during
this operation. (The example program is
using the VLBI2 and VHBI1 thresholds, these
thresholds are defined on the 9S12VR RM).
19. While in the Debugger window, you can halt
the controller by pressing “F6” and add break
points in the code by right clicking on it and
selecting the option “Set Break Point”.
20. Pres “F1” while in the Debugger window or
in CodeWarrior Development Studio to open
the included help.