File Exchange

image thumbnail

NXP Support Package S32K1xx

version 2.2.0 (1.01 MB) by NXP Model-Based Design Toolbox Team
This package represents the MATLAB Installer add-on for the FREE of cost, NXP’s Model-Based Design Toolboxes.


Updated 21 Jul 2020

View Version History

View License

Note: It is recommended to uninstall and delete all files/folder of the older versions of NXP Model-Based Design S32K1xx Toolbox before installing the new versions.

The steps to install NXP Model-Based Design Toolbox for S32K1xx Automotive Microprocessors family:
1. Go to Add-On Manager in MATLAB and select the NXP Support Package S32K1xx toolbox to install the Installer Guide.
2. Select Open Folder option to navigate to the installation path.
3. Run NXP_Support_Package_S32K1xx script and follow the next quick steps as guided by the installer:
3.1 Create an account with NXP (toolbox is for free but account is requested to download the tool, generate the free license and access training & support on NXP Model Based Design Toolbox Community).
3.2. Download NXP Model-Based Design Toolbox for S32K1xx MLTBX file
3.3. Install the toolbox
3.4. Verify the correct installation
3.5. Generate a free of charge license
3.6. Activate the toolbox
3.7 Verify the license activation

The NXP's Model-Based Design Toolbox is a quick solution for testing and rapid prototyping applications on top of NXP MCUs.
It provides an integrated development environment and tool chain support for configuring and generating applications (including initialization routines and device drivers) to execute complex applications (e.g.: motor control algorithms, communication protocols CAN, SPI, I2C, UART, FlexIO and sensor based applications).

This toolbox includes integrated Simulink embedded target for NXP S32K1xx MCUs, peripheral device blocks and drivers, the Math and Motor Control Library, GCC compiler and additional tools for debugging and real time data visualization . It provides built-in support for Software and Processor-in-the-Loop (SIL and PIL) simulations to enable fast prototyping, verification and validation on the real target for the algorithms developed in MATLAB environment.

Visit - for examples and support.

S32K1xx Model-Based Design Toolbox Main Features:
- Generate code for standalone application with direct download to target support
- AUTOSAR Application Layer PIL simulation for S32K1xx
- Optimized motor control library blocks including Park/Clarke transforms, digital filters, and general functions
- Core&System blocks for CAN, SPI, I2C, FlexIO, UART, PIT, LPTMR, FTM, PWM, CSEC, WDOG, PMC, PDB, ADC, CMP, DMA, RTC
- System Basis Chips, Battery Management System, Motor and Solenoid Drivers support for NXP analogue devices
- On-target profiling of functions and tasks
- Data acquisition and calibration using FreeMASTER tool
- External Mode support
- Boot loader utility for programming application in FLASH or SRAM via UART or CAN
- Seamless integration with embedded coder including SIL and PIL test
- Ready to run examples for all supported peripherals and Simulink Blocks

Cite As

NXP Model-Based Design Toolbox Team (2021). NXP Support Package S32K1xx (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (25)

Clayd Anthoni

Wealth Health Love Soul

Hi Vincenzo,

Thanks for your the feedback.
In regards with the PWM Dithering, we will consider such feature for the future releases.

Nonetheless, if you need such functionality now, you have 2 options:
#1: use the MBDT Simulink Write & Read Register Blocks to write directly the appropriate PWM registers that controls the dithering functions. You can find these blocks in the S32K1xx Core, System, Peripherals and Utilites/Utility Blocks Simulink Library

#2: use Simulink Custom Code Blocks to call the NXP SDK dedicated function
FTM_DRV_UpdatePwmPeriodDither(uint32_t instance, uint8_t newModFracVal, bool softwareTrigger). The function implementation can be found in \src\S32_Platform_SDK\platform\drivers\src\ftm\

Vincenzo Salvo

Please add PWM dithering support. Great job!

Hi Martin,

There're not so many things to change to have it running on S32K in order to create a tutorial.
There is a small chapter 4.1 in the Release Notes documents. You can find it in the help folder of the toolbox.

Here is a thread on NXP community that might be helpful:

Hope this helps!

Martin Rahf

Dear NXP Team,

is there a tutorial on how to configure the model to run it in external mode?


@kunpeng guo
The S32K118 and S32K116 support will be added on the next release of this toolbox - targeted for July 22nd
You will get the same capabilities as for the currently supported S32K14x derivatives, plus a few new features requested by users like you in the past year. Stay tuned ... soon you will have it :-)

