Skip to content

Commit 3a9127e

Browse files
boards: mcxw23_evk: add mcxw23_evk board
enable board support for mcxw23_evk Signed-off-by: AllenZhang <[email protected]>
1 parent 8199b44 commit 3a9127e

12 files changed

+484
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_MCXW23_EVK
5+
6+
config FXLS8974_DRDY_INT1
7+
default y
8+
depends on FXLS8974_TRIGGER
9+
10+
if BOOTLOADER_MCUBOOT
11+
choice MCUBOOT_BOOTLOADER_MODE
12+
# Board only supports MCUBoot via "upgrade only" method:
13+
default MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY
14+
endchoice
15+
endif #BOOTLOADER_MCUBOOT
16+
17+
endif # BOARD_MCXW23_EVK
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MCXW23_EVK
5+
select SOC_MCXW236
6+
select SOC_PART_NUMBER_MCXW236BIHNAR
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
choice MCUBOOT_MODE
5+
default MCUBOOT_MODE_OVERWRITE_ONLY
6+
endchoice

boards/nxp/mcxw23_evk/board.cmake

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

boards/nxp/mcxw23_evk/board.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: mcxw23_evk
3+
full_name: MCXW23-EVK
4+
vendor: nxp
5+
socs:
6+
- name: mcxw236
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
.. zephyr:board:: mcxw23_evk
2+
3+
Overview
4+
********
5+
6+
The MCXW23 EVK base board, combined with a MCXW23 Radio Daughter Module (RDM),
7+
is an evaluation environment supporting NXP’s MCXW23 wireless processor.
8+
The EVK supports IoT applications and is intended for prototyping, demos,
9+
software development and measurements (power consumption and RF).
10+
The MCXW23 EVK constitutes multiple debugging mechanisms, therefore aiding
11+
easier application development.
12+
13+
Hardware
14+
********
15+
16+
- MCXW23 Arm® Cortex®-M33 microcontroller running at up to 32 MHz
17+
- 1 MB flash and 128 KB SRAM on-chip
18+
- 40HVQFN package
19+
- On-board MCU-Link debugger with CMSIS-DAP
20+
- LED
21+
- Reset, ISP, wake, and user buttons for easy testing of software functionality
22+
- NXP FXLS8974CF accelerometer
23+
- NXP FXPQ3115BVT1 pressure sensor
24+
- TMP117 temperature sensor
25+
- Arduino Header, mikroBUS
26+
27+
For more information about the MCXW236 SoC and MCXW23-EVK board, see:
28+
29+
- `MCXW23 SoC Website`_
30+
- `MCXW23 Datasheet`_
31+
- `MCXW23 Reference Manual`_
32+
33+
Supported Features
34+
==================
35+
36+
.. zephyr:board-supported-hw::
37+
38+
Connections and IOs
39+
===================
40+
41+
The MCXW23 SoC has IOCON registers, which can be used to configure
42+
the functionality of a pin.
43+
44+
+---------+-----------------+----------------------------+
45+
| Name | Function | Usage |
46+
+=========+=================+============================+
47+
| PIO0_20 | GPIO | ISP SW2 |
48+
+---------+-----------------+----------------------------+
49+
| PIO0_2 | USART | USART RX |
50+
+---------+-----------------+----------------------------+
51+
| PIO0_3 | USART | USART TX |
52+
+---------+-----------------+----------------------------+
53+
| PIO0_19 | GPIO | RED LED |
54+
+---------+-----------------+----------------------------+
55+
| PIO0_18 | GPIO | USR SW4 |
56+
+---------+-----------------+----------------------------+
57+
| PIO0_21 | GPIO | Wakeup SW3 |
58+
+---------+-----------------+----------------------------+
59+
| PIO0_14 | I2C | I2C SCL |
60+
+---------+-----------------+----------------------------+
61+
| PIO0_13 | I2C | I2C SDA |
62+
+---------+-----------------+----------------------------+
63+
| PIO0_1 | GPIO | FXLS8974CF INT1 |
64+
+---------+-----------------+----------------------------+
65+
| PIO0_1 | GPIO | TMP117 INT1 |
66+
+---------+-----------------+----------------------------+
67+
| PIO0_1 | GPIO | FXPQ3115BVT1 INT1 |
68+
+---------+-----------------+----------------------------+
69+
70+
System Clock
71+
============
72+
73+
The MCXW23 SoC is configured to use FRO running at 32 MHz as a system clock source.
74+
75+
Serial Port
76+
===========
77+
78+
The MCXW23 SoC has 3 FLEXCOMM interfaces for serial
79+
communication. One is configured as USART for the console, one is
80+
configured for I2C, and the other one is not used.
81+
82+
Programming and Debugging
83+
*************************
84+
85+
.. zephyr:board-supported-runners::
86+
87+
Build and flash applications as usual (see :ref:`build_an_application`
88+
and :ref:`application_run` for more details).
89+
90+
Configuring a Debug Probe
91+
=========================
92+
93+
A debug probe is used for both flashing and debugging the board. This board is
94+
configured by default to use the MCU-Link CMSIS-DAP Onboard Debug Probe.
95+
96+
Using LinkServer
97+
----------------
98+
99+
Linkserver is the default runner for this board, and supports the factory
100+
default MCU-Link firmware. Follow the instructions in
101+
:ref:`mcu-link-cmsis-onboard-debug-probe` to reprogram the default MCU-Link
102+
firmware. This only needs to be done if the default onboard debug circuit
103+
firmware was changed. To put the board in ``DFU mode`` to program the firmware,
104+
short jumper J32.
105+
106+
Using J-Link
107+
------------
108+
109+
There are two options. The onboard debug circuit can be updated with Segger
110+
J-Link firmware by following the instructions in
111+
:ref:`mcu-link-jlink-onboard-debug-probe`.
112+
To be able to program the firmware, you need to put the board in ``DFU mode``
113+
by shortening the jumper J32.
114+
The second option is to attach a :ref:`jlink-external-debug-probe` to the
115+
10-pin SWD connector (J11) of the board. Additionally, the jumper JP30 must
116+
be shortened.
117+
For both options use the ``-r jlink`` option with west to use the jlink runner.
118+
119+
.. code-block:: console
120+
121+
west flash -r jlink
122+
123+
Configuring a Console
124+
=====================
125+
126+
Connect a USB cable from your PC to J33, and use the serial terminal of your choice
127+
(minicom, putty, etc.) with the following settings:
128+
129+
- Speed: 115200
130+
- Data: 8 bits
131+
- Parity: None
132+
- Stop bits: 1
133+
134+
Flashing
135+
========
136+
137+
Here is an example for the :zephyr:code-sample:`hello_world` application.
138+
139+
.. zephyr-app-commands::
140+
:zephyr-app: samples/hello_world
141+
:board: mcxw23_evk
142+
:goals: flash
143+
144+
Open a serial terminal, reset the board (press the RESET button), and you should
145+
see the following message in the terminal:
146+
147+
.. code-block:: console
148+
149+
*** Booting Zephyr OS build v4.2.0-2105-g9da1d56da9e7 ***
150+
Hello World! mcxw23_evk/mcxw236
151+
152+
Debugging
153+
=========
154+
155+
Here is an example for the :zephyr:code-sample:`hello_world` application.
156+
157+
.. zephyr-app-commands::
158+
:zephyr-app: samples/hello_world
159+
:board: mcxw23_evk
160+
:goals: debug
161+
162+
Open a serial terminal, step through the application in your debugger, and you
163+
should see the following message in the terminal:
164+
165+
.. code-block:: console
166+
167+
*** Booting Zephyr OS build v4.2.0-2105-g9da1d56da9e7 ***
168+
Hello World! mcxw23_evk/mcxw236
169+
170+
.. include:: ../../common/board-footer.rst
171+
:start-after: nxp-board-footer
172+
173+
.. _MCXW23 SoC Website:
174+
https://www.nxp.com/products/MCX-W23
175+
176+
.. _MCXW23 Datasheet:
177+
https://www.nxp.com/docs/en/data-sheet/MCXW23.pdf
178+
179+
.. _MCXW23 Reference Manual:
180+
https://www.nxp.com/webapp/Download?colCode=MCXW23RM
278 KB
Loading
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <nxp/mcx/MCXW236BIHNAR-pinctrl.h>
8+
9+
&pinctrl {
10+
/* Configures pin routing and optionally pin electrical features. */
11+
pinmux_flexcomm0_usart: pinmux_flexcomm0_usart {
12+
group0 {
13+
pinmux = <FC0_RXD_SDA_MOSI_PIO0_2>,
14+
<FC0_TXD_SCL_MISO_PIO0_3>;
15+
slew-rate = "standard";
16+
};
17+
};
18+
19+
/* Configures pin routing and optionally pin electrical features. */
20+
pinmux_flexcomm1_i2c: pinmux_flexcomm1_i2c {
21+
group0 {
22+
pinmux = <FC1_RXD_SDA_MOSI_PIO0_13>,
23+
<FC1_TXD_SCL_MISO_PIO0_14>;
24+
slew-rate = "standard";
25+
power-source = "3v3";
26+
};
27+
};
28+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <nxp/nxp_mcxw236_ns.dtsi>
10+
#include "mcxw23_evk_common.dtsi"
11+
12+
/ {
13+
model = "NXP MCXW23-EVK board";
14+
compatible = "nxp,mcxw236", "nxp,mcx";
15+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright 2025 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
identifier: mcxw23_evk
8+
name: NXP MCXW23-EVK
9+
type: mcu
10+
arch: arm
11+
ram: 128
12+
flash: 1016
13+
toolchain:
14+
- zephyr
15+
- gnuarmemb
16+
supported:
17+
- gpio
18+
- uart
19+
- counter
20+
- flash
21+
vendor: nxp

0 commit comments

Comments
 (0)