Home9260 QuickStart GuideApplication Notes9260 Linux Camera

Connecting the camera

To connect the camera first power down the Snapper 9260 board and then connect the flat flex camera cable to J2 on the Snapper 9260 module.

Building kernel modules

We recommend building the device drivers for the Snapper 9260 camera as modules. In your Linux kernel source directory type the following:

make snapper9260_defconfig
make menuconfig

Under the menu: "Device Drivers, Multimedia Devices", ensure that "Video for Linux" is selected. The under the sub-menu "Video Capture Adapters", select both "Atmel Video Support", and "Micro MT9T001" as kernel modules. You will also need to enable the option "Big physical memory area" under the top-level "Kernel Features" menu.

Build the kernel as follows:

make uImage && make modules

U-Boot environment

The Snapper 9260 camera requires a large amount of memory to be allocated in the kernel for storing image data. We use the Big Physical Memory Area feature for this. To set the amount of reserved memory for the camera:

setenv extra_bootargs bigphysarea=4096
saveenv

Enabling the camera

To enable the camera on the Snapper 9260 module, a number of power domains and GPIOs must be configured. To reset the camera:

echo io_exp_b11 output > /proc/snapper/power_domain
echo io_exp_b11 disable > /proc/snapper/power_domain
echo io_exp_b11 enable > /proc/snapper/power_domain

To disable the standby mode on the camera:

echo io_exp_b13 output > /proc/snapper/power_domain
echo io_exp_b13 disable > /proc/snapper/power_domain

To enable the camera trigger:

echo io_exp_b12 output > /proc/snapper/power_domain
echo io_exp_b12 enable > /proc/snapper/power_domain

To enable camera output:

echo clear > /proc/gpio/GPIOB12

To enable the global shutter control:

echo set > /proc/gpio/GPIOB13

You can now install the Linux kernel modules for the camera.

insmod /path_to_your_kernel/linux-2.6.20/drivers/media/video/atmel-isi.ko
insmod /path_to_your_kernel/linux-2.6.20/drivers/media/video/mt9t001.ko

These commands can be put into a script to simply configuring the camera.

Taking a photo

Bluewater System's Lib AV provides an API for developing audio-visual applications. The camera_demo application supplied with the library can be used to test a camera. The following command will capture an image and save it as a jpeg file:

camera_demo -c image.jpg

 

Applications

rs1

rs_2

rs_3

rs_4