MT9J003
www.onsemi.com
42
SENSOR CORE DIGITAL DATA PATH
Test Patterns
The MT9J003 supports a number of test patterns to
facilitate system debug. Test patterns are enabled using
test_pattern_mode (R0x0600–1). The test patterns are listed
in Table 21.
Table 21. TEST PATTERNS
test_pattern_mode
Description
0 Normal operation: no test pattern
1 Solid color
2 100% color bars
3 Fade-to-gray color bars
4 PN9 link integrity pattern (only on sensors with serial interface)
256 Walking 1s (12-bit value)
257 Walking 1s (10-bit value)
258 Walking 1s (8-bit value)
Test patterns 0–3 replace pixel data in the output image
(the embedded data rows are still present). Test pattern 4
replaces all data in the output image (the embedded data
rows are omitted and test pattern data replaces the pixel
data).
HiSPi Test Patterns
Test patterns specific to the HiSPi are also generated. The
test patterns are enabled by using test_enable (R0x31C6 − 7)
and controlled by test_mode (R0x31C6[6:4]).
Table 22. HiSPi TEST PATTERNS
test_mode
Description
0 Transmit a constant 0 on all enabled data lanes
1 Transmit a constant 1 on all enabled data lanes
2 Transmit a square wave at half the serial data rate on all enabled data lanes
3 Transmit a square wave at the pixel rate on all enabled data lanes
4 Transmit a continuous sequence of pseudo random data, with no SAV code, copied on all enabled data lanes
5 Replace data from the sensor with a known sequence copied on all enabled data lanes
For all of the test patterns, the MT9J003 registers must be
set appropriately to control the frame rate and output timing.
This includes:
• All clock divisors
• x_addr_start
• x_addr_end
• y_addr_start
• y_addr_end
• frame_length_lines
• line_length_pck
• x_output_size
• y_output_size
Test Cursors
The MT9J003 supports one horizontal and one vertical
cursor, allowing a crosshair to be superimposed on the image
or on test patterns 1–3. The position and width of each cursor
are programmable in R0x31E8–R0x31EE. Both even and
odd cursor positions and widths are supported.
Each cursor can be inhibited by setting its width to “0.”
The programmed cursor position corresponds to the x and y
addresses of the pixel array. For example, setting
horizontal_cursor_position to the same value as
y_addr_start would result in a horizontal cursor being drawn
starting on the first row of the image. The cursors are opaque
(they replace data from the imaged scene or test pattern).
The color of each cursor is set by the values of the Bayer
components in the test_data_red, test_data_greenR,
test_data_blue and test_data_greenB registers. As a
consequence, the cursors are the same color as test pattern
1 and are therefore invisible when test pattern 1 is selected.
When vertical_cursor_position = 0x0FFF, the vertical
cursor operates in an automatic mode in which its position
advances every frame. In this mode the cursor starts at the
column associated with x_addr_start = 0 and advances by a