TDA4VH-Q1: IIO: Unable to refill buffer: Connection timed out (110)

Part Number: TDA4VH-Q1

Tool/software:

Dear TI,

I am trying to read data from the TI-am335x-adc by using libiio but I always get a timeout error (-110). The same is true if i use the program iio_readdev.

The device is shown in my sysfs and I can read some data there:

cat /sys/bus/iio/devices/iio:device0/in_voltage4_raw
1397

But when using libiio in c or the tool iio_readdev, I get this error:

iio_readdev --samples 1 iio:device0 voltage4
WARNING: High-speed mode not enabled
Unable to refill buffer: Connection timed out (110)

After trying that command, the interrupts for the device get increased:

cat /proc/interrupts

...

264:      19337          0          0          0     GICv3 892 Level     TI-am335x-adc.0.auto

...

The device tree is configured like this:

tscadc0: tscadc@40200000 {
      compatible = "ti,am3359-tscadc";
      reg = <0x00 0x40200000 0x00 0x1000>;
      interrupts = <GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>;
      power-domains = <&k3_pds 0 TI_SCI_PD_EXCLUSIVE>;
      clocks = <&k3_clks 0 0>;
      assigned-clocks = <&k3_clks 0 2>;
      assigned-clock-rates = <60000000>;
      clock-names = "fck";
      dmas = <&main_udmap 0x7400>,
         <&main_udmap 0x7401>;
      dma-names = "fifo0", "fifo1";
      status = "disabled";

      adc {
         #io-channel-cells = <1>;
         compatible = "ti,am3359-adc";
      };
   };

&tscadc0 {

   pinctrl-0 = <&mcu_adc0_pins_default>;
   pinctrl-names = "default";
   status = "okay";
   adc {
      ti,adc-channels = <0 1 2 3 4 5 6 7>;
   };
};

What could I do next to figure out the solution for this problem?

Thanks and regards

igmogo

  • Hi,

    The device is shown in my sysfs and I can read some data there:

    cat /sys/bus/iio/devices/iio:device0/in_voltage4_raw
    1397

    Is this expected value that you are reading?
    Which SDK version are you using and is this on TI EVM?

    - Keerthy

  • Hi Keerthy,

    We are using SDK.09.02.00.30 on a custom board.

    We are accessing the ADC from Linux running in the A72 processor (main domain).

    The adc is listed in the device tree file k3-j784s4-mcu-wakeup.dtsi

    And was activated via adding:

    &tscadc0 {
       pinctrl-0 = <&mcu_adc0_pins_default>;
       pinctrl-names = "default";
       status = "okay";
       adc {
          ti,adc-channels = <0 1 2 3 4 5 6 7>;
       };
    };

     

    Thanks and regards

    igmogo

  • Hi,

    cat /sys/bus/iio/devices/iio:device0/in_voltage4_raw

    Sorry If I was not clear earlier. I understand that the DT node was added. My question is if the above value of 1397 is the expected value?

    - Keerthy

  • Hi,

    sorry, I forgot to answer to that point. Yes, this value is the expected one.

    Regards,

    igmogo

  • Hi, it seems that the ADC is working properly but another software component was interfering when reading it. Sorry, this way my fault. I did not notice that the other software component was running. I guess we can close the thread.