Hi everyone,
We have a custom board using AM335X on which we use the ADC in continuous mode to read 8 inputs (so the 8 ADC channels are enabled). Our software handle the different files :
- scan_elements/in_voltageX_en to enable the channel X (in our case all of them are set to 1)
- buffer/lenght set to 100 (100 values per channel)
- buffer/enable set to 1 to configure the ADC in continuous mode
and read the char device /dev/iio:device0 every 250ms (read method from unistd.h).
Unfortunately after some time (no obvious pattern) the read method return -1 (and from then nothing else) and nothing seems to be able to restore the ADC back to a functionnal state.
Wy tried to :
- kill our soft, disable the continuous mode (buffer/enable set to 0) and then restart our soft
- kill our soft, disable the channels (every scan_elements/in_voltageX_en set to 0), and then restart our soft
- kill our soft, disable the continuous mode, disable the channels and then restart our soft
- kill our soft, rmmod the ti_am335x_adc kernel module, modprobe it back and then restart our soft
Nothing.
The only solution we found for the ADC to be restored back to a functionnal state is to reboot the system.
- Would any one have any idea why the read start returning -1 at some point ?
- Any idea how to retore the ADC back to a functionnal state without having to reboot the system ?
(We are using the linux staging 3.14.49-ge9cd4cc819).
Thanks in advance.