Skip to content

Commit 060e05e

Browse files
peterwangszkartben
authored andcommitted
boards: frdm_mcxa366: enable sample and test
1. enable enable sample and test for frdm_mcxa366 Signed-off-by: Peter Wang <[email protected]>
1 parent 711af98 commit 060e05e

File tree

21 files changed

+180
-3
lines changed

21 files changed

+180
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_LPADC_DO_OFFSET_CALIBRATION=y
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/adc/adc.h>
8+
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
9+
10+
/ {
11+
zephyr,user {
12+
/* adjust channel number according to pinmux in board.dts */
13+
io-channels = <&lpadc0 0>;
14+
};
15+
};
16+
17+
&lpadc0 {
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
/*
22+
* To use this sample:
23+
* LPADC0 CH7 is used
24+
* - Connect LPADC0 CH7 signal to voltage between 0~3.3V (J4 pin6)
25+
*/
26+
27+
channel@0 {
28+
reg = <0>;
29+
zephyr,gain = "ADC_GAIN_1";
30+
zephyr,reference = "ADC_REF_EXTERNAL0";
31+
zephyr,vref-mv = <3300>;
32+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
33+
zephyr,resolution = <16>;
34+
zephyr,input-positive = <MCUX_LPADC_CH7A>;
35+
};
36+
};

samples/drivers/adc/adc_dt/sample.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ tests:
4242
- raytac_an54l15q_db/nrf54l15/cpuapp
4343
- frdm_mcxa346
4444
- frdm_mcxa266
45+
- frdm_mcxa366
4546
- s32k148_evb
4647
integration_platforms:
4748
- nucleo_l073rz

samples/drivers/opamp/output_measure/boards/frdm_mcxa266.overlay renamed to samples/drivers/opamp/output_measure/boards/frdm_mcxa366.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
};
1616
};
1717

18-
/* OPAMP is in follower mode, and its output is Vref of OPAMP1/2/3 */
18+
/* OPAMP is in follower mode, and its output is Vref of OPAMP1/2/3. */
1919
&opamp0 {
2020
functional-mode = "follower";
2121
is-reference-source;

samples/drivers/opamp/output_measure/sample.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ tests:
1717
platform_allow:
1818
- frdm_mcxa156
1919
- frdm_mcxa346
20-
- frdm_mcxa266
20+
- frdm_mcxa366
2121
- frdm_mcxn947/mcxn947/cpu0
2222
- lpcxpresso55s36
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#include <zephyr/dt-bindings/adc/adc.h>
7+
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
8+
9+
&lpadc0 {
10+
status = "okay";
11+
#address-cells = <1>;
12+
#size-cells = <0>;
13+
14+
channel@0 {
15+
reg = <0>;
16+
zephyr,gain = "ADC_GAIN_1";
17+
zephyr,reference = "ADC_REF_EXTERNAL0";
18+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 131)>;
19+
zephyr,input-positive = <MCUX_LPADC_CH26A>;
20+
};
21+
};
22+
23+
&temp0 {
24+
status = "okay";
25+
io-channels = <&lpadc0 0>;
26+
};

samples/sensor/mcux_lpcmp/README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,14 @@ LPCMP positive input port voltage by changing the voltage input to J2-17.
9090
:board: frdm_mcxa266
9191
:goals: build flash
9292
:compact:
93+
94+
Building and Running for NXP FRDM-MCXA366
95+
=========================================
96+
Build the application for the :zephyr:board:`frdm_mcxa366` board, and adjust the
97+
LPCMP positive input port voltage by changing the voltage input to J2-17.
98+
99+
.. zephyr-app-commands::
100+
:zephyr-app: samples/sensor/mcux_lpcmp
101+
:board: frdm_mcxa366
102+
:goals: build flash
103+
:compact:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_LPCMP_POSITIVE_PORT=1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&lpcmp0 {
8+
status = "okay";
9+
function-clock = "CMP_CLOCK";
10+
};

samples/sensor/mcux_lpcmp/sample.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ common:
1010
- frdm_mcxa153
1111
- frdm_mcxa346
1212
- frdm_mcxa266
13+
- frdm_mcxa366
1314
integration_platforms:
1415
- frdm_mcxn947/mcxn947/cpu0
1516
- frdm_mcxn236
1617
- frdm_mcxa346
1718
- frdm_mcxa266
19+
- frdm_mcxa366
1820
tags:
1921
- drivers
2022
- sensor

0 commit comments

Comments
 (0)