Skip to content

Commit

Permalink
samples: drivers: adc: enbale test for mr_canhubk3
Browse files Browse the repository at this point in the history
Enable all channels that available connector on board.
ADC0 channel 6 on precision group with normal end chain
callback.
ADC1 channel 2 on precision group with normal end of
conversion callback.
ADC2 channels 3, 4, 5 on precision group with normal end
of conversion callback.

Signed-off-by: Cong Nguyen Huu <[email protected]>
  • Loading branch information
congnguyenhuu authored and mmahadevan108 committed Jul 28, 2023
1 parent 5ea0701 commit 19f33b8
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 1 deletion.
77 changes: 77 additions & 0 deletions samples/drivers/adc/boards/mr_canhubk3.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Copyright 2023 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/adc/adc.h>

/ {
zephyr,user {
io-channels = <&adc0 6>, <&adc1 2>, <&adc2 3>, <&adc2 4>, <&adc2 5>;
};
};

&adc0 {
group-channel = "precision";
callback-select = "normal-end-chain";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

channel@6 {
reg = <6>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <14>;
};
};

&adc1 {
group-channel = "precision";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

channel@2 {
reg = <2>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <14>;
};

};


&adc2 {
group-channel = "precision";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

channel@3 {
reg = <3>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <14>;
};

channel@4 {
reg = <4>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <14>;
};

channel@5 {
reg = <5>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <14>;
};
};
1 change: 1 addition & 0 deletions samples/drivers/adc/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ tests:
- esp32c3_devkitm
- gd32l233r_eval
- lpcxpresso55s36
- mr_canhubk3
integration_platforms:
- nucleo_l073rz
- nrf52840dk_nrf52840
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ manifest:
groups:
- hal
- name: hal_nxp
revision: 3aed18634b19102cc0f9e56fcff88bd04edba6ec
revision: 1a55ccfde649a97df74a8853cbd9787ddd34bfc4
path: modules/hal/nxp
groups:
- hal
Expand Down

0 comments on commit 19f33b8

Please sign in to comment.