FRDM-K64F

Overview

The Freedom-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs.

  • Form-factor compatible with the Arduino R3 pin layout

  • Peripherals enable rapid prototyping, including a 6-axis digital accelerometer and magnetometer to create full eCompass capabilities, a tri-colored LED and 2 user push-buttons for direct interaction, a microSD card slot, and connectivity using onboard Ethernet port and headers for use with Bluetooth* and 2.4 GHz radio add-on modules

  • OpenSDAv2, the NXP open source hardware embedded serial and debug adapter running an open source bootloader, offers options for serial communication, flash programming, and run-control debugging

Hardware

  • MK64FN1M0VLL12 MCU (120 MHz, 1 MB flash memory, 256 KB RAM, low-power, crystal-less USB, and 100 Low profile Quad Flat Package (LQFP))

  • Dual role USB interface with micro-B USB connector

  • RGB LED

  • FXOS8700CQ accelerometer and magnetometer

  • Two user push buttons

  • Flexible power supply option - OpenSDAv2 USB, Kinetis K64 USB, and external source

  • Easy access to MCU input/output through Arduino* R3 compatible I/O connectors

  • Programmable OpenSDAv2 debug circuit supporting the CMSIS-DAP Interface software that provides:

    • Mass storage device (MSD) flash programming interface

    • CMSIS-DAP debug interface over a driver-less USB HID connection providing run-control debugging and compatibility with IDE tools

    • Virtual serial port interface

    • Open source CMSIS-DAP software project

  • Ethernet

  • SDHC

For more information about the K64F SoC and FRDM-K64F board:

Supported Features

NXP considers the FRDM-K64F as the superset board for the Kinetis K series of MCUs. This board is a focus for NXP’s Full Platform Support for Zephyr, to better enable the entire Kinetis K series. NXP prioritizes enabling this board with new support for Zephyr features.

The frdm_k64f board supports the hardware features listed below.

on-chip / on-board
Feature integrated in the SoC / present on the board.
2 / 2
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files.
vnd,foo
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.
frdm_k64f
/
mk64f12

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M4F CPU1

arm,cortex-m4f

ADC

on-chip

Kinetis ADC162

nxp,kinetis-adc16

CAN

on-chip

NXP FlexCAN controller1

nxp,flexcan

Clock control

on-chip

NXP Kinetis Multipurpose Clock generator (MCG) IP node1

nxp,kinetis-mcg

on-chip

Kinetis System Integration Module (SIM) IP node1

nxp,kinetis-sim

on-chip

Generic fixed factor clock provider4

fixed-factor-clock

Counter

on-chip

NXP Periodic Interrupt Timer (PIT)1

nxp,pit

on-chip

Child node for the Periodic Interrupt Timer node, intended for an individual timer channel4

nxp,pit-channel

DAC

on-chip

NXP Kinetis MCUX DAC1 1

nxp,kinetis-dac

DMA

on-chip

NXP MCUX EDMA controller1

nxp,mcux-edma

Ethernet

on-chip

NXP ENET IP Module1

nxp,enet

on-chip

NXP ENET MAC/L2 Device1

nxp,enet-mac

on-board

Microchip KSZ8081 Ethernet PHY device1

microchip,ksz8081

on-chip

NXP ENET PTP (Precision Time Protocol) Clock1

nxp,enet-ptp-clock

Flash controller

on-chip

NXP Kinetis Flash Memory Module E (FTFE)1

nxp,kinetis-ftfe

GPIO & Headers

on-chip

Kinetis GPIO5

nxp,kinetis-gpio

on-board

GPIO pins exposed on Arduino Uno (R3) headers1

arduino-header-r3

I2C

on-chip

Kinetis I2C1 2

nxp,kinetis-i2c

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

ARMv7-M NVIC (Nested Vectored Interrupt Controller)1

arm,v7m-nvic

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

MDIO

on-chip

NXP ENET MDIO Features1

nxp,enet-mdio

MTD

on-chip

Flash node1

soc-nv-flash

on-board

Fixed partitions of a flash (or other non-volatile storage) memory1

fixed-partitions

Pin control

on-chip

NXP PORT Pin Controller5

nxp,port-pinmux

on-chip

NXP PORT Pin Controller1

nxp,port-pinctrl

PWM

on-chip

NXP FlexTimer Module (FTM) PWM controller2

nxp,ftm-pwm

RNG

on-chip

Kinetis RNGA (Random Number Generator Accelerator)1

nxp,kinetis-rnga

RTC

on-chip

NXP Real Time Clock (RTC)1

nxp,rtc

Sensors

on-board

FXOS8700 6-axis accelerometer/magnetometer sensor1

nxp,fxos8700

on-chip

NXP Kinetis temperature sensor1 1

nxp,kinetis-temperature

Serial controller

on-chip

Kinetis UART2 4

nxp,kinetis-uart

SPI

on-chip

NXP DSPI controller2 1

nxp,dspi

SRAM

on-chip

Generic on-chip SRAM description1

mmio-sram

Timer

on-chip

ARMv7-M System Tick1

arm,armv7m-systick

on-chip

NXP FlexTimer Module (FTM)2

nxp,ftm

USB

on-chip

NPX Kinetis USBFSOTG Controller in device mode1

nxp,kinetis-usbd

Watchdog

on-chip

Kinetis watchdog1

nxp,kinetis-wdog

Connections and IOs

