FRDM-KL25Z

Overview

The Freedom KL25Z is an ultra-low-cost development platform for Kinetis® L Series KL1x (KL14/15) and KL2x (KL24/25) MCUs built on ARM® Cortex®-M0+ processor.

The FRDM-KL25Z features include easy access to MCU I/O, battery-ready, low-power operation, a standard-based form factor with expansion board options and a built-in debug interface for flash programming and run-control.

Hardware

  • MKL25Z128VLK4 MCU @ 48 MHz, 128 KB flash, 16 KB SRAM, USB OTG (FS), 80LQFP

  • On board capacitive touch “slider”, MMA8451Q accelerometer, and tri-color LED

  • OpenSDA debug interface

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

Supported Features

The frdm_kl25z 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_kl25z
/
mkl25z4

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M0+ CPU1

arm,cortex-m0+

ADC

on-chip

Kinetis ADC161

nxp,kinetis-adc16

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 provider2

fixed-factor-clock

Flash controller

on-chip

NXP Kinetis Flash Memory Module A (FTFA)1

nxp,kinetis-ftfa

GPIO & Headers

on-chip

Kinetis GPIO3 2

nxp,kinetis-gpio

on-board

GPIO pins exposed on Arduino Uno (R3) headers1

arduino-header-r3

I2C

on-chip

Kinetis I2C1 1

nxp,kinetis-i2c

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

ARMv6-M NVIC (Nested Vectored Interrupt Controller) controller1

arm,v6m-nvic

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

MTD

on-chip

Flash node1

soc-nv-flash

Pin control

on-chip

NXP PORT Pin Controller5

nxp,port-pinmux

on-chip

NXP PORT Pin Controller1

nxp,port-pinctrl

Sensors

on-board

FXOS8700 6-axis accelerometer/magnetometer sensor1

nxp,fxos8700

Serial controller

on-chip

Kinetis LPSCI UART1

nxp,kinetis-lpsci

SRAM

on-chip

Generic on-chip SRAM1

mmio-sram

Timer

on-chip

ARMv6-M System Tick1

arm,armv6m-systick

USB

on-chip

NPX Kinetis USBFSOTG Controller in device mode1

nxp,kinetis-usbd

Connections and IOs

The KL25Z SoC has five pairs of pinmux/gpio controllers, and all are currently enabled (PORTA/GPIOA, PORTB/GPIOB, PORTC/GPIOC, PORTD/GPIOD, and PORTE/GPIOE) for the FRDM-KL25Z board.

Name

Function

Usage

PTB2

ADC

ADC0 channel 12

PTB18

GPIO

Red LED

PTB19

GPIO

Green LED

PTD1

GPIO

Blue LED

PTA1

UART0_RX

UART Console

PTA2

UART0_TX

UART Console

PTE24

I2C0_SCL

I2C

PTE25

I2C0_SDA

I2C

System Clock

The KL25Z SoC is configured to use the 8 MHz external oscillator on the board with the on-chip FLL to generate a 48 MHz system clock.

Serial Port

The KL25Z UART0 is used for the console.

USB

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

Programming and Debugging

The frdm_kl25z board supports the runners and associated west commands listed below.

flash debug attach debugserver rtt
jlink
linkserver ✅ (default) ✅ (default)
pyocd

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.

Note:

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

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

Debugging

Here is an example for the Hello World application.

# From the root of the zephyr repository
west build -b frdm_kl25z 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_kl25z

Support Resources for Zephyr