Skip to content

Commit 7cf18b0

Browse files
NeilChen9357300
authored andcommitted
[nrf fromtree] boards: frdm_mcxc444: add frdm_mcxc444 support
add frdm_mcxc444 support Signed-off-by: Neil Chen <[email protected]> (cherry picked from commit 16bd2e8)
1 parent 4b716ce commit 7cf18b0

File tree

9 files changed

+394
-0
lines changed

9 files changed

+394
-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_MCXC444
5+
select SOC_MCXC444
6+
select SOC_PART_NUMBER_MCXC444VLH
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright 2024 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
board_runner_args(jlink "--device=MCXC444")
8+
board_runner_args(linkserver "--device=MCXC444:FRDM-MCXC444")
9+
board_runner_args(pyocd "--target=mcxc444")
10+
11+
include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)
12+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
13+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/nxp/frdm_mcxc444/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: frdm_mcxc444
3+
vendor: nxp
4+
socs:
5+
- name: mcxc444
53.8 KB
Loading
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
.. _frdm_mcxc444:
2+
3+
NXP FRDM-MCXC444
4+
################
5+
6+
Overview
7+
********
8+
9+
FRDM-MCXC444 is a compact and scalable development board for rapid
10+
prototyping of MCX C444 MCU. It offers industry standard headers
11+
for easy access to the MCU's I/Os, integrated open-standard serial
12+
interfaces and on-board MCU-Link debugger.
13+
The MCXC is a general purpose ultra-low-power MCU family,
14+
providing additional memory, communications and analog peripheral.
15+
16+
17+
.. image:: frdm_mcxc444.webp
18+
:align: center
19+
:alt: FRDM-MCXC444
20+
21+
Hardware
22+
********
23+
24+
- MCXC444VLH Arm Cortex-M0+ microcontroller running at 48 MHz
25+
- 64LQFP package
26+
- 256 KB flash
27+
- 32 KB SRAM
28+
- USB FS 2.0
29+
- 2x low-power UART, 1x UART, 2x I2C, 2x SPI
30+
- FXLS8974CF accelerometer
31+
- Tri-color LED
32+
- On-board MCU-Link debugger with CMSIS-DAP
33+
- Arduino Header, mikroBUS, Pmod
34+
35+
For more information about the MCXC444 SoC and FRDM-MCXC444 board, see
36+
these references:
37+
38+
- `MCX C14x/24x/44x Website`_
39+
- `MCX C44x Datasheet`_
40+
- `MCX C44x Reference Manual`_
41+
- `FRDM-MCXC444 Website`_
42+
- `FRDM-MCXC444 User Manual`_
43+
- `FRDM-MCXC444 Design Files`_
44+
45+
Supported Features
46+
==================
47+
48+
The ``frdm_mcxc444`` board target supports the following hardware features:
49+
50+
+-----------+------------+-------------------------------------+
51+
| Interface | Controller | Driver/Component |
52+
+===========+============+=====================================+
53+
| NVIC | on-chip | nested vector interrupt controller |
54+
+-----------+------------+-------------------------------------+
55+
| SYSTICK | on-chip | systick |
56+
+-----------+------------+-------------------------------------+
57+
| PINMUX | on-chip | pinmux |
58+
+-----------+------------+-------------------------------------+
59+
| GPIO | on-chip | gpio |
60+
+-----------+------------+-------------------------------------+
61+
| UART | on-chip | serial port-polling; |
62+
| | | serial port-interrupt |
63+
+-----------+------------+-------------------------------------+
64+
| FLASH | on-chip | soc flash |
65+
+-----------+------------+-------------------------------------+
66+
67+
68+
Targets available
69+
==================
70+
71+
The default configuration can be found in
72+
:zephyr_file:`boards/nxp/frdm_mcxc444/frdm_mcxc444_defconfig`
73+
74+
Other hardware features are not currently supported by the port.
75+
76+
Connections and IOs
77+
===================
78+
79+
The MCXC444 SoC has five pairs of pinmux/gpio controllers (PORTA/GPIOA,
80+
PORTB/GPIOB, PORTC/GPIOC, PORTD/GPIOD, and PORTE/GPIOE) for the FRDM-MCXC444 board.
81+
82+
+-------+-------------+---------------------------+
83+
| Name | Function | Usage |
84+
+=======+=============+===========================+
85+
| PTE20 | ADC | ADC0 channel 1 |
86+
+-------+-------------+---------------------------+
87+
| PTE31 | GPIO | Red LED |
88+
+-------+-------------+---------------------------+
89+
| PTD5 | GPIO | Green LED |
90+
+-------+-------------+---------------------------+
91+
| PTE29 | GPIO | Blue LED |
92+
+-------+-------------+---------------------------+
93+
| PTA1 | LPUART0_RX | UART Console |
94+
+-------+-------------+---------------------------+
95+
| PTA2 | LPUART0_TX | UART Console |
96+
+-------+-------------+---------------------------+
97+
| PTA20 | RESET | RESET Button SW1 |
98+
+-------+-------------+---------------------------+
99+
| PTC3 | GPIO | User button SW2 |
100+
+-------+-------------+---------------------------+
101+
| PTA4 | GPIO | User button SW3 |
102+
+-------+-------------+---------------------------+
103+
| PTE25 | I2C0_SDA | I2C accelerometer |
104+
+-------+-------------+---------------------------+
105+
| PTE24 | I2C0_SCL | I2C accelerometer |
106+
+-------+-------------+---------------------------+
107+
108+
System Clock
109+
============
110+
111+
The MCXC444 SoC is configured to use HIRC running at 48 MHz as a system clock source.
112+
113+
Serial Port
114+
===========
115+
116+
The MCXC444 LPUART0 is used for the console.
117+
118+
Programming and Debugging
119+
*************************
120+
121+
Build and flash applications as usual (see :ref:`build_an_application` and
122+
:ref:`application_run` for more details).
123+
124+
Configuring a Debug Probe
125+
=========================
126+
127+
A debug probe is used for both flashing and debugging the board. This board is
128+
configured by default to use the MCU-Link CMSIS-DAP Onboard Debug Probe.
129+
130+
Using LinkServer
131+
----------------
132+
133+
Linkserver is the default runner for this board, and supports the factory
134+
default MCU-Link firmware. Follow the instructions in
135+
:ref:`mcu-link-cmsis-onboard-debug-probe` to reprogram the default MCU-Link
136+
firmware. This only needs to be done if the default onboard debug circuit
137+
firmware was changed. To put the board in ``DFU mode`` to program the firmware,
138+
short jumper JP2.
139+
140+
Using J-Link
141+
------------
142+
143+
There are two options. The onboard debug circuit can be updated with Segger
144+
J-Link firmware by following the instructions in
145+
:ref:`mcu-link-jlink-onboard-debug-probe`.
146+
To be able to program the firmware, you need to put the board in ``DFU mode``
147+
by shortening the jumper JP1.
148+
The second option is to attach a :ref:`jlink-external-debug-probe` to the
149+
10-pin SWD connector (J10) of the board. Additionally, the jumper JP4 must
150+
be shortened.
151+
For both options use the ``-r jlink`` option with west to use the jlink runner.
152+
153+
.. code-block:: console
154+
155+
west flash -r jlink
156+
157+
Configuring a Console
158+
=====================
159+
160+
Connect a USB cable from your PC to J13, and use the serial terminal of your choice
161+
(minicom, putty, etc.) with the following settings:
162+
163+
- Speed: 115200
164+
- Data: 8 bits
165+
- Parity: None
166+
- Stop bits: 1
167+
168+
Flashing
169+
========
170+
171+
Here is an example for the :zephyr:code-sample:`hello_world` application.
172+
173+
.. zephyr-app-commands::
174+
:zephyr-app: samples/hello_world
175+
:board: frdm_mcxc444
176+
:goals: flash
177+
178+
Open a serial terminal, reset the board (press the SW1 button), and you should
179+
see the following message in the terminal:
180+
181+
.. code-block:: console
182+
183+
*** Booting Zephyr OS build v3.6.0-4475-gfa5bd8bb098e ***
184+
Hello World! frdm_mcxc444/mcxc444
185+
186+
Debugging
187+
=========
188+
189+
Here is an example for the :zephyr:code-sample:`hello_world` application.
190+
191+
.. zephyr-app-commands::
192+
:zephyr-app: samples/hello_world
193+
:board: frdm_mcxc444
194+
:goals: debug
195+
196+
Open a serial terminal, step through the application in your debugger, and you
197+
should see the following message in the terminal:
198+
199+
.. code-block:: console
200+
201+
*** Booting Zephyr OS build v3.6.0-4475-gfa5bd8bb098e ***
202+
Hello World! frdm_mcxc444/mcxc444
203+
204+
.. _MCX C14x/24x/44x Website:
205+
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/mcx-arm-cortex-m/mcx-c-series-microcontrollers/mcx-c14x-24x-44x-mcus-with-arm-cortex-m0-plus-entry-level-mcus-with-usb-segment-lcd-and-classical-peripherals:MCX-C14x-24x-44x
206+
207+
.. _MCX C44x Datasheet:
208+
https://www.nxp.com/docs/en/data-sheet/MCXC44XP64M48SF6.pdf
209+
210+
.. _MCX C44x Reference Manual:
211+
https://www.nxp.com/webapp/Download?colCode=MCXC44XP64M48RM
212+
213+
.. _FRDM-MCXC444 Website:
214+
https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-mcx-c444-mcus:FRDM-MCXC444
215+
216+
.. _FRDM-MCXC444 User Manual:
217+
https://www.nxp.com/webapp/Download?colCode=UM12120
218+
219+
.. _FRDM-MCXC444 Design Files:
220+
https://www.nxp.com/webapp/Download?colCode=FRDM-MCXC444-DESIGNFILES
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
8+
#include <nxp/mcx/MCXC444VLH-pinctrl.h>
9+
10+
&pinctrl {
11+
pinmux_lpuart0: pinmux_lpuart0 {
12+
group0 {
13+
pinmux = <LPUART0_RX_PTA1>,
14+
<LPUART0_TX_PTA2>;
15+
drive-strength = "low";
16+
slew-rate = "slow";
17+
};
18+
};
19+
};
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <nxp/nxp_mcxc444.dtsi>
10+
#include "frdm_mcxc444-pinctrl.dtsi"
11+
#include <zephyr/dt-bindings/input/input-event-codes.h>
12+
13+
/ {
14+
model = "NXP FRDM-MCXC444 board";
15+
compatible = "nxp,mcxc444", "nxp,mcx";
16+
17+
aliases {
18+
led0 = &red_led;
19+
led1 = &green_led;
20+
led2 = &red_led;
21+
sw0 = &user_button_2;
22+
sw1 = &user_button_3;
23+
};
24+
25+
chosen {
26+
zephyr,sram = &sram0;
27+
zephyr,flash = &flash0;
28+
zephyr,console = &lpuart0;
29+
zephyr,shell-uart = &lpuart0;
30+
};
31+
32+
leds {
33+
compatible = "gpio-leds";
34+
red_led: led_0 {
35+
gpios = <&gpioe 31 GPIO_ACTIVE_LOW>;
36+
label = "Red LED";
37+
};
38+
green_led: led_1 {
39+
gpios = <&gpiob 5 GPIO_ACTIVE_LOW>;
40+
label = "Green LED";
41+
};
42+
blue_led: led_2 {
43+
gpios = <&gpioe 29 GPIO_ACTIVE_LOW>;
44+
label = "Blue LED";
45+
};
46+
};
47+
48+
gpio_keys {
49+
compatible = "gpio-keys";
50+
user_button_2: button_2 {
51+
label = "User SW2";
52+
gpios = <&gpioc 3 GPIO_ACTIVE_LOW>;
53+
zephyr,code = <INPUT_KEY_0>;
54+
};
55+
user_button_3: button_3 {
56+
label = "User SW3";
57+
gpios = <&gpioa 4 GPIO_ACTIVE_LOW>;
58+
zephyr,code = <INPUT_KEY_1>;
59+
};
60+
};
61+
};
62+
63+
&sim {
64+
pllfll-select = <KINETIS_SIM_PLLFLLSEL_MCGPLLCLK>;
65+
er32k-select = <KINETIS_SIM_ER32KSEL_LPO1KHZ>;
66+
};
67+
68+
&cpu0 {
69+
clock-frequency = <48000000>;
70+
};
71+
72+
&osc {
73+
clock-frequency = <32768>;
74+
mode = "low-power";
75+
};
76+
77+
&gpioa {
78+
status = "okay";
79+
};
80+
81+
&gpiob {
82+
status = "okay";
83+
};
84+
85+
&gpioc {
86+
status = "okay";
87+
};
88+
89+
&gpioe {
90+
status = "okay";
91+
};
92+
93+
&lpuart0 {
94+
status = "okay";
95+
current-speed = <115200>;
96+
pinctrl-0 = <&pinmux_lpuart0>;
97+
pinctrl-names = "default";
98+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright 2024 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
identifier: frdm_mcxc444
8+
name: NXP FRDM-MCXC444
9+
type: mcu
10+
arch: arm
11+
ram: 32
12+
flash: 256
13+
toolchain:
14+
- zephyr
15+
- gnuarmemb
16+
- xtools
17+
supported:
18+
- gpio
19+
testing:
20+
ignore_tags:
21+
- net
22+
- bluetooth
23+
vendor: nxp

0 commit comments

Comments
 (0)