File Exchange

image thumbnail

NXP Support Package S32K1xx

This package represents the MATLAB Installer add-on for the FREE of cost, NXP’s Model-Based Design Toolboxes.

84 Downloads

Updated 23 Jul 2019

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 https://community.nxp.com/community/mbdt - 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, 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 (2019). NXP Support Package S32K1xx (https://www.mathworks.com/matlabcentral/fileexchange/64740-nxp-support-package-s32k1xx), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (24)

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\

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: https://community.nxp.com/message/1164457

Hope this helps!

Martin Rahf

Dear NXP Team,

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

BR

@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,
Daniel

kunpeng guo

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

zhang bo

very good !!!

Vlad Dascau

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,
Daniel

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.

https://community.nxp.com/thread/485588

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!
Daniel

.

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

NXP has a very good community support for this tool: https://community.nxp.com/community/mbdt
Many real examples supported by videos and sample code are available in the community along with two courses on PMSM (https://community.nxp.com/thread/464336) and BLDC (https://community.nxp.com/thread/450817) 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(GapContent.java:94)
at javax.swing.text.GapVector.resize(GapVector.java:214)
at javax.swing.text.GapVector.shiftEnd(GapVector.java:229)
at javax.swing.text.GapContent.shiftEnd(GapContent.java:345)
at javax.swing.text.GapVector.open(GapVector.java:201)
at javax.swing.text.GapVector.replace(GapVector.java:142)
at javax.swing.text.GapContent.insertString(GapContent.java:132)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:723)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
at javax.swing.text.DefaultEditorKit.read(DefaultEditorKit.java:273)
at com.mathworks.widgets.datamodel.TextFileBackingStore.readIntoDocument(TextFileBackingStore.java:206)
at com.mathworks.widgets.datamodel.TextFileBackingStore.loadDocumentFromFile(TextFileBackingStore.java:175)
at com.mathworks.widgets.datamodel.TextFileBackingStore.doLoad(TextFileBackingStore.java:247)
at com.mathworks.widgets.datamodel.TextFileBackingStore.doLoad(TextFileBackingStore.java:32)
at com.mathworks.widgets.datamodel.AbstractBackingStore.load(AbstractBackingStore.java:114)
at com.mathworks.mde.editor.EditorView.reload(EditorView.java:410)
at com.mathworks.mde.editor.EditorView.initSyntaxTextPane(EditorView.java:867)
at com.mathworks.mde.editor.EditorView.<init>(EditorView.java:222)
at com.mathworks.mde.editor.EditorView.<init>(EditorView.java:153)
at com.mathworks.mde.editor.EditorViewClient.init(EditorViewClient.java:228)
at com.mathworks.mde.editor.EditorViewClient.<init>(EditorViewClient.java:177)
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(MatlabEditorApplication.java:868)
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(MatlabEditorApplication.java:853)
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClientFromExistingFile(MatlabEditorApplication.java:845)
at com.mathworks.mde.editor.MatlabEditorApplication.access$500(MatlabEditorApplication.java:81)
at com.mathworks.mde.editor.MatlabEditorApplication$7.runWithOutput(MatlabEditorApplication.java:570)
at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(AWTUtilities.java:475)
at com.mathworks.jmi.AWTUtilities$WatchedRunnable.run(AWTUtilities.java:436)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)

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: https://community.nxp.com/thread/464336

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
- PWM
- 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: https://community.nxp.com/videos/7971

If you need more information check this lecture: https://community.nxp.com/thread/450817

Sorry for the typo: It is NOW available

NPX's Model-Based Design Toolbox for S32K1xx is not available.
Please check the details here: https://community.nxp.com/docs/DOC-335555
Check this video for installation and license generation: https://community.nxp.com/videos/7974

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

Updates

2.1.0

- update list of S32K Toolboxes
- update overview
- remove License Agreement to be com

2.0.2

Update MathWorks required products list

2.0.1

Re-upload the toolbox on File Exchange. Customers are reporting that toolbox is visible but once the Add button is clicked nothing happens: https://community.nxp.com/docs/DOC-341052#comment-55300

2.0.0

- add the option to download and install different release versions
- add verification options
- redesign the UI to be simpler
- update overview
- bug fixes

1.0.1.0

- add sign up button to create an NXP account directly from MATLAB web browser;
- minor text updates;
- update overview

MATLAB Release Compatibility
Created with R2019a
Compatible with R2017b to R2019a
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: NXP Support Package MPC57xx

Communities