Let's take your S12ZVML-MINIKIT for a test drive!
Choose between watching a short setup video or following the
1.1 Connect the S12ZVML-MINIBRD with the 3-Phase PM Motor.
Join motor phase lines into JP1, JP2 and JP3 pins. Hall Sensor lines are
NOTE: The phase order is not specified.
1.2 Plug the 12V power supply.
Attach the 12V power supply for powering both the S12ZVML MCU and the
3-Phase PM Motor.
1.3 Plug the USB cable.
Attach USB cable for debugging.
2.1 Download the S12ZVML-MINIBRD Quick Start Package (QSP)
The Quick Start Package includes the S12ZVML-MINIBRD Quick Start
Guide, the S12ZVML-MINIBRD User Guide, S12ZVML-MINIBRD Schematics, and
Motor Control Application Software to kick start your design.
2.2 Get your Integrated Development Environment (IDE)
S12ZVML-MINIKIT performs better using CodeWarrior® for MCUs
NOTE: Check CodeWarrior updates for the latest
2.3 Get the OSBDM debug interface driver from P&E
Install the latest version of OSBDM hardware driver. Working with the
Version 12 (Win XP/Vista/7/8/10)
for more information about the OSBDM.
2.4 Get the S12ZVML-MINIBRD Motor Control application software
Install the complete motor control application software from the Quick
The installation process offers downloading the latest version of
Automotive Math and Motor Control Library Set.
2.5 Get the run-time debugging tool
S12ZVML-MINIKIT performs better using the FreeMASTER tool for run-time
debugging. Install the latest version of FreeMASTER application and
optionally FreeMASTER Communication Driver.
NOTE: The source code
for using the Communication Driver is already included in example
3.1 Choose the motor control driving control you will be using for then
build the application and load it into the S12ZVML MCU:
- BLDC with six-step commutation control
- PMSM with the field-oriented control
3.2 Import your project into the IDE
In CodeWarrior you should follow: File > Import > General >
Existing Project into Workspace And then choose the selected motor
control application type.
NOTE: The default path is
You can check also an
option for copy selected project into your workspace.
3.3 Build the project – OPTIONAL
Right click on the imported project and select
Clean project from the context menu.
on the imported project and select Build project from
the context menu.
NOTE: These steps shouldn't be necessary since they are executed in the
next step automatically.
3.4 Debug the loaded code into MCU
In CodeWarrior you should follow: Run > Debug Configuration >
select predefined debug configuration.
Then click on Debug button to load built code into the
3.5 Let code Run and Disconnect
Let code run by clicking on the Resume (F8) button, and
use Disconnect button for avoiding interference between
CW debugger and FreeMASTER tool.
4.1 Debug your motor control application using a debugger tool
In FreeMASTER you should run the appropriate *.pmp file from your
application project folder.
NOTE: You may start it by double click
directly from CodeWarrior project explorer
4.2 Start a connection with the S12ZVML MCU
Initiate a connection with the MCU by clicking the
Stop icon on FreeMASTER.
NOTE: The connection
parameters are already predefined in FreeMASTER project. You may change
them in project options or using the Connection Wizard.
4.3 Control your motor
In FreeMASTER go to Control page tab to set the required motor rpms and
turn on the motor drive.
Your motor is now running.