RPIROG
Posts: 19
Joined: Tue May 04, 2021 10:38 am

CM4IO Board-Pi CAM REV 1.3 Camera not detected

Thu Jun 17, 2021 12:01 pm

I'm trying Pi 5MP CAM REV 1.3 with CM4IO Board CAM1 Interface,
After Enabling the CAM interface I do not see EN pin(CAM_GPIO) changing to high and is low.
https://drive.google.com/file/d/1zi9-wD ... sp=sharing
config.txt

Code: Select all

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
start_x=1
gpu_mem=256
If I Connect 3.3V on Pin 12 of the CAM 5MP FPC Connector test point, I do see the red LED turning on the CAM Board. (Doesn't get detect though)
https://www.raspberrypi.org/documentati ... a2_2p1.pdf
Nothing changes when I connect EN (PIN-11 of CAM Board) to 3.3V.

Wondering how PIN12(Unconnected pin) is connected to led.
(May be Fault FPC )

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

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Thu Jun 17, 2021 12:14 pm

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.

RPIROG
Posts: 19
Joined: Tue May 04, 2021 10:38 am

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Thu Jun 17, 2021 1:52 pm

Yes, I've referred that.

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

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Thu Jun 17, 2021 2:24 pm

RPIROG wrote:
Thu Jun 17, 2021 1:52 pm
Yes, I've referred that.
So you've installed the relevant dt-blob.bin file?
What does "vcgencmd get_camera" report?
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.

RPIROG
Posts: 19
Joined: Tue May 04, 2021 10:38 am

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Fri Jun 18, 2021 3:35 am

Yeah got it working. Replaced FPC cable

User avatar
Gavinmc42
Posts: 5884
Joined: Wed Aug 28, 2013 3:31 am

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Sat Jun 19, 2021 11:32 am

Is there a specific reason the CM4 does not have default 2 camera Devicetree support?
Two cameras is the main reason I got the CM4 IO board.

Took me a few hours of messing about before looking and finding that DT info.
Spent lots of time modifying config.txt overlays and then trying Raspstill, Raspiraw, qcam, Libcamera, i2cdetect etc.

I put new Raspberry Pi OS on a new CM4 eMMC, did all the updates to 5.10.43 and just expected the cameras to work.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

aBUGSworstnightmare
Posts: 3232
Joined: Tue Jun 30, 2015 1:35 pm

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Sat Jun 19, 2021 11:50 am

Gavinmc42 wrote:
Sat Jun 19, 2021 11:32 am
Is there a specific reason the CM4 does not have default 2 camera Devicetree support?
Two cameras is the main reason I got the CM4 IO board.

Took me a few hours of messing about before looking and finding that DT info.
Spent lots of time modifying config.txt overlays and then trying Raspstill, Raspiraw, qcam, Libcamera, i2cdetect etc.

I put new Raspberry Pi OS on a new CM4 eMMC, did all the updates to 5.10.43 and just expected the cameras to work.
As it will be blocking another I2C bus..
It has always been here (as it's pretty much the same as with the CM3) : https://www.raspberrypi.org/documentati ... /README.md

And
The power of Raspberry Pi 4 in a compact form factor for deeply embedded applications.
Only you will know what to do with it so it's up to you to configure it for your use case.

User avatar
Gavinmc42
Posts: 5884
Joined: Wed Aug 28, 2013 3:31 am

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Sat Jun 19, 2021 11:56 am

Yes blocking i2c, bumped heads with that.
CM/CM3 users will be familiar with this dt messing around?

Reading that DT info, dt-blob used by the Videocore to set GPIOs up.
More ARM specific ones are extra dtoverlays included in config.txt.

Raspistill is controlled by the VC, Libcamera is the open ARM version.
DT info for the CM4 cameras used for Libcamera need to go in which overlay?

CM modules have that extra GPIO bank and so are have different DT's than normal Pi's?
So maybe a CM4 I/O PCB overlay might be the way to go?

Two versions, one for VC cameras, another for ARM cameras use.
There is no way to combine them?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

aBUGSworstnightmare
Posts: 3232
Joined: Tue Jun 30, 2015 1:35 pm

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Sat Jun 19, 2021 2:19 pm

Gavinmc42 wrote:
Sat Jun 19, 2021 11:56 am
Yes blocking i2c, bumped heads with that.
CM/CM3 users will be familiar with this dt messing around?

Reading that DT info, dt-blob used by the Videocore to set GPIOs up.
More ARM specific ones are extra dtoverlays included in config.txt.

Raspistill is controlled by the VC, Libcamera is the open ARM version.
DT info for the CM4 cameras used for Libcamera need to go in which overlay?

CM modules have that extra GPIO bank and so are have different DT's than normal Pi's?
So maybe a CM4 I/O PCB overlay might be the way to go?

Two versions, one for VC cameras, another for ARM cameras use.
There is no way to combine them?
Sorry, but I don't understand what you're up for.

A dt-blob will configure the GPIO for you, that's for sure, but its harder to maintain. That's why overlays get used most of the time.
If you need to initialise your GPIO early/fast in boot process you should use the DT-blob.

Every Pi has a different *.dtb file; just look at your boot drive root directory. What is your understanding of extra GPIO bank? On CM3 users had full access to Bank1 which is used (and not exposed to pins) on CM4 for on-board peripherals (BT/Ethernet/etc).

Your Pi4 i.e. also has a Bank1/2 just look at the output below which is from the RPi4 I'm using to write this post. That one has a DPI display connected to GPIO in mode 6, no other peripherals are attached. Although the banks are there they are not available to the user.

Code: Select all

pi@raspberrypi:~ $ raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=0 fsel=6 alt=2 func=PCLK pull=NONE
GPIO 1: level=1 fsel=6 alt=2 func=DE pull=NONE
GPIO 2: level=1 fsel=6 alt=2 func=LCD_VSYNC pull=NONE
GPIO 3: level=1 fsel=6 alt=2 func=LCD_HSYNC pull=NONE
GPIO 4: level=1 fsel=6 alt=2 func=DPI_D0 pull=NONE
GPIO 5: level=0 fsel=6 alt=2 func=DPI_D1 pull=NONE
GPIO 6: level=1 fsel=6 alt=2 func=DPI_D2 pull=NONE
GPIO 7: level=1 fsel=6 alt=2 func=DPI_D3 pull=NONE
GPIO 8: level=1 fsel=6 alt=2 func=DPI_D4 pull=NONE
GPIO 9: level=1 fsel=6 alt=2 func=DPI_D5 pull=NONE
GPIO 10: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 11: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 12: level=0 fsel=6 alt=2 func=DPI_D8 pull=NONE
GPIO 13: level=0 fsel=6 alt=2 func=DPI_D9 pull=NONE
GPIO 14: level=0 fsel=6 alt=2 func=DPI_D10 pull=NONE
GPIO 15: level=1 fsel=6 alt=2 func=DPI_D11 pull=NONE
GPIO 16: level=1 fsel=6 alt=2 func=DPI_D12 pull=NONE
GPIO 17: level=1 fsel=6 alt=2 func=DPI_D13 pull=NONE
GPIO 18: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 19: level=1 fsel=1 func=OUTPUT pull=DOWN
GPIO 20: level=1 fsel=6 alt=2 func=DPI_D16 pull=NONE
GPIO 21: level=1 fsel=6 alt=2 func=DPI_D17 pull=NONE
GPIO 22: level=1 fsel=6 alt=2 func=DPI_D18 pull=NONE
GPIO 23: level=0 fsel=6 alt=2 func=DPI_D19 pull=NONE
GPIO 24: level=0 fsel=6 alt=2 func=DPI_D20 pull=NONE
GPIO 25: level=0 fsel=6 alt=2 func=DPI_D21 pull=NONE
GPIO 26: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 27: level=0 fsel=0 func=INPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 fsel=2 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 fsel=2 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=0 fsel=7 alt=3 func=CTS0 pull=UP
GPIO 31: level=0 fsel=7 alt=3 func=RTS0 pull=NONE
GPIO 32: level=1 fsel=7 alt=3 func=TXD0 pull=NONE
GPIO 33: level=1 fsel=7 alt=3 func=RXD0 pull=UP
GPIO 34: level=1 fsel=7 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 fsel=7 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 fsel=7 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 fsel=7 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=1 fsel=7 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=1 fsel=7 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=0 fsel=4 alt=0 func=PWM1_0 pull=NONE
GPIO 41: level=0 fsel=4 alt=0 func=PWM1_1 pull=NONE
GPIO 42: level=0 fsel=1 func=OUTPUT pull=UP
GPIO 43: level=1 fsel=0 func=INPUT pull=UP
GPIO 44: level=1 fsel=0 func=INPUT pull=UP
GPIO 45: level=1 fsel=0 func=INPUT pull=UP
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 fsel=0 func=INPUT pull=UP
GPIO 47: level=0 fsel=0 func=INPUT pull=UP
GPIO 48: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 49: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 50: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 51: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 52: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 53: level=0 fsel=0 func=INPUT pull=DOWN
pi@raspberrypi:~ $ 
If one wants to enable the second camera interface on CM4 (dual camera; CSI-0 and CSI-1 enabled) or one only wants to use CSI0 (CSI-1 is the one used on a standard Pi) would always configure this from a dt-blob.

User avatar
Gavinmc42
Posts: 5884
Joined: Wed Aug 28, 2013 3:31 am

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Sun Jun 20, 2021 12:03 am

Just trying to figure out how to test that the cameras are working on a CM4 I/O.
Do I use VC or ARM? Neither work out of the box with Raspberry Pi OS.
It seems to be one or the other and swapping between modified overlays and rebooting.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

aBUGSworstnightmare
Posts: 3232
Joined: Tue Jun 30, 2015 1:35 pm

Re: CM4IO Board-Pi CAM REV 1.3 Camera not detected

Sun Jun 20, 2021 5:48 am

Gavinmc42 wrote:
Sun Jun 20, 2021 12:03 am
Just trying to figure out how to test that the cameras are working on a CM4 I/O.
Do I use VC or ARM? Neither work out of the box with Raspberry Pi OS.
It seems to be one or the other and swapping between modified overlays and rebooting.
hasn't it been discussed why dual cam is not 'working out of the box'?
Starting point for using dual camera on CM4IO - assuming you have not messed around with the OS yet - is doing an update/full-upgrade/rpi-update, then connecting the cameras as described here
https://www.raspberrypi.org/documentati ... -camera.md
Compute Module 4
On the Compute Module 4 IO board the CAM1 connector is already wired to the I2C on GPIOs 44 & 45, and the shutdown line is connected to GPIO 5 on the GPIO expander. There is no LED signal wired through. No hardware changes are required to use CAM1 other than connecting the 22pin FFC to the CAM1 connector (flex contacts face down).

To connect a second Raspberry Pi camera (to CAM0), two jumpers must be added to J6 in a vertical orienation. The CAM0 connector shares the shutdown line with CAM1.
then you need to download the dual cam dt-blob source file, which has all definitions for using dual camera. Find it here https://www.raspberrypi.org/documentati ... ualcam.dts

That needs to be compiled and placed in the bootvpartition which is described here https://www.raspberrypi.org/documentati ... uration.md

Once completed you can reboot and use raspistill for testing your dual camera.

Only when this is working you should change to libcamera to rule out any other issues as libcamera requires some additonal steps.
https://www.raspberrypi.org/documentati ... /README.md

As stated in libcamera docu
Next, the /boot/config.txt file must be updated to load and use the camera driver, by adding the following to the bottom.

dtoverlay=imx219
If you are using a sensor other than the imx219 you will need to supply the alternative name here (for example, ov5647 for the V1 camera, or imx477 for the HQ Cam).

NOTE: after rebooting, control of the camera system will be passed to the ARM cores, and firmware-based camera functions (such as raspistill and so forth) will no longer work. Setting /boot/config.txt back and rebooting will restore the previous behaviour.
So you can only have one or the other(!), so what's the point? For using libcamera you need to include a camera overlay info config.txt. If there is none you can keep using Openmax applications.
If you want to switch legacy and new camera SW change your config.txt and reboot.

Return to “Compute Module”