NXPモデルベース・デザイン・ツールナレッジベース

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

NXP Model-Based Design Tools Knowledge Base

ディスカッション

ソート順:
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. 
記事全体を表示
      Product Release Announcement Automotive Microcontrollers and Processors NXP Model-Based Design Toolbox for MPC57xx – version 3.1.0     Austin, Texas, USA December 16 th , 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.1.0. This release supports automatic code generation for peripherals and applications prototyping from MATLAB/Simulink for NXP’s MPC574xB/C/G/P and MPC5777C 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   Release Content Automatic C code generation based on PA SDK 3.0.2RTM drivers from MATLAB®/Simulink® for NXP MPC574xB/C/G/P and MPC5777C derivatives: MPC5744B, MPC5745B, MPC5746B                                                   (*upd) MPC5744C, MPC5745C, MPC5746C, MPC5747C, MPC5748C         (*upd) MPC5746G, MPC5747G, MPC5748G                                                  (*upd) MPC5741P, MPC5742P, MPC5743P, MPC5744P                                (*upd) MPC5777C                                                                                            (*new) Added support for SIL, PIL and AUTOSAR Blockset code generation and simulation for the MPC5777C Ultra-Reliable MCU for Automotive and Industrial Engine Management. Currently only the basic enablement is available for this microcontroller as shown in the picture below: Enhance MATLAB/Simulink support to all versions starting with 2016a to 2019b Enable MATLAB AUTOSAR Blockset on all MPC574xB/C/G/P and MPC5777C to allow users to configure, simulate, generate and profile AUTOSAR Applications with NXP Hardware; For more details, features and how to use the new functionalities, please refer to the Release Notes and Quick Start Guide documents.   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.1.0 is fully integrated with MATLAB® environment in terms of installation, documentation, help and examples;     Target Audience This release (v.3.1.0) is intended for technology demonstration, evaluation purposes and prototyping for MPC574xB/C/G/P and MPC5777C MCUs and their corresponding Evaluation Boards: DEVKIT-MPC5744P PCB RevX1 SCH RevB DEVKIT-MPC5748G PCB RevA SCH RevB DEVKIT-MPC5777C-DEVB                                                                     (*new) Daughter Card MPC574XG-256DS RevB Daughter Card X-MPC574XG-324DS RevA Daughter Card MPC5744P-257DS RevB1 Daughter Card SPC5746CSK1MKU6 Daughter Card MPC5777C-516DS                                                        (*new) Daughter Card MPC5777C-416DS                                                        (*new) Motherboard X-MPC574XG-MB RevD Motherboard MPC57XX RevC      
記事全体を表示
      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                                            
