boards: frdm_mcxn236: add temperature sensor support
1. enable temperature sensor support 2. verified samples/sensor/die_temp_polling Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
This commit is contained in:
parent
0fe396cb11
commit
48bbe114a9
@ -28,6 +28,7 @@
|
||||
watchdog0 = &wwdt0;
|
||||
pwm-0 = &flexpwm1_pwm0;
|
||||
rtc = &rtc;
|
||||
die-temp0 = &temp0;
|
||||
};
|
||||
|
||||
arduino_header: arduino-connector {
|
||||
|
||||
@ -729,6 +729,11 @@
|
||||
nxp,references = <&vref 1800>;
|
||||
};
|
||||
|
||||
temp0: temp0 {
|
||||
compatible = "nxp,lpadc-temp40";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lpadc1: lpadc@10e000 {
|
||||
compatible = "nxp,lpc-lpadc";
|
||||
reg = <0x10e000 0x1000>;
|
||||
|
||||
26
samples/sensor/die_temp_polling/boards/frdm_mcxn236.overlay
Normal file
26
samples/sensor/die_temp_polling/boards/frdm_mcxn236.overlay
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2025 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <zephyr/dt-bindings/adc/adc.h>
|
||||
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
|
||||
|
||||
&lpadc0 {
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_EXTERNAL0";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 131)>;
|
||||
zephyr,input-positive = <MCUX_LPADC_CH26A>;
|
||||
};
|
||||
};
|
||||
|
||||
&temp0 {
|
||||
status = "okay";
|
||||
io-channels = <&lpadc0 0>;
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user