TS-7250-V3 Supervisory ADC
From embeddedTS Manuals
The supervisory microcontroller provides ADC channels to monitor onboard rails such as VIN, 5 V, 3.3 V, and more. Channels that are less than 3.3 V are provided directly by the IIO device "tssupervisor_adc". The analog frontend driver is used to rescale some channels to the range supported by this ADC.
iio device | iio channel | Schematic name |
---|---|---|
an_3p3v | voltage0 | 3.3V |
tssupervisor-adc | voltage1 | VDD_ARM_CAP |
tssupervisor-adc | voltage2 | VDD_SOC_CAP |
an_5v | voltage0 | 5V_A |
an_8v_48v | voltage0 | 8V_48V |
These can be accessed from any language with iio bindings, from /sys/bus/iio/, or using iio_attr. For example, to reading the input voltage with iio_attr:
root@tsimx6ul:~# iio_attr -c an_8v_48v voltage0 dev 'an_8v_48v', channel 'voltage0' (input), attr 'raw', value '619' dev 'an_8v_48v', channel 'voltage0' (input), attr 'scale', value '18.650634765'
The raw and scale values can be used to get the real value in millivolts: or 11.54 V.