Getting Started with MCXNx4x-EVK

Last Modified: 2024-01-03 15:49:00Supports MCX-N9XX-EVK | MCUXpresso Developer Experience

1. Plug It In

Let's take your MCXNx4x board for a test drive! You have the choice of watching the sequence in a short video or following the detailed actions listed below.

1.1 Get Familiar with the Board

The board comes preloaded with a diagnostic demo program, which will cause the red LED at the center of the board to blink approximately once per second.

1.2 Plug In the Board

Connect a micro USB cable from connector J5 to a host computer or power supply to power up the board and run the demo program.

2. Get Software

The software and tools installation is detailed in a short video or you can choose to follow the steps below. The MCXNx4x is supported by MCUXpresso SDK which is described in this guide.

2.1 Install Your Toolchain

NXP offers a complimentary toolchain called MCUXpresso IDE. Please download MCUXpresso v11.8.1 or above.

Get MCUXpresso IDE

Get MCUXpresso for VS Code.

Learn how to install VS Code for your host PC with the following tutorial.

Want to use a different toolchain?

If you need help choosing, explore the MCUXpresso Suite of Software and Tools.

The MCUXpresso SDK includes support for other tools such as IAR , KEIL  and command-line GCC .

2.2 Jump Start Your Design with the MCUXpresso SDK

The MCUXpresso SDK is complimentary and includes full source code under a permissive open-source license for all hardware abstraction and peripheral driver software. You may install the MCUXpresso SDK directly form the MCUXpresso SDK website . Click on the button below to open this board's SDK builder.

    Get SDK for MCX-N9XX-EVK

    Get SDK for MCX-N5XX-EVK

2.3 MCUXpresso Config Tools

The MCUXpresso Config Tool is an integrated suite of configuration tools that guides users in creating new MCUXpresso SDK projects, and also provides pin and clock tools to generate initialization C code for custom board support. It is fully integrated as a part of MCUXpresso IDE and also as a separate tool if using a different IDE. Click the Get MCUXpresso Config Tools below to get the Config Tools installer.

Get MCUXpresso Config Tools

2.4 Programming and Provisioning Tools

The MCUXpresso Secure Provisioning (SEC) Tool is a GUI-based application provided to simplify the generation and provisioning of bootable executables on NXP MCU devices. We recommend all users to begin with the MCUXpresso Secure Provisioning (SEC) tool for trial run and mass production use. It supports secure programming and device provisioning on NXP's microcontrollers at the production stage.

After downloading the tool, you can find the user guide under the ‘Help’ tab. Follow the instructions for your board in the ‘Processor-specific workflow’ chapter.

SEC Installation

3. Build and Run

If one or more of the demo applications or driver examples sounds interesting, you're probably wanting to know how you can build and debug yourself. The Getting Started with MCUXpresso SDK guide provides easy, step-by-step instructions on how to configure, build and debug demos for all toolchains supported by the SDK. Use the guide below to learn how to open, build and debug an example application using the MCUXpresso IDE.

3.1 Build and Flash Application Using MCUXpresso IDE

The following steps will guide you through the hello_world demo application using MCUXpresso IDE for the Cortex-M33 application. The MCUXpresso IDE installation can be found at the section Get Software of this getting started guide.

Importing MCX N SDK is done in the Get Software Section.

  1. Find the Quickstart Panel in the lower left-hand corner
  2. Then click on Import SDK example(s)
  3. Click on the MCX N board to select an example that can run on that board, and then click on Next
  4. Use the arrow button to expand the demo_apps category, and then click the checkbox next to hello_world to select that project. To use the UART for printing (instead of the default semihosting), select UART as the SDK Debug Console checkbox under the project options. Then, click on Finish
  5. Select the project and build it
  6. The project will build without problems
  7. Connect the board to your computer with the micro USB to J5 ‘MCU LINK’ port
  8. Download the application to your board
  9. Select the J-Link debug probe
  10. Run the application

3.2 Build and Flash Application with Alternative Toolchains

MCUXpresso for Visual Studio Code (VS Code) provides an optimized embedded developer experience for code editing and development. Learn how to build and flash an application with VS Code.

Using a different toolchain?

This demo is also available for IAR and KEIL.

4. Create

4.1 Clone an Example Project from MCUXpresso IDE

