tusmueles
Posts: 6
Joined: Fri Jun 12, 2015 5:53 pm

Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Fri Jun 12, 2015 6:08 pm

This is my first post and sorry for my english ...
I can´t install the WaveShare SportPear 4" LCD en my Raspberry Pi 2 model B.
Display always WHITE. I have tried everything i see here and waveshare support but nothing new.
This is last boot log.
I can see in the log that there is a Ethernet problem ( but works becouse this is a putty session capture). I think that is not relationated with display issue ¿?
For me , everything about Display and touhcscreen is OK ....
I really bored with this and i don´t want to return the tft, but .... i dont knot what to ddo ..... Thanks .

This is the capture:

pi@raspberrypi ~ $ dmesg | tail
[ 9.041883] fbtft_device: SPI devices registered:
[ 9.048428] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[ 9.056663] fbtft_device: flexfb spi0.0 16000kHz 8 bits mode=0x00
[ 9.111687] ads7846_device: Deleting spi0.1
[ 9.139501] ads7846 spi0.1: touchscreen, irq 465
[ 9.148192] input: ADS7846 Touchscreen as /devices/soc/3f204000.spi/spi_master/spi0/spi0.1/input/input0
[ 13.514877] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 16.880280] cfg80211: Calling CRDA to update world regulatory domain
[ 17.447685] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:2134012k SSFS
[ 54.441843] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered.

Lumpi
Posts: 8
Joined: Tue Jun 02, 2015 1:28 pm

Re: Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Sat Jun 13, 2015 7:43 am

Hi,
I will try to help you. But I need more information.
What is your OS ? Raspberry Wheezy ?
Show me your etc/modules
Make a lsmod. Can You see ads7846_device ?
Or make a sudo modprobe ads_device
Show me your /boot/cmdline.txt
And show me your /boot/config.txt

I have a Wavwshare 3.2 and 3.5, both working fine

tusmueles
Posts: 6
Joined: Fri Jun 12, 2015 5:53 pm

Re: Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Sat Jun 13, 2015 12:02 pm

Thanks.


Version de Raspbian:
Debian Wheezy
Release date: 2015-05-05
Default login: pi / raspberry
Kernel version: 3.18


/etc/modules

# /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
i2c-bcm2708
i2c-dev
flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24
ads7846_device model=7846 cs=1 gpio_pendown=17 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




lsmod



Module Size Used by
cfg80211 395182 0
rfkill 16651 1 cfg80211
evdev 10014 2
joydev 8903 0
ads7846 10888 0
ads7846_device 3262 0
fbtft_device 27669 0
flexfb 12647 2
fbtft 28286 2 flexfb,fbtft_device
syscopyarea 2869 1 fbtft
sysfillrect 3305 1 fbtft
sysimgblt 1829 1 fbtft
fb_sys_fops 1141 1 fbtft
i2c_dev 6837 0
snd_bcm2835 18850 3
snd_pcm 76338 1 snd_bcm2835
snd_seq 56241 0
snd_seq_device 5632 1 snd_seq
snd_timer 17940 2 snd_pcm,snd_seq
snd 52233 11 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
sg 18215 0
8192cu 528469 0
spi_bcm2708 7690 0
i2c_bcm2708 4758 0
w1_gpio 3680 0
wire 27352 1 w1_gpio
cn 4636 1 wire
uio_pdrv_genirq 2958 0
uio 8115 1 uio_pdrv_genirq


sudo modprobe ads_device
FATAL: Module ads_device not found.



/boot/cmdline.txt


dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo


/boot/config.txt



# For more options and information see
# http://www.raspberrypi.org/documentatio ... fig-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
arm_freq=700

start_x=1
gpu_mem=128
core_freq=250
sdram_freq=400
over_voltage=0
dtparam=spi=on
dtparam=i2c_arm=on
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1


/usr/share/X11/xorg.conf.d/99-fbturbo.conf



# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
#
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.

Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"

Option "SwapbuffersWait" "true"
EndSection

Lumpi
Posts: 8
Joined: Tue Jun 02, 2015 1:28 pm

Re: Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Sat Jun 13, 2015 12:58 pm

Thank's for the information

I think you enable spi in raspi-config

1)/etc/modules
last line starts with ads7846_device, remove it or write a # in front of this line.
In the newer Kernel there is no more ads7846_device
In the line fbtft_device debug=3 rotate=90, you can change rotate=90 in rotate=0, you must test this entry.

2)/boot/cmdline.txt

Try the following line

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait fbtft_device.custom fbtft_devive name=flexfb fbtft_device.gpios=dc:24,reset:25 fbtft_device.bgr=1 fbtft_device.speed=16000000 fbcon=map:1 fbcon=font:ProFont10x20 logo.nologo dma.dmachans=0x7f35 console=tty1 consoleblank=0 fbtft_device.fps=50 fbtft_device.rotate=0

All in one line
Check in this line root=/dev/mmcblk0p6 in your cmdline.txt is standing root=/dev/mmcblk0p2

3) /boot/config.txt

Insert as last line:
dtoverlay=ads7846,speed=1000000,penirq=17,swapxy=1

This you need, because you have no more ads7846_device,

4) Calibration

You need a file 99-calibration.conf so you enter the following:

sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf
insert

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3961 205 213 3949"
EndSection

