47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
/*
|
|
* Copyright (c) 2024 Centro de Inovacao EDGE
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
|
|
|
|
/ {
|
|
aliases {
|
|
adc0 = &lpadc0;
|
|
};
|
|
};
|
|
|
|
&lpadc0 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
/*
|
|
* To use this sample:
|
|
* LPADC0 CH0A and CH0B are set up in differential mode (B-A)
|
|
* - Connect LPADC0 CH0A signal to voltage between 0~1.8V (J30 pin 1)
|
|
* - Connect LPADC0 CH0B signal to voltage between 0~1.8V (J30 pin 2)
|
|
* LPADC0 CH2A is set up in single ended mode
|
|
* - Connect LPADC0 CH2A signal to voltage between 0~1.8V (J30 pin 3)
|
|
*/
|
|
|
|
channel@0 {
|
|
reg = <0>;
|
|
zephyr,gain = "ADC_GAIN_1";
|
|
zephyr,reference = "ADC_REF_EXTERNAL0";
|
|
zephyr,vref-mv = <1800>;
|
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
|
zephyr,input-positive = <MCUX_LPADC_CH0B>;
|
|
zephyr,input-negative = <MCUX_LPADC_CH0A>;
|
|
};
|
|
|
|
channel@1 {
|
|
reg = <1>;
|
|
zephyr,gain = "ADC_GAIN_1";
|
|
zephyr,reference = "ADC_REF_EXTERNAL0";
|
|
zephyr,vref-mv = <1800>;
|
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
|
zephyr,input-positive = <MCUX_LPADC_CH2A>;
|
|
};
|
|
};
|