Skip to content

Commit 2c2922f

Browse files
hakehuangnashif
authored andcommitted
boards: nxp: frdm_ke16z: New board with 64kB device added
SOC_MKE16z4 and MKE15z4 (64kB, 48MHz) is now supported by DT LPFLL clock option with proper frequency select dts: nxp_ke1xz64.dtsi added. Tested on board: frdm_ke16z Signed-off-by: Michael Galda <michael.galda@nxp.com> Signed-off-by: Hake Huang <hake.huang@nxp.com>
1 parent 68937ac commit 2c2922f

File tree

10 files changed

+310
-1
lines changed

10 files changed

+310
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright 2024 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_FRDM_KE16Z
5+
select SOC_MKE16Z4
6+
select SOC_PART_NUMBER_MKE16Z64VLF4

boards/nxp/frdm_ke16z/board.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright 2024 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
board_runner_args(linkserver "--device=MKE16Z64xxx4:FRDM-KE16Z")
8+
board_runner_args(jlink "--device=MKE16Z64xxx4" "--reset-after-load")
9+
10+
include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)
11+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/nxp/frdm_ke16z/board.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: frdm_ke16z
3+
full_name: FRDM-KE16Z
4+
vendor: nxp
5+
socs:
6+
- name: mke16z4
97.9 KB
Loading
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
.. zephyr:board:: frdm_ke16z
2+
3+
Overview
4+
********
5+
6+
The FRDM-KE16Z is a development board for NXP Kinetis KE1xZ 32-bit
7+
MCU-based platforms. The FRDM-KE16Z contains a robust TSI module
8+
with up to 25 channels which makes this board highly flexible
9+
for touch keys. Offers options for serial
10+
communication, flash programming, and run-control debugging.
11+
12+
Hardware
13+
********
14+
15+
- MKE16Z64VLF4 MCU (up to 48 MHz, 64 KB flash memory, 8 KB RAM)
16+
- OpenSDA Debug Circuit with a virtual serial port
17+
- Touch electrodes in the self-capacitive mode
18+
- Compatible with FRDM-TOUCH, FRDM-MC-LVBLDC, and Arduino® boards
19+
- User Components such as Reset; RGB LED and two user buttons
20+
- 6-axis FXOS8700CQ digital accelerometer and magnetometer
21+
22+
For more information about the KE1xZ SoC and the FRDM-KE16Z board, see
23+
these NXP reference documents:
24+
25+
- `KE1XZ SOC Website`_
26+
- `FRDM-KE16Z Datasheet`_
27+
- `FRDM-KE16Z Reference Manual`_
28+
- `FRDM-KE16Z Website`_
29+
- `FRDM-KE16Z User Guide`_
30+
- `FRDM-KE16Z Schematics`_
31+
32+
Supported Features
33+
==================
34+
35+
.. zephyr:board-supported-hw::
36+
37+
System Clock
38+
============
39+
40+
The KE16 SoC is configured to run at 48 MHz using the FIRC.
41+
42+
Serial Port
43+
===========
44+
45+
The KE16 SoC has three UARTs. UART0 (PTB1, PTB0) is configured for the console.
46+
47+
Programming and Debugging
48+
*************************
49+
50+
.. zephyr:board-supported-runners::
51+
52+
Build and flash applications as usual (see :ref:`build_an_application` and
53+
:ref:`application_run` for more details).
54+
55+
Configuring a Debug Probe
56+
=========================
57+
58+
A debug probe is used for both flashing and debugging the board. This board is
59+
configured by default to use Linkserver.
60+
61+
Early versions of this board have an outdated version of the OpenSDA bootloader
62+
and require an update. Please see the `DAPLink Bootloader Update`_ page for
63+
instructions to update from the CMSIS-DAP bootloader to the DAPLink bootloader.
64+
65+
Option 1: Linkserver
66+
-------------------------------------------------------
67+
68+
Install the :ref:`linkserver-debug-host-tools` and make sure they are in your
69+
search path. LinkServer works with the default CMSIS-DAP firmware included in
70+
the on-board debugger.
71+
72+
Linkserver is the default for this board, ``west flash`` and ``west debug`` will
73+
call the linkserver runner.
74+
75+
Option 2: :ref:`opensda-jlink-onboard-debug-probe`
76+
--------------------------------------------------
77+
78+
Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
79+
path.
80+
81+
82+
Use the ``-r jlink`` option with west to use the jlink runner.
83+
84+
.. code-block:: console
85+
86+
west flash -r jlink
87+
88+
Configuring a Console
89+
=====================
90+
91+
Regardless of your choice in debug probe, we will use the OpenSDA
92+
microcontroller as a usb-to-serial adapter for the serial console.
93+
94+
Connect a USB cable from your PC to J6.
95+
96+
Use the following settings with your serial terminal of choice (minicom, putty,
97+
etc.):
98+
99+
- Speed: 115200
100+
- Data: 8 bits
101+
- Parity: None
102+
- Stop bits: 1
103+
104+
Flashing
105+
========
106+
107+
Here is an example for the :zephyr:code-sample:`hello_world` application.
108+
109+
.. zephyr-app-commands::
110+
:zephyr-app: samples/hello_world
111+
:board: frdm_ke16z
112+
:goals: flash
113+
114+
Open a serial terminal, reset the board (press the SW1 button), and you should
115+
see the following message in the terminal:
116+
117+
.. code-block:: console
118+
119+
*** Booting Zephyr OS build v3.6.0-3478-gb923667860b1 ***
120+
Hello World! frdm_ke16z/mke16z4
121+
122+
Debugging
123+
=========
124+
125+
Here is an example for the :zephyr:code-sample:`hello_world` application.
126+
127+
.. zephyr-app-commands::
128+
:zephyr-app: samples/hello_world
129+
:board: frdm_ke16z
130+
:goals: debug
131+
132+
Open a serial terminal, step through the application in your debugger, and you
133+
should see the following message in the terminal:
134+
135+
.. code-block:: console
136+
137+
***** Booting Zephyr OS v3.6.0-xxx-gxxxxxxxxxxxx *****
138+
Hello World! frdm_ke16z
139+
140+
.. include:: ../../common/board-footer.rst.inc
141+
142+
.. _KE1XZ SoC Website:
143+
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/ke-series-arm-cortex-m4-m0-plus/ke1xz-arm-cortex-m0-plus-5v-main-stream-mcu-with-nxp-touch-and-can-control:KE1xZ
144+
145+
.. _FRDM-KE16Z Datasheet:
146+
https://www.nxp.com/docs/en/data-sheet/KE1xZP48M48SF0.pdf
147+
148+
.. _FRDM-KE16Z Reference Manual:
149+
https://www.nxp.com/docs/en/reference-manual/KE1xZP48M48SF0RM.pdf
150+
151+
.. _FRDM-KE16Z Website:
152+
https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/freedom-development-platform-for-kinetis-ke1xmcus:FRDM-KE16Z
153+
154+
.. _FRDM-KE16Z User Guide:
155+
https://www.nxp.com/document/guide/get-started-with-the-frdm-ke16z:NGS-FRDM-KE16Z
156+
157+
.. _FRDM-KE16Z Schematics:
158+
https://www.nxp.com/downloads/en/schematics/FRDM-KE16ZSCH.zip
159+
160+
.. _DAPLink Bootloader Update:
161+
https://os.mbed.com/blog/entry/DAPLink-bootloader-update/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2024 NXP
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <nxp/kinetis/MKE16Z64VLF4-pinctrl.h>
7+
8+
&pinctrl {
9+
lpuart0_default: lpuart0_default {
10+
group0 {
11+
pinmux = <LPUART0_RX_PTB0>,
12+
<LPUART0_TX_PTB1>;
13+
drive-strength = "low";
14+
slew-rate = "slow";
15+
};
16+
};
17+
};
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <nxp/nxp_ke1xz64.dtsi>
10+
#include "frdm_ke16z-pinctrl.dtsi"
11+
#include <zephyr/dt-bindings/input/input-event-codes.h>
12+
13+
/ {
14+
model = "NXP Freedom KE16Z board";
15+
compatible = "nxp,ke16z", "nxp,mke16z4";
16+
17+
aliases {
18+
led0 = &red_led;
19+
led1 = &green_led;
20+
led2 = &blue_led;
21+
sw0 = &user_button_0;
22+
sw1 = &user_button_1;
23+
};
24+
25+
chosen {
26+
zephyr,sram = &sram_u;
27+
zephyr,flash = &flash0;
28+
zephyr,console = &lpuart0;
29+
zephyr,shell-uart = &lpuart0;
30+
};
31+
32+
leds {
33+
compatible = "gpio-leds";
34+
35+
red_led: led_0 {
36+
gpios = <&gpiob 5 GPIO_ACTIVE_LOW>;
37+
label = "RED LED";
38+
};
39+
40+
green_led: led_1 {
41+
gpios = <&gpiob 4 GPIO_ACTIVE_LOW>;
42+
label = "GREEN LED";
43+
};
44+
45+
blue_led: led_2 {
46+
gpios = <&gpiod 1 GPIO_ACTIVE_LOW>;
47+
label = "BLUE LED";
48+
};
49+
};
50+
51+
gpio_keys {
52+
compatible = "gpio-keys";
53+
54+
user_button_0: button_0 {
55+
label = "User SW2";
56+
gpios = <&gpiod 3 GPIO_ACTIVE_LOW>;
57+
zephyr,code = <INPUT_KEY_0>;
58+
};
59+
60+
user_button_1: button_1 {
61+
label = "User SW3";
62+
gpios = <&gpiod 2 GPIO_ACTIVE_LOW>;
63+
zephyr,code = <INPUT_KEY_1>;
64+
};
65+
};
66+
};
67+
68+
&lpuart0 {
69+
status = "okay";
70+
current-speed = <115200>;
71+
pinctrl-0 = <&lpuart0_default>;
72+
pinctrl-names = "default";
73+
};
74+
75+
&gpiob {
76+
status = "okay";
77+
};
78+
79+
&gpiod {
80+
status = "okay";
81+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
identifier: frdm_ke16z
2+
name: NXP FRDM-KE16Z
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
- gnuarmemb
8+
flash: 64
9+
ram: 8
10+
supported:
11+
- flash
12+
- gpio
13+
- uart
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_SERIAL=y
4+
CONFIG_UART_INTERRUPT_DRIVEN=y
5+
6+
# Enable console
7+
CONFIG_CONSOLE=y
8+
CONFIG_UART_CONSOLE=y
9+
10+
# GPIO Controller
11+
CONFIG_GPIO=y
12+
13+
# Clock Control
14+
CONFIG_CLOCK_CONTROL=y

boards/nxp/frdm_ke17z512/frdm_ke17z512.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154

155155
&scg {
156156
bus_clk {
157-
clock-div = <2>;
157+
clock-div = <4>;
158158
};
159159
};
160160

0 commit comments

Comments
 (0)