/ap-qmc2g-industrial

The Industrial Drive Development Platform shows how a single i.MX RT1176 Crossover MCU can control up to four different motors, while managing wired or wireless connectivity and an HMI interface.

Primary LanguageCOtherNOASSERTION

NXP Application Code Hub

i.MX RT INDUSTRIAL DRIVE DEVELOPMENT PLATFORM

The i.MX RT Industrial Drive Development Platform software package consists of a reference demo application and API that demonstrate how to take advantage of i.MX RT Industrial Drive Development Platform hardware capabilities to develop a secure, robust and reliable multi-motor control system which meets the requirements, standards and best practices required by commercial industrial products. This significantly reduces the effort required to develop multi-motor control applications and the time-to-market of the product.

The platform shows how a single i.MX RT1176 Crossover MCU can control up to four different motors while managing wired or wireless connectivity and an HMI interface. Leverage this flexible three-board kit to evaluate motor control performance, speed up motor control designs based on the i.MX RT Crossover MCUs and learn to use NXP EdgeLock® security technology to enable safer communications and industrial control.

Documentation and more details not covered by this README are available at:

  • AN13644 App Note: Getting started with i.MX RT Industrial Drive Development Platform – covers technical details for the bring up of the platform.

  • AN13643 App Note: i.MX RT Industrial Drive Development Platform software overview - covers the software feature overview of the application. Note: This Application Software Pack doesn't yet cover all the features described in the application note. Future releases will contain the complete set of features.

  • AN13642 App Note: i.MX RT Industrial Drive Development Platform hardware overview - covers hardware specifications of the boards.

  • Project Website: This overview webpage contains information about the platform, links to documentation and instructions on how to order the HW this Application Software Pack is associated with.

The current Application Software Pack for the i.MX RT Industrial Drive Development Platform covers the full set of features described in the documentation:

  • Motor control
  • Fault handling
  • TSN connectivity
  • Data Logging
  • Board Service – Temperature and Gate Driver status monitoring
  • Local Service - GUI and display handling, buttons and IO handling
  • Web Service + Web Server
  • Cloud Service
  • Cryptography
  • Secure Watchdog
  • Secure Bootloader
  • User Management
  • TSN Motion Controller - (in binary format)

Features added in release 1.2:

  • Web Service + Web Server - used for a remote connection via a web server API with a control panel. The panel is controlled through user accounts with different roles and privileges.
  • Cloud Service - used for a remote connection to a cloud platform.
  • User Management - support for different user roles with specified access privileges.
  • TSN Motion Controller - a binary for the i.MX RT1170, which shows an example TSN Motion Controller application that is able to send trajectory commands to the i.MX RT Industrial Drive Development Platform.

Boards: ISI-QMC-DGC-02

Categories: Industrial, RTOS, Secure Provisioning, Security, Sensor, Motor Control, Graphics, Cloud Connected Devices, Time Sensitive Networking

Peripherals: ADC, CAN, CLOCKS, DISPLAY, DMA, ETHERNET, FLASH, GPIO, I2C, PWM, SENSOR, SPI, UART, USB, WATCHDOG, TIMER

Toolchains: MCUXpresso IDE

Table of Contents

  1. Software
  2. Hardware
  3. Setup
  4. Results
  5. FAQs
  6. Support
  7. Known Issues
  8. Release Notes

1. Software

To be able to run this software pack, make sure to first install the following tools:

2. Hardware

  • Purchase i.MX RT Industrial Drive Development Platform

    • 1x ISI-QMC-DGC02. (Daughter Card)
    • 1x ISI-QMC-DB02. (Digital Board)
    • At least 1x ISI-QMC-PSB02 or 1x ISI-QMC-PSB02B. (Power Stage Board). Note that you can add up to four Power Stage Boards.
    • At least 1x M-2310P-LN-04K motor, if you want to use the motor control capabilities.
  • You will also need either a J-Link or an MCU-Link Debug Probe.

3. Setup

There are a few steps you need to make before you'll be able to run the application. The whole process is described in full detail in AN13644 - Getting Started.

3.1 Step 1: Software Preparation

You need to have West and Git installed and configured into your PATH variable. There are two options for installing this application software pack into MCUXpresso:

  • Option 1: Right-click in the "Installed SDKs" window in the MCUXpresso IDE and choose the "Import remote SDK Git repository" option. Fill the Repository box with https://github.com/nxp-appcodehub/ap-qmc2g-industrial and the Revision box with main.

  • Option 2: Open a Command Line and execute the commands below to gather the whole QMC2G-INDUSTRIAL delivery at revision ${revision} and place it in a folder named ap_qmc2g_industrial.

     west init -m https://github.com/nxp-appcodehub/ap-qmc2g-industrial --mr ${revision} ap_qmc2g_industrial
     cd ap_qmc2g_industrial
     west update
    

    Replace ${revision} with any SDK revision you wish to achieve. This can be main if you want the latest state, or any commit SHA.

    Finally, drag-and-drop the ap_qmc2g_industrial/ folder into the "Installed SDKs" window in the MCUXpresso IDE.

