Getting Started with the FRDM-K32L2B3 FRDM Development Board

最終更新日時: Nov 19, 2019サポート FRDM-K32L2B3

1. Plug It In

Let's take your FRDM-K32L2B3 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 Getting Started with the FRDM-K32L2B3

1.2 Get Familiar with the Board

GS-FRDM-K32L2B3-S1S1.1

GS-FRDM-K32L2B3-S1S1.1

1.3 Attach the USB Cable

1.4 Run the Out-of-the-Box Demo

This bubble demo leverages the on-board accelerometer. When the board is flat, the red and green LEDs are turned off and when the board is tilted, the green or red LEDs gradually illuminate based on the degree of tilt on the X- and Y-Axis.

2. Get Software

2.1 Installing Software for the FRDM-K32L2B3

2.2 Jump Start Your Design with the MCUXpresso SDK

The MCUXpresso Software Development Kit (SDK) is complimentary and includes full source code under a permissive open-source license for all hardware abstraction and peripheral driver software.

Click below to download a pre-configured Windows SDK release for the FRDM-K32L2B3, which includes IDE support for MCUXpresso, Keil MDK, GCC Arm Embedded and IAR Embedded Workbench.

Get MCUXpresso SDK

You can also use the online SDK Builder  to create a custom SDK package for the FRDM-K32L2B3.

2.3 Install Your Toolchain

MCUXpresso IDE is a development platform ecosystem from NXP. It provides an end-to-end solution enabling engineers to develop embedded applications from initial evaluation to final production.

Get MCUXpresso IDE

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.4 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 into MCUXpresso or you can download it as a separate tool.

Get MCUXpresso Config Tools

2.5 Serial Terminal

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.

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 115,200 baud rate, 8 data bits, no parity and 1 stop bit. To determine the port number of the FRDM-K32L2B3's 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: MCUXpresso IDE Terminal Tutorial, Tera Term Tutorial, PuTTY Tutorial.

3. Build, Run

3.1 Build and Run an application on the FRDM-K32L2B3

3.2 Explore the SDK Example Code

The Kinetis SDK comes with a long list of demo applications and driver examples. To see what‘s available, browse to the SDK boards folder of your SDK installation and select your board, the FRDM-K32L2B3: <SDK_Install_Directory>/boards/frdmk32l2b.

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

3.3 Build, Run

If one or more of the demo application or driver examples sounds interesting, you probably want to know how you can build and debug yourself. The Getting Started with 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.

Using a different toolchain?

4. Modify an SDK Example

4.1 Create an Application for the FRDM-K32L2B3

4.2 Clone an Example Project from MCUXpresso SDK

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

Option B: Use the MCUXpresso Config Tool to clone an existing MCUXpresso SDK example for use with third party IDEs.

4.3 Use the Pins Tool

Now, let’s use the Pins Tool that is part of the MCUXpresso Config Tools to show how to add a new GPIO pin to your project to blink an LED.

4.4 Use the Clocks Tool

Next, use the Clocks Tool that is part of the MCUXpresso Config Tools to change the clock settings and change the rate that the LED blinks.

4.5 Success

With the application modified, you will see the FRDM-K32L2B3 green LED slowly blinking. You can also view terminal output using the terminal program.

MCUXpresso IDE Terminal Tutorial

MCUXpresso IDE Terminal Tutorial

The most recent versions of MCUXpresso IDE count with a terminal emulation application. This tool can be used to display information sent from your NXP development platform's virtual serial port.

  1. Open the MCUXpresso IDE
  2. Launch the MCUXpresso IDE terminal by clicking on the "Open a Terminal" button on the top of the IDE or press "Ctrl + Alt + Shift + T"
  3. Select Serial Terminal
  4. Configure the serial port settings (using the corresponding COM port number) to 115,200 baud rate, 8 data bits, no parity and 1 stop bit, then press "OK" button
  5. Verify that the connection is open. If connected, MCUXpresso IDE will look like the figure below at the Terminal view
  6. You're ready to go

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 NXP 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 115,200 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 its title bar

PuTTY Tutorial

PuTTY Tutorial

PuTTY is a popular terminal emulation application. This program can be used to display information sent from your NXP 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: 115,200
  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

Security and Integrity

Security and Integrity

Document Description
AN4507 Using the Kinetis Security and Flash Protection Features Using the system security and flash protection features on Kinetis MCUs to protect code and data from unauthorized access or modification.

Wired Communications

Wired Communications

Document Description
Understanding FlexIO The FlexIO module is capable of emulating various serial communication protocols including UART, SPI and I²C.
AN12174 Using FlexIO to emulate communications and timing peripherals A compilation of examples to emulate different communication modules and PWM signals using FlexIO.
AN5034 Emulating UART by Using FlexIO How to use the universal peripheral module FlexIO for emulating an additional UART bus.
AN5397 Emulating SSI Using FlexIO How to configure FlexIO to emulate a Serial Synchronous Interface.
AN4955 Emulating the I2S Bus Master with the FlexIO Module Shows a typical use case for the FlexIO peripheral – emulating I2S for transferring an audio data stream.
AN5133 Emulating I²C Bus Master by using FlexIO The steps to use the FlexIO module for emulating the I²C bus master.
AN5242 Emulating Dual SPI Using FlexIO One example of how to use the FlexIO module to emulate the dual SPI of both master and slave mode at the same time.
AN12597 USB to Multi VCOM on K32L2 Series MCU How to implement a USB to multiple VCOMs' functions on K32L2 series FRDM boards.

