jjarvis
Posts: 11
Joined: Tue May 29, 2012 8:47 pm

Camera Module and Pi memory requirements

Tue Jun 11, 2013 4:18 pm

I have a Raspberry Pi camera module that works with my Model B Pi but not my Model A Pi using the same SD card. I have rung the various changes, new image, firmware upgrade, etc. When I run the raspistill -o test.jpg command the light comes on but no stdin/stdout messages appear and the command never returns. Same command works on the Model B.

The one thing I did notice was that cat /proc/meminfo mentioned only 124 Mb of RAM so I tweaked the memory split. Still no joy.

QUESTION: Does the camera module have specific memory requirements?

I fear my Model A is not exhibiting the full 256Mb across the OS/GPU.

rayjoh
Posts: 27
Joined: Thu May 23, 2013 11:48 am

Re: Camera Module and Pi memory requirements

Tue Jun 11, 2013 4:30 pm

Running headless (no X). 40MB to the GPU is to little, 44MB was enough when I tested this morning.
-- Raymond

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

Re: Camera Module and Pi memory requirements

Tue Jun 11, 2013 4:49 pm

Although I've not tried on a Model A, my Model B is only 256MB, and it works fine on that with the correct GPU memory split and start.elf. You have run raspi-config I pressume, and enabled the camera?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Camera Module and Pi memory requirements

Tue Jun 11, 2013 7:25 pm

jamesh wrote:Although I've not tried on a Model A
I have. I deliberately used a model A for my Mk2 PiCamCorder because it uses less power. What can I say? It works with both the latest and the original camera firmware. I think. I'll just check the original firmware for you. Back in a minute :)

Yep it works in both video and stills modes. :D
Alex Eames RasPi.TV, RasP.iO

jjarvis
Posts: 11
Joined: Tue May 29, 2012 8:47 pm

Re: Camera Module and Pi memory requirements

Wed Jun 12, 2013 6:25 pm

OK, thank-you for all your replies. They help rule out many possibilities. I went back and ensure I had the memory split as per suggestions but it has not helped.

I am probably doing something stupid but:
  • It works on my Model B with same camera module and same SD card. I see a preview too.
  • When I run
    raspistill -o test.jpg
    the red LED light on the camera comes on
  • Turining off preview with -n does not help.
  • I am not running X when running this on either the Model A or Model B
  • Running as root makes no difference
  • The output when using strace ends with
    AD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb3cf54d8, tls=0xb3cf5930, child_tidptr=0xb3cf54d8) = 2193
    ioctl(3, 0x400cc404, 0xbec6311c) = 0
    ioctl(3, 0x400cc404, 0xbec6311c) = 0
    ioctl(3, 0x400cc404, 0xbec6311c) = 0
    ioctl(3, 0x400cc404, 0xbec63164) = 0
    ioctl(3, 0x400cc404, 0xbec6326c) = 0
    ioctl(3, 0x400cc404, 0xbec63234) = 0
    ioctl(3, 0x400cc404, 0xbec6324c) = 0
    ioctl(3, 0x400cc404, 0xbec633ec) = 0
    futex(0xb6ec838c, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
    brk(0x1df8000) = 0x1df8000
    gettimeofday({1371061112, 123985}, NULL) = 0
    ioctl(3, 0x400cc404, 0xbec630e4) = 0
    ioctl(3, 0x400cc404, 0xbec631ec) = 0
    ioctl(3, 0x400cc404, 0xbec631ec) = 0
    ioctl(3, 0x400cc404, 0xbec6330c) = 0
    gettimeofday({1371061112, 130013}, NULL) = 0
    gettimeofday({1371061112, 130700}, NULL) = 0
    ioctl(3, 0x400cc404, 0xbec6327c) = 0
    ioctl(3, 0x400cc404, 0xbec6327c) = 0
    futex(0xb6ec838c, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
    ioctl(3, 0x400cc404, 0xbec630dc) = 0
    gettimeofday({1371061112, 143521}, NULL) = 0
    ioctl(3, 0x400cc404, 0xbec632b4) = 0
    futex(0xb6ec838c, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
    nanosleep({5, 0}, NULL) = 0
    open("test.jpg", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
    ioctl(3, 0x400cc404, 0xbec6324c) = 0
    ioctl(3, 0x400cc404, 0xbec6324c) = 0
    gettimeofday({1371061117, 156839}, NULL) = 0
    open("/etc/localtime", O_RDONLY) = 5
    fstat64(5, {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
    fstat64(5, {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f28000
    read(5, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 4096) = 118
    _llseek(5, -6, [112], SEEK_CUR) = 0
    read(5, "\nUTC0\n", 4096) = 6
    close(5) = 0
    munmap(0xb6f28000, 4096) = 0
    ioctl(3, 0x400cc404, 0xbec6324c) = 0
    ioctl(3, 0x400cc404, 0xbec6324c) = 0
    ioctl(3, 0x400cc404, 0xbec6324c) = 0
    ioctl(3, 0x400cc404, 0xbec633ac) = 0
    ioctl(3, 0x400cc404, 0xbec6340c) = 0
    gettimeofday({1371061117, 175365}, NULL) = 0
    ioctl(3, 0x400cc404, 0xbec63234) = 0
    futex(0xbec63500, FUTEX_WAIT_PRIVATE, 0, NULL

User avatar
jbeale
Posts: 3675
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Camera Module and Pi memory requirements

Wed Jun 12, 2013 7:33 pm

are you using the same power supply and power cable with both devices? A marginal power supply voltage might cause the symptoms you describe, as the camera draws an extra 250 mA or so when active, possibly causing a "brown-out" on the device. But the Model B by itself draws more power than the Model A by itself, so if you are using exactly the same power supply in both cases and the Model B works, that could not be the issue.

Several people have reported that changing power supplies, or power supply leads fixed their R-Pi camera problem.

jjarvis
Posts: 11
Joined: Tue May 29, 2012 8:47 pm

Re: Camera Module and Pi memory requirements

Thu Jun 13, 2013 12:57 pm

Good suggestion, but yes, same power supply and the one I received from RS. Also did not work using batteries and a linear transformer to ensure 5.0 volts. Tested with voltmeter just to be sure!

It may be a small hardware issue on my Model A although it my newest Pi. Part of the reason for posting was to see if others had had similar issues.

I have a workaround of using the camera with the Model B but using the A with lower power footprint would have been preferable. :cry:

P.S. I see no other issues on the Model A - all works as I would expect.

jjarvis
Posts: 11
Joined: Tue May 29, 2012 8:47 pm

Re: Camera Module and Pi memory requirements

Wed Jul 31, 2013 9:05 pm

Ok, the model B on which I had the camera working has the MPEG-2 and VC-1 codecs but the model A does not. IIRC I tested on the model B first then the model A.

So the question is whether the codecs are required for the camera operation and/or whether the camera initialises differently depending on whether codecs are present???

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: Camera Module and Pi memory requirements

Thu Aug 01, 2013 8:11 am

Hello,

My camera is working on an early 256Mb Pi, no codecs installed.

Regards

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Camera Module and Pi memory requirements

Thu Aug 01, 2013 7:01 pm

My camera works fine on a Model A. You do need, however, to ensure that enough RAM is allocated to the GPU for the camera to work. I know it needs to be at least 64MB, and may be more - I have not checked. No extra codecs are required for the camera to work.

Return to “Camera board”