NXP Sensorless Motor Control Eval Kit + Motor - Review

Table of contents

RoadTest: NXP Sensorless Motor Control Eval Kit + Motor

Author: MARK2011

Creation date:

Evaluation Type: Development Boards & Tools

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: Texas Instrument Motor Drive with C2000 Piccolo Launchpad & DRV8301

What were the biggest problems encountered?: Errors in compilation of demo project; out-of-date manuals or unavailability of files complex and unclear instruction of working environment preparation Necessity of install several "heavy" programs/ programming environments (disc capacity issue)

Detailed Review:

image

Introduction

I sincerely confess that working with NXP kit,  I find a lot of similarities with my previous “BLDC” - related roadtest (Ti Piccolo board with motor driver board)

 

Both  took a while to run the kit properly,

Fine-tuning of the software was slightly annoying and to be honest brought several hesitations at the beginning.

But finally I was able to sort out all results issuing more/ less complete report and confirm that I had the honour to deal with reliable and powerful motor control set.

 

History

I think that is the right place to emphasize the role of both Freescale and NXP in research and development in electronic industry.

Freescale was one of the first semiconductor companies in the world, having started as a division of Motorola.

Their most known products: from high-power transistors to Kinetis: smallest ARM-powered chip.

The NXP company was founded in 1953 as part of the electrical and electronics firm Philips.

NXP is i2C protocol inventor

In March 2015, a merger agreement between NXP and Freescale was announced.

 

On the other hand, the reason why I mention companies merging and these names/ property changes

is a little mess in documentation, descriptions as well in internet sites and software.

Some old freescale based material are mixed with new NXP.

Maybe my bad luck maybe others don’t experience it

but I encountered some issues related to that matter.

Markings & Description

To avoid confusion and feeling lost (frankly I experienced this) I decided to systematize names of hardware used in documentation as well as in my report.

 

S12ZVML-MINIKIT = S12ZVML-MINIBRD with a Linix PM motor

motor = 3-phase Linix 45ZWN24-40 PM motor

 

S12ZVML-MINIKIT "heart" ... or "brain" is the S12ZVML MCU

Microcontroller    S12 MagniV S12ZVM

chip family name :  MC9S12ZVM        

full microcontroller name: MC9S12ZVML128 MCU

 

The S12ZVML-MINIKIT demonstrate the advantages of the

NXP S12ZVM MCU

is employed for control applications with 3-phase brushless DC motor (BLDC)

BLDC with six-step commutation control

 

it can be used also with  permanent magnet synchronous motor (PMSM).

PMSM with the field-oriented control.

 

Similar remark and need of systematize concerns the documentation

 

Documents

I would became unfair coping information and data-sheets concerning involved equipment and accompanying software.

“Tons” of  information is available on official NXP site. That is additionally supported as well on fantastic NXP community forum.

 

S12ZVML-MINIBRD User Manual:  MC9S12ZVML128 Small Footprint Board for Sensorless Motor Control

S12ZVML-MINIBRD Board User Manual, Rev. 1.0

Document Number: S12ZVML-MINIBRD_UM  1.0   04/2014

S12ZVML-MINIBRD_UM.pdf   = 2294445.pdf  (the same [very handy and helpful] papers)

 

CodeWarrior Development Studio

Processor Expert User Guide

Document Number: CWPEXUG  Rev 10.6, 02/2014

CodeWarrior Development Studio Processor Expert User Guide, Rev. 10.6, 02/2014

CWPEXUG.pdf

 

 

S12ZVM Mixed-Signal MCU for Automotive & Industrial Motor Control Applications

https://www.nxp.com/products/processors-and-microcontrollers/additional-processors-and-mcus/8-16-bit-mcus/16-bit-s12-magniv/s12zvm-mixed-signal-mcu-for-automotive-industrial-motor-control-applications:S12ZVM

Under above link we can find all the information about the board and the demo kit. From overall description to link to detailed documentation.

