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:
Introduction The aim of this article is to help any user of Model-Based Design to enjoy his/her own custom C libraries or to call any C drivers or components that are not yet supported by NXP's toolbox. This uses the Matlab Coder and requires to include only a MATLAB function block in which the model will call a C function. For more details, you can have a look on the Mathworks Help Center at Integrate C Code Using the MATLAB Function Block- MATLAB & Simulink.   BMS System In my opinion, the greatest way to learn something is "learning-by-doing". So in this tutorial, we will add support for the BMS System in Model-Based Design for S32K. You are already familiar with our toolbox supported boards so let's talk a bit about this BMS system. NXP has a great cell controller IC designed for automotive and industrial applications, more details can be found here MC33772B | 6-Channel Li-ion Battery Cell Controller IC | NXP. For this tutorial, we will use the FRDM33772BSPIEVB | MC33772 SPI EVB | NXP  board, which handles up to 6 battery cells and connects to many NXP controllers via SPI. This is also compatible with the S32K family with some minor jumpers adjustments, but all the instructions can be found on the product page.  So the goal of this project is to be able to read the cell voltages from an MBDT Simulink model. Main Steps In order to include custom code, the user should follow these steps: 1. Add the directory path from which the Simulink will include the directories under Settings > Code Generation > Custom code > Include directories. 2. Insert a Matlab Function block in the Simulink model. This will be used for initialization. The goal here is to include the c headers in the generated code files. This requires to declare coder constant using the coder.const function. That has to be updated in the Build info using coder.updateBuildInfo . Here, the headers and the sources has to be included following this template: %% Adding  header information to the generated code coder.cinclude('driver.h'); %% Adding source files to MakeFile coder.updateBuildInfo( 'addSourceFiles', 'driver.c' ); This operation has to be performed only once. 3. When the user needs to call a custom function from the Simulink, the user must add a Matlab Function block, declare the inputs and outputs as required. Inside the Matlab Function code, the coder.ceval function must be called using the parameters provided as inputs. For example, if the user needs to call a C function called BMS_Init with no parameters, the following line of code will perform that: %% Initializing the BMS driver coder.ceval('BMS_Init'); If the user needs to provide an input parameter, then it will be provided either directly, either using coder.ref  as an argument or using coder.rref if the reference to that value has to be passed. function BMS_Init(parameter)    if( coder.target( 'Rtw' ) )          coder.ceval('BCC_Init', parameter);          coder.ceval('BCC_Init', coder.ref(parameter));     end end This will generate the following code: BCC_Init(true); BCC_Init(&parameter); But if the code is more complex, the easiest way is to declare a wrapper function and to call the wrapper using the coder.ceval. BMS Support This scenario fits on most of our users requirements: to use a piece of code unsupported yet on MBDT. For this IC, NXP already provides the KIT3377x_DRV driver together with an example in S32DS which measures cell voltages and displays it using FreeMaster.   We created an S32K project for the S32K144 board, added the FreeMaster block and an LPSPI Instance according to the settings and the pin requirements by the MC33772 board. The Initialize variable will only be used to call the initialization sequence for the BMS. Now, as we described in the previous chapter, we declared a folder "bcc" that contains the required drivers and some wrappers, also inserted in the Configuration parameters. The initialize function contains a Matlab Call Function. This one includes all the steps described at the second point. What should be noticed here is the check from line 7. All that cinclude code will be called only when the coder.target is Rtw. If the user adds an else condition, that code will be called only when simulate. Now, MBD_MCC_Init is wrapper designed to perform all the initialization steps from the driver. It was easier like this. The MC33772 has been initialized so whenever the user needs the values, he/she must add a Matlab Function block that will provide the values to the model.   The code behind this block has been attached in the next image. The output values from the getCellMeasurements are provided as outputs and inside the get_cellVoltages, it will call the C updateMeasurements function using the coder.wref function. Running BMS Now, after we solved some bugs during code generation   and had successfully built the code, we can run the generated code on the board. The following screenshot represents the Voltages and a variable Current measurement converted by the MC33772.   Conclusions In this article, we presented a method of getting the needed C libraries/drivers/code in the Simulink model using custom code and Matlab Coder. We provided a short step list and a more detailed tutorial for an actual application, a Battery Management System, using NXP hardware. This approach can be successfully achieved either if we use the S32K or MPC Toolboxes. Later edit (1): As requested, I attached the model and the FreeMaster project for achieving the measurements from the MC3377xB (FRDM3377xBSPIEVB) with the S32K144 board using Model-Based Design and custom code. In order to run it, you must follow the steps: 1. Download and unzip the archive there is a bcc folder inside, next to the s32k_mc3377x.mdl. 2. Download the SDK (Embedded SW: MC33771/MC33772 SW Driver | NXP )  BCC SW Driver package for MC33771B/MC33772B (Lite version) and from the SDK folder bcc copy all the files to the bcc folder of the model.  I can not add the SDK driver in the archive since for the BCC SDK there is an agreement that you must read before download. 3. Open the s32k_mc3377x model, go to the BMS_Init function and replace the line 4 string with the full path of the model bcc location folder. 4. After this, the code should be generated and run successfully. Later edit (2): If you are interested to get the solution alongside the instruction on how to connect the MC3377xB and the MPC5744P via Model-Based Design Toolbox, please have a look at this question here: MPC5744P &MC33771B Configuration Later edit (3): As many of you requested, we've added the example code for the S32K144 & FRDMDUALMC33664 to communicate with the MC33771C. See the attached archive. bms_s32k_frdm2_771c_tpl_cc. The bcc driver for the MC33771C is different than the one for the MC33771B and you have to download the missing files from here.   Happy hacking! Marius
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
      Product Release Announcement Automotive Microcontrollers and Processors NXP Model-Based Design Toolbox for MPC57xx – version 3.0.0     Austin, Texas, USA February 18, 2019 The Automotive Microcontrollers and Processors’ Model-Based Design Tools Team at NXP Semiconductors, is pleased to announce the release of the Model-Based Design Toolbox for MPC57xx version 3.0.0. This release supports automatic code generation for peripherals and applications prototyping from MATLAB/Simulink for NXP’s MPC574xB/C/G/P series.   FlexNet Location https://nxp.flexnetoperations.com/control/frse/download?element=10769197   Activation link https://nxp.flexnetoperations.com/control/frse/download?element=10769197   Technical Support NXP Model-Based Design Toolbox for MPC57xx issues are tracked through NXP Model-Based Design Tools Community space. https://community.nxp.com/community/mbdt   Release Content Automatic C code generation based on PA SDK 2.0.0 RTM drivers from MATLAB®/Simulink® for NXP MPC574xB/C/G/P derivatives: MPC5744B, MPC5745B, MPC5746B                                                (*new) MPC5744C, MPC5745C, MPC5746C, MPC5747C, MPC5748C      (*new) MPC5746G, MPC5747G, MPC5748G                                               (*new) MPC5741P, MPC5742P, MPC5743P, MPC5744P                             (*upd) Multiple options for MCU packages, Build Toolchains and embedded Target Connections are available via Model-Based Design Toolbox MPC574x Simulink main configuration block Enhanced user experience with a complete redesign of all Simulink Library blocks compared with v.2.0.0 to support: Similar look & feel with Model-Based Design Toolbox for S32K14x Series Basic and Advanced configurations modes based on PA SDK 2.0.0 RTM standard API Integration with MathWorks SW environment: Installer, Help and online Add-on Manager for distribution and installation MPC574xP Ultra-Reliable MCU for Automotive & Industrial Safety Applications and MPC574xB/C/G Ultra-Reliable MCUs for Automotive & Industrial Control and summary of the peripherals coverage by Model-Based Design version 3.0.0 is highlighted in red:   Redesigned the main Simulink Embedded Target library for supporting future additions for other MPC57xx derivatives, Automotive Math and Motor Control Libraries and MPC57xx Examples:   Implement communication port auto discovery to allow easy configuration for downloading the generated code to NXP targets and new Diagnostic options to helps with model creation or migration. 100% MPC574x supported peripheral coverage with examples. Currently there are 102 examples available as part of the toolbox that exercise all the functionalities supported. The examples are grouped into two categories: MPC574x Generic examples that can be run on any of the MPC574x Evaluation Boards MPC574x Targeted examples that are configured for a single target (e.g.: might contains peripherals that are available only on a specific target) Motor Control examples for PMSM and BLDC based on FOC and 6-step commutation with Closed and Open loop control Enable MATLAB code profiler for NXP targets for measuring the function execution time using Software -in-the-Loop or Processor-in-the-Loop modes For more details, features and how to use the new functionalities, please refer to the Release Notes and Quick Start Guide documents attached.   MATLAB® Integration The NXP Model-Based Design Toolbox extends the MATLAB® and Simulink® experience by allowing customers to evaluate and use NXP’s MPC57xx MCUs and evaluation boards solutions out-of-the-box with: NXP Support Package for MPC57xx 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’s Model-Based Design Toolbox for MPC57xx version 3.0.0 is fully integrated with MATLAB® environment in terms of installation, documentation, help and examples;   Target Audience This release (v.3.0.0) is intended for technology demonstration, evaluation purposes and prototyping for MPC574xB/C/G/P MCUs and their corresponding Evaluation Boards: DEVKIT-MPC5744P PCB RevX1 SCH RevB DEVKIT-MPC5748G PCB RevA SCH RevB Daughter Card MPC574XG-256DS RevB Daughter Card X-MPC574XG-324DS RevA Daughter Card MPC5744P-257DS RevB1 Daughter Card SPC5746CSK1MKU6 Motherboard X-MPC574XG-MB RevD Motherboard MPC57XX RevC        