MCUXpresso SDK Examples

Several examples, demos and drivers are available within the SDK to help you get started. Some common examples for wired communications are listed below.

Bubble Demo (I²C example)

Demonstrates basic usage of the onboard accelerometer to implement a bubble level. A bubble level utilizes two axes to visually show deviation from a level plane (0 degrees) on a given axis.

Path: <SDK_PATH>/boards/frdmk32l2b/demo_apps/bubble

Shell Demo (UART example)

Demonstrates how to implement a command line shell application.

Path: <SDK_PATH>/boards/frdmk32l2b/demo_apps/shell

Driver Examples

A number of driver examples exist within the SDK including FlexIO, I²C, SPI and UART.

Path: <SDK_PATH>/boards/frdmk32l2b/driver_examples

USB Examples

These examples are built on and demonstrate various USB classes and provide jumping off points for your application.

Path: <SDK_PATH>/boards/frdmk32l2b/usb_examples

Wireless Connectivity

Wireless Connectivity

Document Description
AN5116 Emulating IrDA by Using FlexIO How to use FlexIO SDK UART driver to emulate IrDA.

MCUXpresso SDK Examples

Several examples, demos and drivers are available within the SDK to help you get started. Some common examples for wireless connectivity are listed below.

NTAG I²C Explorer Blink

Shows use of NT3H2111_2211 NTAG I²C plus Connected NFC Tag with I²C Interface Chip and demonstrates basic communication with the device.

Path: <SDK_PATH>/boards/frdmk32l2b/ntag_i2c_plus_examples/ntag_i2C_explorer_blink

NTAG I²C Explorer Demo

Shows use of NT3H2111_2211 NTAG I²C plus Connected NFC Tag with I²C Interface Chip and demonstrates communication with the device in SRAM pass through mode and external application.

Path: <SDK_PATH>/boards/frdmk32l2b/ntag_i2c_plus_examples/ntag_i2C_explorer_demo

Sigfox Console

How to control the Sigfox device with use of the Sigfox SW driver built on AML (Analog Middleware Layer). It uses the virtual serial console to execute SPI commands of the Sigfox device.

Path: <SDK_PATH>/boards/frdmk32l2b/demo_apps/sigfox_console

Power Management

Power Management

Document Description
AN12736 K32L2B Power Mode Switch Application Shows details of each power mode and provides use case examples in the SDK power mode switch example demo. Tips are given for using each of the power modes.
AN4503 Power Management for Kinetis MCUs When and how to use Kinetis low-power modes.

MCUXpresso SDK Examples

Several examples, demos and drivers are available within the SDK to help you get started. Some common examples for power management are listed below.

Power Mode Switch Demo

Demonstrates the use of power modes in the SDK.

Path: <SDK_PATH>/boards/frdmk32l2b/demo_apps/power_mode_switch

Power Manager Demo

How to change power modes in the SDK.

Path: <SDK_PATH>/boards/frdmk32l2b/demo_apps/power_manager

ADC Low Power Demo

Demonstrates the usage of the ADC peripheral while in a low power mode.

Path: <SDK_PATH>/boards/frdmk32l2b/demo_apps/adc16_low_power

ADC Low Power Async DMA Demo

Demonstrates the usage of the ADC and DMA peripheral while in a low power mode.

Path: <SDK_PATH>/boards/frdmk32l2b/demo_apps/adc16_low_power_async_dma

RTC Demo

Demonstrates the important features of the RTC Module by using the RTC peripheral driver.

Path: <SDK_PATH>/boards/frdmk32l2b/demo_apps/rtc_func

Audio

Audio

Document Description
AN4955 Emulating the I2S Bus Master with the FlexIO Module Shows a typical use case for the FlexIO peripheral – emulating I2S for transferring an audio data stream.

MCUXpresso SDK Examples

Several examples, demos and drivers are available within the SDK to help you get started. Some common examples for audio are listed below.

DSP examples

CMSIS DSP examples are provided to demonstrate CMSIS DSP driver usage in the SDK environment.

Path: <SDK_PATH>/CMSIS/DSP/Examples/ARM

Audio Demos

Examples that enumerate a recording device.

Path: <SDK_PATH>/boards/frdmk32l2b/usb_examples/usb_device_audio_generator

Path: <SDK_PATH>/boards/frdmk32l2b/usb_examples/usb_device_composite_hid_audio

Display and Graphics

Display and Graphics

Document Description
AN12579 Using SLCD controller on K32L2B3 MCU Describes the usage of the on-chip SLCD controller by enabling an SLCD device.
NXP FlexIO Generator for the WS2812B (Adafruit NeoPixel) LED Stripe Protocol Example project to drive WS2812B LEDs using the FlexIO module.

Support

Trainings

Training Description
K32 L Series Trainings Full list of on-demand training, how-to videos and webinars from NXP about this product.
Basic Application Development Using MCUXpresso IDE and MCUXpresso Config Tools This three-part video series covers the basic interactions between the MCUXpresso IDE and Config Tools when working with either an imported SDK example project or creating a new one.

Forums

Connect with other engineers and get expert advice on designing with the K32 L Series on one of our community sites.