The K64F SoC has five pairs of pinmux/gpio controllers.

Name

Function

Usage

PTB22

GPIO

Red LED

PTE26

GPIO

Green LED

PTB21

GPIO

Blue LED

PTC6

GPIO

SW2 / FXOS8700 INT1

PTC13

GPIO

FXOS8700 INT2

PTA4

GPIO

SW3

PTB10

ADC

ADC1 channel 14

PTB16

UART0_RX

UART Console

PTB17

UART0_TX

UART Console

PTB18

CAN0_TX

CAN TX

PTB19

CAN0_RX

CAN RX

PTC8

PWM

PWM_3 channel 4

PTC9

PWM

PWM_3 channel 5

PTC16

UART3_RX

UART BT HCI

PTC17

UART3_TX

UART BT HCI

PTD0

SPI0_PCS0

SPI

PTD1

SPI0_SCK

SPI

PTD2

SPI0_SOUT

SPI

PTD3

SPI0_SIN

SPI

PTE24

I2C0_SCL

I2C / FXOS8700

PTE25

I2C0_SDA

I2C / FXOS8700

PTA5

MII0_RXER

Ethernet

PTA12

MII0_RXD1

Ethernet

PTA13

MII0_RXD0

Ethernet

PTA14

MII0_RXDV

Ethernet

PTA15

MII0_TXEN

Ethernet

PTA16

MII0_TXD0

Ethernet

PTA17

MII0_TXD1

Ethernet

PTA28

MII0_TXER

Ethernet

PTB0

MII0_MDIO

Ethernet

PTB1

MII0_MDC

Ethernet

PTC16

ENET0_1588_TMR0

Ethernet

PTC17

ENET0_1588_TMR1

Ethernet

PTC18

ENET0_1588_TMR2

Ethernet

PTC19

ENET0_1588_TMR3

Ethernet

Note

Do not enable Ethernet and UART BT HCI simultaneously because they conflict on PTC16-17.

System Clock

The K64F SoC is configured to use the 50 MHz external oscillator on the board with the on-chip PLL to generate a 120 MHz system clock.

Serial Port

The K64F SoC has six UARTs. One is configured for the console, another for BT HCI, and the remaining are not used.

USB

The K64F SoC has a USB OTG (USBOTG) controller that supports both device and host functions through its micro USB connector (K64F USB). Only USB device function is supported in Zephyr at the moment.

CAN

The FRDM-K64F board does not come with an onboard CAN transceiver. In order to use the CAN bus, an external CAN bus transceiver must be connected to PTB18 (CAN0_TX) and PTB19 (CAN0_RX).

Programming and Debugging

Build and flash applications as usual (see Building an Application and Run an Application for more details).

Configuring a Debug Probe

A debug probe is used for both flashing and debugging the board. This board is configured by default to use the OpenSDA DAPLink Onboard Debug Probe.

Early versions of this board have an outdated version of the OpenSDA bootloader and require an update. Please see the DAPLink Bootloader Update page for instructions to update from the CMSIS-DAP bootloader to the DAPLink bootloader.

Install the LinkServer Debug Host Tools and make sure they are in your search path. LinkServer works with the default CMSIS-DAP firmware included in the on-board debugger.

Linkserver is the default for this board, west flash and west debug will call the linkserver runner.

west flash

Alternatively, pyOCD can be used to flash and debug the board by using the -r pyocd option with West. pyOCD is installed when you complete the Get Zephyr and install Python dependencies step in the Getting Started Guide. The runners supported by NXP are LinkServer and JLink. pyOCD is another potential option, but NXP does not test or support the pyOCD runner.

Configuring a Console

Regardless of your choice in debug probe, we will use the OpenSDA microcontroller as a usb-to-serial adapter for the serial console.

Connect a USB cable from your PC to J26.

Use the following settings with your serial terminal of choice (minicom, putty, etc.):

  • Speed: 115200

  • Data: 8 bits

  • Parity: None

  • Stop bits: 1

Flashing

Here is an example for the Hello World application.

# From the root of the zephyr repository
west build -b frdm_k64f samples/hello_world
west flash

Open a serial terminal, reset the board (press the SW1 button), and you should see the following message in the terminal:

***** Booting Zephyr OS v1.14.0-rc1 *****
Hello World! frdm_k64f

Debugging

Here is an example for the Hello World application.

# From the root of the zephyr repository
west build -b frdm_k64f samples/hello_world
west debug

Open a serial terminal, step through the application in your debugger, and you should see the following message in the terminal:

***** Booting Zephyr OS v1.14.0-rc1 *****
Hello World! frdm_k64f

Troubleshooting

If pyocd raises an uncaught DAPAccessIntf.TransferFaultError() exception when you try to flash or debug, it’s possible that the K64F flash may have been locked by a corrupt application. You can unlock it with the following sequence of pyocd commands:

$ pyocd cmd
0001915:WARNING:target_kinetis:Forcing halt on connect in order to gain control of device
Connected to K64F [Halted]: 0240000026334e450028400d5e0e000e4eb1000097969900
>>> unlock
0016178:WARNING:target_kinetis:K64F secure state: unlocked successfully
>>> reinit
0034584:WARNING:target_kinetis:Forcing halt on connect in order to gain control of device
>>> load build/zephyr/zephyr.bin
[====================] 100%
>>> reset
Resetting target
>>> quit

Support Resources for Zephyr