In my project i want very fast ADC reading method for my distance sensor's Analog value readings so i read about mmap and tried to implement it and yeah it was quiet easy for GPIO controlling but i could not find some good resource for ADC so tried to look up on the web for already written codes and i found this one very promising : https://github.com/alban-rochel/pixbox-controls/blob/master/service/gpio_mmap.cpp
i run the code and found out that the code is running without any errors and i m getting some analog value for my pin AIN0 but when i cross checked it with the value in the sysfs file "/sys/bus/iio/devices/iio:device0/in_voltage0_raw" the observation were very different. When i connected the pin to ground the value from this code was as always kind of some random number and value in the sysfs file was correct as it was 0. Things i tried: 1) I thought that FIFO0DATA register may be giving out value of other pin so i enabled the Step_ID_tag in CTRL register(0x44E0_D040) of ADC_TSC and checked the ID of pin before taking the 12 bit data from register, result was i have enabled only StepConfig1 register out of all 16 but FIFO0DATA register is also giving out values for other Config pins also and the value of stepConfig is also not correct. Plz help me by pointing out some error in the code or suggest some other resource. Thanks in advance -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/16d8de2c-502c-4f38-b4be-3bd7ce874552%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
