恩智浦基于模型的设计工具知识库

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

NXP Model-Based Design Tools Knowledge Base

讨论

排序依据:
    Product Release Announcement EDGE PROCESSING NXP Model-Based Design Toolbox for DSC MC56F8x MCUs - version 1.0.0 Bucharest, Romania  December 15th , 2021   The Edge Processing Tools Team at NXP Semiconductors is pleased to announce the release of the Model-Based Design Toolbox for DSC MC56F8x Series version 1.0.0. This release supports automatic code generation for peripherals and applications prototyping from MATLAB/Simulink for NXP’s DSC MC56F81xxx and MC56F83xxx Series of MCUs based on DSP568000E core. NXP Download Location https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=MCTB-EX MATHWORKS Download Location https://www.mathworks.com/matlabcentral/fileexchange/103600-nxp-support-package-dsc  Version 1.0.0 Release Content Automatic C code generation based on MCUXpresso SDK 2.7.3 drivers and MCUXpresso Configuration Tools 10.0 initializations from MATLAB®/Simulink® for:   MC56F81xxx        MC56F81868VLH, MC56F81646VLF, MC56F81648VLH, MC56F81663VLC,      MC56F81666VLF, MC56F81668VLH, MC56F81743VLC, MC56F81746VLF,      MC56F81748VLH, MC56F81763VLC, MC56F81766VLF, MC56F81768VLH,             MC56F81866VLF, MC56F81643VLC                                     MC56F83xxx     MC56F83789VLL, MC56F83683VLH, MC56F83686VLL, MC56F83689VLL,     MC56F83763VLH, MC56F83766VLK, MC56F83769VLL, MC56F83783VLH,     MC56F83786VLK, MC56F83663VLH   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 MC56F81xxx derivatives MC56F83xxx derivatives   Basic and Advanced Simulink Block configuration modes via MCUXpresso Configuration Tools 10.0 UIs for Pins, Clocks, and Peripherals   MATLAB/Simulink versions 2020a – 2021b are supported for Design, Simulation, Code Generation, and Deployment of applications on MC56F81xxx and MC56F83xxx Series. Other MC56F8x devices will be supported in future versions of the toolbox. Support for Software-in-Loop (SiL), Processor-in-Loop (PiL); RTCESL – Real-Time Control Embedded Software Motor Control and Power Conversion Libraries for DSP568000E core.     Simulink Example library with more than 100 models to showcase various functionalities:   Integrated PMSM Motor Control Sensor/Sensor-less application for MC56F83000-EVK: Integrated application that uses the on board FXOS8700CQ accelerometer and magnetometer sensor for both MC56F81000-EVK and MC56F83000-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       Target Audience This release is intended for technology demonstration, evaluation purposes, and prototyping for DSC MC56F8x MCUs and their corresponding Evaluation Boards: EVK-MC56F81000 EVK-MC56F83000 Useful Resources Examples, Training, and Support: https://community.nxp.com/community/mbdt    
