1.1 Connect the S12ZVM-EWP with DC power supply.
DO NOT turn power on this moment, but set the voltage to 12 V and the current limit to 7.0 A
1.2 Connect the 3-phase Water Pump or other PMSM motor.
1.3 Connect the PE Multilink debugger to BDM port (H1) onboard and PC.
1.4 Turn the Power Supply on.
2.1 Download the S12ZVML-EWP Quick Start Package (QSP)
The Quick Start Package includes the S12ZVML-EWP Quick Start Guide, the S12ZVML-EWP User Guide, S12ZVML-EWP Schematics, and Motor Control Application Software to kick start your design.
2.2 Get your Integrated Development Environment (IDE)
S12ZVML-EWP performs better using CodeWarrior® for MCUs (Eclipse IDE)
NOTE: Check CodeWarrior updates for the latest version.
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)
Go to http://www.pemicro.com/OSBDM for more information about the OSBDM.
2.4 Get the S12ZVML-EWP Motor Control application software
Install the complete motor control application software from the Quick Start Package.
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-EWP 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 project.
3.1 Set up Motor Control Application Tool (MCAT).
Open S12ZVM-EWP RDB V1.pmp file from the project directory and set the proper parameters up in MCAT for your water pump or other PMSM parameters.
NOTE: Refer to the AN4680 for more information about PMSM electrical parameters measurement.
After complete the parameters set, go to the MCAT “Output File” card and click the “Generate Configuration File” to set them effectively in your project.
3.2 Import your project into the IDE
In CodeWarrior you should follow: File > Import > General > Existing Project into Workspace. Then choose the root directory which you store the S12ZVM-EWP project and click the “Finish” button to complete the import.
NOTE: If the directory is correct, you the project name will be automatically populated in the list.
3.3 Build the project
Right click on the imported project and select Clean project from the context menu.
Right click 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
p>In CodeWarrior you should follow: Run > Debug Configuration > select predefined debug configuration.
Then click on Debug
button to load built code into the S12ZVML MCU.
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.