feat(adc_test): use devicetree for adc configuration
- Use named adc channel 'multisense' from devicetree - Enable adc calibration
This commit is contained in:
31
software/apps/adc_test/boards/weact_stm32g431_core.overlay
Normal file
31
software/apps/adc_test/boards/weact_stm32g431_core.overlay
Normal file
@@ -0,0 +1,31 @@
|
||||
/ {
|
||||
zephyr,user {
|
||||
io-channels = <&adc1 1>;
|
||||
io-channel-names = "multisense";
|
||||
};
|
||||
};
|
||||
|
||||
&adc1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
st,adc-clock-source = "SYNC";
|
||||
st,adc-prescaler = <4>;
|
||||
pinctrl-0 = <&adc1_in1_pa0>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
channel@1 {
|
||||
reg = <1>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
|
||||
zephyr,resolution = <12>;
|
||||
zephyr,vref-mv = <3300>;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
adc1_in1_pa0: adc1_in1_pa0 {
|
||||
pinmux = <STM32_PINMUX('A', 0, ANALOG)>;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user