Let me only copy some most important data here:

 

Product Name         S12ZVML128/64/32

Package                 64LQFP-EP

Flash                     128k/64k/32k

RAM                      8k/4k

EEPROM (Bytes)        512

PHY                        LIN

Separate VREG        0

GDU (HS / LS)          3/3

Bootstrap Diodes integrated    0

OpAmp / Current sense    2

ADC (ext. channels)        4+5

MSCAN                 1

SCI                        2

SPI                        1

TIM (IC/OC channels)    4

PWM channels             6

External FET Nominal Gate Charge (nC)     100-150

Operating Temperature (Min-Max) (°C)         up to 150°C Ambient

 

 

The fantastic source of information and support is:

Community

https://community.nxp.com/

My recommended Communities themes related to our kit:

Suggested Link:

as well as brilliant description on  Element14 site:

for me mostly useful: “Take your S12ZVML-MINIKIT for a test drive!”

https://www.element14.com/community/docs/DOC-91788/l/take-your-s12zvml-minikit-for-a-test-drive

 

Tool Chain (software) Overview

Most important software necessary to conduct our exercises are as follow:

image

 

There are a lot of documentation, and not only one instruction

thus, to be honest I felt a little confused at the beginning with the simple question “which is the best path to follow?”.

Specially I wanted avoid mistakes related to software installation.

According to my experience from the past, sometimes  the correct sequence influences on further reliability of the software suite.

(anyway, after that RT I think that is not applicable in the NXP case)

Additionally I didn't want to waste time and space on the disk for useless programs.

After some hesitations and experiments I confirm - the simplest way is described in:

Quick Start Guide S12ZVML-MINIKIT

The instruction file name is:

3-phase BLDC and PMSM Development Kit with NXP S12ZVML128 MCU

S12ZVMLMKQSG.pdf

 

STEP-BY-STEP INSTRUCTIONS

I decided to precisely follow these steps

Getting Started (1)

step one - Download installation software

image

Download installation software and documentation under “Getting started” at nxp.com/AutoMCDevKits

It directed us to the following links:

https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/automotive-motor-control-development-solutions:AUTOMOTIVE-MOTOR-CONTROL?&tid=vanAutoMCDevKits

 

https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/automotive-motor-control-development-solutions/magniv-and-s12-solutions/s12zvm-mini-board-and-mini-kit-evaluation-platforms:S12ZVML-MINIXXX?&tid=vanS12ZVML-MINIBRD

Enteringimagethe interactive site lead us through all necessary installation of components:

image

Getting started S12ZVML

S12ZVM Mini Board and Mini Kit evaluation platforms

 

Get Started with the S12ZVML-MINIXXX

 

image

Get Started with the S12ZVML-MINIXXX

 

https://www.nxp.com/document/guide/get-started-with-the-s12zvml-minixxx:GS-S12ZVML-MINIXXX?lang=en&lang_cd=en&

 

Follow the instalation

Download the S12ZVML-MINIBRD Quick Start Package (QSP)

