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

How to debug faulty connection to camera board?

Tue Jun 30, 2020 1:54 pm

Hello,

I am building a carrier board for the CM3+ connected with, among other things, a Camera Board. At the moment I am prototyping developing using a Gumstix breakout board that exposes all the pins of the CM to headers.
Until last week it worked connecting the relevant pin of CAM0, the GPIOs pins to control SCL and SDA and IO0/1 and ground/3v3 to a custom board that exposes a Hirose FPC connector that, in turn, was connected to the camera board (v2.1)
It worked.

Then, before taking a precise picture of the whole setup, I unconnected everything (silly me). I had written down the connections, but since then I am not been able to replicate the working setup. I've checked the wiring dozen of times, changed cables and cameras.. nothing.

The camera board works, because I've connected it to another RaspberryPiZero.

Does anybody know how to start debugging and discovering what connection/pin is wired wrong, broken?
Please note that vcgencmd detects the camera.
pi@raspcm(ro):~$ vcgencmd get_camera
supported=1 detected=1
pi@raspcm(ro):~$ sudo raspivid -f -t 0 -md 6 -fps 30 -w 320 -h 240 -hf
Camera control callback cmd=0x4f525245mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board
Any idea of a script/program that test single lines and could narrow down the possible issues?
Thanks
Z

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

Re: How to debug faulty connection to camera board?

Wed Jul 08, 2020 1:42 pm

Just to update since I am quite desperate..

here are the pics of my latest setup, still not working. I don't know how it is possible that once it worked and now I doesn't anymore. I've also not touched the CM eeprom since then.
The camera module works. Just tested on another raspberry Pi zero with the adapter flat cable (and I keep retesting every day just to be sure).

I've checked every pin at the end of the flat white ribbon cable with a multimeter, by connecting each one to 3v3 on the big compute module breakout board (removing the CM3+ beforehand!), and they carry the signals from breakout board to end of the cable (so there is no broken wire/connection/bridge anywhere). So I am reasonably sure electrically every signals go from CM3+ to the camera board as expected.

I suspect a big mistake in wiring on my part, but I don't see it..
IMG_4224.jpg
IMG_4224.jpg (71.49 KiB) Viewed 190 times
This is my wiring:

Code: Select all

CAM0    GUMSTIX     FPC PIN
DN1 ->    57    ->    5  orange
DP1 ->    58    ->    6  orange dot
CLKN ->   59    ->    8  green
CLKP ->   60    ->    9  green dot
DN0 ->    61    ->    2  blue
DP0 ->    62    ->    3  blue dot
SCL ->   100    ->   13  yellow
SDA ->    99    ->   14  purple
3V3 ->    45    ->   15  red paola 
IO0 ->   102    ->   11  brown
IO1 ->   101    ->   x(12)   gray
GND ->          ->    1,4,7,10 

