This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Reading adc values

hi ,

iam working in begal bone black am335x ,adk7 with adc

given link

configure the kernel ,compilation and load the modules without any errors,

when i check   "cat  /sys/bus/iio/devices/iio/device0/in_voltage5_raw " command it will get error

no such file and directory. when i check it shows  /sys/bus/ .. the iio/device0 is missing

how i can solve this problem.

  • Hi,

    Please provide more details: how do you configure the ADC driver, what commands you use, etc.

  • hi sir,

    export PATH=/opt/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/:$PATH //preparing to build

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper //cleaning the previous build

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig //config the kernel [SDK config]

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs //Device tree compilation

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig //customizing the configuaration

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage //compiling the kernel

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules //build the kernel modules

    make ARCH=arm INSTALL_MOD_PATH=/tools/rootfs_dir/naveen/rootfs modules_install //Installing the Kernel
  • hello sir,

    after above commnds tft based boot image .
    iam worked on sdk7 .

    error :

    root@am335x-evm:/# cat /sys/bus/iio/devices/iio\:device0/in_voltage4_raw
    cat: can't open '/sys/bus/iio/devices/iio:device0/in_voltage4_raw': No such file or directory

    Thanks & Regards,
    Naven.
  • Hi ,

    If you compile ADC driver as module, when kernel starts on your board you have to type command:
    insmod <patch>name.ko parameters
    or
    modprobe <patch>name.ko parameters

    You can compile this module as part of kernel and then this insmod/modprobe is not needed.

    BR
    Ivan
  • hi.

    insmod: error inserting 'ti_am335x_adc.ko': -1 Invalid module format.

    sudo modprobe ti_am335x_adc.ko
    FATAL: Module ti_am335x_adc.ko not found.
  • Hi ,

    Are you sure that module is available. You also have to type and patch to module. To see which modules are loaded you can type "lsmod" to see all active modules. Please try to compile this module as part of the kernel. In this case you not needed to loaded it. You can use directly.

    BR
    Ivan