查看全文
This video shows how to navigate within the integration Matlab help for NXP's Model-Based Design Toolbox for S32K1xx. The following items will be highlighted: Getting HELP Open Examples Support via Community
查看全文
  Product Release Announcement Automotive Embedded Systems NXP Model-Based Design Toolbox for S32M2 – version 1.1.0   The Automotive Embedded Systems, Model-Based Design Tools Team at NXP Semiconductors, is pleased to announce the release of the Model-Based Design Toolbox for S32M2 version 1.1.0. This release supports automatic code generation for S32M2 peripherals and applications prototyping from MATLAB/Simulink for NXP S32M2 Automotive Microprocessors. This product adds support for S32M41, S32M242, S32M43, S32M244, S32M274, S32M276 MCUs and part of their peripherals, based on RTD MCAL components (ADC, AE, DIO, CAN, Can_Trcv, DPGA, GDU, GPT, LIN, LIN_Trcv, MCL, PWM, MCL, MCU, PORT, QDEC, SPI, UART). In this release, we have also added support for FreeMASTER, AMMCLib, and MATLAB support for the latest versions. The product comes with over 85 examples, covering all supported peripherals, and Simulink simulation modes Software-in-the-Loop, Processor-in-the-Loop, and External Mode. Target audience: This product is part of the Automotive SW – Model-Based Design Toolbox. FlexNet Location: https://nxp.flexnetoperations.com/control/frse/download?element=6481361 Technical Support: NXP Model-Based Design Toolbox for S32M2 issues will be tracked through the NXP Model-Based Design Tools Community space. Release Content: Automatic C code generation from MATLAB® & Simulink® for NXP S32M2 derivatives: S32M241 S32M242 S32M243 S32M244 S32M274 S32M276 Support for the following peripherals (MCAL components): ADC AE CAN CAN_Trcv DIO DPGA GDU GPT ISR LIN LIN_Trcv MCL MCU MEMORY PROFILER PWM PORT QDEC SPI UART Profiler in PIL mode Provides 2 modes of operation Basic – using pre-configured configurations for peripherals; useful for quick hardware evaluation and testing Advanced – using S32 Configuration Tool or EB Tresos to configure peripherals/pins/clocks Provides Motor Control examples MBDT for S332M2 1.1.0 provides examples for PMSM sensorless, open loop and closed-loop hall sensors motor control applications, supporting S32 Configuration Tools. Each of them has a detailed description of the hardware setup and an associated FreeMASTER project which can be used for control and data visualization. Integrates the Automotive Math and Motor Control Library version 1.1.38 All functions in the Automotive Math and Motor Control Functions Library v1.1.38 are supported as blocks for simulation and embedded target code generation. Integration with FreeMASTER MBDT for S332M2 1.1.0 delivers several Simulink example models and associated FreeMASTER projects to demonstrate how our toolbox interacts with the real-time data visualization tool and how it can be used for tuning embedded software applications. Support for Custom Default Project MBDT for S332M2 1.1.0 provides support for users to create their own custom default project. This could be very useful when having a custom board design – the configuration for it needing to be created only once. After that configuration is saved as a custom default project, it can be used for other models that are developed. Support for custom board initialization MBDT for S332M2 1.1.0 generates the components’ peripherals initialization function calls as configured in the Board Initialization window, which can be customized to each Simulink model. This feature allows users to set a custom order for the components initialization, the insertion of the Custom code sequences, or share the custom initialization with multiple Simulink models via the Export and Import functionality. Integration with S32 Config Tools version v1.7 Integration with S32 Design Studio MBDT for S332M2 1.1.0 automatically generates the <model_name>_Config folder, next to the Simulink model location, providing user the opportunity to easily import the generated code from Simulink into S32 Design Studio. Each time the code is generated, the  <model_name>_Config folder is updated with the new changes. Toolbox also provides a mechanism to launch an S32 Design Studio instance, with the imported generated code project in the Project Explorer tab from S32DS. Simulation modes       Toolbox provides support for the following simulation modes (each of them being useful for validation and verification): Software-in-Loop (SIL) Processor-in-Loop (PIL) External mode      Support for application execution profiling Custom Linker File and Startup Code Users can choose to use custom files for this process, from the Build Options group which can be found in the Target Hardware Resources, as illustrated in the image below. Examples for every peripheral/function supported       We have added over 60 examples, including: CDD Blocks (Ae, Dpga, Gdu, Mcl, Qdec) Communication (Can, Lin, Spi, Uart) AMMCLib IO Blocks (Adc, Dio, Pwm) ISR Blocks (Hardware Interrupt Handler) MCAL Blocks (Gpt) Utility Blocks (FreeMASTER, Memory, Profiler, Registers) Software-in-the-Loop / Processor-in-the-Loop / External mode For more details, features, and how to use the new functionalities, please refer to the Release Notes and Quick Start Guides documents attached. MATLAB® Integration Support for MATLAB® versions R2021a R2021b R2022a R2022b R2023a R2023b R2024a R2024b   The NXP Model-Based Design Toolbox extends the MATLAB® and Simulink® experience by allowing customers to evaluate and use NXP’s S32M2 MCUs and evaluation board solutions out-of-the-box with:   Target Audience This release (MBDT for S32M2 1.1.0) is intended for technology demonstration, evaluation purposes, and prototyping of S32M2 MCUs and Evaluation Boards.   Useful Resources Examples, Trainings, and Support: https://community.nxp.com/community/mbdt DEMO Motor Control Rapid Prototyping on NXPs S32M2 with MathWorks and the Model-Based Design Toolbox This training shows how to design and develop motor control algorithms with Simulink® (MathWorks) and the Model-Based Design Toolbox for S32M2. Presentation introduces NXP’s S32M2 family, an integrated solution for 12V Motor Control and 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 target. The FreeMASTER software tool is used to control and monitor the algorithms running on the S32M2. First application focuses on a simple scalar control (also known as open-loop control or Volts per Hertz control) algorithm for a permanent magnet synchronous motor (PMSM). Second application shows how MATLAB and Simulink works together with the MBDT for S32M2 focusing on a workflow of implementing a predictive maintenance motor control application. Toolbox is used to acquire data from an accelerometer mounted on the motor. The motor is spinning at various speeds, and the vibrations are monitored using FreeMASTER. Data is transferred to MATLAB, where is preprocessed and a Support Vector Machine is trained. Then the resulted classifier is transferred to Simulink where together with the Model-Based Design Toolbox for S32M2 code is generated and deployed on the MCU. For more details about the demo mentioned above, please check this webinar a full demo description.        
