2264103_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2264103_en-US

2264103_en-US

Getting Started with FRDM-A-S32K312 Using Model-Based Design Toolbox (MBDT)

Table of Contents


1. Introduction

This article aims to help new users prepare and install the necessary software and hardware to use the FRDM Automotive S32K312 with the latest  Model-Based Design Toolbox for S32K3 version 1.8.0.

Note: These steps can also be followed with any NXP Evaluation Board from the supported list referenced in the toolbox documentation.

S32K312MINI‑EVB Renamed to FRDM‑A‑S32K312: Now part of the FRDM Automotive Ecosystem under its new name, the board keeps the same hardware and adds full ecosystem compatibility for flexible, scalable development.

FRDM-A-S32K312-Details.png
 

 

2.1 Software Required

 

2.2 Hardware Required

 

3. NXP Account Login

Open Software Licensing: Support, make sure you are logged into your NXP Account, and select:

  1. Click on My NXP Account.
  2. Select Software Licensing and Support.

    stefanvlad_4-1766413667183.png

  3. Then click on View accounts: stefanvlad_5-1766413890382.png

These steps will ensure that you are properly authenticated with your NXP Account before proceeding with step 4.5 MBDT for S32K3 v1.8.0 Installation.

Keep the page opened for login to persist.

 

4. Installation

Note: Before proceeding, make sure you have full access to your PC or Laptop. Some installers require local admin rights. Contact your IT department to assist you with installation.


4.1 PEmicro driver Installation

After downloading  PEmicro Hardware Interface Drivers

  • Open the installer package and select default Destination Folder: stefanvlad_1-1766419738640.png
  • Click on Install and then wait to finish successfully.
  • Connect the USB cable to your PC and the FRDM Automotive S32K312 board:
    FRDM-A-S32K312-Connect.png
  • Open Device Manager to check OpenSDA and the COM port number.
  • OpenSDA - CDC Serial Port → note this COM port number stefanvlad_2-1766420223283.png

Note: The COM port number may differ on your system.

 

4.2 FreeMASTER Installation

Download the  FreeMASTER Run-Time Debugging Tool:

stefanvlad_3-1766420635579.png
  • Open the installer FMASTERSW32.exe
  • Click Next, then select all available products: stefanvlad_3-1766483372281.png
  • Use the default installation path: "C:\NXP\FreeMASTER 3.2"
  • Wait for the installation to complete. stefanvlad_5-1766483553297.png

 

4.3 MATLAB® Installation

First, check whether MATLAB® R2023b or later is already installed. If so, you can skip this section.

  • For this tutorial, MATLAB® R2025b is downloaded from MathWorks®: stefanvlad_1-1765986670126.png
  • Download the matlab_R2025b_Windows.exe (246 MB) file.
  • A MathWorks® Account login is required. stefanvlad_0-1765989175448.png
  • After signing in, select the installation directory, default is C:\Program Files\MATLAB\R2025b
  • For minimum requirements, install the following Products:
    • MATLAB®
    • Simulink®
    • AUTOSAR Blockset
    • Embedded Coder
    • MATLAB® Coder
    • Motor Control Blockset
    • Simulink® Coder
    • Stateflow
  • By default Select All is enabled during install:
    stefanvlad_1-1765989395916.png
  • Wait for the installation to finish. stefanvlad_0-1765990977949.png
  • After installation, open MATLAB® and change the default Add-ons path to a shorter path such as: "C:\MathWorks". stefanvlad_0-1766410047823.png

 

4.4 MATLAB® Add-Ons Installation

Open Add-On Explorer and install:

 

