SatoshiMorita
Posts: 4
Joined: Thu Nov 24, 2022 6:26 am

CM4 + CMIO + CameraModulev2(8MP) not working

Thu Nov 24, 2022 9:33 am

I am using a CM4 with a CMIO board.
I connected a camera module (ver.2.1, 8MP, imx219) to cam1 on the CMIO board, but neither raspaistill nor libcamera-hello work.

I also updated /boot/dt-blob.bin by following the instructions (https://www.raspberrypi.com/documentati ... odule.html) on the official website.
Still the camera does not work.

I saw on another topic that it is necessary to delete camera_auto_detect=1 and add dtoverlay=imx219 in /boot/config.txt, so I added it.
However, the camera does not work.

The camera module itself is confirmed to work with 4B+. Also, the Raspberry Pi Zero camera cable is used for the cable between the camera module and cam1.

Is anyone else having similar symptoms?

Any information missing to help me solve the problem?

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

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Thu Nov 24, 2022 11:57 am

SatoshiMorita wrote:
Thu Nov 24, 2022 9:33 am
I am using a CM4 with a CMIO board.
A Raspberry Pi CM4IO, or a 3rd party one?
SatoshiMorita wrote:I connected a camera module (ver.2.1, 8MP, imx219) to cam1 on the CMIO board, but neither raspaistill nor libcamera-hello work.
Which do you want to work - legacy or libcamera? Concentrate on one.
SatoshiMorita wrote:I also updated /boot/dt-blob.bin by following the instructions (https://www.raspberrypi.com/documentati ... odule.html) on the official website.
Still the camera does not work.
Only required for legacy.
SatoshiMorita wrote:I saw on another topic that it is necessary to delete camera_auto_detect=1 and add dtoverlay=imx219 in /boot/config.txt, so I added it.
However, the camera does not work.
OK, so check with "sudo i2cdetect -y 10" whether the sensor is detected. Address 0x64 should be present at all times, and for IMX219 (V2 8MPix camera) it should report on address 0x10.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

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

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Thu Nov 24, 2022 12:29 pm

Start with a fresh OS installation on your uSD.
Change the config.txt to

Code: Select all

...

# Automatically load overlays for detected cameras
#camera_auto_detect=1
# enable V2 camera (IMX219)
dtoverlay=imx219
This will disable auto camera detection and load the overlay for V2 camera, connected to CSI1.

Reboot and run

Code: Select all

libcamera-hello --list-cameras
which should give you

Code: Select all

Available cameras
-----------------
0 : imx219 [3280x2464] (/base/soc/i2c0mux/i2c@1/imx219@10)
    Modes: 'SRGGB10_CSI2P' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
                             1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
                             1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                             3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
           'SRGGB8' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
                      1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
                      1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
                      3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
Now start libcamera via

Code: Select all

libcamera-hello -t 0
Make sure your FFC/FPC is connected correctly. Post a picture of your setup.

SatoshiMorita
Posts: 4
Joined: Thu Nov 24, 2022 6:26 am

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Thu Nov 24, 2022 11:59 pm

Thank you for your reply.
Raspberry Pi CM4IO, or a 3rd party one?
Raspberry Pi CM4IO.
Which do you want to work - legacy or libcamera? Concentrate on one.
Legacy.

Originally, the camera and software were checked on a 4B+ and raspistill was used at that time.
When considering this as a mass-produced product,
it is difficult to deal with wireless issues (laws and regulations in different countries),
so it is being redesigned using CM4 without Wi-Fi/Bluetooth.
OK, so check with "sudo i2cdetect -y 10" whether the sensor is detected. Address 0x64 should be present at all times, and for IMX219 (V2 8MPix camera) it should report on address 0x10.
the result of executing "sudo i2cdetect -y 10".

Code: Select all

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- 0c -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 2f 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --       
Nothing was shown at address 0x10.

Is there anything else to check?

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

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Fri Nov 25, 2022 5:57 am

Sorry, i don't care on legacy camera stack any more...
So, habe you tested viewtopic.php?p=2057140#p2056954?

How is your camera connected? Please post a picture.
Do you have another cable to test with?

Connect your camera to CAM0 and place the jumpers on
Add below ti your config.txt and run libcamera.

Code: Select all

dtoverlay=imx219,cam0

SatoshiMorita
Posts: 4
Joined: Thu Nov 24, 2022 6:26 am

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Fri Nov 25, 2022 7:20 am

aBUGSworstnightmare wrote:
Fri Nov 25, 2022 5:57 am
Sorry, i don't care on legacy camera stack any more...
So, habe you tested viewtopic.php?p=2057140#p2056954?

How is your camera connected? Please post a picture.
Do you have another cable to test with?

Connect your camera to CAM0 and place the jumpers on
Add below ti your config.txt and run libcamera.

Code: Select all

dtoverlay=imx219,cam0
Sorry for the late reply.
Since 6by9 answered earlier, I am running from that response.

Since the CM4 we are using is a 16GB eMMC product, we would like to wait for the status of 6by9's response before reinstalling it.

The camera is connected to CAM1 on the CMIO board.
IMG_2543_.jpg
IMG_2543_.jpg (82.79 KiB) Viewed 192 times
I do not have another cable.
With this cable connected, I checked the continuity between the terminals on the CMIO board and the camera module board with a multimeter, but there were no problems.
I also checked the I2C signal using an oscilloscope, and there seemed to be no problem with the waveform.

I'll start by doing what I can with cam1.
Then I will do it with cam0.

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

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Fri Nov 25, 2022 8:16 am

SatoshiMorita wrote:
Thu Nov 24, 2022 11:59 pm
Thank you for your reply.
Raspberry Pi CM4IO, or a 3rd party one?
Raspberry Pi CM4IO.
Which do you want to work - legacy or libcamera? Concentrate on one.
Legacy.
OK, ignore the earlier comments about dtoverlay.
Ensure you have camera_auto_detect=0 (not the default of 1).
You will also need to have run

Code: Select all

sudo wget https://datasheets.raspberrypi.com/cmio/dt-blob-cam1.bin -O /boot/dt-blob.bin

as documented in https://www.raspberrypi.com/documentati ... tart-guide
Reboot
"vcgencmd get_camera" should report supported=1, and hopefully detected=1. raspistill etc should now work.
SatoshiMorita wrote:
OK, so check with "sudo i2cdetect -y 10" whether the sensor is detected. Address 0x64 should be present at all times, and for IMX219 (V2 8MPix camera) it should report on address 0x10.
the result of executing "sudo i2cdetect -y 10".

Code: Select all

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- 0c -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 2f 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --       
Nothing was shown at address 0x10.
Address 0x64 is the crypto chip on the camera module, so the connection to the camera main board would appear to be good. The sensor power is gated by a GPIO, so won't always report (it would be shown as UU under libcamera if correctly detected). If still not detected, then check the little connector between the camera PCB and the module - they can get knocked and no longer make a connection.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

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

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Fri Nov 25, 2022 10:57 am

@6by9: The crypto chip in the SO8 package is optional (as on the picture the small footprint is empty (sorry, don't know the package size), right?
Or what is the component marked in red in the camera PCN?
Bildschirmfoto 2022-11-25 um 11.55.20.png
Bildschirmfoto 2022-11-25 um 11.55.20.png (57.28 KiB) Viewed 148 times
That component seems missing from the OP's camera.

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

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Fri Nov 25, 2022 11:13 am

aBUGSworstnightmare wrote:
Fri Nov 25, 2022 10:57 am
@6by9: The crypto chip in the SO8 package is optional?
The crypto chip will be present on all Raspberry Pi v2 camera modules.

The presence of it is optional for using the legacy stack on Compute Modules - see https://www.raspberrypi.com/documentati ... rypto-chip
aBUGSworstnightmare wrote:Or what is the component marked in red in the camera PCN?
Bildschirmfoto 2022-11-25 um 11.55.20.png

That component seems missing from the OP's camera.
From the PCN
Reason for Change
Allow use of alternative cryptoflash chip package to improve supply chain availability
There are footprints for either the SOIC-8 or UDFN8 packages are present, and one will be populated. In your image your can see the unpopulated location just above and right of the component in red.

The address 0x64 for the crypto chip is responding, so no issue there.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

dp11
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 996
Joined: Thu Dec 29, 2011 5:46 pm

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Fri Nov 25, 2022 11:13 am

It looks as though the other crypto chip is fitted instead.

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

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Fri Nov 25, 2022 11:19 am

6by9 wrote:
Fri Nov 25, 2022 11:13 am
aBUGSworstnightmare wrote:
Fri Nov 25, 2022 10:57 am
@6by9: The crypto chip in the SO8 package is optional?
The crypto chip will be present on all Raspberry Pi v2 camera modules.

The presence of it is optional for using the legacy stack on Compute Modules - see https://www.raspberrypi.com/documentati ... rypto-chip
aBUGSworstnightmare wrote:Or what is the component marked in red in the camera PCN?
Bildschirmfoto 2022-11-25 um 11.55.20.png

That component seems missing from the OP's camera.
From the PCN
Reason for Change
Allow use of alternative cryptoflash chip package to improve supply chain availability
There are footprints for either the SOIC-8 or UDFN8 packages are present, and one will be populated. In your image your can see the unpopulated location just above and right of the component in red.

The address 0x64 for the crypto chip is responding, so no issue there.
Yes, that's what I've assumed (as the chip is there on 0x64). But this is now the third time (I'm aware of) where a user reports such issues with V2 camera viewtopic.php?p=2051890#p2052890

SatoshiMorita
Posts: 4
Joined: Thu Nov 24, 2022 6:26 am

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Sun Nov 27, 2022 11:55 pm

My reply was delayed due to the weekend, but the issue has been resolved.

The camera module I kept trying until last week was V2, not V2.1.
I have both V2 and V2.1 and had planned to use V2.1 for this development.
However, somewhere along the line, V2 and V2.1 were interchanged and I did not realize it.
After realizing this mistake and replacing the camera module with V2.1,
the camera is detected and can take pictures using raspistiil commands.

Whether the problem is due to the version of the camera module or this defective V2 module, I do not know.
Anyway, it is more urgent to resume development using V2.1, which is working now.

Thanks to @6by9 and @aBUGSworstnightmare for the solution tips.

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

Re: CM4 + CMIO + CameraModulev2(8MP) not working

Mon Nov 28, 2022 5:27 am

Just to ket you know ... https://pip.raspberrypi.com/categories/658-pcn

V2 is the latest revision, refer to the document linked above for details.
Anyhow, both should just work.

Return to “Compute Module”