View full article
      Product Release Announcement Automotive Microcontrollers and Processors NXP Model-Based Design Toolbox for S32K1xx - 2018.R1     Austin, Texas, USA July 23, 2018 The Automotive Microcontrollers and Processors’ Model-Based Design Tools Team at NXP Semiconductors, is pleased to announce the release of the Model-Based Design Toolbox for S32K1xx 2018.R1. This release supports automatic code generation for S32K1xx peripherals and applications prototyping from MATLAB/Simulink for NXP’s S32K1xx Automotive Microprocessors.   FlexNet Location: https://nxp.flexnetoperations.com/control/frse/download?element=10221477   Activation link https://nxp.flexnetoperations.com/control/frse/download?element=10221477     Technical Support NXP Model-Based Design Toolbox for S32K1xx issues are tracked through NXP Model-Based Design Tools Community space. https://community.nxp.com/community/mbdt   Release Content Automatic C code generation based on S32K SDK 2.0.0 RTM drivers from MATLAB® for NXP all S32K14x derivatives: S32K142 MCU Packages with 16/32KB SRAM (*updated) S32K144 MCU Packages with 48/64KB SRAM (*updated) S32K146 MCU Packages with 128KB SRAM (*new) S32K148 MCU Packages with 192/256KB SRAM (*new) Multiple options for packages and clock frequencies are available via Model-Based Design Toolbox S32K Simulink main configuration block New S32K peripheral support added for DMA, RTC, Registers were added to extend the existing toolbox capabilities. The 2018.R1 peripheral coverage for each of the S32K14x derivatives is shown below: Redesigned the FlexTimer configuration block to support additional features for PWM generation and triggering events Added support for System Basis Chip (SBC) UJA116x configuration Redesigned the main Simulink Embedded Target library for supporting future additions of other S32K derivatives and External Devices for S32K products Implement communication port auto discovery to allow easy configuration for downloading the generated code to NXP targets and new Diagnostic options to helps with model creation or migration. 100% S32K supported peripheral coverage with examples. Currently there 115 examples available as part of the toolbox that exercise all the functionalities supported Add support for External Mode that enables Simulink on the host computer to communicate with the deployed model on NXP hardware board during runtime Enable MATLAB code profiler for NXP targets for measuring the function execution time using Processor-in-the-Loop mode   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 S32K1xx MCUs and evaluation boards solutions out-of-the-box with: NXP Support Package for S32K1xx 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 S32K1xx 2018.R1 is fully integrated with MATLAB® environment in terms of installation, documentation, help and examples;   Target Audience This release (2018.R1) is intended for technology demonstration, evaluation purposes and prototyping for S32K142, S32K144, S32K146 and S32K148 MCUs and Evaluation Boards  
