Skip to content

Commit 30ee855

Browse files
EmilioCBenkartben
authored andcommitted
boards: nxp: Add FRDM_MCXW72
Add initial board for FRDM_MCXW72 Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
1 parent 2bfb590 commit 30ee855

9 files changed

+426
-0
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_MCXW72
5+
select SOC_MCXW727C_CPU0 if BOARD_FRDM_MCXW72_MCXW727C_CPU0
6+
select SOC_PART_NUMBER_MCXW727CMFTA

boards/nxp/frdm_mcxw72/board.cmake

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

boards/nxp/frdm_mcxw72/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_mcxw72
3+
full_name: FRDM-MCXW72
4+
vendor: nxp
5+
socs:
6+
- name: mcxw727c
5.99 KB
Binary file not shown.

boards/nxp/frdm_mcxw72/doc/index.rst

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
.. zephyr:board:: frdm_mcxw72
2+
3+
Overview
4+
********
5+
6+
The FRDM-MCXW72
7+
8+
The MCX W72x family features a 96 MHz Arm® Cortex®-M33 core coupled with a
9+
multiprotocol radio subsystem supporting Matter, Thread, Zigbee and
10+
Bluetooth LE. The independent radio subsystem, with a dedicated core and
11+
memory, offloads the main CPU, preserving it for the primary application and
12+
allowing firmware updates to support future wireless standards.
13+
14+
Hardware
15+
********
16+
17+
- MCXW72 Arm Cortex-M33 microcontroller running up to 96 MHz
18+
- 2MB on-chip Flash memory unit
19+
- 256 KB TCM RAM
20+
- On-board MCU-Link debugger with CMSIS-DAP
21+
22+
For more information about the MCXW72 SoC and FRDM-MCXW72 board, see:
23+
24+
- `MCXW72 SoC Website`_
25+
- `FRDM-MCXW72 Website`_
26+
27+
Supported Features
28+
==================
29+
30+
The ``frdm_mcxw72`` board target in Zephyr currently supports the following features:
31+
32+
+-----------+------------+-------------------------------------+
33+
| Interface | Controller | Driver/Component |
34+
+===========+============+=====================================+
35+
| NVIC | on-chip | nested vector interrupt controller |
36+
+-----------+------------+-------------------------------------+
37+
| SYSTICK | on-chip | systick |
38+
+-----------+------------+-------------------------------------+
39+
| PINMUX | on-chip | pinctrl |
40+
+-----------+------------+-------------------------------------+
41+
| GPIO | on-chip | gpio |
42+
+-----------+------------+-------------------------------------+
43+
| LPUART | on-chip | serial port-polling; |
44+
| | | serial port-interrupt |
45+
+-----------+------------+-------------------------------------+
46+
| TPM | on-chip | pwm |
47+
+-----------+------------+-------------------------------------+
48+
| LPTMR | on-chip | counter |
49+
+-----------+------------+-------------------------------------+
50+
| LPSPI | on-chip | spi |
51+
+-----------+------------+-------------------------------------+
52+
| FLEXCAN | on-chip | can |
53+
+-----------+------------+-------------------------------------+
54+
| ADC | on-chip | adc |
55+
+-----------+------------+-------------------------------------+
56+
| I2C | on-chip | i2c |
57+
+-----------+------------+-------------------------------------+
58+
59+
Programming and Debugging
60+
*************************
61+
62+
Build and flash applications as usual (see :ref:`build_an_application` and
63+
:ref:`application_run` for more details).
64+
65+
Configuring a Debug Probe
66+
=========================
67+
68+
A debug probe is used for both flashing and debugging the board. This board is
69+
configured by default to use the MCU-Link CMSIS-DAP Onboard Debug Probe.
70+
71+
Using LinkServer
72+
----------------
73+
74+
Linkserver is the default runner for this board, and supports the factory
75+
default MCU-Link firmware. Follow the instructions in
76+
:ref:`mcu-link-cmsis-onboard-debug-probe` to reprogram the default MCU-Link
77+
firmware. This only needs to be done if the default onboard debug circuit
78+
firmware was changed. To put the board in ``DFU mode`` to program the firmware,
79+
short jumper JP5.
80+
81+
Using J-Link
82+
------------
83+
84+
There are two options. The onboard debug circuit can be updated with Segger
85+
J-Link firmware by following the instructions in
86+
:ref:`mcu-link-jlink-onboard-debug-probe`.
87+
To be able to program the firmware, you need to put the board in ``DFU mode``
88+
by shortening the jumper JP5.
89+
The second option is to attach a :ref:`jlink-external-debug-probe` to the
90+
10-pin SWD connector (J12) of the board.
91+
For both options use the ``-r jlink`` option with west to use the jlink runner.
92+
93+
.. code-block:: console
94+
95+
west flash -r jlink
96+
97+
Configuring a Console
98+
=====================
99+
100+
Connect a USB cable from your PC to J14, and use the serial terminal of your choice
101+
(minicom, putty, etc.) with the following settings:
102+
103+
- Speed: 115200
104+
- Data: 8 bits
105+
- Parity: None
106+
- Stop bits: 1
107+
108+
Flashing
109+
========
110+
111+
Here is an example for the :zephyr:code-sample:`hello_world` application.
112+
113+
.. zephyr-app-commands::
114+
:zephyr-app: samples/hello_world
115+
:board: frdm_mcxw72/mcxw727c/cpu0
116+
:goals: flash
117+
118+
Open a serial terminal, reset the board (press the RESET button), and you should
119+
see the following message in the terminal:
120+
121+
.. code-block:: console
122+
123+
*** Booting Zephyr OS build v3.7.0-xxx-xxxx ***
124+
Hello World! frdm_mcxw72/mcxw727c/cpu0
125+
126+
Debugging
127+
=========
128+
129+
Here is an example for the :zephyr:code-sample:`hello_world` application.
130+
131+
.. zephyr-app-commands::
132+
:zephyr-app: samples/hello_world
133+
:board: frdm_mcxw72/mcxw727c/cpu0
134+
:goals: debug
135+
136+
Open a serial terminal, step through the application in your debugger, and you
137+
should see the following message in the terminal:
138+
139+
.. code-block:: console
140+
141+
*** Booting Zephyr OS build v3.7.0-xxx-xxxx ***
142+
Hello World! frdm_mcxw72/mcxw727c/cpu0
143+
144+
Troubleshooting
145+
===============
146+
147+
.. include:: ../../common/segger-ecc-systemview.rst
148+
:start-after: segger-ecc-systemview
149+
150+
References
151+
**********
152+
153+
.. target-notes::
154+
155+
.. _MCXW72 SoC Website:
156+
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/mcx-arm-cortex-m/mcx-w-series-microcontrollers/mcx-w72x-secure-and-ultra-low-power-mcus-for-matter-thread-zigbee-and-bluetooth-le:MCX-W72X
157+
158+
.. _FRDM-MCXW72 Website:
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
* Copyright 2024 NXP
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <nxp/mcx/MCXW727CMFTA-pinctrl.h>
7+
8+
&pinctrl {
9+
pinmux_lpuart0: pinmux_lpuart0 {
10+
group0 {
11+
pinmux = <LPUART0_RX_PTA16>, <LPUART0_TX_PTA17>;
12+
drive-strength = "low";
13+
slew-rate = "fast";
14+
};
15+
};
16+
17+
pinmux_lpuart1: pinmux_lpuart1 {
18+
group0 {
19+
pinmux = <LPUART1_RX_PTC2>, <LPUART1_TX_PTC3>;
20+
drive-strength = "low";
21+
slew-rate = "fast";
22+
};
23+
};
24+
25+
pinmux_tpm0: pinmux_tpm0 {
26+
group0 {
27+
pinmux = <TPM0_CH0_PTA21>, <TPM0_CH1_PTA20>,
28+
<TPM0_CH2_PTA19>, <TPM0_CH3_PTA18>;
29+
drive-strength = "low";
30+
slew-rate = "fast";
31+
};
32+
};
33+
34+
pinmux_lpspi1: pinmux_lpspi1 {
35+
group0 {
36+
pinmux = <LPSPI1_SIN_PTB1>,
37+
<LPSPI1_SOUT_PTB3>;
38+
slew-rate = "fast";
39+
drive-strength = "low";
40+
};
41+
};
42+
43+
pinmux_flexcan: pinmux_flexcan {
44+
group0 {
45+
pinmux = <CAN0_RX_PTC5>, <CAN0_TX_PTC4>;
46+
slew-rate = "slow";
47+
drive-strength = "low";
48+
};
49+
};
50+
51+
pinmux_lpadc0: pinmux_lpadc0 {
52+
group0 {
53+
pinmux = <ADC0_A6_PTD2>,
54+
<ADC0_B6_PTD3>,
55+
<ADC0_B5_PTD1>;
56+
drive-strength = "low";
57+
slew-rate = "fast";
58+
};
59+
};
60+
61+
pinmux_lpi2c0: pinmux_lpi2c0 {
62+
group0 {
63+
pinmux = <LPI2C0_SCL_PTA19>,
64+
<LPI2C0_SDA_PTA18>;
65+
drive-strength = "low";
66+
slew-rate = "fast";
67+
drive-open-drain;
68+
};
69+
};
70+
71+
pinmux_lpi2c1: pinmux_lpi2c1 {
72+
group0 {
73+
pinmux = <LPI2C1_SCL_PTB5>,
74+
<LPI2C1_SDA_PTB4>;
75+
drive-strength = "low";
76+
slew-rate = "fast";
77+
drive-open-drain;
78+
};
79+
};
80+
};
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
/*
2+
* Copyright 2024 NXP
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include <nxp/nxp_mcxw72.dtsi>
9+
#include "frdm_mcxw72-pinctrl.dtsi"
10+
11+
/ {
12+
model = "NXP FRDM-MCXW72 board";
13+
14+
aliases {
15+
led0 = &blue_led;
16+
blue-pwm-led = &blue_pwm_led;
17+
green-pwm-led = &green_pwm_led;
18+
red-pwm-led = &red_pwm_led;
19+
};
20+
21+
chosen {
22+
zephyr,flash = &flash;
23+
zephyr,flash-controller = &fmu;
24+
zephyr,code-partition = &code_partition;
25+
zephyr,sram = &stcm0;
26+
zephyr,console = &lpuart1;
27+
zephyr,shell-uart = &lpuart1;
28+
zephyr,uart-pipe = &lpuart0;
29+
zephyr,canbus = &flexcan0;
30+
};
31+
32+
user_led {
33+
compatible = "gpio-leds";
34+
blue_led: led {
35+
gpios = <&gpioc 1 GPIO_ACTIVE_HIGH>;
36+
};
37+
};
38+
39+
pwmleds {
40+
compatible = "pwm-leds";
41+
blue_pwm_led: pwm_led_0 {
42+
pwms = <&tpm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
43+
};
44+
green_pwm_led: pwm_led_1 {
45+
pwms = <&tpm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
46+
};
47+
red_pwm_led: pwm_led_2 {
48+
pwms = <&tpm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
49+
};
50+
};
51+
};
52+
53+
&gpioa {
54+
status = "okay";
55+
};
56+
57+
58+
&gpioc {
59+
status = "okay";
60+
};
61+
62+
&lpuart0 {
63+
current-speed = <115200>;
64+
status = "okay";
65+
pinctrl-0 = <&pinmux_lpuart0>;
66+
pinctrl-names = "default";
67+
};
68+
69+
&lpuart1 {
70+
current-speed = <115200>;
71+
status = "okay";
72+
pinctrl-0 = <&pinmux_lpuart1>;
73+
pinctrl-names = "default";
74+
};
75+
76+
&flash {
77+
partitions {
78+
compatible = "fixed-partitions";
79+
#address-cells = <1>;
80+
#size-cells = <1>;
81+
82+
code_partition: partition@0 {
83+
reg = <0x0 DT_SIZE_K(67)>;
84+
};
85+
86+
storage_partition: partition@10c00 {
87+
reg = <0x10c00 DT_SIZE_K(1981)>;
88+
};
89+
};
90+
};
91+
92+
&fmu {
93+
status = "okay";
94+
};
95+
96+
&tpm0 {
97+
status = "okay";
98+
pinctrl-0 = <&pinmux_tpm0>;
99+
pinctrl-names = "default";
100+
};
101+
102+
&lptmr0 {
103+
status = "okay";
104+
};
105+
106+
&lpspi1 {
107+
status = "okay";
108+
pinctrl-0 = <&pinmux_lpspi1>;
109+
pinctrl-names = "default";
110+
};
111+
112+
&flexcan0 {
113+
status = "okay";
114+
pinctrl-0 = <&pinmux_flexcan>;
115+
pinctrl-names = "default";
116+
117+
can-transceiver {
118+
max-bitrate = <5000000>;
119+
};
120+
};
121+
122+
&vref {
123+
status = "okay";
124+
};
125+
126+
&adc0 {
127+
pinctrl-0 = <&pinmux_lpadc0>;
128+
pinctrl-names = "default";
129+
status = "okay";
130+
};
131+
132+
&lpi2c1 {
133+
status = "okay";
134+
pinctrl-0 = <&pinmux_lpi2c1>;
135+
pinctrl-names = "default";
136+
};

0 commit comments

Comments
 (0)