boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Issues with Pi Cam and Pi Display? (solved)

Mon Sep 14, 2015 12:09 pm

While playing around with the new, official Raspberry Pi 7'' Display I discovered a compatibility issue with the Raspberry Pi (NoIR in my case) camera. First I thought there may be a problem with the software involved (Raspbian v4.1.6-v7+ #812 and RPi Cam Control Software v6.0.7) but after a complete new install I can reproduce the issue:

Hardware - Part I:
Raspberry Pi 2B
Raspberry Pi NoIR Camera Module, connected with the standard 15cm flat cable coming with the camera

Software - Part I:
Raspbian 3.18.11-v7+ #781

First Test:
raspistill -o test.jpg > OK
raspivid -o test.h264 > OK

> Camera OK

Software - Part II (Update/Upgrade - needed to run the display):
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
sudo reboot

> Raspbian 4.1.6-v7+ #812

Second Test:
raspistill -o test.jpg > OK
raspivid -o test.h264 > OK

> Camera OK

Software - Part III ( RPi Cam Control Software v6.0.7):
git clone https://github.com/silvanmelchior/RPi_Ca...erface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh
./RPi_Cam_Web_Interface_Installer.sh install
sudo reboot

> Raspbian 4.1.6-v7+ #812

Third Test:
raspistill -o test.jpg > OK
raspivid -o test.h264 > OK

> Camera OK

cd RPi_Cam_Web_Interface
./RPi_Cam_Web_Interface_Installer.sh install
Start RPi Cam

RPi Cam Web Interface (RPi Cam Control v6.0.7) called in a browser > OK
record image > OK
record video > OK

Hardware - Part II:
Raspberry Pi Display connected, powered through GPIO pins

Fourth Test:
raspistill -o test.jpg > camera starts up and all I get is a freeze frame, the LED on the camera board stays on. The only way out is a Ctrl+c to leave raspistill and a reboot!
raspivid -o test.h264 > camera starts up and again all I get is a freeze frame, the LED on the camera board stays on. The only way out is a Ctrl+c to leave raspivid and a reboot!

cd RPi_Cam_Web_Interface
./RPi_Cam_Web_Interface_Installer.sh install
Start RPi Cam

RPi Cam Web Interface (RPi Cam Control v6.0.7) called in a browser > camera starts up and again there is the freeze frame. The only way out is a reboot!

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8503
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 12:26 pm

Can you post the output from

Code: Select all

sudo raspi-gpio get
after you've installed the display but before you've run the camera again please?
I haven't seen schematics of how the touchscreen has been hooked up, but believe it is accessed over I2C, and that has the potential to interfere with the camera. Otherwise it needs to be up to Pi Towers to double check things there - I don't have a display (yet).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 12:41 pm

I would love to post what I get but all I get is:

Code: Select all

sudo: raspi-gpio: command not found 

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8503
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 12:42 pm

Code: Select all

sudo apt-get update
sudo apt-get install raspi-gpio
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 12:52 pm

Thanks - this is what I get:

Code: Select all

[email protected] ~ $ sudo raspi-gpio get
BANK0 (GPIO 0 to 27):
  GPIO 00: level=1 fsel=0 alt=  func=INPUT
  GPIO 01: level=1 fsel=0 alt=  func=INPUT
  GPIO 02: level=1 fsel=0 alt=  func=INPUT
  GPIO 03: level=1 fsel=0 alt=  func=INPUT
  GPIO 04: level=1 fsel=0 alt=  func=INPUT
  GPIO 05: level=1 fsel=0 alt=  func=INPUT
  GPIO 06: level=1 fsel=0 alt=  func=INPUT
  GPIO 07: level=1 fsel=0 alt=  func=INPUT
  GPIO 08: level=1 fsel=0 alt=  func=INPUT
  GPIO 09: level=0 fsel=0 alt=  func=INPUT
  GPIO 10: level=0 fsel=0 alt=  func=INPUT
  GPIO 11: level=0 fsel=0 alt=  func=INPUT
  GPIO 12: level=0 fsel=0 alt=  func=INPUT
  GPIO 13: level=0 fsel=0 alt=  func=INPUT
  GPIO 14: level=1 fsel=4 alt=0 func=TXD0
  GPIO 15: level=1 fsel=4 alt=0 func=RXD0
  GPIO 16: level=0 fsel=0 alt=  func=INPUT
  GPIO 17: level=0 fsel=0 alt=  func=INPUT
  GPIO 18: level=0 fsel=0 alt=  func=INPUT
  GPIO 19: level=0 fsel=0 alt=  func=INPUT
  GPIO 20: level=0 fsel=0 alt=  func=INPUT
  GPIO 21: level=0 fsel=0 alt=  func=INPUT
  GPIO 22: level=0 fsel=0 alt=  func=INPUT
  GPIO 23: level=0 fsel=0 alt=  func=INPUT
  GPIO 24: level=0 fsel=0 alt=  func=INPUT
  GPIO 25: level=0 fsel=0 alt=  func=INPUT
  GPIO 26: level=0 fsel=0 alt=  func=INPUT
  GPIO 27: level=0 fsel=0 alt=  func=INPUT
BANK1 (GPIO 28 to 45):
  GPIO 28: level=1 fsel=0 alt=  func=INPUT
  GPIO 29: level=1 fsel=0 alt=  func=INPUT
  GPIO 30: level=0 fsel=0 alt=  func=INPUT
  GPIO 31: level=1 fsel=1 alt=  func=OUTPUT
  GPIO 32: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 33: level=0 fsel=0 alt=  func=INPUT
  GPIO 34: level=1 fsel=0 alt=  func=INPUT
  GPIO 35: level=1 fsel=0 alt=  func=INPUT
  GPIO 36: level=1 fsel=0 alt=  func=INPUT
  GPIO 37: level=0 fsel=0 alt=  func=INPUT
  GPIO 38: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 39: level=0 fsel=0 alt=  func=INPUT
  GPIO 40: level=0 fsel=4 alt=0 func=PWM0
  GPIO 41: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 42: level=1 fsel=0 alt=  func=INPUT
  GPIO 43: level=1 fsel=0 alt=  func=INPUT
  GPIO 44: level=0 fsel=4 alt=0 func=GPCLK1
  GPIO 45: level=0 fsel=4 alt=0 func=PWM1
BANK2 (GPIO 46 to 53):
  GPIO 46: level=1 fsel=0 alt=  func=INPUT
  GPIO 47: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 48: level=1 fsel=7 alt=3 func=SD1_CLK
  GPIO 49: level=1 fsel=7 alt=3 func=SD1_CMD
  GPIO 50: level=1 fsel=7 alt=3 func=SD1_DAT0
  GPIO 51: level=1 fsel=7 alt=3 func=SD1_DAT1
  GPIO 52: level=1 fsel=7 alt=3 func=SD1_DAT2
  GPIO 53: level=1 fsel=7 alt=3 func=SD1_DAT3
The NoIR camera is enabled in the raspi-config but not started in RPi Cam Interface.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8503
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 1:12 pm

Blows my idea out of the water - nothing abnormal/nasty there.

How beefy is your power supply? Display, camera, and Pi is a fair load. Does the power led stay on solidly when you fire up the camera? If the LED goes off, or you get a rainbow symbol shown in the top right corner of the screen, then the power supply voltage is drooping too far.

When you say "Raspberry Pi Display connected, powered through GPIO pins", I assume you mean that the power supply is connected to the display, and then looped through to the Pi via GPIO pins, as is in the documentation? I don't believe passing power into the Pi, and then looping on to the display via GPIOs is an approved method of powering.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 1:39 pm

I think my power supply is fine - it is a 5V/2A version and the power LED on the Pi board stays solidly (with no rainbow symbol on the screen) when powering the Pi, the Pi display and the Pi NoIR camera. I've also tried another power supply yesterday as I have a Pi USV+ flying around which is capable of input voltages from 5 to 24V and I tried it with a 12V/6A power supply connected to the Pi USV+ powering all boards.

In my case the power supply is connected to the Pi and the Pi display is connected through GPIO from the Pi. Within the display documentation there is no hint that it is recommended to connect the display first and then power the Pi from the display when using the GPIO connection. If this is recommended, it would mean that you can't use boards like the Pi USV+ together with the display...

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8503
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 1:54 pm

I haven't got a display (yet), but was working from the blog post - https://www.raspberrypi.org/blog/the-ea ... i-display/
Powering the display

There are three options for powering the display:

1) Separate power supply
Just add a separate uUSB power supply rated for at least 500mA, and plug into the display board where it says “PWR IN”.

2) USB link
Attach an official 2A Raspberry Pi power supply to the display board “PWR IN” connector, then attach a standard uUSB connector from the “PWR OUT” connector to the Raspberry Pi.

3) GPIO jumpers
Attach two of the supplied jumpers to connect 5V and GND from the Pi.
I suspect I read the USB method of linking from the display to the Pi, and applied the same logic to the GPIO linking mode. Rereading it, your method does appear to be legit. I was thinking of all the fun with poly fuses from before generally causing fun and games and hoping that we won't get a reprise.

Just for the sake of tracking down the problem, it might be worth trying either of the other two methods of powering the display.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 2:27 pm

Just tried the other way round - connected the 5V/2A power supply to the display and supplying the Pi with a USB cable. NOW I get a flashing power LED and the rainbow symbol on the top right corner of the screen. The camera freezes with raspistill/raspivid, camera LED stays on. You need to reboot.

I've also tried to connect the Pi through GPIO wires with the same result. Last test should be using two power supplies - I am about to find another power supply in my gear...

boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 2:42 pm

So this is the killer feature of the combination. If you want to use the Raspberry Pi display and the Raspberry Pi camera you will need two power supplies to let the magic happen. It is a power supply issue!

If there is somebody out there following this thread who has got an 'official' Raspberry Pi power supply plus display/camera - would you please check if the pi 2b/display/camera combination is working with ONE 'official' Raspberry Pi power supply?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8503
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 2:47 pm

That's me out of hardware related ideas.
I'd have expected those at Pi Towers to have checked out the display and camera together, but maybe not. I'll ping them an email.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8503
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 3:04 pm

Bad news for now - confirmed by Pi Towers that there is a software issue with the touchscreen driver that can hang the GPU.
They're on it and hoping to have a fix soon.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

billintad
Posts: 45
Joined: Tue Jul 28, 2015 10:21 pm

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 3:20 pm

I have a display, a RPi 2 and a camera. There is a keyboard attached and a wifi usb dongle. Using a standard RPi power supply, the camera will take pictures with raspistill and raspivid without the low voltage icon appearing.

I have encountered this GPU freeze you mentioned in the last post. I can't replicate the problem though.

User avatar
PeterO
Posts: 5751
Joined: Sun Jul 22, 2012 4:14 pm

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 3:45 pm

6by9 wrote:That's me out of hardware related ideas.
I'd have expected those at Pi Towers to have checked out the display and camera together, but maybe not. I'll ping them an email.
They didn't check GPU-FFT library and openGL ES at the same. I had to find out they didn't work the hard way :-) But when I told them it was sorted very quickly.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 4:03 pm

billintad wrote:I have a display, a RPi 2 and a camera. There is a keyboard attached and a wifi usb dongle. Using a standard RPi power supply, the camera will take pictures with raspistill and raspivid without the low voltage icon appearing.
This is exactly what I have - a Pi 2B, the Pi display, a Pi NoIR camera and a Logitech wireless keyboard together with an Edimax Wifi Dongle. Are you using only one power supply and is it 'official' one? How is your power wiring setup?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5478
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 7:39 pm

There is a touchscreen fix in the latest rpi-update. It fixes a hang we discovered (not specifically related to using the camera, but it would make it more likely to occur).
Hopefully it fixes the problem seen here. Please run rpi-update and report back.

User avatar
PeterO
Posts: 5751
Joined: Sun Jul 22, 2012 4:14 pm

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 7:55 pm

Trying it now ! :shock:
PeterO

OH DEAR !!!! Screen is now upside down ! It's almost impossible to read display now with it lying flat on the desk.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5478
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 7:57 pm

PeterO wrote: OH DEAR !!!! Screen is now upside down !
Actually it is correct now and was upside down before.
You get a better viewing angle from above than below which is normally what is desired.

Add lcd_rotate=2 to config.txt if you prefer the previous behaviour.

User avatar
PeterO
Posts: 5751
Joined: Sun Jul 22, 2012 4:14 pm

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 8:01 pm

You are going to annoy people who have put their displays into stands already !

Actually it's a better cable arrangement with the power sockets at the top than the bottom as well.

Testing touch screen stability now. X hasn't locked up yet :-)


PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
PeterO
Posts: 5751
Joined: Sun Jul 22, 2012 4:14 pm

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 8:06 pm

dom wrote: You get a better viewing angle from above than below which is normally what is desired.
I guess it depends if you are viewing it like you would a tablet (from below with it flat on the desk) or with it standing upright and viewing it from above. At least you can set it up either way. I did see a tweet from someone that said the mouse tracking didn't work if you rotate it 90 degreed (into portrait mode).

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 8:14 pm

Tried my display/camera problem without wifi dongle and wireless keyboard and it is fine after the update. I'll now get back to my original configuration with wifi dongle and wireless keyboard and report back.

boing
Posts: 32
Joined: Tue Oct 14, 2014 9:58 am

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 8:31 pm

It looks fine to me - I am back on Pi 2 with wifi dongle, wireless keyboard plus NoIR camera and display and everything works like charm. I did a final test with the RPi Cam Web Interface software which now works too - no freeze frame, just fine :)

The very last question from my point of view is (also posted this in the new display forum): Is there any reason why one should not power the touchscreen controller board/display through the Pi GPIO pins (with the power supply connected to the Pi)?

User avatar
PeterO
Posts: 5751
Joined: Sun Jul 22, 2012 4:14 pm

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 8:32 pm

PeterO wrote:You are going to annoy people who have put their displays into stands already !

Actually it's a better cable arrangement with the power sockets at the top than the bottom as well.
See what I mean !
viewtopic.php?f=108&t=120687
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5478
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 8:43 pm

PeterO wrote:I guess it depends if you are viewing it like you would a tablet (from below with it flat on the desk) or with it standing upright and viewing it from above. At least you can set it up either way. I did see a tweet from someone that said the mouse tracking didn't work if you rotate it 90 degreed (into portrait mode).
lcd_rotate just writes to the LCD registers which can horizontally and/or vertically flip the display, so that is "free". It also flips the touch coordinates to match.
However the lcd doesn't support 90 degree rortate and there is no cheap way of implementing that.

display_rotate is a more expensive fix, especially if 90 degree rotate is used. You won't be able to update the display at 60Hz when rotated (all composition needs to go through an off screen buffer, then back trough the transposer and out to display). So the LCD should be treated as natively landscape, and portrait use will be less efficient.

display_rotate isn't designed for the LCD, doesn't adjust touchscreen coordinates, and will also affect the HDMI display if you try to use both displays, so should be avoided if possible.

I think what the correct display orientation is will be something not everyone will agree on. However if you prefer the other orientation then lcd_rotate=2 is the solution.

User avatar
PeterO
Posts: 5751
Joined: Sun Jul 22, 2012 4:14 pm

Re: Issues with Pi Cam and Pi Display?

Mon Sep 14, 2015 9:04 pm

Thanks for the explanation Dom.
dom wrote:I think what the correct display orientation is will be something not everyone will agree on. However if you prefer the other orientation then lcd_rotate=2 is the solution.
Yes I agree, and its easy to switch it if you want to. I'm currently running mine "the original way up".

No touch screen lockups all evening so it would seem the fix is working. Hats of the the firmware guys for such a quick fix.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “Camera board”