查看全文
1. Introduction The scope of this article is to show how easy it is to use MBDT, FreeMASTER and some knowledge in electronics to create a simple and useful project: monitor USB voltage and current consumption.  I used this setup it to monitor USB voltage and current while my smartphone is charging, but it can be used in other purposes too, like monitoring power consumption of some devices connected on USB charger/power bank/PC, or it can be used to find some charging issues, or maybe you just want to find out if your phone charger supports fast charging, or to characterize a power bank.  2. Overview 2.1 Functional Description This project can measure USB voltage and current by measuring USB voltage and a voltage drop across a resistor through which current flows from a USB power source to a USB load. The voltage given by current flow is amplified by an electronic circuit and sampled by MPC5744P-DEVKIT board through the ADC converter, then data is sent to PC and then are displayed through a FreeMASTER project as numerical values and as oscilloscope chart. The MPC5744P-DEVKIT board is programmed by MBDT. To build this simple project, you need three components: Matlab with MBDT toolbox installed, FreeMASTER Run-Time Debugging Tool, a very simple electronic circuit, and an MPC5744P-DEVKIT.  As can be seen in fig.1, the project can be split into two main parts: Hardware Setup and Software Setup. Fig. 1: USB Voltage And Current Monitor block diagram 2.1 Hardware Setup Custom Electronic Board The simplest way to measure current is to use a simple resistor connected in series with the load (USB output in our case). The Ohm law gives us a linear relationship between voltage and current in an electrical circuit: U = R * I  U is the voltage (measured in volts V) drop across the resistor, R is the resistance of the resistor (measured in ohm Ω) and I is the current (measured in amps A) which we need to measure. Most of the USB chargers can supply a maximum of 3A and most of the smartphones can drain less than 3A. Giving that I considered designing this circuit to measure around maximum 3A. Let suppose that we use a simple 1ohm resistor. If we do simple math using Ohm formula, then it can be seen that for 3A the voltage across our resistor (there) will be 3V (U = 1 * 3). Fig. 2: USB connectors and current "sensor" In Fig. 2 on the left side is a USB input connector, on the right side is the output USB connector and both GND lines are connected through R1 current sensor. The current "I" will flow, as can be seen in Fig. 2, from USB input through VBUS  line to VBUS on USB output, than will flow through our load connected to USB output and then through GND on the same connector thru R1 and at least to GND on USB input connector. This current will create a voltage across R1 (UR1) equal with 3V (if we use 3 amps current and 1-ohm resistor). One of USB standard charging it specifies that the lowest (standard) voltage it's 5V. In our case, using this 1 ohm resistor will cause 3V loss, then the voltage at USB outputs will be 2V (unacceptable). In most of the digital electronic circuits, when it's used 5 volts power, the voltage tolerance it's about 10% (0.5V) which means the voltage can be between 4.5V and 5.5V. Let's try to create a maximum voltage drop across this resistor about 3 times lower than the 0.5V, e.g.: 150mV. Then the current sensor resistor is R1 = 0.15V / 3A = 0.05ohm.  To measure this drop voltage we could use any ADC channel on MPC5744P-DEVKIT, but if the voltage reference of ADC is set to 5V, the resolution of ADC is 5V/4096 = 1.22mV, which means the equivalent ADC resolution corresponding to current measurement is about 24mA (1.22mV correspond to 24mA). If we consider electrical noise on USB connectors, it's very possible that the out signal will be "drowned" in electrical noise or the results will be not very satisfactory.  The solution to that problem is to "rescale" this 0V --> 0.15V range to 0V --> 5V. We can do that by using operational amplifier circuits.  I used what I found on the moment in my electronic components, an LM358 IC.  This IC is not the best, but for the demo, it's ok to be used.       Fig. 3: USB current and voltage monitor A few ideas of this electronic design:  this IC contains two operational amplifiers,  first amplifier coefficient is set thru R5 and R4 (34 amplification coefficient) and the signal is connected on his noninverting input, the lowest current that can be measured is approx. 0.7mA, the second amplifier is set as a buffer amplifier, note: if the maximum current used by the load is maximum 3A, the Zenner diode it's not necessary. By using this amplifier, the range is rescaled to 0 --> 5.1V.  To measure the voltage at USB input we use R9 and R10 divider resistor and will use the formula U_R9 = U_USB * ( R9/(R9 + R10)). And by using for R9 10K and for R10 33K  the voltage measured by ADC for maximum USB standard charging is U_R9 = 20V * (10/(43)) = 4.65V. This circuit has been developed on prototyping PCB. The outputs of this circuit are connected to two ADC (current signal to PTB13 and voltage signal to PTB14) channels of MPC5744P-DEVKIT and those can be found on CN1 connector ("USB voltage", "USB current" and GND). MPC5744P-DEVKIT Evaluation Board The main scope of this devkit is to get current and voltage data from the custom board and to convert it to digital data and send it to the PC through the UART interface.  As can be seen in fig. 4, I used three wires to connect the custom electronic board to the devkit (two ADC and GND).  On MPC5744P-DEVKIT the ADC voltage reference must be set to 5V (jumper J19 --> 2-3) and the data will be sent to PC through UART (USB --> OpenSDA). The MPC5744P-DEVKIT must be connected to PC thru USB cable. All other jumpers can be let in the default state. Fig. 4: Hardware setup (load is a USB led light) 2.1 Software Setup MBDT Application Model            For software development, I used Matlab with the MBDT toolbox. The first step is to create a new Simulink project using MBDT. The project contains three main parts: configuration blocks variable declaration blocks main loop, where the values are taken from the output of ADC block, and after using some simple maths functions, resulted in values are stored in current and voltage variables. After getting the values from ADC blocks, we must apply some math functions to reverse the effect created in the electronic circuit. Part of the configuration blocks contain: MPC5744P configuration block, ADC configuration block, which has two channels are configured, FreeMASTER block used to observe the current, voltage, and other parameters over UART through the FreeMASTER protocol. Part of the variables declaration is used to declare all variables used to get values from ADC peripheric, intermediate values, and final values.  Part of the main loop consists of simple mathematical functions that have the role to convert ADC values to current and voltage values. The first thing executed is taking the ADC current and voltage values, then those values are converted to floating-point type the multiplied with a constant (ADC_Vref /ADC_resolution = 5/4095) which represent ADC voltage resolution. Then, for USB current value, the result must be divided with operational amplifier factor (34), after that, we could subtract from the result that operational amplifier input offset (if it is measured any relevant value) and the last thing to do to get the USB current is to convert from voltage to current using ohm law (U = R * I).  To get the USB voltage, the first step is similar to the USB current value, using the resistor divider formula we get the final value. For using different opamp IC, if the non-inverting input is too high, it is recommended to be measured while the electric circuit is on and the value to be updated in the model (variable Current_offset).  Fig. 5: MBDT Application Model FreeMASTER project To view data in real-time, the first thing is to open the FreeMASTER project and, select "Tools", then "Connection Wizard ...", then hit "Next" button, select the first option "Use the direct connection to an on-board USB port", then select the serial com port assigned to MPC5744P-DEVKIT and 115200 baud rate. The USB current and voltage can be observed In the FreeMASTER project as a numerical value and as an oscilloscope view by selecting "RAW data" to plot raw ADC USB current and voltage values. To plot the real USB current and voltage values, in the Project Tree, please select "Voltage and current" oscilloscope. Fig. 6: FreeMASTER USB current and voltage monitor In Fig. 6 it can be seen current and voltage variations in time for fast charging transitions when my smartphone is connected to the original charger.
查看全文
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
查看全文
    Product Release Announcement EDGE PROCESSING   NXP Model-Based Design Toolbox for i.MX RT Crossover MCUs – version 1.3.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.3.0. This release supports automatic code generation for peripherals and applications prototyping from MATLAB/Simulink for NXP’s i.MX RT 117x, 106x, 102x & 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.3.0 Release Content Automatic C code generation based on MCUXpresso SDK 2.11.0 drivers and MCUXpresso Configuration Tools 11.0 initializations from MATLAB®/Simulink® for: i.MX RT 1076: MIMXRT1176DVMAA,MIMXRT1176AVM8A,MIMXRT1176CVM8A i.MX RT 1075: MIMXRT1175DVMAA,MIMXRT1175AVM8A,MIMXRT1175CVM8A i.MX RT 1073: MIMXRT1173CVM8A i.MX RT 1072: MIMXRT1172DVMAA,MIMXRT1172AVM8A,MIMXRT1172CVM8A i.MX RT 1071: 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 i.MX RT 1024: EVKMIMXRT1024     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 are 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 11.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, 102x & 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 (classic serial, XCP Over Serial, and XCP over Ethernet). 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 200 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 EVK-MIMXRT1024       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      
