arloomis11
Posts: 6
Joined: Tue Dec 05, 2017 10:09 pm

[SOLVED] CM3 working with only one camera, two detected

Tue Dec 05, 2017 10:28 pm

Hello,
I am working on a custom board with the CM3 module and am having trouble using both cameras with the CM3. I have had to modify the default 2 camera dt-blob file for our custom layout, and by switching the camera 1 and 0 define statements I have gotten both cameras detected, as seen here:

Code: Select all

pi@raspberrypi:~$ vcgencmd get_camera
supported=2 detected=2
pi@raspberrypi:~$ sudo vcdbg log msg
001387.170: brfs: File read: /mfs/sd/config.txt
001388.026: brfs: File read: 1613 bytes
001388.969: brfs: File read: /mfs/sd/dt-blob.bin
001752.597: HDMI:EDID error reading EDID block 0 attempt 0
002114.578: HDMI:EDID error reading EDID block 0 attempt 1
002476.557: HDMI:EDID error reading EDID block 0 attempt 2
002838.537: HDMI:EDID error reading EDID block 0 attempt 3
003200.517: HDMI:EDID error reading EDID block 0 attempt 4
003562.497: HDMI:EDID error reading EDID block 0 attempt 5
003924.477: HDMI:EDID error reading EDID block 0 attempt 6
004286.458: HDMI:EDID error reading EDID block 0 attempt 7
004648.437: HDMI:EDID error reading EDID block 0 attempt 8
005010.417: HDMI:EDID error reading EDID block 0 attempt 9
005011.438: HDMI:EDID giving up on reading EDID block 0
005015.394: brfs: File read: 8226 bytes
005019.388: brfs: File read: /mfs/sd/config.txt
005020.118: HDMI:Setting property pixel encoding to Default
005020.139: HDMI:Setting property pixel clock type to PAL
005020.158: HDMI:Setting property content type flag to No data
005020.179: HDMI:Setting property fuzzy format match to enabled
005020.256: gpioman: gpioman_get_pin_num: pin DISPLAY_SDA not defined
005021.952: gpioman: gpioman_get_pin_num: pin BT_ON not defined
005021.974: gpioman: gpioman_get_pin_num: pin WL_ON not defined
005059.727: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
005059.752: hdmi: HDMI:>>>>>>>>>>>>>Rx sensed, reading EDID<<<<<<<<<<<<<
005420.802: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
005782.786: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
006144.770: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
006506.755: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
006868.739: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
007230.724: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
007592.709: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
007954.693: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
008316.678: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
008678.662: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
008679.689: hdmi: HDMI:EDID giving up on reading EDID block 0
008679.722: hdmi: HDMI: No lookup table for resolution group 0
008679.741: hdmi: HDMI: hotplug attached with DVI support
008679.776: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
009040.803: hdmi: HDMI:EDID error reading EDID block 0 attempt 0
009402.789: hdmi: HDMI:EDID error reading EDID block 0 attempt 1
009764.775: hdmi: HDMI:EDID error reading EDID block 0 attempt 2
010126.761: hdmi: HDMI:EDID error reading EDID block 0 attempt 3
010488.747: hdmi: HDMI:EDID error reading EDID block 0 attempt 4
010850.733: hdmi: HDMI:EDID error reading EDID block 0 attempt 5
011212.719: hdmi: HDMI:EDID error reading EDID block 0 attempt 6
011574.705: hdmi: HDMI:EDID error reading EDID block 0 attempt 7
011936.691: hdmi: HDMI:EDID error reading EDID block 0 attempt 8
012298.677: hdmi: HDMI:EDID error reading EDID block 0 attempt 9
012299.705: hdmi: HDMI:EDID giving up on reading EDID block 0
012300.458: hdmi: HDMI: hotplug deassert
012300.472: hdmi: HDMI: HDMI is currently off
012300.486: hdmi: HDMI: changing mode to unplugged
012300.510: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
012301.257: *** Restart logging
012301.284: brfs: File read: 1613 bytes
012304.379: brfs: File read: /mfs/sd/cmdline.txt
012304.444: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=c74d3f2f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
012304.706: brfs: File read: 142 bytes
012624.162: brfs: File read: /mfs/sd/kernel7.img
012624.187: Loading 'kernel7.img' to 0x8000 size 0x45e130
012624.231: No kernel trailer - assuming DT-capable
012624.259: brfs: File read: 4579632 bytes
012628.129: brfs: File read: /mfs/sd/bcm2710-rpi-cm3.dtb
012628.153: Loading 'bcm2710-rpi-cm3.dtb' to 0x466130 size 0x40a6
012727.893: brfs: File read: 16550 bytes
012732.452: brfs: File read: /mfs/sd/config.txt
012732.964: dtparam: spi=on
013705.720: Device tree loaded to 0x2effbb00 (size 0x44cf)
013707.236: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
014948.707: vchiq_core: vchiq_init_state: slot_zero = 0xf7980000, is_master = 1
014952.915: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
071102.613: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 30, power enable gpio = 31
071104.555: camsubs: Camera found OK
071111.639: camsubs: Looking for camera 1: i2c_port = 0, led gpio = 42, power enable gpio = 43
071113.268: camsubs: Camera found OK
071115.333: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
071115.361: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
071115.410: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
071115.438: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
071115.472: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
071115.494: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
154232.843: brfs: File read: 1613 bytes
154396.761: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
154396.789: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
160528.630: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
530735.097: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
530735.124: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
536715.552: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
The strange thing is that only camera one is working, camera 0 gives a ENOSPC error:

