pidev2014
Posts: 2
Joined: Thu Oct 23, 2014 5:56 am

CAM1 not detected on CMIO board with default dt-blob.dts

Thu Oct 23, 2014 6:25 am

<MOD EDIT>
It appears that most of the problems people are having in this thread is caused by the linux kernel device tree data being incorrect or device tree being disable altogether.
For example, enabling I2C0 will break dual cam support if it's using the pins suggested in the documentation. The solution is to use different pins.
The problem can also be the result of a missing bcm2708-rpi-cm.dtb. You will need to provide your own, or run rpi-update to get one which comes with later firmware versions.

If you find that you are still having problems, please provide your dt-blob.bin, bcm2708-rpi-cm.dtb, the output of , 'sudo raspi-gpio get', 'dtc -I fs /proc/device-tree', 'uname -a' and 'vcgencmd version'. dtc is a part of the device-tree-compiler package.
</MOD EDIT>


Hi,
I've been experimenting with the CMIO board and the Rpi camera with the CM adapter board. I followed the instructions for enabling both camera ports at: http://www.raspberrypi.org/documentatio ... -camera.md
and placed the modified dt-blob.bin (modifications in the pins_cm section) in /boot/
I was able to get CAM0 to work properly. However, 'vcgencmd get_camera' returns supported=2, detected=0 when I switch the Rpi camera adaptor board to CAM1. Has anyone encountered this issue? I noticed that CAMERA_1_UNICAM_PORT is has number= <0> while CAMERA_0_UNICAM_PORT has number = <1>. In short, what would be the correct set of values for the CAMERA_1_* parameters in dt-blob.dts for CAM1 to work correctly?

Running 'raspistill -cs 1 -o test.jpg' returns the following error:
mmal: mmal_vc_component_create>: failed to create component 'vc.ril.camera'
....
mmal: Camera is not detected.

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

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Oct 23, 2014 7:20 am

Have you tried changing unicam zero to be camera 0? I wonder is the camera number need to start from 0.

Do you have two cameras you can try to see if that works?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Oct 23, 2014 9:02 am

Pastebin your full dts file and confirm that you have the correct i2c connections for both ports.

pidev2014
Posts: 2
Joined: Thu Oct 23, 2014 5:56 am

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Oct 30, 2014 2:10 am

Hi,
I've appended the dt-blob.dts which I used, where CAM0 works and CAM1 doesn't. I believe only the pins_cm section is relevant so I've shown only that portion. I rechecked the i2c connections for the ports and they look ok.