4.5 MBDT for S32K3 v1.8.0 Installation

  • After installing the support package, run the following command in MATLAB®:
    sp_s32k3.nxp.setup(); stefanvlad_0-1766413223525.png
  • Select version 1.8.0, the installer will check prerequisites: stefanvlad_1-1766413310659.png
  • If any toolboxes are missing, install them before continuing.
  • Click Download to proceed. stefanvlad_2-1766413441318.png
  • The Download button opens the Software Terms and Conditions dialog; if the page is not properly loading, follow the steps in 3. NXP Account Login. stefanvlad_6-1766414096051.png
  • After reading, click I Agree.
  • Download the SW32_MBDT_S32K3_1.8.0_D2512.mltbx file (approx. 1.6GB): stefanvlad_7-1766414190914.png
  • Once the download completes, browse the location of SW32_MBDT_S32K3_1.8.0_D2512.zip file: stefanvlad_0-1766414656239.png
  • Click Install to proceed, and accept the license agreement. stefanvlad_1-1766414793231.png
  • After a few minutes, the dialog will display: Installation successfully completed!
  • Click Next. stefanvlad_0-1766415122676.png
  • Select an option such as Open S32K3 Root Folder. stefanvlad_1-1766415182502.png
  • MATLAB®’s current folder will change to the root of the toolbox.
    stefanvlad_2-1766415288611.png
  • Click Finish to close the installer.
  • The current folder in MATLAB® is now "C:\MathWorks\Toolboxes\NXP_MBDToolbox_S32K3": stefanvlad_3-1766415419643.png

 

5. Running a Demo from the MBDT examples for S32K3

Navigate to: 

  • "C:\MathWorks\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\demos\s32k3xx_uart_leds_s32ct"
  • Open the model s32k3xx_uart_leds_s32ct.mdl. stefanvlad_4-1766415657531.png
  • Click on Hardware Settings: stefanvlad_0-1766419685798.png
  • Go to Hardware board Settings → Hardware → Select Configuration Project Template: stefanvlad_0-1766421790798.png
  • For the FRDM-A-S32K312 select Custom: S32K312MINI-EVB S32 Config Tool
  • A Warning Dialog will appear, click OK.
    stefanvlad_2-1766421922797.png
  • Wait for the configuration update to complete.
    stefanvlad_3-1766421986052.png
  • Click on Apply and close the Configuration Parameters window.
  • Press Build, Deploy & Start (CTRL+B) in order to generate the code: stefanvlad_4-1766422124406.png
  • After the build completes successfully, the executable is downloaded to the board.
    stefanvlad_0-1766482772353.png
  • Open a terminal application and connect to the board's COM Port at 115200 Baud: stefanvlad_1-1766483002529.png
  • Pressing r, g, or b on the keyboard toggles the corresponding RGB LED on the board.

 

6. Running a Motor Control Demo using MBDT

Navigate to "C:\MathWorks\Toolboxes\NXP_MBDToolbox_S32K3\S32K3_Examples\mc\PMSM"

  • Open the folder s32k312_mc_pmsm_2sh_s32ct stefanvlad_0-1766489966607.png
  • Open the model s32k312_mc_pmsm_2sh_s32ct.mdl: stefanvlad_1-1766494271242.png
  • Press Build, Deploy & Start (CTRL+B) in order to generate the code.
  • After the executable file is downloaded
    1. Disconnect the FRDM-A-S32K312 board from the PC.
    2. Insert the DEVKIT-MOTORGD on top of the FRDM-A-S32K312 ensuring proper pin alignment.
    3. Plug-in the 12V power supply to the DEVKIT-MOTORGD.
    4. Reconnect the USB Type-C cable to the FRDM-A-S32K312
       
      K312_MC_KIT.png
    5. The RGB LED, User Buttons are on top side, Reset Button is on the left side, while the 12V power, Motor Phases and USB Type-C are on the right side. K312_MC_KIT_TOP_A.JPG

  • Open FreeMASTER s32k312_mc_pmsm_2sh_s32ct.pmpx stefanvlad_4-1766495406118.png
  • Press GO button to connect at 115200 baud.
  • In the App Control Tab, press On and set Speed Required to 1000 RPM:
    stefanvlad_5-1766495532076.png
  • Apply a small mechanical load to the motor (friction force to the motor shaft) and observe the iABC currents.
    stefanvlad_6-1766495622758.png

Conclusion

These steps conclude the Getting started with FRDM Automotive S32K312 using Model Based Design Toolbox guide.

For more details, refer to:

  • s32k312_mc_pmsm_2sh_s32ct_example_readme.html
  • The corresponding example_readme.html for the selected model.

Thank you for your time,

Stefan V.

タグ(1)
評価なし
バージョン履歴
最終更新日:
木曜日
更新者: