notro / fbtft

Linux Framebuffer drivers for small TFT LCD display modules. Development has moved to https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
1.86k stars 494 forks source link

flashing screen #54

Closed jfs10 closed 10 years ago

jfs10 commented 10 years ago

I have the old adafruit 2.2 display. I believe it is working. I have all the right things in the logs. When I run some of the examples to test the screen, the screen just flashes. Normally it is dark, but when I run a test it flashes white. I never see anything drawn to the screen. I don't see any errors, and in fact the fbtest program says that it passed everything. Any ideas?

notro commented 10 years ago

You can try and lower the speed:

modprobe fbtft_device name=adafruit22 speed=16000000

This is the expected sequence of events: Before driver loading, the backlight should be on and the display white. During driver loading, the backlight should be turned off, then on, and the display should be black.

jfs10 commented 10 years ago

I will give changing the speed a try.

The sequence you have described is what I see.

Attempts to control the backlight myself have failed. I have tried the following commands without success: echo "0" > /sys/class/backlight/fb_hx8340bn/bl_power echo "1" > /sys/class/backlight/fb_hx8340bn/bl_power

Here is the results of executing dmesg after adding speed=16000000 to /etc/modules and rebooting.

[ 5.203149] bcm2708_spi bcm2708_spi.0: DMA channel 0 at address 0xf2007000 with irq 16 [ 5.348226] usbcore: registered new interface driver snd-usb-audio [ 5.369606] bcm2708_spi bcm2708_spi.0: DMA channel 4 at address 0xf2007400 with irq 20 [ 5.475429] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80) [ 5.559049] bcm2708_spi bcm2708_spi.0: SPI Controller running in dma mode [ 5.688665] Registered led device: led0 [ 7.404060] usbcore: registered new interface driver rtl8192cu [ 11.946330] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 12.497967] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 13.261396] fbtft_device: Deleting spi0.0 [ 13.389459] fb_hx8340bn spi0.0: setup: invalid bits_per_word 9 (must be 8) [ 13.408414] fb_hx8340bn spi0.0: 9-bit SPI not available, emulating using 8-bit. [ 14.214369] graphics fb1: fb_hx8340bn frame buffer, 176x220, 75 KiB video memory, 16 KiB buffer memory, fps=20, spi0.0 at 16 MHz

I am a work, so I can tell if adding that line made a difference. I will run the fbtest program when I get home.

thanks

On Sun, Dec 1, 2013 at 11:53 AM, notro notifications@github.com wrote:

You can try and lower the speed:

modprobe fbtft_device name=adafruit22 speed=16000000

This is the expected sequence of events: Before driver loading, the backlight should be on and the display white. During driver loading, the backlight should be turned off, then on, and the display should be black.

— Reply to this email directly or view it on GitHubhttps://github.com/notro/fbtft/issues/54#issuecomment-29577369 .

jfs10 commented 10 years ago

I tired last night, without success. It just flashed. It does not appear that anything is drawn to the screen.

On Mon, Dec 2, 2013 at 7:47 AM, jonathan swaby jfswaby@gmail.com wrote:

I will give changing the speed a try.

The sequence you have described is what I see.

Attempts to control the backlight myself have failed. I have tried the following commands without success: echo "0" > /sys/class/backlight/fb_hx8340bn/bl_power echo "1" > /sys/class/backlight/fb_hx8340bn/bl_power

Here is the results of executing dmesg after adding speed=16000000 to /etc/modules and rebooting.

[ 5.203149] bcm2708_spi bcm2708_spi.0: DMA channel 0 at address 0xf2007000 with irq 16 [ 5.348226] usbcore: registered new interface driver snd-usb-audio [ 5.369606] bcm2708_spi bcm2708_spi.0: DMA channel 4 at address 0xf2007400 with irq 20 [ 5.475429] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80) [ 5.559049] bcm2708_spi bcm2708_spi.0: SPI Controller running in dma mode [ 5.688665] Registered led device: led0 [ 7.404060] usbcore: registered new interface driver rtl8192cu [ 11.946330] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 12.497967] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 13.261396] fbtft_device: Deleting spi0.0 [ 13.389459] fb_hx8340bn spi0.0: setup: invalid bits_per_word 9 (must be 8) [ 13.408414] fb_hx8340bn spi0.0: 9-bit SPI not available, emulating using 8-bit. [ 14.214369] graphics fb1: fb_hx8340bn frame buffer, 176x220, 75 KiB video memory, 16 KiB buffer memory, fps=20, spi0.0 at 16 MHz

I am a work, so I can tell if adding that line made a difference. I will run the fbtest program when I get home.

thanks

On Sun, Dec 1, 2013 at 11:53 AM, notro notifications@github.com wrote:

You can try and lower the speed:

modprobe fbtft_device name=adafruit22 speed=16000000

This is the expected sequence of events: Before driver loading, the backlight should be on and the display white. During driver loading, the backlight should be turned off, then on, and the display should be black.

— Reply to this email directly or view it on GitHubhttps://github.com/notro/fbtft/issues/54#issuecomment-29577369 .

notro commented 10 years ago

I just tried my display with the latest kernel to make sure it still works. I also tested the backlight control. To be sure: you have RST wired to GPIO25 (P1-22) and BL to GPIO23 (P1-16)? And you get a black display (not white) with backlight ON when to load the device/driver?

jfs10 commented 10 years ago

It was indeed my connections. GPIO25 not pin 25. I checked the wiring several times. If you had left off the P1-22, I think I would have still missed it.

Everything is working correctly now. Thank you for your patience.

Thanks

On Thu, Dec 5, 2013 at 1:53 PM, notro notifications@github.com wrote:

I just tried my display with the latest kernel to make sure it still works. I also tested the backlight control. To be sure: you have RST wired to GPIO25 (P1-22) and BL to GPIO23 (P1-16)? And you get a black display (not white) with backlight ON when to load the device/driver?

— Reply to this email directly or view it on GitHubhttps://github.com/notro/fbtft/issues/54#issuecomment-29925776 .