Datasheet

Autofocus interface
The camera supports one-shot autofocus and continuous autofocus modes.
The Dev Board's sysfs node for the autofocus hardware is at
/sys/module/ov5645_camera_mipi_v2/parameters/ov5645_af and it reads back the decimal representation of the
status register in the autofocus hardware. The read values are as follows.
To change the autofocus mode, write one of the following values to the
/sys/module/ov5645_camera_mipi_v2/parameters/ov5645_af file as follows.
For example, the following command enables continuous autofocous:
echo 2 > /sys/module/ov5645_camera_mipi_v2/parameters/ov5645_af
Version 1.0 (August 2019)
Table 2. Autofocus read values from sysfs node
Read value Description
0 (0x00) Autofocus is running.
16 (0x10) Autofocus is complete (focused).
32 (0x20) Analyzing the image. This state occurs intermittently when attempting to reach focus. It occurs
once during one-shot autofocus mode before focus locks, and it is the steady state during
continous autofocus mode.
112 (0x70) Idle. Focus is released and the lens is at it's resting (furthest) position.
Table 3. Autofocus write values for sysfs node
Write value Description
0 Turn off autofocus.
1 Enable one-shot autofocus mode. The camera will seek focus and then lock focus. (It will analyze
the image once, and focus once.)
2 Enable continuous autofocus mode. The camera will continously seek focus. (It will analyze the
image and focus, then continue to analyze the image and refocus when necessary.)
Copyright 2019 Google LLC. All rights reserved.