EV Motor Control Development Kits

Last Modified: 2025-09-30 15:59:00Supports S32K396 BLDC/PMSM Development Kit

Contents of this document

  • 1

    Out of the Box
  • 2

    Get Software
  • 3

    Plug It In
  • 4

    Build, Run

1. Out of the Box

NXP's MCSPTR2AK396 Low-Voltage Motor Control Development Kit is designed for customers developing low-voltage motor control applications using the S32K396 automotive microcontroller.

This page will guide you through the process of setting up and using the 3-Phase Permanent Magnet Synchronous Motor Control Development Kit with S32K396 (MCSPTR2AK396).

1.1 MCSPTR2AK396 Overview

MCSPTR2AK396 Development Kit

MCSPTR2AK396 Development Kit
  • S32K396-PCIe controller board
  • 3-phase PMSM/BLDC low-voltage power stage based on the MC33937A pre-driver integrated circuit
  • Micro USB cable
  • +24 VDC power supply
  • Universal adapter
  • PSE power cord
  • 3 phase PMSM motor with resolver, 30 V per phase, 3000 RPM, 0.32 Nm, 95 W, 5.2 A

MCSPTR2AK396 Callouts

MCSPTR2AK396 Callouts

MCSPTR2AK396 Motor Control Application Block Diagram

MCSPTR2AK396 Motor Control Application Block Diagram

1.2 Get Familiar with the Boards

MCPTR2AK396 Controller Board

MCPTR2AK396 Controller Board

MCPTR2AK396 Power Stage Board

MCPTR2AK396 Power Stage Board

2. Get Software

Sign in at nxp.com with your credentials.

2.1 Get S32 Design Studio for S32 Platform IDE

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

S32DS3.5 Download 1

S32DS3.5 Download 1

S32DS3.5 Download 2

S32DS3.5 Download 2

2.2 Downloading the Real-Time Drivers (RTD)

Download S32K3_S32M27x Real-Time Drivers ASR R21-11 Version 5.0.0.

S32K396 Integrated Software Bundle

S32K396 Integrated Software Bundle

S32K396 Download Development Package

S32K396 Download Development Package

Downloading the Real-Time Drivers (RTD)

Downloading the Real-Time Drivers (RTD)

2.3 Install the RTD drivers

In S32DS, go to Help → S32DS Extensions and Updates from the top menu to open the S32DS Extensions and Updates dialogue.

Click Add Update Sites and browse for the downloaded RTD *.zip file.

Update Platform Packages

Update Platform Packages

Find, select and install S32K39X Real-Time Drivers ASR R21-11 Version 5.0.0.

Download eTPU SW

Install eTPU SW

2.4 Download eTPU SW

Download S32K3 ETPU SW RTM 2.0.0 Code Drop 4.

Add Update Sites

Add Update Sites

Download eTPU SW

Download eTPU SW

Install eTPU SW

Install eTPU SW

2.5 Install eTPU SW

In S32DS, go to Help → S32DS Extensions and Updates from the top menu to open the S32DS Extensions and Updates dialogue.

Click Add Update Sites and browse for downloaded eTPU SW updatesite file.

Install eTPU SW

Install eTPU SW

Select and install eTPU SW.

Download S32K3 AMMCLib

Download S32K3 AMMCLib

2.6 Install FreeMASTER Communication Driver

In S32DS, go to Help → S32DS Extensions and Updates from the top menu to open the S32DS Extensions and Updates dialogue.

Select and install FreeMASTER Communication driver.

Install FreeMASTER Communication Driver

Install FreeMASTER Communication Driver

2.7 Get FreeMASTER Application Tool

Download and install FreeMASTER tool for real-time debugging.

2.8 Get AMMCLib for S32K3

Download and install latest Automotive Math and Motor Control Library set for S32K3.

Download S32K3 AMMCLib

Download S32K3 AMMCLib

Get AMMCLib for S32K3

Get AMMCLib for S32K3

2.9 Get the MCSPTR2AK396 Motor Control Application Software

Download and install the EV-INVERTERGEN3 motor control application software.

Get the MCSPTR2AK396 Motor Control Application Software

Get the MCSPTR2AK396 Motor Control Application Software

3. Plug It In

3.1 Check Default Jumper Positions

Check the default jumper positions at the 3PHLVPWBRDPCIE power stage board

3PHLVPWBRDPCIE Jumpers

3PHLVPWBRDPCIE Jumpers
3PHLVPWBRDPCIE Default Jumper Settings
Jumper State Notes
J5 2-3 Resolver S4 output routed to operational amplifier
J6 2-3 Resolver S3 output routed to operational amplifier
J7 2-3 Resolver excitation signal from TM5 signal at PCIe connector
J9 1-2 DC BUS current sensing signal measured via operation amplifier
J10 2-3 VREF as voltage source for overcurrent threshold potentiometer
J11 1-2 External overcurrent fault comparator
J16 OPEN Zero-Cross detection disconnected
J17 OPEN Zero-Cross detection disconnected
J18 OPEN Zero-Cross detection disconnected
J19 1-2 Phase A current signal routed to AN1 signal at PCIe connector
J20 1-2 Phase B current signal routed to AN3 signal at PCIe connector
J21 1-2 Phase C current signal routed to AN5 signal at PCIe connector

Check the default jumper positions at the S32K396-PCIE-MC controller board

S32K396-PCIE-MC Jumpers

