2024-04-16 11:15 PM - edited 2024-04-16 11:16 PM
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>;
};
};
};
2024-05-07 08:16 AM
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