From: Niclas Karlsson <niclas.karlsson-h3aQMNCITb4@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Getting alot of zero values from ads7846 using atmel_spi
Date: Tue, 08 Mar 2011 10:44:56 +0100 [thread overview]
Message-ID: <1299577496.13486.13.camel@SESTOWS194> (raw)
Hi,
I'm not sure this is the right mailinglist for my question, but I give
it a shot.
I'm working on a custom hardware running Linux kernel 2.6.32.3. The
hardware is based on the AT91SAM9263-ek evaluation board and have touch
screen attached to it. The touch screen controller is ads7846 and is
connected to SPI.
I'm in some trouble using the SPI (driver: atmel_spi).
ads7846 have two extra inputs that I want to use. The problem is that
when reading these inputs from sysfs I get a lot of zeroes when it
should read ( when no sensor is connected) ~3300 mV, e.g.
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
~# cat /sys/bus/spi/devices/spi0.1/in0_input
3299 <-- This one is correct.
~# cat /sys/bus/spi/devices/spi0.1/in0_input
0
I have measured the input and it's stable at 3.3V.
Do anyone know why I read so many zeroes?
I have made some printk in ads7846.c to trace the problem. It seemed to
read more correct values when I added the printks.
Thank you for the help,
Niclas
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
next reply other threads:[~2011-03-08 9:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-08 9:44 Niclas Karlsson [this message]
2011-03-10 14:41 ` Getting alot of zero values from ads7846 using atmel_spi David Lamparter
[not found] ` <20110310144145.GB4093601-sd4rSCkhOesKVZNVnti56SRbHCANfdcW@public.gmane.org>
2011-04-18 9:21 ` Niclas Karlsson
2011-04-19 20:40 ` Kenneth Heitke
[not found] ` <4DADF35B.2000600-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-04-20 14:34 ` Niclas Karlsson
2011-04-20 21:11 ` Kenneth Heitke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1299577496.13486.13.camel@SESTOWS194 \
--to=niclas.karlsson-h3aqmncitb4@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).