Hi all,
We have a project that involves reading one ADC channel at a maximum ~1KHz rate.
Does anyone know of any example C code for this that utilizes the VF610_adc.c driver directly?
What I've understood is that reading the in_voltageX_raw file directly from Linux is slow and takes up a lot of resources.
Kind regards,
Jonas
Hi Jonas,
it's correct reading the raw ADC values via sysfs isn't efficient. In case you use a newer kernel there is also the IIO buffer and IIO trigger interface which may fits better.
Regards
Stefan
Hi Stefan,
Thanks for your reply. My kernel version is 4.1.15, do you have any idea if this is new enough?
Where do I find the IIO buffer and trigger and how do I read them?
Thanks in advance,
Jonas
Yes, 4.1.15 should be sufficient. Please look at one of the many presentations about linux-iio. There are also example tools within the linux sources.
Hi Jonas
please check FreeRTOS examples
Board Support Packages (7)
SDK2.2_iMX6UL_WIN(REV SDK2.2)
http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-processors/i.mx-6-pr...
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------