adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Raspberry Pi Camera Module Causes Reboot

Fri May 24, 2013 5:19 pm

I recently purchased two of the Raspberry Pi Camera modules and was super excited to try them out.

I have two Pi's. One has been running RasBMC solid for the past 7 months -- I even leave it on pretty much 24/7 for instant access to my media in the living room. It gets warm, but runs stably and has no issues. The second has pretty much been in the box while I planned some projects and waited for a few things like the camera module to become available.

I hooked up the camera module as required and powered up. I used the config from the Rasbian first boot to enable camera support. At first, I got very excited when executing raspivid seemed to work flawlessly and without any configuration.

4 out of 5 times when I execute raspivid, the preview loads, and it starts capturing, but the Pi hard resets within 10 seconds. And I have yet to record for more than 15 or 20 before the reboot.

I thought maybe power as that is the only relevant thing I can find via Google so I tested with a meter. During normal operations on the CLI, the voltage across TP1 and TP2 is 5.05v. During use it rarely fluctuates more than .02v. When I start raspivid, it drops to 4.95v. The adapter is 1.2A rated. From what I understand, it didn't drop below 4.75v and isn't the culprit.

I went on to test by swapping the SD card into my known good RasBMC Pi. The same exact behavior is exhibited. I also tried reseating all the connections including the one on the camera module itself (connecting the camera).

Can anyone help? It feels like a power issue, but my testing seems to say it isn't. I don't have any other adapters over 1A to test with (and finding one that looks like it will actually work seems difficult, but I am looking into getting one this weekend).

Lastly if it wasn't clear, I did all testing on both Pi's, with both cameras. The only thing I didn't change was the SD card (brand new high end SanDisk) and the PSU (works fine with RasBMC even playing 1080p video over the net).

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17562
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi Camera Module Causes Reboot

Fri May 24, 2013 5:54 pm

Hmm, feels like a power issue to me as well.

The camera takes a lot more power than H264 playback (>200mA vs < 50mA). The PSU seems to be the only possible culprit since its the only common denominator.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Re: Raspberry Pi Camera Module Causes Reboot

Fri May 24, 2013 7:09 pm

I ordered one from ModMiPi but it might take forever (4-15 business days and no expedite option --wtf). In the meantime, I'll be looking to try others I can find around.
https://www.modmypi.com/raspberry-pi-ac ... -supply-us

Is it possible to use two adapters in parallel to get more juice?

adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Re: Raspberry Pi Camera Module Causes Reboot

Fri May 24, 2013 7:53 pm

I'm borrowing an adapter from work for a Novatel MiFi device. Rated 1.05A and Novatel branded. Looks like it is the one on the list of "known good" adapters (http://elinux.org/RPi_VerifiedPeriphera ... r_Adapters)

I'll report back my findings some time after midnight tonight (EDT).

User avatar
dobra-dobra
Posts: 32
Joined: Wed Dec 26, 2012 2:04 pm
Location: Poland

Re: Raspberry Pi Camera Module Causes Reboot

Tue May 28, 2013 10:13 pm

My Pi model B have similar issues. It restarts just after I try to run raspistill or raspivid. Also, it restarts when I try to run Minecraft. I have tried many PSU's rated above 1A without any luck. Except these two cases it works normally. On my second Pi (model A) I use camera and run Minecraft without any problems.

adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 1:12 am

I tried the aforementioned Novatel and had no change in behavior. I also found a Belkin F4U020 powered USB 2.0 hub laying around and tried that (it has an adapter rated at 5v 1A). It also exhibited the same exact issue with reboots when using the camera.
dobra-dobra wrote:I have tried many PSU's rated above 1A without any luck. Except these two cases it works normally. On my second Pi (model A) I use camera and run Minecraft without any problems.
I have two model B's with the same issue, and two cameras. Similarly, the Pi's seem to work completely in all other respects. I'm not sure what my next step is here short of trying to swap at least one of each... Any suggestions?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17562
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 7:11 am

It's weird. You have two pi's and two modules, I presume you move them between devices for testing, and yet you get the same problem. But no-one else has that problem. That indicates either the installation of software or the power.

Have you tried a different USB cable?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
dobra-dobra
Posts: 32
Joined: Wed Dec 26, 2012 2:04 pm
Location: Poland

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 7:51 am

In my case it seems like the problem is related with shortage in power when GPU is in use. My model B Pi restarts just after trying to render some graphics. I tried to perform a stress test involving a lot of calculations for a long time and it passed it without problem (although I have no idea how proper test should look like). I also had some problems with wireless keyboard and mice set (no reaction for key pressed or repeated last key) while ethernet cable was connected, even if USB receiver was the only device in the USB port. As I said I have checked a lot of PSU's, and even bought "official" one from RS Components. After many experiments (also with other SD cards) I replaced F3 polyfuse with regular, 1A fuse, which resulted in increased voltage measured at the test points (now 4.98 in comparison to 4.85 before), but still reboot problem occurs. I'm lame in electronics, but I'm not afraid to screw up my Pi while trying to solve this issue, I just need an idea what to check next and hope that I learn something while trying.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17562
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 9:24 am

dobra-dobra wrote:In my case it seems like the problem is related with shortage in power when GPU is in use. My model B Pi restarts just after trying to render some graphics. I tried to perform a stress test involving a lot of calculations for a long time and it passed it without problem (although I have no idea how proper test should look like). I also had some problems with wireless keyboard and mice set (no reaction for key pressed or repeated last key) while ethernet cable was connected, even if USB receiver was the only device in the USB port. As I said I have checked a lot of PSU's, and even bought "official" one from RS Components. After many experiments (also with other SD cards) I replaced F3 polyfuse with regular, 1A fuse, which resulted in increased voltage measured at the test points (now 4.98 in comparison to 4.85 before), but still reboot problem occurs. I'm lame in electronics, but I'm not afraid to screw up my Pi while trying to solve this issue, I just need an idea what to check next and hope that I learn something while trying.
I'll pass on this details to someone who might know more than I do!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

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

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 10:01 am

dobra-dobra wrote:In my case it seems like the problem is related with shortage in power when GPU is in use. My model B Pi restarts just after trying to render some graphics. I tried to perform a stress test involving a lot of calculations for a long time and it passed it without problem (although I have no idea how proper test should look like). I also had some problems with wireless keyboard and mice set (no reaction for key pressed or repeated last key) while ethernet cable was connected, even if USB receiver was the only device in the USB port. As I said I have checked a lot of PSU's, and even bought "official" one from RS Components. After many experiments (also with other SD cards) I replaced F3 polyfuse with regular, 1A fuse, which resulted in increased voltage measured at the test points (now 4.98 in comparison to 4.85 before), but still reboot problem occurs. I'm lame in electronics, but I'm not afraid to screw up my Pi while trying to solve this issue, I just need an idea what to check next and hope that I learn something while trying.
Are you overclocked? It may be the current limit override kicking in and rebooting. You can disable it (but will set warranty bit).
http://elinux.org/RPi_config.txt

User avatar
dobra-dobra
Posts: 32
Joined: Wed Dec 26, 2012 2:04 pm
Location: Poland

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 10:10 am

No, I have never messed with overclocking. But I will try to disable this current protection and see what happens. There is also proper stability test on this site, I will try this as well. Thanks for response.

EDIT
I had only few minutes for testing, but after disabling current protection in ./boot/config.txt with code current_limit_override=0x5A000020 there was no reboot while I run raspistill, -vid or Minecraft. Later I will perform some more tests.

Thanks dom for the tip.

adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 3:31 pm

I have not overclocked. And I did take advantage of having two of everything. The problem existed in every combination of the two cameras and Pi boards. I have used multiple power adapters including 'known good' models from the wiki.

Also, measured voltage, even when raspivid is running never below 4.95v which tells me power is being supplied just fine. What is this current protection? It sounds like dobra had some luck but I'd rather not void my warranty when I am not overclocking (or doing anything out of the ordinary for that matter).

I'm live chatting with Element14 to see what their warranty terms are considering this issue and the one fix with any promising results.

dobra - please test this since you have already set the bit in question and let me know if that is the solution that works for you.

adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 4:10 pm

I spoke to Element14/Newark and they think it might be that I have one of the first production runs of the Rev.1 model. I am going to swap one of mine for the new Rev.2 model via the warranty (yay for the free upgrade). This will take some time, but stand by patiently for confirmation that this was the cause.

dobra, can you confirm which model / version you have?

User avatar
dobra-dobra
Posts: 32
Joined: Wed Dec 26, 2012 2:04 pm
Location: Poland

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 5:26 pm

Mine is Rev. 2. And after additional tests I can confirm, that proposed solution solved my problems.

adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 5:43 pm

Can anyone speak to the dangers of disabling this overcurrent protection in software? I thought that the protection of this sort was done in hardware. What are the risks of trying this fix?

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

Re: Raspberry Pi Camera Module Causes Reboot

Wed May 29, 2013 6:39 pm

adayforgotten wrote:Can anyone speak to the dangers of disabling this overcurrent protection in software? I thought that the protection of this sort was done in hardware. What are the risks of trying this fix?
current_limit_override *without* over_voltage doesn't set your warranty bit, and and I would consider it safe.

Personally I enable it on every board I own (along with overclock and overvoltage) and have had no problems and wouldn't expect any.

adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Re: Raspberry Pi Camera Module Causes Reboot

Thu May 30, 2013 1:04 pm

I went for it added the 'current_limit_override' line to my /boot/config.txt

Epic success; the issue is gone. Of course this at the same time as I received my return shipping label to swap for a new Rev.2 model. Anyone see any compelling reason not to just go through with the RMA anyway to get a free swap to the new version? I'm thinking it's a good move for the doubled RAM and removed USB polyfuses.

Can anyone explain what the 'current_limit_override' setting is actually changing? What is the RPi sensing and with what kind of sensor to get whatever value trips these reboots? Why haven't I been able to find any reference to the setting at all other than in the context of overclocking? My Pi is running stock everything and always has, yet this setting is required for stable operation. What current is it sensing and what is the threshold?

caerandir
Posts: 124
Joined: Tue Dec 18, 2012 11:26 am
Location: Bonn, Germany

Re: Raspberry Pi Camera Module Causes Reboot

Thu May 30, 2013 1:38 pm

Hi dom,

you just made my day! I am hunting the problem of reboots with my Pi since days (http://www.raspberrypi.org/phpBB3/viewt ... 43&t=44921) and just stumbled upon this post. Adding/removing current_limit_override can reproducably switch on/off my problem. Thanks a lot!

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

Re: Raspberry Pi Camera Module Causes Reboot

Thu May 30, 2013 1:53 pm

I've got the okay to enable current_limit_override by default (and obviously not set warranty bit), so this shouldn't be a problem in furture.

current_limit_override=1 is the workaround for the moment.

adayforgotten
Posts: 17
Joined: Wed Aug 01, 2012 5:23 pm

Re: Raspberry Pi Camera Module Causes Reboot

Thu May 30, 2013 2:53 pm

dom wrote:current_limit_override=1 is the workaround for the moment.
You mean: 'current_limit_override=0x5A000020' right?

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

Re: Raspberry Pi Camera Module Causes Reboot

Thu May 30, 2013 11:08 pm

adayforgotten wrote:
dom wrote:current_limit_override=1 is the workaround for the moment.
You mean: 'current_limit_override=0x5A000020' right?
Correct.

qstrx
Posts: 1
Joined: Sun Jun 02, 2013 12:15 pm

Re: Raspberry Pi Camera Module Causes Reboot

Sun Jun 02, 2013 12:28 pm

I have observed same issue on my PIs. I just spend 3 days on testing with different sd-cards and PSU. Everything works fine, even on cpu heavily loaded or i/o, net heavy load... till the moment it hangs. The only observation - without cam module, they works stable.
I hope your way helps.
BTW - how to check revision? It's printed somewhere on the board?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17562
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi Camera Module Causes Reboot

Sun Jun 02, 2013 5:44 pm

dom wrote:I've got the okay to enable current_limit_override by default (and obviously not set warranty bit), so this shouldn't be a problem in furture.

current_limit_override=1 is the workaround for the moment.
#

Hi Dom,

with regard to setting it by default - when is this likely to be released? And for version of code prior to the default being on, is there a chance that the warranty bit could be set by accident unless you upgrade?

James
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

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

Re: Raspberry Pi Camera Module Causes Reboot

Mon Jun 03, 2013 9:57 pm

Latest rpi-udpate firmware now has current_limit_override enabled by default, so these problems should go away.

If you've had this problem, please confirm that current_limit_override is no longer required.

hzhwang
Posts: 19
Joined: Mon Oct 22, 2012 4:44 pm
Contact: Website

Re: Raspberry Pi Camera Module Causes Reboot

Mon Jun 03, 2013 10:35 pm

Hi all,

I have same problem before.
I modified current_limit_override in /boot/config.txt but no luck.

I tested several USB port power supply
(Raspberry Pi Model B Rev 2.0)(000f)

5V 1A (1000mA) USB port power supply (iPodTouch / iPhone4s) → reboot
5V 2A (2000mA) USB port power supply (iPad2) → reboot
5V 2A (2000mA) USB port power supply (Asus Nexus7) → reboot
5V 2.1A (2100mA) USB port power supply (Apple accessory) → reboot

All of them reboots when trying capture a 10s video(capture a 5sec video is ok though):

I bought new USB port power supply yesterday, a 5V 3A (3000mA) USB port power supply.



It works fine, stream video with VLC also works.



(I didn't add current_limit_override parameter in /boot/config.txt )
==
My RaspberryPi playground http://ezzep.blogspot.com

Return to “Troubleshooting”

Who is online

Users browsing this forum: Burngate, Tesla92 and 38 guests