Getting Started With the S32K344 Motor Control Development Kit for High-Power 48 V Applications

Contents of this document

  • 1

    Out of the Box
  • 2

    Get Software
  • 3

    Plug It In
  • 4

    Build, Run

1. Out of the Box

1.1 Get to Know the MC_XTM4CK344 Devkit

MCDXTM4CK344 Devkit

MCDXTM4CK344 Devkit

MC_XTM4CK344 Callouts

MC_XTM4CK344 Callouts

MC_XTM4CK344 Kit Content

MC_XTM4CK344 Kit Content

MC_XTM4CK344 Content:

  • 3-6PH48VHCPS(-H) Power Stage Board
  • 3-6PHMLBHCHV(-H) Adapter Board
  • S32K344PMC48VSC Controller Board
  • Mounting screws

2. Get Software

Sign in at nxp.com with your credentials

2.1 Download and Install IDE

Download and Install S32 Design Studio for S32 Platform v.3.5

S32DS 3.5 Download 1

S32DS 3.5 Download 1

S32DS 3.5 Download 2

S32DS 3.5 Download 2

2.2 Download S32K3xx Developmet Package

The S32K3 Development Package for S32DS might be updated directly from S32DS, but sometime might be necessary to download it and install it manualy.

For download S32K3 Development Package for S32DS v3.5 go to S32K3 Standard SW Package.

Download S32K3 Development Package 1

Download S32K3 Development Package 1

Download S32K3 Development Package 2

Download S32K3 Development Package 2

Download S32K3 Development Package 3

Download S32K3 Development Package 3

2.3 Install the S32K3 Development Package

  1. In S32DS, go to Help → S32DS Extensions and Updates from the top menu to open the S32DS Extensions and Updates dialogue where you click on Add Update Sites link

    Add Update Sites

    Add Update Sites
  2. Select downloaded SW32K3_S32DS_3.5.13_D2407.zip file
  3. Install S32K3 Development Package

    Install S32K3 Development Package

    Install S32K3 Development Package

2.4 Download the RTD Drivers

Download RTD for S32K3 and S32M27x version 4.0.0. Select Automotive SW - S32K3/S32M27x - Real-Time Drivers for Cortex-M package to download updatesite files.

S32K3 Standard Software - S32K3 RTD

S32K3 Standard Software - S32K3 RTD

S32K3 RTD 4.0.0 HF01 Download 1

S32K3 RTD 4.0.0 HF01 Download 1

S32K3 RTD 4.0.0 HF01 Download 2

S32K3 RTD 4.0.0 HF01 Download 2

2.5 Install the RTD Drivers to S32DS

  1. In S32DS, go to Help → S32DS Extensions and Updates from the top menu to open the S32DS Extensions and Updates dialogue where you click on Add Update Sites link
  2. Add Update Sites

    Add Update Sites
  3. Select downloaded SW32K3_S32M27x_RTD_R21-11_4.0.0_HF01_D2401_DS_updatesite.zip
  4. Install the RTD 4.0.0 HF01 from the list. Be aware that RTD 4.0.0 may appear on the list more than twice. Ensure that you selected the version that supports only/also S32K344 (See content of the Overview window on the right side)
  5. S32K3 RTD 4.0.0 HF01 Installation

    S32K3 RTD 4.0.0 HF01 Installation

2.6 Get FreeMASTER Application Tool

Download and install FreeMASTER application tool for real-time debugging.

TIP: for this setup you may even skip the Lite service installation (for which the activation code is required).

FreeMASTER Installer

FreeMASTER Installer

2.7 Get AMMCLib for S32K3

Download and install AMMCLib for S32K3 (version 1.1.41 or newer).

S32K3 AMMCLib Download

S32K3 AMMCLib Download

TIP: If possible, install AMMCLib in their default path location for later easy path modification.

2.8 Get the or MC_XTM4CK344 Motor Control Application

Download and install the MC_XTM4CK344 motor control application software MC_XTM4CK344_SW.exe.

MC_XTM4CK344_SW Installer

MC_XTM4CK344_SW Installer

3. Plug It In

NXP do not provide 48 V motor(s) and power supply within MC_XTM4CK344 kit, however you may use any suitable 3 ph motor(s) and 24/48 V power supply.

3.1 Default Jumpers

Check The Default Jumper positions at the Controller board.

Controller Jumpers

Controller Jumpers
Jumper State Notes
J3 CLOSED FS26_VDEBUG signal connected from OpenSDA 5 V
J8 CLOSED 5V power domain routed from FS26_VLDO1
J9 CLOSED 3V3 power domain routed from FS26_VLDO2
J10 1-2 VDDA power domain routed from FS26_VTRK1 (5 V)
J11 1-2 TJA1101 CONFIG0 pin tight with pull-up - PHY configured as Master

Check The Default Jumper Positions at the Adapter board.

Adapter Jumpers

