ADC conversion mode on iMX6ULL


I am using the IIO interface for AD reading on a Colibri imx6ull module, however it is not clear anywhere on how is it operating in terms of conversion. As my goal is to check the backup battery voltage and presence, I can’t stand too many readings as it will use too much energy from the battery.

So, when I perform this command:

root@colibri-imx6ull:/sys/devices/soc0/soc/2100000.aips-bus/2198000.adc/iio:device0# cat in_voltage0_raw 

Is it performing a one shot conversion? Or the ADC is performing multiple conversions following the in_voltage_sampling_frequency and the cat command returns the last read?

Besides, what are the possible values for the “in_conversion_mode” parameters? By default it is set to low-power, whatever that means. I’ve tried to set it to oneshot but it didn’t work.

The default Toradex ADC information pages lack this information and on other forums the NXP support guys ask the user to look at the IIO default reference, but there are no mentions to in_conversion_mode in there.

Thank you very much!

Hi @luizfernando!

These undocumented options seem to be NXP specific and linked to certain ADC registers on the SoC, e.g.:

Also, the ADC seems to perform a one-shot conversion. The in_voltage_sampling_frequency parameter seems to configure the internal ADC sample clock, not a sampling frequency of multiple conversions.