View full article
This video shows how: Install the Support Package Add-On Use of Installer Wizard Toolbox package download & install License generation and setup
View full article
      Product Release Announcement Automotive Processing NXP Model-Based Design Toolbox for S32K1xx – version 4.2.0     Austin, Texas, USA July 20, 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 S32K1xx version 4.2.0. This release supports automatic code generation for S32K1xx peripherals and applications prototyping from MATLAB/Simulink for NXP S32K1xx Automotive Microprocessors. This new release adds support for S32K142W and S32K144W, Battery Management Systems (support for MC3377xB), EEEPROM R/W operations, integration with Simulink Motor Control Blockset and Battery Management System Toolbox, new community requested features (like I2C multi transfer block, S32Design Studio importer for Simulink models, LIN CRC configuration) and many other various new functionalities to help customers with rapid prototyping with NXP S32K microcontrollers.   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 S32K1xx issues are tracked through NXP Model-Based Design Tools Community space. https://community.nxp.com/community/mbdt     Release Content Automatic C code generation based on S32K SDK 4.0.0 RTM drivers from MATLAB® for NXP all S32K1xx derivatives: S32K142W MCU Packages with 48/64 LQFP (*new) S32K144W MCU Packages with 48/64 LQFP (*new) S32K116 MCU Packages with 32QFN and 48LQFP (*updated) S32K118 MCU Packages with 48/64 LQFP (*updated) S32K142 MCU Packages with 48/64/100LQFP (*updated) S32K144 MCU Packages with 48/64/100LQFP and 100BGA (*updated) S32K146 MCU Packages with 64/100/144LQFP and 100BGA (*updated) S32K148 MCU Packages with 144/176LQFP and 100BGA/QFP (*updated) Multiple options for packages and clock frequencies are available via Model-Based Design Toolbox S32K Simulink main configuration block   Battery Management System (BMS) support for MC3377xB – examples, documentation and FreeMASTER UI are available Special Simulink Blocks have been added to simplify the way a user can initialize such a controller, read vital parameters (like cell voltage, stack voltage, temperature, current) and manage the whole system. The entire suite of blocks is easily integrated within the new Battery Management Toolbox from Mathworks, so users can leverage these algorithms on top of our blocks. Integrates the Automotive Math and Motor Control Library release 1.1.21 for: S32K11x based on ARM M0+ cores; S32K14x based on ARM M4F cores;   Multiple S32K1xx peripheral support. The peripheral coverage for each of the S32K1xx derivatives is shown below:        S32K116      S32K118        S32K142        S32K144          S32K146      S32K148   Added support for EEEPROM These blocks allow users to make read/write operations to non-volatile memory (useful in applications that require parameters/states to be saved even when powered-off):   Updated Motor Control support New examples added for the following parts: -     MCSXTE2BK142 -     S32K11XEVBM -     XS32K14WEVB Additionally, Motor Control blocks can be easily integrated with the Motor Control Blockset from Mathworks, so users can leverage these algorithms on top of our existing blocks.     Extended support for MATLAB versions We extended support for our toolbox to cover a wider range of MATLAB releases – starting from R2016a and going up to R2020a. This way we want to avoid locking out users that have constraints regarding MATLAB versions.   New community-requested features In our efforts to make  NXP’s Model-Based Design Toolbox for S32K1xx version 4.2.0 fit the needs of the users, we have added the following requested features/updates: -     Added new I2C multi transfer block -     S32 Design Studio importer functionality extended for referenced models projects -     Updated LIN blocks to add CRC type configuration -     Updated ADC blocks to enable auto-calibration   100% S32K1xx supported peripheral coverage with examples. Approximatively 300 examples available as part of the toolbox that exercise all the functionalities supported   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 S32K1xx MCUs and evaluation boards solutions out-of-the-box with: NXP Support Package for S32K1xx 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 S32K1xx version 4.2.0 is fully integrated with MATLAB® environment in terms of installation, documentation, help and examples:   Target Audience This release (4.2.0) is intended for technology demonstration, evaluation purposes and prototyping for S32K116, S32K118, S32K142, S32K144, S32K146, S32K148, S32K142W and S32K144W MCUs and Evaluation Boards.   Useful Resources Examples, Trainings and Support: https://community.nxp.com/community/mbdt                                            