The following steps will guide you through the manipulation of the general-purpose outputs.

  1. Find the Quickstart Panel in the lower left-hand corner and click on Import SDK example(s)
  2. Click on the EVK-MCXNx4x board to select that you want to import an example that can run on that board, and then click on Next
  3. Use the arrow button to expand the driver_examples category, then expand the ctimer examples, click on the check box next to ctimer_match_interrupt_example to select it. To use the UART for printing (instead of the default semihosting), Select UART as the SDK Debug Console checkbox under the project options. Then, click on Finish
  4. Click on the “Click on the “evkmcxnx4x_ctimer_match_interrupt_example” project in the Project Explorer View and build, compile and run the demo as described in the previous section
  5. You should see the GREEN and RED LED changing back and forth
  6. Terminate the debug session

4.2 Clone an Example Project Using MCUXpresso Config Tool for 3rd Party IDE

The following steps will guide you through the manipulation of the general-purpose outputs.

  1. Open the MCUXpresso Config Tool
  2. In the wizard that comes up, select the “Create a new configuration based on an SDK example or hello word project” radio button and click on Next
  3. On the next screen, select the location of the MCUXpresso SDK . The SDK package must be unzipped beforehand. Then select the IDE that is being used. Note that only IDEs that were selected in the online SDK builder when the SDK was built will be available and click on clone select example. Then select the project to clone. For this example, we want to use the gpio led output project. You can filter for this by typing “ctimer” in the filter box and then selecting the “ctimer_match_interrupt_example” example project. You can then also specify where to clone the project and the name. Then click on Finish
  4. After cloning, go to the directory you selected and open the project for your IDE. Import, compile and run the project as done in previous sections
  5. You should see the RED and BLUE LED changing back and forth
  6. Terminate the debug session

4.3 Use MCUXpresso IDE Pins Tools

  1. Open the pins tool by selecting “ConfigTools” on the top right hand of the file explorer window and then select “ Open Pins”
  2. The pins tool should now display the pin configuration for the ctimer project

4.4 Use the Pins Tools to Modify the LED Routed Pin

  1. We’ll use MCUXpresso IDE for the rest of the instructions, but the same steps can be done in MCUXpresso Config tools for third party IDEs. In the Pins view deselect “Show dedicated pins” and “Show no routed pins” checkboxes to see only the routed pins. Routed pins have a check in a green box next to the pin name. The functions selected for each routed pin are highlighted in green
  2. In the current configuration, PIO3_2 and PIO3_3 are routed as the outputs of the CTimer. Let’s add a third Ctimer Match output and enable the Green
  3. Select “Show no routed pins” to see the other options. To enable the third Ctimer Match Output, browse the column for Ctimer and select and output. In this example, we will select, Ctimer4 Match 2 on PIO3_6. Select the item in the Ctimer column to enable
  4. Now, let’s route the Green LED. In the search box type “green” so that the routed pin for this LED is shown. Finally, click the box under the GPIO column. The box will highlight in green, and a check will appear next to the pin
  5. Next configure the GPIO pin as an output in the “Routing Details” window
  6. Now it’s time to implement these changes into the project by exporting the new updated pin_mux.c and pin_mux.h files that are generated by the Pins tool. Click on Update Project in the menu bar
  7. The screen that pops up will show the files that are changing and you can click on “diff” to see the difference between the current file and the new file generated by the Pins tool. Click on “OK” to overwrite the new files into your project
  8. Let’s add some additional code to the example. Open simple_match_interrupt.cfile and add the following macros for the third ctimer output
  9. Add the Green LED functions as well
  10. Some additional code to be implemented will be the third ctimer’s callback, this can be copied from ctimer_match1_callback and modify the content to match2. To be able to visually identify the new ctimer, we will remove one of the previous ctimers as shown
  11. The main function will need to include the initialization of both the Green LED and the Ctimer
  12. Build and download the project as done in the previous section
  13. Run the application. You should now see the Green and Blue LED blinking back and forth
  14. Terminate the debug session

5. MCUXpresso Developer Experience

Check out each of the following sections to learn about the ecosystem provided for flexible protyping and development. In the video below, we will introduce you to the FRDM platform, the full-featured EVK and the compatible shields for extended capabilities. In addition we will walk you through our Application Code Hub portal where we provide numerous application examples through NXP's Github.

5.1 FRDM Platform, Full Feature EVK and Shields

For quick prototyping platforms, we offer both the low-cost FRDM platform and the full-featured EVK.

