Getting Started with FRDM-MCXW71 | NXP Semiconductors

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.

Video Player is loading.
Current Time 0:00
Duration 1:19
Loaded: 0%
Stream Type LIVE
Remaining Time 1:19
 
1x
  • Chapters
  • descriptions off, selected
  • captions off, selected
  • en (Main), selected

    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.

    2. Get Software

    Video Player is loading.
    Current Time 0:00
    Duration 0:00
    Loaded: 0%
    Stream Type LIVE
    Remaining Time 0:00
     
    1x
    • Chapters
    • descriptions off, selected
    • captions off, selected

        2.1 Install Your Toolchain

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

        Need help choosing?

        Get MCUXpresso IDE

        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 .

        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.

        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.

        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 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 Secure Provisioning Command Line Tool (SPSDK)

        Secure Provisioning SDK (SPSDK) is a unified, reliable and easy-to-use Python SDK library working across the NXP MCU portfolio providing a strong foundation from quick customer prototyping up to production deployment.

        To install the SPSDK, you may follow the instructions below, for more details or if you are using a different OS, please visit the installation guide provided in the Secure Provisioning SDK (SPSDK)

        Requirements

        Make sure to have Python 3.7+  installed (old version 2.x is not supported)

        For Windows users:

        1. Create a folder in which the SPSDK repository will be located. In this example, I use the C:\spsdk
        2. Clone the repository to this folder
          1. git clone MCUXpresso Github
        3. In the same folder, you may create and activate your virtual environment.

          Create the python virtual environment.

          1. python -m venv venv

            Activate the virtual environment

          2. venv\Scripts\activate

            When the virtual environment is active you will see the virtual environment's name in parenthesis next to your current working path.

            Anytime you use the SPSDK, it is necessary to activate the virtual environment. You do not need to create a new environment each time. Repeat step 3.b only.

        4. Install dependencies
          1. python -m pip install --upgrade pip
          2. c.pip install spsdk
        5. Ensure that you spsdk installation has been successful. You will see the output of the complete menu by running the following command.
          1. spsdk -help

        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

        Here you will find two type of images for the NBU FW:

        1. SB3 File Type
          1. The FRDM-MCXW71 comes programmed with set keys for ease of use in development
        2. XIP File Type
          1. This is for samples that are not programmed with any keys. For these devices, you can create your custom keys, then create an SB3 file based on this XIP image

          To update the NBU, you may use the SPSDK command line tool.

          1. Open the path to your SPSDK folder and activate the virtual environment
            1. >> venv\Scripts\activate
          2. Place your device in ISP mode. For this example we will use the UART peripheral by connecting a USB cable to J14. On the EVK you can enter ISP by the following method
            1. Press and hold SW3, press and release Reset, and then release SW3
          3. Once the device is connected you may check your devices available using SPSDK to find the COM port it is connected to
            1. >> nxpdevscan
          4. Then you may run the 'receive-sb-file' command to load the sb3 file
            1. >> blhost -p COM27 receive-sb-file path_to_SDK\mcxw71_nbu_ble_hosted.sb3 File Type

        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)

        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. The Pins Tool should now display the pin configuration for the TPM project
        3. 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. 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
        3. 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
        4. FRDM-MCXW71 Filter PTA19

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

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

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

          FRDM-MCXW71 Update Files
        11. 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
        12. 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
        13. Add initialized structure for TPM0_CH2
        14. FRDM-MCXW71 Add TPM0_CH2 Structure

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

          FRDM-MCXW71 Add TPM0_CH2 Control Function
        17. Build and download the project as done in the previous section
        18. 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
        19. 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.

        Video Player is loading.
        Current Time 0:00
        Duration 2:10
        Loaded: 0.00%
        Stream Type LIVE
        Remaining Time 2:10
         
        1x
        • Chapters
        • descriptions off, selected
        • captions off, selected
        • en (Main), selected

        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.

        Video Player is loading.
        Current Time 0:00
        Duration 3:25
        Loaded: 0%
        Stream Type LIVE
        Remaining Time 3:25
         
        1x
        • Chapters
        • descriptions off, selected
        • captions off, selected
        • en (Main), selected

        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.

        Video Player is loading.
        Current Time 0:00
        Duration 4:25
        Loaded: 0.00%
        Stream Type LIVE
        Remaining Time 4:25
         
        1x
        • Chapters
        • descriptions off, selected
        • captions off, selected
        • en (Main), selected