Code: Select all

pi@raspberrypi:~$ raspistill -cs 1 -o test5.jpg
pi@raspberrypi:~$ raspistill -cs 0 -o test5.jpg
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
Here is my dt-blob file:

Code: Select all

/dts-v1/;

/ {
  videocore {

    pins_cm {

      pin_config {

        pin@default {
          polarity = "active_high";
          termination = "pull_down";
          startup_state = "inactive";
          function = "input";
        }; // pin

        // BANK 0 - USER GPIO //
        pin@p0  { function = "input";   termination = "pull_up";    }; // GPU WILL USE THIS PIN FOR CAMERA 0 I2C0 SDA
        pin@p1  { function = "input";   termination = "pull_up";    }; // GPU WILL USE THIS PIN FOR CAMERA 0 I2C0 SCL
        pin@p2  { function = "output";  termination = "no_pulling"; }; // GPU WILL USE THIS PIN FOR CAMERA 0 LED
        pin@p3  { function = "output";  termination = "no_pulling"; }; // GPU WILL USE THIS PIN FOR CAMERA 0 SHUTDOWN
        pin@p4  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        pin@p5  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        pin@p6  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        pin@p7  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        pin@p8  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        pin@p9  { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p10 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p11 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p12 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p13 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
///////////////////////////////////////////
// TO ENABLE UART0 UNCOMMENT THESE 2 LINES:
//       pin@p14 { function = "uart0";   termination = "no_pulling"; }; // UART0 TX
//       pin@p15 { function = "uart0";   termination = "pull_up";    }; // UART0 RX
// AND COMMENT OUT/REMOVE THESE 2 LINES:
        pin@p14 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p15 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
///////////////////////////////////////////
        pin@p16 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p17 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p18 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p19 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p20 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p21 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p22 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p23 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p24 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p25 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p26 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p27 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE

        // BANK 1 - USER GPIO//
        pin@p28 { function = "input";   termination = "pull_up";    }; // GPU WILL USE THIS PIN FOR CAMERA 1 I2C0 SDA
        pin@p29 { function = "input";   termination = "pull_up";    }; // GPU WILL USE THIS PIN FOR CAMERA 1 I2C0 SCL
        pin@p30 { function = "output";  termination = "no_pulling"; }; // GPU WILL USE THIS PIN FOR CAMERA 1 LED
        pin@p31 { function = "output";  termination = "no_pulling"; }; // GPU WILL USE THIS PIN FOR CAMERA 1 SHUTDOWN
        pin@p32 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p33 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p34 { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        pin@p35 { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        pin@p36 { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        pin@p37 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p38 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p39 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p40 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p41 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p42 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p43 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        pin@p44 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE WAS INPUT NO PULL
        pin@p45 { function = "input";   termination = "pull_down";  }; // DEFAULT STATE WAS INPUT NO PULL

        // BANK 2 - DON'T TOUCH UNLESS YOU KNOW WHAT YOU'RE DOING //
        pin@p46 { function = "input";   termination = "no_pulling"; drive_strength_mA = <8>; polarity = "active_high"; }; // HPD_N
        pin@p47 { function = "output";  termination = "no_pulling"; drive_strength_mA = <8>; polarity = "active_low"; startup_state = "active"; }; // STATUS LED / EMMC_DISABLE_N CONTROL
        pin@p48 { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD CLK
        pin@p49 { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD CMD
        pin@p50 { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD D0
        pin@p51 { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD D1
        pin@p52 { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD D2
        pin@p53 { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD D3

      }; // pin_config

      pin_defines {
        pin_define@EMMC_ENABLE {
           type = "internal";
           number = <47>;
        };

        pin_define@NUM_CAMERAS {
          type = "internal";
          number = <2>;
        };
        pin_define@CAMERA_0_LED {
          type = "internal";
          number = <2>;
        };
        pin_define@CAMERA_0_SHUTDOWN {
          type = "internal";
          number = <3>;
        };
        pin_define@CAMERA_0_UNICAM_PORT {
          type = "internal";
          number = <1>;
        };
        pin_define@CAMERA_0_I2C_PORT {
          type = "internal";
          number = <0>;
        };
        pin_define@CAMERA_0_SDA_PIN {
          type = "internal";
          number = <0>;
        };
        pin_define@CAMERA_0_SCL_PIN {
          type = "internal";
          number = <1>;
        };
        pin_define@CAMERA_1_LED {
          type = "internal";
          number = <30>;
        };
        pin_define@CAMERA_1_SHUTDOWN {
          type = "internal";
          number = <31>;
        };
        pin_define@CAMERA_1_UNICAM_PORT {
          type = "internal";
          number = <0>;
        };
        pin_define@CAMERA_1_I2C_PORT {
          type = "internal";
          number = <0>;
        };
        pin_define@CAMERA_1_SDA_PIN {
          type = "internal";
          number = <28>;
        };
        pin_define@CAMERA_1_SCL_PIN {
          type = "internal";
          number = <29>;
        };
      }; // pin_defines

    }; // pins_cm


    pins_cm3 {

      pin_config {

        pin@default {
          polarity = "active_high";
          termination = "pull_down";
          startup_state = "inactive";
          function = "input";
        }; // pin

        pin@p0  { function = "input";  termination = "pull_up";    }; // CAMERA 0 I2C0 SDA
        pin@p1  { function = "input";  termination = "pull_up";    }; // CAMERA 0 I2C0 SCL
        pin@p42  { function = "output"; termination = "no_pulling"; }; // CAMERA 0 LED
        pin@p43  { function = "output"; termination = "no_pulling"; }; // CAMERA 0 SHUTDOWN
        pin@p14 { function = "uart0";  termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0
        pin@p15 { function = "uart0";  termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0
        pin@p28 { function = "input";  termination = "pull_up";    }; // CAMERA 1 I2C0 SDA
        pin@p29 { function = "input";  termination = "pull_up";    }; // CAMERA 1 I2C0 SCL
        pin@p30 { function = "output"; termination = "no_pulling"; }; // CAMERA 1 LED
        pin@p31 { function = "output"; termination = "no_pulling"; }; // CAMERA 1 SHUTDOWN
	//pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // 25MHz Clock
        pin@p46 { function = "input";  termination = "pull_up";    }; // SMPS_SCL
        pin@p47 { function = "input";  termination = "pull_up";    }; // SMPS_SDA
        pin@p48 { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD CLK
        pin@p49 { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD CMD
        pin@p50 { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D0
        pin@p51 { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D1
        pin@p52 { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D2
        pin@p53 { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D3
        pin@p128 { function = "input";  termination = "no_pulling"; polarity = "active_low"; }; // Hotplug
        pin@p129 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N
      }; // pin_config

      pin_defines {
        pin_define@HDMI_CONTROL_ATTACHED {
           type = "external";
           number = <0>;
        };
        pin_define@EMMC_ENABLE {
           type = "external";
           number = <1>;
        };
        pin_define@POWER_LOW {
           type = "absent";
        };
        pin_define@LEDS_DISK_ACTIVITY {
           type = "absent";
        };
        pin_define@LAN_RUN {
           type = "absent";
        };
        pin_define@SMPS_SDA {
           type = "internal";
           number = <46>;
        };
        pin_define@SMPS_SCL {
           type = "internal";
           number = <47>;
        };
        pin_define@ETH_CLK {
           type = "absent";
        };
        pin_define@WL_LPO_CLK {
           type = "absent";
        };
        pin_define@USB_LIMIT_1A2 {
           type = "absent";
        };
        pin_define@SIO_1V8_SEL {
           type = "absent";
        };
        pin_define@PWML {
           type = "absent";
        };
        pin_define@PWMR {
           type = "absent";
        };
        pin_define@SAFE_MODE {
           type = "absent";
        };
        pin_define@SD_CARD_DETECT {
           type = "absent";
        };
        pin_define@ID_SDA {
           type = "absent";
        };
        pin_define@ID_SCL {
           type = "absent";
        };

        pin_define@NUM_CAMERAS {
          type = "internal";
          number = <2>;
        };
        pin_define@CAMERA_1_LED {
          type = "internal";
          number = <42>;
        };
        pin_define@CAMERA_1_SHUTDOWN {
          type = "internal";
          number = <43>;
        };
        pin_define@CAMERA_1_UNICAM_PORT {
          type = "internal";
          number = <1>;
        };
        pin_define@CAMERA_1_I2C_PORT {
          type = "internal";
          number = <0>;
        };
        pin_define@CAMERA_1_SDA_PIN {
          type = "internal";
          number = <0>;
        };
        pin_define@CAMERA_1_SCL_PIN {
          type = "internal";
          number = <1>;
        };
        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>;
        };
      }; // pin_defines

    }; // pins_cm3
    //clock_setup {
    //   clock@PWM { freq = <2400000>; };
    //   clock@GPCLK0 { freq = <12288000>; };
    //  clock@GPCLK1 { freq = <25000000>; };
    //   };
  };

};
And here is my config.txt file:

Code: Select all

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=off
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on
start_x=1
gpu_mem=128
Please let me know if you need my schematic, since both cameras are detected this is a very strange problem, I'm not sure if it is a hardware issue.

arloomis11
Posts: 6
Joined: Tue Dec 05, 2017 10:09 pm

Re: CM3 working with only one camera, two detected

Thu Dec 07, 2017 7:47 pm

I saw this thread: viewtopic.php?f=43&t=175110

The problem in that thread was the security chip in the camera module. I had a similar error output for "sudo vcdbg log assert". I switched the camera modules, with no change to one camera not working with raspistill. It seems the CAM0 interface for the CM3 is just not working for me, not sure if it is a hardware or software problem.

Code: Select all

pi@raspberrypi:~ $ sudo vcdbg log assert
095605.509: assert( 0 ) failed; ../../../../../vcfw/drivers/device/camera/imx219.c::imx219_open line 432 rev 38ac725
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
095605.547: assert( open_camera_driver: camera open failed ) failed; ../../../../../middleware/camplus/cdi/cdi_camera.c::open_camera_driver line 706 rev 38ac725
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
095605.581: assert( cdi_camera_open: Failed to open camera driver/perihperal ) failed; ../../../../../middleware/camplus/cdi/cdi_camera.c::cdi_camera_open line 543 rev 38ac725
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
095605.641: assert( retcode == 0 ) failed; ../../../../../middleware/openmaxil/components/camera.c::load_and_open_cdi line 12064 rev 38ac725
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
095605.703: assert( id->cdi!=NULL && id->cdi_handle!=NULL ) failed; ../../../../../middleware/openmaxil/components/camera.c::open_camplus line 11411 rev 38ac725
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------
I also saw in this post that the gpu might be running out of memory: https://raspberrypi.stackexchange.com/q ... dule/56906

I increased the gpu_mem in the config.txt file to 512 with no change.

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

Re: CM3 working with only one camera, two detected

Thu Dec 07, 2017 8:33 pm

I'll have a try tomorrow and see what I get. I'm 99% certain I've run a pair of v2 cameras, but not recently.

There's also the intent to not require the crypto chip on compute modules anyway. If you're really stuck then please pm me as there is something we can do to help you in the short term for prototyping.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

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

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 11:39 am

I've tried this out with a CM3 and two V2.1 camera modules with no issue using the stock config.
Using your config and repatching 2&3 to 42&43 on the CMIO is also working fine.

It has made me think of the IO bank supply voltages on GPIO0_27_VREF and GPIO28-45_VREF (SODIMM pins 39 & 41 by the looks of it).
The sensor itself is running off 1V8 via a regulator on the camera board, so is probably happy to communicate at 1V8. The crypto chip is on 3V3, so may well not be happy.

Second thought is that there are no I2C pullups on that I'm aware of on the CM or CMIO, so is the I2C correctly pulled up to 3V3 externally? Otherwise I believe you're relying on the ~50k pullups within the SoC. The CMIO has external 100k pull downs on 28&29 (and 44&45) as there are no pulls enabled on them at boot.

PM's exchanged over disabling crypto on CMs. I'm waiting on someone else now, but will get back to you as soon as I can.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

arloomis11
Posts: 6
Joined: Tue Dec 05, 2017 10:09 pm

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 2:37 pm

So I added that line to my config.txt file to bypass the crypto, and now both cameras work (most of the time)!

I do not have pullups for the camera's I2C lines, I was following the CMIO board schematic for the camera as much as possible, and I did not see any pullups on that schematic. Now I am having success with both cameras, but every couple attempts doing raspistill or raspivid I get a ENOSPC error or "No data received from camera" error.

Do you think this unreliability is due to the lack of the pullup resistors? In the next board revision, I'll add some pullup resistors and see if the problem goes away. For now, this temporary solution should work okay.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1419
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 2:47 pm

Look again - there are pullups on the CMIO board for the I2C signals carried by the CSI and DSI connectors - search for "1.8K".

arloomis11
Posts: 6
Joined: Tue Dec 05, 2017 10:09 pm

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 3:03 pm

Oops! You're certainly right, I'm not sure how I missed those. Would that explain the problem I'm having?

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

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 4:00 pm

arloomis11 wrote:
Fri Dec 08, 2017 3:03 pm
Oops! You're certainly right, I'm not sure how I missed those. Would that explain the problem I'm having?
I missed them too as I was looking at the GPIO pin side, not the camera/display connectors. :oops:

Yes, no pull ups on an I2C bus is going to give issues. I2C relies on those pullups to pull the line high as the devices only ever pull it low (look up open drain output).
As a temporary hack, it wouldn't be too difficult to add the required pull ups to the camera end - soldering wires onto the 15 pin flexi connector isn't too bad (pins 13&14 for SCL and SDA, and pin 15 for 3V3).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

arloomis11
Posts: 6
Joined: Tue Dec 05, 2017 10:09 pm

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 4:06 pm

So is the I2C on the camera interface just for the crypto chip? Is that why bypassing it fixed the problem? I will definitely add those pullup resistors in my next revision, and bodge some on for now to see if it helps.

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

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 4:21 pm

arloomis11 wrote:
Fri Dec 08, 2017 4:06 pm
So is the I2C on the camera interface just for the crypto chip? Is that why bypassing it fixed the problem? I will definitely add those pullup resistors in my next revision, and bodge some on for now to see if it helps.
No, the camera commands are sent via I2C. i.e. setup, start, stop. The camera and crypto are on the same bus, so any problems on the bus will affect both. But the camera won't work at all if the crypto chip isn't present, unless you have whatever mod 6by9 provided. Now it works a bit, but still needs those pull ups because clearly communications are erratic.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

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

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 4:29 pm

Minor correction to James.
I2C is used to both crypto and sensor, but the sensor I2C goes through a level shifter to 1V8 which is likely to shift the acceptable high and low voltages to it, but by the sounds of it even those are behaving erratically.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

arloomis11
Posts: 6
Joined: Tue Dec 05, 2017 10:09 pm

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 8:37 pm

I took out the line to bypass the crypto chip, and added pullup resistors to the I2C lines and now everything is working great, the problem was definitely the resistors. Thanks for all your help!

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

Re: CM3 working with only one camera, two detected

Fri Dec 08, 2017 11:42 pm

6by9 wrote:
Fri Dec 08, 2017 4:29 pm
Minor correction to James.
I2C is used to both crypto and sensor, but the sensor I2C goes through a level shifter to 1V8 which is likely to shift the acceptable high and low voltages to it, but by the sounds of it even those are behaving erratically.
ooh, I did not know that!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Return to “Compute Module”

Who is online

Users browsing this forum: No registered users and 6 guests