The Quick Start Package (nowadays: S12ZVML-MINIXXX Quick Support 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.

image

https://www.nxp.com/downloads/en/board-support-packages/S12ZVML-MINIXXX-QSP.zip

S12ZVML-MINIXXX-QSP.zip

image

image

image

image

S12ZVML-MINIBRD_SW.exe

 

>>> AMMCLIB

 

2.2 Get your Integrated Development Environment (IDE)

The CodeWarrior tool enables development, download and debug code in on-board MCU.

S12ZVML-MINIKIT performs better using CodeWarrior® for MCUs (Eclipse IDE)

 

Price: image

NOTE: Check CodeWarrior updates for the latest version.

image

https://www.nxp.com/support/developer-resources/software-development-tools/codewarrior-development-tools/codewarrior-legacy/codewarrior-development-studios/codewarrior-for-microcontrollers/codewarrior-for-mcus-eclipse-ide-coldfire-56800-e-dsc-kinetis-qorivva-56xx-rs08-s08-s12z-11.1:CW-MCU10?tab=Design_Tools_Tab

image

CodeWarrior® for MCUs (Eclipse IDE) - ColdFire®, 56800/E DSC, Kinetis®, Qorivva® 56xx, RS08/S08, S12Z - 11.1

image

 

Product Information

CodeWarrior Development Tool - Evaluation Software

image

 

image

image

image

 

https://www.element14.com/community/docs/DOC-39319/l/freescale-codewarrior-ide-development-suite-overview

https://www.nxp.com/support/developer-resources/software-development-tools/codewarrior-development-tools:CW_HOME

 

 

2.3 Get the OSBDM debug interface driver from P&E

OSBDM Interface

The on-board OSBDM interface allows a download and debug of the code in the MCU without any

additional debugging hardware. The P&E Micro USB Multilink is not needed.

The OSBDM interface can be used as a board virtual serial port for FreeMASTER based application

control.

Install the latest version of OSBDM hardware driver. Working with the Version 12 (Win XP/Vista/7/8/10)

Go toimage http://www.pemicro.com/OSBDM for more information about the OSBDM.

image

http://www.pemicro.com/downloads/download_file.cfm?download_id=53

 

https://www.pemicro.com/login.cfm?from_url=http%3A%2F%2Fwww%2Epemicro%2Ecom%2Fdownloads%2Fdownload%5Ffile%2Ecfm%3Fdownload%5Fid%3D53&from_action=download_file&download_id=53

use this link to download the file (P&E Hardware Interface Drivers, Version 12 (Win XP/Vista/7/8/10)) you requested.

image

image

2.4 Get the S12ZVML-MINIBRD 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

The FreeMASTER tool allows the user to control the on-board application via the PC USB line.

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 project.

image

https://www.nxp.com/support/developer-resources/software-development-tools/freemaster-run-time-debugging-tool:FREEMASTER?tab=Design_Tools_Tab

image

FREEMASTER: FreeMASTER Run-Time Debugging Tool

https://www.nxp.com/support/developer-resources/software-development-tools/freemaster-run-time-debugging-tool:FREEMASTER?tab=Design_Tools_Tab

image

LA_OPT_TOOL Software Tools v14 January 2019

image

image

image

image

image

 

and ALSO  the driver!

image

image

image

 

 

3) https://www.nxp.com/document/guide/get-started-with-the-s12zvml-minixxx:GS-S12ZVML-MINIXXX?lang=en&lang_cd=en&

_________________________________________

 

Install CodeWarrior [CW]

image           

image       

 

I was wondering if the selection is correct

image

image

 

I had th pass through the Windows security verification:

image

image

image

image

image

 

After installation the following link is available:

file:///C:/Freescale/CW%20MCU%20v11.1/MCU/Help/START_HERE.html

which give the acess to the list of PDFs available in a complete installation of this version of CodeWarrior for Microcontrollers.

Documentation Suite – CodeWarrior for Microcontrollers v11.x  (Installed as part of CodeWarrior tools installation)

 

Starting CodeWarrior installation

image

the workspace default selection

image

image

 

image

image

 

At the end of my experiments I faced with:

Expiration Reminder

image

 

 

Don't worry I found quite pleasant explanation from the community:

https://community.nxp.com/thread/495889

 

 

UPDATE

is it anymore necessary - honestly I was not sure if I need to download and run it:

image

image

Well I realized, that update was included in my previous installation file thuts that one is unnecessary at all!

image

Buttons were grayed.

 

P & E drivers installation

image

 

image

 

 

 

Install the FreeMASTER

FreeMaster will soon be necessary to control our motor after implementation of the main software in CodeWarrior.

 

image

image

image

 

image

image

image

 

 

Install S12ZVML-MINIBRD_SW (AMMCLIB )

image

image

image

 

image

image

 

 

Selected components:

      Automotive Math and Motor Control Library (AMMCLIB)

 

 

 