查看全文
        Product Release Announcement Automotive Processing NXP Model-Based Design Toolbox for HCP – version 1.2.0 RFP       The Automotive Processing, Model-Based Design Tools Team at NXP Semiconductors, is pleased to announce the release of the Model-Based Design Toolbox for HCP version 1.2.0. This release supports automatic code generation from MATLAB/Simulink for S32G2xx, S32S2xx, and S32R41 MPUs. This new product adds support for new MATLAB versions R2022a and R2022b for running in Processor-in-the-Loop mode.   FlexNet Location: https://nxp.flexnetoperations.com/control/frse/download?element=13897177   Technical Support: NXP Model-Based Design Toolbox for HCP issues will be 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 S32G2xx derivatives: S32G274A Automatic C code generation from MATLAB® for NXP S32S2xx derivatives: S32S247TV Automatic C code generation from MATLAB® for NXP S32R4x derivatives: S32R41 Supported Evaluation Boards GoldBox Development Platform (S32G-VNP-RDB2 Reference Design Board) GreenBox II Development Platform X-S32R41-EVB Development Board Support for MATLAB versions: R2020a R2020b R2021a R2021b R2022a R2022b Tools update for S32R41: S32 Flash Tool v2.1 S32 Debugger v3.5 Simulation mode: We provide support for Software-in-Loop (SIL) and Processor-in-Loop (PIL) simulation mode with code execution profiling: Includes an Example library with 16 examples that cover: Software-in-Loop (SIL), Processor-in-Loop (PIL) GUI to help you setup the toolbox and the evaluation board :     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 S32G2xx, S32S2xx, and S32R41  processors and evaluation board solutions out-of-the-box with: NXP Model-Based Design Toolbox for HCP version 1.2.0 (RFP) is fully integrated with MATLAB® environment in terms of installation:       Target Audience This release (1.2.0 RFP) is intended for technology demonstration, evaluation purposes, and prototyping S32G2xx, S32S2xx, and S32R41 and Evaluation Boards.   Useful Resources Examples, Trainings and Support: https://community.nxp.com/community/mbdt    