Best regards,

kunpeng guo

Hi ,Dear NXP Model based design toolbox team,why the most examples don't support S32K118?

zhang bo

very good !!!

Ionescu Ionescu

Iulian Bulancea

Vlad Dascau

Gabriela Catana

Hi Pritam,

Please run the NXP_Support_Package_S32K1xx.m and NOT the *.fig file.
Or evem simpler, once you have the toolbox installed as Add-on, you can simply type in Matlab command window the command: NXP_Support_Package_S32K1xx
This will start the installer correctly.

Let us know if this works for you.
Best regards,

pritam patil

Dear NXP Model based design toolbox team,

Please go through this link.
I have posted the issue on NXP website with clear description and images are attached to the same to make it more clear.

Please resolve the same ASAP.

Hi Pritam,

In regards with your comment (for some unknown reason your message is not listed here):

"I followed all steps given in the video to install support package from add on.
I successfully downloaded the "MBDToolbox_S32K1xx_2018.R1_20180723" but when i tried to install it by clicking on "Install MTLBX file as add on", it gives following error in command window.

Dot indexing is not supported for variables of this type."

ANS: You need to pay attention when you download the MLTBX file. Depending on the browser used, the file might get corrupted during download and save in your PC as a zip file.

To avoid such behavior, it is advisable to use checkbox near the MLTBX file you wish to download and use the "Download Selected Files" button to start the download. That should eliminate potential file corruption.

Let us know if this works for you.
Thank you!

pritam patil


@gang cheng, please watch the toolbox installation tutorial here: and if the problem persists, start a thread on the NXP's community.

Daniel Scurtu

NXP has a very good community support for this tool:
Many real examples supported by videos and sample code are available in the community along with two courses on PMSM ( and BLDC ( control.

gang cheng

How could I install the toolbox with Matlab2017b?

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at javax.swing.text.GapContent.allocateArray(
at javax.swing.text.GapVector.resize(
at javax.swing.text.GapVector.shiftEnd(
at javax.swing.text.GapContent.shiftEnd(
at javax.swing.text.GapVector.replace(
at javax.swing.text.GapContent.insertString(
at javax.swing.text.AbstractDocument.handleInsertString(
at javax.swing.text.AbstractDocument.insertString(
at javax.swing.text.PlainDocument.insertString(
at com.mathworks.widgets.datamodel.TextFileBackingStore.readIntoDocument(
at com.mathworks.widgets.datamodel.TextFileBackingStore.loadDocumentFromFile(
at com.mathworks.widgets.datamodel.TextFileBackingStore.doLoad(
at com.mathworks.widgets.datamodel.TextFileBackingStore.doLoad(
at com.mathworks.widgets.datamodel.AbstractBackingStore.load(
at com.mathworks.mde.editor.EditorView.reload(
at com.mathworks.mde.editor.EditorView.initSyntaxTextPane(
at com.mathworks.mde.editor.EditorView.<init>(
at com.mathworks.mde.editor.EditorView.<init>(
at com.mathworks.mde.editor.EditorViewClient.init(
at com.mathworks.mde.editor.EditorViewClient.<init>(
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClientFromExistingFile(
at com.mathworks.mde.editor.MatlabEditorApplication.access$500(
at com.mathworks.mde.editor.MatlabEditorApplication$7.runWithOutput(
at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(
at com.mathworks.jmi.AWTUtilities$
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$500(

Are you interested in PMSM control system topics ? We have started a workshop that explains how to prototype the entire application directly from MATLAB/Simulink on a 3-Phase PMSM with NXP's S32K platform.

The workshop material can be found here:

BLDC Closed Loop Speed Control example with NXP S32K144, MotorGD and MATLAB Simulink.
It demonstrate how to:
- read the speed request from ADC or online via FreeMASTER
- read hall sensors based on GPIO interrupt
- PI speed controller
- Speed Estimator based on Hall Sensors transitions
- Commutation table
- Generate C code
- Build the C with GCC and Download to the target

Check this short video to see how easy it is with Model-Based Design Toolbox from NXP:

If you need more information check this lecture:

Sorry for the typo: It is NOW available

NPX's Model-Based Design Toolbox for S32K1xx is not available.
Please check the details here:
Check this video for installation and license generation:

NXP's Model-Based Design Toolbox for S32K1xx Automotive Microprocessors Family release date is October 16th 2017

MATLAB Release Compatibility
Created with R2020a
Compatible with R2016a to R2020a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!