Evaluation Board Setup and Programming

Last Modified: 2024-10-21 10:35:00Supports S32M27x Evaluation Board

Contents of this document

  • 1

    Out of the Box
  • 2

    Get Software
  • 3

    Plug It In
  • 4

    Build

1. Out of the Box

1.1 Get to Know the S32M27XEVB Board

GS-S32M27XEVB-IMG01

Get to Know the S32M27XEVB Board

Get to Know the S32M27XEVB Board

2. Get Software

Sign in at NXP with your credentials

2.1 Download and Install IDE

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

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

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

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

2.2 Install the S32M2xx Development Package

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

Install S32M2xx Development Package

GS-S32M24XEVB-IMG04

2.3 Download the RTD Drivers

Download RTD for S32K1 and S32M27x version 2.0.0.

Select "Automotive SW - S32K3/S32M27x - Real-Time Drivers for Cortex-M" package to download update site files.

GS-S32M27XEVB-IMG03 GS-S32M27XEVB-IMG04 GS-S32M27XEVB-IMG05

2.4 Download the Patch for RTD Drivers

Download RTD for S32K3 and S32M27x version 4.0.0 patch P20.

Select Automotive SW - S32K3/S32M27x - real-time Drivers for Cortex-M package to download updatesite files.

GS-S32M27XEVB-IMG06 GS-S32M27XEVB-IMG07

2.5 Add the RTD Drivers to S32DS

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 the "Add Update Sites" link.

Add the RTD drivers to S32DS

Add the RTD drivers to S32DS

Select downloaded: SW32K1_S32M27x_RTD_4.4_R21-11_2.0.0_D2308_DS_Updatesite.zip file (shorter one from the file names)

2.6 Install the RTD Drivers

Install the RTD 2.0.0 from the list. Be aware that RTD 2.0.0 may appears in the list more than twice. Ensure that you selected the version that supports only/also S32M27x (See content of the Overview window on the right side)

GS-S32M27XEVB-IMG08

2.7 Add the RTD Patch 04 to S32DS

Repeat the installation steps 2.5 and 2.6 also for patch P04 (the longer one from the file names): SW32K1_S32M24x_RTD_R21-11_2.0.0_P04_D2404_DS_updatesite.zip file.

Again, ensure that you selected the version that supports only/also S32M24x.

GS-S32M27XEVB-IMG09

2.8 Get FreeMASTER Application Tool

Download and install FreeMASTER Application Tool for real-time debugging.

GS-S32M24XEVB-IMG13

2.9 Get AMMCLib for S32M27X

Download and install S32M27X_AMMCLIB_EAR_1_1_38_BIN

GS-S32M27XEVB-IMG10

2.10 Get the Draft of S32M276 Motor Control Application

Download and install the S32M276 motor control application software.

GS-S32M27XEVB-IMG11

3. Plug It In

The recommended accessory kit for S32M27XEVB board is BLDC_KIT (software developed and tuned for given motor), however you may use any suitable 3 ph motor and 12 V power supply instead.

BLDC Motor Control Accessory Kit with Cables Top View

BLDC_KIT Content:

  • 95 W BLDC motor with HALL sensors Sunrise 42BLY3A78-24110
  • Plexiglass
  • 12 V, 5 A power supply Meanwell GST60A12-P1J
  • Power supply cable with set of universal plugs
  • 4 self-adhesive standoffs for any EVB Takachi AST3-10B
  • Micro-USB cable

3.1 Check The Default Jumper Positions at the S32M27XEVB EVB

S32M27XEVB Jumper Positions

S32M27XEVB Jumper Positions
S32M27XEVB Default Jumper Settings
Jumper State Notes
J1 CLOSED VSUP_MCU is routed to VSUP input of MCU
J2 1-2 VBAT is routed to VSUP. Boost Converter disconnected
J7 CLOSED Power domains LED Indicators enabled
J23 CLOSED VDD_MCU is connected to the VDD_MCU_PERH
J26 OPEN [1] High Voltage Input, [2] GND
J35 OPEN [1] LPUART0_RX, [2] LPUART0_TX
J51 CLOSED LIN Commander* mode
J55 OPEN ADC Potentiometer disabled
J61 CLOSED VSUP is routed to VSUP_PERH
J201 OPEN Current shunt voltage, not populated

3.2 Plug In the Motor

Plug the Motor

Plug the Motor

3.3 Plug In the Encoder/HALL Sensors

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

Plug the Encoder/HALL Sensors

Plug the Encoder/HALL Sensors

3.4 Plug In the Power Supply and USB Debug Interface

Plug the Power Supply and USB Debug Interface

Plug the Power Supply and USB Debug Interface

3.5 Plug In the JTAG Debug Interface and UART Interface

Optionally to Previous Step, Plug the JTAG Debug Interface and UART Interface

For run-time debugging is recommended serial interface.

Plug the JTAG Debug Interface and UART Interface

Plug the JTAG Debug Interface and UART Interface

4. Build

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

4.1 Select Application and MCU Programing

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

NXP\MC_DevKits\S32M27XEVB\sw

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 GS-S32M24XEVB-IMG22
  3. Navigate to the installed application directory: NXP\MC_DevKits\ S32M276SFFR\sw and choose appropriate project and click OK. Then, click Finish GS-S32M27XEVB-IMG17

