Getting Started with FRDM-MCXW71

Last Modified: Aug 28, 2024Supports FRDM-MCXW71 | MCUXpresso Developer Experience

Contents of this document

  • 1

    Plug It In
  • 2

    Get Software
  • 3

    Build, Run
  • 4

    Create
  • 5

    MCUXpresso Developer Experience

1. Plug It In

Let's take your FRDM 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 FRDM-MCXW71 board is pre-programmed with a wireless demo. This serves as a sanity check to verify that the device is working as expected out of the box.

FRDM-MCXW71 Board

FRDM-MCXW71 Board

1.2 Plug In the Board

Connect a type-C USB cable from connector J10 to a host computer or power supply to power up the board and run the demo program. At this point, you should see the RGB LED blinking at a steady rhythm.

FRDM-MCXA153 Plug In the Board

2. Get Software

2.1 Install Your Toolchain

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

Need help choosing?

MCUXpresso IDE

Get MCUXpresso IDE

Visual Studio Code

Get VS Code

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

Want to use a different toolchain?

No problem! The MCUXpresso SDK includes support for other tools such as IAR , Keil  and command-line GCC .

GS Tool Logos

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 from the MCUXpresso SDK website at MCUXpresso SDK Builder . Click the button below to open this board's SDK builder.

MCUXPRESSO-SDK-TN

Get MCUXpresso Config Tools

2.3 MCUXpresso Config Tools

The MCUXpresso Config Tools 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.

MCUXpresso Config Tools

Get MCUXpresso Config Tools

2.4 Programming and Provisioning Tools

NXP provides 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. The MCUXpresso Secure Provisioning (SEC) Tool is a GUI-based application provided to simplify generation and provisioning of bootable executables on NXP MCU devices.

The Secure Provisioning SDK (SPSDK) is an open-source development kit with its source code released on GitHub  and PyPI . This command-line tool is useful when interfacing with a custom or partner programming tool.

SEC

SEC Installation

2.5 Install Drivers

MCU-Link is supported on host computers running on Windows 10, MacOS X, and Ubuntu Linux operating systems (OSs). For each OS, an MCU-Link firmware package is available that includes the host device drivers, MCU-Link firmware, and scripts to program CMSIS-DAP and J-Link firmware options.

To download and install the host device drivers and update the MCU-Link firmware, follow these steps:

  1. Go to the MCU-Link page on the NXP website
  2. Click Design Resources. Then, click the SOFTWARE category. The latest version installation packages are displayed at the top for all three compatible OSs
  3. Download the package for your host OS and install it (Linux/MacOS) or execute the installer program (Windows). The package is installed/unzipped to the MCU-LINK_installer_Vx_xxx_directory
  4. Switch MCU-Link to (USB) ISP mode by shorting jumper JP5
  5. Connect the J10 connector on the board to the USB port of the host computer through a USB micro-B cable. MCU-Link gets powered up in (USB) ISP mode. The board gets enumerated as a human interface device (HID) class device
  6. Program the MCU-Link firmware into the MCU-Link internal flash using the instructions provided in the "Firmware Installation Guide" section of the "Readme.txt" file. This file can be found in the MCU-LINK_installer_Vx_xxx_directory. Use the scripts provided to program the CMSIS-DAP or J-Link firmware option
  7. Disconnect the board from the host computer, remove jumper JP5 and reconnect the board

2.6 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

SEC Installation

3. Build, 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.

3.1 Updating NBU for Wireless Examples

This feature is available only for processors with radio. The NBU firmware is distributed within the MCUXpresso.

SDK as an SB3 file or as a binary file (*.xip), in folder middleware\wireless\ble_controller\bin \. There are two options to update the NBU firmware. First, use a prepared SB file with NBU firmware. It can be used for the EVK and FRDM boards with provisioned NXP keys. The other way is to prepare a custom SB file that will load the NBU firmware.

SB file with NXP keys on EVK

  1. Create or open a workspace for KW45xx/K32W1xx/MCXW71xx/KW47xx/MCXW72xx
  2. In the menu bar, select Tools > Manufacturing Tool
  3. Select the Apply SB file operation
  4. Provide the SB file
  5. Detect a connected device by clicking the Auto detect button
  6. Load the SB file by clicking the Start button

Custom SB file

  1. Open a workspace for KW45xx/K32W1xx/MCXW71xx/KW47xx/MCXW72xx with the custom keys that were provisioned to the device
  2. Copy NBU firmware into workspace as source_images\nbu_firmware.xip
  3. In the menu bar, select Tools > SB Editor
  4. Fill the Properties tab or import a setting from the SB file created on the Build tab
  5. Switch to the Commands tab
  6. Select High-level command update-nbu-firmware
  7. Prepare the final SB file by clicking the Generate button
  8. Click the To Manufacturing tool button to switch to the manufacturing window with preselected Apply SB file operation and preselected SB file
  9. Detect a connected device by clicking the Auto detect button
  10. Load the SB file by clicking the Start button

3.2 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 and the SDK for the MCXW-Series can be found at the Get Software section of this Getting Started guide.

