And9820 G)
And9820 G)
Advance Information
AR0234 Developer Guide
1/2.6−Inch CMOS Digital Image Sensor
www.onsemi.com
APPLICATION NOTE
INTRODUCTION
This Developer Guide provides detailed descriptions and Registers y_addr_start, x_addr_start, y_addr_end, and
usage guidelines for various features of the AR0234 Global x_addr_end are used to specify the image window. The
Shutter Sensor. Also provided are guidelines for optimal minimum value for x_addr_start is 8 and the maximum
settings for various use cases. For detailed electrical and value for x_addr_end is 1927. The minimum y_addr_start
timing specifications or register descriptions, refer to the and maximum y_addr_end are 8 and 1207, respectively.
AR0234 Data Sheet and the AR0234 Register Reference
documents (AND9812/D). FRAME RATE
Achieving the desired frame rate at the proper resolution
OPTIMAL SETTING GUIDELINES is a balancing act between row timing and the number of
The AR0234 Global Shutter Sensor has many built-in rows in the image. Integration time and the pixel clock
features and is capable of many resolutions and frame rates. frequency are additional factors. The minimum line length
Guidelines for setting resolution and frame rate are provided is 612 pixel clocks which enables a frame rate of 120 fps.
in this section. Detailed settings for the many features are
provided throughout the remainder of this Developer Guide. BLANKING CONTROL
The AR0234 includes the ON Semiconductor Register Horizontal blanking and vertical blanking times are
Wizard tool which can be used to create appropriate settings. controlled by the LINE_LENGTH_PCK and
FRAME_LENGTH_LINES registers, respectively.
RESOLUTION The actual imager timing is described in the Frame Time
The ON Semiconductor AR0234 sensor is capable of a section of this Developer Guide.
maximum resolution of 1920 x 1200 at up to 120 fps.
PIXEL DATA FORMAT columns and active rows are included for use when
horizontal or vertical mirrored readout is enabled, to allow
Pixel Array Structure readout to start on the same pixel. The pixel adjustment is
The AR0234 pixel array is configured as 2110 columns by always performed for monochrome or color versions. The
1252 rows, (see Figure 1). The dark pixels are optically central 1928 x 1208 pixel active area is surrounded with
black and are used internally to monitor black level. Of the optically transparent dummy pixels and non−optically
left 172 columns, 148 are dark pixels used for row noise transparent barrier pixels to improve image uniformity
correction. Of the bottom 30 rows of pixels, 8 of the dark within the active area. Not all barrier pixels can be read out.
rows are used for black level correction. There are 1940 The optical center of the readable active pixels can be found
columns by 1220 rows of optically active pixels. While the between X_ADDR 969 and 970, and between Y_ADDR
sensor’s format is 1920 x 1200, the additional active 609 and 610.
2110
Light Dummy
Dark Pixel Barrier Pixel Active Pixel
Pixel
www.onsemi.com
2
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
OUTPUT DATA FORMAT of vertical frame time (in rows) is programmable through
The AR0234 image data is read out in a progressive scan. R0x300A. Line_Valid (LV) is HIGH during the shaded
Valid image data is surrounded by horizontal and vertical region of Figure 2. Optional embedded register setup
blanking (see Figure 2). The amount of horizontal row time information and histogram statistic information are
(in clocks) is programmable through R0x300C. The amount available in the first two and the last two rows of image data.
00 00 00 ..................................... 00 00 00 00 00 00 .................. 00 00 00
00 00 00 ..................................... 00 00 00 00 00 00 .................. 00 00 00
00 00 00 ..................................... 00 00 00 00 00 00 .................. 00 00 00
00 00 00 ..................................... 00 00 00 00 00 00 .................. 00 00 00
READOUT SEQUENCE data. One 10−bit pixel datum is launched on the DOUT pins
Typically, the readout window is set to a region including for each falling edge of PIXCLK. The launch edge of
only active pixels. The user has the option of reading out PIXCLK may be set in register R0x3028. When both FV and
dark regions of the array, but if this is done, consideration LV are asserted, the pixel is valid. PIXCLK cycles that occur
must be given to how the sensor reads the dark regions for when FV is deasserted are called vertical blanking. PIXCLK
its own purposes. cycles that occur when only LV is deasserted are called
horizontal blanking.
PARALLEL OUTPUT DATA TIMING
To enable the parallel output pins, set R0x301A[7] = 1,
The output images are divided into frames, which are and set R0x301A[12] = 1 to disable the MIPI serializer. The
further divided into lines. By default, the sensor produces parallel input pins (i.e. TRIGGER, STANDBY, etc) may be
1920 rows of 1200 columns each. The FV and LV signals enabled by setting R0x301A[8] = 1. Only one output
indicate the boundaries between frames and lines, interface should be enabled at a time.
respectively. PIXCLK can be used as a clock to latch the
www.onsemi.com
3
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
PIXCLK
FV
LV
DOUT[9:0] P0 P1 P2 P3 Pn
Vertical Blanking Horiz Blanking Valid Image Data Horiz Blanking Vertical Blanking
FV
Default
LV
FV
Continuous LV LV
The timing of an entire frame is shown below in Figure 5: the maximum rate of one pixel per PIXCLK. One row time
“Line Timing and FRAME_VALID/ LINE_VALID (tROW) is the period from the first pixel output in a row to the
Signals”. For detailed timing diagrams and switching first pixel output in the next row. The row time and frame
parameters, refer to the AR0234 data sheet. time are defined by equations in Table 1.
Frame Time
The pixel clock (PIXCLK) represents the time needed to
sample one pixel from the array. The sensor outputs data at
...
FRAME_VALID
...
LINE_VALID
...
www.onsemi.com
4
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
Table 1. FRAME TIME (EXAMPLE BASED ON 1920 X 1200, 120 FRAMES PER SECOND)
Default Timing at 90 MHz (CIT
Parameter Name Equation = 200 rows)
A Active data time Context A: (R0x3008 − R0x3004 + 1)/4 480 pixel clocks = 5.33 ms
Context B: (R0x308E − R0x308A + 1)/4
V Vertical blanking Context A: [(R0x300A+5 − (R0x3006 − R0x3002 + 1)) * (A + Q)] 12,852 pixel clocks = 142.8 ms
Context B: [(R0x300A+5 − (R0x3090 − R0x308C + 1)) * (A + Q)]
Nrows * (A Frame valid time Context A: ((R0x3006-R0x3002+1)*(A+Q))-Q+P1+P2 734,280 pixel clocks = 8.16 ms
+ Q) Context B: ((R0x3090-R0x308C+1)*(A+Q))-Q+P1+P2
F Total frame time V + (Nrows * (A + Q)) 747,132 pixel clocks = 8.3 ms
F’ Total frame time (long integration time) Context A: (R0x3012 * (A + Q)) + P1 + P2 1,224,012 pixel clocks = 13.6 ms
Context B: (R0x3016 * (A + Q)) + P1 + P2
www.onsemi.com
5
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
R0x3268[14] must be set to 1. includes vertical blanking lines), such that the frame rate is
3. CIT > 1 not affected by the integration time.
tclk + (CIT * LLPCK * 162 ) 3 * FIT) (eq. 6)
At different FPS, the sensor will have different PIXCLK
frequencies which will change exposure times.
Constraint for FIT:
FIT > 0 and FIT < 80 ROW−TIME DEFINITION
T + t clkńPixelClkFreq (eq. 7) One row−time is equal to the sum of the number of active
pixels (columns) and the number of horizontal blanking
R0x3268[14] = 0
pixels divided by the pixel readout rate:
Note: FIT must be an even number for all cases. (eq. 10)
With the restrictions that: active_pixel ) horizontal_blank_pixels
row_time +
1. When automatic exposure control (AEC) is PIXCLK_frequency
disabled:
(eq. 11)
A The number of lines of integration for Context
A equals the value in R0x3012, and for Context B line_length_pck(R0x300C)
row_time default_settings +
equals the value in R0x3016. PIXCLK_frequency
B The number of pixels of integration for Context
A equals the value in R0x3014, and for Context B line_length_pck(612)
+ + 6.8 ms
equals the value in R0x3018. 90 MHz
2. When automatic exposure control (AEC) is
enabled, the number of lines of integration may FRAME TIME DEFINITION
vary from frame to frame, with the limits When frame_length_lines > coarse_integration_time:
controlled by R0x311E (minimum auto exposure
time should be 2 rows) and R0x311C (maximum rows_per_frame = frame_length_lines + overhead =
auto exposure time). For a specific frame output, frame_length_lines + 5
the exposure time (in rows) can be read in When frame_length_lines <= coarse_integration_time:
R0x3164. Fine integration time is not used by the rows_per_frame = coarse_integration_time − 2 + overhead
auto exposure function. = coarse_integration_time + 3
If the exposure time is to be set to approximately 2 ms and Frame Time = rows_per_frame * row_time
default settings are being used (where one row−time equals
6.8 μs), a value of “294” is entered in R0x3012 (2 ms / 6.8 μs EXPOSURE INDICATOR
= 294). In this mode, only whole number row−time The AR0234 provides an output pin, FLASH, to indicate
increments are allowed−no fractional time increments can when the exposure takes place. When R0x3270[8] is set,
be achieved. It may be possible to adjust the number of FLASH is HIGH during exposure.
horizontal active or blanking pixels to bring the desired
exposure time to a whole number row−time increment. REAL−TIME CONTEXT SWITCHING
The exposure time using the default power up settings of In the AR0234, the user may switch between two full
the sensor can be determined as follows: register sets (listed in Table 3) by writing to a context switch
(eq. 8)
change bit in R0x30B0[13]. This context switch will change
all registers (no shadowing) at the frame start time and have
exposure_time + coarse_integration_time row_time the new values apply to the immediate next exposure and
exposure_time + (294 rows) (6.8 ms) + 2 ms (eq. 9) readout time.
Typically, the value of the coarse_integration_time
register is limited to the number of lines per frame (which
Register Number
Register Description Context A Context B
y_addr_start R0x3002 R0x308C
x_addr_start R0x3004 R0x308A
y_addr_end R0x3006 R0x3090
x_addr_end R0x3008 R0x308E
coarse_integration_time R0x3012 R0x3016
www.onsemi.com
6
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
Register Number
Register Description Context A Context B
fine_integration_time R0x3014 R0x3018
x_odd_inc R0x30A2 R0x30AE
y_odd_Inc R0x30A6 R0x30A8
green1_gain (GreenR) R0x3056 R0x30BC
blue_gain R0x3058 R0x30BE
red_gain R0x305A R0x30C0
green2_gain (GreenB) R0x305C R0x30C2
global_gain R0x305E R0x30C4
frame_length_lines R0x300A R0x30AA
coarse_analog_gain R0x3060[6:4] R0x3060[14:12]
fine_analog_gain R0x3060[3:0] R0x3060[11:8]
col_bin R0x3040[13] R0x3040[11]
row_bin R0x3040[12] R0x3040[10]
line_length_pck R0x300C R0x303E
operation_mode R0x3082[1:0] R0x3084[1:0]
col_sf_bin_en R0x3040[9] R0x3040[8]
col_sf_bin_mono_en R0x3040[7] R0x3040[6]
AR0234 has a highly configurable programmable context Table 6. SECOND CONTROL WORD
switching RAM of size 256 x 16. Within this context
R0x3066[15:11] R0x3066[10:0]
memory, changes to any register may be stored. The register
set for each context must be the same, but the number of Load count Bits [11:1] of stored register address
contexts and registers per context are limited only by the size
of the context memory. Two registers are required to use the CONTEXT SWITCHING EXAMPLE:
context switching RAM as described in Table 4. The following example will program three contexts for two
address values,
Table 4. CONTEXT SWITCHING RAM REGISTERS • X_addr_end = Address 0x3008
Register Address Register Name • Y_addr_end = Address 0x3006
0x3034 CTX_CONTROL_REG The three contexts are:
0x3066 CTX_WR_DATA_REG
• Context 1
− X_addr_end = 1080 (0x0438)
Register 0x3034 is used initially to reset the address − Y_addr_end = 810 (0x032A)
counter for programming the context RAM. It is later used
to determine when to load the new register set and which
• Context 2
− X_addr_end = 640 (0x0280)
register set to load. Register 0x3066 is used to set the number
− Y_addr_end = 480 (0x01E0)
of contexts, the register address with multiple contexts, and
the context values. The first two writes to register 0x3066 • Context 3
are control words as shown in Tables 5 and 6. − X_addr_end = 320 (0x0140)
− Y_addr_end = 240 (0x00F0)
Table 5. FIRST CONTROL WORD To configure the AR0234 context RAM:
1. Write 0x0000 to R0x3034. This will reset the
R0x3066[15:8] R0x3066[7:4] R0x3066[3:0]
context RAM address counter.
1111_1000 Number of MSB of stored register
(Fixed control word) Contexts address
www.onsemi.com
7
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
2. Write 0xF823 to R0x3066. This will write the first SWITCHING CONTEXTS
control word to the first address of the context Once the context RAM has been configured, register
RAM. The first 8 bits are a fixed control word. R0x3034 is then used to determine when to switch contexts,
Bits [7:4] are set to the number of contexts, where and to which context to switch. Table 7 describes how to
0 represents one context. In this example, it is control context switching.
0b0010, that is, 2+1=3 contexts to be programmed.
Bits [3:0] represent the MSB of the stored register Table 7. CONTEXT SWITCH CONTROL
address. Since we are switching registers R0x3006
CTX_CONTROL_REG Description
and R0x3008, we write 0x3 (or 0b0011).
3. Write 0x1003 to R0x3066. Bits [15:11], load R0x3034[15] = 0x1 Load the new context immediately
count, represents the number of sequential R0x3034[3:0] Determines which context to load
addresses to contain stored context values. In this
example, it is 0b00010, that is, two consecutive FEATURES
registers, R0x3006 and R0x3008 are to be NOTE: See the AR0234 Register Reference for
configured. Bits [10:0] represent bits [11:1] of the additional details.
address of the first register to be configured. Bit 0
is not needed because all address values are even. Auto Multiple Context RAMs Switching
In this case, we are writing bits [11:1] of R0x3006. 1. Two contexts auto switching
4. Program the register values for R0x3006 R0x3034[6:4] = 4, store
A Write 0x032A to R0x3066 first context at 1st and 2nd position and
B Write 0x01E0 to R0x3066 second context at 3rd position.
C Write 0x00F0 to R0x3066 2. Three contexts auto switching
5. Program the register values for R0x3008 R0x3034[6:4] = 6, store
A Write 0x0438 to R0x3066 first context at 1st and 2nd position,
B Write 0x0280 to R0x3066 second context at 3rd position and
C Write 0x0140 to R0x3066 third context at 4th position.
6. The load counter has now expired, so a new 3. Four contexts auto switching
command is expected. This may be a new set of R0x3034[6:4] = 7, store
context registers to be programmed. In this case, first context at 1st and 2nd position,
return to step 2. second context at 3rd position,
7. If all desired context registers have been third context at 4th position and
configured, write 0x0000 to R0x3066 to end the fourth context at 5th position.
programming sequence. Note: Four contexts is possible but need to
If the desired context switchable registers do not share the discard first 4 frames.
same MSB in address, the programming procedure will need
to skip back to step 2 to load the new MSB in R0x3066[3:0].
frm1 frm2 frm3 frm4 frm5 frm6 frm7 frm8 frm9 frm10 frm11 frm12 frm13
cxt1 (def*) cxt1 (def*) cxt2 cxt3 cxt4 cxt1 cxt2 cxt3 cxt4 cxt1 cxt2 cxt3 cxt4
OPERATIONAL MODES programmed through the two−wire serial interface for both
modes.
Master Mode
In master mode, the exposure period occurs
The AR0234 works in master (video) or trigger (single
simultaneously with the frame readout (see Figures 7
frame) modes. In master mode, the sensor generates the
and 8). This makes master mode the fastest mode of
integration and readout timing. In trigger mode, it accepts an
operation. When exposure time is greater than the frame
external trigger to start exposure, then generates the
length, the number of vertical blanking rows is increased
exposure and readout timing. The exposure time is
automatically to accommodate the exposure time.
www.onsemi.com
8
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
FLASH
Exposure Time
LINE_VALID
FLASH
Exposure Time
Vertical Blanking
FRAME_VALID
LINE_VALID
Trigger Mode taken place. This triggering action can be the passing of an
In trigger mode, the exposure period and the frame object on a conveyor belt, the flash of a strobe light, or the
readout occur sequentially (see Figure 10 and Figure 11 on press of a button.
page 11). This makes trigger mode slower than master The AR0234 offers the ability to synchronize the start of
mode. Two options of triggering are made available. A the image sensor’s exposure with this triggering action. This
Pulsed Trigger mode where only a single frame is output, synchronization is controlled on the image sensor through
and an Automatic Trigger mode where a series of frames are the use of the TRIGGER input signal. Additionally, the
output. image sensor offers the flexibility to program the exposure
time remotely. This Developer Guide only addresses the
Triggered System Details
single image sensor (non−stereoscopic) mode of operation.
Many imaging applications commonly require the image
sensor to capture an image only after a triggering action has
www.onsemi.com
9
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
EXTCLK
TRIGGER
AR0234
CONTROLLER
PIXCLK
FRAME_VALID
LINE_VALID
FLASH
DOUT[9:0]
When the image sensor is set to trigger mode, the It is important to note that in Automatic Trigger Mode, the
beginning and duration of the exposure time are controlled. Trigger input is an asynchronous interrupt to the sensor’s
The global shutter feature of the image sensor allows all exposure and readout control logic. The falling edge of the
pixels to be exposed in parallel−all pixels start exposing Trigger pulse will never affect the frame that is currently
(integrating charge) simultaneously and stop exposing being readout, but the timing of the trigger falling edge may
simultaneously. When exposure stops, the per-pixel interrupt the integration time and the FLASH output
integrated charges are digitized and read out of the chip. A duration for the following frame. Avoid processing any
new exposure begins only after the readout of all pixels is frame that starts readout after the falling edge of Trigger
complete. If the TRIGGER input is left in the asserted state, since its exposure time may have been interrupted, and to
the sensor will automatically initiate a new frame prevent from having a corrupted FLASH output pulse
acquisition sequence upon completion of the current frame. (perhaps causing and extended illumination control output),
In Automatic Trigger Mode, if the Trigger signal is the Trigger input should not fall within FLL − (ImageHeight
brought low to stop readout during integration time (during +16 ) + 16, with ImageHeight = R0x3006[9:0] −
the FLASH high period), then the FLASH output signal may R0x3002[9:0] + 1 line times of the start of integration time
not go low for the final frame. To avoid this, the Trigger (typically the FLASH rising edge). If it is difficult to ensure
signal should be brought low between integration periods that the Trigger falling edge does not occur within this
(when FLASH is low). window, then the FLASH signal can be safely disabled (by
R0x3270[8]=0) just before de−asserting the Trigger input.
TTT
TRIGGER TTPW
EXPOSURE
TIME
TTF
FLASH
TFFV
FRAME_VALID
(for Parallel mode only) TVB
LINE_VALID
FRAME TIME
(for Parallel mode only)
www.onsemi.com
10
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
TRIGGER
TFFV
LINE_VALID
(for Parallel mode only)
FRAME TIME
www.onsemi.com
11
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
Example: TTF for MIPI 4−lane, LED Delay = 0, pixel clock Register Settings
= 90 MHz, The TRIGGER mode of operation requires that register
LLPCK = 612, R0x301A (Reset Register) bit 2 be set to “0”. Setting this
MIPI Wake Up Time ~ 1.4 ms register to “1” will switch the sensor back to the master mode
So, TTF ~ (7+ (530/612)) rows + 1.4 ms + 2.6 us ~ 11.87 ms of operation. The general purpose I/O (GPI) pins must also
be enabled as shown in Table 9.
Value in
Register Register Name Bit Bit Name Bit Description Dec (Hex)
www.onsemi.com
12
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
The frame time is equal to the product of the number of rows−per-frame and the row− time.
frame_time + rows_per_frame (row_time) (eq. 13)
The minimum time between two successive TRIGGER pulses equals the sum of the frame time, the exposure time, TTF and
TFFV:
T TT + (frame_time) ) (exposure_time) ) ǒT TF ) T FFVǓ (eq. 15)
Further, the maximum allowable frame rate may be calculated from these same three variables. The maximum frame rate is
the reciprocal of the sum of the frame time, the exposure time, trigger to flash, and flash to frame valid times:.
1
frame_rate + (eq. 16)
frame_time ) exposure_time ) T TF ) T FFV
The TRIGGER pulse period should correspond to the desired frame rate. For individual (asynchronous) trigger pulses, the
TRIGGER signal should be asserted no sooner than FRAME_VALID is deasserted, and the minimum of 27 rows of vertical
blanking has elapsed.
www.onsemi.com
13
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
Example Frame Rate Calculations Step 2: Calculate the rows−per−frame read out.
Two examples follow on performing frame rate row_per_frame + frame_length_lines ) 5 (eq. 19)
calculations for the AR0234 image sensors, shown in
Table 11 below. row_per_frame + 1221 rows (eq. 20)
Example 1 shows maximum exposure time for keeping
Step 3: Calculate the frame time.
frame rate at 25 fps.
frame_time + (rows_per_frame) (row_time) (eq. 21)
www.onsemi.com
14
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
Start of End of
Integration Integration
Programmable Lead
Delay
Flash output
R0x3270[7]=1
Flash output
R0x3270[7]=0
www.onsemi.com
15
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
For R0x3270[7]=0
Trigger Pulse
Programmable leading
Flash output edge of Flash output
Solid Line: R0x3270[7:0]=0
Red Dash: R0x3270[7]=0
For R0x3270[7]=1
Trigger Pulse
Programmable end of
Flash output Flash output
Solid Line: R0x3270[7:0]=0
Red Dash: R0x3270[7]=1
Constraints when using flash lead and lag adjustment: for simplicity. Registers written via the two−wire interface
will not be preserved following a hard reset.
For CIT=0,1,2: set R0x3270[7:0]=0. Soft Reset of Logic
Soft reset of logic is controlled by bit 0 of the R0x301A
For 2<CIT<67: Reset register. This bit is a self−resetting bit and also returns
When R0x3270[7]=0 (led lag): the usable range is from 1 to to “0” during two−wire serial interface reads. Registers
(2*CIT − 5) decimal. written via the two wire interface will not be preserved
following a soft reset.
When R0x3270[7]=1 (led lead): do not use it. OUTPUT ENABLE
RESET The AR0234’s outputs can be tri−stated with the
The AR0234 may be reset by using RESET_BAR or the OE_BAR pin. Before the external pin can be used to control
reset register. output enable, set register R0x301A[6] = 0 to disable the
output drivers. Then set R0x301A[8] = 1 to enable the input
Hard Reset of Logic pins (OE_BAR, TRIGGER, and STANDBY). Driving
The host system can reset the image sensor by bringing the OE_BAR low will enable the output drivers, while driving
RESET_BAR pin to a LOW state. Alternatively, the it high will tri−state the parallel output pins. The parallel
RESET_BAR pin can be connected to an external RC circuit outputs can also be tri−stated by setting R0x301A[7] = 0.
www.onsemi.com
16
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
CLOCKS
PARALLEL PLL CONFIGURATION Configure the serial output so that it adheres to the following
The maximum output of the parallel interface is rules:
90 Mpixel/s. This will limit the readout clock (PIXCLK) to • The maximum data−rate per lane (FSERIAL) is
90 Mpixel/s. The sensor will not use the FSERIAL, 900 Mbps/lane
www.onsemi.com
17
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
BLANKING CONTROL
Spread−Spectrum Clocking
Horizontal blank and vertical blank times are controlled
To facilitate improved EMI performance, the external
by the line_length_pck and frame_length_lines registers,
clock input allows for spread spectrum sources, with no
respectively.
impact on image quality. Limits of the spread spectrum input
clock are: • Horizontal blanking is specified in terms of pixel
clocks. It is calculated by subtracting the X window
• 5% maximum clock modulation
size from the line_length_pck register. The minimum
• 35 kHz maximum modulation frequency horizontal blanking is 132 pixel clocks.
• Accepts triangle wave modulation, as well as sine or • Vertical blanking is specified in terms of numbers of
modified triangle modulations. lines. It is calculated by subtracting the Y window size
STREAM/STANDBY CONTROL from the frame_length_lines register. The minimum
The sensor supports a standby mode: Soft Standby. In this vertical blanking is 16 lines.
mode, external clock can be optionally disabled to further The actual imager timing can be calculated using Table 1
minimize power consumption. If this is done, then the on page 5 and Table 2 on page 5, which describe the Line
power−up sequence described in the AR0234 data sheet Timing and FV/LV signals.
must be followed. READOUT MODES
Soft Standby By default, the resolution of the output image is the full
Soft Standby is a low power state that is controlled width and height of the FOV as defined above. The output
through register R0x301A[2]. When the sensor comes back resolution can be reduced by digital binning.
from Soft Standby, previously written register settings are Binning
still maintained. Soft standby will not occur if the TRIGGER All of the pixels in the FOV contribute to the output
pin is held high. A specific sequence needs to be followed image in binning mode. This can result in a more pleasing
to enter and exit from Soft Standby. output image with reduced artifacts. It also improves
Entering Soft Standby: low−light performance for horizontal sum binning. For
1. Set R0x301A[2] = 0 or drive the TRIGGER pin monochrome operation, R0x30B0[7] must be set to
LOW. 1.Binning mode is enabled by setting read_mode
2. Delay (One Frame Time) (R0x3040), x_odd_inc(R0x30A2) and y_odd_inc
Frame Time = FLL * LLPCK/PIXCLK (R0x30A6) for context A, and x_odd_inc_cb (R0x30AE)
and y_odd_inc_cb (R0x30A8) for context B. The
www.onsemi.com
18
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
following tables show how to set these registers for digital Skipping
binning. Skipping reduces resolution by using only selected rows
Color binning is defined as Rx30B0[7]=0. In this mode, from the FOV in the output image. In skip mode, entire rows
2 pixels in the same color plane will be combined (binning) of pixels are not sampled, resulting in a lower resolution
as define by Rx3040[13:12]. output image. A skip 2X mode skips one Bayer pair of pixels
For mono chrome binning, Rx30B0[7]=1, this mode will for every pair output. Skipping is set by R0x30A6 (context
combine 2 adjacent pixels regardless of color planes. A) and R0x30A8 (context B). The maximum supported skip
Tables 15 and 16 demonstrate how to set these registers is 16 rows. Both Vertical and Horizontal Bayer and
for digital binning. monochrome skip modes are supported. Refer to Table 17
Note: For monochrome sensor, when not in binning mode on page 19 for supported skip factors.
and lens shading correction is enabled (R0x3780[15]=1),
R0x30B0[7] must be set to 0. Otherwise, the image will be Table 17. SKIP MODE SETTINGS
distorted.
Vertical Horizontal
Skip Factor R0x30A6 (R0x30A8) R0x30A2 (R0x30AE)
Table 15. DIGITAL HORIZONTAL BINNING
No Skip 0x0001 0x0001
Context A R0x3040[13] R0x30A2 R0x3040[5]
2 0x0003 0x0003
Context B R0x3040[11] R0x30AE
4 0x0007 0x0007
Sum 1 3 1
8 0x000F 0x000F
Average 1 3 0
16 0x001F 0x001F
X incrementing
Y incrementing
www.onsemi.com
19
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
X incrementing
Y incrementing
Figure 16. Pixel Readout (Row Skip 2X Bayer)
X incrementing
Y incrementing
LV
Normal readout
G0[9:0] R0[9:0] G1[9:0] R1[9:0] G2[9:0] R2[9:0]
D OUT[9:0]
Reverse readout
D OUT[9:0] G3[9:0] R2[9:0] G2[9:0] R1[9:0] G1[9:0] R0[9:0]
Figure 18. Six Pixels in Normal and Column Mirror Readout Modes
www.onsemi.com
20
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
Row Mirror Image pixel is maintained in this mode by a 1−pixel shift in the
By setting R0x3040[15] = 1, the readout order of the rows imaging array.
is reversed as shown in Figure 19. The starting Bayer color
FV
Normal readout
Row0[9:0] Row1[9:0] Row2[9:0] Row3[9:0] Row4[9:0] Row5[9:0]
DOUT[9:0]
Reverse readout
DOUT[9:0] Row6[9:0] Row5[9:0] Row4[9:0] Row3[9:0] Row2[9:0] Row1[9:0]
Figure 19. Six Rows in Normal and Row Mirror Readout Modes
www.onsemi.com
21
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
Two−wire
serial Interface idle idle
(Input)
FLASH
Exp “A” Exp “A” Exp “B” Exp “B” Exp “B”
(Output)
FRAME_VALID
Readout Exp “A” Readout Exp “A” Readout Exp “B” Readout Exp “B” Readout Exp “B”
(Output)
Figure 20. Latency For Single Buffered Registers - Coarse Integration Time Example
Two−wire
serial Interface idle idle
(Input)
FLASH Exp “A” Exp “A” Exp “A” Exp “A” Exp “A”
(Output)
FRAME_VALID
Readout Exp “A” Readout Exp “A” Readout Exp “A” Readout Exp “A” Readout Exp “A”
(Output)
Figure 21. Latency For Double Buffered Registers - Column Gain Example(R0x3786[4] = 0)
Figure 22. Latency For Single−Buffered Registers (if R0x3786[4] = 1) - Column Gain Example
RESTART between issuing the Restart and the beginning of the next
To restart the AR0234 at any time during the operation of frame is a maximum of tFRAME.
the sensor, write a “1” to the Restart register (R0x301A[1]
= 1). This has two effects: first, the current frame is read out TEMPERATURE SENSOR
and the sensor enters standby. Second, any writes to The AR0234 sensor has a built−in PTAT−based
frame-synchronized registers and the shutter width registers (Proportional To Absolute Temperature) temperature
take effect immediately, and a new frame starts. The current sensor, accessible through registers, that is capable of
frame completes before the new frame is started, so the time measuring die junction temperature. The temperature sensor
www.onsemi.com
22
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
www.onsemi.com
23
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
Man_AG
TargetRatio
AG ae_enable
auto_ag_en
Current dark level auto_dg_en
Auto_DG_enable
Exposure Control min_ana_gain
Current exposure time
Man_DG System
ae_roi_x_start_offset
DG
ae_roi_x_size
ae_roi_y_start_offset
ae_roi_y_size
Auto_DG_gain
ae_luma_target_reg
ae_min_ev_step_reg
ae_max_ev_step_reg
ae_damp_offset_reg
ae_damp_gain_reg
ae_damp_max_reg
ae_max_exposure_reg
ae_min_exposure_reg
AE status monitor/debug Registers (R only)
ae_coarse_integration_time
Footer:
Histogram
AE status monitoring \ debug registers
AE Embedded Statistics and Data no ROI is specified, statistics are gathered from the full
The AE Stats Calculation block (Figure 24) takes the user output frame. From this histogram, all relevant auto
specified Region of Interest (ROI) and creates a histogram exposure statistics are generated:
arranged into bins listed in Table 18 based on Gr pixels. If
AE Stats AE Histogram
ROI selection
www.onsemi.com
24
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
0−3 0 0 64
1 16
2 32
3 48
4−63 4 64 k = 0 to 59 120
5 66
4+k 64 + 2k
63 182
0−3 0 0 64
0−3 1 16
0−3 2 32
0−3 3 48
4−63 4 64 k = 0 to 59 120
4−63 5 66
4−63 4+k 64 + 2k
4−63 63 182
www.onsemi.com
25
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
by the below registers. Register selection is provided to x0_start_offset. Same way, any of the yy_start_offset
include each grid region in the histogram or not. can’t be less than y0_start_offset. Any unused
Following registers are added in for stats to define the new xx_start_offset and yy_start_offset should be set equal to
grid structure. Registers address and other details are given x_size and y_size respectively.
in below table. All the offset values are absolute from the
image location (0,0), top left corner. Any of the
xx_start_offset cannot be less than
Grid numbers within the ROI are defined as row wise grid_sel[0] correspond to grid number 0 in the below
increment number as mentioned in below diagram. Bit diagram and so on.
www.onsemi.com
26
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
ae_roi_x_start_offset ae_x2_start_offset
ae_x4_start_offset
ae_roi_y_start_offset
0 1 2 3 4
ae_y1_start_offset
5 6 7 8 9
ae_roi_y_size
ae_y2_start_offset
10 11 12 13 14
ae_y3_start_offset
15 16 17 18 19
ae_y4_start_offset
20 21 22 23 24
ae_roi_x_size
GRID NUMBER REDUCTION number are invalid and does not contain any pixel. Figure 26
If there is need for other grid dimension which is smaller shows the grid location after removing one grid in x
than 5x5 grid dimension, it can be achieved by setting direction and y direction each. Here x4_offset is set to x_size
unused offset register to same as end of ROI location. The and y4_offset is set as y_size. We can define more than one
end of ROI location is the point (x_size, y_size). Hence offset in x and y direction same as end of ROI to reduce the
unused xn_start offset will be set as x_size and unused grid size further.
yn_start_offset will be set to y_size. The unused grid
www.onsemi.com
27
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
ae_roi_y_start_offset
0 1 2 3
ae_y1_start_offset
ae_roi_y_size
5 6 7 8
ae_y2_start_offset
10 11 12 13
ae_y3_start_offset
15 16 17 18
ae_y4_start_offset
ae_roi_x_size
Statistics Grid Structure
www.onsemi.com
28
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
EVNewExp =log2(TargetRatio)
ae_damp_offset_reg
(0x310C) RecursiveDamp =
ae_damp_gain_reg dampOffset + abs(EVNewExp)×dampGain
(0x310E)
EVNewExp_damped =
RecursiveDamp×EVNewExp
NewExpRatio>1
and Dark Current > No
NewExpRatio = 2 EVNewExp_damped DarkCurrentThresh
ae_dark_cur_thresh_reg
(0x3124)
Yes
ae_min_exposure_reg (0x311E)
Limit new integration time to between Max_int_time and Min_int_time
ae_max_exposure_reg (0x311C)
www.onsemi.com
29
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
EVNewExp Target ratio translated into EV units (stops). 0x3100[0] ae_enable 0: On−chip AE disabled
Can be positive or negative. In EV units, >0 1: On−chip AE enabled
means exposure is increasing, <0 means
exposure is decreasing. 0x3100[1] auto_ag_en 0: AE will not control analog
gain
RecursiveDamp Damping factor. Should be >0 and <1 for de- 1: AE will control analog gain
sirable AE operation. If less than
0, AE will step further from the target; if 0x3100[6:5] min_ana_gain Minimum analog gain to be
greater than 1, AE will overstep the target. used by AE
00: 1x (default)
EVNew- New exposure step in EV units. Can be posi- 01: 2x
Exp_damped tive or negative. 10: 4x
11: 8x
NewExpRatio New exposure step as ratio. Should be posi-
tive. As ratio, >1 means exposure is increas- Controlling Auto Exposure
ing, <1 means exposure is decreasing.
The histogram is generated and statistics calculated based
NewExp New exposure expressed as rows of integra- on the Gr pixels within a user specified region of interest.
tion or possibly msec (depends on rest of The ROI is specified by four programmable register values
system).
− ae_roi_x_start_offset, ae_roi_y_start_offset,
ae_roi_x_size and ae_roi_y_size. The ae_roi_x_start_offset
Auto Exposure Control
and ae_roi_y_start_offset values define the starting
Enabling Auto Exposure coordinate of the ROI with respect to the image window that
Several registers are used to enable various features of the is output and the ae_roi_x_size and ae_roi_y_size values
automatic exposure control. The auto exposure block is define the dimensions of the ROI. Each value must be an
enabled or disabled by register R0x3100[0]. By default, the even number. If the requested ROI extends ’beyond’ the
AEC will only modify the coarse integration time to reach image window then it will be restricted in size such that the
the target exposure. If enabled, analog and digital gains may final pixel of the ROI will be the final pixel of the image
be adjusted as well. Analog gain adjustment is enabled by window, as illustrated in Figure 28.
setting auto_ag_en (R0x3100[1] = 1) A minimum column
gain (1x, 2x, 4x, 8x), min_ana_gain, may be defined in
register R0x3100[6:5]. A summary of AEC enable registers
is listed in Table 22.
www.onsemi.com
30
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
The target luma value may be set in the To extend the exposure range, the AE logic can also
ae_luma_target_reg register. The AE Target Selection block automatically adjust analog gain and digital gain. The
will use this value to determine the target ratio provided to controls for enabling automatic analog and digital gain
the Exposure Control System as illustrated in Figure 27 on selection may be found in Table 22 on page 30. The control
page 29. The exposure range can be limited by setting values flow chart is shown in Figure 29 and is an expanded view of
for ae_max_exposure_reg and ae_min_exposure_reg. The the portion of Figure 27 on page 29 that is enclosed by the
integration time fed back to the Sensor Digital Block (see dashed line.
Figure 23) will not fall outside of this specified range.
www.onsemi.com
31
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
New_Exposure_Time =
Current_Exposure_Time*
NewExpRatio
Yes
No
NewExpRatio>1
Yes Current_DG
=1
No
DG=
Current_DG x
NewExpRatio
No
DG<1
DG=1
No AG>
Min_AG
Yes
AG=3
Yes
or
New_Exposure_Time = Auto AG disabled
AG_gain_factor=2 New_Exposure_Time x
AG_gain_factor
No
AG=AG−1
New_Exposure_Time =
New_Exposure_Time / AG_gain_factor=0.5
AG_gain_factor
AG=AG+1
No Current_exposure_time
=Max_int_time
Yes
DG=
New_exposure_ratio x
Current_DG
Figure 29. Digital Gain, Analog Gain, and Exposure Time Control
If auto_ag_en is set, it is recommended to limit the analog analog gain is limited to 16x then AEC might try to increase
gain value not greater than 16x. Also, the read out value of the analog gain greater then 16x (ae_ana_gain can go to 32x,
the current analog gain, ae_ana_gain (R0x312A[13:11]), 64x and 128x) also in order to achieve the Target Mean but
value might still go as high as 128x but actually would be internally it would be 16x only even though ae_ana_gain
limited as per the settings internally. For example, if the reaches to 32x, 64x or 128x.
www.onsemi.com
32
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
By setting a value for ae_ag_exposure_hi, the analog gain the incremental change from frame to frame. The selected
will not be increased until the integration time set by this new exposure value will be clipped to the minimum EV
register is reached. Similarly, the analog gain will not be step if it is less than the value specified in R0x3108.
decreased unless the integration time is reduced below the Because the minimum step size in EV units is typically a
value set in ae_ag_exposure_lo. To avoid oscillation, the small number less than one, it should be scaled by 256
ae_ag_exposure_lo setting should be lower than the before setting the register value.
ae_ag_exposure_hi setting. Refer to Table 23 on page 34 for Changes in exposure are smoothed based on damping
auto exposure control registers. parameters. A maximum damping value may be specified
The integration time and analog gain selected by the in R0x3110. Additional damping controls include
exposure control system may be found in the ae_damp_gain_reg and ae_damp_offset_reg. These can be
ae_coarse_integration_time (R0x3164) and thought of as a coarse and fine damping control,
ae_ana_gain(R0x312A[13:11]) registers, respectively. The respectively.
minimum analog gain to be selected may be set in the At high temperature, the sensor may have high dark
min_ana_gain (R0x3100[6:5]) register, and can be 1x, 2x, current which will increase with longer exposures. To
4x, or 8x or 16x. If auto_dg_en (R0x3100[4]) is set, the avoid increasing the exposure when there is excessive
digital gain selected by the exposure control system can dark current, AE has a dark current check. The sensor
be read from register ae_dig_gain (R0x312A[10:0]). The supplies the current dark current level to AE and if the
digital gain can vary from 1 to 15.9922. The minimum dark current is greater than the user−specified (R0x3124)
step is 1/128. darkCurrentThresh, AE does not increase exposure.
The step size of the AE control may be configured. If (NewExpRatio > 1) & (DarkCurrent >
Both a minimum and maximum step size may be set in DarkCurrentThresh) NewExpRatio = 1; //Do not increase
units of EV (exposure value) steps in registers 0x3108 and exposure
0x310A, respectively. The step size represents the
End
minimum or maximum value that the AE Target Selection
will use for the next exposure value. It does not represent
www.onsemi.com
33
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
0x3140 ae_roi_x_start_offset Number of pixels into each row before the ROI starts
0x3142 ae_roi_y_start_offset Number of rows into each frame before the ROI starts
0x3102 ae_luma_target_reg Average Gr target value to be reached by the auto exposure multiplied by 16
0x3108 ae_min_ev_step_reg Minimum exposure value step size. Since min_ev_step sizes are small (typically
less than 1), they are multiplied by 256 and then the value is written to this regis-
ter.
0x310A ae_max_ev_step_reg Maximum exposure value step size. Since this value is always greater than 1
there is no need to multiply by 256 as in the case of min_EV_stepsize.
0x3110 ae_damp_max_reg Max value allowed for damping (multiplied by 256 since internal value is typically
<1). For most applications, the value of damping should be <1, otherwise AE will
overshoot the target. For applications with fast settling required, it may be desir-
able to allow damping >1. Default value: 0.875 * 256 = 0x00E0
0x3166 ae_ag_exposure_hi At this integration time, the analog gain is increased (when AE is enabled to
control analog gain).
0x3168 ae_ag_exposure_lo At this integration time, the analog gain is reduced (when AE is enabled to con-
trol analog gain).
0x3124 ae_dark_cur_thresh_reg The dark current level that stops AE from increasing integration time. Note that
increased integration time would increase dark current as well and signal level
(SNR) would drop because photo diode well capacity is limited.
www.onsemi.com
34
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
AE FRAME SYNCHRONIZATION module will perform its calculations during the vertical
A delay is incurred between the time when a frame with blanking time and the new exposure value will be seen by the
the newly updated AE value applied is seen by the AE sensor core logic after the next frame has started. Therefore
module and when it reaches the sensor core logic (which sets the result is that the third frame after the current frame will
the exposure times for the sensor). This delay is associated reflect the new exposure time. Figure 30 illustrates how the
with the Delay Buffers and Sensor Data Path delays. The AE exposure changes every two frames.
T0P T1 T2
Exposure changes every 2 frames
N−n
rows T0 T0 T1 T1 T2
EMBEDDED DATA AND STATISTICS WITHIN output all zeros. The second line contains statistics based on
IMAGE the histogram for the current frame. The embedded data is
All the statistics data (including histogram data) is output as shown in Figure 32. The only relevant statistic for
embedded in the two rows immediately following the AR0234 auto exposure is the mean. If the on−chip auto
image. The embedded statistics are output as shown in expo− sure is not used, it is recommended that auto exposure
Figure 33. The first line contains histogram data. Only algorithms be developed based on the histogram data found
histogram data for bins 0 to 63 are relevant − higher bins will in line 1.
www.onsemi.com
35
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
RegisterData
Image HBlank
Status&StatisticsData
VBlank
www.onsemi.com
36
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
Data line 2
{register_
8’h5A
value_LSB}
data_format_ #words = {2’b00, frame {2’b00, frame {2’b00, frame {2’b00, frame histogram histogram
code =8’h2c 10’h1EC _count MSB} _count LSB} _ID MSB} _ID LSB} bin0 [19:10] bin0 [9:0]
stats line 1
histogram histogram histogram histogram
0x1C 0x1C
bin1 [19:10] bin1 [9:0] bin243 [19:10] bin243 [9:0]
stats line 2
lowEndMean lowEndMean perc_lowEnd perc_lowEnd norm_abs_dev lnorm_abs_dev 0x1C
[19:10] [9:0] [19:10] [9:0] [19:10] [9:0]
The statistics embedded in these rows are as follows: • Histogram Begin (ae_hist_begin)
Line 1: • Histogram End (ae_hist_end)
• 0x0B0 − identifier • Low End Histogram Mean
• Register 0x303A − frame_count • Percentage of Pixels Below Low End Mean
• Register 0x31D2 − frame ID (ae_perc_low_end) Normal Absolute Deviation
• Histogram data − histogram bins 0−243 Below are the definitions of the embedded statistics.
Line 2: • ae_mean
• 0x0B0 (identifier) The mean data value of the Gr pixels multiplied by 16 is
• Mean (ae_mean) given by:
www.onsemi.com
37
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
i+1
r (eq. 37)
241 contains 7 pixels, bin 242 contains 9 pixels, and bin
243 contains 4 pixels. ae_hist_end_perc =
0.988(98.8%), then ae_hist_end will equal 3071 − the
where n is the number of Gr pixels in the ROI. Such a value last code value of the bin where pixel 988 falls (bin 242
is calculated by accumu− lating the actual pixel values over in this case).
the course of the frame/ROI. • ae_hist_end_mean
• ae_hist_begin A user programmable parameter, ae_hist_div, defines
ae_hist_begin is the code value corresponding to the the low end of the histogram for the purposes of the AE
histogram bin (starting at bin 0 and moving towards bin algorithm. ae_hist_div is a histogram bin identifier and
243) in, or below which ae_hist_begin_perc (where all bins from bin 0 to bin ae_hist_end are considered
ae_hist_begin_perc is a user programmable parameter) the ’low end’.
of pixels occur. So, as an example, consider a 1000 The ae_hist_end_mean is the equivalent of the mean
pixel sample whereif ae_hist_begin_perc = 0.01 (1%), value described earlier for the low end subset of the
then ae_hist_begin will equal 8 − the first code value of pixels.
the third bin where pixel 10 (1% of 1000) falls. • ae_perc_low_end
The user specifies ae_hist_begin_perc as a 16−bit value The ae_perc_low_end statistic indicates the proportion
of the form 0.xxxx...xxxx − so if ae_hist_begin_perc = of pixels that fall in the ’low end’ portion of the
16’b0010_0000_0000_0000, ae_hist_begin is histogram and is given by
considered to be the code value below or equal to ae_hist_div
which 12.5% of the pixels occur. h(i) S
• ae_hist_end i+1
ae_perc_low_end + (eq. 38)
Complementary to ae_hist_begin, ae_hist_end is the 243
code value corresponding to the histogram bin (starting
at bin 0 and moving towards bin 243) in, or below i+1
h(i) S
which ae_hist_end_perc (where ae_hist_end_perc is a
where h(i) represents the number of pixels in bin i.
user programmable parameter) of pix− els occur. So, as
an example, consider a 1000 pixel sample where bin
• ae_norm_abs_dev
The three−stage computation for norm_abs_dev is summarized below. First, pixel values below ae_hist_begin and
above ae_hist_end are clipped:
fclipped(i) + NJ 0
f(i)−ae_hist_begin
ae_hist_end−ae_hist_begin
if ǒf(i) t ae_hist_beginǓ
if ae_hist_begin v (f(i) v ae_hist_end)
if(f(i) u ae_hist_end)
(eq. 39)
where ae_ norm_width_min is a user−specified minimum normalizing width, used when the histogram is very narrow.
abs_dev
ae_norm_abs_dev + (eq. 42)
norm_width
The result is the deviation from the center of the normalized histogram - a value < 1.
www.onsemi.com
38
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
GAIN (analog) gain can be set to 1x, 2x, 4x, 8x or 16x. This can be
The AR0234 has three gain options, digital, coarse and set in R0x3060[6:4](Context A) or R0x3060[14:12]
fine column (analog). (Context B). An additional 4−bit fine gain adjustment is
available. This can be set in R0x3060[3:0](Context A) or
Digital Gain
R0x3060[11:8] (Context B).
Digital gain can be controlled globally by R0x305E
(Context A) or R0x30C4 (Context B). There are also Let R0x3060[6:4] = s
registers that allow individual control over each Bayer color Let R0x3060[3:0] = t
channel: coarse gain = 2s
1. When s = 0 or 2
1
GreenR R0x3056 fine gain + (eq. 43)
t
1*
R0x305C 32
GreenB
2. When s = 1 or 3
Red R0x305A
1
R0x3058 fine gain +
Blue
INT ǒ2t Ǔ (eq. 44)
The format for digital gain setting is xxxx.yyyyyyy where 1* 16
0b00010000000 represents a 1x gain setting and 3. When s = 4
0b00011000000 represents a 1.5x gain setting. The step size 1
for yyyyyyy is 0.0078125 while the step size for xxxx is 1. fine gain +
INT ǒ4t Ǔ (eq. 45)
Therefore to set a gain of 2.09375 one would set digital gain 1* 8
to 0b00100001100. The maximum digital gain is 15.9922x.
Total analog gain + coarse_gain * fine_gain (eq. 46)
DigitalGain = Bit[10:7] + (Bit[6:0]/128)
www.onsemi.com
39
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
RECOMMENDED MINIMUM GAIN and used to compensate for its effect on black level in the
Due to different pixel full well saturation, the visible array.
recommended minimum overall gain is 1.684 for
eliminating artifacts. Enabling Black Level Correction
Black level correction is enabled by default, but may be
BLACK LEVEL CORRECTION manually enabled or disabled by writing to the
The AR0234 sensor has built in controls for black level delta_dk_sub_en (R0x3180[15]) register. Gradient removal
(delta dark) correction and calibration. By utilizing optically may be enabled by setting delta_dk_gradient_removal
dark rows, the magnitude of dark current can be measured (R0x3180[10]).
www.onsemi.com
40
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
AR0234 DEFECT CORRECTION surrounding nearest horizontal 4 pixels of the same color
plane to do correction. See the following figure. It is a mean
Tagged Defect Pixel Correction (static correction) weighting based defect correction. For the monochrome
This defect correction is only for correcting the tagged sensor will also be treated as a color sensor.
defect pixels detected during sensor production. It uses the
L4 L3 L2 L1 Pc R1 R2 R3 R4
Pc: current defect pixel
L4, L2, R2, R4: pixels of same color channel to be used for correction
L3, L1, R1, R3: pixels of different color channels won`t be used for correction
.
Defect pixels are stored in OTPM. The following table
illustrates how to enable static defect correction and option
of tagging defective pixels with a value of 0.
Tag
Correction Correction Mode Rx31E0[1] Rx31E0[0]
On Correct Tagged Pixels 1 1
On Replace Tagged Pixels with value of 0 0 1
www.onsemi.com
41
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
Dynamic 1−D Defect Pixel Correction determine if pixel correction is required. The final corrected
This algorithm will be applied to all the pixels in the pixel value will be based on the 4 nearest same color pixels.
image. The correction is based on the difference between the The mono sensor will be treated as the same as a color sensor.
current pixel and the surrounding horizontal 8 pixels to
L4 L3 L2 L1 Pc R1 R2 R3 R4
Pc : current defect pixel
L4, L2, R2, R4: pixels of same color channel to be used for correction
L3, L1, R1, R3: pixels of different color channels to be used for
how to do the correction .
The following table shows how to enable dynamic pixel
defect correction.
Set the following 1DDC parameters: enabled. Register R0x3044[5:4] should be changed back to
R0x3F4C=0x003F default value, 1, when disabled.
R0x3F4E=0x0018
R0x3F50=0x17DF Table 26. TEST PATTERN MODES
TEST PATTERNS Test_Pattern_Mode Test Pattern Output
The AR0234 has the capability of injecting a number of 0 No test pattern (normal operation)
test patterns into the top of the datapath to debug the digital
1 Solid color test pattern
logic. With one of the test patterns activated, any of the
datapath functions can be enabled to exercise it in a 2 100% color bar test pattern
deterministic fashion. Test patterns are selected by 3 Fade−to−grey color bar test pattern
test_pattern_mode register (R0x3070). Only one of the test 256 Walking 1s test pattern (10−bit)
patterns can be enabled at a given point in time by setting the
test_pattern_mode register according to Table 26. When test Color Field
patterns are enabled the active area will receive the value When the color field mode is selected, the value for each
specified by the selected test pattern and the dark pixels will pixel is determined by its color. Green pixels will receive the
receive the value in test_pattern_green (R0x3074 and value in test_pattern_green, red pixels will receive the value
R0x3078) for green pixels, test_pattern_blue (R0x3076) for in test_pattern_red, and blue pixels will receive the value in
blue pixels, and test_pattern_red (R0x3072) for red pixels. test_pattern_blue. See Figure 34 for a solid green pattern
Register R0x3044[5:4] should be set to 0 to avoid pixel with Gr = Gb = 3072.
value clipping below 992 decimal when test pattern is
www.onsemi.com
42
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
Walking 1s
When the walking 1s mode is selected, a walking 1s
pattern will be sent through the digital pipeline. The first
value in each row is 1. See Figure 36:
TWO−WIRE SERIAL INTERFACE CRC • That checksum is stored in a two−wire serial interface
AR0234 includes a means of validating two−wire serial accessible register at address 0x31D6.
interface communications. The AR0234 confirms that all • The checksum can be read via two−wire serial interface
two−wire serial interface write requests to the device are and will also be output in the embedded registers (if
successful by means of a checksum, generated from all enabled).
address and data values associated with such transactions.
These requirements are interpreted as follows:
• A write via two−wire serial interface to the checksum
register will reset the checksum to the start value of
• For all two−wire serial interface writes to the camera 0xFFFF.
the 16−bit register address and 2 bytes of data are fed
into a 16−bit CRC to generate a checksum.
www.onsemi.com
43
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
Yes
Addressing
Write or Read? Read Yes Read back checksum.
checksum register?
Write
Input 16−bit
address to CRC
The 16−bit value will be input to the CRC MSB first, i.e., polynomial x16 + x12 + x5 + 1, as illustrated in Figure 38 on
c15 through c0. The CRC used will implement the page 45.
www.onsemi.com
44
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
The recommended procedure to use CRC checksum as Step 2: Conduct two−wire serial interface write command to
follows: a desired register
Step 1: Reset CRC checksum register(R0x31D6) by writing Step3: Read CRC checksum register (R0x31D6) to verify
R0x31D6 with any value to reset CRC checksum register that two−wire serial interface write command was done
before write two−wire serial interface write command. successfully by comparing the read CRC checksum
register(R0x31D6) with a expected CRC checksum value.
Conduct
Try current Go to next
2−wire serial IF write
2−wire serial IF write 2−wire serial IF write
R0x301A = 0x0058
transaction again transaction
CRC checksum
matches
CRC checksum
does not match
Read R0x31D6
to verify 2−wire serial
IF transaction by
checking CRC
checksum
Figure 39.
www.onsemi.com
45
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
TWO−WIRE SERIAL INTERFACE SEQUENTIAL the pair of 8−bit addresses addressed by the 15 MSBs of the
WRITES 8−bit address, and the 8−bit write data value that is being
The input to the 16−bit CRC logic is either a 16−bit modified is combined with the 8−bit data address value NOT
address or a 16−bit write data value. If the 16−bit address being modified, and the resulting 16−bits is input into the
matches the CRC register, the CRC register is initialized to CRC for that 8−bit address.
all ones. Otherwise, the 16−bit write data value is input In summary, the CRC checksum(R0x31D6) continues to
(serially) into the CRC generator, and a 16− bit CRC value update, as all non−CRC registers are written. At any time, if
results unique to that 16−bit write data value. Sequentially, CRC register is read, the current CRC register value is read
either CRC address or other addressed data values are back. At any time, if CRC register is written (with any
presented to the CRC generator and resulting CRC register. value), the CRC register is initialized to all ones.
At the end of a sequential write of addresses with 16−bit
address data values, the CRC register contains the CRC READING THE SENSOR CRA AND CHROMATICITY
value of sequentially processed write data values that were Sensor CRA and CFA Chromaticity information is stored
sequentially addressed. in R0x31FE[9:4]. The value can be decoded according to
Note, if the two-wire serial interface write is only 8−bits Table 27.
to a single register address, that write is serviced by reading
REVISION INFORMATION
Table 28.
Revision
READING THE SENSOR FUSE ID procedure to read OTPM. This information should always
The FuseID is stored in the OTPM; and OTPM must be be passed to ON Semiconductor whenever a technical
read in order to obtain the FuseID. The following is the inquiry is made to the Field Apps Engineers.
Figure 40.
www.onsemi.com
46
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
Below is the INI script that will read the Fuse ID from the Sensor: AR0234CS REV2
AR0234 OTPM Record Type 0x01 and output these values FuseID: 00000000058804C250606061BA532CA2
into the OTPM_DATA_* registers. The FID can only be
read when the parts is in standby state Revision Number: 0x2001
− CREV: 0x1
− CFA (None): 0x0
− CRA: 0x0
− MREV: 0x8
FID=R0x380E,R0x380C,...,R0x3800
www.onsemi.com
47
CONFIDENTIAL AND PROPRIETARY
NOT FOR PUBLIC RELEASE AND9820
USING DEVWARE TO READ THE FUSE ID 2. Click on the arrow next to the Diagnostics folder
The ”Get Fuse ID” button in DevWare is another way to 3. Select Fuse ID
read the fuse ID of the sensor. 4. Click on the Get Fuse ID button to read the fuse
1. Open DevWare and go the Image/ISP Control ID. See Figure Figure 42 after running preset
page [Read FID].
www.onsemi.com
48
CONFIDENTIAL AND PROPRIETARY
AND9820 NOT FOR PUBLIC RELEASE
ON Semiconductor and are trademarks of Semiconductor Components Industries, LLC dba ON Semiconductor or its subsidiaries in the United States and/or other countries.
ON Semiconductor owns the rights to a number of patents, trademarks, copyrights, trade secrets, and other intellectual property. A listing of ON Semiconductor’s product/patent
coverage may be accessed at www.onsemi.com/site/pdf/Patent−Marking.pdf. ON Semiconductor reserves the right to make changes without further notice to any products herein.
ON Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does ON Semiconductor assume any liability
arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation special, consequential or incidental damages.
Buyer is responsible for its products and applications using ON Semiconductor products, including compliance with all laws, regulations and safety requirements or standards,
regardless of any support or applications information provided by ON Semiconductor. “Typical” parameters which may be provided in ON Semiconductor data sheets and/or
specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals” must be validated for each customer
application by customer’s technical experts. ON Semiconductor does not convey any license under its patent rights nor the rights of others. ON Semiconductor products are not
designed, intended, or authorized for use as a critical component in life support systems or any FDA Class 3 medical devices or medical devices with a same or similar classification
in a foreign jurisdiction or any devices intended for implantation in the human body. Should Buyer purchase or use ON Semiconductor products for any such unintended or unauthorized
application, Buyer shall indemnify and hold ON Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and
expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such
claim alleges that ON Semiconductor was negligent regarding the design or manufacture of the part. ON Semiconductor is an Equal Opportunity/Affirmative Action Employer. This
literature is subject to all applicable copyright laws and is not for resale in any manner.
◊ www.onsemi.com AND9820/D
49