FRDM development boards come with standard form factor and headers, easy access to MCU I/Os, on-board MCU-Link debugger and a USB-C cable. Our full featured evaluation kits include extended I/O and interface access, extendibility with WiFi and additional MCU-Link features. There are also many compatible Click Boards and/or Arduino shields. For those that are supported with an Open CMSIS Pack examples may be available on ACH, but if not, many of them are easy to use via serial interface like I2C, SPI and UART, for which we provide drivers with examples in the MCUXpresso SDK.

5.2 Application Code Hub

The Application Code Hub further enhances our MCUXpresso Developer Experience by giving developers an interactive dashboard to quickly locate software. Visit the ACH  today to start exploring or discover additional details and benefits of the new interactive Application Code Hub.

Software accessible from Application Code Hub is located in NXP’s GitHub repository  so it can be easily accessed and cloned from that location directly.

5.3 Demo Walkthrough

The following demo walks us through importing a project from ACH using a system based on the FRDM platform with a motor control shield and a low cost LCD. Although your evaluation board may differ from this system, the following steps can be replicated and used for all supported platforms.

System Design Guides

Terminal Application

Toolchains

MCUXpresso for VS Code

Debugger Firmware

Boot Options

Documents and Videos Application Note SW (if applicable) Description
CANopen bootloader on MCXN An application note that describes the necessary steps and requirements to implement the CANOpen bootloader.
Flash memory Swap Feature on MCXN This application note describes how to use the flash remap feature on the MCXN series.
IRC Trim Feature on MCX N Series Learn about the different trim options on MCX N Series.
Using the Flash Command Controller Programming to flash using the flash command controller on MCX N Series.

Tools and Reference

MCUXpresso Secure Provisioning Tool A GUI-based application provided to simply the generation and provisioning of bootable executables on NXP devices.

External Memory

Documents and Videos Application Note SW (if applicable) Description
Using FlexIO to Emulate Quad SPI An application note that describes how to use the FlexIO peripheral and use it to emulate a Quad SPI interface.

MCUXpresso SDK Examples

FlexSPI Octal eDMA Transfer Example

In this example, flexspi will send data and operate the external nor flash connected with FLEXSPI. Some simple flash commands will be executed, such as Write Enable, Erase sector, program page with DMA.

Path: <SDK_PATH>\boards\frdmmcxn947\driver_examples\flexspi\octal\edma_transfer" 

FlexSPI Octal Polling Transfer Example

In this example, flexspi will send data and operate the external nor flash connected with FLEXSPI. Some simple flash commands will be executed, such as Write Enable, Erase sector, program page with the polling method.

Path: <SDK_PATH>\boards\frdmmcxn947\driver_examples\flexspi\octal\polling_transfer" 

Power Management

Documents and Videos Application Note SW (if applicable) Description
MCX Nx4x Power Management user guide This user guide covers the elements of the MCXN's power capabilities and settings.
OPAMP usage on MCXN947 This application note describes the functions of OPAMP module and how to use OPAMP features on MCXN947.
DCDC Usage for MCXNx4x/Nx3x Series MCU This application note is designed to provide a better understanding of the on-chip DCDC module.
MCX Nx4x Estimated Power-on Hours This document describes the estimated product Power-on Hours (PoH) for the MCX N94X and MCX N54X devices.

MCUXpresso SDK Examples

Power Mode Switch Example

The power mode switch demo application demonstrates the usage of low level power-related drivers to enter/exit different power modes.

Path: <SDK_PATH>\boards\frdmmcxn947\demo_apps\power_mode_switch

Security and Integrity

Documents and Videos Application Note SW (if applicable) Description
MCX N94x OTA update by using SB3 file An application note that describes how to to an over-the-air update using a secure container with the secure update feature of MCXN.
Encryption and decryption enablement using NPX module on SPSDK tool Using the SPSDK command-line tool to enable the PRINCE module for encryption/decryption on the internal flash.
Encryption and Decryption Enablement using IPED Module on SPSDK tool Using the SPSDK command-line tool to enable the PRINCE module for encryption/decryption on the internal flash.
Encryption and decryption enablement using NPX module on SEC tool Using the Secure Provisioning Tool GUI-based tool to enable the PRINCE module for encryption/decryption on an external flash.
Encryption and decryption enablement using IPED module on SEC tool Using the Secure Provisioning Tool GUI-based tool to enable the PRINCE module for encryption/decryption on the internal flash.
Secure Boot for MCXN Using the Secure Provisioning Tool GUI-based tool to enable the PRINCE module for encryption/decryption on the internal flash.
MCXN Debug authentication using SEC tool This application note describes how to enable secure boot as well as how to use the device management for secure manufacuring.
MCX N-series MCUs Provisioning for Security An application note that describes how to use the debug authentication feature on the MCXN series.
Building the Right Level of Security for Your Application With NXP and IAR Systems In this training, experts from NXP and IAR Systems will give you an overview of C-Trust, show you how to take advantage of the available features and implement "security out of the box"