4.2 Use Configuration Tool

  1. Unfold structure of the project with low-level drivers and double-click on *.mex file to open the project configuration in S32 Configuration Tool GS-S32M27XEVB-IMG12
  2. Please ensure that you configure appropriate project and click on "Update Code" button for generating configuration files GS-S32M27XEVB-IMG13

4.3 Upload Software and Debug

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

GS-S32M24XEVB-IMG27

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

GS-S32M24XEVB-IMG28

Upload Software and Debug

Upload Software and Debug

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.

GS-S32M24XEVB-IMG30 GS-S32M24XEVB-IMG31

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.

GS-S32M27XEVB-IMG15

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

GS-S32M24XEVB-IMG33

Application Control

Motor Parameters (Optional Step)

If you do not use BLDC_KIT (motor Sunrise 42BLY3A78-24110), you may need to edit the motor parameters according to used BLDC/PMSM motor. In the Motor Control Application Tuning (MCAT) Tool switch to Parameters tab and edit values on left side.

Motor Parameters (optional step)

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

Motor Parameters (optional step)

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.

Spin the Motor

RTD Examples

RTD Examples

Kickstart your RTD journey with these handy examples. We've rounded up some of the most common use cases to get you inspired and moving forward.

AE HANDLER FAULTS Example

Demonstrates the usage of the AE HANDLER FAULTS driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Ae_TS_T40D34M30I0R0\examples\S32DS\S32M276\Ae_Handler_Faults_Example_DS_001_S32M276

AE SPI Example

Demonstrates the usage of the AE SPI driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Ae_TS_T40D34M30I0R0\examples\S32DS\S32M276\Ae_Spi_Example_DS_001_S32M276

AEC SPI Example

Demonstrates the usage of the AEC SPI driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Ae_TS_T40D34M30I0R0\examples\S32DS\S32M276\Aec_Ip_Spi_Example_DS_001_S32M276

CAN TRCV Example

Demonstrates the usage of the CAN TRCV driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\CanTrcv_43_AE_TS_T40D34M30I0R0\examples\S32DS\S32M276\CanTrcv_Example_S32M276

DPGA Example

Demonstrates the usage of the DPGA driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Dpga_TS_T40D34M30I0R0\examples\S32DS\S32M276\Dpga_example_S32M276

DPGA IP Example

Demonstrates the usage of the DPGA IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Dpga_TS_T40D34M30I0R0\examples\S32DS\S32M276\Dpga_Ip_example_S32M276

GDU Example

Demonstrates the usage of the GDU driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Gdu_TS_T40D34M30I0R0\examples\S32DS\S32M276\Gdu_Example_DS_S32M276

LIN TRCV Example

Demonstrates the usage of the LIN TRCV driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Lin_43_LPUART_FLEXIO_TS_T40D34M30I0R0\examples\S32DS\S32M276\Lin_LinTrcv_Flexio_MasterFrameTransfer_S32M276

LIN TRCV LPUART Example

Demonstrates the usage of the LIN TRCV LPUART driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Lin_43_LPUART_FLEXIO_TS_T40D34M30I0R0\examples\S32DS\S32M276\Lin_LinTrcv_Lpuart_MasterFrameTransfer_S32M276

CLOCK IP Example

Demonstrates the usage of the CLOCK IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Mcu_TS_T40D34M30I0R0\examples\S32DS\S32M276\Clock_Ip_Example_S32M276

MCU Example

Demonstrates the usage of the MCU driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Mcu_TS_T40D34M30I0R0\examples\S32DS\S32M276\Mcu_Example_S32M276

POWER IP Example

Demonstrates the usage of the POWER IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Mcu_TS_T40D34M30I0R0\examples\S32DS\S32M276\Power_Ip_Example_S32M276

MEM OTP IP Example

Demonstrates the usage of the MEM OTP IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Ocotp_TS_T40D34M30I0R0\examples\S32DS\S32M276\Mem_Otp_Ip_Example_S32M276

OCOTP Example

Demonstrates the usage of the OCOTP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Ocotp_TS_T40D34M30I0R0\examples\S32DS\S32M276\Ocotp_Example_S32M276

PLATFORM MPU HLD Example

Demonstrates the usage of the PLATFORM MPU HLD driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Platform_TS_T40D34M30I0R0\examples\S32DS\S32M276\Platform_MPU_HLD_Example_S32M276

MPU IP Example

Demonstrates the usage of the MPU IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Platform_TS_T40D34M30I0R0\examples\S32DS\S32M276\Platform_MPU_IP_Example_S32M276

PORT Example

Demonstrates the usage of the PORT driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Port_TS_T40D34M30I0R0\examples\S32DS\S32M276\Port_Example_S32M276

SIUL2 PORT IP Example

Demonstrates the usage of the SIUL2 PORT IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Port_TS_T40D34M30I0R0\examples\S32DS\S32M276\Siul2_Port_Ip_Example_S32M276

WDOG Example

Demonstrates the usage of the WDOG driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Wdg_TS_T40D34M30I0R0\examples\S32DS\S32M276\Wdg_Example_S32M276

WDOG IP Example

Demonstrates the usage of the WDOG IP driver.

Path:

C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Wdg_TS_T40D34M30I0R0\examples\S32DS\S32M276\Wdg_Ip_Example_S32M276

Support

Forums

Connect with other engineers and get expert advice on designing with the S32M27XEVB Reference Design Board using our community sites.