Skip to content

Commit 48bbe11

Browse files
NeilChen93fabiobaltieri
authored andcommitted
boards: frdm_mcxn236: add temperature sensor support
1. enable temperature sensor support 2. verified samples/sensor/die_temp_polling Signed-off-by: Neil Chen <[email protected]>
1 parent 0fe396c commit 48bbe11

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

boards/nxp/frdm_mcxn236/frdm_mcxn236.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
watchdog0 = &wwdt0;
2929
pwm-0 = &flexpwm1_pwm0;
3030
rtc = &rtc;
31+
die-temp0 = &temp0;
3132
};
3233

3334
arduino_header: arduino-connector {

dts/arm/nxp/nxp_mcxn23x_common.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,11 @@
729729
nxp,references = <&vref 1800>;
730730
};
731731

732+
temp0: temp0 {
733+
compatible = "nxp,lpadc-temp40";
734+
status = "disabled";
735+
};
736+
732737
lpadc1: lpadc@10e000 {
733738
compatible = "nxp,lpc-lpadc";
734739
reg = <0x10e000 0x1000>;
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+
};

0 commit comments

Comments
 (0)