zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

[SOLVED] obviuos differences between camera v1.3 and v2?

Sat Sep 05, 2020 5:39 pm

Hi,
I've a working setup with Compute Module, a DPI screen and a camera module, which is connected through adaptors (CAM <-> miniHDMI <-> HDMI- CAM) to a camera v2 module.
Everything is stable and works fine. The frame rate is super considering the DPI screen has res of 320x240.
I have a custom device tree for the camera, on CAM1 lane. CAM0 lane stopped working while ago.

The setup has been stable for a couple of months.
If I swap a camera module v2 with a working v1.3 and type my usual command

Code: Select all

sudo raspivid -t 0 -f 
instead of having my nice camera feed on the DPI screen I get:
  • a flash of the red LED on the camera module
  • this error

    Code: Select all

    sudo raspivid -t 0 -f
    mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
    mmal: camera component couldn't be enabled
    mmal: main: Failed to create camera component
    mmal: Failed to run camera app. Please check for firmware updates
Is there something obvious that I am missing? I thought the pinout setup was the same for camera module V1.3 and V2, so it would just be a matter of swapping them.
Maybe camera module v1.3 is not supported on CAM1 interface?

Thanks
Z
Last edited by zontar on Tue Sep 08, 2020 3:28 pm, edited 1 time in total.

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

Re: obviuos differences between camera v1.3 and v2?

Sat Sep 05, 2020 7:54 pm

v1.3, v2 and HQ camera are all supported on all versions of the Pi and CM.

You can check whether the Pi can detect the camera via "vcgencmd get_camera". "Supported" is how many cameras the firmware believes it should be able to talk to, and "detected" is how many it actually found.

Check your camera without the HDMI adapters.
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: obviuos differences between camera v1.3 and v2?

Sun Sep 06, 2020 10:13 am

Hello 6by9,

vgecnmd get_camera returns supported and detected both at 1.

the camera v1.3 works perfectly with a PiZero.

I have setup again the rigging with a FPC adapter breakout connected with the CM carrier board. It works perfectly with a V2 camera.
IMG_6387.jpg
IMG_6387.jpg (174.95 KiB) Viewed 682 times

that's me in the tiny display, btw ..

But as soon as iI shutdown, change the camera module at the end of the flat FPC cable, reboot, I get:

pi@raspcm(ro):~$ vcgencmd get_camera
supported=1 detected=1
pi@raspcm(ro):~$ sudo raspivid -t 0 -f
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

To be honest something is unstable because sometimes vcgencmd does not detect the camera, sometimes it does.. but while with the V2 once it's setup it works constantly across reboots, with the V1.3 it never works, even if detected.

I've tried rebooting and changing different v1.3 cameras, always the same.

Z

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

Re: obviuos differences between camera v1.3 and v2?

Sun Sep 06, 2020 1:47 pm

Oh, it's that weird CM breakout board again. Joys.

Sorry, there's very little guidance I can give on that. For it to have detected but then not run is quite odd.

You can try adding "start_debug=1" to config.txt, and then "sudo vcdbg log assert" after trying to run raspistill.
Alternatively you can try enabling the full logging from the camera stack using "vcgencmd set_logging level=0xcc0" and running "sudo vcdbg log msg" after raspistill.
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: obviuos differences between camera v1.3 and v2?

Sun Sep 06, 2020 5:55 pm

Thanks 6by9,

when it works with camera module V2, after running Raspivid I got

Code: Select all

026161.944: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 30, power enable gpio = 31
026462.726: camsubs: Camera not found
026462.840: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 30, power enable gpio = 31
026763.616: camsubs: Camera not found
026763.727: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 30, power enable gpio = 31
026765.401: camsubs: Camera found OK
While upon running the same command with camera v1.3 I got Camera not found 4 times.. and that's it. We have already seen that the module tries 4 times to talk with the camera module, so the 4 tries are expected.

The assert always get

Code: Select all

vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
026767.832: assert( camera_subsystem_state.power_enable_ref_count[port] > 0 ) failed; ../../../../../vcfw/drivers/device/camera_subsystem/camera_subsystem.c::camera_disable_ctrl line 1141 rev 53a54c7
vcdbg_ctx_get_dump_stack: dump_stack failed
even when the camera works, so I suspect this is old msgs stored somewhere (non in the EPROM since it's mounted read only).

I keep trying, thanks for the nifty command tricks

Z

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

Re: obviuos differences between camera v1.3 and v2?

Sun Sep 06, 2020 6:59 pm

The timestamps are msecs from boot, so 26 seconds.

The 4 tries are for the 4 different sensor modules supported - ov5647, imx219, imx477, and the (unsupported) tc358743.
Not detecting means you have either an i2c issue, or the shutdown lines aren't correctly wired.

I'm guessing these aren't genuine pi V1.3 cameras seeing as they haven't been sold for 5 or so years. Some of the cloners didn't do a very good job of cloning and expect something else to happen on the gpios. The v2 camera module doesn't do anything with what was the led line.
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 12:38 pm

Hi 6by9,
nice knowing the details. That's why the camera was always found after some false tests.

As per the cameras, as far as I can tell the boards seems legit: they have Raspberry Pi Camera rev 1.3 printed. Is there a way to tell if they are fake? One of them I am pretty sure is original cause I've bought from a respected electronics physical store in Italy just after lockdown. Maybe they had some backstock. I went for that because it was cheapish nad I needed to see the SUNNY connector with y own eyes.

AS for the LED line, I know the camera v2 does not use it. I will check again with every v13 camera in my drawers, might take a while.
Thanks anyway

Z

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

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 12:52 pm

There is nothing in particular to identify genuine vs cloned V1.3 camera modules. Some cloners did even put the same silk screening on their boards and call it V1.3.

I would be very surprised if there were any genuine ones left in the supply chain. As I said, it was one of the few products that we have EOLed, and that was due to OmniVision supposedly EOLing the sensor itself. Where the cloners are still getting their sensors from I have no idea.

Test your V1.3 camera module on a standard Pi. If it works there then start fault finding that weird IO board.
If the I2C is failing then it is one of 4 connections - shutdown, LED, SDA, or SCL (or ground).

Do note that the result of the probe is cached, so it will only ever do one detection phase per boot.

What GPIOs have they gone for for the I2C? If 28&29 or 44&45 then check they haven't been silly and connected GPIO bank 1 to a 1.8V supply.
V2.1 camera modules have a FET arrangement for the I2C level shifter. IIRC V1.3 only has a potential divider.
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 1:26 pm

Hi 6by9,

I've read about the EOL of Omni vision in this forum, and maybe I've made a mistake, but I needed to replicate the camera board and v1.3 seemed simpler than v2. As soon as the camera PCB will arrive from China I will think what to do. in the meantime I will triple check everythin.

The prove running just at boot time, I've gathered. That's why I do reboot every time.

The cameras work with a normal PiZero, every one of the one I cannot get to work with my prototyping setup. It must be something electrical, but before fabricating another PCB I wanted to test on a proto board that every connection could work. And unfortunately (but correct me If I am wrong) the official dev board for CM does not expose the CAM0/CAM1 physical pins, which instead I need to remap to pins and other connectors in my project.

AS per I2C I'm using GPIO 28 and 29. The board has some (not very well documented) options to put jumpers or solder bridges to switch from 3.3 to 1.8 and the like, but I don't really know what are they for (or even if they are related to banks)..
Is there a simple way to test it? Maybe program the CM to issue a stable "1" on a GPIO pin on the same bank as 28/29 and test with a voltmeter? Is it too simple?

There are the pins labeled GPIO_0-27_VDD, GPIO28-45_VDD, which corresponds to pins in the official CM DataSheet, but I don't know what they are used for.

Thanks for the link on the voltage issue meanwhile.
Z

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

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 2:07 pm

zontar wrote:
Mon Sep 07, 2020 1:26 pm
The cameras work with a normal PiZero, every one of the one I cannot get to work with my prototyping setup. It must be something electrical, but before fabricating another PCB I wanted to test on a proto board that every connection could work. And unfortunately (but correct me If I am wrong) the official dev board for CM does not expose the CAM0/CAM1 physical pins, which instead I need to remap to pins and other connectors in my project.
EXACTLY which signals is it you want?

The CMIO breaks out the shutdown, led, and I2C lines for each of the camera modules.
https://www.raspberrypi.org/documentati ... IO_3p0.pdf
CD1_SDA, CD1_SCL, CAM1_IO0, and CAM1_IO1 for the CAM1 connector.
CD0_SDA, CD0_SCL, CAM0_IO0, and CAM0_IO1 for the CAM0 connector.
They need to be connected to your chosen actual GPIO pins as coverered in https://www.raspberrypi.org/documentati ... -camera.md
The CSI pairs are routed through because they are high speed differential pairs and shouldn't really be messed with. There is no option to remap data or clock lanes, therefore you shouldn't need to rewire them anyway.
zontar wrote:AS per I2C I'm using GPIO 28 and 29. The board has some (not very well documented) options to put jumpers or solder bridges to switch from 3.3 to 1.8 and the like, but I don't really know what are they for (or even if they are related to banks)..
Is there a simple way to test it? Maybe program the CM to issue a stable "1" on a GPIO pin on the same bank as 28/29 and test with a voltmeter? Is it too simple?

There are the pins labeled GPIO_0-27_VDD, GPIO28-45_VDD, which corresponds to pins in the official CM DataSheet, but I don't know what they are used for.
Well I hope GPIO28-45_VDD is connected to 3.3V, otherwise you'll have a problem with any of the GPIOs off that bank.

Details of the power rails are section 7 of the [url=https://www.raspberrypi.org/documentati ... us_1p0.pdf]CM datasheet[/flash].
The Pi CMIO board also offers configuration of voltage for 1V8 or 3V3 on 0-27 and 28-45 via jumper bank J3. Almost all use cases want both driven off 3V3.

GPIOs 34-36 are pulled high by default. Measure the voltage on any of those. (The rest of BANK1 are pulled low by default).

You may have linked to it before, but who makes it, and where is the documentation for this board? (Having said that I really don't want to have to debug someone else's hardware).
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 3:20 pm

Hi 6by9,

I understand you don't want to debug another hardware. Of course. I will write them, last time I wrote they were helpful. This is the breakout:

https://store.gumstix.com/manufacturer/ ... wgate.html

Regarding hat signal I need, the problem is the FPC connector from camera module to Raspberry Board, be it a proper raspberry or the Dev Board of CM. I need a sturdier cable and attachment from Raspberry CM to camera, and for this I need to test connections also on CSI lanes because of course also them need to be routed in the cables.
And anyway, in any case if I build (as I am designing) a carrier board for the CM, I will have access to these signals to route them to any connector (any connector, even the same Hirose 15 pins FPC connector). And for this I wanted to test everything before burning another couple hundred euros and months for a wrong PCB.
As I've written before, this is my first "big" PCB project (I am a software engineer, not an electronic one and hardware is for me still terrifying). The last one was a simple HAT for a pi zero with a few resistors, a couple transistors and two FPC connectors for a SPI screen (and a HDMI to FPC connection) for the camera.Way more simple, that's why I want to test everything in a simple-to-debug setup.

Lastly, what do you mean by
Well I hope GPIO28-45_VDD is connected to 3.3V, otherwise you'll have a problem with any of the GPIOs off that bank.
?
I've checked the pins with a voltmeter. When the board is powered, the pin has a steady voltage of 3.3V at the moment, as well as the the pin for the other bank. Should I connect the pin to another power source?

The other bank (0-27) I am using it for the DPI Screen (18 data lanes plus control signals), and it works perfectly.


Thanks again
Z

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

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 4:23 pm

Have you any I2C pull up resistors on the I2C lines? CMIO schematic R13/14 for CAM0, and R16/17 for CAM1.
Missing those will give unreliable I2C as the lines won't necessarily recover fast enough for the defined clock rate.
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 6:22 pm

Hi 6by9,

TLDR; I don't know. I see a bunch of resistors on the board byt some tracks are in internal layers so I cannot follow them
Is there a way where a layman can test the presence of a pullup resistor? Can I just test the voltage when the camera is disabled?
In this case is it sufficient not to invoke raspivid or the camera I2C lanes are always talking, even if I don't run a program in userspace?

I apologize for my ignorance. I will ask Gumstix for details hoping they answer.
Thanks for your time,
Z

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

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 6:34 pm

There's no easy way I can think of to check if they are fitted. A schematic would tell you in 10 seconds, but I don't see a schematic for their board.

Adding additional 4k7 pull ups would do for a test. If there are already pull ups fitted then they won't be too small to do damage, but conversely small enough to get the i2c working if they are absent. Connect between sda and 3v3, and scl and 3v3.
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 6:47 pm

Hello 6by9,
what you are suggesting is, if I am correct, to jury-rig one 4k7 resistor between GPIO 28 and a 3V3 pin, and a second between GPIO 29 and a 3V3 pin. Is this correct?

This I can do with some breadboard and some spare headers/pins. I should have some spare TH resistor, hopefully (since they originated in an Arduino starter Kit, there should be).

Thanks
Z

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

Re: obviuos differences between camera v1.3 and v2?

Mon Sep 07, 2020 9:00 pm

You are correct.
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: obviuos differences between camera v1.3 and v2?

Tue Sep 08, 2020 3:23 pm

dear 6by9,
you are the best!
IMG_6396.jpg
IMG_6396.jpg (184.65 KiB) Viewed 330 times
as you can see, as soon as I soldered up a couple 4k4 ohm resistance ( i don't have a 4k7, just some 2k2 in series) and connected some 3v3 Pins to GPIO 28 and 29.. voila!! it works!.. you can see me upside down in the little screen with the pink dot on the left. And the camera is the v1.3!

Thanks so much!!!!
It was as you suggested. It appears there is no pullup (or I don't know how to enable it, but who cares now that I have my neat pull up board?)
I cannot thank you enough!

Best Regards
Z!

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: [SOLVED] obviuos differences between camera v1.3 and v2?

Tue Sep 08, 2020 5:23 pm

As a complete test:
I've tested with my simple miniHDMI/HDMI camera adapter, with both camera modulev2 and v1.3.
It totally works! And as 6by9 told us, the pullups works also with V2..
Now since I don't like miniHDMI I'm testing with miniDP.. (truth is, I've not found cables with miniHDMI on both ends)
IMG_6399.jpg
IMG_6399.jpg (171.59 KiB) Viewed 309 times
IMG_6397.jpg
IMG_6397.jpg (218.46 KiB) Viewed 309 times
Great help from 6by9 and the community as usual!
Thanks folks

Z

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

Re: [SOLVED] obviuos differences between camera v1.3 and v2?

Tue Sep 08, 2020 5:47 pm

I2C pull up resistors would normally be around 1k8 in value, as per the CMIO schematic.
I'd recommended 4k7 for test purposes as if there were 1k8 resistors already fitted it wouldn't make the pullup too strong, but conversely they should have been strong enough if they were absent.

If you're adding them to your final schematic, I'd recommend using the more normal 1k8 values.
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.

zontar
Posts: 159
Joined: Sun Mar 05, 2017 7:14 pm

Re: [SOLVED] obviuos differences between camera v1.3 and v2?

Tue Sep 08, 2020 8:51 pm

Hi 6by9,

Thanks again. Duly noted. I will add the 1k8 of course!

Truly best regards,
Z

Return to “Camera board”