MCX Microcontrollers Knowledge Base

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

MCX Microcontrollers Knowledge Base

Discussions

Sort by:
 1. Project Background and Requirement Breakdown 1.1 Application Scenario In professional audio equipment, conference systems, multichannel capture devices, and USB audio interfaces, there is a frequent need to bridge data between USB and an external audio codec: the PC sends and receives audio streams over the standard USB Audio protocol, while the MCU converts USB packets into the TDM timing a codec understands — and vice versa. The difficulty of such a bridge lies not in any single interface, but in the interconnection of two real-time domains. A customer set out to develop a UAC2.0-based multichannel audio bridge. Their requirements can be broken down into four hard constraints. 1.2 Original Customer Requirements The customer's requirements fall into four areas — the USB side, the audio format, the codec interface, and the channel configuration — detailed one by one below. (1) USB-side requirements USB Audio Class 2.0 Device Full-duplex audio Windows native driver support No custom driver installation required Put another way: the MCU acts as the USB Device, the Windows PC as the USB Host, the Windows built-in UAC2.0 driver is used, and playback and recording are supported simultaneously. (2) Audio format requirements 48 kHz sampling rate PCM format 24-bit valid audio data 32-bit slot alignment (3) Codec interface requirements The MCU and codec communicate over an SAI TDM interface: TDM mode, 32-bit slot width, 24-bit valid audio data, and a 48 kHz sampling rate. (4) Channel configuration — asymmetric transmit and receive This is the point that sets the project apart from a common stereo demo: Audio direction Channel count Data flow Playback 2 channels PC → USB OUT → MCU → TDM TX → codec DAC → speaker Recording 6 channels MIC → codec ADC → TDM RX → MCU → USB IN → PC 1.3 Four Core Challenges Introduced by Asymmetric Channels Compared with a typical 2-in/2-out stereo USB Audio demo, this project has to solve four problems at once: UAC2 multichannel descriptor configuration: describe asymmetric IN/OUT endpoints in the UAC2 descriptor topology and have Windows correctly enumerate them as two logical devices — a "2ch speaker + 6ch mic". Asymmetric channel design: because playback and recording have different channel counts, the USB-side buffer layout and the TDM-side slot layout cannot map one-to-one; independent mapping logic is required. Multichannel TDM transport: within an 8-slot TDM frame, the two playback channels must be padded/aligned, while the six recording channels must be extracted/reassembled. Real-time USB–SAI bridging: USB is packet-driven and paced by microframes; SAI is a continuous bit stream paced by the sample clock. The two must be decoupled with DMA and buffering. 1.4 Scope of This Article This article goes beyond a simple "it works" conclusion. Following the engineering thread of requirements → hardware → selection → architecture → data format → descriptors → TDM → DMA → verification, it explains the key decisions, register/field-level details, and calculation methods at every layer, offering a reusable reference design for similar multichannel USB audio bridges. 2. Hardware Platform and Key Hardware Modifications 2.1 Hardware Inventory The hardware and software versions used in this project are listed below (version details sourced from the project README): Category Model / Version Notes MCU board FRDM-MCXN236 Main controller, Cortex-M33 Audio codec board AUD-EXP-42448 Rev B Multichannel audio codec card (CS42448) Adapter board MCXN FRDM Adapter Board Rev A1 Signal routing and breakout Cable USB Type-C cable Connects to the J11 Type-C port Peripherals 3.5 mm headphone / speaker Playback verification IDE MCUXpresso IDE 25.06.0 Development and debugging SDK FRDM-MCXN236 SDK 26.06 Drivers and USB Audio framework The MCXN236 integrates a USB Device controller, Flexcomm SAI interface, eDMA controller, and Cortex-M33 core — a single chip that satisfies the project's real-time audio transport needs. The CS42448 provides multichannel ADC/DAC and a TDM interface, making it well suited to multichannel capture and playback. 2.2 Hardware Stack and Connections Because the FRDM-MCXN236 cannot connect directly to the AUD-EXP-42448, the MCXN FRDM Adapter Board is used to break out and route the audio signals (MCLK, BCLK, FSYNC, TXD, RXD, and others).       Figure 1. Hardware stack: AUD-EXP-42448 + MCXN FRDM Adapter Board + FRDM-MCXN236 From top to bottom, the hardware stack is: AUD-EXP-42448  (CS42448 codec / MIC input / Line Out output)         | MCXN FRDM Adapter Board  (audio signal routing)         | FRDM-MCXN236  (USB Device + SAI + eDMA)         |         +--- J11 Type-C → Windows PC The hardware signal connection schematic is shown below:   Figure 2. Hardware connection schematic 2.3 Key Hardware Modification: The SJ3 Jumper This is a hardware detail that is easy to trip over. According to the README, the default J1-3 configuration of the FRDM-MCXN236 targets motor-control applications. To enable the SAI interface, the SJ3 solder-bridge connections must first be changed: Open SJ3 pads 1–2, and short SJ3 pads 2–3.   Figure 3. SJ3 jumper modification If this step is missed, the SAI signals are not routed out correctly and no amount of software configuration will produce a TDM waveform. It is a hardware-first prerequisite. 2.4 J31 Signal Mapping The adapter board connects to the MCU board through J31 (HDR 2×12). The key SAI/I2C signal definitions are: J31 pin Signal Notes 3 P3_6 / SAI0_MCLK Master clock 5 P4_3 / I2C0_INT Codec interrupt 7 P3_18 / SAI0_RX_BCLK Receive bit clock 9 P2_7 / SAI0_RX_FS Receive frame sync 11 P1_2 / SAI0_TXD0 Transmit data 13 P1_17 / I2C2_SCL Codec control bus 15 P1_16 / I2C2_SDA Codec control bus 17 P2_18 / RESET Reset 19 P2_1 / SAI0_RXD0 Receive data 21 P0_0 / GPIO General purpose 23 P3_16 / SAI0_TX_BCLK Transmit bit clock Additional signals such as P3_17 / SAI1_TX_FS and P2_5 / SAI0_TXD1 are used for specific TDM timing scenarios.   Figure 4. J31 pin definition 3. Solution Selection: Dual-SDK Fusion The final design is based on two SDK examples, each contributing its strengths. 3.1 USB: dev_composite_hid_audio_unified_bm From the FRDM-MCXN236 SDK, this example provides: A complete USB Device stack (bare-metal, no RTOS) UAC2 framework Audio endpoints and isochronous transport pipes Windows-compatible descriptors (enumerated as "USB AUDIO + HID DEMO") It was chosen because it is natively matched to the hardware platform (MCXN236): the USB protocol stack is tightly coupled to the on-chip USB controller, so reusing it directly avoids low-level porting risk. 3.2 TDM: sai_edma_tdm_record_playback From the RT1170 SDK, this example provides: SAI TDM configuration reference (8 slots / 32-bit) eDMA transfer framework Codec initialization reference Multichannel slot management It was chosen because the MCXN236 SDK lacks a ready-made 8-slot TDM transmit/receive example, while the RT1170's SAI peripheral and eDMA usage closely resemble the MCXN family, making its TDM multichannel management logic directly reusable. 3.3 Why This Mix Each SDK contributes a different, complementary piece of the solution: Area From MCXN236 SDK From RT1170 SDK USB Device stack ✅ Natively matched — UAC2 descriptors ✅ Already Windows-validated — SAI TDM multichannel — ✅ 8-slot example eDMA double buffering — ✅ Reference framework The risk is that the two codebases differ in naming style, peripheral handles, and interrupt structure, so they must be unified during integration. The project uses frdmmcxn236_dev_composite_hid_audio_unified_bm as the baseline template for naming and comments, keeping newly added audio functions stylistically consistent.   3.4 Porting Breakdown The work concentrates in three areas: Modify the USB Audio descriptors: playback 2ch / recording 6ch / 24-bit. Port the TDM implementation: migrate the SAI, eDMA, and TDM logic from the RT1170 example to the MCXN236. Adjust channel mapping: change the reference project's symmetric 8-channel structure to an asymmetric one — playback 2ch + recording 6ch. 4. System Architecture 4.1 Overall Architecture The overall software and data path architecture is shown below:   Figure 5. UAC2.0 full-duplex audio system block diagram The diagram shows two independent data paths: Playback (speaker path): PC (native UAC2 driver) → USB OUT endpoint → MCU (2ch PCM packed into 8-slot TDM) → SAI TX TDM → codec DAC slots 0/1 → 2ch speaker. Recording (mic path): 6ch MIC → codec ADC → 8-slot TDM (slots 0–5 = MIC1–6) → SAI RX TDM → MCU (extract 6ch) → USB IN endpoint → PC. 4.2 Symmetry and Asymmetry of the Bidirectional Paths One design insight worth emphasizing: the physical TDM layer is symmetric (both directions use 8 slots / 32-bit), while the logical channel layer is asymmetric (2ch vs 6ch). The essence of the bridge happens in the two conversions between "logical channels ↔ physical slots": The playback direction performs a 2ch → 8-slot padding: only slot 0 (L) and slot 1 (R) are valid; slots 2–7 are filled with zeros. The recording direction performs an 8-slot → 6ch extraction: slots 0–5 are taken; slots 6–7 are ignored. 4.3 Bandwidth Budget Analysis From an engineering standpoint, working out the bandwidth before writing code avoids pitfalls in USB endpoint configuration. TDM-side bit clock: Sample rate fs        = 48 kHz Slots per frame       = 8 Bits per slot         = 32 Frame length          = 8 x 32 = 256 bits BCLK (bit clock)      = fs x 256 = 48000 x 256 = 12.288 MHz FSYNC (frame sync)    = fs = 48 kHz USB-side data rate (24-bit audio carried in 4-byte containers over USB): Playback : 2ch x 4 B x 48000 = 384,000 B/s  ~ 3.07 Mbps Recording: 6ch x 4 B x 48000 = 1,152,000 B/s ~ 9.22 Mbps Full-duplex total                             ~ 12.29 Mbps This magnitude dictates that the USB endpoints must use isochronous transfer, with wMaxPacketSize correctly budgeted per microframe (see Section 6.4). The 12.288 MHz BCLK also directly constrains the SAI clock dividers and MCLK selection (see Section 7.2). 5. Audio Data Format Design 5.1 Unified Format Parameters The entire system uses a single, unified audio format to avoid any resampling or bit-width conversion: Parameter Configuration Sampling rate 48 kHz Format PCM Valid bits 24 Slot width 32 TDM slots 8 5.2 Alignment of 24-bit Valid Data in 32-bit Slots Although the actual audio data is only 24 bits, it occupies a 32-bit slot in the TDM frame: +------------------------+---------+ |  24-bit Audio (MSB)    | Padding | +------------------------+---------+ <-------- 24 bits ------><- 8 b - >            32-bit Slot The key point is the alignment. In 32-bit-slot TDM mode, the CS42448 aligns 24-bit valid data to the MSB (left-aligned), with the lower 8 bits as padding. The USB-side 24-bit audio is likewise MSB-aligned within its 32-bit container. Because both sides use the same alignment, DMA can move 32-bit words as a "transparent pipe" without per-sample bit shifting or assembly — an important prerequisite for real-time performance. If the alignment does not match (for example, MSB on one side and LSB on the other), the audible symptom is abnormal volume or noise rather than complete silence — a condition that is easily misdiagnosed as an analog-circuit problem. 5.3 Three Benefits of 32-bit Slots Clean TDM alignment: 8 slots × 32 bits = 256 bits per frame; frame boundaries land on whole bytes, making the FSYNC-to-BCLK relationship clear. DMA efficiency: each transfer is in 32-bit words — exactly one word per slot — so burst lengths are regular. Simple USB data organization: with 24-bit samples held in 32-bit containers, the USB endpoint buffer and the TDM slot buffer can share the same data structure.   6. UAC2 Descriptor Deep Dive 6.1 SDK Default vs. Customer Requirement The SDK's default audio demo is playback 2ch / recording 2ch / 16-bit, while the customer requires playback 2ch / recording 6ch / 24-bit. The differences are confined to the recording channel count and the bit resolution on both sides. Item SDK default Customer requirement Change Playback channels 2 2 Keep Recording channels 2 6 Modify Bit resolution 16 24 Modify Sample rate 48 kHz 48 kHz Keep Format PCM PCM Keep 6.2 Audio Control Interface Topology UAC2 descriptors are not a bag of isolated fields — they form a topology. Before changing channel counts or bit widths, it is essential to understand the key entities in the Audio Control interface: USB OUT --> [Input Terminal: USB] --> [Feature Unit] --> [Output Terminal: Speaker]                                                               | USB IN  <-- [Output Terminal: USB] <-- [Feature Unit] <-- [Input Terminal: Mic] Input Terminal (IT): the data source. On the playback path the IT points to USB OUT; on the recording path it points to the microphone. Output Terminal (OT): the data destination, pointing to the speaker and USB IN respectively. Feature Unit (FU): volume/mute control; its bMute/bVolume channel count must match upstream and downstream. Clock Source / Clock Selector: entities new in UAC2 relative to UAC1, describing the sampling clock. The key to the asymmetric design: playback and recording are two independent Audio Streaming interfaces, each with its own Input/Output Terminals, Feature Unit, and isochronous endpoint. Channel count and bit resolution can therefore be configured independently without interfering with each other. 6.3 Key Field Modifications The descriptor fields that need changing are: Descriptor Field Playback Recording Meaning Input/Output Terminal bNrChannels 2 6 Number of channels Audio Streaming Format bNumChannels 2 6 Streaming interface channel count Audio Streaming Format bBitResolution 24 24 Valid bit resolution Audio Streaming Format bSubSlotSize 4 4 Bytes per subslot (4-byte container for 24-bit) Feature Unit bmaControl channel mask 2ch 6ch Channel coverage of volume/mute control Format Descriptor bmChannelConfig stereo mask 6ch mask Spatial location of channels Isochronous Endpoint wMaxPacketSize sized for 2ch sized for 6ch Maximum packet length per microframe Two of these fields are the most error-prone: bSubSlotSize = 4: 24-bit valid data must be placed in a 4-byte (32-bit) container. If set incorrectly to 3, Windows will parse a packed 24-bit stream that is misaligned with the TDM 32-bit slot layout. bmChannelConfig: six channels require the correct channel mask (Front Left/Right, Front Center, LFE, Surround Left/Right, and so on); otherwise Windows may enable only part of the channels or report the format as unsupported. 6.4 Bandwidth Budget for Asymmetric Endpoints The wMaxPacketSize of an isochronous endpoint must cover the data volume within one microframe. Taking High-Speed (125 µs microframes) as an example: Samples per microframe = 48000 / 8000 = 6 samples Playback : 2ch x 4 B x 6 = 48 B  + UAC2 header Recording: 6ch x 4 B x 6 = 144 B + UAC2 header From this, the wMaxPacketSize of each endpoint is determined, with headroom reserved for the UAC2 packet header. Isochronous transfer has no retransmission and no handshake — insufficient bandwidth budgeting shows up directly as pops, clicks, or dropped samples, so this step must be calculated precisely rather than guessed. 6.5 Verifying the Windows Native Driver The ultimate criterion for correct descriptors is that Windows automatically loads the UAC2.0 driver and enumerates the device in Device Manager and Sound Settings with the expected format — with no INF file or custom driver. Measured results are presented in Section 10. 7. SAI TDM Implementation and Clock Tree 7.1 TDM Frame Structure The project uses 8 slots per frame / 32-bit slot width: Frame (256 bits) +-- Slot0 --+-- Slot1 --+-- Slot2 --+-- Slot3 --+-- Slot4 --+-- Slot5 --+-- Slot6 --+-- Slot7    L/R(ch0/1)  reserved   reserved   reserved   reserved   reserved   reserved   reserved Playback mapping: slot 0 → Left (CH0), slot 1 → Right (CH1), slots 2–7 reserved and written as zeros. Recording mapping: slot 0 → MIC1, slot 1 → MIC2, slot 2 → MIC3, slot 3 → MIC4, slot 4 → MIC5, slot 5 → MIC6, slots 6–7 reserved. 7.2 Clock Tree Derivation SAI clock configuration is central to whether TDM works at all. Working backward from the target format gives each clock stage: Clock Formula Result Sample rate fs Given by requirement 48 kHz Frame sync FSYNC = fs 48 kHz Bit clock BCLK fs × slots × slot width = 48000 × 8 × 32 12.288 MHz Master clock MCLK Typically 256 × fs or 512 × fs 12.288 / 24.576 MHz As the codec, the CS42448's MCLK/BCLK/FSYNC must be configured consistently with the SAI master/slave mode. Two common engineering approaches exist: MCU as master: the SAI outputs MCLK/BCLK/FSYNC and the codec is configured as slave. The advantage is a single clock source and deterministic timing — this is the approach used in this project. Codec as master: the codec outputs the clocks and the SAI is configured as slave. This suits cases where the codec's internal PLL provides a low-jitter clock. Either way, the hard constraint BCLK = 12.288 MHz and FSYNC = 48 kHz must be met; otherwise slot boundaries drift, causing channel misalignment or noise. 7.3 Slot–Channel Mapping Implementation The mapping logic sits between the USB buffer and the SAI buffer:   Figure 6. Playback/Recording data paths and slot mapping Playback direction (2ch → 8 slots): take two 32-bit samples from the USB OUT buffer, write them into slots 0 and 1 of the TDM TX buffer, and write zeros to the other six slots. Recording direction (8 slots → 6ch): extract the six samples from slots 0–5 of the TDM RX buffer, write them in order into the six channel positions of the USB IN buffer, and discard slots 6–7. This is where "asymmetric" is truly implemented, and it is also where most of the changes after porting the reference project are concentrated. 7.4 CS42448 Interface Timing Considerations The codec's TDM format must be configured with the same slot count (8) and slot width (32-bit) as the SAI. Only two outputs are used on the DAC side (slots 0/1); six inputs are used on the ADC side (slots 0–5). Codec register initialization — TDM mode, data format, channel enables, and so on — is completed over I2C (SCL/SDA on J31).   8. Bidirectional eDMA Transfer and Ping-Pong Buffering 8.1 Why DMA Is Mandatory A continuous 48 kHz / 24-bit / 6ch audio stream, if moved sample by sample by the CPU, would create a very high interrupt load and excessive jitter. eDMA handles all data movement, and the CPU is notified only at half-buffer/full-buffer boundaries, handing real-time performance over to hardware. 8.2 Ping-Pong Double Buffering Both the playback and recording paths use double buffering: Playback:   USB OUT → Ping-Pong Buffer → eDMA → SAI TX → codec DAC Recording:   codec ADC → SAI RX → eDMA → Ping-Pong Buffer → USB IN Double buffering works like this: while the eDMA is moving one buffer (say, Ping), the CPU/USB side prepares the other (Pong); when the eDMA completion interrupt arrives, the roles swap. This guarantees that at any instant there is one buffer "being transferred" and one "being prepared", producing a continuous stream and avoiding: Underflow (playback buffer read empty → audio break/click) Overflow (recording buffer written full → dropped samples) Audio drop (lost frames from USB-packet/SAI-timing mismatch) 8.3 Latency Analysis End-to-end latency is mainly the sum of three parts: Total latency ~ USB buffer depth + DMA buffer depth + codec/FIFO latency With N samples per buffer at 48 kHz, a single buffer stage contributes N / 48000 seconds of latency. Ping-pong double buffering doubles the effective buffer depth in exchange for jitter resilience. The engineering trade-off is: Buffers too small → sensitive to USB scheduling jitter, prone to underflow/overflow; Buffers too large → increased latency, degrading call/monitoring experience. For a USB audio interface, total latency is usually kept in the range of a few milliseconds. This project prioritizes stability — first ensuring glitch-free full-duplex operation, then fine-tuning buffer depth for the target application. 8.4 Engineering Measures Against Underflow/Overflow Use independent buffers and DMA channels for USB and SAI so they never block each other. Use frame sync (FSYNC) as the pace for checking buffer pointers; realign to a frame boundary immediately if an overrun is detected. Prime before start on power-up / plug-in: prepare the first data block on the playback path before enabling SAI TX, avoiding an empty read at startup. Leave margin in buffer sizing for the worst case, covering Windows scheduling jitter. 9. Development Flow and Staged Verification The project progressed in three stages, each with a clear verification point (from the project development flow): 9.1 Stage 1: USB Descriptor Configuration (Complete) Playback device: 2 channels, 48 kHz, 24-bit Recording device: 6 channels, 48 kHz, 24-bit Verification point: the USB UAC2.0 device enumerates on Windows as a 2-channel speaker and a 6-channel microphone. 9.2 Stage 2: SAI/TDM Interface Development (Complete) Sampling rate: 48 kHz Slot width: 32-bit TDM slots: 8 slots per frame Valid audio data: 24-bit Verification point: SAI TX/RX operates with 8-slot TDM, 48 kHz, 32-bit slots (verify the waveform with a logic analyzer or codec loopback). 9.3 Stage 3: USB–SAI Buffer Integration (Complete) Playback path: USB OUT 2ch → SAI TX 8-slot TDM Recording path: SAI RX 8-slot TDM → USB IN 6ch Verification point: channel-to-slot and slot-to-channel mapping is correct, with no drops over long full-duplex runs. 9.4 Debugging Takeaways Hardware first, software second: an unmodified SJ3 jumper leaves SAI with no signal — the first prerequisite to rule out. Verify each domain separately, then integrate: validating USB enumeration and SAI waveforms independently before bridging greatly narrows the problem space. Alignment is a hidden trap: mismatched MSB/LSB alignment produces "sound, but wrong" — use a test signal of known amplitude to locate it. Unify naming style: using the MCXN236 SDK example as a template reduces the cognitive cost of fusing two SDKs.   10. Test Results and Evidence 10.1 Test Setup PC: Windows, using the native UAC2.0 driver Connection: the FRDM-MCXN236's J11 Type-C port connected to the PC via a USB Type-C cable Firmware: compiled image programmed to the target board Audio peripherals: AUD-EXP-42448 Line Out 1/2 connected to a headphone/speaker; the on-board MIC2 used as the recording input 10.2 Windows Device Enumeration Once plugged in, the device is correctly enumerated in the Windows Sound control panel: Speakers Properties → Default Format: 24 bit, 48000 Hz (Studio Quality)   Figure 7. Windows speaker enumeration: 24 bit, 48000 Hz Microphone Properties → Default Format: 6 channel, 24 bit, 48000 Hz   Figure 8. Windows microphone enumeration: 6 channel, 24 bit, 48000 Hz The enumeration results match the project targets exactly, with no custom driver installed. 10.3 Playback Test A 3.5 mm headphone/speaker is connected to AUD-EXP-42448 Line Out 1/2. Selecting "USB AUDIO + HID DEMO" as the playback device in Windows and playing music produces normal audio in the headphone.   Figure 9. Windows output device selection: Speakers (2- USB AUDIO+HID DEMO) 10.4 Recording Test Open the Windows Sound Recorder, select "USB AUDIO + HID DEMO" as the input device, click Record, and capture audio through the AUD-EXP-42448 on-board MIC2. After recording, play it back and the captured content can be heard in the headphone. The recording waveform is shown below:   Figure 10. Sound Recorder waveform and input device selection   11. Conclusion and Engineering Value 11.1 Recap This article has presented the implementation of a UAC2.0 multichannel audio bridge on the MCXN236. By combining the USB Audio framework from the MCXN236 SDK with the SAI TDM reference design from the RT1170 SDK, we built a full-duplex audio bridge that works with the Windows native driver. 11.2 Solution Features USB Audio Class 2.0 Device Windows native driver (no custom driver) Full-duplex audio Asymmetric design: playback 2 channels / recording 6 channels 24-bit PCM / 48 kHz sampling rate SAI TDM interface (8 slots / 32-bit slot) eDMA streaming + ping-pong double buffering 11.3 Typical Applications USB audio interfaces Multichannel recording devices Conference audio systems Industrial audio acquisition equipment Audio gateway products 11.4 Future Extensions This architecture can be extended to support: More TDM channels (reusing the unused slots) Higher sampling rates (96/192 kHz, requiring clock and bandwidth recalculation) Audio DSP processing (EQ, noise reduction, mixing, AEC) Multichannel microphone-array beamforming This project provides a complete reference design for multichannel USB audio bridging — from hardware to software, from descriptors to timing.  
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:          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.                                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.            It should look like the following when complete             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.    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     Then click on Others   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.     Then click on the Download button and accept the license agreement to download the zip file.     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.   Once imported, the Installed SDK tab will look something like this:    In the Quickstart Panel found in the lower left corner, click on Import from Application Code Hub..   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.   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.     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.   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.   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.   Then finally on the last screen click on Finish to import the project into your MCUXPresso IDE workspace.   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.  15. It should look like the following when done:     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.   Copy the directory location as it will be used in the next step   Open a Windows Command prompt and navigate to the directory where the model was at from the previous step               Use the Neutron Compiler to convert the Face Detection model: neutron-compiler --input face_detect.tflite --output face_npu.tflite --target mcxn94x     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   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 3. Starting with eIQ Neutron SDK 3.3.1 there’s also a required change to the neutron.cpp file that needs to be made or else a compile error will be generated later. Open up the  \eiq\tensorflow-lite\tensorflow\lite\micro\kernels\neutron\neutron.cpp file:   4. And then replace lines 118-126 with the following code:   if (error != ENONE) {      // Support both legacy categories and flat Neutron error codes.      const bool is_driver_microcode_error =            (GET_ERROR_COMPONENT(error) == ERROR_COMPONENT_DRIVER) &&   #if defined(GET_ERROR_CATEGORY)            (GET_ERROR_CATEGORY(error) == ERROR_CATEGORY_DRIVER_UCODE);   #else            ((GET_ERROR_CODE(error) == DRIVER_UCODE_BAD_MAGIC) ||             (GET_ERROR_CODE(error) == DRIVER_UCODE_BAD_VERSION));   #endif     if (is_driver_microcode_error) {        MicroPrintf("Incompatible Neutron NPU microcode and driver versions! Please, convert the model with Neutron converter tool intended for this SDK release.");   } else {        MicroPrintf("Internal Neutron NPU driver error %x in model prepare!", error);     }     status = kTfLiteError;   }                      After the new Neutron libraries are copied over, clean the project to ensure the new libraries will be used     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.   Rev A: Remove the R157, R158, and R159 resistors from the back of the Rev A board so that it looks like the following:   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:       3.5 Connect the camera and LCD Plug in the OV7670 camera into J11. It should line up with the orange box.   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.               It should look like the following when complete     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.   Build the project by clicking on the Build icon in the Quickstart Panel   Then download and run the project by clicking on the Debug icon in the Quickstart Panel     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   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
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 October 2026 for MCUXpresso SDK 26.09
View full article
1. Background   For edge AI applications, developers typically focus on two key metrics: AI inference performance (Inference Time) Power consumption For inference performance, NXP provides the dm-mcxn947-npu-vs-tensorflm-benchmark , which compares TensorFlow Lite Micro running on the CPU with the eIQ Neutron NPU. The benchmark demonstrates the significant inference performance improvement that can be achieved by using the NPU. When it comes to power consumption, however, MCU developers often have another question: Does enabling the NPU necessarily increase power consumption? A similar analysis is provided in NXP application note AN14700 for the i.MX RT700. Although the NPU introduces a higher instantaneous current during inference, it significantly reduces inference time. As a result, the total energy consumed per inference can actually be much lower. In this article, we use the MCXN947 to perform a similar experiment. Several TensorFlow Lite Micro (TFLM) models from the MCUXpresso SDK are measured to evaluate the impact of the eIQ Neutron NPU on overall energy consumption.  2. Theoretical Analysis   Current consumption is often used as a direct indicator of power consumption: Current (mA) However, for AI inference workloads, a more meaningful metric is: Energy per Inference In other words, how much energy is required to complete a single inference? The basic relationships are: Power = Voltage × Current   Energy = Power × Time   Therefore: Energy = Voltage × Current × Inference Time This means that even if the operating current increases, the total energy consumption can still decrease significantly if the inference time is reduced enough.  3. Experiment NXP provides several TFLM-based eIQ examples for the MCXN947 in the MCUXpresso SDK.   For this experiment, the tflm_cifar10 demo is used as the baseline.  3.1 Test Environment Hardware FRDM-MCXN947 USB cable connected to J17 Joulescope current analyzer The current is measured at J24 on the FRDM-MCXN947 board.    Software MCUXpresso IDE eIQ Toolkit tflm_cifar10 demo from MCUXpresso SDK v26.3  3.2 Code Modifications a. Create CPU and NPU Models Following the model conversion procedure described in Sections 7.2 and 7.3 of AN14700, use the eIQ Toolkit to generate two models:   cifar10_quant.h   cifar10_npu.h   After conversion: The CPU model runs on the Cortex-M33. The NPU model is accelerated by the eIQ Neutron NPU. The two versions can be selected by modifying line 27 in model.cpp.  b. Reduce the Overall Active Power Consumption To reduce the system's active power consumption, the project can be modified based on the MCX N Power Manager AppCodeHub  example. Call lower_active_power() from low_power.cpp in main.cpp: void lower_active_power() { APP_SetVBATConfiguration(); APP_SetSPCConfiguration(); APP_SetCMCConfiguration(); /* Disable unused clocks */ CLOCK_DisableClock(kCLOCK_Rom); CLOCK_DisableClock(kCLOCK_PkcRam); CLOCK_DisableClock(kCLOCK_Gdet); CLOCK_DisableClock(kCLOCK_Pkc); CLOCK_DisableClock(kCLOCK_Css); }   This disables unused clocks and helps reduce the baseline active current.  c. Disable the NPU Clock for the CPU Baseline Test To obtain a clean CPU-only baseline, the NPU clock should also be disabled when the NPU is not being used. Define a USES_NPU macro for each model. In cifar10_quant.h: #define USES_NPU 0   In cifar10_npu.h: #define USES_NPU 1   Then modify MODEL_RunInference() so that the NPU clock is enabled only when NPU inference is performed: status_t MODEL_RunInference(void) { //If model uses NPU then turn on the NPU clock before inferencing #if (USES_NPU==1) SYSCON->AHBCLKCTRLSET[3] |= (1UL << SYSCON_AHBCLKCTRL3_NPU_SHIFT); //Turn NPU clock on to do inference using NPU #endif if (s_interpreter->Invoke() != kTfLiteOk) { PRINTF("Invoke failed!\r\n"); return kStatus_Fail; } SYSCON->AHBCLKCTRLCLR[3] |= (1UL << SYSCON_AHBCLKCTRL3_NPU_SHIFT); //Turn off NPU clock return kStatus_Success; } d. Make the Current Waveform Easier to Measure To make the different execution phases easier to distinguish in Joulescope, add the following macros to demo_config.h: #define NUM_INFERENCES 8 #define USE_DELAY 1     NUM_INFERENCES controls the number of inference iterations, while USE_DELAY adds delays between operations so that the corresponding sections can be identified more clearly in the Joulescope waveform.  e. Turn Off the NPU Clock Outside Inference To ensure that the measured current difference mainly reflects the AI inference itself, disable the NPU clock outside the actual inference period: SYSCON->AHBCLKCTRLCLR[3] |= (1UL << SYSCON_AHBCLKCTRL3_NPU_SHIFT); 3.3 Obtaining the Measurement Results a. Inference Time After running the application, the inference time can be obtained directly from the serial console output. The measured CIFAR-10 results are: CIFAR-10 CPU (150 MHz): 185.13 ms     CIFAR-10 NPU: 5.54 ms   This already shows a significant reduction in execution time when the Neutron NPU is used.  b. Current Measurement Connect the Joulescope to the J24 measurement point on the FRDM-MCXN947.     Open Waveform and Multimeter from the Widgets menu in Joulescope UI to monitor and measure the current. Before taking power measurements, make sure to perform a power reset. Otherwise, the measured current may be higher than expected.    c. Calculate Energy per Inference The energy consumed for each inference can be calculated as:   Energy per Inference = Voltage × Current × Inference Time   3.4 Test Results The table below summarizes the measurements for two SDK example models. The supply voltage is assumed to be 3.3 V.   3.5 Analysis The results reveal an interesting point. Taking CIFAR-10 as an example, if we look only at current consumption, the NPU appears to consume slightly more current: CPU: 9.4 mA NPU: 10.0 mA   However, the inference time decreases dramatically: CPU: 185.13 ms NPU: 5.54 ms   As a result, the energy required for one inference decreases from 5742.7 µJ to 182.8 µJ, corresponding to a 31.4× reduction in energy consumption per inference. The same trend can be observed with the KWS model, where the NPU reduces the energy per inference by 13.7×. This behavior is consistent with the observations reported for the i.MX RT700 in AN14700.  4. Conclusion Most edge AI systems operate in an event-driven manner. The device remains in a low-power state most of the time and wakes up only when a specific event occurs to perform an AI inference. Typical examples include: Keyword spotting Environmental anomaly detection Visual detection Predictive maintenance For this type of application, looking only at the average current during inference does not provide a complete picture of the system's energy efficiency. A more meaningful metric is Energy per Inference, because it represents the total amount of energy required to complete one AI inference operation and directly affects how many inference tasks a battery-powered device can perform over its operating lifetime. The measurements in this experiment show that although the MCXN947 eIQ Neutron NPU introduces a slightly higher instantaneous operating current, it significantly reduces model execution time. As a result, the total energy consumed per inference is greatly reduced. For the CIFAR-10 and KWS models tested here, the NPU achieved more than an order-of-magnitude improvement in energy efficiency, with energy reductions of 31.4× and 13.7×, respectively. For long-running, battery-powered edge AI applications, this improvement in energy efficiency can be even more valuable than the inference performance improvement itself. 
View full article
1. Introduction to MCXN947 The MCXN947 is a high-performance MCU in the NXP MCX N series. It features a dual-core Arm® Cortex®-M33 architecture running at up to 150 MHz and integrates a rich set of connectivity and control peripherals. It is well suited for applications such as industrial control, human-machine interfaces (HMI), smart home devices, edge AI, building automation, and motor control. In addition to commonly used peripherals such as UART, SPI, I2C, ADC, and FlexCAN, the MCXN947 also integrates several advanced modules, including: eDMA SCTimer LCD controller USB High-Speed Ethernet CAN FD I3C SmartDMA Among these peripherals, SCTimer is particularly useful for applications that require flexible and precise timing generation. Unlike a conventional PWM timer, SCTimer uses an event-state architecture, which makes it suitable for implementing: High-precision PWM Multiple waveform outputs Hardware state machines DMA triggering Protocol timing generation For timing-sensitive protocols such as WS2812, DShot, and infrared control protocols, SCTimer can provide a more flexible and efficient solution than a conventional timer. This article demonstrates how to combine the SCTimer and eDMA on the MCXN947 to implement a hardware-driven WS2812 RGB LED solution with minimal CPU involvement during data transmission. 2. Project Background The WS2812, or WS2812B, is an addressable RGB LED with an integrated driver IC. Data is transmitted through a single-wire serial protocol. Each LED receives 24 bits of color data in the following order: G7 ... G0 R7 ... R0 B7 ... B0   After receiving its own 24-bit color value, each LED passes the remaining data to the next LED in the chain. This makes it possible to control a large number of RGB LEDs using only a single MCU output pin. Because WS2812 communication has relatively strict pulse-width requirements, MCU implementations commonly use one of the following approaches: GPIO bit-banging Timer + interrupt SPI waveform encoding Timer + DMA For long LED strips or applications with strict real-time requirements, GPIO bit-banging and interrupt-based implementations can consume significant CPU resources. In this project, we use:   SCTimer + eDMA   to implement a hardware-driven WS2812 interface. The main advantages are: No bit-level interrupts No software delay for individual bits No CPU intervention during bitstream transmission Accurate and stable timing Good scalability for longer LED chains 3. Why SCTimer Instead of FlexPWM, CTIMER, or SPI? There are several ways to implement a WS2812 interface on the MCXN947. Let's briefly compare them. SPI Approach A common technique is to encode each WS2812 bit into multiple SPI bits. For example: WS2812 bit 0 → 100 WS2812 bit 1 → 110   The encoded data is then transmitted using SPI. Advantages Relatively simple implementation Disadvantages Data size increases by approximately 3x or more An additional encoding buffer is required SPI clock selection must closely match the required WS2812 timing Less flexible waveform control For example, for 100 LEDs:   100 LEDs ↓ 2400 WS2812 bits ↓ 7200 SPI bits   The extra encoded data increases memory usage, especially as the LED chain becomes longer. CTIMER Approach CTIMER can also generate PWM waveforms suitable for WS2812. However, the match value needs to be updated for every bit. This usually requires:   CTIMER + DMA   or:   CTIMER + Interrupt   While this is certainly possible, CTIMER does not provide the same flexible event-based architecture as SCTimer. FlexPWM Approach FlexPWM is a powerful PWM module primarily designed for applications such as motor control. Although it can also be used to generate WS2812 waveforms, it has several considerations: More complex configuration PWM resources may already be used by motor-control functions DMA-based duty-cycle updates can be more complicated For a single-wire LED protocol, FlexPWM may provide more functionality than is actually required. SCTimer Approach SCTimer provides several features that map naturally to the WS2812 protocol. MATCH/MATCHREL Double Buffering eDMA can update:   MATCHREL   while SCTimer uses:   MATCH for the current waveform. At the appropriate reload point, the MATCHREL value is transferred to MATCH automatically, allowing the next pulse width to be prepared without stopping the counter. Event Mechanism In this implementation:   Event0 → Bit-period control Event1 → Duty-cycle control + DMA trigger   This maps very naturally to the WS2812 waveform. Flexible Output Control SCTimer events can control the output using actions such as:   SET CLEAR TOGGLE   Therefore, waveform edges can be generated entirely by hardware. DMA Integration An SCTimer event can generate a DMA request:   SCTimer Event ↓ DMA Request ↓ eDMA ↓ MATCHREL Update   No CPU intervention is required for each transmitted bit. For these reasons, SCTimer + eDMA provides an efficient and scalable approach to implementing WS2812 communication on the MCXN947. 4. System Architecture The overall data flow is shown below:   RGB Color Buffer │ ▼ WS2812_PrepareBits() │ ▼ g_bitValues[] (53 or 135 ticks) │ ▼ eDMA │ ▼ SCT0->MATCHREL[] │ ▼ SCTimer │ ┌─────────────────────┐ │ Event0: Bit Period │ │ Event1: Duty Cycle │ └─────────────────────┘ │ ▼ OUT4 │ ▼ WS2812   The responsibilities of each component are clearly separated:   CPU │ └─→ Prepares/encodes LED data eDMA │ └─→ Transfers pulse-width values SCTimer │ └─→ Generates the output waveform   Once transmission starts, SCTimer and eDMA handle the bitstream generation without requiring CPU intervention for each bit. 5. WS2812 Timing Design In this implementation, the timing parameters are defined as: #define WS2812_BIT_PERIOD 188U #define WS2812_T0H 53U #define WS2812_T1H 135U The SCTimer clock is: 150 MHz Therefore, one timer tick is approximately: 1 / 150 MHz ≈ 6.67 ns   Bit Period   188 × 6.67 ns ≈ 1.253 µs ≈ 798 kHz   This is close to the nominal 800 kHz WS2812 data rate. Logic 0 The high-level duration is:   53 × 6.67 ns ≈ 353 ns Therefore: T0H ≈ 353 ns T0L ≈ 900 ns   Logic 1 The high-level duration is:   135 × 6.67 ns ≈ 900 ns   Therefore:   T1H ≈ 900 ns T1L ≈ 353 ns   In simplified form:   Logic 0: ┌───┐ │ │ ───┘ └──────────────── 353 ns Logic 1: ┌────────────┐ │ │ ───┘ └──────── 900 ns   The total bit period remains approximately 1.253 µs for both logic 0 and logic 1. 6. SCTimer Event Design Only two SCTimer events are required in this implementation. Event0: Bit-Period Event Event0 is responsible for:   Counter Limit      + Set Output High   For example: SCTIMER_CreateAndScheduleEvent( SCT0, kSCTIMER_MatchEventOnly, WS2812_BIT_PERIOD - 1U, ... );   This event defines the approximately 1.25 µs bit period. At the beginning of each new bit period, the output is driven high. Event1: Duty-Cycle Event Event1 performs two important functions:   Clear Output + Trigger DMA   This is configured using SCTimer functions such as:   SCTIMER_SetupOutputClearAction(); SCTIMER_SetupDmaTriggerAction(); The timing of Event1 is dynamically controlled using either:   53 ticks   or:   135 ticks   depending on whether the current WS2812 bit is logic 0 or logic 1. 7. MATCH/MATCHREL Double-Buffering Mechanism This is one of the key concepts in this implementation. SCTimer provides the following match-related registers:   MATCH MATCHREL While the current bit is being transmitted:   MATCH   controls the timing of the current waveform. At the same time, eDMA updates:   MATCHREL   with the timing value required for the next bit. At the next reload point:   MATCHREL │ ▼ Automatic Reload │ ▼ MATCH   This creates a hardware pipeline:   Output current bit │ ▼ DMA prepares next bit │ ▼ MATCHREL is reloaded │ ▼ Output next bit   This mechanism allows the pulse width for the next bit to be prepared while the current bit is still being transmitted. Most importantly, there is no need for the CPU to update the duty cycle on a bit-by-bit basis. 8. Data Encoding The LED color data is stored in:   g_ledData[][]   using GRB byte order, as required by the WS2812 protocol. Before transmission, the following function is called:   WS2812_PrepareBits();   It converts the LED color data into an array of SCTimer match values:   g_bitValues[] Each WS2812 bit is represented by one timing value:   53 → Logic 0 135 → Logic 1   For example, an RGB/GRB data pattern might be converted into a sequence such as:   53 53 53 135 135 ...   These values are then written by eDMA directly to the corresponding SCTimer MATCHREL register. In other words, g_bitValues[] is not the serial waveform itself. Instead, it contains the high-pulse duration for each WS2812 bit. 9. eDMA Configuration The DMA transfer path is:   g_bitValues[] │ ▼ SCT0->MATCHREL[]   The source address is incremented after each transfer so that eDMA reads the next encoded pulse-width value.   Source: g_bitValues[0] g_bitValues[1] g_bitValues[2] ...   The destination address remains fixed:   Destination: SCT0->MATCHREL[...]   Each DMA transfer moves:   2 bytes   corresponding to one match value used to determine the high time of one WS2812 bit. This means every DMA request prepares the pulse width required for the following bit. 10. Why Does DMA Start from Bit 1? An important implementation detail is that the DMA source starts from:   &g_bitValues[1]   rather than:   &g_bitValues[0]   This is intentional. The timing for Bit 0 is preloaded by the CPU before SCTimer starts. The sequence is therefore:   Preload Bit 0 │ ▼ Transmit Bit 0 │ ▼ DMA prepares Bit 1 │ ▼ Transmit Bit 1 │ ▼ DMA prepares Bit 2 │ ▼ Transmit Bit 2 │ ▼ ...     This creates a continuous hardware pipeline. By the time the current bit completes, the timing value needed for the next bit has already been written to MATCHREL. 11. Data Transmission Flow The complete transmission flow is:   WS2812_PrepareBits() │ ▼ Preload Bit 0 │ ▼ Start eDMA │ ▼ Start SCTimer │ ▼ Output Bit 0 │ ▼ DMA loads Bit 1 │ ▼ Output Bit 1 │ ▼ DMA loads Bit 2 │ ▼ ... │ ▼ DMA transfer complete │ ▼ Output remains LOW │ ▼ WS2812 Reset/Latch During bitstream transmission: No bit-level interrupt is required. The CPU does not update the duty cycle for individual bits. SCTimer generates the waveform. eDMA provides the next pulse-width value. This allows the bitstream itself to be generated entirely by hardware. 12. DMA Completion Handling After the DMA major loop completes, the DMA callback is executed:   WS2812_DmaCallback()   One of its main tasks is to disable the Event0 SET action. The sequence is:   Last bit completed │ ▼ Disable further SET action │ ▼ Output remains LOW   This puts the WS2812 bus into the low-level state required for the reset/latch interval. It is worth noting that the DMA completion callback occurs once per complete transfer, not once per WS2812 bit, so the CPU is not involved in bit-level waveform generation. 13. WS2812 Reset Pulse After the complete data frame is transmitted, the WS2812 requires the data line to remain low for a sufficient period so that the new color values can be latched. In this implementation, a simple delay loop is used:   for (...) { __NOP(); }   This generates approximately:   320 µs   of low-level hold time. The duration is comfortably longer than the reset/latch interval required by the WS2812 implementation used in this example, ensuring that the LED data is properly latched before the next frame is transmitted. For applications where CPU blocking must also be avoided between frames, this delay could be replaced with an additional hardware timer or SCTimer-based mechanism. 14. Experimental Results The output waveform was captured using a logic analyzer. The measured bit timing is approximately: Logic 0   High: 353 ns Low: 900 ns   Logic 1   High: 900 ns Low: 353 ns   Bit Period   ≈ 1.25 µs   The measured waveform therefore matches the timing values configured in the SCTimer implementation and provides the required waveform for WS2812 communication. More importantly, during the entire bitstream transmission, the CPU does not perform any bit-level timing or duty-cycle update. 15. Conclusion This project demonstrates an efficient method of driving WS2812 RGB LEDs on the MCXN947 by combining SCTimer and eDMA. The core concept can be summarized as follows: SCTimer Event0 defines the fixed WS2812 bit period. SCTimer Event1 determines the high pulse width and generates the DMA request. eDMA updates MATCHREL with the pulse-width value for the next bit. MATCHREL is automatically transferred to MATCH at the appropriate reload point. SCTimer and eDMA cooperate to generate the complete WS2812 bitstream with no CPU involvement at the bit level. Compared with traditional GPIO bit-banging, interrupt-driven PWM, or SPI encoding approaches, this solution provides several advantages: ✅ Accurate and stable timing ✅ Very low CPU overhead during transmission ✅ Good scalability for longer LED chains ✅ No bit-level interrupt processing ✅ Efficient use of MCXN947 SCTimer capabilities For applications involving RGB lighting effects, status indicators, HMI lighting, or smart lighting, the combination of SCTimer + eDMA provides a clean and efficient way to drive WS2812 LEDs on the MCXN947.
View full article
Firmware Update for MCXN947 Using a USB Flash Drive and MCUboot 1. Background and Goal Devices in the field may not always have a stable network connection, and connecting a debugger may not be convenient. In this case, a simple and reliable offline firmware update method is useful. A USB drive is easy to carry and easy to use. Service staff only need to copy the update image to the USB drive to update the device on site, without a network connection or a debugger. This document describes a USB-drive firmware update method based on FRDM-MCXN947 and MCUboot. FRDM-MCXN947 works as a USB Host and uses MSD and FatFs to access the signed update image, update.bin, on the USB drive. The application writes the image to the MCUboot Secondary Slot. After reset, MCUboot validates the image, applies Flash Remap when needed, and starts the new firmware. 2. Basic Concepts and Update Flow The update application and MCUboot work together in this solution: Update application: accesses the USB drive, reads and checks the update file, and writes the candidate firmware to the Secondary Slot. MCUboot: validates the firmware images in Flash and selects the image to start based on the image state and version. 2.1 MSD: Accessing the USB Drive MSD means Mass Storage Device. A USB drive is a common USB mass-storage device. In this solution, FRDM-MCXN947 works in USB Host mode and the USB drive works in USB Device mode. After the USB drive is detected and enumerated, the application mounts the file system with FatFs and reads update.bin from the root directory of the USB drive. The project is based on the MCUXpresso SDK host_msd_fatfs example. The original USB Host, MSD, and FatFs functions are kept, and the MCUboot update flow is added: Detect and open update.bin. Check the MCUboot Image Header. Erase the Secondary Slot. Read the image in blocks and program it to Flash. Read back and verify the Flash data. Mark the new image as ReadyForTest. Reset the device and let MCUboot start the new image. 2.2 MCUboot: Image Validation and Boot Control MCUboot is the bootloader used in this solution. MCUboot does not access the USB drive directly. After reset, MCUboot checks the firmware images in the Primary Slot and Secondary Slot, and selects the image to start based on the image state and version. The update file used by MCUboot is not a plain application binary. It contains an MCUboot Image Header, version information, and validation data. When image signature checking is enabled, MCUboot also checks the image integrity and signature. Only a valid image can be started. On FRDM-MCXN947, this solution uses MCUboot Flash Remap. The new firmware is first written to the Secondary Slot. After reset, MCUboot validates the candidate image and changes the active Flash mapping. The update application does not need to copy the complete Secondary Slot to the Primary Slot. 2.3 Overall Update Flow During normal startup, MCUboot validates and starts the current valid image. To perform a firmware update, press SW2 during reset to enter USB MSD update mode. The application reads the signed update.bin from the USB flash drive and writes it to the Secondary Slot. After the image is programmed and verified, it is marked as ReadyForTest, and the system is reset. MCUboot validates the new image and starts it using Flash Remap. After the new firmware runs successfully, it is confirmed as Pereanent to complete the update. The latest project uses the following simple flow: 3. Implementation Steps and Detailed Configuration This section follows the actual project files and functions. The steps below can be used directly to check the project configuration. 3.1 Flash Layout and Boot Address Region Start address End address Use Primary Slot 0x00000000 0x000FFFFF Current logical boot image, 1 MB Secondary Slot 0x00100000 0x001FFFFF USB update candidate image, 1 MB MCUboot 0x01008000 0x0100FFFF Bank 1 IFR 0, 32 KB   The Secondary Slot address and size in the application project must match the Flash partition settings in MCUboot. If the Flash maps do not match, MCUboot may report that the Secondary image is not found even when update.bin was written correctly. 3.2 Place MCUboot in IFR and Configure ROM Boot MCUboot is located at 0x01008000. After reset, the device must first enter MCUboot in IFR, so CMPA BOOT_CFG.BOOT_SRC must be configured to boot from IFR. MCUXpresso Secure Provisioning Tool can be used to program MCUboot, CMPA, and the first Primary image. Before testing the USB update, confirm that the serial output shows that MCUboot starts and jumps to the Primary image: hello sbl. Bootloader Version 2.0.0 Primary slot: version=... Jumping to the image 3.3 Build the Update Application from host_msd_fatfs The update application is based on the MCUXpresso SDK host_msd_fatfs example. The original USB Host event callback, MSD handling, and FatFs mount flow are kept. The usb_msd_mcuboot_update.c module is added for the MCUboot update flow. The application also includes mcuboot_app_support.c/.h and the related Flash map settings so that bl_update_image_state() can be used. app.c: board initialization, SW2 check, and USB Host task control. host_msd_fatfs.c: calls USB_MsdMcubootUpdateRun() after the USB drive is ready and FatFs is mounted. usb_msd_mcuboot_update.c: handles update.bin, Flash erase/program/verify, and the update state. mcuboot_app_support.c: marks the candidate image ReadyForTest and confirms the new image as Permanent. 3.4 Use SW2 to Select Update Mode or Normal Mode SW2 on FRDM-MCXN947 is used to enter firmware update mode. In this project, a pressed SW2 is treated as a low level. The application reads the GPIO only once during startup.   3.5 Initialize USB Host and Wait for the USB Drive When SW2 is low, the application calls USB_HostApplicationInit() to set up the USB clock, USB Host stack, and interrupt. USB_HostTaskFn() and USB_HostMsdTask() then run in the main loop until the USB drive is enumerated and FatFs is mounted.   USB_HostEvent() passes Attach, EnumerationDone, and Detach events to USB_HostMsdEvent(). The update function is called only after the mass-storage device is ready and the file system can be accessed. 3.6 Open update.bin and Check the MCUboot Image Header The update file is 1:/update.bin in the root directory of the USB drive. The application opens the file in read-only mode, gets the file size, reads the first buffer, and copies the header into mcuboot_image_header_t. The header is checked before the Secondary Slot is erased. HeaderIsValid() checks the main items below: Magic must be 0x96F3B83D. This shows that the file is an MCUboot image, not a plain application binary that starts with a vector table. Header size must be 0x400, matching the header-size option used during signing. The file size and headerSize + imageSize must not exceed the 1 MB slot. 3.7 Erase the Secondary Slot After the header check passes, the mflash driver is initialized. The required erase length is calculated from the file size and rounded to the sector size. Erasing starts at 0x00100000 and must not touch the Primary Slot.   Before erasing, the code should also make sure that eraseLength does not exceed MCUBOOT_SLOT_SIZE. 3.8 Read, Program, and Verify the Image After erase, f_lseek(&file, 0U) moves the file pointer back to the beginning. The file is then read in blocks. Each block is padded to the mflash phrase size with 0xFF, programmed to the Secondary Slot, and read back for comparison. If a write or verify step fails, the update stops and goes to cleanup.   At the end, totalWritten must match fileSize. ReadyForTest is set only after the complete file is programmed and every block passes the read-back check. 3.9 Set ReadyForTest, Reset, and Confirm the New Image After the candidate image is programmed and verified, the application calls bl_update_image_state(0, kSwapType_ReadyForTest). This writes the required update state to the Secondary Slot trailer. The system then resets. MCUboot validates the candidate image and uses Flash Remap to start the new version when the image is accepted.   ReadyForTest means that the new image is allowed to boot for testing. If the new image is not confirmed, MCUboot can return to the old image on a later reset. After the new firmware starts and passes the required basic self-check, the application should mark the image as Permanent:   4. Operation and Verification 4.1 Create and Sign the Update Image update.bin used for the USB update must be an MCUboot signed image. Do not use the plain .bin file generated by the IDE directly. Open MCUXpresso Secure Provisioning Tool and select Tools > MCUboot > Sign Image to create an image that MCUboot can validate. Figure 1. Open the MCUboot Sign Image tool Figure 2. MCUboot image signing settings Input image: select the .bin file generated by the application project. Signing private key: select the ECDSA-P256 private key that matches the public key used by MCUboot. Set the image version, header-size = 0x400, and slot-size = 0x100000. The update image version should be higher than the current running version. For the USB OTA candidate image, do not use an image that has already been padded and confirmed for direct Flash programming. Rename the signed output image to update.bin and copy it to the root directory of the USB drive. 4.2 Initial Programming Before the first test, program MCUboot and the initial application image: Program MCUboot to IFR at 0x01008000. Program the signed initial application image to the Primary Slot at 0x00000000. Reset the board and confirm that MCUboot finds the Primary image and starts the application correctly. 4.3 Run the USB Firmware Update Build and sign the new application, rename the signed image to update.bin, and copy it to the root directory of the USB drive. Insert the USB drive into FRDM-MCXN947. Hold SW2 and reset the board to enter firmware update mode. Release SW2 after the update mode starts. Wait for the firmware update to complete. The application reads update.bin, writes and verifies the image in the Secondary Slot, marks it as ReadyForTest, and then resets the device. After reset, MCUboot validates the new image and starts the new firmware using Flash Remap. Check the serial output to confirm the new firmware version and that the image is marked as Permanent. Reset the board again and confirm that the new firmware still runs correctly. Expected Log Figure 3. Example log after the new image is started 5. Summary This solution combines offline firmware delivery from a USB drive with MCUboot boot management. The application reads a signed update image through USB Host MSD and FatFs, writes the complete image to the Secondary Slot, and resets the system. MCUboot then validates the image and selects the image to start. SW2 is used to enter update mode only when needed, so update.bin can remain on the USB drive without causing repeated updates.
View full article
MCXA: Controlling Flash Access Permissions with MBC 1.Why Is MBC Needed? In an MCXA application, the internal flash is usually divided into several functional regions, such as the bootloader, application, firmware update or secondary image, and user data regions. Each region has different access requirements. For example, the bootloader and application regions must allow code execution, while the firmware update region must allow a new firmware image to be written. Therefore, proper access control for each flash region is important. The Memory Block Checker (MBC) in MCXA devices provides hardware-based memory access control. Its purpose is not simply to protect the entire flash. Instead, it applies suitable access permissions to different flash regions based on the system security requirements and software design. This is especially useful in systems that use secure boot, a bootloader, MCUboot, or over-the-air firmware updates. 2.How MBC Controls Flash Access The basic idea of MBC flash access control is to divide the protected memory space into fixed-size memory blocks and assign an access control policy to each block. When the system accesses an address managed by MBC, MBC checks the memory block that contains the address and the access control policy assigned to that block. MBC then decides whether the read, write, or execute operation is allowed. MBC configuration mainly uses two register fields. GLBAC defines an access control policy, while MBACSEL assigns a GLBAC policy to a specific memory block. The following sections first describe GLBAC and then MBACSEL. 2.1 GLBAC: Defining an Access Control Policy Using MCXA153 as an example, MBC provides eight Global Access Control settings, from GLBAC0 to GLBAC7. Each GLBAC register defines a complete access control policy, including read, write, execute, and lock permissions. The Access Control Combinations table in the reference manual lists the permission settings for each GAC index. MBC Global Access Control (GLBAC) register: The access control combinations for GLBAC0 to GLBAC7 are shown below: GLBAC defines the access control policy itself. For example, GLBAC0 can allow read and write operations, block execute operations, and remain unlocked. GLBAC2 can allow read and execute operations, block write operations, and remain locked. The final permissions are determined by the access control fields and the LK bit in the GLBAC register. GLBAC only defines the available permissions. It does not specify which flash block uses those permissions. MBACSEL is used to assign a GLBAC policy to a specific flash block. 2.2 MBACSEL: Selecting a GLBAC Policy for a Memory Block The memory space managed by MBC is divided into fixed-size memory blocks. Each memory block has an MBACSEL (Memory Block Access Control Select) field that selects the GLBAC access control policy used by that block. MBC Memory Block Configuration Word register: MBACSEL is a 3-bit field used to select one of the eight access policies defined by GLBAC0 through GLBAC7. It does not directly define read, write, execute, or lock permissions. Instead, GLBAC defines the access permissions, and MBACSEL assigns the selected GLBAC policy to a specific memory block. For example, MBACSEL = 4 means that the memory block uses the access policy defined by GLBAC4. 2.3 Difference Between Locked and Unlocked The LK bit in a GLBAC register locks the access control configuration. For example, GLBAC4 and GLBAC2 can both allow read and execute operations and block write operations. However, GLBAC4 is unlocked, while GLBAC2 is locked. When GLBACr[LK] is set to 1, the related GLBAC register becomes read-only until the next reset. If MBACSEL for a memory block already points to that locked GLBAC, the MBACSEL setting for the block also remains locked until the next reset. Therefore, the read, write, and execute fields determine whether the related flash access is allowed. The LK bit determines whether the GLBAC policy and the MBACSEL setting that uses the policy can be changed by software during the current boot cycle. 3.Two Ways to Configure MBC 3.1 Method 1: Configure MBC Through CMPA The first method uses the flash access control fields in the Customer Manufacturing/Configuration Protected Area (CMPA) to configure MBC access policies. After a system reset, the boot ROM reads the CMPA settings and applies the related MBC access policies before starting the user application. Therefore, CMPA can be used to define the initial flash access permissions before the application starts. FLASH_ACL is an important part of this configuration. The FLASH_ACL settings should be selected based on the actual flash partition layout and the required access permissions for each region. This is the main difference from configuring MBC through application code, which takes effect after the application or bootloader starts. The MCUXpresso Secure Provisioning Tool (SEC) can be used to configure flash access control in CMPA. The following steps use MCXA153 as an example. Step 1: Open CMPA Configuration On the Build image page of the SEC Tool, click CMPA configuration to open the PFR Configuration window, as shown below. Step 2: Configure FLASH_ACL In the PFR Configuration window, open Flash access control. The available settings include FLASH_ACL_0_7, FLASH_ACL_8_15, and other FLASH_ACL fields. For example, FLASH_ACL_0_7 contains ACL_SEC_0 through ACL_SEC_7. Each ACL_SEC_x field sets the access control policy for the related flash sector. As shown in the figure, each ACL_SEC_x field can select a different access control type. These options match the MBC Global Access Control policies described earlier. MBACSEL selects the related GLBAC setting, and GLBAC defines the final read, write, execute, and lock permissions. Note: CMPA is an important device configuration area. Before programming CMPA, carefully check that FLASH_ACL matches the actual flash layout and the software access requirements. Pay special attention to the lock setting and the reversed-bit encoding. If a flash region required for boot or normal operation is configured as NO_ACCESS_LOCKED by mistake, the bootloader or application may no longer be able to access that region. A recovery method should also be kept available before CMPA is programmed, so that the device can be recovered if the configuration is incorrect. 3.2 Method 2: Configure MBC Through Application Code The second method configures MBC directly in the application code. The main difference from CMPA configuration is when the configuration is applied. After the bootloader or application starts, the software can configure the required flash access policy based on the system design and the current operating stage. Using the MCXA153 SDK as an example, the SystemInit() function in system_MCXA153.c in SDK version 26.06 includes MBC initialization code. Step 1: Use GLIKEY to enable write access to the MBC registers. Step 2: Configure GLBAC0. Configure GLBAC0 to allow flash read, write, and execute operations. Step 3: Configure the flash blocks to use GLBAC0. After this configuration is complete, the application can perform read, write, and execute operations on the related flash regions. The main advantage of configuring MBC through application code is flexibility. 4.Choosing Between CMPA and Application Code Both CMPA and application code can affect the MBC configuration. The suitable method depends on when the access policy must be applied. The two methods can be compared as follows: Comparison Item CMPA Application Code Configuration stage Boot stage Software run time Effective before application starts Yes No Main purpose Set the initial access policy Run-time access control Flexibility Lower Higher Related to software state Limited Can be adjusted based on the current software state Impact of an incorrect setting May directly prevent boot or memory access Usually easier to identify during software debugging   CMPA is mainly used to set the initial flash access state during system startup. Application code can adjust the MBC configuration based on the needs of the current software stage. Therefore, the two methods are not mutually exclusive. They can be used separately or together, depending on the system design. When application code changes the MBC configuration at run time, the changes must be considered as part of the complete system security design. This includes which permissions software is allowed to change, when the changes are allowed, and whether the configuration must be locked again afterward. The implementation must follow the MBC and CMPA behavior of the target MCXA device and the security requirements of the product. The configuration examples in this article use MCXA153. 5.Summary MBC in MCXA devices provides hardware-based access control for internal flash. When designing a bootloader, secure boot flow, or firmware update system, it is important to understand the relationship between MBC, CMPA, and application code. This article uses MCXA153 to explain the two configuration methods. For an actual design, always follow the reference manual and SDK for the target device.
View full article
Introduction This lab provides hands-on experience with the FRDM-MCXE32B Gesture Classification and Vibration Monitoring proof of concept. The application demonstrates two industrial use cases: equipment anti-tamper and tilt detection, and vibration-based condition monitoring for predictive maintenance. The onboard FXLS8974CF three-axis accelerometer detects tilt, movement, and free-fall events and supplies data for vibration analysis. The application distributes the workload across both Arm Cortex-M7 cores. The secondary core (core1) acquires sensor data and performs CMSIS-DSP FFT processing. The primary core (core0) performs gesture classification and vibration-condition evaluation and controls the RGB LED, serial console, and optional LCD-PAR-S035 dashboard. The cores communicate using RPMsg-Lite over shared memory.   Hardware Requirements FRDM-MCXE32B board                  Personal computer USB Type-C cable LCD-PAR-S035 display panel (Optional) Software Requirements IDE: Visual Studio Code (latest version) SDK: v26.09.00 or later Windows operating system (these hands-on labs were developed and tested on Windows 11) Gesture Classification and Vibration Monitoring demo source code from the NXP Application Code Hub saved to your Windows PC   Monitoring demo Guide   Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here 
View full article
Introduction This lab provides hands-on experience with the FRDM-MCXE32B board using the Multicore Hello World SDK example. The primary-core (core0) and secondary core (core1) projects are configured and built together. The primary core initializes MCMGR (the Multicore Manager), prints "Hello World from the Primary Core!" to the debug console, and then releases the secondary core from reset by passing it a startup parameter. The secondary core waits for the startup data and then toggles the onboard red LED to indicate that it is running. After becoming familiar with the project, you will make simple code modifications as part of this hands-on lab. Hardware Requirements FRDM-MCXE32B board                  Personal computer USB Type-C cable Software Requirements IDE: Visual Studio Code (latest version) SDK: v26.09.00 or later Windows operating system (these hands-on labs were developed and tested on Windows 11) Multicore SDK Example Guide Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here 
View full article
MCX E32 Product Training: Reliability and Safety Focused MCUs Welcome to FRDM-MCXE32B Product Training! This page provides access to training materials, presentations, demos, recordings, and supporting resources related to the FRDM-MCXE32B development board. 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 E32 training, you will need to have your FRDM-MCXE32B board in hand and perform the set-up operations according to Lab 0 and FRDM-MCXE32B Getting Started Page which is a pre-requisite.   Step 1. Mandatory pre-work before starting with the labs:  Lab 0: This document guides you through installing the tools and materials required for the FRDM-MCXE32B hands-on labs. 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:  Lab 1: Multicore Hello World SDK Example Description This lab provides hands-on experience with the FRDM-MCXE32B board using the Multicore Hello World SDK example. The primary-core (core0) and secondary-core (core1) projects are configured and built together. The primary core initializes MCMGR (the Multicore Manager), prints "Hello World from the Primary Core!" to the debug console, and then releases the secondary core from reset by passing it a startup parameter. The secondary core waits for the startup data and then toggles the onboard red LED to indicate that it is running. After becoming familiar with the project, you will make simple code modifications as part of this hands-on lab. Lab 2: Gesture Classification and Vibration Monitoring Demo Description This lab provides hands-on experience with the FRDM-MCXE32B Gesture Classification and Vibration Monitoring proof of concept. The application demonstrates two industrial use cases: equipment anti-tamper and tilt detection, and vibration-based condition monitoring for predictive maintenance. The onboard FXLS8974CF three-axis accelerometer detects tilt, movement, and free-fall events and supplies data for vibration analysis. The application distributes the workload across both Arm Cortex-M7 cores. The secondary core (core1) acquires sensor data and performs CMSIS-DSP FFT processing. The primary core (core0) performs gesture classification and vibration-condition evaluation and controls the RGB LED, serial console, and optional LCD-PAR-S035 dashboard. The cores communicate using RPMsg-Lite over shared memory. Step 3. Review the support material and useful links to get you up to speed with some product information, MCX E32 and FRDM board information and getting started. Below also includes additional reading material.   FRDM-MCXE32B Development Board using MCUXpresso | NXP Semiconductors Getting Started with FRDM-MCXE32B Board | NXP Semiconductors MCX E32 and E31 MCUs | NXP Semiconductors MCX E32 and E31 MCUs | NXP Semiconductors Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here 
View full article
Introduction This document guides you through installing the tools and materials required for the FRDM-MCXE32B hands-on labs. Required Materials The hardware and software requirements may vary by exercise, but the following items are required for most hands-on labs. Hardware Requirements FRDM-MCXE32B board                  Personal computer USB Type-C cable Software Requirements MCUXpresso Installer (Recommended) IDE: Visual Studio Code (latest version) SDK: v26.09.00 or later MCUXpresso extension for VS Code (latest version) LinkFlash tool (included with the LinkServer installation) Windows operating system (these hands-on labs were developed and tested on Windows 11) Hands-On Prerequisites Guide.  
View full article
Supply resilience is now a critical factor in MCU selection. Discover how NXP’s MCX portfolio combines predictable lead times, diversified manufacturing, long-term product longevity, and strategic investments like VSMC’s new Singapore facility to help developers build with confidence and reduce supply chain risk.
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 Reference Manual - MCX C15/C16  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 MCX C15/C16 Product Training 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
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 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. 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. 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. 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. Additional requirements as below:  MikroE OLED B/W Click display in I2C mode SparkFun Qwiic dToF Imager (TMF8820) Qwiic board cable Step 3. 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  Community Support If you have questions regarding this training, please leave your comments in our MCU Community! here 
View full article
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
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