NXP Model-Based Design Tools Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NXP Model-Based Design Tools Knowledge Base

Discussions

Sort by:
1.  Introduction The NXP i.MX RT1xxx Toolbox enables automatic code generation for peripherals and applications prototyping from MATLAB/Simulink for NXP’s i.MX RT 117x, 106x & 101x Series of crossover MCUs. The toolbox can be installed from Matlab add-ons page:   The novelty of this NXP toolbox is the integration with MCUX Configuration Tool for platform initialization. This configuration tool is being leveraged for pins settings, clock configuration and peripheral initialization. The toolbox is also integrated with the MCU SDK and will use the SDK API for code generation. This article details the steps to start building new models and deploy them on the i.MX RT106x, i.MX RT1010 & i.MX RT 117x MCU, showcasing also the integration with the MCUX Configuration Tool. 2.  Start creating your model Below are the steps to start creating a Simulink model that will be deployed on the i.MX RT1xxx boards. Step 1: Better to start on clean so first lets create folder to be used as workspace and switch MATLAB current folder to point to this workspace location:   Step 2: Create a Simulink Blank Model.   Step 3: Save and name your new model (E.g. mytest.slx). Step 4 : Choose the NXP IMXRT hardware board from the Model Settings in the MODELING tab.         Step 4.1: Open  Model Settings -> Hardware Implementation menu         Step 4.2: Select the NXP target from Hardware Board. This selection should match the             evaluation kit you plan to test the code for. After the selection is made, press the Apply button. After the target is set, the workspace will be populated with new files and folders: A file with extension <model_name>Config.mex – this is the file created with MCUX Configuration Tool that is used for pins, clock, and peripherals initialization. This configuration file will have enabled the peripherals that are supported by the toolbox. Starting from this, the user can change the default configuration for any of the peripheral instances (add new instances, disable instances, etc.) and also any of the configured pins.   A folder with naming pattern <model_name>Config -  this folder will have a structure that is similar to the MCUXpresso IDE projects, and will contain the SDK files that are needed to build the model and generate a binary application that will run on the board. The user can now add Simulink blocks in the model from the NXP i.MXRT1xxx Simulink library from Simulink Library Browser:   Choose the desired block to add to the model:   Alternatively, if the user will add in his/her model a peripheral block without configuring the target, a default one will be set that the user can change it afterwards.  3.  Modify default platform initializations and settings values As mentioned at the beginning of this article, the platform initialization, including pins, clock and peripherals settings is done using the MCUX Configuration Tool. As seen in the previous chapter, when a Simulink model is being created with one of the NXP IMXRT targets, the workspace will be populated with a file having the extension .mex – this is the configuration file that will be used in the initialization code of the platform. The user has the option to modify the default selections found in the .mex file. For this, open any peripheral block within the model and press the Configure button. This action will open the MCUX Configuration Tool.   From MCUX Configuration Tool, the user can change default settings of the peripherals – enable or disable instances, from Pins view, it can configure/update pins settings of the platform. After the user is done with configuration in MCUX Configuration Tool, he/she must go back in Simulink and press the Update button in the same block, for the changes to be visible in Simulink also. The new initialization settings, will be included in the Build Model step. The Toolbox will trigger a code generation starting from the .mex file. The generated files will be saved in the <model_name>Config folder, in board folder.   Note, that is not a prerequisite for the user to have MCUX Configuration Tool installed, the toolbox incorporates all the tools that are need for the user to create, configure,  build and deploy the model.  The default MCUX Configuration Tool used can be changed from Model Settings/Hardware Parameters / Tools Path, and the user can provide his/her own installation of the tool. Same approach is used with the SDK platform. The toolbox incorporates the release version of the SDK for the IMXRT1xxx targets. Also this path can be changed by the user, but it must consider possible integration issues of the toolbox with the user specified SDK.     4.  Deploy on NXP Hardware After the Simulink model is completed, follows the build and deployment of the model on the target board. Before Build and Deploy, the user must set the download method of the application. Step 1: Select the Download method from Hardware Implementation in Model Settings.   The default Download method (without the need for additional software and/or hardware probes) is OpenSDA. For this, the user must select the Drive on his/her machine where the OpenSDA firmware of the board is mapped after the NXP evaluation board is plugged in via USB. Step 2: Build & Deploy Model Step 3: After the code is generated and downloaded on the board a window will pop up and tell you to restart the evaluation board. Restart the board and then press OK. Congratulations! You have successfully created and deployed your Simulink model to the hardware.
View full article
Speed up development time with NXP Model-Based Design Toolboxes
View full article
Product Release Announcement EDGE PROCESSING  NXP Model-Based Design Toolbox for i.MX RT Crossover MCUs – version 1.2.0     The Edge Processing Tools Team at NXP Semiconductors is pleased to announce the release of the Model-Based Design Toolbox for i.MX RT 1xxx Series version 1.2.0. This release supports automatic code generation for peripherals and applications prototyping from MATLAB/Simulink for NXP’s i.MX RT 117x, 106x & 101x Series of crossover MCUs.   NXP Download Location https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=MCTB-EX   MATHWORKS Download Location https://www.mathworks.com/matlabcentral/fileexchange/81051-nxp-support-package-imxrt1xxx   Version 1.2.0 Release Content Automatic C code generation based on MCUXpresso SDK 2.9.1/2.9.2 drivers and MCUXpresso Configuration Tools 9.0 initializations from MATLAB®/Simulink® for: i.MX RT 1176: MIMXRT1176DVMAA,MIMXRT1176AVM8A,MIMXRT1176CVM8A i.MX RT 1175: MIMXRT1175DVMAA,MIMXRT1175AVM8A,MIMXRT1175CVM8A i.MX RT 1173: MIMXRT1173CVM8A i.MX RT 1172: MIMXRT1172DVMAA,MIMXRT1172AVM8A,MIMXRT1172CVM8A i.MX RT 1171: MIMXRT1171DVMAA,MIMXRT1171AVM8A,MIMXRT1171CVM8A i.MX RT 1061: MIMXRT1061CVJ5A,MIMXRT1061CVL5A,MIMXRT1061DVJ6A,MIMXRT1061DVL6A i.MX RT 1062: MIMXRT1062CVJ5A,MIMXRT1062CVL5A,MIMXRT1062DVJ6A,MIMXRT1062DVL6A i.MX RT 1064: MIMXRT1064CVJ5A,MIMXRT1064CVL5A,MIMXRT1064DVJ6A,MIMXRT1064DVL6A i.MX RT 1011: MIMXRT1011CAE4A,MIMXRT1011DAE5A   Multiple options for configuration of MCU packages, Build Toolchain and embedded Target Connections are available via Simulink Model Configuration UI       Multiple MCU peripherals and Drivers supported. The following subsystems highlighted in red as supported in Simulink environments in various forms: blocks, files, options i.MX RT 117x derivatives   i.MX RT 106x derivatives i.MX RT 101x derivatives     Basic and Advanced Simulink Block configuration modes via MCUXpresso Configuration Tools 9.0 UIs for Pins, Clocks, and Peripherals       MATLAB/Simulink versions 2019a – 2021b are supported for Design, Simulation, Code Generation, and Deployment of applications on i.MX RT 117x,106x & 101x Series. Other i.MX RT devices will be supported in future versions of the toolbox. Support for Software-in-Loop (SiL), Processor-in-Loop (PiL), and External Mode; RTCESL – Real-Time Control Embedded Software Motor Control and Power Conversion Libraries (limited support designed for Motor Control applications). A future update will enhance the number of functionalities supported by Simulink.     Simulink Example library with more than 190 models to showcase various functionalities:   Integrated PMSM Motor Control Sensor/Sensor-less application for both IMXRT1060-EVK and IMXRT1170-EVK:     Target Applications with MATLAB/Simulink This release of the Model-Based Design Toolbox can be used to design, build, and test applications from multiple domains: INDUSTRIAL AC Meters Motion Control Robotics HMI SMART CITY/HOME Video Surveillance Identification Appliances Speakers   AUTOMOTIVE HVAC ECU     Target Audience This release is intended for technology demonstration, evaluation purposes, and prototyping for i.MX RT 1xxx MCUs and their corresponding Evaluation Boards: EVK-MIMXRT1170 EVK-MIMXRT1060 EVK-MIMXRT1064 EVK-MIMXRT1010   Useful Resources Examples, Training, and Support: https://community.nxp.com/community/mbdt Technical by System Tools: https://web.microsoftstream.com/channel/618ab630-c8da-4fa8-ade8-5aa70a353124    
View full article
Model-Based Design Toolbox supporting i.MX RT Crossover MCU. System modeling, simulations, automatic code generation, validation, and verification MATLAB & Simulink workflows are now available on the i.MX RT microcontroller by reusing MCUXpresso ecosystem: MCUXpresso SDK MCUXpresso Configuration Tool MCUXpresso IDE,GCC
View full article
Model-Based Design Toolbox supporting Kinetis-V Series. System modeling, simulations, automatic code generation, validation, and verification MATLAB & Simulink workflows are now available on the Kinetis V microcontrollers by reusing MCUXpresso ecosystem: MCUXpresso SDK MCUXpresso Configuration Tool MCUXpresso IDE,GCC
View full article
      Product Release Announcement Automotive Processing   NXP Model-Based Design Toolbox   for S12ZVMx – version 1.4.0     Austin, Texas, USA September 9, 2020 The Automotive Processing, Model-Based Design Tools Team at NXP Semiconductors, is pleased to announce the release of the Model-Based Design Toolbox for S12ZVMx version 1.4.0. This release supports automatic code generation for S12ZVM peripherals and applications prototyping from MATLAB/Simulink for NXP S12ZVMx Automotive Microprocessors. This new release adds extended MATLAB version support (R2015a-R2020a), integrates with AMMCLib v1.1.21, is compatible with MathWorks Automotive Advisory Board checks, adds over 50 new examples and more.   FlexNet Location: https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=MCTB-EX   Activation link: https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=MCTB-EX   Technical Support: NXP Model-Based Design Toolbox for S12ZVMx issues are tracked through NXP Model-Based Design Tools Community space. https://community.nxp.com/community/mbdt   Release Content Automatic C code generation from MATLAB® for NXP S12ZVMx derivatives: S12ZVM 32/L31/16: MC9S12ZVM16 MC9S12ZVML31 MC9S12ZVM32 S12ZVML/C 128/64/32: MC9S12ZVML32 MC9S12ZVML64 MC9S12ZVMC64 MC9S12ZVML128 MC9S12ZVMC128 S12ZVMC256: MC9S12ZVMC256   Integrates the Automotive Math and Motor Control Library release 1.1.21: All functions in the Automotive Math and Motor Control Functions Library v1.1.21 are supported as blocks for simulation and embedded target code generation for: Bit Accurate Model for 16-bit fixed-point implementation Bit Accurate Model for 32-bit fixed-point implementation Bit Accurate Model for floating-point single precision implementation             Extended support for MATLAB versions We extended support for our toolbox to cover a wider range of MATLAB releases – starting from R2015a and going up to R2020a. This way we want to avoid locking out users that have constraints regarding MATLAB versions. Motor control examples We have added new motor control examples – BLDC (closed loop) and PMSM (closed loop, sensorless):   MAAB Checks (MathWorks Automotive Advisory Board) The toolbox is compatible with MathWorks Automotive Advisory Board checks – reports can be generated from Model Advisor:   Updated examples: We have added over 50 new examples, including: Motor control (both BLDC and PMSM) AMMCLib GDU (Gate Drive Unit) Profiler For more details, features and how to use the new functionalities, please refer to the Release Notes document attached.   MATLAB® Integration The NXP Model-Based Design Toolbox extends the MATLAB® and Simulink® experience by allowing customers to evaluate and use NXP’s S12ZVMx MCUs and evaluation boards solutions out-of-the-box with: NXP Support Package for S12ZVMx  Online Installer Guide Add-on allows users to install NXP solution directly from the Mathwork’s website or directly from MATLAB IDE. The Support Package provide a step-by-step guide for installation and verification. NXP Model-Based Design Toolbox for S12ZVM version 1.4.0 is fully integrated with MATLAB® environment in terms of installation: Target Audience This release (1.4.0) is intended for technology demonstration, evaluation purposes and prototyping S12ZVMx MCUs and Evaluation Boards.   Useful Resources Examples, Trainings and Support: https://community.nxp.com/community/mbdt                                                    