記事全体を表示
Four-Part How-To Series Model-Based Design Toolbox (MBDT) is an integrated development environment and toolchain for configuring and generating all the necessary software automatically to execute complex applications. The MBDT includes integrated Simulink® embedded target for NXP processors, peripheral device blocks and drivers, the Math and Motor Control library set, and bit-accurate simulation results. Watch on-demand each of our Model-Based Design Toolbox four-part How-To series and learn the basics of MBDT, also its SPI and CAN communication and its PWM control blocks.   Session 1/4 = Get to Know the User-Friendly NXP MBDT for Application Development in MATLAB/Simulink dumitru-daniel.popa‌ will show you how to configure and use the MBDT, engineered to help you speed up application development in MATLAB/Simulink Environment for NXP hardware. Get to know its main features and capabilities through the creation, simulation, built, deployment, and validation of a basic "hello world" type of application on theS32K144EVB.  Session 2/4 = Introducing the SPI Communication Blocks from NXP MBDT nxf46081‌ will highlight the key aspects of communication in the automotive industry while showing you how to configure and use designated blocks that implement the SPI communication inside the MATLAB/Simulink Environment for creating a quick and easy data transfer application using MBDT and the S32K144EVB. Session 3/4 = Introducing the CAN Communication Blocks from NXP MBDT constantinrazvan.chivu‌ will highlight the key aspects of communication in the automotive industry while showing you how to use MBDT and the S32K144EVB to simplify CAN applications with only a few blocks: configuration, transmit, and receive. Session 4/4 = Introducing the PWM Control Blocks from NXP MBDT mariuslucianandrei‌ will showcase how to start using PWM, its features and functionalities while showing you how to build a first application able to generate different types of PWM signals using MBDT and the S32K144EVB; also, learn to sample the external signals to determine the key values: duty-cycle, period, among others.   Your software development processes can speed up by using the free-of-charge NXP Model-Based Design Toolboxes for MATLAB and Simulink development environments, providing full integration, an out-of-the-box configuration, and action blocks for basic/advanced features for designing complex automotive solutions.
記事全体を表示
1. Introduction This article shows how to develop an application for the UCANS32K1SIC evaluation board in MATLAB ® and Simulink ® and NXP ® ’s Model-Based Design Toolbox.  1.1. General purpose The UCANS32K1SIC is a CAN signal improvement capability (SIC) evaluation board designed for both automotive (ADAS, Body Control Units etc.) and industrial applications (Building Control, Servos, Mobile Robotic, etc.) In total, there are three UCANS32K1 evaluation boards: UCANS32K146-01 UCANS32K1SCT UCANS32K1SIC In this article, we choose to focus only on one of them, the UCANS32K1SIC evaluation board. The UCANS32K1SIC provides two CAN SIC interfaces and is based on the S32K146 (32-bit Arm ®  Cortex ® -M4) from the S32K microcontroller family. Also, the UCANS32K1SIC features EdgeLock ®  SE050 secure element for authentication and encryption development. For complete details, please access the following link 1.2. Block Diagram     2. The UCANS32K1SIC application example model The UCANS32K1SIC application example proposed in this article (ucans32k1sic_mbd_4_3_0) implements the following actions: Controls the RGB LED (GPO) Reads the Switch state  (GPI) Displays  messages on the LCD screen (“Red Led On”, “Green Led On”, “Blue Led On”) using the I 2 C communication protocol Adds FreeMASTER communication via UART protocol Configures  both instances of the CAN communication protocol (CAN0 and CAN1) and sends/receives messages 2.1. Prerequisite Software For the development of this application, the following software is required: MATLAB ® and Simulink ® (minimum 2020a) Stateflow ® MATLAB Coder ™ Simulink Coder™ Embedded Coder ® Support Package for ARM Cortex-M Processors Model-Based Design Toolbox for S32K1xx 4.3.0 FreeMASTER Run-Time Debugging Tool 3.2 2.2. Prerequisite Hardware For the development of this application, the following hardware is required: UCANS32K1SIC evaluation board DCD-LZ-ADAPT debug adapter with cable, which provides breakout connectors for SWD/JTAG Debugger and FTDI USB-UART CAN Bus Terminator (DRONE-CAN-TERM) with MicroUSB cable CAN cable terminated on both ends OLED Display 128x64 pixels JLink Debug Probe (or any other compatible SWD probe) IXXAT USB-to-CAN V2 (or any other canAnalyser )   3. Simulink model implementation and blocks configuration After the NXP Model-Based Design Toolbox for S32K1xx is installed, the next step is to open the library and drag and drop the necessary blocks. The MCU configuration with MBD_S32K1xx_Config_Implementation block   The first step is to add the MBD_S32K1xx_Config_Information into our Simulink model. This action makes the model aware that it will generate code for the S32K1 microcontroller. Once opening the block, the user needs to choose the processor family inside the MCU tab. For this particular board, the processor is S32K146. Then the system clock frequency (MHz) must also be specified: Clock Frequency Value (80 MHz) External Crystal clock - 8 MHz (check the schematics or other materials)     In the Target Connection tab, the following settings are required: The download interface JTAG and SEGGER JLink software. In our case, the kit comes with the SEGGER JLink so we are selecting this one. In case the JLink software is installed at a different location than the default one, the correct path shall be indicated in the “SEGGER JLink installation path” field.       3.1. Reads the Switch state (GPI) In this application, each push of the button selects which color of the RGB LED is lighten up. So, to be able to control that, the state of the button needs to be read. A variable named “counter” stores the values corresponding to each state (0-RED, 1-GREEN, 2-BLUE). The pin corresponding to the SW button reading must be configured (using the schematic for the UCANS32K1SIC evaluation board).                   With each execution of the main step in the model, the GPI Read block triggers the subsystem where the states of the LED are changed.   3.2. Controls the RGB LED (GPO) When the counter is incremented, the LED changes its state (RED-GREEN-BLUE). This is implemented using the GPO Write blocks. The pins corresponding to each LED color must be configured according to the schematic.   After identifying each pin, they must be set in GPO write blocks as follows: To turn on one of the LEDs colors, set the pin to 0 and to turn it off set it to 1. This is because the LED anode is routed to 3V3 and the cathode is connected to the pin. When the application requires to turn on only one color, the others must be turned off, as might be seen in the screenshots below.                            3.3. Displays messages on the LCD screen (“Red Led On”, Green Led On”, “Blue Led On”) using the I 2 C communication protocol For this example, the OLED display used is 128 x 64 pixels. The LCD communicates with MCU via LPI2C0 (P4). So, in order to communicate with the OLED display, the LPI2C instance must be first configured. LPI2C0 block configuration: The pins corresponding to LPI2C0 instance must be configured according to the schematic.                   Next, the OLED block  needs to be configured as follows:   After the LPI2C0 and OLED blocks are configured, messages can be displayed on the LCD screen using the LCD Write String block. LCD Write String block configuration:           To display the other messages (GREEN LED ON and BLUE LED ON), the steps are the same. To clear the LCD screen and  display another message, the LCD Clear Screen must be used.       3.4. FreeMASTER project via UART protocol FreeMASTER is a user-friendly real-time debug monitor and data visualization tool that enables runtime configuration and tuning of embedded software applications. The FreeMASTER block configuration from NXP MBDT for the S32K1xx library uses the following communication interfaces: UART CAN In this example, we used the LPUART1 interface to send/receive messages from the FreeMASTER application. The pins corresponding to LPUART1 (they are routed to the P6 connector) instance must be configured according to the schematic.                              The RxD and TxD pins required routed in the schematics are PTC6 and PTC7. Another parameter that must be configured is the Baud Rate (maximum number of bits per second to be transferred). For this application, the Baud Rate is 115200 kbps.     3.5. Configures of both instances of the CAN communication protocol (CAN0 and CAN1) and sends/receives messages In this subchapter, the goal is to show how to receive/send messages on both CAN instances (CAN0 and CAN1). CAN0 instance First, CAN0 instance needs to be configured. For this action, the CAN configuration block is required. In the General tab, the following settings are: Module: 0 (for the CAN0 instance) Operational Mode: Normal mode Max number of MBs (1-32): 16 The RxD and TxD pins required are: PTE4 and PTE5 (according to the schematic)           In the Bit rate tab, the default Bitrate is 1000Kbit/s, but it depends on the case.     The next step is to choose the operating mode for the CAN transceiver (for UCANS32K1SIC, the CAN transceiver is TJA1463). The TJA1463 is a member of the TJA146x family of transceivers that provide an interface between a Controller Area Network (CAN) or CAN FD (Flexible Data rate) protocol controller and the physical two-wire CAN bus. Control pins STB_N and EN are used to select the operating mode. To simplify the application, the Normal mode has been selected to be set for the entire execution of the application. HIGH-level state on pin STB_N and pin EN selects Normal mode. According to the schematic, for the instance of CAN0, the corresponding pins for STB_N and EN are PTE11 and PTA10. For checking the correctness of the configuration of the settings and application, the transceiver outputs CAN_H and CAN_L are connected to CAN Analyzer, while messages are sent from the PC.           A numeric sequence with the ID 0x3FF is sent continuously while a  message received with ID 0x3FE toggles the PTD15 (Red LED) on each receive. To receive a CAN message asynchronous with the application, the CAN receive interrupt must be used. When a message is received, it triggers the subsystem Rx_0x3FE.     The fcan_s32l_receive block configuration is: Module: 0 Mode: Non-blocking Message Buffer: 14 ID: 3FF ID mask: FFFFFFFF         To send a message with the ID 0x3FF on CAN0, in the fcan_s32l_send block, the following settings are required: Module: 0 Mode: Blocking Timeout (ms): 50 Message Buffer: 15 ID: 3FF       CAN1 instance For the instance of CAN1, the steps are the same as above (the configuration of CAN0), but this time a numeric sequence with ID 0x2FF is sent continuously and a received message with ID 0x3FF will toggle the PTD16 (Green LED) on each receive. A CAN Analyzer is needed to analyze and collect data from the CAN bus and display them on the PC. To use both CAN instances on the same  CAN Analyzer, a hardware connection is needed between CAN0A and CAN1A (or any CAN0 with CAN1). This can be seen in the following diagram:     In this application, the  CAN Analyzer used is IXXAT USB-to-CAN V2 and the software interface is IXXAT canAnalyser3 Mini, but of course, any other CAN Analyzer can be used.       4. Model overview The application is structured in 3 categories as follows: Input (green area): Hardware-dependent blocks that read/receive values from peripherals Algorithm (blue area): Hardware-independent blocks that process the values received from Input blocks, runs the algorithm and controls the outputs. Output (pink area): Hardware-dependent blocks which receive the processed values from the Algorithm blocks.     After all the steps have been followed, the code can be generated, compiled, and deployed on the target. To do so, Go to Simulink -> Apps -> Embedded Coder then click on the Build button.     In the Diagnostic Viewer, the process can be analyzed if there is any error and if the download was successfully completed on the target as in the image below:       The following figure shows the setup:     Conclusion In this article we explained how to use the NXP Model-Based Design Toolbox for S32K1xx to handle the UCANS32K1SIC evaluation board. Access to all the board's peripherals was possible in Simulink by using the Model-Based Design Toolbox, an addon which connects the MATLAB and Simulink high level world with the NXP Tools and Hardware. In this application, we have shown how to control the RGB LED and read the state of the switch; how to display messages on the LCD screen and configure both instances of the CAN communication protocol for sending and receiving messages. We have also added the FreeMASTER communication to monitor or fine-tune the algorithms running on the UCANS32K1SIC board, while the model is available down below.   EdgeLock and NXP are trademarks of NXP B.V. All other product or service names are the property of their respective owners. © 2023 NXP B.V. Arm, Cortex are trademarks and/or registered trademarks of Arm Limited (or its subsidiaries or affiliates) in the US and/or elsewhere. The related technology may be protected by any or all of patents, copyrights, designs and trade secrets. All rights reserved. MATLAB, Simulink, Stateflow and Embedded Coder are registered trademarks and MATLAB Coder, Simulink Coder are trademarks of The MathWorks, Inc. See mathworks.com/trademarks for a list of additional trademarks.
記事全体を表示
      Product Release Announcement Automotive Processing NXP Model-Based Design Toolbox for HCP – version 1.0.0 EAR       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.0.0. This release supports automatic code generation from MATLAB/Simulink for S32G2xx and S32G2xx Automotive MPUs. This new product adds support for running Processor-in-Loop simulation on S32G274A (ARM Cortex-A53) and S32S247TV (ARM Cortex-R52).   FlexNet Location: https://nxp.flexnetoperations.com/control/frse/product?child_plneID=683951   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 Supported Evaluation Boards GoldBox Development Platform (S32G-VNP-RDB2 Reference Design Board) GreenBox II Development Platform Support for MATLAB versions: R2020a R2020b R2021a Simulation mode: We provide support for Processor-in-Loop (PIL) simulation mode with code execution profiling:   Includes the HEV demo:     Includes an Example library that covers: Software-in-Loop, Processor-in-Loop   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 and S32S2xx  processors and evaluation board solutions out-of-the-box with: NXP Model-Based Design Toolbox for HCP version 1.0.0 (EAR) is fully integrated with MATLAB® environment in terms of installation:       Target Audience This release (1.0.0 EAR) is intended for technology demonstration, evaluation purposes and prototyping S32G2xx and S32S2xx and Evaluation Boards.   Useful Resources Examples, Trainings and Support: https://community.nxp.com/community/mbdt  
