boards: lpcxpresso55s36: Enable LPADC
Enable LPADC on lpcxpresso55s36 board Support lpcxpresso55s36 on ADC driver sample Signed-off-by: David Leach <david.leach@nxp.com>
This commit is contained in:
parent
65aad527b7
commit
095db2ee27
4 changed files with 50 additions and 1 deletions
|
@ -39,6 +39,14 @@
|
|||
};
|
||||
};
|
||||
|
||||
pinmux_lpadc0: pinmux_lpadc0 {
|
||||
group0 {
|
||||
pinmux = <ADC0_CH0A_PIO1_9>;
|
||||
slew-rate = "standard";
|
||||
nxp,analog-mode;
|
||||
};
|
||||
};
|
||||
|
||||
/* Configures pin routing and optionally pin electrical features. */
|
||||
pinmux_sctimer_default: pinmux_sctimer_default {
|
||||
group0 {
|
||||
|
|
|
@ -134,6 +134,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pinmux_lpadc0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
|
|
35
samples/drivers/adc/boards/lpcxpresso55s36.overlay
Normal file
35
samples/drivers/adc/boards/lpcxpresso55s36.overlay
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Copyright 2023 NXP
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/adc/adc.h>
|
||||
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
|
||||
|
||||
/ {
|
||||
zephyr,user {
|
||||
/* adjust channel number according to pinmux in board.dts */
|
||||
io-channels = <&adc0 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/*
|
||||
* This sample requires PIO1_9 found on J7 pin 1 as the ADC0 channel 3 input
|
||||
* be connected to various voltages to observe the change in reading.
|
||||
*/
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_EXTERNAL0";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,vref-mv = <3300>;
|
||||
zephyr,resolution = <12>;
|
||||
zephyr,input-positive = <MCUX_LPADC_CH0A>;
|
||||
};
|
||||
};
|
|
@ -7,7 +7,7 @@ tests:
|
|||
platform_allow: nucleo_l073rz disco_l475_iot1 cc3220sf_launchxl cc3235sf_launchxl
|
||||
stm32l496g_disco stm32h735g_disco nrf51dk_nrf51422 nrf52840dk_nrf52840
|
||||
mec172xevb_assy6906 gd32f350r_eval gd32f450i_eval gd32vf103v_eval gd32f403z_eval
|
||||
esp32 esp32s2_saola esp32c3_devkitm gd32l233r_eval
|
||||
esp32 esp32s2_saola esp32c3_devkitm gd32l233r_eval lpcxpresso55s36
|
||||
integration_platforms:
|
||||
- nucleo_l073rz
|
||||
- nrf52840dk_nrf52840
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue