Difference between revisions of "Advanced User Section"

From StereoPi Wiki
Jump to navigation Jump to search
m (Connecting two 18MP Arducam (UC-549, AR1820) to the StereoPi)
m (Connecting two 18MP Arducam (UC-549, AR1820) to the StereoPi)
 
Line 60: Line 60:
 
* [https://github.com/ArduCAM/MIPI_Camera/tree/master/RPI Arducam drivers on GitHub]
 
* [https://github.com/ArduCAM/MIPI_Camera/tree/master/RPI Arducam drivers on GitHub]
  
You have two ways to configure this solution. First one is to configure StereoPi pins (changing dt-blob.dts and compiling it to dt-blob.bin), and the second way is to change Arducam drivers configuration.
 
  
Here is the solution for the second approach (cite from our forum):
+
There are two ways to configure this solution. The first one is to configure StereoPi pins (changing dt-blob.dts and compiling it to dt-blob.bin), and the second way is to change Arducam's driver configuration.
 +
 
 +
Here is the solution for the second approach (cited from our forum):
  
 
''Now I managed to get '''two Arducams''' to work by looking into the dt_blob.dts and mapping the right pins.
 
''Now I managed to get '''two Arducams''' to work by looking into the dt_blob.dts and mapping the right pins.

Latest revision as of 09:22, 19 October 2019

Upload image to EMMC over Micro USB (CM1, CM3 non-Lite)

Important notice!

In StereoPi schematics we used the reference solution from the Raspberry Pi Development board for eMMC and micro SD connections. Both eMMC and micro SD use the same SDIO lines. It means you can use either an eMMC or a micro SD card. If you insert an eMMC-equipped Compute Module into the StereoPi and also insert a micro SD card, the system won't boot.

Here is a brief video guide for you:

Flashing RPi Compute Module’s eMMC via StereoPi

To upload a Linux image onto an eMMC follow these steps:

  1. Disconnect all equipment from the StereoPi except the Compute Module. The power cable should be disconnected as well.
  2. Find the 2 pins marked 'A' on this picture and put a jumper on them. If you have no jumper you can use the additional power cable from the StereoPi kit. Put the white connector on this pair of pins and connect the wires with each other.
  3. Take a USB to micro USB cable. Connect the USB end to your computer and the micro USB end to the StereoPi. The StereoPi's LEDs will light up regardless of the power switch position. Please note: while the jumper is connected StereoPi will not boot. It's the expected behaviour in this mode.
  4. Under Windows, run rpiboot.exe. After that you will see a new disk appear in the file manager. That's your eMMC. Now you can write a Linux image onto it the same way you would with a micro SD card. If you're curious about what rpiboot.exe is, please read the official Raspberry Pi eMMC upload manual here.
  5. If you are Linux user, please follow this rpiboot guide: official Raspberry Pi eMMC upload manual here.
  6. Now you can remove the jumper and disconnect the micro USB cable. You can connect your equipment back and boot up StereoPi.

Please remember that while StereoPi is powered through micro USB the LAN and USB ports are disabled. Please use the power cable for the ports to work.

Additional notices.

  1. If you upload our latest S.L.P. image (which takes just 2 Gb on the eMMC), then during first boot the system will format all the remaining eMMC space (~30 Gb if you use a 32Gb eMMC CM3) to FAT32 and will use this space for image and video storage.
  2. To download the recorded files you can use the administration panel with the file manager. You can also connect your eMMC to a computer the same way you did for firmware upload. You can also use a USB flash drive as alternative storage for the StereoPi.

GPIO pinout notice

To preserve Pi hats compatibility (electrical and physical) we kept the original Raspberry Pi GPIOs but rotated them 180 degrees.

StereoPi GPIO

Google Coral Installation with Compute Modules

If you're planning to install Google's Coral Accelerator with EdgeTPU support, you will need to edit the install.sh file that is ready after you download and untar the tarball. The install.sh script checks

   cat /sys/firmware/devicetree/base/model

and compares that string to the stored strings. The Compute Module is not listed among them. I have included here the entire section with the Compute Module's Model Line included:

   if [[ "${MODEL}" == "Raspberry Pi 3 Model B Rev"* ]]; then
       info "Recognized as Raspberry Pi 3 B."
       LIBEDGETPU_SUFFIX=arm32
       HOST_GNU_TYPE=arm-linux-gnueabihf
   elif [[ "${MODEL}" == "Raspberry Pi 3 Model B Plus Rev"* ]]; then
       info "Recognized as Raspberry Pi 3 B+."
       LIBEDGETPU_SUFFIX=arm32
       HOST_GNU_TYPE=arm-linux-gnueabihf
   elif [[ "${MODEL}" == "Raspberry Pi Compute Module 3 Plus Rev"* ]]; then
       info "Recognized as Raspberry Pi CM3+."
       LIBEDGETPU_SUFFIX=arm32
       HOST_GNU_TYPE=arm-linux-gnueabihf
   fi

Save that and run the script. Installation of EdgeTPU will be successfully completed.

Thanks to Dave Xanatos for providing this guide in our forum.

Connecting two 18MP Arducam (UC-549, AR1820) to the StereoPi

StereoPi and Arducam

This topic was inspired by this discussion on our forum.


There are two ways to configure this solution. The first one is to configure StereoPi pins (changing dt-blob.dts and compiling it to dt-blob.bin), and the second way is to change Arducam's driver configuration.

Here is the solution for the second approach (cited from our forum):

Now I managed to get two Arducams to work by looking into the dt_blob.dts and mapping the right pins.

In case somebody has the same problem:

In the Arducam SDK there is a method called "arducam_init_camera2(&camera_instance, cam_interface)".

Here you can specify some camera-pins manually over the "cam_interface" struct.

For the Arducams you need the following camera_interface struct (I got the pin numbers out of the dt_blob.dts):

   struct camera_interface cam_interface = {
       .i2c_bus = 0,           // /dev/i2c-0  or /dev/i2c-1   
       .camera_num = camera_num,        // mipi interface num
       .sda_pins = {0, 28},    // enable sda_pins[camera_num], disable sda_pins[camera_num ? 0 : 1]
       .scl_pins = {1, 29},    // enable scl_pins[camera_num], disable scl_pins[camera_num ? 0 : 1]
       .led_pins = {39, 30},
       .shutdown_pins ={44, 45},
   };

Special thanks to user 'fshero'!