I'm using a waveshare Spotpear 3.2" touchscreen.
Screen works fine, but touch does not.
I'm currently designing a light and sound show for a local museum
(full detail here: viewtopic.php?f=41&t=116208)
I've attempted to provide as much useful information as I can to help solve the issue.
I have reseated the ribbon connector on the back, and checked for miss-wired pins on my crossover cable.
I also tested directly connected to the PI without the ribbon.
Raspberry Pi B+
Raspbian 4.0.7+
DS3231 RTC on I2C 1
3 way multiplexer board
breakout board
4 channel relay card
Excel sheet with full pinout:
evtest output shows the device as an ADS7846 Touchscreen
supplied info says its an XPT2046
evtest output:
Code: Select all
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0: Smart Smart Wireless Device
/dev/input/event1: Smart Smart Wireless Device
/dev/input/event2: Smart Smart Wireless Device
/dev/input/event3: ADS7846 Touchscreen
Select the device event number [0-3]:
I checked that the pendown GPIO is correct, and that SPI and I2C are enabled.
contents of /etc/modules:
Code: Select all
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
snd-bcm2835
fbtft_device name=waveshare32b rotate=270 gpios=dc:22,reset:27 speed=48000000
waveshare32b width=240 height=320 buswidth=8 init=-1,0xCB,0x39,0x2C,0x00,0x34,0x02,-1,0xCF,0x00,0XC1,0X30,-1,0xE8,0x85,0x00,0x78,-1,0xEA,0x00,0x00,-1,0xED,0x64,$
ads7846_device model=7846 cs=1 gpio_pendown=17 speed=1000000 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
Finally my dmesg output:
Code: Select all
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.0.7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #802 PREEMPT Wed Jul 8 17:35:23 BST 2015
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine model: Raspberry Pi Model B Plus Rev 1.2
[ 0.000000] cma: Reserved 8 MiB at 0x1b800000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] On node 0 totalpages: 114688
[ 0.000000] free_area_init_node: node 0, pgdat c08732bc, node_mem_map db403000
[ 0.000000] Normal zone: 1008 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 114688 pages, LIFO batch:31
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 113680
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x10 bcm2708.serial=0x9c67cd80 smsc95xx.macaddr=B8:27:EB:67:CD:80 bcm2708_fb.fbswap=1 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbtft_device.custom fbtft_device.name=waveshare32b fbtft_device.gpios=dc:22,reset:27 fbtft_device.bgr=1 fbtft_device.speed=48000000 fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo dma.dmachans=0x7f35 console=tty1 consoleblank=0 fbtft_device.fps=50 fbtft_device.rotate=0
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 436608K/458752K available (6063K kernel code, 333K rwdata, 1908K rodata, 348K init, 720K bss, 13952K reserved, 8192K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xdc800000 - 0xff000000 ( 552 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xdc000000 ( 448 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc07d0fcc (7972 kB)
[ 0.000000] .init : 0xc07d1000 - 0xc0828000 ( 348 kB)
[ 0.000000] .data : 0xc0828000 - 0xc087b674 ( 334 kB)
[ 0.000000] .bss : 0xc087b674 - 0xc092f778 ( 721 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Additional per-CPU info printed with stalls.
[ 0.000000] NR_IRQS:522
[ 0.000025] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483648000ns
[ 0.000076] Switching to timer-based delay loop, resolution 1000ns
[ 0.000357] Console: colour dummy device 80x30
[ 0.001860] console [tty1] enabled
[ 0.001924] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[ 0.002023] pid_max: default: 32768 minimum: 301
[ 0.002389] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.002469] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.003550] Initializing cgroup subsys blkio
[ 0.003650] Initializing cgroup subsys memory
[ 0.003726] Initializing cgroup subsys devices
[ 0.003795] Initializing cgroup subsys freezer
[ 0.003861] Initializing cgroup subsys net_cls
[ 0.003996] CPU: Testing write buffer coherency: ok
[ 0.004126] ftrace: allocating 19591 entries in 58 pages
[ 0.110665] Setting up static identity map for 0x57d9d8 - 0x57da10
[ 0.113303] devtmpfs: initialized
[ 0.120878] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[ 0.123024] pinctrl core: initialized pinctrl subsystem
[ 0.127638] NET: Registered protocol family 16
[ 0.133728] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[ 0.135748] bcm2708.uart_clock = 3000000
[ 0.140713] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[ 0.140808] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.141006] Serial: AMBA PL011 UART driver
[ 0.141332] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev2
[ 0.533735] console [ttyAMA0] enabled
[ 0.538401] bcm2708_vcio 2000b880.mailbox: mailbox at f200b880
[ 0.606901] bcm2708-dmaengine 20007000.dma: DMA legacy API manager at f2007000, dmachans=0x7f35
[ 0.616460] bcm2708-dmaengine 20007000.dma: Load BCM2835 DMA engine driver
[ 0.623402] bcm2708-dmaengine 20007000.dma: dma_debug:0
[ 0.628882] bcm_power: Broadcom power driver
[ 0.633208] bcm_power_open() -> 0
[ 0.636552] bcm_power_request(0, 8)
[ 0.665798] bcm_mailbox_read -> 00000080, 0
[ 0.670029] bcm_power_request -> 0
[ 0.674282] SCSI subsystem initialized
[ 0.678432] usbcore: registered new interface driver usbfs
[ 0.684197] usbcore: registered new interface driver hub
[ 0.689727] usbcore: registered new device driver usb
[ 0.697535] Switched to clocksource stc
[ 0.729460] FS-Cache: Loaded
[ 0.732807] CacheFiles: Loaded
[ 0.752353] NET: Registered protocol family 2
[ 0.758355] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.765559] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.772360] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.778906] TCP: reno registered
[ 0.782193] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.788141] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.794815] NET: Registered protocol family 1
[ 0.799920] RPC: Registered named UNIX socket transport module.
[ 0.805914] RPC: Registered udp transport module.
[ 0.810777] RPC: Registered tcp transport module.
[ 0.815528] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.823757] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
[ 0.832989] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.855484] VFS: Disk quotas dquot_6.5.2
[ 0.860042] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.869796] FS-Cache: Netfs 'nfs' registered for caching
[ 0.876851] NFS: Registering the id_resolver key type
[ 0.882204] Key type id_resolver registered
[ 0.886436] Key type id_legacy registered
[ 0.894265] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.902330] io scheduler noop registered
[ 0.906337] io scheduler deadline registered (default)
[ 0.912108] io scheduler cfq registered
[ 0.918711] BCM2708FB: allocated DMA memory 5bc00000
[ 0.923812] BCM2708FB: allocated DMA channel 0 @ f2007000
[ 0.934425] Console: switching to colour frame buffer device 82x26
[ 0.946412] Serial: 8250/16550 driver, 0 ports, IRQ sharing disabled
[ 0.955476] uart-pl011 20201000.uart: no DMA platform data
[ 0.964483] vc-cma: Videocore CMA driver
[ 0.970676] vc-cma: vc_cma_base = 0x00000000
[ 0.977408] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
[ 0.984898] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
[ 0.992771] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[ 1.024737] brd: module loaded
[ 1.039992] loop: module loaded
[ 1.046282] vchiq: vchiq_init_state: slot_zero = 0xdbc80000, is_master = 0
[ 1.056750] Loading iSCSI transport class v2.0-870.
[ 1.065354] usbcore: registered new interface driver smsc95xx
[ 1.073418] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 1.281488] Core Release: 2.80a
[ 1.286609] Setting default values for core params
[ 1.293459] Finished setting default values for core params
[ 1.501326] Using Buffer DMA mode
[ 1.506609] Periodic Transfer Interrupt Enhancement - disabled
[ 1.514391] Multiprocessor Interrupt Enhancement - disabled
[ 1.521951] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 1.528377] Dedicated Tx FIFOs mode
[ 1.534295] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xdbc14000 dma = 0x5bc14000 len=9024
[ 1.548228] FIQ FSM acceleration enabled for :
[ 1.548228] Non-periodic Split Transactions
[ 1.548228] Periodic Split Transactions
[ 1.548228] High-Speed Isochronous Endpoints
[ 1.572667] dwc_otg: Microframe scheduler enabled
[ 1.572787] WARN::hcd_init_fiq:412: FIQ on core 0 at 0xc0416e04
[ 1.580708] WARN::hcd_init_fiq:413: FIQ ASM at 0xc04170dc length 36
[ 1.588974] WARN::hcd_init_fiq:438: MPHI regs_base at 0xdc896000
[ 1.597112] dwc_otg 20980000.usb: DWC OTG Controller
[ 1.604219] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1
[ 1.613665] dwc_otg 20980000.usb: irq 32, io mem 0x00000000
[ 1.621352] Init: Port Power? op_state=1
[ 1.627291] Init: Power Port (0)
[ 1.632898] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.641801] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.651104] usb usb1: Product: DWC OTG Controller
[ 1.657850] usb usb1: Manufacturer: Linux 4.0.7+ dwc_otg_hcd
[ 1.665492] usb usb1: SerialNumber: 20980000.usb
[ 1.673255] hub 1-0:1.0: USB hub found
[ 1.679260] hub 1-0:1.0: 1 port detected
[ 1.685778] dwc_otg: FIQ enabled
[ 1.685803] dwc_otg: NAK holdoff enabled
[ 1.685818] dwc_otg: FIQ split-transaction FSM enabled
[ 1.685908] Module dwc_common_port init
[ 1.686477] usbcore: registered new interface driver usb-storage
[ 1.695112] mousedev: PS/2 mouse device common for all mice
[ 1.704120] bcm2835-cpufreq: min=700000 max=700000
[ 1.711442] Driver 'mmcblk' needs updating - please use bus_type methods
[ 1.720448] sdhci: Secure Digital Host Controller Interface driver
[ 1.728752] sdhci: Copyright(c) Pierre Ossman
[ 1.735650] mmc-bcm2835 20300000.mmc: mmc_debug:0 mmc_debug2:0
[ 1.743543] mmc-bcm2835 20300000.mmc: DMA channels allocated
[ 1.787976] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.796323] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.807020] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.820258] usbcore: registered new interface driver usbhid
[ 1.828047] usbhid: USB HID core driver
[ 1.837499] TCP: cubic registered
[ 1.844015] Initializing XFRM netlink socket
[ 1.851516] NET: Registered protocol family 17
[ 1.858329] Key type dns_resolver registered
[ 1.870408] registered taskstats version 1
[ 1.876799] vc-sm: Videocore shared memory driver
[ 1.883777] Indeed it is in host mode hprt0 = 00021501
[ 1.891061] [vc_sm_connected_init]: start
[ 1.903274] [vc_sm_connected_init]: end - returning 0
[ 1.910471] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.939348] Waiting for root device /dev/mmcblk0p2...
[ 1.948752] mmc0: new high speed SDHC card at address 0001
[ 1.967700] mmcblk0: mmc0:0001 AS 14.8 GiB
[ 1.979099] mmcblk0: p1 p2
[ 2.066464] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.079033] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 2.089770] devtmpfs: mounted
[ 2.096028] Freeing unused kernel memory: 348K (c07d1000 - c0828000)
[ 2.117868] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 2.126771] Indeed it is in host mode hprt0 = 00001101
[ 2.338212] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[ 2.347212] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.358438] hub 1-1:1.0: USB hub found
[ 2.364651] hub 1-1:1.0: 5 ports detected
[ 2.647921] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 2.758314] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 2.772909] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.791470] smsc95xx v1.0.4
[ 2.858036] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:67:cd:80
[ 3.127878] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[ 3.248577] usb 1-1.2: New USB device found, idVendor=25a7, idProduct=0701
[ 3.267758] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3.287855] usb 1-1.2: Product: Smart Wireless Device
[ 3.295362] usb 1-1.2: Manufacturer: Smart
[ 3.326901] input: Smart Smart Wireless Device as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:25A7:0701.0001/input/input0
[ 3.418248] hid-generic 0003:25A7:0701.0001: input,hidraw0: USB HID v1.01 Keyboard [Smart Smart Wireless Device] on usb-20980000.usb-1.2/input0
[ 3.466603] input: Smart Smart Wireless Device as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:25A7:0701.0002/input/input1
[ 3.508462] hid-generic 0003:25A7:0701.0002: input,hidraw1: USB HID v1.01 Mouse [Smart Smart Wireless Device] on usb-20980000.usb-1.2/input1
[ 3.565906] input: Smart Smart Wireless Device as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.2/1-1.2:1.2/0003:25A7:0701.0003/input/input2
[ 3.658653] hid-generic 0003:25A7:0701.0003: input,hiddev0,hidraw2: USB HID v1.01 Device [Smart Smart Wireless Device] on usb-20980000.usb-1.2/input2
[ 3.787911] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[ 3.909446] usb 1-1.5: New USB device found, idVendor=148f, idProduct=7601
[ 3.926892] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3.947987] usb 1-1.5: Product: 802.11 n WLAN
[ 3.955155] usb 1-1.5: Manufacturer: MediaTek
[ 3.966287] usb 1-1.5: SerialNumber: 1.0
[ 4.160129] udevd[161]: starting version 175
[ 5.899952] spi spi0.1: setting up native-CS1 as GPIO 7
[ 5.937448] random: nonblocking pool is initialized
[ 5.987831] ads7846 spi0.1: touchscreen, irq 411
[ 6.105711] input: ADS7846 Touchscreen as /devices/platform/soc/20204000.spi/spi_master/spi0/spi0.1/input/input3
[ 6.528849] bcm2708_i2c 20804000.i2c: BSC1 Controller at 0x20804000 (irq 79) (baudrate 100000)
[ 7.498167] usbcore: registered new interface driver rt2870
[ 8.619853] usb 1-1.5 wlan0: renamed from ra0
[ 11.838730] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 12.414925] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 13.554262] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[ 13.595046] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[ 13.629609] fbtft_device: SPI devices registered:
[ 13.636917] fbtft_device: ads7846 spi0.1 500kHz 8 bits mode=0x00
[ 13.649623] fbtft_device: 'fb' Platform devices registered:
[ 13.658957] fbtft_device: soc:fb id=-1 pdata? no
[ 13.672470] spi spi0.0: setting up native-CS0 as GPIO 8
[ 13.685097] fbtft_device: GPIOS used by 'waveshare32b':
[ 13.707741] fbtft_device: 'dc' = GPIO22
[ 13.714099] fbtft_device: 'reset' = GPIO27
[ 13.727729] fbtft_device: SPI devices registered:
[ 13.735076] fb_ili9340: module is from the staging directory, the quality is unknown, you have been warned.
[ 13.749401] fbtft_device: ads7846 spi0.1 500kHz 8 bits mode=0x00
[ 13.758366] fbtft_device: fb_ili9340 spi0.0 48000kHz 8 bits mode=0x00
[ 14.675687] graphics fb1: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=50, spi0.0 at 48 MHz
[ 26.143772] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 35.944793] cfg80211: Calling CRDA to update world regulatory domain
[ 39.675839] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68
[ 39.833050] rtc-ds1307 1-0068: rtc core: registered ds1307 as rtc0
[ 39.833126] rtc-ds1307 1-0068: 56 bytes nvram
[ 44.678491] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:2134012k SSFS