boards: frdm_mcxa156: 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
db1abaaf67
commit
a128f55b5d
@ -25,6 +25,7 @@
|
|||||||
mcuboot-button0 = &user_button_2;
|
mcuboot-button0 = &user_button_2;
|
||||||
watchdog0 = &wwdt0;
|
watchdog0 = &wwdt0;
|
||||||
ambient-temp0 = &p3t1755;
|
ambient-temp0 = &p3t1755;
|
||||||
|
die-temp0 = &temp0;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
|||||||
@ -493,6 +493,11 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
temp0: temp0 {
|
||||||
|
compatible = "nxp,lpadc-temp40";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
usb: usbd@400a4000 {
|
usb: usbd@400a4000 {
|
||||||
compatible = "nxp,kinetis-usbd";
|
compatible = "nxp,kinetis-usbd";
|
||||||
reg = <0x400a4000 0x1000>;
|
reg = <0x400a4000 0x1000>;
|
||||||
|
|||||||
26
samples/sensor/die_temp_polling/boards/frdm_mcxa156.overlay
Normal file
26
samples/sensor/die_temp_polling/boards/frdm_mcxa156.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