```
and I've taken this as a guide, among many others camera board schematics v2

and this is the relevant part in the device tree on the CM:

Code: Select all

pin_define@CAMERA_0_LED {
          type = "internal";
          number = <30>;
        };
        pin_define@CAMERA_0_SHUTDOWN {
          type = "internal";
          number = <31>;
        };
        pin_define@CAMERA_0_UNICAM_PORT {
          type = "internal";
          number = <0>;
        };
        pin_define@CAMERA_0_I2C_PORT {
          type = "internal";
          number = <0>;
        };
        pin_define@CAMERA_0_SDA_PIN {
          type = "internal";
          number = <28>;
        };
        pin_define@CAMERA_0_SCL_PIN {
          type = "internal";
          number = <29>;
        };
on the gumstix breakout board, CAM0 signals goes from pin 62 to 57 and relevant GPIOs (28-31) foes from pin 99 to 102

the black dot is pin number 1, according to literature and by looking ath the camera module (differential pairs are towards the pin number 1, while VCC is the opposite side of the connector). Never mind the breakout board that has wrong numbering for bottom facing contacts.
IMG_4226.jpg
IMG_4226.jpg (136.36 KiB) Viewed 190 times
IMG_4228.jpg
IMG_4228.jpg (138.95 KiB) Viewed 190 times
Does anybody sees some obvious mistake?
Thanks
Z

msl
Posts: 4
Joined: Tue Jul 07, 2020 9:12 pm

Re: How to debug faulty connection to camera board?

Wed Jul 08, 2020 1:54 pm

MIPI CSI is not something you’d like to route with spaghetti wires.
Worth trying to twist CP/CN and DxP/DxN signals

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

Re: How to debug faulty connection to camera board?

Wed Jul 08, 2020 2:21 pm

MIPI DSI should be lenght matched, 100ohm impedance wires/traces ... don't think you're wiring comes close to this. As mentioned already, at least you schould twist the differential signal wires.

Where to hell did you connect the camera to like that? Why not use the CMIO in favour of your gumstix board? You have reasnoable connections for the MIPI signals at least (seems this is entirely missing on your board, and/or following a 'non-standard' way)

Btw: the FPC which you get together with an official RPi Zero case can be used with the CMIO CSI interface

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

Re: How to debug faulty connection to camera board?

Wed Jul 08, 2020 2:33 pm

Hi msl,
I know but I don't see an easy way to test a setup if not with spaghetti wires. Anyway it's a sound and nice idea worth trying. I've twisted the 3 pairs (see pic). Same result unfortunately :(
IMG_4229.jpg
IMG_4229.jpg (178.23 KiB) Viewed 150 times
Besides as you can see from this pic
IMG_3208.jpg
IMG_3208.jpg (157.94 KiB) Viewed 150 times
spaghetti wires worked even without being twisted.
You see on the right I connected the wires to a HDMI breakout board, then to a hdmi cable and then to a HDMI <-> Camera board adapter (and on the display that's me at the desktop).

So even though theoretically I agree with you, I can vouch that this setup can work. To reduce complexity in debugging the setup I've found a FPC15 connector breakout and skipped all the HDMI conversion (to and from) even though it's a setup that per se works..

Thanks anyway!
z

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

Re: How to debug faulty connection to camera board?

Wed Jul 08, 2020 2:45 pm

Hi again aBUGSworstnightmare!

as for the Gumstix board, I still prefer it to the official one because I plan to (and have already started) design a carrier board with custom ports, and so I need a complete breakout of the CM pins to do some prototyping. Among other things I don't need the standard camera connector but I'd like the raw CAM0 pins which (maybe I am wrong) are not available on the CMIO board.

Besides FPC connectors are too flimsy (especially the smaller one like the one on the pi Zero). I've broken a few and the fpc won't stick without some generous help of glue/duct tape.

As i have answered a few minutes ago, I know the setup was and is sub optimal, but for testing it worked (see previous pic), and it worked constantly and stable for around one month. Then I decided to dewire the setup and try another one.. and then no more..

I am sure I am missing something big and stupid..
Thanks for helping as usual!

Z

PS looking at the Gumstix board I see the differential pairs signals snaking in parallel (three pairs) to the correct pins.

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

Re: How to debug faulty connection to camera board?

Wed Jul 08, 2020 5:54 pm

CMIO has both CSI as well as both DSI available on FPC connectors. Don't like them two as they are two small and are not designed for beeing opend/closed frequently..

My 'breadboards' are Dimm200 PCBs since I have the LVDS4CM3L board... Not that cheap but so far all of them worked (hopefully the one which is in the mail will work too.. Deals with 4-lane DSI)

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

Re: How to debug faulty connection to camera board?

Wed Jul 08, 2020 7:32 pm

hi aBUGSworstnightmare,

so if I understand you correctly, you also prefer something different for CSI connections? Did you design the PCBs yourself or are they available to buy someplace?
In what do they differ from the Gumstix ones?

But this does not solve my conundrum.. why i nthe world did I unwire the setup before making hundreds of pictures of every connection? :cry: :cry:

Thanks,
Z

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

Re: How to debug faulty connection to camera board?

Thu Jul 09, 2020 7:02 am

zontar wrote:
Wed Jul 08, 2020 7:32 pm
so if I understand you correctly, you also prefer something different for CSI connections? Did you design the PCBs yourself or are they available to buy someplace?
In what do they differ from the Gumstix ones?
No, in order to make use of the standard cables I'm using the 15pin Molex connector on by boards as well.

I have my own baseboard design which has an expansion slot, exposing all relevant interfaces (including 4-lane DSI/CSI). You can get an idea here viewtopic.php?f=98&t=188450&hilit=expan ... d#p1292408

So, when ever I think it's time for burning some money I start developing a new expansion board (SODIMM200 interface), allowing me to test new HW at low risk.
O.k. ... one could say why not do this on a standard Pi? Question is simple: it doesn't expose 4-lane MIPI interfaces and all of the GPIOs.
In case of the CMIO I would have to use the small pitch FPC connectors ... which I realy dislike

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

Re: How to debug faulty connection to camera board?

Thu Jul 09, 2020 2:09 pm

Ok,
so the Gumstix is just a generic expansion testing board.
What I am doing different from you is wiring the GPIO/CAM pins to a second breakout board and thence to a Molex 15 connector, so it should not ben that different.
I know about the differential pairs.. but it seems to me that since they worked untwisted a little while ago, they should work now.

I am really at a loss as to what to do. Maybe I can start writing low level code to test every signal and combination of signals? Any idea of where to start?

Thanks
Z

Return to “Compute Module”