View full article
This page summarizes all Model-Based Design Toolbox tutorials and articles related to S32K3xx Product Family.
View full article
        Product Release Announcement Automotive Microcontrollers and Processors Model-Based Design Toolbox v3.0.0 2017.R1         October 16, 2017 Model-Based Design Toolbox v3.0.0 for NXP’s S32K1xx Automotive Microprocessors    Main Features: Embedded target support for S32K144 and S32K142 MCUs with example for S32K144EVB-Q100 and S32K142EVB-Q100 evaluation boards Online installer available directly from MathWorks website Add-On Explorer. Installation Guide step-by-step application to provide an improved user experience for toolbox download, installation and license generation from NXP website   Documentation, help and S32K1xx examples fully integrated into MATLAB development environment for ease of use and fast prototyping New peripherals support for: Watchdog (WDOG) Power Management Controller (PMC) Low Power Timer (LPTMR) Cryptographic Services Engine (CSEC) FlexIO for supporting I2C, SPI and UART communications  Add new functionalities for: CAN with Flexible Data Rate (CAN-FD) CAN with Rx FIFO CAN Pretended Networking Blocking or Non-Blocking transmit/receive modes for Communication blocks FreeMASTER configuration block for embedded driver Support for SRAM application download  Enhance the support for all existing Simulink blocks to support basic and advanced mode of peripheral configuration Support for MATLAB 2017b release Integrates the Automotive Math and Motor Control Library release 1.1.9 for ARM M4 cores Integrates the SDK release version 0.8.4 EAR for S32K1xx MCU. NXP’s Model-Based Design Toolbox generates codes based on standard SDK API, covering most of the functionalities exposed by SDK   Download NXP’s Model-Based Design Toolbox for S32K1xx: https://nxp.flexnetoperations.com/control/frse/download?element=9501347 or browse for file here: Model-Based Design Toolbox|NXP    Getting Started Videos: How to install Model-Based Design Toolbox for S32K1xx How to get help with NXP's toolbox for S32K1xx Basic & Advanced modes for configuration of S32K1xx Motor Control example with S32K1xx FlexIO Communication example with S32K1xx Low Power Modes example with S32K1xx   Support: https://community.nxp.com/community/mbdt        