Adapter Jumpers
Jumper State Notes
J2, J5..J9 OPEN M1 current sense amplifier gain = 50 (Not Applicable for MCSXTM4CK344)
J10..J15 OPEN M2 current sense amplifier gain = 50
J16 2-3 M1 FOC configuration, I_PHA routed to AN1 signal (Not Applicable for MCSXTM4CK344)
J17 2-3 M1 FOC configuration, I_PHB routed to AN3 signal (Not Applicable for MCSXTM4CK344)
J18 2-3 M1 FOC configuration, I_PHC routed to AN5 signal (Not Applicable for MCSXTM4CK344)
J19 2-3 M2 FOC configuration, I_PHF routed to AN29 signal
J20 2-3 M2 FOC configuration, I_PHE routed to AN27 signal
J21 2-3 M2 FOC configuration, I_PHD routed to AN25 signal
J23 1-2 Fan(s) controlled by MCU
J24 1-2 Overcurrent and Overvoltage Fault logic: Voltage reference V-TH derived from VREF
J25 1-2 M1 Safe state activation by internal HW logic: safe open state (Not Applicable for MCSXTM4CK344)
J26 OPEN M1 Safe state activation by External ECU: safe open state - not active (Not Applicable for MCSXTM4CK344)
J27 1-2 M2 Safe state activation by internal HW logic: safe open state
J28 OPEN M2 Safe state activation by External ECU: safe open state - not active
J37 1-2 M1_RESET: reset of the Buck UV latched fault for motor 1 (Not Applicable for MCSXTM4CK344)
2-3 M2_RESET: reset of the Buck UV latched fault for motor 2

3.2 Assemmbly Kit

Plug the Adapter board to Power Stage board via header conector(s).

The mounting holes (6) will help you with alignment.

Use plastic screws to secure the mechanical setup of Adapter and Power Stage boards.

Adapter Board Assembly

Adapter Board Assembly

Insert Controller board into PCIe connector at Adapter board.

Controller Board Assembly

Controller Board Assembly

3.3 Connect the Motor

Connect motor M2 (&M1) phase wires to the power stage board via appropriate M4 screws.

Motor Phase Wires

Motor Phase Wires

Optionally plug the Resolver or Encoder/HALL position sensors (only for sensor-based sw application).

Rotor Position Sensor Connection

Rotor Position Sensor Connection

3.4 Plug the Debugger

Plug the micro USB cable to S32K3 on-board debugger or use external 10pin JTAG debug interface to connect with PC.

Plug Debug Interface

Plug Debug Interface

3.5 Connect Power Supply

Connect 12 V power supply source to Adapter board. After that, connect 24 V / 48 V power supply to battery input via M4 screws.

Connect Power Supply

Connect Power Supply

4. Build, Run

Let's take your MC_XTM4CK344 motor control kit for a test drive.

4.1 Select Application and Project Import

Select the appropriate motor control application from the installed directory.

NXP\MC_DevKits\MC_XTM4CK344\sw

To import the installed application software project in the S32 Design Studio IDE for S32 Platform:

  • Launch S32DS for S32 Platform
  • Go to File → Import , then select General → Existing Projects into Workspace
Import Project

Navigate to the installed application directory: NXP\MC_DevKits\MC_XTM4CK344\sw and choose appropriate project and click OK . Then, click Finish.

Import MC_XTM4CK344 Project

4.2 Use Configuration Tool

Unfold structure of the project with low-level drivers and double-click on *.mex file to open the project configuration in Configuration Tool.

MEX File

Please ensure that you configure appropriate project and click on ""Update Code"" button for generating configuration files.

Update Code

4.3 Upload Software and Debug

In S32DS, return back to the C/C++ perspective.

C_Cpp Perspective

Use the Debug Configuration menu and select the predefined debug configuration for building and uploading software into MCU.

Debug Menu Debug Configuration

The S32DS will switch into debug perspective where you may let the code run by clicking on Resume (or press F8), and use Disconnect to avoid interference between the S32DS IDE debugger and the FreeMASTER tool.

Let Code Run Disconnect

4.4 Set Up the Debugging Tool

Launch the FreeMASTER application.

To open the *.pmpx FreeMASTER project <selected project>\FreeMASTER_control, click File → Open Project.

Launch the FreeMASTER application.

FreeMASTER Project

To enable communication, in the FreeMASTER tool bar, click Go (or press Ctrl+G).

Successful communication displays in the status bar at the bottom as:

RS-232 UART Communication;COMn;speed = 115200

FM Start

Application Control

Let's take your MC_XTM4CK344 motor control board for a test drive.

Motor Parameters

Now you may edit the motor parameters according to connected BLDC/PMSM motor(s). In the Motor Control Application Tuning (MCAT) Tool switch to Parameters tab and edit values on left side.

Motor Parameters

Once you finish, click on Store Data, switch to Output File tab and Generate static configuration file.

Generate Static Configuration

Now repeat step 4.3 to build the project and upload the code into MCU.

Spin the Motor

Click the App Control tab on the Motor Control Application Tuning (MCAT) Tool menu to display the application control page.

Configure the motor rpms and turn on the motor drive.

FM App Control

Check pending faults

In case of pending faults (fault state - blinking LED), click the Clear FAULT on the FreeMASTER MCAT control page or alternatively press and simultaneously hold SW4 and SW5 for M2 (SW2 and SW3 for M1) on the adapter board.

FM App Control - Clear FAULTS

Start application

Click On/Off on the control page or press SW4/SW5 or switch SW6 for M2 (SW2/SW3 or switch SW1 for M1) on the adapter board to initiate clockwise/counterclockwise spinning of the rotor. Run state is signalized by steadily glowing LED. Set speed.

Change the speed required variable to set the speed. Go to the Variable Watch window and modify Speed Required variable or click on the speed gauge, or by pressing the switch SW4/SW5 (SW2/SW3).

Stop application

Stop the application by clicking On/Off button on the FreeMASTER MCAT control page or switch the SW6 (SW1 for M1) on the adapter board. At ready state LEDs are turned off.