0 Replies Latest reply on Nov 14, 2017 4:03 AM by r2work

    Cameras not detected! vcgencmd get_camera outputs supported=2, detected=0 in cm3 with emmc flash

    r2work

      Hi,I am new to raspberry pi compute module.

      I was working with the cm3 lite before this with a full desktop version installed and hence had no problems with the camera modules.

      Since my cm3 lite got short i have to use the cm3 with flash memory which has the jessie lite version installed.

      I did the procedure in the rpi in order to support dual cameras and hopefully succeeded with the blob files. I have connected the gpio pins for the camera setup as given in the tutorial

      https://www.raspberrypi.org/documentation/hardware/computemodule/cmio-camera.md

       

      I reboot the pi and i run the command vcgencmd version which outputs

       

      Nov  3 2017 17:05:40

      Copyright (c) 2012 Broadcom

      version 1bcf9152e3b2ab5c67dcb9c7c1f6d9256d9a6f38 (clean) (release)

       

      then, i ran vcgencmd get_camera which outputs

       

      supported=2, detected=0

       

      shows that the blob files are right.

      To check the gpio pins i ran sudo raspi-gpio get and found that the raspi-gpio package was not installed as I was using the lite version. Then I installed it using sudo apt-install raspi-gpio

       

      And now, sudo raspi-gpio get outputs

       

      [code]BANK0 (GPIO 0 to 27):

        GPIO 00: level=0 fsel=0 alt=  func=INPUT

        GPIO 01: level=0 fsel=0 alt=  func=INPUT

        GPIO 02: level=0 fsel=1 alt=  func=OUTPUT

        GPIO 03: level=0 fsel=1 alt=  func=OUTPUT

        GPIO 04: level=0 fsel=0 alt=  func=INPUT

        GPIO 05: level=0 fsel=0 alt=  func=INPUT

        GPIO 06: level=0 fsel=0 alt=  func=INPUT

        GPIO 07: level=0 fsel=0 alt=  func=INPUT

        GPIO 08: level=0 fsel=0 alt=  func=INPUT

        GPIO 09: level=0 fsel=0 alt=  func=INPUT

        GPIO 10: level=0 fsel=0 alt=  func=INPUT

        GPIO 11: level=0 fsel=0 alt=  func=INPUT

        GPIO 12: level=0 fsel=0 alt=  func=INPUT

        GPIO 13: level=0 fsel=0 alt=  func=INPUT

        GPIO 14: level=0 fsel=4 alt=0 func=TXD0

        GPIO 15: level=0 fsel=4 alt=0 func=RXD0

        GPIO 16: level=0 fsel=0 alt=  func=INPUT

        GPIO 17: level=0 fsel=0 alt=  func=INPUT

        GPIO 18: level=0 fsel=0 alt=  func=INPUT

        GPIO 19: level=0 fsel=0 alt=  func=INPUT

        GPIO 20: level=0 fsel=0 alt=  func=INPUT

        GPIO 21: level=0 fsel=0 alt=  func=INPUT

        GPIO 22: level=0 fsel=0 alt=  func=INPUT

        GPIO 23: level=0 fsel=0 alt=  func=INPUT

        GPIO 24: level=0 fsel=0 alt=  func=INPUT

        GPIO 25: level=0 fsel=0 alt=  func=INPUT

        GPIO 26: level=0 fsel=0 alt=  func=INPUT

        GPIO 27: level=0 fsel=0 alt=  func=INPUT

      BANK1 (GPIO 28 to 45):

        GPIO 28: level=0 fsel=4 alt=0 func=SDA0

        GPIO 29: level=0 fsel=4 alt=0 func=SCL0

        GPIO 30: level=0 fsel=1 alt=  func=OUTPUT

        GPIO 31: level=0 fsel=1 alt=  func=OUTPUT

        GPIO 32: level=0 fsel=0 alt=  func=INPUT

        GPIO 33: level=0 fsel=0 alt=  func=INPUT

        GPIO 34: level=0 fsel=0 alt=  func=INPUT

        GPIO 35: level=0 fsel=0 alt=  func=INPUT

        GPIO 36: level=0 fsel=0 alt=  func=INPUT

        GPIO 37: level=0 fsel=0 alt=  func=INPUT

        GPIO 38: level=0 fsel=0 alt=  func=INPUT

        GPIO 39: level=0 fsel=0 alt=  func=INPUT

        GPIO 40: level=0 fsel=0 alt=  func=INPUT

        GPIO 41: level=0 fsel=0 alt=  func=INPUT

        GPIO 42: level=0 fsel=0 alt=  func=INPUT

        GPIO 43: level=0 fsel=0 alt=  func=INPUT

        GPIO 44: level=0 fsel=0 alt=  func=INPUT

        GPIO 45: level=0 fsel=0 alt=  func=INPUT

      BANK2 (GPIO 46 to 53):

        GPIO 46: level=1 fsel=0 alt=  func=INPUT

        GPIO 47: level=1 fsel=0 alt=  func=INPUT

        GPIO 48: level=0 fsel=4 alt=0 func=SD0_CLK

        GPIO 49: level=1 fsel=4 alt=0 func=SD0_CMD

        GPIO 50: level=1 fsel=4 alt=0 func=SD0_DAT0

        GPIO 51: level=1 fsel=4 alt=0 func=SD0_DAT1

        GPIO 52: level=1 fsel=4 alt=0 func=SD0_DAT2

        GPIO 53: level=1 fsel=4 alt=0 func=SD0_DAT3[/code]

       

      and the my dt-blob-dualcam.dts file consists of the following,

       

      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"$

              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@p2  { function = "output"; termination = "no_pulling"; }; // CAMERA 0 LED

              pin@p3  { 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@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_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_cm3

       

        };

       

      };

       

      In my /boot/config.txt file, i set the dt_param=12C=on to off mode.

      I tried rebooting my pi but still couldn't figure out the problem as it still persists.

      I found out some i2c issue with cm3 with emmc flash as in the given link,

      https://www.element14.com/community/thread/61298/l/weird-i2c-issue-with-pi-cm3-solved?displayFullThread=true

      but, could this be a problem?

      Could somebody please help?