VC MIPI OV9281 Скачать руководство пользователя страница 8

1/17/2020

How to setup a VC MIPI OV9281 on a Raspberry PI Model 3B+

https://www.vision-components.com/fileadmin/external/documentation/hardware/VC_MIPI_OV9281_Raspberry_PI_Model_3BPlus/index.html

8/13

2. Reboot.
3. Install the raspberrypi-kernel-headers and device-tree-compiler package by using the following command:

sudo  apt-get install  raspberrypi-kernel-headers  device-tree-compiler 

4. Test if the version of the running kernel matches the version of the kernel headers, the following command should show the directory for compiling the sensor module

kernel module driver:

ls "/usr/src/linux-headers-$(uname -r)" 

5. If the test was successful you may succeed.

3.2   Get the driver and demo code

You can download the driver and demo code with sources from the website 

http://www.vcmipi-modules.com

The archive file to get is named as follows:

vc_mipi_package_raspberryPi3_ov9281.tar.gz

Transfer the archive file to your Raspberry PI, you can do this for example by copying it to an USB stick and mount it at the Raspbian system.
Extract the archive at your home directory, there should then be a subdirectory named

vc_mipi_package_raspberryPi3_ov9281/

In this section, it is assumed, that you are in that subdirectory.

3.3   Driver Installation

1. Change to the subdirectory of the extracted archive named

vc_mipi_driver_raspberryPi3_ov9281/

2. The directory with the sources contains a Makefile to compile the driver. Do so by calling:

make clean all 

3. Calling make the following way will install the kernel module in your current kernel module path:

make install 

4. Follow the instructions displayed by the make command, this may be similar to the following lines:

ADD 'dtparam=i2c_vc=on' and 'dtoverlay=vc_mipi_ov9281' to your /boot/config.txt
ADD 'disable_touchscreen=1' to your /boot/config.txt if a touchscreen is attached
ADD 'cma=128M' to your /boot/cmdline.txt

5. Reboot.
6. After reboot check the installation success by reentering the subdirectory named 'vc_mipi_driver_raspberryPi3_ov9281/' and executing the following commands:

chmod +x ./check_installation.sh 
./check_installation.sh 

If one of the outputs show a failure, check first if you followed all instructions correctly. Should the failure not vanish refer to the 

Q/A

 section and/or read the 

Driver

knowledge

 section for more information to be able to identify the source of your problem.

3.4   First Image Acquisition Test

A sensor device should be listed as Video input at the following command output (from the Video4Linux-Control):

v4l2-ctl --all 

The following command dumps sensor data:

v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null 

It will output subsequent lines ending with a frames-per-second information (in the example named [number]) until pressing CTRL-C:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< [number] fps 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< [number] fps 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< [number] fps 
<<<<<<<<<<<<<<<<<<<<<<<^C 

Содержание MIPI OV9281

Страница 1: ...ing sign alerts of possible pitfalls to avoid Please pay careful attention to sections marked with this sign This is a sign for an example Trademarks Linux Debian the Tux logo Vivado Xilinx and Zynq ARM Cortex Windows XP Total Commander Tera Term Motorola HALCON Vision Components are registered Trademarks All trademarks are the property of their respective owners Raspberry Pi and Raspbian are also...

Страница 2: ...e Setup 3 1 Install necessary Raspbian packages 3 2 Get the driver and demo code 3 3 Driver Installation 3 4 First Image Acquisition Test 3 5 Running the Demo 3 5 1 Compile the programs 3 5 2 Execute the demo 3 6 Switching Sensor Configuration 4 Troubleshooting and Background Information 4 1 Q A 4 2 Driver Knowledge 4 2 1 Providing the device tree overlay 4 2 2 Set up the I C bus for driver sensor...

Страница 3: ...A at 5V 2 Hardware Setup 2 1 Hardware Pre Check Install Raspbian First step is to install Raspbian from https www raspberrypi org downloads raspbian The driver is known to work with the kernel version 4 14 so download the appropriate Raspbian version Raspbian Stretch Lite is sufficient and this guide expects this version to be installed not only for the framebuffer output handling For more install...

Страница 4: ... site looks different Install Raspbian by following the instructions provided there The display shows a login prompt after successful installation If this is not the case you have to check your Raspbian installation The most relevant information to succeed can be found at the Raspbian website or at the web Raspbian showing login screen user is usually pi with password raspberry 2 2 Connect the MIP...

Страница 5: ...d insert the cable and press their lid back when mounted correctly You should then not be able to pull the cable out Open the MIPI module socket put in the cable close the MIPI module socket Warning The connection at this type of socket is not protected against bad alignment so always check the orthogonality and if it is bent correct it Also watch out for the right orientation of the cable The MIP...

Страница 6: ...able to the CAMERA socket at the raspberry Pi equally left bad right good Warning Do not connect other devices to the I C bus named VC since it can affect the communication between the camera sensor and the driver For example running the touch screen of the Raspberry PI 7 inch display will lead to communication problems between driver and camera sensor The display may work with the following line ...

Страница 7: ...itching the system on Raspbian showing login screen user is usually pi with password raspberry 3 Software Setup 3 1 Install necessary Raspbian packages Before beginning with the installation do the following steps first This requires your Raspberry PI to already have an internet connection otherwise you have to install the packages mentioned manually search the web for the procedure needed 1 Updat...

Страница 8: ...ed archive named vc_mipi_driver_raspberryPi3_ov9281 2 The directory with the sources contains a Makefile to compile the driver Do so by calling make clean all 3 Calling make the following way will install the kernel module in your current kernel module path make install 4 Follow the instructions displayed by the make command this may be similar to the following lines ADD dtparam i2c_vc on and dtov...

Страница 9: ...r parameters To list available parameters of the sensor driver kernel module use the following command modinfo vc_mipi_ov9281 The current parameter values of the loaded sensor driver module can be readout as content of a file named after the parameter name at the following directory sys module vc_mipi_ov9281 parameters To change the sensor behaviour on the fly the drivers needs to be reloaded Firs...

Страница 10: ...nnected to the I C bus 0 For example the touch screen controller of the Raspberry PI display may not be connected Check the orientation of the cable at the sensor side as well as at the cpu side Also check if the cable and the sockets are orthogonal 4 2 Driver Knowledge The following tasks have to be done to do an image acquisition with the camera sensor Information about the new sensor hardware a...

Страница 11: ...eal time operating system RTOS on the GPU This RTOS looks into the file boot config txt It loads a default Kernel device tree and patches it by overlaying the device tree parts listed by the dtoverlay entries at the file boot config txt To add information about the new sensor this config file needs the following entry dtoverlay vc_mipi_ov9281 The device tree will then be modified by the overlay at...

Страница 12: ...les by yourself 1 Change to the subdirectory named vc_mipi_driver_raspberryPi3_ov9281 2 The source directory contains a Makefile to compile the driver Do so by calling make clean all The directory then contains the driver as two modules They must be copied to their places vc_mipi_ov9281 ko to lib modules uname r kernel drivers media i2c bcm2835 unicam ko to lib modules uname r kernel drivers media...

Страница 13: ...rent line cma 128M After reboot the kernel message line beginning with Memory will show an additional entry 131072K cma reserved Example After reboot you can show the line by executing the following command dmesg grep Memory Here is a sample output which will look slightly different at your setup 0 000000 Memory 817108K 970752K available 7168K kernel code 576K rwdata 2076K rodata 1024K init 698K b...

Отзывы: