cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring Oversampling on STM32MP135F ADC: Parameter Ignored

giz
Associate

For a project using the STM32MP135F Discovery kit, I configured ADC1 with an oversampling ratio of 16. However, in sysfs, I can see that the device tree parameter is being ignored:

 

# cat /sys/bus/iio/devices/iio:device0/oversampling_ratio
1

 

What am I missing?

My device tree:

 

#include "stm32mp135f-dk.dts"

...

&pinctrl {
	adc1_pins_a: adc1-0 {
		pins {
			pinmux =
				<STM32_PINMUX('A', 5, ANALOG)>, /* ADC1_INP2 */
				<STM32_PINMUX('A', 0, ANALOG)>; /* ADC1_INP7 */
		};
	};
};

&adc_1 {
	pinctrl-names = "default";
	pinctrl-0 = <&adc1_pins_a>;
	vdda-supply = <&scmi_vdd_adc>;
	vref-supply = <&scmi_vdd_adc>;
	status = "okay";
	adc1: adc@0 {
		status = "okay";
		oversampling-ratio = <16>;
		/delete-node/ channel@6;
		/delete-node/ channel@12;
		channel@2 {
			reg = <2>;
			st,min-sample-time-ns = <100000>;
		};
		channel@7 {
			reg = <7>;
			st,min-sample-time-ns = <100000>;
		};
	};
};

 

 

 

1 REPLY 1
Gregory PLANCHON
ST Employee

Hi @giz 

 

I saw this old post for MP15 which should be able to guide you in your use case :

https://community.st.com/t5/stm32-mpus-products/stm32mp15x-adc-oversample/td-p/573095


If you need more information, don't hesitate to come back to me.

 

Regards,

Grégory

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.