Difference between revisions of "RZ-A/Boards/GR-PEACH-audiocamerashield"

From eLinux.org
Jump to: navigation, search
(Software)
(Capturing Images)
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
 
For instructions on how to run mainline Linux on GR-Peach please refer to [[RZ-A/Boards/GR-PEACH-mainline]]
 
For instructions on how to run mainline Linux on GR-Peach please refer to [[RZ-A/Boards/GR-PEACH-mainline]]
 +
  
 
= Hardware =
 
= Hardware =
 +
 +
GR-Peach audiocamera shield is a pluggable shield with Arduino-compatible connectors, that provides audio, NTSC input and a camera input connector.
 +
[[File:gr-peach-audiocamerashield.jpg|thumbnail]]
 +
 
== Audiocamera Shield ==
 
== Audiocamera Shield ==
 
The audiocamera shield is better described by its official website, where schematics and other resources are available.
 
The audiocamera shield is better described by its official website, where schematics and other resources are available.
Line 11: Line 16:
  
 
https://www.core.co.jp/product/m2m/gr-peach/audio-camera.html
 
https://www.core.co.jp/product/m2m/gr-peach/audio-camera.html
 +
 +
We are interested in using the camera interface, exposed on connector C15 on top of the audiocamera shield.
  
 
== Camera Module ==
 
== Camera Module ==
Line 35: Line 42:
  
  
All of these components can be found at the following tag:
+
All of these components can be found at the following tag based on Linux v4.14-rc8:
  
 
git://jmondi.org/linux gr-peach-ceu-elinux-v1
 
git://jmondi.org/linux gr-peach-ceu-elinux-v1
Line 47: Line 54:
 
It is possible to capture images using standard V4L2 tools, such as yavta.
 
It is possible to capture images using standard V4L2 tools, such as yavta.
  
Due to the limited amount of available memory in GR-Peach only a few buffers can be reserved for capturing images, even if with limited resolution.
+
Due to the limited amount of available memory in GR-Peach only a few buffers can be reserved for capturing images, even with limited resolution.
  
 
An example command line to capture images in NV12 or YUYV formats are
 
An example command line to capture images in NV12 or YUYV formats are
 
  yavta /dev/video0 -c 2 -n 2 -f YUYV -s 640x480 -F"yuyv#.bin"
 
  yavta /dev/video0 -c 2 -n 2 -f YUYV -s 640x480 -F"yuyv#.bin"
 
  yavta /dev/video0 -c 2 -n 2 -f NV12 -s 320x240 -F"nv12#.bin"
 
  yavta /dev/video0 -c 2 -n 2 -f NV12 -s 320x240 -F"nv12#.bin"

Latest revision as of 02:19, 15 November 2017

This page describes how to use GR-Peach Audiocamera Shield within Linux.

For instructions on how to run mainline Linux on GR-Peach please refer to RZ-A/Boards/GR-PEACH-mainline


Hardware

GR-Peach audiocamera shield is a pluggable shield with Arduino-compatible connectors, that provides audio, NTSC input and a camera input connector.

Gr-peach-audiocamerashield.jpg

Audiocamera Shield

The audiocamera shield is better described by its official website, where schematics and other resources are available.

https://os.mbed.com/teams/Renesas/wiki/Audio_Camera-shield

https://www.core.co.jp/product/m2m/gr-peach/audio-camera.html

We are interested in using the camera interface, exposed on connector C15 on top of the audiocamera shield.

Camera Module

The shield is said not to come with any camera module, and mt9m111-based modules seems to be the suggested ones.

Some vendors (eg. Digikey) ships the shield with a camera module which has a connector compatible with CN15, but uses a sensor not currently supported by mainline Linux (mt9v111).

Several camera modules exist on the market with image sensors supported by Linux, just make sure their pin out is compatible with CN15 connector on camera module, or make your own adapter to use other modules.

Camera Clock

Camera modules with on-board oscillator do not need any external reference clock. Most of the camera modules on the market ship with no oscillator installed and need an external clock source to work properly.

Audiocamera shield allows to install an oscillator with a frequency that matches the one required by the selected image sensor. The oscillator can be soldered on the bottom side of the board, indicated with 'X1' silk-screen label.

Software

To use GR-Peach audiocamera shield on top of a mainline Linux release the following not yet merged components are required:

  • A driver for GR-Peach Capture Engine Unit (CEU)
renesas-ceu V4L2 driver
  • Device tree updates to make use of the CEU interface
  • A device tree source file for the audiocamera shield and the camera module
gr-peach-audiocamerashield DTSi


All of these components can be found at the following tag based on Linux v4.14-rc8:

git://jmondi.org/linux gr-peach-ceu-elinux-v1


The tag includes a not-yet-upstream driver for CEU interface replacing the existing sh_mobile_ceu one, adds a new CEU sub-node entry to r7s72100.dtsi and creates a gr-peach-audiocamerashield.dtsi file which describes the audiocamera shield used in conjunction with a OV7670 camera module.

The new CEU driver supports capturing images in 3 different formats, two planar formats (NV12/NV16 and NV21/NV61 variants) and one non-planar YUYV format. The image resolution is limited by the image sensor capabilities (VGA sizes, 640x480).

Capturing Images

It is possible to capture images using standard V4L2 tools, such as yavta.

Due to the limited amount of available memory in GR-Peach only a few buffers can be reserved for capturing images, even with limited resolution.

An example command line to capture images in NV12 or YUYV formats are

yavta /dev/video0 -c 2 -n 2 -f YUYV -s 640x480 -F"yuyv#.bin"
yavta /dev/video0 -c 2 -n 2 -f NV12 -s 320x240 -F"nv12#.bin"