3.2 Step 2: Hardware Preparation

For information about how to assemble the HW, please refer to AN13644 - Getting Started and AN13642 - Hardware overview.

3.3 Step 3: Software Configuration

You can now go into the industrial_app_master_cm7/source/qmc_features_config.h file and configure how many motors you're connecting (MC_MAX_MOTORS), whether a given PSB has an AFE installed (MC_HAS_AFE_MOTORx) and many other features further described in the AN13643 App Note.

3.4 Step 4: Run the Application

Before you can run the application, you need to first provision the Secure Element on the Digital Board. To do this, please follow the steps in the Provisioning chapter of either AN13644 App Note or the Provisioning and Secure Bootloader User Guide.pdf in the tools/ folder.

Make sure to put your device into SDP mode for initial debugging by configuring the boot pins on the Daughter Card to ON-OFF-OFF-OFF.

To run the application from the IDE using a debugger (Release and Debug targets of the CM7 and CM4 projects):

  1. Build both the CM4 and CM7 projects with the same target (Release or Debug).
  2. Start the debug session for the CM7 project first. For CM7, use the pre-configured launch files included in the project (right-click on the launch file and go to Debug As) or re-configure the IDE-generated launch files to the same settings as the pre-configured ones. For the CM4 project, either use the included launch file again or you can let the IDE create the default launch file, open it, go into the JLinkDebugger settings and uncheck the "Attach to a Running Target" option.
  3. Place a breakpoint at the line with ui32ClkADC = CLOCK_GetFreqFromObs(CCM_OBS_ADC1_CLK_ROOT); in main_cm7.c
  4. Run the CM7 application until the breakpoint.
  5. Keep the CM7 debug session open and start the CM4 debug session at the same time.
  6. Run the CM4 application.
  7. Run the CM7 application.

If you want to see the debug output of the application, you can open two serial terminals - one of them for the CM4 and the other for the CM7 project.

If you want to control the application through FreeMASTER, please close the CM4 serial terminal first. You can find the pre-configured FreeMASTER project in the freemaster_exe/ directory. If anything doesn't work, double check the project settings and the path to the AXF file.

To run the application without a debugger and boot from the internal memory (*_SBL targets of the CM7 and CM4 projects), follow the instructions in "tools/Provisioning and Secure Bootloader User Guide.pdf"

4. Results

You should now be able to control the motors through FreeMASTER and make use of all the features available in this release. Please, refer to the abovementioned documentation for more details.

5. FAQs

No FAQs have been identified for this project

6. Support

If you have any questions or find a bug, please submit a New issue in the Issues tab of this GitHub repository.

7. Known Issues

  • Due to the limitations of the App SW Pack project generation, there are some project configurations which can't be set correctly. It is recommended to change these options manually:

    1. Set the Debug and Debug_SBL targets' optimization to "optimize for debug".
    2. Turn on PRINTF FLOAT. (PRINTF_FLOAT_ENABLE=1)
  • There is a known issue with the display output. Due to the framebuffers being stored in the Octal RAM and the logs in the Octal FLASH, writes and reads to both share the same Octal bus. Race conditions can lead to display flickering and "rolling" effects. This is purely cosmetic and once the display content stabilizes, the application continues running without any issues.

  • Some SD cards fail to be correctly read from or written to by the application. If you run into issues after double checking that you performed all of the provisioning and SBL steps correctly, please try a different SD card.

Project Metadata

Board badge Board badge

Category badge Category badge Category badge Category badge Category badge Category badge Category badge Category badge Category badge

Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge

Toolchain badge

Questions regarding the content/correctness of this example can be entered as Issues within this GitHub repository.

Warning: For more general technical questions regarding NXP Microcontrollers and the difference in expected functionality, enter your questions on the NXP Community Forum

Follow us on Youtube Follow us on LinkedIn Follow us on Facebook Follow us on Twitter

8. Release Notes

Version Description / Update Date
1.2 Full-featured release + bug fixes. February 29th 2024
1.1 Bug fixes and additional features including Cryptography, Watchdogs and the Secure Bootloader. August 31st 2023
1.0 Initial release on Application Code Hub December 19th 2022