View full article
This page summarizes all Model-Based Design Toolbox topics related to the S32K3xx Product Family. Model-Based Design Toolbox for S32K3xx - Release Notes: Rev 1.2.0 - Model-Based Design Toolbox for S32K3xx Automotive MCU rev 1.2.0   Rev 1.1.0 - Model-Based Design Toolbox for S32K3xx Automotive MCU rev 1.1.0  Rev 1.0.0 - Model-Based Design Toolbox for S32K3xx Automotive MCU rev 1.0.0 
View full article
 MODEL BASED DESIGN TOOLBOX for S32K14x Automotive MCU rev2.0  Download the product from Model Based Design Toolbox official webpage   Model Based Design Toolbox: Assists Automotive customers with rapid prototyping and accelerates code development on NXP Automotive MCUs Provides an integrated development environment and tool chain for configuring and generating all the necessary software (including initialization routines, device drivers and a real-time scheduler) Automatic ANSI C code generation from MATLAB/Simulink™ Seamless integration with embedded coder including SIL and PIL models      S32K Automotive MCU rev2.0 Enablement Support for the new S32K144 MCU, S32K144EVB evaluation board and new chasses XDEVKIT-MOTORGD for motor control and XDEVKIT-COMM Integrate the latest Automotive Math and Motor Control Library release 1.1.8 for ARM M4 cores Integrate the latest SDK release version 1.0.0 for S32K Automotive MCU; Integrates FreeMASTER version 2.0.2 Support for latest MATLAB versions including 64 bits (2015b, 2016a/b and 2017a); Example Library for S32K peripherals and Motor Control scenarios; S32K supported peripherals are highlighted on block diagram Multiple enhancements and fixes over the previous version of the Toolbox version 1.0    Help and Support  Please join our Model Based Design Toolbox community for updates and support. Click here to watch a quick install guide video   Click here to watch motor control demo with S32K rev2.0  
