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.
- 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:
- KL25Z Website
- KL25Z Datasheet
- KL25Z Reference Manual
- FRDM-KL25Z Website
- FRDM-KL25Z User Guide
- FRDM-KL25Z Schematics
The frdm_kl25z board configuration supports the following hardware features:
|NVIC||on-chip||nested vector interrupt controller|
|UART||on-chip||serial port-polling; serial port-interrupt|
The default configuration can be found in the defconfig file:
Other hardware features are not currently supported by the port.
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.
|PTB2||ADC||ADC0 channel 12|
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.
The KL25Z UART0 is used for the console.
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 includes the NXP OpenSDA serial and debug adapter built into the board to provide debugging, flash programming, and serial communication over USB.
To use the pyOCD tools with OpenSDA, follow the instructions in the
pyOCD page using the DAPLink FRDM-KL25Z Firmware. The
pyOCD tools are the default for this board, therefore it is not necessary to
OPENSDA_FW=daplink explicitly when programming and debugging.
To use the Segger J-Link tools with OpenSDA, follow the instructions
in the Segger J-Link page using the Segger J-Link OpenSDA
V2.1 Firmware. The Segger J-Link tools are not the default for this
board, therefore it is necessary to set
explicitly in the environment before programming and debugging.
# On Linux/macOS cd $ZEPHYR_BASE/samples/hello_world mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\hello_world mkdir build & cd build # Use cmake to configure a Ninja-based build system: cmake -GNinja -DBOARD=frdm_kl25z .. # Now run ninja on the generated build system: ninja flash
Open a serial terminal (minicom, putty, etc.) with the following settings:
- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1
Reset the board and you should be able to see on the corresponding Serial Port the following message:
Hello World! arm
You can debug an application in the usual way. Here is an example for the Hello World application.
# On Linux/macOS cd $ZEPHYR_BASE/samples/hello_world # If you already made a build directory (build) and ran cmake, just 'cd build' instead. mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\hello_world # If you already made a build directory (build) and ran cmake, just 'cd build' instead. mkdir build & cd build # If you already made a build directory (build) and ran cmake, just 'cd build' instead. # Use cmake to configure a Ninja-based build system: cmake -GNinja -DBOARD=frdm_kl25z .. # Now run ninja on the generated build system: ninja debug