MCUXpresso SDK Examples

ELS and PKC Examples

The ELS PKC application provides examples, which demonstrate usage of most available algorithms and a cryptolibrary lightweight testing.

 Path: <SDK_PATH>\boards\frdmmcxn947\els_pkc_examples\els_hash
 Path: <SDK_PATH>\boards\frdmmcxn947\els_pkc_examples\els_symmetric
 Path: <SDK_PATH>\boards\frdmmcxn947\els_pkc_examples\els_pkc_asymmetric
 Path: <SDK_PATH>\boards\frdmmcxn947\els_pkc_examples\els_pkc_common"

Tools and References

MCUXpresso Secure Provisioning Tool Secure Provisioning SDK (SPSDK) is an open source development kit with its source code released on GitHub and PyPI. 

SPSDK GitHub  Secure Provisioning SDK (SPSDK) is an open source development kit with its source code released on GitHub and PyPI.

Wired Communication

Documents and Videos Application Note SW (if applicable) Description
Using SmartDMA for keyscan on MCX N Series For mechanical repetitive tasks like keyscan, SmartDMA provides high and low levels for each row of the keyboard, then quickly reads the level of each column, and finally determines which button is pressed.
USB Remote Wake-up on MCXN947 This application note describes how to use the remote wake-up function on both full and high-speed USB interfaces.

Multicore and Hardware Acceleration

Documents and Videos Application Note SW (if applicable) Description
Optimizing Performance on MCX N-series This application note explains the features of MCXN series devices that can affect system performance.
MCXN9XX Inter-Core Communication This application note introduces how dual-core devices can communicate using the mailbox interface.
Face Detection Demo with Neural Processing Unit (NPU) Accelerated on MCXN947  Leverage the eIQ Neutron NPU to accelerate face detection on MCX N947.

MCUXpresso SDK Examples

A vast variety of powerquad examples are provided for different mathematical algorithms.

Path:

<SDK_PATH>\boards\frdmmcxn947\driver_examples\powerquad 

Audio

Documents and Videos Application Note SW (if applicable) Description
Headset with touch function on MCXNx4x This application note describes how to use the MCX-N5XX-EVK to implement USB audio with touch control.
MCXN9XX MICFIL interface This application note provides details on how to configure and use the MICFIL interface using different mechanisms.

Display and Graphics

Documents and Videos Application Note SW (if applicable) Description
Using SmartDMA for graphic on MCX N In this application note, the demo used is the simplest common DMA function. SmartDMA moves memory data to the FlexIO peripheral data register and FlexIO outputs data to the LCD.
How to Use SmartDMA to Implement Camera Interface Use smartDMA interface to implement a camera interface using MCXN947.

MCUXpresso SDK Examples

emWin GUI Demo

Demonstrates the graphical widgets of the emWin library.

Path:

<SDK_PATH>\boards\frdmmcxn947\emwin_examples

LVGL Examples

A demo application to show LVGL widgets.

Path:

<SDK_PATH>\boards\frdmmcxn947\lvgl_examples

Tools and References

Graphical User Interfaces for NXP Microcontrollers

Learn more about your GUI options for NXP Microcontrollers.

LVGL open source Graphics Library

LVGL is a free and open-source embedded graphic library with features that enable you to create embedded GUIs with intuitive graphical elements, beautiful visual effects and a low memory footprint.

GUI Guider

A user-friendly graphical user interface development tool from NXP that enables the rapid development of high quality displays with the open-source LVGL graphics library.

NXP emWin Libraries

NXP has partnered with SEGGER microcontroller to offer the high performance emWin embedded graphics libraries in binary form for free commercial use with any Arm Cortex-M microcontrollers from NXP.

GUI Development With emWin and AppWizard

How to use the different features in AppWizard to create complete, ready-to-run projects based on emWin.