The line Option "Calibration" could differ with mine,
Install xinput_calibrator.

Hope it helps you a little.

Lumpi
Posts: 8
Joined: Tue Jun 02, 2015 1:28 pm

Re: Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Sat Jun 13, 2015 1:08 pm

Hi I made a mistake.

I see in your lsmod you have the module ads7846_device, so keep the line starts with ads7846_device in /etc/modules,
and skip point 3) /boot/config.txt

Sorry, my mistake

tusmueles
Posts: 6
Joined: Fri Jun 12, 2015 5:53 pm

Re: Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Sat Jun 13, 2015 2:54 pm

I did the changes but display continues in white.
I am starting to think that the display don´t work becouse in the dmeg log everything seems to be ok.

[ 7.598558] i2c /dev entries driver
[ 7.715079] fbtft_device: SPI devices registered:
[ 7.719923] fbtft_device: spidev spi0.0 500kHz 8 bits mode=0x00
[ 7.726376] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[ 7.732775] fbtft_device: 'fb' Platform devices registered:
[ 7.738473] fbtft_device: bcm2708_fb id=-1 pdata? no
[ 7.743945] fbtft_device: Deleting spi0.0
[ 7.749071] flexfb spi0.0: fbtft_request_gpios: 'reset' = GPIO25
[ 7.755293] flexfb spi0.0: fbtft_request_gpios: 'dc' = GPIO24
[ 7.761132] flexfb spi0.0: flexfb_verify_gpios_dc()
[ 7.766054] flexfb spi0.0: fbtft_init_display()
[ 7.770661] flexfb spi0.0: fbtft_reset()
[ 7.894658] flexfb spi0.0: init: write(0xB0) 0x00
[ 7.899646] flexfb spi0.0: init: write(0x11)
[ 7.904180] flexfb spi0.0: init: mdelay(250)
[ 8.158934] flexfb spi0.0: init: write(0x3A) 0x55
[ 8.163990] flexfb spi0.0: init: write(0xC2) 0x44
[ 8.168898] flexfb spi0.0: init: write(0xC5) 0x00 0x00 0x00 0x00
[ 8.175172] flexfb spi0.0: init: write(0xE0) 0x0F 0x1F 0x1C 0x0C 0x0F 0x08 0x48 0x98 0x37 0x0A 0x13 0x04 0x11 0x0D 0x00
[ 8.186268] flexfb spi0.0: init: write(0xE1) 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
[ 8.197363] flexfb spi0.0: init: write(0xE2) 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
[ 8.208449] flexfb spi0.0: init: write(0x36) 0x28
[ 8.213386] flexfb spi0.0: init: write(0x11)
[ 8.217811] flexfb spi0.0: init: write(0x29)
[ 8.389937] flexfb spi0.0: Display update: 1789 kB/s (167.637 ms), fps=0 (0.000 ms)
[ 8.397723] flexfb spi0.0: fbtft_register_backlight()
[ 8.402876] flexfb spi0.0: fbtft_register_backlight(): led pin not set, exiting.
[ 8.411466] Console: switching to colour frame buffer device 120x53
[ 8.421714] graphics fb1: flexfb frame buffer, 480x320, 300 KiB video memory, 4 KiB DMA buffer memory, fps=50, spi0.0 at 16 MHz
[ 8.433571] fbtft_device: GPIOS used by 'flexfb':
[ 8.438486] fbtft_device: 'reset' = GPIO25
[ 8.442977] fbtft_device: 'dc' = GPIO24
[ 8.447154] fbtft_device: SPI devices registered:
[ 8.452137] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[ 8.458630] fbtft_device: flexfb spi0.0 16000kHz 8 bits mode=0x00
[ 8.513301] ads7846_device: Deleting spi0.1
[ 8.539400] ads7846 spi0.1: touchscreen, irq 465
[ 8.545509] input: ADS7846 Touchscreen as /devices/soc/3f204000.spi/spi_master/spi0/spi0.1/input/input0
[ 13.195298] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 16.582612] cfg80211: Calling CRDA to update world regulatory domain
[ 17.276684] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:2134012k SSFS
[ 54.103276] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered.
[ 113.423966] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered.

Lumpi
Posts: 8
Joined: Tue Jun 02, 2015 1:28 pm

Re: Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Sat Jun 13, 2015 6:20 pm

mmh, this looks strange.

I googled a litle bit and find that you have to insert the line in /boot/config.txt
nevermind if you have ads7846_device or not..
Start sudo nano /boot/config.txt and insert at the end

dtoverlay=ads7846,speed=1000000,penirq=17,swapxy=1

I install on my raspberry pi 2 B, Raspberry, Wheezy with NOOBS_v1_4.1
and there is no more ads7846_device in the kernel.

tusmueles
Posts: 6
Joined: Fri Jun 12, 2015 5:53 pm

Re: Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Sat Jun 13, 2015 8:29 pm

I added but cotinues White.Thanks.

tusmueles
Posts: 6
Joined: Fri Jun 12, 2015 5:53 pm

Re: Wave Share SportPear Rpi LCD 4 inch big HEADACHE !

Tue Jun 16, 2015 12:30 pm

Hi,
Bad and good notices:
bad : Display was defective
good : i return it and buy another identical and everything ok.
thanks to Dumpy ....


Return to “Troubleshooting”