pins_cm {
pin_config {
[email protected] {
polarity = "active_high";
termination = "pull_down";
startup_state = "inactive";
function = "input";
}; // pin
[email protected] { function = "output"; termination = "no_pulling"; }; //
[email protected] { function = "output"; termination = "no_pulling"; }; //
[email protected] { function = "uart0"; termination = "no_pulling"; }; // TX uart0
[email protected] { function = "uart0"; termination = "pull_up"; }; // RX uart0
[email protected] { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK
[email protected] { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD
[email protected] { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0
[email protected] { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1
[email protected] { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2
[email protected] { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3
[email protected] { function = "output"; termination = "no_pulling"; };
[email protected] { function = "output"; termination = "no_pulling"; };

}; // pin_config
pin_defines {
[email protected]_CAMERAS {
type = "internal";
number = <2>;
};
[email protected]_0_UNICAM_PORT {
type = "internal";
number = <1>;
};
[email protected]_0_I2C_PORT {
type = "internal";
number = <0>;
};
[email protected]_0_SDA_PIN {
type = "internal";
number = <0>;
};
[email protected]_0_SCL_PIN {
type = "internal";
number = <1>;
};
[email protected]_0_SHUTDOWN {
type = "internal";
number = <3>;
};
[email protected]_0_LED {
type = "internal";
number = <2>;
};
[email protected]_1_LED {
type = "internal";
number = <30>;
};
[email protected]_1_SHUTDOWN {
type = "internal";
number = <31>;
};
[email protected]_1_UNICAM_PORT {
type = "internal";
number = <0>;
};
[email protected]_1_I2C_PORT {
type = "internal";
number = <0>;
};
[email protected]_1_SDA_PIN {
type = "internal";
number = <28>;
};
[email protected]_1_SCL_PIN {
type = "internal";
number = <29>;
};
}; // pin_defines
}; // pins_cm

User avatar
m.furukawa
Posts: 2
Joined: Sun Nov 09, 2014 3:11 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Tue Nov 11, 2014 4:01 pm

Two camera modules finally started to work independently with the following dt-blob.dts (see the attached file). I followed the pin assign of jumper wires on the official page [1].

Unfortunately, the official dt-blob.dts setting [1] strangely does not work on my Raspberry pi Compute Module.

I hopes this helps :)

[1] http://www.raspberrypi.org/documentatio ... -camera.md

Code: Select all

            pins_cm {		
               pin_config {
                  [email protected] {
                     polarity = "active_high";
                     termination = "pull_down";
                     startup_state = "inactive";
                     function = "input";
                  }; // pin
	
                    // RasPi Compute Module with Two Cameras

                  [email protected]  { function = "output"; termination = "no_pulling";   	}; // CAMERA 1 LED PIN ENABLE
                  [email protected]  { function = "output"; termination = "no_pulling";   	}; // CAMERA 1 LED PIN ENABLE

                  [email protected] { function = "uart0";  termination = "no_pulling";    }; // TX uart0
                  [email protected] { function = "uart0";  termination = "pull_up"; 	}; // RX uart0

                  [email protected] { function = "output"; termination = "no_pulling";   	}; // CAMERA 0 LED PIN ENABLE
                  [email protected] { function = "output"; termination = "no_pulling";   	}; // CAMERA 0 LED PIN ENABLE
		  		  
                  [email protected] { function = "output"; termination = "pull_up";	}; // activity LED //
                  
                  [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD CLK
                  [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD CMD
                  [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D0
                  [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D1
                  [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D2
                  [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D3

               }; // pin_config
               pin_defines {

		  // RasPi Compute Module with Two Cameras : CAMERA_0
		  // SDA [email protected] 
		  // SCL [email protected]

		  // LED [email protected]
		  // SDN [email protected]

		  [email protected]_CAMERAS {
		      type = "internal";
		      number = <2>; 
		  };

	          
		  [email protected]_1_LED {
		      type = "internal";
		      number = <2>;
		  };
		  [email protected]_1_SHUTDOWN {
		      type = "internal";
		      number = <3>; 
		  };
	          [email protected]_1_UNICAM_PORT {
		      type = "internal";
		      number = <1>;
		  };
 	          [email protected]_1_I2C_PORT {
		      type = "internal";
		      number = <0>;
		  };
	          [email protected]_1_SDA_PIN {
		      type = "internal";
		      number = <0>;
		  };
	          [email protected]_1_SCL_PIN {
		      type = "internal";
		      number = <1>;
		  };
	          


	          
		  // RasPi Compute Module with Two Cameras : CAMERA_1
		  // SDA [email protected]
		  // SCL [email protected]

		  // LED [email protected]
		  // SDN [email protected]

	          
 	          [email protected]_0_LED {
		      type = "internal";
		      number = <30>;
		  };
 	          [email protected]_0_SHUTDOWN {
		      type = "internal";
		      number = <31>;
		  };
		  [email protected]_0_UNICAM_PORT {
		      type = "internal";
		      number = <0>; // 0 
		  };
	          [email protected]_0_I2C_PORT {
		      type = "internal";
		      number = <0>; // 0 
		  };
	          [email protected]_0_SDA_PIN {
		      type = "internal";
		      number = <28>;
		  };
	          [email protected]_0_SCL_PIN {
		      type = "internal";
		      number = <29>;
		  };


		  [email protected]_DISK_ACTIVITY {
		        type = "internal";
                     number = <47>; // works !
		  };

		  [email protected]_LOW {
		       type = "absent";
		  };
 
               }; // pin_defines
            }; // pins_cm
Attachments
dt-blob.dts.zip
Confirmed with two camera
(2.05 KiB) Downloaded 540 times

marcionetopen
Posts: 35
Joined: Wed Oct 22, 2014 11:59 am

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Nov 27, 2014 12:34 pm

I have a PI camera connected to the CAM0 interface. It is not working.
According to http://www.raspberrypi.org/documentatio ... -camera.md,

Connect up the I2C and GPIO lines.

Attach CD0_SDA (J6 pin 45) to GPIO28 (J6 pin 1).
Attach CD0_SCL (J6 pin 47) to GPIO29 (J6 pin 3).
Attach CAM0_IO1 (J6 pin 49) to GPIO30 (J6 pin 5).
Attach CAM0_IO0 (J6 pin 51) to GPIO31 (J6 pin 7).

But the pin's labels are different on the board.
They are not in the same position in J6 of the one stated in the manual.

What the actual connections I should follow? Can anybody send a picture?

I have compile the dts file using the one y m.furukawa posted.

Is there another thing I should do to make the camera work.

Thanks

I

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Nov 27, 2014 2:50 pm

marcionetopen wrote:But the pin's labels are different on the board.
They are not in the same position in J6 of the one stated in the manual.
Different how?

Since a few people have had trouble getting the camera to work, I will run through the steps myself tomorrow to make sure everything still works as expected.

User avatar
m.furukawa
Posts: 2
Joined: Sun Nov 09, 2014 3:11 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Nov 27, 2014 3:12 pm

Hi, marcionetopen

Here is my connection.
https://docs.google.com/file/d/0ByXw1Sp ... edit?pli=1

I've lost a lot of days because I completely thought two adapters attached to Compute Module IO Board are available for either CAM0 or CAM1. Fortunately I bought the two, then I've succeeded in working the two camera together using two same adapters marked "RPI-CAMERA".

marcionetopen
Posts: 35
Joined: Wed Oct 22, 2014 11:59 am

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Nov 27, 2014 3:20 pm

Thanks m.furukawa

Looking at the picture it seems that you connected PINS 28,29,30,31to C00-SDA, C00-SCL, CAM0-101, CAM0-100. Correct?
The DTC file is the same you post.

marcionetopen
Posts: 35
Joined: Wed Oct 22, 2014 11:59 am

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Nov 27, 2014 3:29 pm

m.furukawa

It worked as by your configuration ;) .
I wonder why http://www.raspberrypi.org/documentatio ... -camera.md shows different pins.

Thanks a lot

marcionetopen
Posts: 35
Joined: Wed Oct 22, 2014 11:59 am

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Nov 27, 2014 4:43 pm

Looking for the OV5647 device driver source code for Raspian. Can anybody tell me where I can find it?

Is it possible to capture image in raw mode?

Thanks

Bmohit
Posts: 6
Joined: Mon Dec 29, 2014 6:04 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Wed Jan 07, 2015 6:13 pm

Hello all!
I found this discussion very much useful for setting up both the cameras on my Compute module. Thank you m.furukawa for the perfectly working blob file.

I have some doubts.
Why we need jumper wires here and why doesn't Compute module supports both the cameras by 'default' ?
I tried to find the answer for my question..but couldn't find any satisfactory explanation. So..Please try to solve my doubt!
Thank you :)

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Wed Jan 07, 2015 6:28 pm

Bmohit wrote:Hello all!
I found this discussion very much useful for setting up both the cameras on my Compute module. Thank you m.furukawa for the perfectly working blob file.

I have some doubts.
Why we need jumper wires here and why doesn't Compute module supports both the cameras by 'default' ?
I tried to find the answer for my question..but couldn't find any satisfactory explanation. So..Please try to solve my doubt!
Thank you :)
The cmio board is supposed to be flexible. By leaving those pins unconnected, you're free to use whatever pins you want or, in theory, connect other dsi and csi devices.

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Feb 26, 2015 4:18 pm

Hi everyone,

I am trying to get 2 cameras working on the compute module but so far only CAM0 seems to be working.
I tried both the default dualcam.dts file provided on the official page http://www.raspberrypi.org/documentatio ... -camera.md and the altered version by m.furukawa.

I have the exact same pin connection as the one here https://docs.google.com/file/d/0ByXw1Sp ... edit?pli=1

here is the result of some debug commands :

Code: Select all

$ vcgencmd get_camera
supported=2 detected=1

Code: Select all

$ raspivid -cs 1 -d 
mmal : could not select camera : error 3
mmal : main: Failed to create camera component
mmal : Failed to run camera app. Please check for firmware updates
When I use -cs 0 it works fine and I can see the output of CAM0

Also, the LED on CAM1 is always on. As soon as I power up the CMIO board and it only shuts down when I unplug it... It happens also when the CMIO board is booted using USB slave mode.

I could send you a copy of my dts file but really I made no change to the two above.

Any clue ?

dweber
Posts: 22
Joined: Wed Dec 03, 2014 7:35 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Feb 27, 2015 7:48 am

Sounds like the CSI cable is not correctly attached or the GPIOs not correctly attached. I've got both cameras working using the default dualcam.dts.

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Feb 27, 2015 9:03 am

dweber wrote:Sounds like the CSI cable is not correctly attached or the GPIOs not correctly attached.
Diantre ! Looking closely at the hardware I have, I discovered that one of the camera adaptator is actually a display adaptator and reads CMIO-DISPLAY to RPI-DISPLAY... So I guess I assumed the bundle I ordered had two camera adaptator but actually I was wrong... I guess I'll have to order a new one then. Sorry to trigger a false alarm I'll let you know when I'll get a hand on a second camera adaptator.

fabioc
Posts: 2
Joined: Thu Oct 24, 2013 8:52 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Fri Feb 27, 2015 2:40 pm

Hi,

this is possibly unrelated to the cause of the problem faced by the previous poster, but I also had CAM1 not recognised, both on a single and a dual camera setup. On a dual camera setup, CAM0 would be recognised, no problem (I am using the right camera adaptor boards, as I have bought an extra set from Farnell).

I have been tearing my hair for the last two days, trying all sorts of wiring combinations and dt-blob.bin files but nothing. Also in my case, the led from CAM1 (but not CAM0) would come on (although to a much lower intensity than normal) during booting or even be permanently on in the case of dt-blob.bin being missing. Swapping the cameras around would not change anything so the problem looked to be confined to the CMIO board or to the firmware.

Then, by trial and error, I found a solution. Just link CAM1_IO1 and CAM1_IO0 to pins GPIO4 and GPIO5 instead of GPIO2 and GPIO3 and it will work (other GPIO's may work too)!! Of course, you need to change your dt-blob.bin and replace all references to GPIO2/GPIO3 with GPIO4/GPIO5 in the compute module section.

Really odd! Could someone try to replicate the problem (even with only one camera, using the dt-blob-cam1.bin file) to confirm this is possibly a bug in the firmware rather than me having purchased a dodgy CMIO board? I am running the latest firmware (as of this morning, 27/02/15) with all the packages up to date.

Hope this can help someone else.

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Mon Mar 02, 2015 9:57 am

Ok, I just got my second camera adapter and everything works just fine using m.furukawa's dts file. Next time I'll pay a little bit more attention to the stuff I buy...

Thanks for the support.

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Wed Mar 11, 2015 9:08 am

Well, that didn't last long...

Yesterday I did an apt-get update/upgrade and now CAM1 is gone!
I tried both furukawa's and regular dual camera dts files and I cannot get CAM1 to work. I tried swapping cameras and adapters and it's always CAM1 that doesn't come up.

I get the same kind of error as before :

Code: Select all

$ vcgencmd get_camera
supported=2 detected=1
and

Code: Select all

$ raspivid -cs 1 -d 
mmal : could not select camera : error 3
mmal : main: Failed to create camera component
mmal : Failed to run camera app. Please check for firmware updates
I'm gonna try to change GPIO2/GPIO3 to 4/5 as advise just above and let you know

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Wed Mar 11, 2015 9:48 am

OK here is an update about the previous post.

I did change pin numbers in the .dts file, compiled it to /boot/dt-blob.bin as advised by Fabioc. And it's working again, I can access both camera.

But I did not change the wiring... so the physical connection is still from GPIO2 to CAM1_IO1 and from GPIO3 to CAM1_IO0 and not from GPIO 4 and 5 as stated in the dts file :?
Also CAM1 LED is now always on but it's very faint, and it stays faint when the camera is being used.

There is clearly something I don't understand here but it's working so I'm not gonna push further.
Here is the .dts file I used : sxbn.org/~antoine/dt-blob_4_5.dts

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Wed Mar 11, 2015 10:01 am

Please don't try 'guessing' the right values. The documentation is 100% accurate, with the correct pins and sample files.

I haven't tried it recently, so there may very well be a recent software upgrade that broke it (very unlikely), but I can't support random dts files with guessed values.

If the report is confirmed by someone else who has had the cameras working before with a valid dts file, I can look into it.

guyver2
Posts: 33
Joined: Thu Feb 26, 2015 4:05 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Mar 12, 2015 2:12 pm

ShiftPlusOne wrote:Please don't try 'guessing' the right values. The documentation is 100% accurate, with the correct pins and sample files.

I haven't tried it recently, so there may very well be a recent software upgrade that broke it (very unlikely), but I can't support random dts files with guessed values.

If the report is confirmed by someone else who has had the cameras working before with a valid dts file, I can look into it.
I wasn't trying to guess the values, I was just trying to get it to work. The documentation in my case was 100% accurate until the beginning of the week when I did an upgrade. I cannot say how long it was since the previous upgrade so I do not blame the last update of anything. Also nobody is asking to support random dts files. They're just here to help other people that might have similar issues. If it wasn't for Fabioc's post I would still have my CMIO and 2 cameras uselessly lying on my desk.

robeche
Posts: 2
Joined: Wed Feb 18, 2015 8:51 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Mar 12, 2015 7:41 pm

Same problem with my compute module...
* not working with the dts file in the documentation, so I don't think it is 100% accurate at all...
* Cam0 working with Furukawa dts
* Both cams working after changing GPIO connections 2>>4 and 3>>5... And also changing dts file and recompiling
I have the same issue with the LED

I know it must be difficult to work with so many people, but we are not doing things arbitrarily, it's just that we don't like to get stuck...

Kind regards

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5717
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Mar 12, 2015 8:55 pm

What made me say please don't guess values is this and people using the resulting dtb file.
Then, by trial and error, I found a solution. Just link CAM1_IO1 and CAM1_IO0 to pins GPIO4 and GPIO5 instead of GPIO2 and GPIO3 and it will work (other GPIO's may work too)!!!
Alright, I'll run through the steps with the latest firmware tomorrow, thanks folks.

juanchoal
Posts: 1
Joined: Thu Mar 12, 2015 11:06 pm

Re: CAM1 not detected on CMIO board with default dt-blob.dts

Thu Mar 12, 2015 11:18 pm

guyver2 wrote:OK here is an update about the previous post.

I did change pin numbers in the .dts file, compiled it to /boot/dt-blob.bin as advised by Fabioc. And it's working again, I can access both camera.

But I did not change the wiring... so the physical connection is still from GPIO2 to CAM1_IO1 and from GPIO3 to CAM1_IO0 and not from GPIO 4 and 5 as stated in the dts file :?
Also CAM1 LED is now always on but it's very faint, and it stays faint when the camera is being used.

There is clearly something I don't understand here but it's working so I'm not gonna push further.
Here is the .dts file I used : sxbn.org/~antoine/dt-blob_4_5.dts
This solution also worked for me, i was having a hard time making the cameras work, thank you man.

Return to “Compute Module”