Getting Started with the OM13588 | NXP Semiconductors

Getting Started with the OM13588

Last Modified: 2022-12-28 15:48:00Supports USB Type-C Shield Board for Kinetis Freedom and LPC Boards

Contents of this document

  • 1

    Get Software
  • 2

    Build, Run
  • 3

    Create

1. Get Software

1.1 Download MCUXpresso SDK with USB PD

The MCUXpresso SDK is complimentary and includes full source code under a permissive open source license for all hardware abstraction and peripheral driver software.

The MCUXpresso SDK contains USB Type-C Power Delivery middleware to support rapid development.

Click below for instructions on how to use the SDK Builder to create a custom SDK package with USB Power Delivery support.

1.2 Install Your Toolchain

NXP offers a complimentary toolchain called MCUXpresso IDE

Get MCUXpresso IDE

Want to use a different toolchain?

No problem. The MCUXpresso USB Power Delivery SDK includes support for IAR Embedded Workbench IDE .

1.3 MCUXpresso Config Tools

The MCUXpresso Config Tool is an integrated suite of configuration tools that guide users in creating new MCUXpresso SDK projects, and also provides pin and clock tools to generate initialization C code for custom board support.

Get MCUXpresso Config Tools

1.4 PC Configuration

Many of the example applications output data over the MCU UART so you'll want to make sure that the driver for the board's virtual COM port is installed. Before you run the driver installer, you MUST have the board plugged into your PC.

Download Driver

With the serial port driver installed, run your favorite terminal application to view the serial output from the MCU's UART. Configure the terminal to 115200 baud rate, 8 data bits, no parity, and one stop bit. To determine the port number of the FRDM-KL28Z virtual COM port, open the device manager and look under the "Ports" group.

Not sure how to use a terminal application? Try one of these tutorials: Tera Term Tutorial, PuTTY Tutorial

2. Build, Run

2.1 Attach the USB Cable

BUILD-USB-C

BUILD-USB-C

2.2 Explore the USB PD MCUXpresso SDK Example Code

The MCUXpresso SDK comes with an extensive list of example applications code.

The USB Power Delivery SDK middleware provides several example codes compatible with the USB Type-C PD Shield Board located at <sdk_install_directory>/boards/frdmkl28z_om13588/usb_examples</sdk_install_directory>

To learn more about specific example code, open the readme.txt file in an example's directory.

2.3 Build, Download USB PD SDK Example

If one or more of the demo applications or driver examples sounds interesting, you probably want 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 a USB PD example application using the MCUXpresso IDE.

2.4 Disconnect the USB Cable

BUILD-USB-C

BUILD-USB-C

2.5 Run usb_pd software example

Use the guide below for a step-by-step guide on how to assemble the hardware and running the usb_pd DRP example application.

3. Create

Clone a USB PD example project from MCUXpresso SDK

Option A: Use the MCUXpresso IDE to clone an example project

3.1 Use MCUXpresso IDE

  1. Open MCUXpresso IDE
  2. Click Import SDK Example(s)... from the Quick Start Panel
  3. Select the FRDM-KL28Z-OM13588 board in the Import Wizard. Then, select Next
  4. OM13588 Create tab Step 3

    OM13588 Create tab Step 3
  5. Use the arrow button to expand the usb_examples category, and then click the checkbox next to usb_pd_sink_battery_bm to choose that project. Select UART as the SDK Debug Console under the project options. Then, click Next
  6. OM13588 Create tab Step 4

    OM13588 Create tab Step 4
  7. On the Advanced Settings wizard, clear the checkbox Redirect SDK “PRINTF” to C library “printf” to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish
  8. OM13588 Create tab Step 5

    OM13588 Create tab Step 5
  9. Now build the project by clicking on the project name and then click on the Build icon

3.2 Use MCUXpresso Config Tools

  1. Open the MCUXpresso Config Tool
  2. In the wizard that comes up, browse to the place where the MCUXpresso SDK previously unzipped, and then select the “Clone an example project” radio button and click Next
  3. OM13588

    OM13588
  4. Choose one of the USB PD sample projects to clone. For this example, the following instructions show how to clone the usb_pd_battery project. Write battery in the filter box and then select the usb_pd_battery/freertos project. Then click Next
  5. OM13588

    OM13588
  6. Then select the directory you want to place the cloned project, give it a name, and choose the IDE to use. Note that the toolchains listed are the same used in the SDK builder. Then click on Finish
  7. OM13588

    OM13588
  8. After cloning go to the select directory, and open the project for your IDE. Import, compile, and run the project as done in previous sections

Tera Term Tutorial

Tera Term Tutorial

Tera Term is a very popular open source terminal emulation application. This program can be used to display information sent from your Freescale development platform's virtual serial port.

  1. Download Tera Term from SourceForge. After the download, run the installer and then return to this webpage to continue
  2. Download

  3. Launch Tera Term. The first time it launches, it will show you the following dialog. Select the serial option. Assuming your board is plugged in, there should be a COM port automatically populated in the list
  4. Configure the serial port settings (using the COM port number identified earlier) to 115200 baud rate, 8 data bits, no parity, and 1 stop bit. To do this, go to Setup → Serial Port and change the settings
  5. Verify that the connection is open. If connected, Tera Term will show something like below in it's title bar
  6. You're ready to go

Putty Tutorial

Putty Tutorial

PuTTY is a popular terminal emulation application. This program can be used to display information sent from your Freescale development platform's virtual serial port

  1. Download PuTTY using the button below. After the download, run the installer and then return to this webpage to continue
  2. Download

  3. Launch PuTTY by either double-clicking on the *.exe file you downloaded or from the Start menu, depending on the type of download you selected
  4. Configure In the window that launches, select the Serial radio button and enter the COM port number that you determined earlier. Also enter the baud rate, in this case 115200
  5. Click Open to open the serial connection. Assuming the board is connected and you entered the correct COM port, the terminal window will open. If the configuration is not correct, PuTTY will alert you
  6. You're ready to go