image

Motor Control PMSM Development Kit for MC9S12ZVM NXP MCU

========================================================

Revision 1.0

December 2019

RELEASE NOTES

=============

This is the NXP release for 3-phase Sensorless single-shunt Brushless DC / Permanent Magnet Motor (BLDC / PMSM) Motor Control Development Kit S12ZVML-MINIKIT and S12ZVML-MINIBRD for the NXP MagniV MC9S12ZVM devices.

SW Library:

===========

This S12ZVML-MINIKIT Motor Control Development Kit SW contains the Automotive Math and Motor Control Library Set (AMMCLIB) which is available for evaluation free-of-charge for 90 days.

For information how to purchase the AMMCLIB please contact your NXP Sales Representative or Distributor.

Installation defaults:

======================

The default destination path of the Development Kit for MC9S12ZVM is C:\NXP\MC_DevKits\S12ZVMLMINIBRD.

image

image

 

another link to AMMCLIB

Automotive Math and Motor Control library AMMCLIB :

https://www.nxp.com/support/developer-resources/run-time-software/automotive-software-and-tools/automotive-math-and-motor-control-library-set:AUTOMATH_MCL

The AMMCLIB is delivered in various forms: precompiled as binaries (free) or in source file format (need to buy it).

The toolbox comes with the free version of the AMMCLIB.

Usage conditions:

image

 

https://www.nxp.com/support/developer-resources/run-time-software/automotive-software-and-tools/automotive-math-and-motor-control-library-set:AUTOMATH_MCL?tab=Design_Tools_Tab

image

image

 

image

image

 

image

image

image

image

 

All (more/ less) necessary software is on its place,

Now let’s

Connect the Power

image

In the meantime it's worth to check the jumpers on the board.

 

image

RUN:  Chapter 5 Board Quick Start Guide str 19

image

__________________

Chapter 5 Board Quick Start Guide page19:

Connect BLDC motor, type LINIX 45ZWN24-90-B, with the S12ZVML-MINIBRD, pins JP1,

JP2, JP3,

image

now connect the power supply cable with the S12ZVML-MINIBRD, J1 LIN connector

 

And following:

image

USB cable connect

 

image

OMG did I (my kit) spoil the computer’s USB port?

 

image

It have looked deadly bad but I see it was only false alarm!

image

 

image

image

 

image

image

I don't know the reason for that failure. After detailed inspection I decided to change the USB cable.

Generally speaking everything works fine.

Import the installed application software project in the CodeWrrior Development

Studio IDE

 

image

in C:\NXP

we have two folders now:

 

image

C:\NXP\MC_DevKits\S12ZVMLMINIBRD\sw

image

 

 

Import project into the CodeWarrior  IDE

File > Import > General > Existing Project into Workspace

image

image

 

image

 

C:\Users\PC\workspace\S12ZVMLMINIBRD_BLDC_SW_CW11

During?  or after? import:

image

image

What could be the reason for the following errors right after importing the example to the workspace?

according to the support from https://community.nxp.com/thread/476936

I knew I needed to look for is MLIB library

image

 

 

image

 

volatile tFrac16 startCMTacceleration;

 

Thanks to the NXP support, I realized, that AMMCLIB was misplaced!

It needs to be copied to C:\Freescale to work.

the folder C:\NXP\AMMCLIB  is not correct anymore!

AMMCLIB  should be copied to C:\Freescale to work.

 

image

C:\Freescale\AMMCLIB

image

image

MC9S12ZVM_AMMCLIB_1.1.15

=======================

Revision 1.1.15

31-December-2018

RELEASE NOTES

=============

This is the NXP Service Release for rev 1.1.15 of the Automotive Math and Motor Control Library Set for NXP MC9S12ZVM devices, supporting the S12ZVM core based devices.

Installation instructions:

==========================

