MCX Microcontrollers Knowledge Base

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

MCX Microcontrollers Knowledge Base

Discussions

Sort by:
MCX N series of highly integrated Arm Cortex-M33 microcontrollers are designed for high performance and low power consumption. MCX N includes intelligent peripherals and on-chip accelerators providing multitasking capabilities and performance efficiency. Select MCX N families include NXP's eIQ® Neutron neural processing unit (NPU) for machine learning applications. The low-power cache enhances system performance, while the dual-bank flash and full ECC RAM support system safety and offer an extra layer of protection and advanced security. These secure MCUs include our EdgeLock® Secure Enclave, Core Profile offering a secure-by-design approach, secure boot with an immutable root-of-trust and hardware-accelerated cryptography. Documents: MCX N Series  MCX N Fact Sheet MCX N Series Hardware Design Guide MCX Nx4x TSI QSG UG10101 MCX Nx4x Power Management User Guide Migration Guide Froom LPC55xx to MCX Nx4x MCX N Series Products: MCX N94/N54/N53/N52/N24:  The MCX N94, N54, N53, N52 and N24 include up to two are based on dual high-performance Arm® Cortex®-M33 cores running up to 150 MHz, with 2 MB of Flash with optional full ECC RAM, a DSP co-processor and an integrated eIQ Neutron NPU. The NPU delivers up to 42x faster machine learning throughput compared to a CPU core alone enabling it to spend less time awake and reducing overall power consumption. The multicore design delivers improved system performance and reduces consumption by enabling smart, efficient distribution of workloads to the analog and digital peripherals.  Documents: Data Sheet MCX N947/946/547/546/536/527/526/247 MCXN_1P02G Errata MCXNx4x_0P02G Errata Reference Manual  Secure Reference Manual  AFCI 8HC Demo QSG Omdia Market Radar: AI Processors for the Edge 2024 MCX N94x MCUs: Bringing more intelligence to the Edge  MCX N23: The MCX N23x is based on a high-performance Arm® Cortex®-M33 running up to 150 MHz, with 1 MB of Flash, 352 kB ECC RAM and SmartDMA. The MCX N23x is optimized for cost, memory and system performance and offers a single core option with efficient distribution of workloads to the analog and digital peripherals. The EdgeLock Secure Enclave on the MCX N23x is a self-contained, on-die hardware security subsystem that has its own dedicated security core, internal ROM, secure RAM and it supports state-of-the-art side-channel attack-resilient symmetric and asymmetric crypto accelerators and hashing functions for security services. Documents: MCX N23x Data Sheet MCXN23x_0P21K Errata Reference Manual Security Reference Manual MCX N23 HLQFP100 Hardware Design Guide Boards: FRDM-MCXN947: FRDM-MCXN947 are compact and scalable development boards for rapid prototyping of MCX N94 and N54 MCUs. They offer industry standard headers for easy access to the MCU’s I/Os, integrated open-standard serial interfaces, external flash memory and an on-board MCU-Link debugger. Documents: FRDM-MCXN947 QSG MCUXpresso SDK Field-Oriented Control of 3-Phase PMSM and BLDC Motors -FRDM-MCXN947 FRDM-MCXN947 Getting Started FRDM-MCXN947 Board User Manual  FRDM-MCXN236FRDM-MCXN236 is a compact and scalable development board for rapid prototyping of MCX N23x MCU. It offers industry-standard headers for easy access to the MCU's I/Os, integrated open-standard serial interfaces, external flash memory and an onboard MCU-Link debugger Documents: FRDM-MCXN236 Development Board QSG Getting Started with FRDM-MCXN236 FRDM-MCXN236 Board User Manual  MCX-N9XX-EVK is a full featured evaluation kit for prototyping of MCX N94 / N54 MCUs. They offer industry standard headers for access to the MCU’s I/Os, integrated open-standard serial interfaces and an on-board MCU-Link debugger with power measurement capability. Documents: Getting Started with MCX-N9XX-EVK MCX-N9XX-EVK Board User Manual MCX N to FRDM Board Mapping: Supported MCU(s) Recommended Board Best fit for  Key Differentiators MCX N94 / N54 / N53 / N52 / N24 FRDM-MCXN947 Rapid prototyping across the MCX N portfolio Arduino-compatible headers, MCU-Link debugger, Ethernet PHY, CAN-FD, camera and LCD expansion support. MCX N94x / N54x MCX-N9XX-EVK Full-featured evaluation, performance benchmarking, advanced prototyping Energy monitoring, external memory support, Ethernet, CAN, PMIC, M.2 expansion, MCU-Link debugger. MCXN236 FRDM-MCXN236 Ultra-low-power IoT devices, battery-powered sensors, edge nodes Arm Cortex-M33 MCU, low-power architecture, integrated analog peripherals, optimized for connected sensing applications.   Applications Notes: Software, hardware and Peripherals AN15071 Implementation of Optical module CMIS protocol over I3C on the MCX N94: This application note introduces how to implement the CMIS protocol demo on an MCX N947 microcontroller using the I3C interface. AN15072 Implementation of an I3C Secondary Bootloader on MCX N947: The I3C interface is widely used in many scenarios, such as data center, PCs, and optical modules. As a result, I3C-based secondary bootloader for firmware updates have become a common requirement. AN14407 DICE Attestation for MCX N Series Devices: This application note explains and provides a demo on how to implement DICE on MCX N series devices. In this implementation, DICE uses the UDS of the device, its hardware state, firmware, and RTF to create a unique identity that gets registered on an offline database system. This offline database system is later used to verify the genuineness of the device. AN14320 Ease ISA/IEC 62443-4-2 Compliance with MCX N Series: This document is addressed to OEMs interested in understanding how the MCX N can be used to facilitate the implementation of ISA/IEC 62443-4-2 requirements. AN14166 MCX N Over-The-Air (OTA) Update by Using SB3 file: This document describes a method to secure OTA via SB3 files. For demonstration purposes, this documentation uses the EVK and onboard Ethernet. AN15087 Implementing Three I2C Target Interfaces Using SmartDMA on the MNC N947: This demo implements three virtual I2C target ports on MCX N947 using SmartDMA-assisted GPIO-style signaling, without dedicating three hardware LPI2C target peripherals AN14900 Using eDMA and Ping-Pong Buffer ti deserialize Multi-Channel ADC Result FIFO:  This application note describes how to use eDMA to tackle the Analog-to-Digital Converter (ADC) result First-In First-Out (FIFO) and deserialize each channel data in FIFO to respective buffer for each channel. It is useful for high-speed and multi-channel ADC result process by reducing CPU loading and improving data processing speed. AN14807 Accelerate FFT Computation with PowerQuad: In high-performance signal processing applications, the Fast Fourier Transform (FFT) plays a critical role. To enhance efficiency, the LPC55 Series and MCX N Series microcontrollers integrate a hardware accelerator called PowerQuad. This application note presents an approach to accelerate FFT computation using PowerQuad while addressing its limitation of a maximum FFT length of 512 points AN14175 Using FlexIO to emulate Quad SPI controller: Quad SPI serves as a common interface for flash memory, Wi-Fi modules, and LCD displays. However, some microcontrollers do not support the Quad SPI interface. In such cases, FlexIO offers a versatile alternative. AN14712 Advanced PowerQuad Operation Guide: This application note provides some information, code snippets, and tips to help users accelerate their calculations with MAU. The MCX N Series microcontrollers feature a powerful and efficient coprocessor called PowerQuad. It operates in parallel with the CPUs to offload intensive mathematical computations and enhance overall performance. AN14650 SmartDMA Cookbook: This application note primarily introduces the internal architecture, main functions, and features of EZH or SmartDMA, and finally lists the usage and meanings of the main instructions AN14520 General MCU PWM DAC Application: This application note introduces how to set the low-cost Digital-to-Analog Converter (DAC) using the PWM output. The main application is household electrical and industry appliances, which need a low cost and accurate DAC without a high-bandwidth requirement.  AN14567 How to implement USB microphone on MCX Series MCUs: This documentation describes how to implement a USB microphone on MCX Series MCUs. The data source could be an external digital microphone or generated data. A USB Audio Class 1.0 (UAC 1.0) and USB Audio Class 2.0 (UAC 2.0) microphone is used in this document. AN14553 Building a GPS Speedometer using GUI Guider and FREM-MCXN947: This application note provides examples to build a GPS-based speedometer with FRDM-MCXN947, LVGL, GUI Guider tool, and a GPS module. The document describes how to deploy LVGL on the MCX Nx4x platform with GUI Guider and SDK. AN14470 How to Use FlexIO State Mode to Generate Center-Aligned PWM: This application note describes how to use the FlexIO state mode to generate a center-aligned PWM waveform on the MCXN series MCUs. AN14259 SDK Example to Write CMPA and CFPA with monotonic Counter dor MCXN947: This document provides an example of changing the Customer Field Programmable Area (CFPA) bit field using the ROM APIs.  AN14532 Migration from Kinetis K Series to MCXNx4x Series: This application note is about migrating Kinetis K series to MCXN94x/N54x series and lists the differences between both the series. AN14543 Connect Barcide Scanner with MCX N Series USB Host port: This application note describes how to build a USB host port connected with a USB barcode scanner using the FRDM-MCXN947 board for demonstration. NXP’s MCX N series devices feature a high-speed (HS) USB port capable of reaching transmission speeds up to 480 Mbit/s and compatible with Full-speed mode. AN14509 How to Use SmartMDA to Implement MDIO Slave Interface on MCX MCU:  This application note describes the use of SmartDMA to implement the MDIO slave interface on MCX series MCUs. AN14479 OTA Recovery Boot Image Stored in 1-bit SPI Flash: This application note describes the step-by-step process to load a recovery image to the external 1-bit SPI flash memory using a secure firmware update. In addition, the steps demonstrate how to trigger a recovery boot from the application using the ROM APIs. AN14300 MCX Nx4x Unleashing the Power of eDMA Controller: his application note provides a working knowledge by covering the following topics: introduction and overview of eDMA controllers, features of the MCX Nx4x eDMA module, interaction between the eDMA and DMA multiplexer (DMAMUX), and configuration advice for applications. AN14423 On-Device Training for Fan Anomaly Detection Using FRDM-MCXN947: This document describes how to prepare the software environment and set up the hardware for fan anomaly detection using FRDM-MCXN947. This demo uses an accelerator sensor on the fan to monitor in real-time whether the fan is operating normally. AN14145 Flash Memory Swap feature on MCX N Series: This application note describes how to use the flash remap feature of MCX series. AN14305 Permanent Magnet Synchronous Motor Field Oriented Control Using MCX Microcontrollers: This application note describes the implementation of Field Oriented Control (FOC) application for a 3-phase Permanent Magnet Synchronous Motor (PMSM) on NXP MCX MCUs, including the N and A series. AN14184 Using SmartDMA for Keyscan on MCX N Series MCU: This application note mainly introduces the Keyscan solution for MCX N series MCU. It includes the introduction of the Keyscan solution, its features and API routines, and a demo. AN14191 How to use SmartDMA to implement Camera Interface in MCXN MCU: This application note describes the parallel interface for the camera solution in MCXN947 and MCXN236. It includes the introduction of camera interface, features, API routines, and demo.  AN14172 Using SmartDMA for Graphic on MCX N Series MCU: This application note introduces the application of SmartDMA on the graphic. AN14196 Flex Pulse Width Modulator (FlexPWM) usage on MCXN MCU: This document introduces several operation modes, including the corresponding implementation, to provide reference for different applications.  AN14253 USB to CAN-FD Adapter based on MCXN Microcontroller: This application note provides two demo examples to build a USB to CAN-FD adapter where the USB retransmits data to the CAN-bus and vice versa. It uses MCX_N9XX_EVK and MCX_N9XX_FDRM boards for the demo.  AN14284 Timing Parameter tuning for FlexIO Emulated Interface: This application note describes how to use additional timers to tune the setup time in SPI master. AN14254 Use QDC/ENC/Quad Timer Peripherals to Calculare the Angle and Speed of the Quadrature Encoder: This application note provides an angle measurement method and an enhanced M/T speed measurement method that can take into account both high and low speeds. AN14167 Internal Reference Clock (IRC) Trim Feature on MCX N Series: This application describe how to use auto-trim feature on MCX N series. AN14241 How to integrate Customer ML Model to NPU on MCX N94x: This document describes how to integrate the customer ML model to NPU on the FRDMMCXN947 board. AN14195 USB Remote Wake-up on MCXN947: MCXN947 contains two USB 2.0 interfaces. USB0 is a full-speed interface. It comprises an On The-Go (OTG) dual-role subsystem with OTG protocol support. AN14185 DCDC Usage on MCXNx4x/Nx3x: This application note is designed to provide a better understanding of the on-chip DCDC module. It offers a comprehensive guide on how to control both basic and advanced parameters, as well as how to configure the DCDC module to work efficiently with other peripherals. AN14178 MCXNx4x Flash Command Example: This document explains how to use the flash command controller to perform flash read and write operations, which can be more efficient than using calls to the ROM API. AN14177 Headset with Touch Function on MCX Nx4x: This application note describes how to use the MCX-N5XX-EVK to implement USB audio with touch control. AN14151 MCX Nx4x MICFIL interface: This application note is based on examples how to leverage the MICFIL coupled with eDMA, interrupts to send the audio stream to the SRAM for postprocessing. AN14146 CANopen Bootloader in MCX N Series: This application note discusses how to implement CANopen bootloader AN14132 Face Detection demo with elQ Neutron NPU Accelerated on MCX N947: This application note shows how to implement the face detection example on the FRDM-MCXN947 board. AN14150 MCX Nx4x Inter-Core Communication Application Note: This application note introduces how dual core devices can communicate using the Mailbox interface. Power Management AN15066 Direct Current arc Fault Circuit Interrupters Solution with Time Series Studio: This application note presents a DC AFCI reference solution based on the MCX N547 MCU. It describes the system architecture, hardware design considerations, and software and algorithm concepts to assist system designers in implementing reliable and standards-compliant arc fault detection solutions AN14180 Estimating Device Lifetime for MCX Nx4x: This document describes the estimated product Power-on Hours (PoH) for the MCX N94x and MCX N54x devices, based on the criteria used in the qualification process. AN14190 OPAMP usage on MCXM947: This application note describes the functions of OPAMP module and how to use OPAMP features on MCXN947. AN14139 Design Considerations for Optimizing Performance with MCX N Series: This application note explains the features of MCX N-series devices that can affect system performance Security AN14148 Secure Boot on MCX N Series: This application note describes the steps for secure boot using the Secure Provisioning Tool (SEC) AN14162 MCX N Debug Authentication: This application note describes the secure debug feature on the MCX N series devices. The document walks through the steps used to configure a device to enable secure debug using the Secure Provisioning Tool. The document also shows the debug authentication steps to unlock the debug port. AN14096 Encryption and Decryption Enablement Using NPX Module on SEC tool:   AN14361 Generating Digital Signature Using ELS ECSIGN command with RTF Enabled: This application note focuses mostly on the ECSIGN command and creates a demo to use it with Run Time Fingerprint (RTF) enabled. The MCX N series SDK contains various ELS command example projects including the ECSIGN usage but not with RTF enabled.  AN14154 Secure Provisioning Guidelines for MCX N Series MCUs: This application note assumes that you are already familiar with the security features available on the MCX N series devices. AN14086 Encryption and Decryption Enablement Using IPED Module on SPSDK Tool: IPED is the abbreviation of Inline Prince Encryption Decryption. The MCX N series devices offer support for real-time encryption and decryption for external flash using the IPED algorithm. Compared to AES, IPED is fast because it can decrypt and encrypt without adding extra latency. IPED operates as data is read or written, without the need to first store data in RAM and then encrypt or decrypt to another space. It operates on a block size of 64 bits with a 128-bit key. This functionality is useful for asset protection, such as securing application code that resides in external NOR flash memory. AN14095 Encryption and Decryption Enablement using IPED Module on SEC Tool: The MCX N series supports seven regions for encryption and decryption. Each crypto region resides at a memory address boundary of the external flash from 0x0800_0000 to 0x0FFF_FFFF. There must be no overlap among these seven ranges. Otherwise, the behavior of IP is undefined. AN14087 Encryption and Decryption Enablement Using NPX Module on SPSDK tool: A trend in embedded processor design is an increasing need for hardware to support cryptographic calculations that are required for system security. There are emerging customer requirements to protect application code and data stored in flash memories in an encrypted form. AN15038 EdgeLock 2GO Provisioning MCUs via Product Type using Secure Provisioning (SEC) tool:  This document offers an outline of the EdgeLock 2GO platform and discusses the "Device provisioning via product type" flow. In this case, the MCUXpresso Secure Provisioning Tool (SEC) is the proxy being used to provision an MCU. AN14670 EdgeLock 2GO Provisioning via SPSDK for MCUs: This document offers an outline of the EdgeLock 2GO platform and discusses the “Device provisioning via proxy” flow. In this case, the SPSDK command line tool is the proxy being used to provision an MCU. AN14687 Ease CRA Compliance with MCX N: This document addresses OEMs who want to understand how the MCX N series can facilitate the implementation of CRA requirements. While the MCX N series provides core security capabilities that can be mapped to the cybersecurity requirements of the CRA, the OEM must fill the remaining compliance gap by performing additional actions.  AN14624 EdgeLock 2Go Provisioning via Secure Provisioning (SEC) tool: This document offers an outline of the EdgeLock 2GO platform and discusses the "Device provisioning via proxy" flow. In this case, the MCUXpresso Secure Provisioning Tool (SEC) is the proxy being used to provision an MCU. AN14460 How to program MCX N series internal flash through ISP: This application note describes how to use USB/UART/SPI/I 2 C ISP to program internal flash of MCX N series MCUs via blhost or MCUXpresso Secure Provisioning Tool AN14544 EdgeLock 2GO Service for MPU and MCU: This application note introduces various methods that the EdgeLock 2GO service can be used with MCU and MPU devices and the features available for each method. AN14248 Recovery Boot from IFR0 for MCX Nx4x: This application note describes the step-by-step process of boot recovery of the signed binary image from Flash Bank 1 IFR 0 of the MCX Nx4x device upon failure of the image execution from the program flash. AN14255 Recovery Boot from 1-bit SPI Flash for MCXNx4x: This application note describes the step-by-step process of boot recovery of the signed binary image from 1-bit SPI flash on the MCXNx4x device upon failure of the image. AN14475 Dual Boot Secure Firmware Update using OTA HTTP Server:  This application note describes the step-by-step process to do a secure firmware update with dual image boot enabled. Covers the example provided in the SDK, which runs from internal flash and what changes are necessary to run from external memory. AN14271 CRC Calculation Features and Performance on MCX: This application note has been divided into two main parts. The first part provides information about the cyclic redundant checker (CRC). The second part introduces the features and performance of the CRC module on an MCX MCU. Training: Introduction: Flexible and Rapid Development with MCUXpresso: Getting Started with Your FRDM Development Boards Fe.... Learn more about NXP's FRDM Development Platform featuring our MCX MCUs portfolio. Discover why specific applications benefit from MCX and features to help differentiate your next product. You will also learn more about the MCUXpresso Developer Experience and how to get started with your FRDM development board. MCX Lab NXP initiative designed to foster collaboration with universities, providing students and educators with cutting-edge hardware, software, and educational resources.  ML/AI: eIQ Time Series Studio Training: Build and Run Time Series ML Models on FRDM-MCXN947 Getting Started with eIQ Time Series Studio Graphics Getting Started with Embedded GUI Development Using GUI Guider and LVGL Useful Links: See some demo videos created based on FRDM-MCXN Application Code Examples Expansion Boards and Accesories: accessories list in Expansion Board Hub compatible with FRDM-MCXN boards. Find displays, rotary, joystick, sensors, and more. Explore the different expansion boards which are supported by software to help you extend and evaluate the features in combination with FRDM-MCXN boards. Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here   
View full article
This document introduces how to configure and use the hardware trigger feature of the Analog-to-Digital Converter (ADC) on the FRDM-MCXA156 development board. It presents an event where using an external button initiates a reading and ADC conversion that reads an analog input from a potentiometer; the resulting digital value is then used to dynamically update the duty cycle of a PWM signal connected to an external output represented by a LED. This example demonstrates the usage of external connections and analog measurement by walking through the modifications required to enable hardware triggering via the Input Multiplexing (INPUTMUX) module.
View full article
These lab guides provide step-by-step instructions on how to take a quantized TensorFlow Lite model and use the Neutron Compiler Tool found in eIQ Neutron SDK to convert the model to run on the eIQ Neutron NPU found on NXP MCU devices.  The eIQ Neutron NPU for MCX N Lab Guide  documents focus on using the Neutron Compiler tool found inside eIQ Neutron SDK to convert a model and then import that converted model into an eIQ MCUXpresso SDK example. There are labs for VSCode, GCC, and MCUXpresso IDE. The labs designed to run on the FRDM-MCXN947 but the same concepts can be applied to other MCX N boards as well. There is a similar NPU lab available for i.MX RT700 too.  Also be sure to also check out the Getting Started community post for more details on the eIQ Neutron NPU. You can also explore the TFLM Getting Started Guide for information on how to use your own model and data for inference.  --- Updated August 2026 for change of neutron-converter to neutron-compiler in eIQ Neutron SDK 3.2.1 release
View full article
Picture1.png Welcome to MCX C15 and MCX C16 Product Training! This page provides access to training materials, presentations, demos, recordings, and supporting resources related to the MCX C15 and MCX C16 MCU family. While live Q&A support will be available during the training period, all content will remain accessible for future reference and self-paced learning.  Instructions  To get started with the MCX C15/C16 training, you will need to have your FRDM-MCXC162 in hand and perform the set-up operations according to the FRDM-MCXC162 Getting Started Page which is a pre-requisite.   Step 1. Mandatory pre-work before starting with the labs:  Getting Started with FRDM-MCXC162 Step 2. After completing the pre-work, download the lab guides. Each lab has its own guide document and a video guide you can use as support material in case you have any question at any step:  Lab0: Introduction to MCX C15/C16 and FRDM-MCXC162 Video  Lab1: Low Power is a Superpower Objectives Download and run your first project from VS Code on the FRDM-MCXC16 Explore the basics of low-power modes Description Load the SDK low-power example, walk through the code flow, and review the available wake-up options. You'll also learn how to connect a current meter to the FRDM board to measure power consumption. Lab Guide Document Video Lab2: Low-Power Sensing Demo Objectives Download and run your first ACH example from VS Code on the FRDM-MCXC16 Explore a low-power sensing application Description Access and download examples directly from ACH in VS Code, then run a real-world low-power sensor use case. Lab Guide Document Video Lab3: PWM Lighting Demo Objectives Learn how to load firmware using LinkServer/LinkFlash and simple production-style scripts Explore the timer and PWM capabilities of the MCXC family Description Use a provided binary and step-by-step instructions to program the board. The demo controls the onboard RGB LED using PWM. Source code will also be available in ACH. Lab Guide Document Video *Lab4: Connecting Expansion Boards to FRDM-MCXC162 Objectives Download an ACH example from VS Code Connect and use expansion boards with the FRDM-MCXC16 Description Connect an expansion board, download the example from ACH, and try a low-power sensing application using an external sensor. Lab Guide Document Video *Additional requirements as below:  Qwiic board: SparkFun Qwiic dToF Imager - TMF8820 - SparkFun Electronics  Qwiic board cable: https://www.adafruit.com/product/4210  MikroE OLED: OLED B click - carries 96 x 39px blue monochrome passive matrix OLED display  Step 3. Forum: Use the orange “ASK A QUESTION” button at bottom of this page to submit questions to the forum. Your questions will be answered by our NXP application engineers.  Step 4. Once you have completed the labs and got all your questions and/or concerns solved in the community, please complete a short satisfaction survey:   FRDM-MCXC162 Training Survey  Step 5. Review the support material and useful links to get you up to speed with some product information, FRDM board information and Getting started. Below also includes additional reading material.   MCX C15/C16 Product Page  FRDM-MCXC162 Tool Summary Page  FRDM-MCXC162 Getting Started Page  MCX C1 Family Factsheet  MCX C15/C16 Datasheet   MCX C15/C16 Reference Manual 
View full article
In this lab, we will learn how to import and run a low-power SDK demo on the FRDM-MCXC162 development board. We will configure the application, build and debug the project, and use a serial monitor to control the available power modes. Hardware requisites: FRDM-MCXC162 Board Type C USB Cable Software requisites: IDE: Visual Studio Code 1.130.0 or later SDK: v26.06.00 Windows OS (It was used Windows 11 for this hands-on) This hands-on describes Low Power SDK Lab Guide Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here 
View full article
In this lab, we will learn how to program a firmware binary onto the FRDM-MCXC162 development board. The lab will guide you through the complete firmware programming process, starting with the required hardware and software, and continuing with the development environment setup. Hardware requisites: FRDM-MCXC162 Board Type C USB Cable Software requisites: IDE: Visual Studio Code 1.130.0 or later SDK: v26.06.00 Windows OS (It was used Windows 11 for this hands-on) Link Server v25.5.59 Any Recent Phyton 3 Version Windows Command Prompt (CMD) This hands-on describes  Firmware Binary Programming Lab Guide Application Code Hub   Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here 
View full article
In this lab, we'll learn how to access Application Code Hub directly from Visual Studio Code, download a low-power sensing application, and run it on the FRDM-MCXC162. Hardware requisites: FRDM-MCXC162 Board Type C USB Cable Software requisites: IDE: Visual Studio Code 1.130.0 or later SDK: v26.06.00 Windows OS (It was used Windows 11 for this hands-on) This hands-on describes Low Power Temperature Sensing Lab Guide Application Code Hub   Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here 
View full article
In this lab, we will learn how to connect and configure expansion boards on the Freedom MCXE 162, including a pressing sensor and a display. Hardware requisites: FRDM-MCXC162 Board Type C USB Cable MikroE OLED B/W Click display in I2C mode SparkFun Qwiic dToF Imager (TMF8820) Software requisites: IDE: Visual Studio Code 1.130.0 or later SDK: v26.06.00 Windows OS (It was used Windows 11 for this hands-on) This hands-on describes Expansion boards Lab Guide Application Code Hub Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here 
View full article
eIQ Time Series Studio includes a command line interface (CLI) that allows you to generate time series models via the command line just like you would in the GUI. Full documentation of this feature can be found in the eIQ TSS documentation. A Quick Start with the basic key commands is also available.  Below is an example using the command line interface with eIQ Time Series Studio: #Assumes the following items: #1) tss_cli is in the executable path (C:\Program Files\NXP\eIQ_TimeSeriesStudio-1.5.5) #2) The dataset is in C:\tss\dataset #3) A workspace will be setup in C:\tss\workspace #4) The license key has already been retrieved from the TSS GUI #5) The TSS GUI is not also concurrently running #Install license Key tss_cli.exe license activate --key <your_key> #Start TSS CLI tss_cli engine launch -e "C:\Program Files\NXP\eIQ_TimeSeriesStudio-2.0.5\tss_engine\tss_engine.exe" --port 18000 --workspace "C:\tss\workspace" #Install license key tss_cli license activate --key <your_key> #Create a classification project for a FRDM-MCXN947 tss_cli project create --project_name cli_fan_project --algo_type cls --device FRDM-MCXN947 --channels 3 --label_target_num 4 #List all projects in the workspace and see details for the newly generated cli_fan_project tss_cli project list tss_cli project query --project_name cli_fan_project #Add training data tss_cli signal list --project_name cli_fan_project tss_cli signal import --project_name cli_fan_project --signal_name ON --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_on.csv --label_id 1 --delimiter " " tss_cli signal import --project_name cli_fan_project --signal_name OFF --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_off.csv --label_id 2 --delimiter " " tss_cli signal import --project_name cli_fan_project --signal_name FRICTION --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_friction.csv --label_id 3 --delimiter " " tss_cli signal import --project_name cli_fan_project --signal_name CLOG --file_path C:\tss\data\fan_state_monitoring_3channel\train\train_clog.csv --label_id 4 --delimiter " " #Check training data tss_cli signal query --project_name cli_fan_project --signal_id 1 #Start training the model. It will print out an opt_ID number, which the first time you run it will be "1". tss_cli optimization start --project_name cli_fan_project -qs --opt_name cli_fan_opt --signals 1 2 3 4 #Get opt_id number while training is running tss_cli optimization list --project_name cli_fan_project #Check how far along the training is and get ranking of models to choose a result_ids tss_cli optimization progress --project_name cli_fan_project --opt_id 1   cli_list.jpg #Can stop the training if feel like have enough results tss_cli optimization stop --project_name cli_fan_project --opt_id 1 #Get the result_ids of the best result. It will also be the top ID when checking the progress above. In this case will use 48 tss_cli optimization results --project_name cli_fan_project --opt_id 1 result_list.png #Get Execution Time estimate for that model tss_cli library time_estimate --project_name cli_fan_project --opt_id 1 --result_id 48   #Get Label Names tss_cli signal list --project_name cli_fan_project label_names.png   #Emulate the library on test data tss_cli emulation launch --project_name cli_fan_project --opt_id 1 --result_ids 48 --test_file_info "1" C:\tss\data\fan_state_monitoring_3channel\test\test_on.csv " " --test_file_info "2" C:\tss\data\fan_state_monitoring_3channel\test\test_off.csv " " --test_file_info "3" C:\tss\data\fan_state_monitoring_3channel\test\test_friction.csv " " --test_file_info "4" C:\tss\data\fan_state_monitoring_3channel\test\test_clog.csv " " #Create a TSS library tss_cli library compile --project_name cli_fan_project --opt_id 1 --result_id 48 --save_path "C:\tss\" --arch "cortex-m33" --toolchain "GCC" #Create a TSS example project tss_cli library sample_project --project_name cli_fan_project --opt_id 1 --result_id 48 --save_path "C:\tss" --arch "cortex-m33" --toolchain "GCC" Here's also some tips and common issues to be aware of:  Windows Workspace Permissions On Windows PCs, specify the workspace location when launching the TSS CLI server. The default workspace on Windows may not work properly due to a permissions issue, resulting in the following error: [PYI-12556:ERROR] Failed to execute script 'server' due to unhandled exception!   Workaround: Specify a workspace directory location where TSS has read/write access with the tss_cli engine launch --workspace <directory_location> argument   Do Not Run CLI and GUI Simultaneously The TSS CLI and TSS GUI should not be run at the same time. Also only one user should interact with the TSS CLI at a time to avoid race conditions in the TSS database if it is on a shared server.    Engine Launch Syntax Correction The TSS CLI documentation uses tss_cli engine launch –engine <path to tss_engine>, but the correct syntax is: tss_cli engine –exe_path <path to tss_engine>   Windows Command Prompt Delimiters When using Windows Command Prompt and importing sensor data with the signal import command, use double quotes (" ") to specify the delimiters (ie a space in this case) instead of the single quotes ('  ')    Terminology Clarification "Optimization" in the documentation refers to the process of training the time series model.   Finding the Optimization ID during training The my-opt-id value can be found by viewing the optimization list with tss_cli optimization list --project_name cli_test_project   Finding the Label Name The label-name value used for emulation commands can be found by viewing the name of the signals with tss_cli signal list --project_name cli_test_project   Boolean Arguments Arguments such as quick search during training are Boolean values, which are automatically enabled when included as part of the command line argument. For example, use -qs rather than -qs true.
View full article
This document describes the complete process required to enable and use GPIOs from a Zephyr Non-Secure application running on the FRDM-MCXN947. It covers the configuration of the AHB security attribution settings, the Zephyr and TF-M project configuration, and the use of the GPIO alias mirror registers to grant Non-Secure access to the desired GPIO ports. After completing these steps, GPIO peripherals can be controlled directly from the Zephyr application while maintaining the security isolation provided by TrustZone.
View full article
When deploying a custom built model to replace the default models in MCUXpresso SDK examples, there are several modifications that need to be made as described in the eIQ Neutron NPU hands-on labs. Here are some common issues and error messages that you might encounter when using a new custom model with the SDK examples and how to solve them. If there is an issue not covered here, then please make a new thread to discuss that issue.  Note: The Neutron Converter tool has been renamed to the Neutron Compiler tool.    “Didn't find op for builtin opcode ‘<operator_name>’” Need to add that operator to MODEL_GetOpsResolver function found in source\model\model_name_ops_npu.cpp A full list of operators used by a model that can be copy-and-pasted into that file is automatically generated by Neutron Compiler Tool with the --dump-header-file-output option at the top of the resulting header file.  Make sure to also increase the size of the static array s_microOpResolver to match the number of operators   “resolver size is too small” Need to increase the size of the static array s_microOpResolver in MODEL_GetOpsResolver function found in source\model\model_name_ops_npu.cpp to match the number of operators     “Failed to resize buffer” The scratch memory buffer for the model is too small for the model and needs to be increased. The size of the memory buffer is set with the kTensorArenaSize variable found in the model data header file The size of this buffer can be estimated when running the Neutron Compiler tool in the "Total data" field but this estimate is often slightly smaller than the actual amount used. The actual TensorArenaSize buffer required can be determined when running the model by calling s_interpreter->arena_used_bytes(); which is printed out to the serial terminal in the eIQ MCUXpresso SDK examples. The recommendation is to use the estimation but increase by ~10%, run the model, and then use the arena_used_bytes API to determine the true amount of scratch memory required.   “Internal Neutron NPU driver error 281b in model prepare!” or “Incompatible Neutron NPU microcode and driver versions!” Ensure the version of the eIQ Neutron Compiler Tool used to convert the model is the correct one that is compatible with the NPU libraries used by the SDK project.  See this Community Post for how to update the eIQ Neutron libraries.     Camera colors are incorrect on FRDM-MCXN947 board See this Community post for more details on using a camera with the FRDM-MCXN947 Modify solder jumpers SJ16, SJ26, and SJ27 on the back of board to move them to the left (dashed line side) to connect camera signals properly.             anthony_huereca_0-1709071420874.png This modification will disable Ethernet functionality on the board due to a signal conflict with EZH D0 and ENET_TXCLK. If your project needs both camera and Ethernet functionality, then only move SJ16 and SJ26 to the left (dashed line side) and then connect a wire from P1_4 (J9 pin 😎 to the left side of R58. Then in the pin_mux.c file in the project, instead of using PORT1_PCR4 for EZH_Camera_D0, use PORT3_PCR0.            anthony_huereca_1-1709071421059.png                
View full article
The MCX N microcontroller family includes an eIQ Neutron N1-16 NPU for accelerating neural network models. The FRDM-MCXN947 development board can be combined with a camera and LCD screen to showcase running TinyML vision models on a microcontroller.   MCX N Camera Hardware Setup: The following hardware is used: MCX N FRDM Development Board - FRDM-MCXN947 OV7670 camera (with optional wide-angle lens) NXP LCD-PAR-S035  There are three small modifications needed for the FRDM-MCXN947 board for camera support. Without this modification the camera colors will be incorrect and tinted red.   Change SJ16, SJ26, and SJ27 found on the back of the Rev B board to connect pin 3 (the dashed side) so that it looks like the following:          anthony_huereca_0-1770329042521.png Then connect the camera and LCD to the FRDM-MCXN947: Plug in the OV7670 camera into J11. It should line up with the orange box.         anthony_huereca_1-1770329080269.png                   anthony_huereca_2-1770329086311.png     Connect the LCD-PAR-S035 LCD into J12. It should be flush with the bottom so that the top 2 rows of pins are left hanging off the edge. Also note that on some LCD-PAR-S035 boards those top two rows of pins are not installed.          anthony_huereca_3-1770329095085.png   It should look like the following when complete           anthony_huereca_4-1770329100729.png   Also as the camera and Ethernet pins are shared, if you need to use the Ethernet+Camera at the same time please see this NXP Community post. MCX N Vision ML Examples: The NXP Application Code Hub contains several vision AI/ML examples: Face Detect Face Detect with Zephyr Multiple Person Detection  CIFAR10 Fashion MNIST There are also Multimedia Processing Pipeline (MPP) examples inside the MCX N MCUXpresso SDK that demonstrate more examples of using vision AI/ML on MCX N. These examples are only available for VSCode/GCC in the Repository-Layout SDK package. Note: It is recommended to use MCUXpresso SDK 25.09 for these examples. The MPP issues in the 25.12 and 26.03 MCUXpresso SDK releases should be fixed in the upcoming MCUXpresso SDK 26.06.  anthony_huereca_5-1770329951165.png   MCX N ML Vision Lab: The attached eIQ Neutron NPU for MCX N Lab Guide - Face Detect.pdf lab document walks through the steps to download an example Face Detect ML project from the NXP Application Code Hub and use the eIQ Neutron Compiler tool to convert a model. It also describes how to update the eIQ and Neutron software libraries in an older MCUXpresso SDK project to work with the latest eIQ Neutron SDK libraries. It is recommended to go through the general MCX N NPU Lab Guide first and then do the attached Face Detect lab second.  The lab is also included below: 1  Lab Overview This document will demonstrate the acceleration provided by the eIQ Neutron NPU using the Multiple Face Detection demo for the FRDM-MCXN947 found on the NXP App Code Hub. The demo will run with the non-NPU optimized model and then the performance can be compared to the NPU optimized version of that same model. It also demonstrates how the NPU optimized version of the face detect model was generated. This lab is written for MCUXPresso IDE but the same basic steps can be used for VSCode or GCC.   This lab will also cover how to update the Neutron NPU libraries in the project, as the original Face Detect example uses an older Neutron library version.   It is highly recommended to complete the eIQ Neutron NPU for MCX N Lab Guide before starting this lab. 2  Software and Hardware Installation This section will cover the hardware and software needed for this lab. 2.1 Hardware The following hardware is required for this lab: MCX N FRDM Development Board - FRDM-MCXN947 OV7670 camera (with optional wide-angle lens) NXP LCD-PAR-S035 2.2 NXP Software Installation          Install MCUXpresso IDE v25.6 or later. Download the latest eIQ Neutron SDK Download and unzip the latest MCUXpresso SDK for FRDM-MCXN947 using MCUXpresso SDK builder Search for the FRDM-MCXN947 board anthony_huereca_0-1779252823521.png     Then click on Others anthony_huereca_1-1779252835626.png   On the SDK builder page, make sure to select the “eIQ” middleware and that the MCUXpresso IDE toolchain is selected. Then click on Build SDK.   anthony_huereca_2-1779252845567.png   Then click on the Download button and accept the license agreement to download the zip file. anthony_huereca_3-1779252852536.png     3   Face Detection Example 3.1 Download Face Detect Demo from App Code Hub The code for this lab can be found on the NXP Application Code Hub hosted on Github, and we can use MCUXpresso IDE to directly import the Face Detection example from App Code Hub.   Drag-and-drop the FRDM-MCXN947 SDK zip file into the Installed SDKs window, located on a tab at the bottom of the screen named “Installed SDKs”. You will get the following pop-up, so hit OK. anthony_huereca_4-1779252865811.png   Once imported, the Installed SDK tab will look something like this:  anthony_huereca_5-1779252872648.png   In the Quickstart Panel found in the lower left corner, click on Import from Application Code Hub.. anthony_huereca_6-1779252877943.png   In the dialog box that pops up there are many filters available to filter for different devices and types of demos. But since the name of the demo we are interested in is already known, the search box will be faster. Select the AI/ML category and then type in “face detection” and then click on the “Multiple face detection on mcxn947” demo. Make sure you don’t accidently click on the “Multiple Person Detection” demo. anthony_huereca_7-1779252885931.png   On the popup that comes up, click on GitHub link at the top. At that point the Next button at the bottom will become clickable so click on that. anthony_huereca_8-1779252891875.png     The next screen displays the possible branches. In this case there is only main so just click on the Next button at the bottom to go with the default. anthony_huereca_9-1779252899673.png   The next dialog box determines the location on your computer where the code will be downloaded to. You can leave it at the default location if desired or click on Browse to pick your own location. Then click on Next. anthony_huereca_10-1779252906645.png   The next screen will download the code and ask about importing the project. Click on Next to go with the default Import existing Eclipse projects option. anthony_huereca_11-1779252913518.png   Then finally on the last screen click on Finish to import the project into your MCUXPresso IDE workspace. anthony_huereca_12-1779252920739.png   You may get the following warning due to the project being made on an older version of the SDK. Then hit OK to accept the using the newest version. anthony_huereca_13-1779252927267.png  15. It should look like the following when done: anthony_huereca_14-1779252934804.png     3.2 Convert Model The demo is already using a model that was converted to take advantage of the eIQ Neutron NPU. This purpose of this section of the lab is to teach new NXP users how that model was converted. Unzip the eIQ Neutron SDK package in a directory of your choosing.   Optionally add <unzip_location>\eIQ_NeutronSDK_<version>\bin to your executable path so that the neutron-compiler utility can be directly called from the command line. Back in MCUXpresso IDE, find the location of the original non-converted model used for this demo by right clicking on the face_detect.tflite file in source/model/ and going to Utilities->Open directory browser here. anthony_huereca_15-1779252951720.png   Copy the directory location as it will be used in the next step anthony_huereca_16-1779252958805.png   Open a Windows Command prompt and navigate to the directory where the model was at from the previous step             anthony_huereca_17-1779252967083.png   Use the Neutron Compiler to convert the Face Detection model: neutron-compiler --input face_detect.tflite --output face_npu.tflite --target mcxn94x anthony_huereca_18-1779252973705.png     3.3 Update eIQ Neutron Libraries The Face Detect ACH example uses an older version of the eIQ Neutron libraries, and so it needs to be updated to match the Neutron libraries in newest eIQ Neutron SDK since the model was converted with that version of the Neutron Compiler tool.   In the frdmmcxn947_multi_face_detection project, right click on the eiq folder and go to Utilities->Open directory browser here anthony_huereca_19-1779252981696.png   Overwrite the Neutron files from the eIQ Neutron SDK folder into your project to update the Neutron libraries to the latest version: File Name Source Directory in eIQ Neutron SDK Target Directory in MCUXpresso SDK libNeutronDriver.a target\mcxn94x\board\ eiq\neutron\mcxn\cm33 libNeutronFirmware.a target\mcxn94x\board\ eiq\neutron\mcxn\cm33 NeutronDriver.h target\mcxn94x\driver\include\ eiq\neutron\driver\include NeutronErrors.h target\mcxn94x\common\include\ eiq\neutron\common\include After the new Neutron libraries are copied over, clean the project to ensure the new libraries will be used anthony_huereca_20-1779252988773.png     3.4 Board modifcations There are some hardware modifications to the MCX FRDM board required for this demo since the camera pins are muxed with the Ethernet pins and the Ethernet functionality is the default.   The board version can be determined by scanning the QR code on the back of the MCX FRDM board with your phone. Most people will have Rev B boards. anthony_huereca_21-1779252995826.png   Rev A: Remove the R157, R158, and R159 resistors from the back of the Rev A board so that it looks like the following: anthony_huereca_22-1779253003945.png   Rev B: Change SJ16, SJ26, and SJ27 found on the back of the Rev B board to connect pin 3 (the dashed side) so that it looks like the following: anthony_huereca_23-1779253007749.png       3.5 Connect the camera and LCD Plug in the OV7670 camera into J11. It should line up with the orange box. anthony_huereca_24-1779253014542.png anthony_huereca_25-1779253017946.png   Connect the LCD-PAR-S035 LCD into J12. Note that some older LCD-PAR-S035 LCDs may have an extra set of pins soldered on, and in that case the extra 2 rows of pins should be hanging off the edge like in the photo below.             anthony_huereca_26-1779253024933.png   It should look like the following when complete anthony_huereca_27-1779253031139.png     3.6 Run Models Now open up model_data.s by double clicking on it, and then modify line 43 to point to the original (non NPU converted) model file named face_detect.tflite. This particular project uses the .tflite file directly. anthony_huereca_28-1779253042408.png   Build the project by clicking on the Build icon in the Quickstart Panel anthony_huereca_29-1779253048317.png   Then download and run the project by clicking on the Debug icon in the Quickstart Panel anthony_huereca_30-1779253054552.png     You should see the demo working with an inference time of 817ms printed on the LCD display. Note: The default camera on the OV7670 is not very wide angle so you have to hold it fairly far back. There are wide-angle lenses that can be purchased to make it easier to demonstrate. Note: After POR there may be some glitching on the camera due to the fact the camera is expecting 2.8V but the board is at 3.3V and the initial HSYNC signal was missed. Press the reset button (SW1) and it should fix any camera issue.  Now let’s use the Neutron optimized model by opening model_data.s again and this time selecting the NPU converted model face_npu.tflite anthony_huereca_31-1779253063971.png   Recompile and reprogram the board. You’ll see it is significantly faster with a 22ms inference time, a 37x improvement!   4  Conclusion This lab demonstrated how the eIQ Neutron NPU on MCX N devices can significantly decrease inference time on quantized models and the steps to generate a NPU optimized model using the command line tools. Also explore the other App Code Hub ML examples available online.
View full article
MCUXpresso for Visual Studio Code (VS Code) provides an optimized embedded developer experience for code editing and development. The extension enables NXP developers to use one of the most popular embedded editor tools and provides an easy and fast way to create, build and debug applications based on MCUXpresso SDK or Zephyr projects.   Install it following the next steps: Download Visual Studio Code from Microsoft Store or visual studio code web page Download Visual Studio Code - Mac, Linux, Windows Access to vscode for MCUX wiki and download MCUXpresso Installer  Dependency Installation · nxp-mcuxpresso/vscode-for-mcux Wiki · GitHub Run MCUXpresso Installer: MCUXpresso SDK Developer Arm GNU Toolchain Standalone Toolchain Add ons Linkserver PEmicro neidys_vargas_0-1782232556890.png   Installing the FRDM-MCX SDK  Each MCU has its own SDK that includes driver, examples, middleware, docs and other components. To get and build the demo, let’s install the SDK into VS Code. Install the NXP’s GitHub SDK: Once MCUXpresso for Visual Studio Code is installed, open VS Code. Go to MCUXpresso for VS Code extension that is on the tools column at the left. neidys_vargas_1-1782232711167.png Look for INSTALLED REPOSITORIES option and press ‘+’ (Detail steps are described in wiki page. Working with MCUXpresso SDK · nxp-mcuxpresso/vscode-for-mcux Wiki · GitHub).                                               neidys_vargas_2-1782232751534.png Search for the remote option of the Import Repository window. neidys_vargas_3-1782232782659.png Select the MCUXpresso SDK in the repository option to download the GitHub SDK, then in the Revision tab you can select either the “main” revision or to select a specific version), optionally you can change the repository name and location. neidys_vargas_4-1782232886818.png Finally click on the “Import” button.
View full article
The MCX C series MCUs, powered by Arm® Cortex®-M23 up to 72 MHz or Arm® Cortex®-M0+ up to 48 MHz, are designed for cost effectiveness and efficiency, making them ideal for low-end Industrial and IoT applications. Featuring precision analog peripherals as well as USB and segment LCD options, these MCUs cater to diverse needs. The MCX C Series extends the classical IPs within NXP MCUs, providing flexible and scalable memory and packages. MCX C MCUs offer features like USB and segment LCD support, making them ideal for a wide range of general-purpose applications. With a focus on versatility, these MCUs provide the performance and scalability needed for today’s evolving technology demands. Documents: MCX C Series  MCX C Fact Sheet MCX C Series Products MCX C04x:  The MCX C04x microcontrollers, featuring an Arm® Cortex®-M0+ core, offer 32 KB Flash, 2 KB SRAM, and 8 KB boot ROM. Designed as entry-level MCUs, they prioritize simplicity and ease of use for a variety of applications. Key peripherals include a 12-bit ADC, comparator and multiple-channel timer/PWM modules. The enhanced low-power architecture ensures efficiency, with static power consumption as low as 2.2 μA and a 7.5 μs wake-up time for full retention. In deep sleep, static mode power consumption drops to just 77 nA. This series supports scalable memory options and flexible packaging, accommodating diverse application needs. Documents: MCX C041 Sub-Family Reference Manual Data Sheet - MCX C04X Errata: MCXC041 Mask Set MCX C14x/C24x/C44x: The MCX C14x/24x/44x microcontrollers, featuring an Arm® Cortex®-M0+ core, offer a range of memory configurations, from 32KB to 256KB Flash and up to 32KB SRAM, with 16KB Boot ROM. These entry-level MCUs are optimized for cost-sensitive and battery-powered applications requiring low-power USB connectivity and segment LCD support. The FlexIO technology enables customization for various serial peripheral emulation needs. They feature optimized low-power modes, achieving efficiency down to 54uA/MHz in very low-power run mode and 1.96 uA in deep sleep mode with retained RAM and RTC. Documents: Data Sheet - MCX C24x/C14x Data Sheet - MCX C44x Errata:  MCXC - x41 x42  Errata: MCXC - x43 x44 MCX C44x Sub-Family Reference Manual MCX C24x Sub-Family Reference Manual MCX C15/C16: The MCX C15 and MCX C16 microcontrollers (MCUs) are low‑cost, entry‑level devices featuring an Arm® Cortex®‑M23 core running at up to 72 MHz, with memory configurations offering up to 64 KB of flash memory and 16 KB of static random‑access memory (SRAM). These devices bring precision analog and control peripherals into the low‑cost, entry‑level MCU class, making advanced features—such as a 16‑bit analog‑to‑digital converter (ADC), comparator with digital‑to‑analog converter (DAC) and flexible pulse‑width modulation (FlexPWM) for motor control—accessible to cost‑sensitive IoT applications. Designed as an upgrade path from legacy 8‑bit and 16‑bit MCUs, as well as devices based on Arm Cortex‑M0+ cores, this entry‑level 32‑bit MCU series delivers higher performance and greater scalability without increasing costs. Documents: Data Sheet -MCX C151/C161/C162  Fact Sheet - MCX C1 Family Boards: FRDM MCX C444: FRDM-MCXC444 is a compact and scalable development board for rapid prototyping of MCX C444 MCU. It offers industry-standard headers for easy access to the MCU's I/Os, integrated open-standard serial interfaces and onboard MCU-Link debugger.  FRDM-MCXC444 QSG Getting Started with FRDM-MCXC444 FRDM-MCXC444 Board User Manual FRDM MCX C242: FRDM-MCXC242 is a compact and scalable development board for rapid prototyping of MCX C242 MCU. It offers industry standard headers for easy access to the MCU’s I/Os, integrated open-standard serial interfaces and on-board MCU-Link debugger. FRDM-MCXC242 QSG Getting Started with MCXC242  FRDM-MCXC242 Board User Manual  FRDM-MCX C041:  is a compact and scalable development board for rapid prototyping of MCX C041 MCU. It offers industry-standard headers for easy access to the MCU’s I/Os, integrated open-standard serial interfaces and onboard MCU-Link debugger. FRDM-MCXC041 QSG Getting Started with FRDM-MCXC041 FRDM-MCXC041 Board User Manual MCX C to FRDM Board Mapping Supported MCU(s) Recommended Board Best fit for  Key Differentiators MCXC041 (16QFN, 24QFN) FRDM-MCXC041 Ultra-Low-cost entry-level designs  32KB flash - 2KB SRAM- 48MHz Cortex M0+ - LPUART - SPI - I2C - ADC MCX C141/ C142/ C241/ C242 /C441 /C442 / C444 FRDM-MCXC444 General-purpose USB and Segment LCD application Industrial / Consumer Up to 256KB Flash - 32KB SRAM - 48MHz Cortex-M0+ - USB FS 2.0 - SLCD - FlexIO - DMA 0 CAN-FD - Multiple UART/SPI/I2C MCX C151/ C152/ C161/ C162 FRDM-MCXC162 Motor Control Precision analog Power tools    medical devices Up to 64KB flash - 16KB SRAM - 72MHz Cortex-M23 - 16-bit ADC 2.4MSPS - FlexPWM - 4xUART - 45 GPIO   Application Notes: Software, Hardware and Peripherals: AN14321 Using Segment Liquid Crystal Displays (SLCD) Controller on MCX C444 MCU: This document describes the usage of the on-chip SLCD controller by enabling an SLCD device called S401M16KR. The S401M16KR is a four-digit 0.17-inch seven-segment LCD panel. AN14590 Running RT-Thread on MCUXpresso IDE: This document is intended for the users who are familiar with RT-Thread and want to port it to MCUXpressoIDE. It provides steps to streamline the porting process. The porting steps are applicable to other NXP chips also. This document uses FRDM-MCXC444 as an example. AN14319 FlexIO Emulating UART with IRDA: This application note introduces how to use the universal peripheral module FlexIO for emulating the UART bus with IRDA. The FlexIO peripheral, initially introduced on the MCXC242 and MCXC444 family, is a highly configurable module capable of emulating a wide range of different communication protocols. These communication protocols include UART, I2C, SPI, I2S, and so on. AN14322 USB to multi VCOM on MCX C444 Series MCU: This document describes how to implement a USB to functions of multiple VCOMs on MCX C444 series FRDM boards. AN14349 Emulating I2C Bus Controller by using FlexIO on MCX C: This application note lists the steps to use the FlexIO module for emulating the I2C bus controller Power Management:  AN14811 Estimated Power-on Hours for the MCX C04x, MCX C14x, MCX C24x and MCX C44x: This document describes the estimated product power-on hours (PoH) for the MCX C04x, MCX C14x, MCX C24x, and MCX C44x industrial MCUs. It uses the criteria from the qualification process. AN14332 MCX C444 Power Mode Switch Application: This application note focuses on the power management controller (PMC), system mode controller (SMC), Multipurpose Clock Generator Lite (MCG-Lite), and Low-Leakage Wakeup Unit (LLWU). Training: Design without Bounds FRDM Training and Resources FRDM Training Hub Useful Links: FRDM Boards Enclosures (3D Print) MCX C:  How to Enter the ROM Bootloader to Update the firmware MCUXPresso for Visual Studio Code - MCX MCUXpresso Config Tool for MCUXpresso IDE MCUXpresso Config Tool for 3rd party IDE Download Firmware to MCX microcontrollers over USB, I2Cm UART, SPI, CAN Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here   
View full article
1. Overview The MCX N947 chip is a highly integrated microcontroller with robust processing capabilities, extensive peripheral support, and advanced security features, making it suitable for various complex applications. One of its critical peripherals is FlexSPI. FlexSPI is an expandable serial peripheral interface mainly used to connect solid-state storage devices such as QuadSPI NOR Flash, QuadSPI NAND Flash, and HyperRAM. FlexSPI is a comprehensive, flexible, high-performance solution that can be configured in different modes to support various storage devices. The NXP FRDM-MCXN947 board is a low-cost design and evaluation board based on the MCXN947 device. NXP provides tools and software support for the MCXN947 device, including hardware evaluation boards, integrated development environment (IDE) software, sample applications, and drivers. By default, the FlexSPI interface on this board connects to an MT35XU512 NOR Flash. HangZhang_0-1730888828117.png In this article, we will explore how to connect HyperRAM to the FlexSPI interface of the MCXN947 board. Hardware environment:   Development Board: FRDM-MCXN947   HyperRAM:W956A8MBYA Software environment:   IDE:MCUXpresso IDE v11.9.0   SDK:SDK Builder | MCUXpresso SDK Builder (nxp.com) 2. HyperRAM Schematic Below is the official eight-line Flash schematic from the FRDM-MCXN947. Since the HyperRAM W956D8MBYA package is a TFBGA 24-Ball 5 x 5 Array, it can be directly replaced. HangZhang_1-1730889003809.png Based on the above schematic, the signal connections for the HyperRAM memory are summarized in Table. HyperRAM Signal Connection Table HyperRAM Chip Pin Function Connected to MCXN947 CS CS Chip Select Signal P3_0/FLEXSPI0_A_SS0_b SCK SCK Clock Signal P3_7/FLEXSPI0_A_SCLK DQS DQS Signal P3_6/FLEXSPI0_A_DQS DQ0 OSPI Data Signal D0 P3_8/FLEXSPI0_A_DATA0 DQ1 OSPI Data Signal D1 P3_9/FLEXSPI0_A_DATA1 DQ2 OSPI Data Signal D2 P3_10/FLEXSPI0_A_DATA2 DQ3 OSPI Data Signal D3 P3_11/FLEXSPI0_A_DATA3 DQ4 OSPI Data Signal D4 P3_12/FLEXSPI0_A_DATA4 DQ5 OSPI Data Signal D5 P3_13/FLEXSPI0_A_DATA5 DQ6 OSPI Data Signal D6 P3_14/FLEXSPI0_A_DATA6 DQ7 OSPI Data Signal D7 P3_15/FLEXSPI0_A_DATA7 3. HyperRAM Configuration Process 3.1 Clock configuration The clock for FlexSPI needs to be correctly configured. HangZhang_2-1730889103420.png   During the programming phase, it is safer to choose a lower frequency; here, we select 75MHz. 3.2 FlexSPI Initialization Configuration Structure Next, we configure the FlexSPI-related settings. We can call FLEXSPI_GetDefaultConfig to obtain some default configurations for the FlexSPI feature structure flexspi_config_t, which has a certain degree of universality and is compatible with most FlexSPI devices. For the W956D8MBYA HyperRAM, on the basis of the default configuration, add the following parameters: config.ahbConfig.enableAHBPrefetch = true; config.ahbConfig.enableAHBBufferable = true; config.ahbConfig.enableReadAddressOpt = true; config.ahbConfig.enableAHBCachable = true; config.rxSampleClock = kFLEXSPI_ReadSampleClkLoopbackFromDqsPad; (1) enableAHBPrefetch: Whether to enable AHB prefetching. When enabled, FlexSPI reads more data than the current AHB burst read. (2) enableAHBBufferable: Whether to enable AHB write buffer access. After executing a write command, it returns without waiting for its completion, allowing subsequent instructions to continue executing, enhancing system concurrency. (3) enableReadAddressOpt: Controls whether to remove the AHB read burst start address alignment restriction. If enabled, burst read addresses are not restricted by byte alignment. (4) enableAHBCachable: Enables AHB bus cacheable reads. If a hit occurs, data is read from the cache, but data consistency must be ensured. (5) rxSampleClock: The clock source used for reading data. For HyperRAM, HyperRAM provides a read strobe pulse and inputs it through the DQS pin. 3.3 Detailed Explanation of FlexSPI External Device Configuration Structure When FlexSPI communicates with external devices, it often needs to coordinate communication timing with the device, such as clock frequency and data validity duration. NXP's software library provides the flexspi_device_config_t structure specifically for configuring these parameters. typedef struct _flexspi_device_config { uint32_t flexspiRootClk; bool isSck2Enabled; uint32_t flashSize; flexspi_cs_interval_cycle_unit_t CSIntervalUnit; uint16_t CSInterval; uint8_t CSHoldTime; uint8_t CSSetupTime; uint8_t dataValidTime; uint8_t columnspace; bool enableWordAddress; uint8_t AWRSeqIndex; uint8_t AWRSeqNumber; uint8_t ARDSeqIndex; uint8_t ARDSeqNumber; flexspi_ahb_write_wait_unit_t AHBWriteWaitUnit; uint16_t AHBWriteWaitInterval; bool enableWriteMask; } flexspi_device_config_t; (1) flexspiRootClk = 75000000, this parameter matches the previously set FlexSPI clock frequency. (2) flashSize = 0x2000, the size of the Flash in kilobytes. For W956D8MBYA, 64Mb = 8MB = 8 * 1024KB. (3) CSIntervalUnit = kFLEXSPI_CsIntervalUnit1SckCycle, this parameter configures the time unit for the interval between CS signal lines. (4) CSInterval = 2, this parameter configures the minimum time interval for switching between valid and invalid states of the CS signal line, measured in the units defined by the above CSIntervalUnit member. (5) CSHoldTime = 3, this parameter sets the hold time for the CS signal line, measured in FlexSPI root clock cycles. (6) CSSetupTime = 3, this parameter sets the setup time for the CS signal line, measured in FlexSPI root clock cycles. HangZhang_3-1730889289824.png HangZhang_4-1730889315639.png According to the MCXNx4x datasheet,T_CK = 6ns,the minimum T_CSS = 8.3ns,and the minimumT_CSH = 9.8ns。The clock period for 75MHz is approximately 13.3 nanoseconds. Therefore, both CSHoldTime and CSSetupTime should be greater than or equal to 1, So they can be configured to 3 (1) dataValidTime=2,Registers DLLACR and DLLBCR are used to configure the valid data time in communication, with the unit being nanoseconds. HangZhang_5-1730889374119.png HangZhang_6-1730889387938.png(2) columnspace = 3,which is the width of the low-order column address. For this HyperRAM, it uses row and column addresses for access, with a column address width of 3 bits. (3) enableWordAddress = true,this parameter is configured whether the 2-byte addressable function is enabled. Once enabled, HyperRAM will be accessed using a 16-bit data format. (4) AWRSeqIndex = 1,this parameter is the index of the write timing sequence in the LUT. (5) AWRSeqNumber =1,this parameter configures the number of sequences for AHB write commands. (6) ARDSeqIndex = 0,this parameter is the index of the read timing sequence in the LUT. (7) ARDSeqNumber =1,this parameter configures the number of sequences for AHB write commands. (8) enableWriteMask = true,this parameter is used to set whether to drive the DQS bit as a mask when writing to external devices via FlexSPI. This feature is used for address alignment when accessing data widths of 16 bits. 3.4 LUT table configuration Below is a code example of the LUT table configuration for HyperRAM read and write timing. const uint32_t customLUT[CUSTOM_LUT_LENGTH] = { /* Read Data */ [4 * PSRAM_CMD_LUT_SEQ_IDX_READDATA] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0xA0, kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), [4 * PSRAM_CMD_LUT_SEQ_IDX_READDATA + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, 0x07), [4 * PSRAM_CMD_LUT_SEQ_IDX_READDATA + 2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_READ_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), /* Write data */ [4 * PSRAM_CMD_LUT_SEQ_IDX_WRITEDATA] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_DDR, kFLEXSPI_8PAD, 0x20, kFLEXSPI_Command_RADDR_DDR, kFLEXSPI_8PAD, 0x18), [4 * PSRAM_CMD_LUT_SEQ_IDX_WRITEDATA + 1] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_CADDR_DDR, kFLEXSPI_8PAD, 0x10, kFLEXSPI_Command_DUMMY_RWDS_DDR, kFLEXSPI_8PAD, 0x07), [4 * PSRAM_CMD_LUT_SEQ_IDX_WRITEDATA + 2] = FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_DDR, kFLEXSPI_8PAD, 0x04, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0x00), }; (1) We are using an 8-line differential HyperRAM, which is utilized on both edges of the clock, hence the number of data lines used for communication with external memory is kFLEXSPI_8PAD. (2) HyperRAM and HyperFlash are memory products designed based on the HyperBus&#8482; interface specification by Cypress Semiconductor. This operand is defined in the specification, therefore the read operation operand is fixed at 0xA0, and the write data operand is fixed at 0x20. HangZhang_7-1730889534446.png (3) CADDR_DDR column address: Since the number of bytes transferred in one transmission must be a multiple of 8, if the row and column addresses you provide exceed the maximum rows and columns of a specific size HyperRAM, FlexSPI will automatically set the higher bits to 0. The table above shows that the lower 16 bits are the column address, with 3 valid bits, and the upper 13 bits are reserved for compatibility and need to be set to 0. Therefore, the timing parameter for the column address here needs to be filled with 16, i.e., 0x10. HangZhang_8-1730889563100.png (4) RADDR_DDR row address: As shown in the figure, if the FLSHxxCR1[CAS] bit is not zero, then the FlexSPI peripheral will split the actual mapped Flash Address (i.e., the memory's own offset address) into a row address FA[31:CAS+1] and a column address [CAS:1] for transmission during transfer timing. For word-addressable flash devices, the last bit of the address is not needed because the flash is read and programmed in two-byte units. FlexSPI considers one word as two bytes; thus, if alignment to two bytes is required, one less bit address is needed. The sum of row and column addresses should be one bit less. W956D8MBYA has 64Mbit, which is 2^26; with 3 bits for the column address, theoretically, 26-1-3=22 bits are needed for the row address to access the entire HyperRAM. Then, align it to 8 bits; otherwise, FlexSPI will pad zeros at the lower bits, which would not be the address we want to access. Therefore, the parameter is 0x18, i.e., 24 bits. 4. Experimental Verification We can use simple AHB read and write operations to verify whether this HyperRAM is functional. The code is as follows. for (i = 0; i < sizeof(s_psram_write_buffer); i++) { s_psram_write_buffer[i] = i; } memcpy((uint32_t*)(EXAMPLE_FLEXSPI_AMBA_BASE), s_psram_write_buffer, sizeof(s_psram_write_buffer)); memcpy(s_psram_read_buffer,(uint32_t*)(EXAMPLE_FLEXSPI_AMBA_BASE) , sizeof(s_psram_read_buffer)); if (memcmp(s_psram_read_buffer, s_psram_write_buffer, sizeof(s_psram_write_buffer)) == 0) { PRINTF("AHB Command Read/Write data successfully !\r\n"); }   When your serial port prints "AHB Command Read/Write data successfully!", it indicates that your FlexSPI connection to the HyperRAM is functioning properly.
View full article
Part 1: Introduction The eIQ Neutron Neural Processing Unit (NPU) is a highly scalable accelerator core architecture that provides machine learning (ML) acceleration. Compared to traditional MCUs like the Kinetis series and LPC series, the MCX N series marks the first integration of NXP's eIQ® Neutron NPU for ML acceleration. The eIQ Neutron NPU offers up to 38 times faster machine learning inference performance compared to a standalone CPU core. Specifically, the MCX N94 can execute 4.8G (150MHz * 4 * 4 * 2) INT8 operations per second.   Hardware Environment: Development Board: FRDM-MCXN947 Display: 3.5" TFT LCD (PAR-LCD-S035) Camera: OV7670 Instructions for putting together demo   Software Environment: eIQ Neutron SDK MCUXpresso IDE Label CIFAR10 Image Demo on NXP App Code Hub   Part 2: Basic Model Classification Training and Deployment The main content is divided into three steps: model training, model converting, and model deployment. 1. Dataset Preparation A fruit dataset is prepared for a simple demonstration of binary classification between apples and bananas. The training set and test set are split in an 8:2 ratio.  Alice_Yang_1-1720088127940.png 2. Use a model generation tool like eIQ Model Creator or TensorFlow to train a model based on the image dataset.  3. Convert to TensorFlow Lite for Neutron (.tflite) Unzip the eIQ Neutron SDK and use the neutron-converter command line tool to convert the trained TensorFlow Lite model to an eIQ Neutron enabled TFLite model: neutron-converter --target mcxn94x --input fruit_model.tflite --output fruit_model_npu.tflite    4. Deploy the Model to the Label CIFAR10 Image Project This example is based on a machine learning algorithm supported by the MCXN947, which can label images captured from a camera and display the type of object at the bottom of the LCD. The model is trained on the CIFAR10 dataset, which supports 10 categories of images: "Airplane", "Automobile", "Bird", "Cat", "Deer", "Dog", "Frog", "Horse", "Ship", "Truck". a. Open MCUXpresso IDE and import the Label CIFAR10 Image project from the Application Code Hub, as follows: Alice_Yang_13-1720088133739.png   b. Select the project, click on "GitHub link" -> "Next", as shown below: Alice_Yang_14-1720088133870.jpeg   c. Set the save path, click "Next" -> "Next" -> "Finish", as shown below: Alice_Yang_15-1720088134095.png   d. After successful import, click on the "source" folder -> "model" folder, open "model_data.s", and copy the model file converted using eIQ Neutron SDK into the "model" folder. Modify the name of the imported model (the name of the converted model) in "model_data.s", as shown below: image.png     e. Click on the "source" folder -> "model" folder -> open the "labels.h" file. Modify the "labels[]" array to match the order of labels model output as shown below: Alice_Yang_17-1720088134472.jpeg   f. The eIQ middleware in the project needs to be updated to be compatible with the version of the eIQ Neutron SDK used to convert the TFLite model. Update the eIQ middleware folder in the project, including the eIQ Neutron libraries, as described in this Community post or in this lab.   f. Compile the project and download it to the development board.   Part 3: Results Alice_Yang_19-1720088134631.jpeg   Alice_Yang_20-1720088134944.png   Part 4: Summary By efficiently utilizing the powerful performance of the eIQ Neutron NPU and the eIQ enablement tools like eIQ Neutron SDK, developers can significantly streamline the entire process from model training to deployment. This not only accelerates the development cycle of machine learning applications but also enhances their performance and reliability. Therefore, for developers looking to implement efficient machine learning applications on MCX N-series edge devices, mastering these technologies and tools is crucial.   We can also refer to the video for detailed steps using the deprecated eIQ Toolkit to generate a model. https://www.bilibili.com/video/BV1SS411N7Hv?t=12.9  For more vision examples on MCX N see this Community Post.
View full article
The attached lab will describe how to add eIQ Time Series Studio generated libraries to an existing NXP embedded application.   It describes how to add the TSS library files to your application and configure the project settings in VS Code, MCUXpresso IDE, IAR, and Keil. It also covers how to call the TSS API from existing user code so that you can quickly and easily add time series ML analysis to  your embedded application.  For details on how to create a time series model with eIQ Time Series Studio, see the Getting Started with TSS Lab.
View full article
Clone an Example Project from MCUXpresso IDE The following steps will guide you through the manipulation of the general-purpose outputs. The example sets up a CTimer to generate a PWM signal and change between two LEDs. Find the Quickstart Panel in the lower left-hand corner and click on Import SDK example(s) Sabina_Bruce_14-1767120564749.png Click on the FRDM-MCXN947 board to select that you want to import an example that can run on that board, and then click on Next Sabina_Bruce_15-1767120575767.png Use the arrow button to expand the  driver_examples  category, then expand the ctimer examples, click on the check box next to  ctimer_match_interrupt_example  to select it. To use the UART for printing (instead of the default semihosting), Select UART as the SDK Debug Console checkbox under the project options. Then, click on Finish Sabina_Bruce_16-1767120587691.png Click on the  “frdmmcxn947_ctimer_match_interrupt_example”  project in the Project Explorer View and build, compile, and run the demo as described in the previous section Sabina_Bruce_17-1767120603466.png You should see the BLUE and RED LED changing back and forth Terminate the debug session Use MCUXpresso IDE Pins Tools to Modify Example   Note: Previously, you had to clone an SDK project like in the previous step. Open the pins tool by selecting “ConfigTools” on the top right hand of the file explorer window and then select “ Open Pins” Sabina_Bruce_2-1767120490131.png     The pins tool should now display the pin configuration for the ctimer project Sabina_Bruce_3-1767120490074.png     In the Pins view deselect “Show dedicated pins” and “Show no routed pins” checkboxes to see only the routed pins. Routed pins have a check in a green box next to the pin name. The functions selected for each routed pin are highlighted in green Sabina_Bruce_4-1767120490861.png   In the current configuration, PIO3_2 and PIO3_3 are routed as the outputs of the CTimer. Let’s add a third Ctimer Match output and enable the Green LED Select “Show no routed pins” to see the other options. To enable the third Ctimer Match Output, browse the column for Ctimer and select and output. In this example, we will select, Ctimer4 Match 2 on PIO3_6. Select the item in the Ctimer column to enable Sabina_Bruce_5-1767120490102.png   Now, let’s route the Green LED. In the search box type “green” so that the routed pin for this LED is shown. Finally, click the box under the GPIO column. The box will highlight in green, and a check will appear next to the pin Sabina_Bruce_6-1767120489892.png   Next configure the GPIO pin as an output in the “Routing Details” window Sabina_Bruce_7-1767120490064.png   Now it’s time to implement these changes into the project by exporting the new updated pin_mux.c and pin_mux.h files that are generated by the Pins tool. Click on Update Project in the menu bar Sabina_Bruce_8-1767120490018.png   The screen that pops up will show the files that are changing and you can click on “diff” to see the difference between the current file and the new file generated by the Pins tool. Click on “OK” to overwrite the new files into your project Sabina_Bruce_9-1767120490120.png   Let’s add some additional code to the example. Open  simple_match_interrupt.c  file and add the following macros for the third ctimer output. Sabina_Bruce_10-1767120489936.png   Add the Green LED functions as well. Sabina_Bruce_11-1767120491994.png   Some additional code to be implemented will be the third ctimer’s callback, this can be copied from  ctimer_match1_callback  and modify the content to match2. To be able to visually identify the new ctimer, we will remove one of the previous ctimers as shown Sabina_Bruce_12-1767120492171.png     The main function will need to include the initialization of both the Green LED and the Ctimer Sabina_Bruce_13-1767120490811.png   Build and download the project as done in the previous section Run the application. You should now see the Green and Blue LED blinking back and forth Terminate the debug session
View full article
Clone an Example Project Using MCUXpresso Config Tool    The following steps will guide you through the manipulation of the general-purpose outputs. The example sets up a SCTimer to generate a PWM signal and change a LED brightness. Open the MCUXpresso Config Tool In the wizard that comes up, select the “Create a new configuration based on an SDK example or hello word project” radio button and click on Next Sabina_Bruce_0-1767119880873.png On the next screen, select the location of the MCUXpresso SDK . The SDK package must be unzipped beforehand. Then select the IDE that is being used. Note that only IDEs that were selected in the online SDK builder when the SDK was built will be available and click on clone select example. Then select the project to clone. For this example, we want to use the gpio led output project. You can filter for this by typing “ctimer” in the filter box and then selecting the  “ctimer_match_interrupt_example”  example project. You can then also specify where to clone the project and the name. Then click on Finish Sabina_Bruce_1-1767119904068.png After cloning go to the directory you selected and open the project for your IDE. Import, compile, and run the project as done in previous sections You should see the BLUE and RED LED changing back and forth Terminate the debug session Use MCUXpresso IDE Pins Tools to Modify Example   Note: Previously, you had to clone an SDK project like in the previous step. Open the pins tool by selecting “ConfigTools” on the top right hand of the file explorer window and then select “ Open Pins” Sabina_Bruce_2-1767120013932.png   The pins tool should now display the pin configuration for the ctimer project Sabina_Bruce_4-1767120027738.png   In the Pins view deselect “Show dedicated pins” and “Show no routed pins” checkboxes to see only the routed pins. Routed pins have a check in a green box next to the pin name. The functions selected for each routed pin are highlighted in green Sabina_Bruce_5-1767120078772.png In the current configuration, PIO3_2 and PIO3_3 are routed as the outputs of the CTimer. Let’s add a third Ctimer Match output and enable the Green LED Select “Show no routed pins” to see the other options. To enable the third Ctimer Match Output, browse the column for Ctimer and select and output. In this example, we will select, Ctimer4 Match 2 on PIO3_6. Select the item in the Ctimer column to enable Sabina_Bruce_6-1767120106023.png Now, let’s route the Green LED. In the search box type “green” so that the routed pin for this LED is shown. Finally, click the box under the GPIO column. The box will highlight in green, and a check will appear next to the pin Sabina_Bruce_7-1767120126540.png Next configure the GPIO pin as an output in the “Routing Details” window Sabina_Bruce_8-1767120146570.png Now it’s time to implement these changes into the project by exporting the new updated pin_mux.c and pin_mux.h files that are generated by the Pins tool. Click on Update Project in the menu bar Sabina_Bruce_9-1767120171233.png The screen that pops up will show the files that are changing and you can click on “diff” to see the difference between the current file and the new file generated by the Pins tool. Click on “OK” to overwrite the new files into your project Sabina_Bruce_10-1767120200258.png Let’s add some additional code to the example. Open  simple_match_interrupt.c  file and add the following macros for the third ctimer output. Sabina_Bruce_11-1767120247499.png Add the Green LED functions as well. Sabina_Bruce_12-1767120256133.png Some additional code to be implemented will be the third ctimer’s callback, this can be copied from  ctimer_match1_callback  and modify the content to match2. To be able to visually identify the new ctimer, we will remove one of the previous ctimers as shown Sabina_Bruce_13-1767120270163.png   The main function will need to include the initialization of both the Green LED and the Ctimer Sabina_Bruce_14-1767120284285.png Build and download the project as done in the previous section Run the application. You should now see the Green and Blue LED blinking back and forth Terminate the debug session  
View full article