View full article
This article details the TPL communication setup between S32K1xx boards and MC3377xBTPL Battery Cell Controllers.  It covers both hardware and software setup for the Battery Management System models designed using Model-Based Design Toolbox for battery packs of more than 14 cells in series.  At the end of this article, the user will be able to setup the Battery Cell Controller hardware and to design a Simulink model that reads the cell and pack voltages, current, temperatures and faults status. The measured values will be displayed on the host PC using FreeMaster. 
View full article
In the following articles, we are going to detail the capabilities of our BMS blocks and how to use them on the NXP battery cell controller DevKits.
View full article
Having fun with MBDT for MPC57xx 3.1.0 and MPC5744P for Xmas tree by controlling the lights and sounds
View full article
This video shows the overall motor control application developed with Model Based Design Toolbox. We are going to assemble all the blocks developed throughout this course and we will have the motor running under Speed Controller supervision. We also discuss about the FreeMASTER and you can easily create nice control panels for the applications and how you can validate the Speed Controller and overall Motor Control application. We discuss about: - Speed Controller implementation in Simulink for real time systems; - Motor and Inverter protection for over-current, over- and under-voltage; - FreeMASTER control panel using HTML and Java Script; - Various tests on the MPC5744P DevKit and MotorGD DevKit;   NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article
Short unedited video - showing the Model Based Design at work on our custom demo platform created with the scope of supporting various scenarios testing.
View full article
Check this short video to see the cool stuff you can do with an S32K144 DevKit. NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article
In this video we show the hall pattern identification procedure that can be applied to any motor in case you have no datasheet available. We will read the hall sensors outputs via the microprocessor and save the information for later use.   We show: - How to prepare the Hardware setup - How to go over each identification table - row by row - to apply DC voltage and rotate the rotor in different sectors 360 degrees. NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article
This video is part of the https://community.nxp.com/thread/467938  Workshop module and shows how to implement a simple V/F (V/Hz) scalar control to spin the PMSM in open loop using Space Vector Modulation and trapezoidal speed profile.
View full article
In this video we discuss about how the motor phase commutation works. This is an essential topic to understand how the motor rotates based on 6-step commutation technique.   We discuss about: - How to build the commutation table based on hall pattern identification  - How to control the PWM sequence to implement a 6-step/trapezoidal commutation NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article
This video is part of the Module 7: Torque Control  Workshop module and shows how to implement a FOC and control the PMSM torque and flux using standard PI controllers. This method is used to spin the PMSM in open loop using Space Vector Modulation. The video shows how to implement a control system with two control loops: FAST and SLOW
View full article
In this video we implement Simulink models for reading the hall sensors directly via GPIO or based on Hall transitions interrupts via eTimer Capture.   We discuss about: - How to build simple hall reading application using the available MBD Toolbox GPIO blocks  - How to enhance this simple model by adding interrupt service routines capabilities to read the hall sensors only when there is a transitions - How to count the number of hall transitions - How to validate the applications with FreeMASTER NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article
In this video we talk about  how hall sensors works, how the commutation sectors are defined based on hall transitions and how can we identify the hall patterns when no datasheet is available.   We discuss about: - Hall sensors - Commutation sectors  - Hall sensors alignment procedure - Hall sensors electronic circuit used on MotorGD and MPC5744P devkits NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article
In this video we discuss about how to use Software-in-the-Loop (SIL) approach to generate the C-code for the first time and validate the algorithm at the concept level.   We discuss about: - What is SIL, When to use it and What is recommended for;  - How to convert any Simulink generic algorithm to run with SIL support using the Model Based Design Toolbox; - SIL Reference models;  NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article
In this video we talk about  different motors classification, BLDC motor modelling and how to control the BLDC rotor movement.   We discuss about: - How most common motors operates - Electro-mechanical equations of BLDC motor - How BLDC works - Practical implementation of commutation sequence - BLDC vs PMSM comparison NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article