View full article
This page summarizes all Model-Based Design Toolbox videos related to S32K3 Product Family.  NXP MBDT - S32K3 Updates In this video, we discuss the Model-Based Design paradigm and how to take advantage of the MathWorks ecosystem to generate C code automatically for the NXP S32K3xx. We start our discussion with details about MBDT Concept, Development flow, and Advantages. Then we compare the NXP's MBDT for S32K1 vs MBDT for S32K3 where we introduce the usage of an "external configuration" tool to handle the MCU Clocks, Pins, and Components configuration particular the NXP S32 Configuration Tools and EB tresos Studio. We then explain how the new paradigm matches a "true" Model-Based Design Approach and helps the development engineers. Finally, we discuss the Toolbox for S32K3, what NXP products integrate, and what applications look like. Deploying AUTOSAR ™  and Non-AUTOSAR Software Components on NXP S32K3 with MathWorks ®  Tools Link to the recording here AUTOSAR ™  Classic is the proven standard for traditional automotive applications such as powertrain, chassis, body and interior electronics and more. More frequently, OEMs and suppliers would prefer to reuse the tested and proven legacy (non- AUTOSAR) ECU software in next-generation AUTOSAR ECUs. In this webinar, NXP and MathWorks will show how to use NXP Model-Based Design Toolbox (MBDT) together with MathWorks ®  Simulink ®  and Embedded Coder ®  to develop and deploy MCAL configured (non-AUTOSAR) applications on NXP S32K3 microcontrollers for general purpose. Furthermore, we will illustrate how to convert tested non-AUTOSAR application components to AUTOSAR and then verify and deploy MCAL configured AUTOSAR compliant production code on an S32K3 MCU. Deploying a Deep Learning-Based State-of-Charge (SoC) Estimation Algorithm to NXP S32K3 Microcontrollers Link to the recording here Battery management systems (BMS) ensure safe and efficient operation of battery packs in electric vehicles, grid power storage systems, and other battery-driven equipment. One major task of the BMS is estimating state of charge (SoC). Traditional methods for SoC estimation require accurate battery models that are difficult to characterize. An alternative to this is to create data driven models of the cell using AI methods such as neural networks. This webinar shows how to use Deep Learning Toolbox, Simulink, and Embedded Coder to generate C code for AI algorithms for battery SoC estimation and deploy them to an NXP S32K3 microcontroller. Based on previous work done by McMaster University on Deep Learning workflows for battery state estimation, we use Embedded Coder to generate optimized C code from a neural network imported from TensorFlow and run it in processor-in-the-loop mode on an NXP S32K3 microcontroller. The code generation workflow will feature the use of the NXP Model-Based Design Toolbox, which provides an integrated development environment and toolchain for configuring and generating all the necessary software to execute complex applications on NXP MCUs.  A Model-Based Design (MBDT) Environment for Motor Control Algorithm Development Link to the recording here  This webinar, co-hosted with MathWorks, shows how to design and develop Motor Control algorithms with Simulink ® , using the Embedded Coder and Model-Based Design Toolbox for S32K3xx. We will introduce the scalable S32K3 MCU family and present its specific motor control modules. We will show how to access and configure the MCU peripherals making the Simulink model hardware aware, and ready to generate, build and deploy the application on the hardware. We will focus on Field Oriented Control (FOC) algorithm and implement a sensorless control of a permanent magnet synchronous motor (PMSM). The FreeMASTER application will be used to control and monitor the algorithm running on the S32K344. NXP MBDT for S32K3 provides an integrated development environment and toolchain for configuring and generating all the necessary software to execute complex applications on NXP MCUs directly from Simulink ® .   Speed-Up BMS Application Development with NXP's High-Voltage Battery Management System Reference Design and Model-Based Design Toolbox (MBDT) Link to the recording here  This webinar shows how to design and develop Battery Management Systems, with NXP's High-Voltage BMS Reference Design and Model-Based Design Toolbox for S32K3xx, with Simulink® and Embedded Coder. During this webinar, we will introduce the ASIL D High Voltage Battery Management System Reference Resign that comprises a Battery Management Unit (BMU), Cell Monitoring Units (CMU), and a Battery Junction Box (BJB). NXP's HV-BMS Reference Design is a robust and scalable solution including hardware designs, production-ready software drivers, and safety libraries, as well as extensive ISO 26262 Functional Safety documentation. The design significantly reduces the development effort and enables an improved time to market with the latest chipset innovations. Speed Up Electrification Solutions Using NXP Tools Link to the recording here  This video provides an overview of the NXP Software and Tools solutions, designed to help customers to speed up application development with design, simulation, implementation, deployment, testing, and validation. During this session, you will learn about all the steps required to build complete solutions like battery management systems with NXP in-house solutions and NXP Model-Based Design Toolbox with simulation and code generation.
View full article
      Product Release Announcement Automotive Microcontrollers and Processors NXP Model-Based Design Toolbox for S32K1xx – version 4.1.0     Austin, Texas, USA July 22, 2019 The Automotive Microcontrollers and Processors, Model-Based Design Tools Team at NXP Semiconductors, is pleased to announce the release of the Model-Based Design Toolbox for S32K1xx version 4.1.0. This release supports automatic code generation for S32K1xx peripherals and applications prototyping from MATLAB/Simulink for NXP S32K1xx Automotive Microprocessors. This new release adds support for S32K116 and S32K118 microcontrollers, AUTOSAR applications code generation, Local Interconnect Networks (LIN) support and many other various new functionalities to help customers with rapid prototyping with NXP S32K microcontrollers.   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     Release Content Automatic C code generation based on S32K SDK 3.0.1RTM drivers from MATLAB® for NXP all S32K1xx derivatives: S32K116 MCU Packages with 32QFN and 48LQFP (*new) S32K118 MCU Packages with 48/64 LQFP (*new) S32K142 MCU Packages with 48/64/100LQFP (*updated) S32K144 MCU Packages with 48/64/100LQFP and 100BGA (*updated) S32K146 MCU Packages with 64/100/144LQFP and 100BGA (*updated) S32K148 MCU Packages with 144/176LQFP and 100BGA/QFP (*updated) Multiple options for packages and clock frequencies are available via Model-Based Design Toolbox S32K Simulink main configuration block Integrates the Automotive Math and Motor Control Library release 1.1.17 for: S32K11x based on ARM M0+ cores; S32K14x based on ARM M4F cores; Multiple S32K1xx peripheral support. The peripheral coverage for each of the S32K1xx derivatives is shown below: S32K116 S32K118   S32K142   S32K144     S32K146 S32K148 Add support for Local Interconnect Network (LIN) for all S32K1xx devices Add support for Motor and Solenoid Drivers devices MC33GD3000, MC34GD3000, MC33937 and MC34937 Extend support for System Basis Chip (SBC) with UJA113x blocks 100% S32K1xx supported peripheral coverage with examples. More than 230 examples available as part of the toolbox that exercise all the functionalities supported Add support for CLASSIC AUTOSAR Application Layer Simulation and Code Generation for S32K1xx devices. This feature allows customers to build, simulate and test AUTOSAR Application directly on S32K1xx microcontrollers to check for correct functionality and performance using build in profilers. 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 S32K1xx MCUs and evaluation boards solutions out-of-the-box with: NXP Support Package for S32K1xx 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 S32K1xx version 4.1.0 is fully integrated with MATLAB® environment in terms of installation, documentation, help and examples;    Target Audience This release (4.1.0) is intended for technology demonstration, evaluation purposes and prototyping for S32K116, S32K118, S32K142, S32K144, S32K146 and S32K148 MCUs and Evaluation Boards       