記事全体を表示
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上的视频
記事全体を表示
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上的视频
記事全体を表示
      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      
記事全体を表示
Introduction This article is going to show how to use the IMXRT117X board in co-simulation mode to run a Deep Learning application of facial recognition. Given that a development board has limited resources, the deployment of a Deep Learning application should be done as efficiently as possible. For now, since the latest version of Matlab (2021a) does not offer support for CNN optimization for Arm Cortex-M processors, we will restrict to developing an application in co-simulation mode. That means that while the data will be provided by the target board, the actual processing will take place in a Matlab environment. By running in co-simulation mode, we will exploit both hardware and the Matlab software capabilities.  The goal of this article is for the user to be able to: use a pre-trained CNN model from Matlab; use the MBDT IMXRT Board Object for co-simulation; develop a standard facial recognition application; Hardware overview For the development of this application, the i.MX RT1170 Evaluation board was used with a MIMXRT1176 CPU, and the attached ON Semiconductor OV5640 camera. Additionally, the RK055AHD091 LCD panel can be used to visualize the frames from the camera. The i.MX RT1170 EVK provides a high-performance solution in a highly integrated board. It consists of a 6-layer PCB with through hole design for better EMC performance at a low cost, and it includes key components and interfaces. Some of the i.MX RT1170 EVK main features are: MIPI camera sensor connector and MIPI LCD connector JTAG connector and On-board DAP-Link debugger Connectivity: 2x Micro-USB OTG connectors, Ethernet (10/100/1000M) connector, Ethernet (10/100M) connector, SIM card slot, CAN transceivers 5V Power Supply connector For a more comprehensive view and a more detailed description regarding hardware specifications and user guides, please check the documentation here. For this example, we are going to make use of the following peripherals and components hence make sure you have all of them available and you are familiar with their intended scope: ON Semiconductor OV5640 camera used for capturing the frames from the board; A CAT-5 ethernet cable will be used for getting video frames from the IMXRT on-board camera to be processed in MATLAB; Mini/micro USB cable for downloading the executable on the target; (Optional, if LCD is used) 5V power supply Software overview Software delivered by MathWorks: MATLAB (version 2021a) (we assume you have already installed and configure this). As a hint, please make sure the MATLAB is installed in a path with empty spaces; MATLAB Embedded Coder is the key component that allows us to generate the C code that will be cross-compiled to be executed on the target; Deep Learning Toolbox allows us to use pre-trained networks or re-train and re-purpose them for other scenarios; Image Processing Toolbox for preprocessing the images before training the network; Computer Vision Toolbox for performing face detection using the Viola-Jones algorithm; Software delivered by NXP: NXP MBDT IMXRT Toolbox as IMXRT embedded target support and plug-in for MATLAB environment to allow code generation and deployment. Make sure you install this toolbox in MATLAB 2021a. Deep Learning – Facial recognition Facial recognition is the process of verifying a person’s identity through their facial features in order to grant access to a service, application, or system. Recognition needs to be performed in 2 steps: 1) face detection – so identifying and isolating the face area from an image and 2) face recognition – analyzing the features of the image and classifying them. In this example, face detection is performed with the CascadeObjectDetector, from the Matlab Computer Vision Toolbox, which is based on the Viola-Jones algorithm, and face recognition will be performed with AlexNet, a pre-trained neural network specialized for object classification. source: https://test.neurohive.io/en/popular-networks/alexnet-imagenet-classification-with-deep-convolutional-neural-networks/ 1.Datasets In order to train the network for our application, custom datasets will need to be generated containing the faces of the people we want to recognize. A challenge that arises regarding the dataset are the changes that occur to a person’s appearance: during the day the mood of a person can change, which may affect their facial expressions; also, the lighting of the room can affect the features, by enhancing or diminishing them; nevertheless, the appearance of a person might vary depending on make-up, hairstyle, accessories, facial hair, etc. Thus, this is something that needs to be taken into consideration when creating the dataset used in training. A recommendation for better performance would be to take samples of a person's appearance multiple times during the day and in different lighting conditions. Another challenge is dealing with the category of unknown people since it is impossible to have and use a picture of every unknown person. A possible approach is to use a threshold value for classifying the pictures so that a person is accepted as “known” only over a certain probability.  Another solution would be to create an additional dataset for the “Unknown” category, which should contain various faces of different people. This way the model should be able to generalize and differentiate between known and unknown people. One of the datasets that can be used for this purpose is the Flickr-Faces-HQ Dataset (FFHQ) which contains over 70,000 images with a high variety in terms of ethnicity, age, emotions, and background. For this example, 6 classes were used, 5 of them representing known people and 1 for unknown people. In order to generate a dataset using the attached OV5640 camera, the Matlab client will connect to the Board Object on the target, it will request frames from the camera and it will save them as BMP files. %% Establish communication with the target board board_imxrt = nxpmbdt.boardImxrt('162.168.0.102', 'Video', 'GET'); %% Request frames from the camera and save them as bmp images count = 0; while (1) % Camera snapshot img = board_imxrt.step(); imwrite(img, [num2char(count) '.bmp']) end The next step is to extract the face area from an image and resize it to 227x227x3 so that it can be given as input to AlexNet. For that, we can create a directory with all the images that we want to train/test the network with and run the following script, which will perform face detection, then crop and resize the images to the desired dimensions. All the scripts and code snippets presented are also included in the attached archive. % Create Face Detector Object faceDetector = vision.CascadeObjectDetector; inputFolder = 'datastorage/to_process'; outputFolder = 'datastorage/processed/'; pictures = dir(inputFolder); for j = 3 : length(pictures) imgName = pictures(j).name; img = imread([inputFolder '/' imgName]); % Perform face detection bboxes = step(faceDetector, img); if(sum(sum(bboxes)) ~= 0) detectedFace = imcrop(img, bboxes(1, :)); % Resize image to fit AlexNet requirements detectedFace = imresize(detectedFace, [227 227]); imwrite(detectedFace, [outputFolder imgName]); end end       2.Training the network For training the network, we need to modify the output layer of the AlexNet network to match the number of classes we use, in this example 6. To improve the results for the case where we might not have enough input data, we can augment the images, and for that, we use the imageDataAugmenter from Matlab, where we set the images to be flipped horizontally and/or vertically, and rotated with a random angle between -90 and 90 degrees. This will help the model to avoid overfitting and generalize better. allImages = imageDatastore('datastorage', 'IncludeSubfolders', true,... 'LabelSource','foldernames'); % Split into train and validation sets [imgSetTrain, imgSetTest] = splitEachLabel(allImages, 0.7, 'randomized'); augmenter = imageDataAugmenter('RandXReflection', true,... 'RandYReflection', true,... 'RandRotation', [-90 90]); augimds_train = augmentedImageDatastore([227 227], imgSetTrain,... 'DataAugmentation', augmenter); augimds_test = augmentedImageDatastore([227 227], imgSetTest,... 'DataAugmentation', augmenter); Set the training options, these can be configured by the user as they wish, for this example, we have used a learning rate of 0.001 and batch size of 64, and have run the model for 7 epochs. opts = trainingOptions('sgdm', 'InitialLearnRate', 0.001,... 'Shuffle', 'every-epoch', ... 'MaxEpochs', 7, 'MiniBatchSize', 64,... 'ValidationData', augimds_test, ... 'Plots', 'training-progress'); trained = trainNetwork(augimds_train, layers, opts); save('trained_50_50_ep7_6classes', 'trained'); Save the trained network into a .mat file. It will be used for classifying the frames received from the camera. 3.Setup For the installation and usage of the MBDT IMXRT Toolbox please refer to this article. Running in co-simulation mode means that the target board is able to communicate with the host (in this case, Matlab) through the TCP/IP protocol, thus exploiting both hardware and Matlab software capabilities. The logic of the application is presented in the following figure: the attached camera will send the captured frames to the computer through an Ethernet connection; there, the frame will be processed using a Matlab script, which will perform Face detection and be further sent to the AlexNet trained classifier, which will return a label and the probability of that label being correct. Then, based on whether the person was recognized or not, a signal will be sent to the IMXRT board to toggle the USER LED. In order to create the executable that will act as the server part of our application, we will create a new Simulink model containing the IMXRT Board Object. For this example, the Board Object is sufficient for creating the co-simulation environment and running the application, for it makes use of both Camera and LWIP functionalities: The next step would be to configure the Board Object in order to be able to communicate with the host: open the Block Parameters window and input the IP address and port number you want to use. In the case of the server, it does not matter whether it is configured in SEND or GET mode, because it will wait for commands from the client. Then the model’s Ethernet parameters need to be configured. Open the Configuration Parameters window from Simulink, select Hardware Implementation from the left menu and then go to the Ethernet tab: here insert the values of the board IP address, subnet mask, and the gateway address.   Connect the board through USB to the computer. Go to the Download tab and select the drive you want to download the executable to. More information about this process is presented here. Also, please make sure that you have selected the NXP MIMXRT117Xxxxxx Hardware Board. The selection of the MIMXRT117X Hardware Board should copy the default ConfigTool MEX file which you can modify, but you can also create or use another MEX file as long as it has the name <model_name>_<core>Config.mex. In the MEX file are configured the peripherals and pins settings, in this case the Camera peripheral and the GPIO User LED. For better performance, we recommend using a low-resolution for the Camera. Build the model and the generated executable will be copied on the target board. Restart the board. Next step is to connect to the target board from Matlab and start receiving frames from the attached camera. For this, we will use a Matlab script that will create a board object configured to request frames from the target. The nxpmbdt.boardImxrt object is the same type as the one used in the previous Simulink model: here we can use it as a function call in a script, so we need to configure it accordingly. For information about how to use the Board Object, use the following command:  The Matlab script that will run in co-simulation and will connect to the target board: load trained_50_50_ep7_6classes.mat trained; faceDetector = vision.CascadeObjectDetector; board_imxrt = nxpmbdt.boardImxrt('162.168.0.102', ... 'Video', 'GET'); while (1) img = board_imxrt.step(); bboxes = step(faceDetector,uint8(img)); if (sum(sum(bboxes)) ~= 0) es = imcrop(img, bboxes(1,:)); es = imresize(es, [227 227]); [label, ~] = classify(trained, es); if ~strcmp(char(label), 'Unknown') board_imxrt.led_on(); else board_imxrt.led_off(); end else board_imxrt.led_off(); end end When running simulation mode from a Matlab script, please make sure that the configuration structure (the script mscripts\target\imxrt_code_gen_config) is configured accordingly with the desired hardware. After the application has received the camera frame from the board, it can start the preprocessing required for classification. We create a face detector object using the CascadeObjectDetector, to which we will input the camera frame and we receive in exchange the margins of the box where it detected a face. In the case a face was detected, we crop the image and resize it to 227x227x3, which is the size the AlexNet network requires, and we classify the image using the loaded model. The USER LED on the board will be switched on if the person was identified. The script also provides a Matlab UI Figure for better visualization.   Conclusions The NXP MBDT Toolbox provides a solution for developing Computer Vision applications targeted for Arm Cortex-M processors. This aims to be a temporary approach until the Matlab support required for generating CNN optimized C code is added.
記事全体を表示
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. 
記事全体を表示
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.
記事全体を表示
In this video we discuss about Open Loop Control strategy and for the first time in this course we will put together all the models we have created so far and build the Simulink model that will allow us to rotate the BLDC motor. We discuss about: - Open Loop Control diagram; - Step-by-step model building an enhancements; - Test the open loop control system on the BLDC motor;   NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
記事全体を表示
Short unedited video - showing the Model Based Design at work on our custom demo platform created with the scope of supporting various scenarios testing.
記事全体を表示
In this video we discuss about power stage (DevKit MotorGD) configuration that involves the configuration and initialization of the MC34GD3000 FET pre-driver via SPI commands and the setup of the FlexPWM peripheral to generate PWM commands to the inverter MOSFETs via pre-driver MC34GD3000.   We discuss about: - Pre-driver MC34GD3000 initialization sequence; - Pre-driver MC34GD3000 programming via SPI; - How to configure and test the FlexPWM peripheral; - How to test and validate the SPI communication between MPC5744P and MC34GD3000; NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
記事全体を表示
In this video we discuss about practical implementation of the motor phase commutation algorithm and how to validate and test such algorithm using different approaches in Model Based Design.    We discuss about: - How to build the commutation table starting from the hall sensor measurement experiment; - How to implement the Software Look Up Tables for rotating the motor in clockwise (CW) or counter clockwise (CCW) directions; - Simulink model that implement the commutation algorithm;   NOTE: Chinese viewers can watch the video on YOUKU using this link 注意:中国观众可以使用此链接观看YOUKU上的视频
記事全体を表示
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上的视频
記事全体を表示
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上的视频
記事全体を表示
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上的视频
記事全体を表示
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上的视频
記事全体を表示