S32K396-PCIE-MC Jumpers
S32K396-PCIE-MC Default Jumper Settings
Jumper State Notes
J11 2-3 CAN0 Transceiver STB signal pulled down
J13 OPEN FS26_VDEBUG signal generated - FS26 starts in debug mode
J14 CLOSED FS26_VDEBUG signal derived from VBOS signal
J15 CLOSED RESET SW2 connected to RESET_B signal
J16 CLOSED External wake-up signal connected to MCU
J17 2-3 CAN3 Transceiver STB signal pulled down
J18 1-2, 3-4 CAN0_TX and CAN0_RX signals routed to on-board CAN transceiver
J19 CLOSED Functional Safety signals FS0B and FS1B connected
J20 1-2, 3-4 CAN3_TX and CAN0_RX signals routed to on-board CAN transceiver
J22 CLOSED RESET_B signal connected as wake-up signal to FS26
J23 2-3 VHREF_H voltage connected to VDD_HV_A
J24 CLOSED RESET_B signal connected to 20-pin JTAG connector
J26 CLOSED VDD_JTAG signal present at 20-pin JTAG connector
J28 2-3, 5-6, 8-9, 11-12 JTAG signals routed to S32K3 on-board debugger
J29 OPEN External RESET signal pins
J30 CLOSED LPUART2_TX signal connected to S32K3 on-board debugger
J31 1-2 LPUART2_RX signal connected to S32K3 on-board debugger
J32 1-2 Sine Wave Generator 1 routed to TM5 signal at PCIe connector
J33 2-3 V15 voltage regulated by external NMOS transistor
J35 CLOSED PTB11 connected to TM3 signal at PCIe connector
J37 OPEN CAN0 Transceiver STB signal not connected to MCU
J38 1-2 CAN3 Transceiver STB signal not connected to MCU

In case of using an external JTAG debug probe via J20 connector, change the settings of J28 to 1-2, 4-5, 7-8, 10-11.

External Debugger

External Debugger

3.2 Assemble the Boards

  1. To assemble the controller board to the power stage board, connect the board to the PC with a micro USB cable
  2. S32K396 Motor Control Kit

    S32K396 Motor Control Kit
  3. Plug 24 V power supply to the power stage board
  4. S32K396 Motor Control Kit

    S32K396 Motor Control Kit

3.3 Connect USB and Power Supply

  1. Connect the board with PC by micro-USB cable
  2. Connect the kit USB and Power Supply

    Connect the kit USB and Power Supply
  3. Plug a 24 V power supply to the power stage board
  4. Connect the kit USB and Power Supply

    Connect the kit USB and Power Supply

4. Build, Run

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

4.1 Select Application and Project Import

Select the appropriate PMSM motor control application from the installed directory.

NXP\MC_DevKits\MCSPTR2AK396

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

  1. Launch S32DS for S32 Platform
  2. Go to File → Import, then select General → Existing Projects into Workspace
  3. Import Project

    Import Project
  4. Navigate to the installed application directory: NXP\MC_DevKits\MCSPTR2AK396, click Select Folder. Next, check the box for the option Copy project into workspace. Then, click Finish
  5. Import MCSPTR2AK396 Project

    Import MCSPTR2AK396 Project
  6. Afterward, a new window will appear. First for the M7_0_0 project, then for the M7_0_2 project. Click Yes To All to overwrite '.settings' folder in both project directories
  7. Overwrite Settings Final

    Overwrite Settings Final

4.2 Use Configuration Tool

  1. Unfold the structure of the first project and double-click on *.mex file to open the project configuration in S32 Configuration Tool
  2. Mex File

    Mex File
  3. Ensure that you are configuring the M7_0_0 project, and click Update Code button for generating configuration files. Next, in S32 Configuration Tool, click the pop down button next to the project name and choose *.mex file for the M7_0_2 project. Click Update Code accordingly
  4. Update Code

    Update Code

4.3 Upload Software and Debug

  1. In S32DS, return back to the C/C++ perspective by clicking the button located in the upper-right corner
  2. C_Cpp Perspective

    C_Cpp Perspective
  3. Click Debug As menu and select Debug Configurations
  4. Debug Menu

    Debug Menu
  5. Next, expand Launch Group and click the first launch configuration. This configuration will upload both the M7_0_0 and M7_0_2 projects to the MCU. Click Debug for building and uploading software into MCU
  6. Debug Configuration

    Debug Configuration
  7. Afterwards, a new window will appear. Check the box for the option Remember my decision and click Switch
  8. Confirm Perspective Switch

    Confirm Perspective Switch
  9. The S32DS will switch into debug perspective. First, press Ctrl + click both project main() files to highlight them. Next, let both projects run by clicking Resume (or press F8)
  10. Resume

    Resume
  11. Click Disconnect to avoid interference between the S32DS IDE debugger and the FreeMASTER tool
  12. Disconnect

    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.

FreeMASTER Project

FreeMASTER Project

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

FM Start

FM Start

Successful communication displays in the status bar at the bottom as: RS-232 UART Communication;COMn;speed = 115200.

Application Control

Controlling the Application

To spin the motor:

  1. Select the Speed FOC debug view from the project tree
  2. Switch to the Control Struct tab in the Motor Control Application Tuning (MCAT) tool tab
  3. Switch application ON either in MCAT or in variable watch window
  4. Set the required speed either in MCAT or in the variable watch window

Optionally you may drive the motor speed by SW1 switch and SW3/SW2 push buttons on the power stage board.

Buttons

Buttons
  1. Move the SW1 bar down (out of board direction) to get application ON
  2. Press SW3/SW2 to initiate clockwise/counterclockwise spinning of the rotor
  3. Another SW3/SW2 pressing will increase/decrease the motor speed
  4. Move the SW1 bar up (to the center of board direction) to stop the motor
  5. Simultaneously pressing SW3 and SW2 will clear the pending faults