Getting Started with the FRDM-K64F

Last Modified: 2019-03-18 13:12:00Supports FRDM-K64F | K64/K63/K24 | Dev Platform

Contents of this document

  • 1

    Plug It In
  • 2

    Get Software
  • 3

    Build, Run

1. Plug It In

1.1 Important Information Before Plugging In Your FRDM-K64F

OpenSDA is a serial and debug adapter circuit that runs on a Kinetis K20 device built into many NXP development boards.

It allows users to download and debug programs onto the target K64F chip using only a USB cable.

Some FRDM-K64F boards may contain older OpenSDA firmware that is incompatible with Windows 10 due to changes made in how Windows handles Mass Storage Devices. This can potentially corrupt older versions of the OpenSDA firmware found on those FRDM-K64F boards.

The vast majority of FRDM-K64F boards currently being shipped from distributors will already have updated firmware that is not affected, but some older inventory may still contain the outdated firmware.

To ensure proper operation of the FRDM-K64F with Windows 10, disable Storage Services on your Windows 10 computer before plugging it in the first time and update the OpenSDA firmware if needed:

  1. Hold down the Windows logo key on your keyboard and press "R" to bring up the Windows Run prompt
  2. Type in "services.msc" and hold down "Ctrl+Alt" and hit "Enter" to launch the "Services" application in "Administrator mode"
  3. GS-FRDM-K64F-MODAL10-FIG1

    GS-FRDM-K64F-MODAL10-FIG1
  4. Once open, find the "Storage Services" item and double click on it to open it
  5. GS-FRDM-K64F-MODAL10-FIG2

    GS-FRDM-K64F-MODAL10-FIG2
  6. In the properties box that comes up, change the "Startup type" to "Disabled" and then click on "Stop". If both options are grayed out, make sure you started the "Services" program in "Administrator mode"
  7. GS-FRDM-K64F-MODAL10-FIG3

    GS-FRDM-K64F-MODAL10-FIG3
  8. Now, take the FRDM-K64F board and hold down the reset button as you plug the board into your computer
  9. GS-FRDM-K64F-MODAL10-FIG4

    GS-FRDM-K64F-MODAL10-FIG4
  10. If the board enumerates as a drive named "MAINTENANCE", then your board has the latest firmware and no further action is needed. Skip to the last step (#10) to re-enable "Storage Services"
  11. If the board enumerates as a drive named something else, drag and drop this 0244_k20dx_bl_0x5000.bin file to that drive file. This will update the OpenSDA bootloader
  12. The board should now automatically re-enumerate as a drive named "MAINTENANCE". Drag and drop this k20dx_frdmk64f_if_crc_legacy_0x5000.bin file to that "MAINTENANCE" drive to update the OpenSDA CMSIS-DAP application
  13. The board should automatically re-enumerate again and come up as a drive named FRDM-K64FD. The OpenSDA bootloader and OpenSDA application are now both up to date and will work correctly with Windows 10
  14. Re-enable the "Storage Services" by using the same steps as before to open up the "Storage Services" dialog box, change the "Startup type" back to "Automatic (Delayed Start)" and click on "Start"

If you do not see any drive enumerate at all when plugging in the board in Step #6, the OpenSDA firmware may have been corrupted by Windows. The only way to fix this is to reprogram the K20 chip that the OpenSDA firmware runs on using an external debug tool. Instructions for this process can be found in this OpenSDA Community post .

1.2 Getting Started with the FRDM-K64F Development Board

Let's take your FRDM-K64F for a test drive! You have the choice of watching the sequence in a short video or following the detailed actions list below.

1.3 Attach the USB Cable

FRDM-K64F-GS-board

FRDM-K64F-GS-board

1.4 Run the Out-of-Box Demo

Your FRDM-K64F comes loaded with a "bubble level" demo that leverages the on board accelerometer. When the board is flat, the RGB LED is turned off and when the board is tilted, the red or blue LEDs gradually illuminate based on the degree of tilt on the X and Y-Axis.

FRDM-K64F-DEMO

FRDM-K64F-DEMO

Demo Not Working?

2. Get Software

Choose a Development Path.

2.1 Installing Software for the FRDM-K64F

2.2 Jump-Start Your Design with the MCUXpresso SDK

Click below to download a preconfigured SDK release for the FRDM-K64F. Learn about 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.

Get MCUXpresso SDK

2.3 Install Your Toolchain

NXP offers a complimentary toolchain called MCUXpresso IDE.

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.

Get MCUXpresso Config Tools

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

3. Build, Run

3.1 Build and Run Demos on the FRDM-K64F

3.2 Explore the MCUXpresso SDK Example Code

The MCUXpresso SDK comes with a long list of example application codes. To see what's available, browse to the SDK boards folder of your SDK installation and select your board, the FRDM-K64F (<sdk_install_directory>/boards/frdmk64f).

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

3.3 Build, Run and Debug MCUXpresso SDK Examples

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 an example application using the MCUXpresso IDE.

Using a different toolchain?

Security

Security Resources

Building the right level of security for your application with NXP and IAR Systems . Learn what is driving IoT security requirements today and the foundational security features NXP incorporates into our general purpose MCUs to meet the demands of the market.

Getting Started with EdgeLock® SE050 and FRDM-K64F. Get started with EdgeLock SE050 Plug and Trust middleware using the OM-SE050ARD and FRDM-K64F MCU boards.

Boot Options

Boot Options Resources

FRDMK64F SD Bootloader . This document describes a simple bootloader based on the FRDM-K64F and how to use it to update application code.

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
  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 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 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

Design Resources

Software

Support

Troubleshooting

Learn more about the FRDM-K64F with design tips, training documents and the NXP Community. If you need additional help, contact NXP Support.

Did your board come in a box that looks like this?

No problem! Your board simply came in the old packaging and has a different out-of-box demo loaded into the flash memory.

You should be seeing the RGB LED toggling between each of the three colors: red, blue and green. It's OK to move onto the next step when you're ready.

Still not working?

Try proceeding to the next steps to get other example applications running on your board. If you still have problems, try contacting us through the NXP Community .

Trainings

MCUXpresso Software and Tools Overview . Get started with MCUXpresso SDK, IDE and Config Tools.

Forums

Connect with other engineers and get expert advice on designing with the Kinetis K64F on one of our community sites.