imx6ul adc driver

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx6ul adc driver

1,858 次查看
ricardoferreira
Contributor II

Hi,

I configured the adc for the imx6UL based on the following post and it is working:imx6ul adc driver.

However I need to read the file all the time for getting the adc value which is not optimal as I want to have a sample rate of around 200Hz. I saw that there is the option of continuous sampling but in my driver I only have:

/sys/bus/iio/devices/iio:device0# ls

in_voltage0_raw in_voltage0_raw

in_voltage0_raw in_voltage_sampling_frequency

power

It's missing the buffer file. I try to add configuration option (CONFIG_IIO_SYSFS_TRIGGER) in the kernel but is not working. Is there any driver I can add to have this option?

Thanks in advance

标签 (1)
标记 (2)
0 项奖励
回复
2 回复数

1,115 次查看
jonasnyberg
Contributor III

Hi all,

Does anyone have any news to share on this? Namely I'm also looking for the continuous conversion.

Kind regards,

Jonas Nyberg

0 项奖励
回复

1,115 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hi Ricardo,

The test procedure for the ADC module can be found on Chapter 56 “ADC Driver” of “i.MX 6 Linux Reference Manual” (attached here). Although it is mentioned that only single conversion is supported (by the driver), it is also mentioned that the sample rate could be configured.

Additionally, in case that you have troubles for the interface to appear in /sys/devices/… , please make sure to enable the adc1 node in the dts file you are using. For a reference, take a look at arch/arm/boot/dts/imx6ul-14x14-ddr3-arm2-adc.dts:

&adc1 {

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_adc1>;

    vref-supply = <&reg_vref_3v3>;

    status = "okay";

};

Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复