View full article
MODEL BASED DESIGN TOOLBOX FOR PANTHER (MPC574xP) Family of Processors 2.0   Model Based Design Toolbox for MATLAB/Simulink supporting Panther (MPC57xP) version 2.0 is now available.   The product is FREE OF CHARGE and it is available for public.   DOWNLOAD Model Based Design Toolbox MBDT      Release Highlights – Model Based Design Toolbox for Panther (MPC574xP) Support for new Panther XDEVKIT-MPC5744P board (ARDUINO style) which works with the new chassis XDEVKIT-MOTORGD for motor control applications. Incorporation of latest Automotive Math and Motor Control Library release 1.1.7. Support for latest MATLAB versions including 64 bits (2015/2016 a/b) New DMA blocks, allowing ADC sampled data to be transferred to memory without CPU intervention through DMA module. New LINFlexD blocks for serial communication support now allowing data send/receive operations through UART. New Memory Read/Write blocks are added and they can now be used to read/write any memory zone. New Custom Initialization block is added and it can be used to extend the configuration of any module outside the default setup prior to the model first step. Support for S32 Design Studio for Power Compiler v1.1 in addition to new compilers versions Wind River DIAB v5.9.4.8 and Green Hills MULTI for PowerPC v2015.1 New Advanced Motor Control blocks, were added and now new functions like Track Observer or Back EMF Observer are provided as Simulink Blocks. Aligned ADC clock frequency from 20MHz to 80MHz (max speed). New ADC channel configuration block is redesigned to be allow configuration without sampling for the ADC channel, making now DMA scenario for transfers possible. New Diagnostics panel can be used to enable/disable multiple consistency checks. New Bootloader build to support UART1 communication. Support in sync with FreeMASTER release 2.0.2.   new!!! HOT-FIX:  Add support for the latest e200 compiler that is released with S32 Design Studio for Power v1.2 . Refer to HotFix_3 setup to have the MBD Toolbox working with latest e200 compiler.   Community Support Available   Support available via the NXP community at: https://community.nxp.com/community/mbdt
View full article
This article details the SPI communication setup between S32K1xx boards and MC3377xBSPI 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 up to 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
This video shows: - motor control typical setup with S32K144 rev2.0 Evaluation Board; - Simulink model for a BLDC motor control; - how to setup Simulink to generate ANSI C code for S32K144 rev2.0 MCU; - quick tour of the Model Based Design Toolbox; - quick tour of the FreeMASTER data visualizer; - Motor Control example running with DevKit S32K144EVB and MotorGD shield;
View full article
Here you can find a short&focused presentation with main capabilities for the FreeMASTER tool. It is a very useful tools for real-time data visualization and MCU real-time control. You can create some very interesting Web interfaces for your applications - have a look at this video to find out more. Video Link : 7933 In case you have comments and questions - please leave a reply bellow. 
View full article
This video explains the basics of the Permanent Magnet Synchronous Motors modes of operation with Field Oriented Control. It is not intended to replace a good engineering handbook and to go thru all the details of construction or mathematical models of the PMSM.  The topics highlighted in this video are chosen to provide specific details that represents the basics of PMSM motor control theory. The goal of this video is to refresh your knowledge about the motors and to explain some key aspects of the theory behind PMSM and Field Oriented Control that we are going to use in the next modules of the https://community.nxp.com/thread/464336 
View full article
      Product Release Announcement Automotive Microcontrollers and Processors NXP Model-Based Design Toolbox for MPC57xx – version 3.2.0     Austin, Texas, USA April 14 th , 2020 The Automotive Microcontrollers and Processors Model-Based Design Tools Team at NXP Semiconductors is pleased to announce the release of the Model-Based Design Toolbox for MPC57xx version 3.2.0. This release supports automatic code generation for peripherals and applications prototyping from MATLAB/Simulink for NXP’s MPC574xB/C/G/P/R and MPC577xB/C/E series.   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 MPC57xx issues are tracked through the NXP Model-Based Design Tools Community space. https://community.nxp.com/community/mbdt   Release Content Automatic C code generation based on PA SDK 3.0.2 RTM drivers from MATLAB®/Simulink® for 21 NXP product families MPC574xB/C/G/P/R and MPC577xB/C/E derivatives: MPC5744B, MPC5745B, MPC5746B                                                 (*updated) MPC5744C, MPC5745C, MPC5746C, MPC5747C, MPC5748C       (*updated) MPC5746G, MPC5747G, MPC5748G                                                (*updated) MPC5741P, MPC5742P, MPC5743P, MPC5744P                              (*updated) MPC5743R, MPC5745R, MPC5746R                                                 (*new) MPC5775B, MPC5775E, MPC5777C                                                 (*new) Multiple options for MCU packages, Build Toolchains and embedded Target Connections are available via Model-Based Design Toolbox Simulink main configuration block   Multiple peripherals and drivers supported MPC574xP Ultra-Reliable MCU for Automotive & Industrial Safety Applications MPC574xB/C/G Ultra-Reliable MCUs for Automotive & Industrial Control and Gateway MPC574xR Ultra-Reliable MCUs for industrial and automotive engine/transmission control MPC577xB/C/E Ultra-Reliable MCUs for Automotive and Industrial Engine Management Add support for AUTOSAR Blockset for all MPC57xx parts to allow Processor-in-the-Loop simulation for Classic AUTOSAR Application Layer SW-C:     Add support for Three Phase Field Effect Transistor Pre-driver, MC33GD3000, MC34GD3000, MC33937, and MC34937 configuration and control Enhance MATLAB/Simulink support to all versions starting with 2016a to 2020a Enhance the example library with more than 140 models to showcase various functionalities: Core & Systems Analogue Timers Communications Simulations Motor Control Applications For more details, features and how to use the new functionalities, please refer to the Release Notes and Quick Start Guide documents attached.   MATLAB® Integration The NXP Model-Based Design Toolbox extends the MATLAB® and Simulink® experience by allowing customers to evaluate and use NXP’s MPC57xx MCUs and evaluation boards solutions out-of-the-box with: NXP Support Package for MPC57xx Online Installer Guide Add-on allows users to install the NXP solution directly from the Mathworks website or directly from MATLAB IDE. The Support Package provides a step-by-step guide for installation and verification.   NXP’s Model-Based Design Toolbox for MPC57xx version 3.2.0 is fully integrated with the MATLAB® environment in terms of installation, documentation, help, and examples.     Target Audience This release (v.3.2.0) is intended for technology demonstration, evaluation purposes and prototyping for MPC574xB/C/G/P/R and MPC577xB/C/E MCUs and their corresponding Evaluation Boards: DEVKIT-MPC5744P PCB RevA SCH RevE (*new) DEVKIT-MPC5744P PCB RevX1 SCH RevB DEVKIT-MPC5748G PCB RevA SCH RevB DEVKIT-MPC5777C-DEVB                                                                      Daughter Card MPC574XG-256DS RevB Daughter Card X-MPC574XG-324DS RevA Daughter Card MPC5744P-257DS RevB1 Daughter Card SPC5746CSK1MKU6 Daughter Card MPC5777C-516DS                                                       Daughter Card MPC5777C-416DS                                                      Motherboard X-MPC574XG-MB RevD Motherboard MPC57XX RevC Daughter Card MPC5775B-416DS (*new) Daughter Card MPC5775E-416DS (*new) Daughter Card MPC5746R-144DS (*new) Daughter Card MPC5746R-176DS (*new) Daughter Card MPC5746R-252DS (*new)     Useful Resources Examples, Training, and Support: https://community.nxp.com/community/mbdt      
View full article
In this video we discuss about how to use Processor-in-the-Loop (PIL) approach to generate the C-code and to validate the algorithm on the real hardware.  PIL simulation main goals are: - to generate and execute the C-code on the real target/microprocessor; - to help with specific algorithm and control designs by offering the means to optimize your software; - to establish a testing framework for the production code; PIL simulation can also use some of peripherals from the real target for inputs or outputs, making the simulation environment more realistic and closed to the final SW design specifications.   We discuss about: - What is PIL, When to use it and What is recommended for;  - How to convert any Simulink generic algorithm to run with PIL support using the Model Based Design Toolbox; - PIL Reference models;  NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article
This video shows how to program the ADC with Model Based Design Toolbox to obtain the speed reference for the BLDC speed closed loop control system. We discuss about: - How the ADC works - How to simulate the ADC operations - How to implement a simple program to read data from the ADC - How to use BAM to load the application into microprocessor memory - How to test in real time with FreeMaster - How to scale the Potentiometer voltage into a speed reference data that represents the rpm. - How to implement from scratch a Simulink model to cover the ADC functionality NOTE: Chinese viewers can watch the video on YOUKU using this link. 注意:中国观众可以使用此链接观看YOUKU上的视频
View full article