查看全文
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
查看全文
Wanna see & play something cool ?  You can see it live in June during Mathworks Expo:  - Munich, Germany on June 27th  - China on June 20th an 27th If you want more details - leave a comment below Check our video showing the demo:  Video Link : 7851 
查看全文
Hello all, sharing the latest version of S12ZVM Power Dissipation Calculator started by Carlos Vazquez and Anita Maliverney. With this excel sheet is possible estimate the power dissipated for any MCU of S12ZVM family, considering: supply voltages, digital modules, gate drive unit, charge pump, communication transceivers, etc.   Updated static and dynamic consumption current of S12ZVMC256, S12ZVM32 and S12ZVMB. Regards.
查看全文
This video shows the main differences between basic and advanced modes for peripheral configuration
查看全文
BLDC OpenLoop Voltage Control example for MPC574xP(Panther)+MotorGD Features: - Commutation based on HALL sensor transitions - Voltage read via SW1(++) and SW2(--) - Voltage can be read from POT if VoltageReqSource=0 - Motor can rotate CW (default) or CCW via SW1/SW2 Copyright (c) 2017 NXP version 1.0.1 Model Based Design ToolBox
查看全文
General Installer and Setup Installation Troubleshooting  TPL Communication TPL communication troubleshooting TPL Communication with multiple BCCs FreeMASTER Configuration FreeMASTER not detected on the HVBMU Board  TD Handler TD Handler indexing 
查看全文
This video highlights the main features added in the version 4.1.0 of the NXP Model-Based Design Toolbox for S32K1xx Series
查看全文
Having fun with MBDT for MPC57xx 3.1.0 and MPC5744P for Xmas tree by controlling the lights and sounds
查看全文
Get to know NXP Model-Based Design Toolbox™—a connection between MathWorks and NXP ecosystems that allows rapid prototyping of complex embedded designs on NXP microcontrollers. In this presentation, @Irina_Costachescu and @mariuslucianand  will highlight the main features of the NXP Model-Based Design Toolbox. They will demonstrate how to design a BMS application, covering the main development phases from an idea to a running on target prototype. Register here: https://www.matlabexpo.com/online/2022.html 
查看全文
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上的视频
查看全文
1. INTRODUCTION    This article presents how to use NXP’s Model-Based Design Toolbox (MBDT) to implement an Air Quality Monitor that integrates multiple sensors, which will be configured to run on the 3S32K144 EVB.    The Model-Based Design Toolbox offers a solution for deploying complex applications on NXP hardware directly from Simulink. It incorporates hardware-optimized software, including drivers, libraries, and tools, allowing users to concentrate solely on algorithm development. The toolbox manages the hardware integration, ensuring the applications are hardware-aware. By integrating with the MathWorks ecosystem, the Model-Based Design Toolbox leverages the model-based design paradigm. This enables a programming process based on models, where users create logical diagrams using Simulink blocks for dedicated functions, eliminating the need to write C code for their designs.     This article aims to show how this tool can be used for designing and deploying on an S32K144 Evaluation board an air quality monitor application. Therefore, the steps meant to accomplish this are parted in the following sections:       II. General purpose – what is the aim of the application;       III. Application overview – how the application works and how the sensors are integrated;      IV. Hardware design – the description of the components used;       V. Software design – the execution flow of the application and the model implementation explained in detail;      VI. Conclusion – results of the application.    2. GENERAL PURPOSE    This application shows how easily an Air Quality Monitor can be implemented when using the MBD toolbox for S32K1xx, which helps the users simplify their job by providing the means to use a graphic and visual way to put their idea into use and generate the C code from it, which will be uploaded on the EVB.    3. APPLICATION OVERVIEW     The application displays in FreeMASTER the values of temperature, humidity, dust density, pressure, and the values of eCO2 and TVOC. Those values are read from the sensors connected to the EVB and computed using the algorithms from the libraries corresponding to each sensor, such as Adafruit’s libraries for BMP280 and CCS811, Sparkfun library for HTU21D and the GP2Y1010AU0F library, which are then adapted in Simulink logic. The application will be split into four subsystems, each covering a sensor and its algorithm.    BLOCK DIAGRAM                                                        Figure 1: Block Diagram     4. HARDWARE DESIGN     4.1. Hardware components   The required components for this application are:  S32K144 Evaluation Board  HTU21D, temperature and humidity sensor CCS811, eCO2 and TVOC sensor  BMP280, pressure sensor  GP2Y1010AU0F, dust density sensor        1) S32K144 Evaluation Board  The S32K144EVB is a low-cost evaluation and development board for general-purpose industrial and automotive applications. The board represents the main part of the application as it collects the data from the sensors and applies the algorithm to compute the values shown in FreeMASTER.  For more information about the board, access the following NXP page.      2) Temperature and humidity sensor HTU21D  The HTU21D is an easy-to-use, digital sensor for measuring humidity and temperature levels. It utilizes the I2C communication protocol, making it suitable for various applications, such as an Air Quality Monitor.     3) eCO2 and TVOC sensor CCS811  The CCS811 sensor precisely monitors indoor air quality, measuring TVOCs and carbon dioxide levels in real time. Using the I2C communication protocol, it is easily integrated into air quality monitor applications.     4) Pressure sensor BMP280  The BMP280 sensor accurately measures atmospheric pressure using the I2C communication protocol.     5) Dust density sensor GP2Y1010AU0F  The GP2Y1010AU0F sensor is utilized for the measurement of dust density with high precision. Utilizing an analog output mechanism, it delivers reliable data for comprehensive air quality assessments.    4.2. Electrical schematic    Apart from the components described above (HTU21D sensor, CCS811 sensor, BMP280 sensor and GP2Y1010AU0F sensor), a resistor and a capacitor will be needed.   The following electrical schematic is an example of how the sensors can be connected:                                                             Figure 2: Electrical schematic    5. SOFTWARE DESIGN    5.1. Prerequisite software  To be able to follow the next steps presented in this article, the following software will be necessary:  Matlab® and Simulink® (2021a or newer), including Stateflow ®, MATLAB® CoderTM, Simulink® CoderTM, Embedded Coder®  NXP Support Package S32K1xx    5.2. Model overview   The application uses the Simulink environment to implement the algorithms for computing the data read from the sensors connected to the S32K144 EVB. The model is organized into two big sections: initialization and sensors’ algorithms. For the sensors part, each sensor has its subsystem where the algorithm is implemented.                                                     Figure 3: Application’s model    5.3. INITIALIZATION  The initialization holds the blocks required for our model to work. On the first line, from left to right, the following can be found:        1) The Configuration block for S32K1xx processor family. The required settings of the processor configuration block are the default ones, except for the processor family and the download interface.                           Figure 4: Configuration block for S32K1xx family of processors        2) The LP2IC Configuration block. Here the functioning mode (master or slave) can be changed, and the pins used for communication can be chosen. This application has three sensors that use this communication protocol:  BMP280, whose address is 0x76  CCS811, whose address is 0x5A HTU21D, whose address is 0x40                                            Figure 5: Configuration block for LPI2C        3) The FreeMASTER configuration block. Here the communication interface, the baud rate, and long interrupt serial communication can be set. This component facilitates communication between the S32K144 EVB LPUART1 instance and the FreeMaster tool, via the microUSB serial port.                                Figure 6: Configuration block for FreeMASTER        4) The configuration block for ADC. The ADC converter number and the resolution mode can be selected from here.     Figure 7: Configuration block for ADC    On the second line, the data stores for the variables used in this project can be found. The data type and size for the data stores can be found in the following table:     VARIABLE NAMES  DATA TYPE  SIZE / DIMENSION  SENSOR  aux_temp  uint8  3  BMP280  aux_press  uint8  3  BMP280  BMP280_Temp  uint8  6  BMP280  BMP280_Press  uint8  18  BMP280  BMP280_T  uint16  1  BMP280  BMP280_T2  int16  2  BMP280  BMP280_P  uint16  1  BMP280  BMP280_P2  int16  8  BMP280  raw_press  int32  1  BMP280  raw_temp  int32  1  BMP280  Pressure  double  1  BMP280  buf  uint8  8  CCS811  TVOC  uint16  1  CCS811  eCO2  uint16  1  CCS811  temperature  double  1  HTU21D  humidity  double  1  HTU21D  hum_raw  uint16  1  HTU21D  temp_raw  uint16  1  HTU21D  humcomp  default  default  HTU21D  dustDensity  default  default  GP2Y1010AU0F    Figure 8: Variables    Note! It is important, for the variables to be visible in FreeMASTER, to go to Apps -> Embedded Coder -> Code Interface -> Default Code Mappings -> Data Stores and set all the variables to Volatile.    Figure 9: Embedded Coder selection    Figure 10: Default Code Mappings    5.4. ALGORITHM   The second part of the model consists of every sensor’s subsystem. In each subsystem, the necessary algorithm for computing the data is implemented.   Let’s look at every subsystem and algorithm.       5.4.1. BMP 280 Pressure sensor   For this sensor’s initialization, BMP280_Temp and BMP280_Press will  be used. Top down, five subsystems can be found: Global Initialization Sensor, Temp Calib, read16LE – temp, Press Calib, read16LE – press.     Figure 11: BMP280 subsystems    The purpose of the Global Initialization Sensor is to prepare the sensor for subsequent data reading. This involves transmitting specific data to the sensor using the LPI2C Master Transmit block. These data include values such as 0xF5 and 108, as well as 0xF4 and 111, which serve to configure and calibrate the sensor for upcoming tasks. Having multiple sensors connected using I2C communication protocol, the way the sensor can differentiate between them is by their address. Therefore, the data will be sent to the 0x76 address, which corresponds to the address of the pressure sensor.  Figure 12: Pressure sensor initialization    In Temp Calib subsystem, data is read from the temperature's memory location and placed into the BMP280_Temp data store mentioned earlier. The addresses from which data needs to be read are sequential, so reading begins from the 0x88 address and 6 bits of data are requested, resulting in reading from address 0x88 to address 0x8C inclusively.  Figure 13: I2C Master Multi Transfer    In read16LE – temp subsystem, the add operation is utilized to perform an OR bit operation for calibrating the data and placing it into the BMP280_T data store and the BMP280_T2. LE stands for Little Endian.    Figure 14: Temperature data calibration    For the Press Calib and read16LE – press subsystems, the same operations described previously are performed, but for a greater number of bits. After the initialization is completed, the Else subsystem is entered, where the computing takes place. An auxiliary temperature is computed, which is required for the pressure's formula. For this purpose, the data store named aux_temp will be used. Within this subsystem, there are 2 further subsystems: READ TEMP REGISTER and RAW TEMP.  In READ TEMP REGISTER, data is read from the 0xFA address using an LPI2C Master Multi Transfer, and 3 bits of data are transferred into the aforementioned aux_temp data store.  In RAW TEMP, the raw_temp necessary for the pressure calculation formula is computed.  Similar to the temperature calculation, the pressure calculation data is read from the 0xF7 address into the data store named aux_press, and then the raw_press required for the formula is computed.  For the actual computation of the pressure, an S-Function block with C code inside is utilized, where the algorithm found in the Adafruit Library for BMP280 is included. [1] [functions float Adafruit_BMP280::readTemperature() and float Adafruit_BMP280::readPressure()].  Figure 15: convertPressure S-Function       5.4.2. CCS811 TVOC & eCO2 sensor  For this sensor, during initialization, the same procedure as before is followed: specific data is sent to the sensor using the LPI2C Master Transmit to notify it of the upcoming data reading. Specifically, the predefined data 0xF4 and 0x01, 16 is now transmitted.   Figure 16: Initialization for eCO2 and TVOC sensor    In the Else subsystem, 8 bits of data are read and placed into the buf variable using the LPI2C Master Multi Transfer block. Subsequently, after the necessary data is retrieved from the sensor, the required values are computed, with their formulas sourced from the Adafruit Library for the CCS811 sensor [2]:  _eCO2 = ((uint16_t)buf[0] << 😎 | ((uint16_t)buf[1]);  _TVOC = ((uint16_t)buf[2] << 😎 | ((uint16_t)buf[3]);    Figure 17: Compute data for eCO2 and TVOC values       5.4.3. Humidity & Temperature subsystem  For this sensor, another library [3] will be utilized to obtain the necessary formulas and the algorithm. Initially, for both temperature and humidity readings, the LPI2C Master Multi Transfer block will be employed to retrieve the required values. Specifically, the command to trigger temperature readings is 227, and for humidity, it is 229. Each reading will consist of 3 bits, from which only the most significant bit and the least significant bit will be utilized for temperature and humidity, respectively.  For both of them, the raw values need to be computed. The formulas needed are:  For temperature:  uint16_t rawValue = ((uint16_t) msb << 😎 | (uint16_t) lsb;  temp_raw = rawValue & 0xFFFC;       2. For humidity:  uint16_t rawValue = ((uint16_t) msb << 😎 | (uint16_t) lsb;  hum_raw = rawValue & 0xFFFC;    The temperature is computed using the following formula:  Temperature = temp_raw * (175.72 / 65536.0) – 46.85;    Figure 18: Temperature computing    The humidity is computed using the following formula:  Humidity = (-6) + 125 * (hum_raw / 65536.0) + (25 – Temperature) * (-0.15);    Figure 19: Humidity computing    Figure 20: Temperature and humidity subsystem       5.4.4. Dust Pm2.5 subsystem  For this final sensor, an additional library [4] will be employed to implement our model-based design algorithm for measuring and computing the PM2.5 levels in our surroundings.   In this scenario, the GPIO Write block will be utilized to activate and deactivate the infrared LED on the sensor. Following activation, a 0.28ms delay will be introduced before employing the ADC to read the data, which will then be computed using the provided formula:  dustDensity = (170 * 5 / 1024 – 0.1) * Voltage      Figure 21: Formula applied for dust density    After applying the above-mentioned formula, another delay of 0.04ms will be used and then the LED will be turned off.      Figure 22: Dust Pm2.5 subsystem    5.5. FREEMASTER  To visualize the results from the application, a FreeMASTER project can be created. Once created, the .elf file of the built application can be added by navigating to Project -> Resource files -> "pack" directory setup -> MAP Files -> Default symbol file.  Variables can be added to the Variable Watch section. For this project, the most important ones are Pressure, eCO2, TVOC, humidity, temperature, and dustDensity.    Figure 23: Variable watch section    5.6. HARDWARE SETUP  A possible example for hardware setup is represented in the below picture:  Figure 24: Hardware setup    6. CONCLUSION    The application covers the steps of developing an air quality monitor that monitors how the pressure, TVOC, eCO2, humidity, temperature, and dust density evolve in a room, using the Model-Based Design Toolbox for S32K1 MCUs. It can be a good academic study for how to use the S32K1XX EVB and sensors using the MBDT and for how to adapt C code and use it in a graphic programming environment such as Simulink to simplify your work.      Bibliography:   [1] https://github.com/adafruit/Adafruit_BMP280_Library  [2] https://github.com/adafruit/Adafruit_CCS811  [3] https://github.com/sparkfun/SparkFun_HTU21D_Breakout_Arduino_Library  [4] https://github.com/mickey9801/GP2Y1010AU0F       NXP is a trademark of NXP B.V. All other product or service names are the property of their respective owners. © 2024 NXP B.V. MATLAB, Simulink, and Embedded Coder are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarks for a list of additional trademarks.   
查看全文
Announcing the introduction of the Model Based Development Toolbox for MATLAB/Simulink MBD supporting MagniV S12ZVC.  The model based development toolbox is a comprehensive collection of tools that plug into the MATLAB®/Simulink® model-based design environment to support rapid application development with NXP® MCUs. OVERVIEW The model based development toolbox offers support for motor control application development, enabling control engineers and embedded developers to help shorten project life cycles. The model based development toolbox includes: Integrated Simulink®-embedded target supporting NXP MCUs for direct rapid prototyping and processor-in-the-loop (PIL) development workflows Peripheral device interface blocks and drivers Bit-accurate simulation results in the Simulink simulation environment The model based development toolbox generates all the code required to start up the MCU and run the application code, while supporting builds with multiple compilers. TARGET APPLICATIONS Aerospace and defense Automotive control design Embedded system development Industrial automation Machinery real-time systems FEATURES Built-in support for direct code download to the target MCU through the RAppID Boot Loader utility Complimentary license Built-in support for NXP FreeMASTER—a real-time debug monitor and data visualization tool interface. It provides visibility into the target MCU for algorithm calibration and tuning, making it ideal for advanced control systems, with: Monitor signals in real time on the embedded target Data logging Signal capture Parameter tuning Simulink blocks supporting: ADC CAN Custom Initialization DAC Data Memory Read/Write Digital I/O FreeMASTER Data Recorder I2C Profiler PWM SCI SPI TIM PRODUCT REQUIREMENT MATLAB® (32-Bit or 64-Bit)* Simulink MATLAB coder Simulink coder Embedded coder Support available via the NXP community at: https://community.nxp.com/community/mbdt Download the tool at www.nxp.com/mctoolbox
查看全文
Speed up development time with NXP Model-Based Design Toolboxes
查看全文