3.3 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. The example sets up a TPM to generate three PWM signals and change the brightness of a LED.

  1. Find the Quickstart Panel in the lower left-hand corner and click on Import SDK example(s)

    FRDM-MCXW71 Import SDK example(s)
  2. Click on the FRDM-MCXW71 board to select that you want to import an example that can run on that board, and then click Next
  3. FRDM-MCXW71 Series Board

    FRDM-MCXW71 Series Board
  4. Use the arrow button to expand the driver_examples category, then expand the TPM examples, click on the checkbox next to frdmmcxw71_tpm_pwm_twochannel 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
  5. FRDM-MCXW71 TPM Examples

    FRDM-MCXW71 TPM Examples
  6. Click on the frdmmcxw71_tpm_pwm_twochannel project in the Project Explorer View and build, compile and run the demo as described in the previous section
  7. FRDM-MCXW71 Build and Debug Your Project

    FRDM-MCXW71 Build and Debug Your Project
  8. Choose "Serial Terminal" and then set the UART settings to 115,200 baud rate, 8-bit data size, no parity and 1 stop bit. Press OK. Enter any number between 0-9 to change the LED brightness
  9. Terminate the debug session

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

The following steps will guide you through the manipulation of the general-purpose outputs. The example sets up a TPM to generate a PWM signal and change a LED brightness.

  1. Open the MCUXpresso Config Tools
  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 Next
  3. FRDM-MCXW71 Create a New Configuration

    FRDM-MCXW71 Create a New Configuration
  4. 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. Click on "Clone the selected example for a board or kit". Then, select the project to clone. For this example, we want to use the tpm_pwm example. You can filter for this by typing "tpm" in the filter box and then selecting the frdmmcxw71_tpm_pwm_twochannel example project. You can then also specify where to clone the project and the name. Then, click on Finish
  5. FRDM-MCXW71 Clone Example

    FRDM-MCXW71 Clone Example
  6. After cloning the example, go to the directory you selected and open the project for your IDE. Import, compile and run the project as done in previous sections
  7. You should see the RED and GREEN LED changing back and forth
  8. Terminate the debug session

4.3 Use MCUXpresso IDE Pins Tools

  1. Open the Pins Tool by selecting "Config Tools" on the top-right hand of the file explorer window and then select "Open Pins"
  2. FRDM-MCXW71 Config Tools
  3. The Pins Tool should now display the pin configuration for the TPM project
  4. FRDM-MCXW71 Pin Configuration

    FRDM-MCXW71 Pin Configuration

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. FRDM-MCXW71 Routed Pins
  3. In the current configuration, PTA21 and PTA20 are routed as the outputs of the TPM. Let's add the pin configuration to enable the GREEN LED
  4. FRDM-MCXW71 Enable Green LED
  5. Select "Show no routed pins" to see the other options. To enable the GREEN LED, search for PTA19 and select PTA19,0 under the GPIO column
  6. FRDM-MCXW71 Filter PTA19

    FRDM-MCXW71 Filter PTA19
  7. Next, configure the GPIO pin as an output in the "Routing Details" window
  8. FRDM-MCXW71 Routing Details

    FRDM-MCXW71 Routing Details
  9. 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
  10. FRDM-MCXW71 Update Project

    FRDM-MCXW71 Update Project
  11. The screen that pops up will show the files that are changing. 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
  12. FRDM-MCXW71 Update Files

    FRDM-MCXW71 Update Files
  13. Let's add some additional code to the example. Open tpm_pwm_twochannel.c file and add the following macros to initialize the GREEN LED
  14. FRDM-MCXW71 Definitions
  15. Add the macro to enable the use of the LED, instead of the TPM output, so that we can visualize the behavior on the board easily
  16. Add initialized structure for TPM0_CH2
  17. FRDM-MCXW71 Add TPM0_CH2 Structure

    FRDM-MCXW71 Add TPM0_CH2 Structure
  18. In the main function, add the TPM0_CH2 control function inside the while loop
  19. FRDM-MCXW71 Add TPM0_CH2 Control Function

    FRDM-MCXW71 Add TPM0_CH2 Control Function
  20. Build and download the project as done in the previous section
  21. Run the application. Choose "Serial Terminal" and then set the UART settings to 115,200 baud rate, 8-bit data size, no parity and 1 stop bit. Press OK. Enter any number between 0-9 to change the LED brightness. You can see the RGB_LED also changed the brightness, and the color should be white, which means that all three BLUE/GREEN/RED LEDs are on
  22. Terminate the debug session

5. MCUXpresso Developer Experience

Check out each of the following sections, to learn about the ecosystem provided for flexible prototyping 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, onboard MCU-Link debugger and a USB-C cable. Our full features evaluation kits include extended I/O and interface access, extendable with Wi-Fi and additional MCU-Link features. There are also many compatible Click Board and/or Arduino shields. For those that are supported with an Open CMSIS Pack example may be available on ACH, but if not many of them are easy to use via serial interface like I²C, 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

Support

Forums

Connect with other engineers and get expert advice on designing with the FRDM-MCXW71 on one of our community sites.