Skip to main content
Version: BSP 7.x.y

First Steps with Framos FSM:GO Optical Sensor Modules (Linux)

Introductionโ€‹

This article provides information on how to start working with the FSM:GO Optical Sensor Modules.

Adding a Yocto Project layer is required. Currently it is not possible to use TorizonCore Builder to add this driver.

The following topics will be covered:

For details about using Video4Linux and GStreamer tools to interact with cameras and collect video frames, see Cameras on Toradex System on Modules.

CSI Camera Set 2MP FSM:GO IMX662 Front View

Camera Set 2MP FSM:GO IMX662 connected to the adapter board

CSI Camera 4K 8MP FSM:GO IMX678 Side View

(Double-Click to Zoom)

Main Featuresโ€‹

FSM:GO CSI Optical Sensor Modulesโ€‹

IMX662โ€‹

Camera Module Features

  • Sensor: IMX662 from Sonyยฎ
  • Sensor Resolution and Optical Format: 2MP CMOS Image Sensor. 1/2.8" Optical format
  • Sensor Type: 2MP CMOS Electronic Rolling Shutter Sensor

Sensor Features

  • Pixel size: 2.9ฮผm x 2.9ฮผm
  • Shutter type: CMOS Rolling Shutter
  • Focus Type: Fixed focus

IMX676โ€‹

Camera Module Features

  • Sensor: IMX676 from Sonyยฎ
  • Sensor Resolution and Optical Format: 12MP CMOS Image Sensor. 1/1.6" Optical format
  • Sensor Type: 12MP CMOS Rolling Shutter Sensor

Sensor Features

  • Pixel size: 2ฮผm x 2ฮผm
  • Shutter type: CMOS Rolling Shutter
  • Focus Type: Fixed focus

IMX678โ€‹

Camera Module Features

  • Sensor: IMX678 from Sonyยฎ
  • Sensor Resolution and Optical Format: 8MP 4K (3840 ร— 2160) CMOS Image Sensor. 1/2.8" Optical format
  • Sensor Type: 8MP CMOS Electronic Rolling Shutter Sensor

Sensor Features

  • Pixel size: 2.9ฮผm x 2.9ฮผm
  • Shutter type: Electronic Rolling Shutter
  • Focus Type: Fixed focus

Datasheetsโ€‹

FSM:GO IMX662 datasheet

FSM:GO IMX676 datasheet

FSM:GO IMX678 datasheet

Hardware Setupโ€‹

What I need to orderโ€‹

You can have the FSM:GO CSI Optical Sensor Modules working with specific Toradex computers on modules and carrier boards. See the compatible products.

FSM:GO CSI Optical Sensor Module, cables, adapter, and carrier board

An adapter board is also required to connect the Framos Optical Sensor Modules to the Toradex Boards.

The following list describes all components that you should order:

  1. Camera Module

Currently the FSM:GO has three options of cameras available:

  • FSM:GO IMX662 (2MP/2K optical sensor module) - 58ยฐ, 86ยฐ and 137ยฐlens angles available.
  • FSM:GO IMX676 (12MP/1:1 format optical optical sensor module) - 16ยฐ, 92ยฐ, 102ยฐ and 185ยฐlens angles available.
  • FSM:GO IMX678 (8MP/4K optical sensor sensor module) - 54ยฐ, 100ยฐ and 110ยฐlens angles available.
  1. Adapter Board and accessories

You can use the adapter board and the accessories for any of the three camera models described above.

  • FPA-A/P24-V0X (adapter board).
  • FMA-CBL-FFC24-0.2m-V1A (cable).
  • FMA-SCW-01-KIT (screws, nuts, and spacers for adapter board and sensor board fitting).

Where do I orderโ€‹

You can order the Toradex computer on Modules and the carrier boards online in the Toradex Webshop.

You can order the Framos sensor modules and the needed accessories by directly contacting Framos.

info

The flat ribbon cable (used to connect the carrier board and the camera adaptor) is fragile. If your camera does not work, make sure to test the cable connections on the flat cable.

Please refer to the instructions below for connecting the camera module to your specific carrier board.

Connection to Verdin Development Boardโ€‹

danger

Please disconnect any power and USB cables from the board before connecting the flat cable to the MIPI-CSI bus to avoid any damage to the camera!

Connect the camera to the Verdin Development Board, assuring that the flat cable contacts are on the correct side, as indicated in the figures below. The MIPI-CSI Camera Interface is on connector X47.

Board Connected to the Camera Module

Detailed of the connection between camera and board

Flat Cable Connection Detail

(Double-Click to Zoom)

Compatible Productsโ€‹

Hardwareโ€‹

The FRAMOS FSM:GO Optical Sensor Modules are sold together with an adapter board and cables.

The following Toradex carrier boards that support the MIPI CSI-2 interface connect to the camera kits out-of-the-box, hardware-wise:

The following versions of Verdin iMX8M Plus SoM support those cameras:

  • 0070 - Verdin iMX8M Plus Quad 8GB WB IT
  • 0058 - Verdin iMX8M Plus Quad 4GB WB IT
  • 0063 - Verdin iMX8M Plus Quad 4GB IT
  • 0064 - Verdin iMX8M Plus Quad 2GB WB IT

Softwareโ€‹

To integrate the camera on the software side, you need to add a Yocto Project layer to your image built on top of the Toradex Linux BSP.

Torizon OS 7 also supports this camera starting from version 7.0.0, requiring compiling your Torizon OS image using Yocto and adding the necessary dependencies. Out-of-the-box support on Torizon OS standard images is coming soon.

Add Yocto Project Layerโ€‹

To enable the camera modules, you will need to add a Yocto Project layer provided by Toradex to your Yocto Project environment.

  1. Setup Environment

    To get your environment set, read and follow the steps presented in Build a Reference Image with Yocto Project/OpenEmbedded. Stop following the steps before starting the build with bitbake. Once the environment is set up, you can proceed with the instructions.

    With your environment setup, you should have the build directory organized with the following structure:

    ..
    โ”œโ”€โ”€ build
    โ”‚ย ย  โ””โ”€โ”€ conf
    โ”‚ย ย  โ”œโ”€โ”€ bblayers.conf
    โ”‚ย ย  โ”œโ”€โ”€ local.conf
    โ”‚ย ย  โ””โ”€โ”€ templateconf.cfg
    โ”œโ”€โ”€ export
    โ””โ”€โ”€ layers
    โ”œโ”€โ”€ meta-arm
    โ”œโ”€โ”€ meta-freescale
    โ”œโ”€โ”€ meta-freescale-3rdparty
    โ”œโ”€โ”€ meta-freescale-distro
    โ”œโ”€โ”€ meta-openembedded
    โ”œโ”€โ”€ meta-qt5
    โ”œโ”€โ”€ meta-ti
    โ”œโ”€โ”€ meta-toradex-bsp-common
    โ”œโ”€โ”€ meta-toradex-demos
    โ”œโ”€โ”€ meta-toradex-distro
    โ”œโ”€โ”€ meta-toradex-nxp
    โ”œโ”€โ”€ meta-toradex-ti
    โ”œโ”€โ”€ meta-yocto
    โ””โ”€โ”€ openembedded-core
  2. Add Layer

    2.1. Clone the repository:

    $ git clone https://github.com/toradex/meta-toradex-framos.git -b scarthgap-7.x.y ../layers/meta-toradex-framos

    2.2. Add the layer:

    $ bitbake-layers add-layer ../layers/meta-toradex-framos
  3. Build Image

    The toradex reference multimedia image allows easily testing the camera functionalities with GStreamer.

    To build this image, run:

    $ bitbake tdx-reference-multimedia-image
  4. Install the Image

    After a successful build, the image will be in the build/deploy/images/<MACHINE> directory.

    The article Toradex Easy Installer provides detailed instructions on how to install images using the Toradex Easy installer.

Camera Usageโ€‹

We recommend using a display to be able to visualize the captured image during camera testing.

Connect to the SoMโ€‹

To follow the next steps, you will also need to connect to the SoM after the image is installed. This can be done either via SSH or serial terminal

Select and Apply the Device Tree Overlay:โ€‹

Once you are connected to the board, check which overlays are currently applied:

# cat /boot/overlays.txt

The output shows the contents of the fdt_overlays variable, as the example:

# fdt_overlays=verdin-imx8mp_hdmi_overlay.dtbo verdin-imx8mp_dsi-to-hdmi_overlay.dtbo verdin-imx8mp_spidev_overlay.dtbo verdin-imx8mp_imx662_overlay.dtbo

Edit the /boot/overlays.txt file, adding the overlay of your choice. By default, the verdin-imx8mp_imx662_overlay.dtbo is already selected.

info

Adding more than one camera overlay to the variable at once will not apply all of them, only the latest one.

Reboot the board to apply the overlay:

# reboot

At the beginning of the boot process, you can confirm that the overlay was applied successfully in the messages:

Found U-Boot script /boot.scr                                                                                                                                                                                      
6010 bytes read in 6 ms (977.5 KiB/s)
## Executing script at 50280000
Loading DeviceTree: imx8mp-verdin-wifi-dev.dtb
90278 bytes read in 5 ms (17.2 MiB/s)
152 bytes read in 2 ms (74.2 KiB/s)
Applying Overlay: verdin-imx8mp_hdmi_overlay.dtbo
2219 bytes read in 5 ms (432.6 KiB/s)
Applying Overlay: verdin-imx8mp_dsi-to-hdmi_overlay.dtbo
3652 bytes read in 5 ms (712.9 KiB/s)
Applying Overlay: verdin-imx8mp_spidev_overlay.dtbo
561 bytes read in 4 ms (136.7 KiB/s)
Applying Overlay: verdin-imx8mp_imx662_overlay.dtbo
2760 bytes read in 5 ms (539.1 KiB/s)
11675339 bytes read in 56 ms (198.8 MiB/s)

Find the Deviceโ€‹

To check which /dev/video* is a capture device, the Video4Linux Control (v4l2-ctl) application from the v4l2-utils package can be used.

List the video devices:

# ls /dev/video*
/dev/video0 /dev/video1 /dev/video2

Show information about the capture device on /dev/video2:

# v4l2-ctl -d2 -D
Driver Info:
Driver name : viv_v4l2_device
Card type : VIV
Bus info : platform:viv0
Driver version : 5.15.148
Capabilities : 0x84201001
Video Capture
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : vvcam-video
Model : viv_media
Serial :
Bus info :
Media version : 5.15.148
Hardware revision: 0x00000000 (0)
Driver version : 5.15.148
Interface Info:
ID : 0x03000003
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : viv_v4l20
Function : V4L2 I/O
Pad 0x01000002 : 0: Sink, Must Connect
Link 0x02000010: from remote pad 0x1000008 of entity 'vvcam-dwe.0' (V4L2 I/O): Data, Enabled
info

Note that the video device can be in any of the listed video devices. So, check all of them to make sure to use the right one in the pipeline.

To view the video output, run a GStreamer pipeline on the terminal:

# gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw ! videoconvert ! waylandsink
Click here to see the Gstreamer command output
# gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw ! videoconvert ! waylandsink                                                                                             
[ 329.075355] enter imx662_priv_ioctl 2154321408
[ 329.090584] enter isp_mi_stop
[ 329.158410] enter imx662_enum_mbus_code
[ 329.162271] enter imx662_get_format_code
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline t[ 329.203507] enter imx662_enum_mbus_code
o PLAYING ...
New clock: GstSyst[ 329.210086] enter imx662_get_format_code
emClock
[ 329.216952] enter imx662_priv_ioctl 2154321408
[ 329.299863] enter imx662_priv_ioctl 261
[ 329.303770] enter imx662_query_supports
[ 329.308131] enter imx662_enum_mbus_code
[ 329.311995] enter imx662_get_format_code
[ 329.316055] enter imx662_priv_ioctl 2154321408
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:00.241990651
Setting pipeline to NULL ...

Having trouble?โ€‹

Please contact our technical support. Various options for technical support are mentioned in the article below.



Send Feedback!