Run MC9S12ZVM_AMMCLIB_RTM_1_1_15.exe self executable file, in order to start the installation procedure and follow the instruction on the screen. The recommended destination path (the default one) is: C:\NXP\AMMCLIB\MC9S12ZVM_AMMCLIB_1.1.15 [....

I couldn't find it: MC9S12ZVM_AMMCLIB_RTM_1_1_15.exe
And the following sugestion from the support:

The AMMCLib from version 1.1.15 is located in a different folder (we abandoned legacy C:\Freescale folder and now use c:\NXP folder).

Please edit AMMCLib path at three places in project settings (see pictures below) and replace "Freescale" by "NXP" string.

 

image

Right button or Alt+Enterimage

image

Libraries is everything in the correct place?

image

image

and results, the right localization is as below:

image

 

 

The only minor problem are following warnings:

image

Clean:

Warnings:  No function prototypes:

image

__EXTERN_C void _Startup(void)   (in startup.c)

image

"Require Function Prototypes" option | NXP Community

https://community.nxp.com/thread/302668

 

And

void FMSTR_AbortRec(void)        (in freemaster_rec.c)

 

After build - there are no warnings!!!

 

according to https://www.element14.com/community/docs/DOC-91788/l/take-your-s12zvml-minikit-for-a-test-drive:

Debug the loaded code into MCU.

If using CodeWarrior you should follow:

Run > Debug Configuration > select predefined debug configuration

image

image

and then click on Debug to load built code into the S12ZVML MCU.

 

I followed step by step instruction:

Let code run by clicking on the Resume button (or press F8 key), and use the Disconnect button to avoid interference between CW debugger and FreeMASTER tool.

image

 

 

Now we are ready to START DEBUGGING

 

Debuging  motor control application can be done running the *.pmp file from the project folder.

Opening  the FreeMASTER control page default: “S12ZVML-MINIBRD_BLDC_Sensorless.pmp”

located in the “S12ZVML-MINIBRD_BLDC_Sensorless_CW_IDE” folder

image


No need to start FM - it can be done simply:

In the CodeWarrior just Double click  .pmp

image

Or if you didn’t use CW and have .pmp file already:

Run:  FreeMaster:

image

And search 

C:\Users\USERFOLDERHERE\workspace\S12ZVMLMINIBRD_BLDC_SW_CW11\FreeMASTER_Control\

image

In the Project/Options comm tab selecting the right USB virtual port number, and the communication

speed set at 9600 kBd

image

OSBDM/OSJTAG - CDC Serial Port (http://www.pemicro.com/osbdm, http://www.pemicro.com/opensda) (COM35)

image

According to the instruction:

"The motor can be controlled using the J2 header.

Run motor by placing the jumper short bar to J2, pin 1-2"

But from my side no action with jumpers was necessary, just leave it on default position.

that point of the instruction: Board Quick Start Guide S12ZVML-MINIBRD_UM 2294445.pdf  page 21

 

"Place jumper short bar J2, pins 2-3"

???

I decided to neglect it!

 

But remember one thing!:

In CodeWarrior  select “Disconnect” to release the board USB channel.

The USB communication channel will be used by FreeMASTER tool now

Otherwise the debugger will fail to connect.

 

Start in FreeMaster using ...STOP... button  image

image

 

motor behavior can be visualyzed and analyzed:

 


 

END:  image

image

 

 

Afterwards I learned that  AMMCLib could be set in the proper way, following the instructions as bellow:

Working with AMMCLib SDKs

Let me throw two cents about the right setup of AMMCLib

all is described in the Community as follow:

HOWTO: Working with AMMCLib SDKs

https://community.nxp.com/docs/DOC-341053

about AMMCLIB

https://community.nxp.com/thread/453257

AMMCLIB KEA8 CodeWarrior 10.6 simple example

https://community.nxp.com/thread/341265

you have to add the path of MMCLB so that the compiler can find out the *.h file.

in the Property menu, pls add "ARM Ltd Windows GCC C Compiler"->"Directory" and  add the motor control path:"${MCU_TOOLS_HOME}\..\..\AMMCLIB\KEAx_AMMCLIB_v1.0.0\include"

Pls add the library by "ARM Ltd Windows GCC C Linker"->"Miscellaneous", add the "${MCU_TOOLS_HOME}\..\..\AMMCLIB\KEAx_AMMCLIB_v1.0.0\lib\cw10x\KEAx_AMMCLIB_v1.0.0.UC.a", this is the motor control library.

image

 

 

 


Problems

My bad luck I came across some old freescale links nt walid anymore:

the references you mentioned link to freescale pages which no longer exist.

image

 

As mentioned at the beginning, where I explained some errors related to Freescale-NXP merging one of example is a little mess in the following paper:

S12ZVML-MINIBRD_UM.pdf   = 2294445.pdf (moja nazwa: S12ZVML-MINIBRD_UM  2294445.pdf) page 19

image

I couldn't find the section"Jump Start Your Design"

image

additionally, there are no more software package "S12ZVML-MINIBRD_BLDC_Sesnorless_CW_IDE.exe"   ????

 

 

 

Attempts to Import and use other examples

image

image

image

C:\Freescale\CW MCU v11.1\eclipse\../MCU/CodeWarrior_Examples/Processor_Expert/HCS12Z

 

 

 

image

Can not detect Board information

It wasn't as simple as I imagined, Some workabout and learning is requided.

 

Software review

Despite the fact it costed little more time than expected, to dig through the documentation, manuals with demos and discussions on the NXP community forum I must confirm that the software is quite convenient to conduct default exercise and run the motor. Unfortunately

The software pack doesn’t support (in easy and comfortable way)  programming

Although ambitious plans to extend the scope of tests and build my own projects, I didn’t manage to finalize it and go beyond the default demo project. Nevertheless use of common platform - Eclipse environment gave us wide possibilities to code, build flexible programs, experiment with program packages libraries etc. In my case the only barrier was the time. Anyway I hope to continue the challenge.

Generally - no more remarks although … let me complain one more matter:

Well - successfully installed another eclipse-based suite, another gigabytes taken…

Microchip, Matlab, Ti Composer, Digilent, - Cypress and here we are the next: NXP

With their (very comprehensive - I admit) huge IDEs.

It's a pity we can’t use one “engine” for different programming environment.

 

Final tests of  the quality/ immunity

I didn't find any cons regarding board quality.

Reliable, simple and handy

I don’t need nothing more to run and control the BLDC motor.

 

Conclusions

After relative long time of dealing with NXP Sensorless Motor Control Eval Kit,

spending several hours for reading manuals, learning how to configure, and install the software  and finally experimenting with the released example I’m at last ready to put some words as the summary.

Neglecting some hesitations regarding the selection of necessary programs to be installed. Not commenting requirement to install both CodeWarrior and FreeMaster, I’m glad to confirm building the environment to test NXP sensorless Motor Control Eval Kit as well as conducting tests using the implemented demo was very pleasant. Demo project S12ZVML-MINIBRD_BLDC_Sensorless offers lot of features to check and analyze system parameters, test it and visualize in simple way and handy.

To be honest I was sure the CodeWarior and FreeMaster are tools which let me continue the experiment and easy build next projects. But the usage of the program set isn't as easy Ias I suppose, although I’m not a beginner. Some extra programming skills would be necessary.

Concerning attached software - I missed additional examples, libraries for support other motors etc...

 

But above problems concern my “defectivity”. I should honestly confirm that possibilities of NXP NXP Motor Control Eval Kit, seems to be extraordinary indeed! I haven't even used a few percent of its functionality. I focused on simple motor control example code but the tool accompanied with appropriate software is extremely universal. Together it became powerful equipment providing reliable control of BLDC motors. Having the programming skills and engineer’s experience you can build large and comprehensive project of motor control.

 

Thank you again for selecting me as the roadtester and give me the opportunity to deal with this extraordinary and amazing kit.

Marek

Anonymous