VL6522 VGA resolution USB2.0 web camera sensor Preliminary Data Features Description ■ 640 x 480 (VGA) USB2.0 Web camera ■ RGB Bayer color filter array ■ 3.6 µm pixel size ■ Integrated 10-bit video ADC and processing ■ 16-bit audio pre-amplifier, Σ - Δ ADC and processing The VL6522 is a VGA imager on chip (IOC), fabricated in a high performance 0.18 µm CMOS imaging process. The device produces a YUV 4:2:2 digital video data stream at up to 60(a) frames per second, and supports a microphone input. ■ USB2.0 high speed interface for data transfer and control ■ I2C master capability ■ USB audio class type 1 compliance ■ USB video YUV2 compliance ■ On-chip 3.3 V and 1.8 V regulators ■ Requires single 5 V supply ■ Minimum required PCB support components ■ Video format: 640 x 480 YUV2 up to 30 fps ■ Single 12 MHz input clock ■ Integrated image processing functions: – Automatic exposure – Automatic white balance – Dark level compensation – Lens shading correction – Image sub-sampling – Flicker cancellation – Sharpening – Gamma correction – RGB to YUV 422 ■ Video and audio data is output via a USB2.0 high speed (480 Mbps) interface and allows simple interfacing to a host PC using generic audio and video class drivers under the appropriate operating system (Windows XP). Audio/video class compliance and vendor command sets allow development of other O/S drivers with relative ease. Figure 1. Audio pre-amplifier + ADC Functional block diagram VGA pixel array + ADC readout audio data pixel video data Digital processing Power management OSC, PLL USB2 interface Audio processing: – Audio class compliance PCM16 – Preamplifier + ADC + processing – Audio rates of 8 kHz to 48 kHz, 16 bits – Audio dynamic range from mic. input to USB data output > 60 dB a. 60 fps max at QVGA resolution, 30 fps max at VGA resolution July 2007 Rev 2 This is preliminary information on a new product now in development or undergoing evaluation. Details are subject to change without notice. 1/35 www.st.com 35 Contents VL6522 Contents 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Technical specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.1 USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.2 User customizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.3 Video data standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.4 Audio data standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.5 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 Pinout and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4 3.1 Pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Detailed description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1 2/35 Image data pipeline (IDP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.2 Dark level compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.3 Flicker cancellation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.4 Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.5 Lens shading correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.6 Channel offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.7 Channel gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.8 Defect correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.9 Interpolation (demosaic) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.10 Color matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.11 Sharpening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.12 Gamma correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.13 RGB to YUV 422 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.14 Automatic frame rate control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.1.15 Fade to black . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 VL6522 Contents 4.2 Audio data pipeline (ADP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2.1 4.3 5 7 ICB system control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.3.1 System control overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.3.2 I2C mastering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1 Register interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.2 Hardware control registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.3 6 Audio overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.2.1 Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.2.2 SETUP register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.2.3 MAN_SPEC_AV register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.2.4 MAN_SPEC_AUDIO register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.2.5 MAN_SPEC_I2C_MASTER register . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Firmware control registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.3.1 ID codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.3.2 Misc controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.3.3 Exposure controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.3.4 Fade to black . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.3.5 Frame dimension parameter host inputs . . . . . . . . . . . . . . . . . . . . . . . . 21 5.3.6 White balance controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.3.7 Automatic frame rate control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.3.8 Video control processing unit descriptors . . . . . . . . . . . . . . . . . . . . . . . 24 Electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1 Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.2 Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.3 DC electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.4 AC electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.4.1 USB2.0 interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.4.2 External crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.4.3 RESETN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.4.4 I2C Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 User precaution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3/35 Contents VL6522 8 Package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 9 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 10 Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 11 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4/35 VL6522 Overview 1 Overview 1.1 Architecture The design includes an image control bus (ICB) mastering unit in the form of a microcontroller used for top-level autonomous management of power, SFPs, USB standard, audio and video class command handling and translation to IDP video and audio processing modules. The microcontroller is also used to run auto exposure and white balance functions. There are two data pipelines: the audio data pipe (ADP) and the image data pipe (IDP). 1.2 Technical specifications Table 1. Technical specifications Parameter Values Image size 640 x 480 (VGA) Pixel size 3.6 µm x 3.6 µm Array size 2.32 mm x 1.74 mm Exposure control auto Frame rate auto or adjustable up to 60 fps Clock frequency 12 MHz Output format USB2.0 (YUV2) Output data rate 480 MHz (USB2) Audio analogue gain 24 dB Audio signal/noise ratio 59 dB Supply voltage (V) Supply current (mA typ.) VGA 30 fps + audio 5 3.3 1.8 14.7 16.3 45.1 Total current consumption from single 5 V supply(1) 74.8 mA Operating temperature -30o C to 70o C Package type LGA36 1. Typical value VGA @ 30 fps + audio 1.3 Power consumption From a power consumption perspective the principal modes are: 1. Active - high speed streaming of audio and video, or video only, or audio only. 2. Suspend - standby mode, with lowest current consumption in conformance with the USB2.0 standard. 5/35 Overview VL6522 1.4 Interface 1.4.1 USB The details of the USB interface are summarized in Table 2. Table 2. Details of USB interface Function Scope Description Standard to which device will comply Comments USB endpoints Control (default, audio, video) 1.4.2 Control USB spec. rev2.0 HS Interrupt (snapshot button, video class interrupt) Video USB video class rev1.0 Isochronous (video class data) Audio USB audio class rev2.0 Isochronous (audio class data) User customizing Four special function port pins can allow PID/VID selections, support EEPROM (I2C mastering) and customization for driving LED(s) and sensing switch or button states. VID/PIDs can be programmed into EEPROM. 1.4.3 Video data standard The video processing pipeline delivers fully reconstructed VGA (640 x480) color data conforming to YUV 4:2:2 at up to 30 fps in accordance with video class specification (Packed YUV Format - YUV2, GUID 32595559-0000-0010-8000-00AA00389B71). 1.4.4 Audio data standard The audio processing pipeline delivers audio data (to 48 kHz, 16 bits) in accordance with the audio class specification Type 1 (PCM, Pulse Coded Modulation, uncompressed). 16-bit signed two’s-complement fixed point format (left-justified meaning the sign bit is the MSB). The binary point is located to the right of the sign bit so that all values lie within the range [-1 to +1]. 1.4.5 Software As the VL6522 is video/audio class, no software drivers are necessary to operate with Windows operating systems from XP SP2 onwards. A unified windows driver is available to allow operation under Windows 2000. This driver is also compatible with Windows XP, XP64, Vista 32 and Vista 64. Although the driver is not necessary for use with these operating systems, it does offer additional benefits to the user, such as the face finding and tracking function, to keep the user's face in frame when videoconferencing for example. A linux driver is available to allow the VL6522 to be used with a linux based system. 6/35 VL6522 Block diagram 2 Block diagram Figure 2. Block diagram of typical USB Web camera using VL6522 USB2.0 Web camera LGA36 V5V VDD5 AUD3V3 AudReg VID3V3 BG5V 5V BG DReg1 5v to 3v VidReg VBASE3V3 VDD3IO VDD1 VDD3 VBASE1V8 Video Pwr Mngt SUPPLY3V6 VGA array + ADC 3V vbg BG VIDVSS Dreg2 3v to 1v8 core logic VSSIO VDD1V8 VSS SFP3 Pwr Mngt SFP2 USB_VDD3 IDP SFP1 ewarp YUV 422 SFP0 RESETN TEST test mode USB2 PHY XTAL_OUT XTAL_IN USB_DN USB_DP 480MHz USB_RREF Digital Core 60 USB_VSSB Digital usb top XTAL 12MHz USB - connector USB_VDDB E2PROM IC, LED USB_VDDC OSC 12 clkgen USB_VSSC 1080 PLL VDDPLL VSSPLL VDDAUD3V3 MICBIAS electret mic. MICIN Audio PAmp AUDVSS Audio Ref Audio SD ADC Audio 12M AUDP digital LL VDD1V8 AUDPLLFLT Gnd VSS 7/35 Pinout and pin description VL6522 3 Pinout and pin description 3.1 Pinout The device is available in LGA36 package. The first pixel (1,1) will appear as illustrated in Figure 3. 8/35 MICIN MICBIAS SFP3 VIDVSS VID3V3 SUPPLY3V6 VBASE1V8 VDD5 VBASE3V3 35 34 33 32 31 30 29 28 Device pinout 36 Figure 3. AUDVSS 1 27 BG5V AUD3V3 2 26 VSS USB_VDD3 3 25 VDD1V8 USB_VSSC 4 24 SFP2 USB_VSSB 5 23 VSSIO USB_DN 6 22 VDD3IO USB_DP 7 21 SFP1 USB_VDDB 8 20 SFP0 USB_RREF 9 19 RESETN 10 11 12 13 14 15 16 17 18 USB_VDDC VDDPLL XTAL_IN XTAL_OUT VSSPLL vDD1v8 VSS_1 AUDPLLFLT TEST (1,1) First pixel readout VL6522 Pinout and pin description 3.2 Pin description Table 3. Pin description Pin number Pin name Pin type Description Comments 1 AUDVSS POWER Ground for audio analog 2 AUD3V3 POWER 3.3 V supply for audio analog 3 USB_VDD3 POWER 3.3 V supply for USB2.0 core 4 USB_VSSC POWER Ground for USB2.0 core 5 USB_VSSB POWER Ground for USB2.0 output 6 USB_DN I/O/Z USB D- signal 7 USB_DP I/O/Z USB D+ signal 8 USB_VDDB POWER 1.8 V supply for USB2.0 output 9 USB_RREF I USB2.0 compensation block reference resistor 10 USB_VDDC POWER 1.8 V supply for USB2.0 core 11 VDDPLL POWER 1.8 V supply for master PLL 12 XTAL_IN I External crystal input 13 XTAL_OUT O External crystal output 14 VSSPLL POWER Ground for master PLL 15 VDD1V8 POWER 1.8 V supply for core digital and audio PLL 16 VSS POWER Ground for core digital and audio PLL 17 AUDPLLFLT I Audio PLL filter network External components required if audio used, leave open if no audio 18 TEST I Test mode select Required external pull down 19 RESETN I VL6522 reset signal from POR Active low 20 SFP0 I/O/Z I2C SCL (EEPROM) or GPIO port 3v3 21 SFP1 I/O/Z I2C SDA (EEPROM) or GPIO port 3v3 22 VDD3IO POWER 3.3 V supply for IO 23 VSSIO POWER Ground for IO 24 SFP2 I/O/Z GPIO port 25 VDD1V8 POWER 1.8 V supply for digital core 26 VSS POWER Ground for digital core 27 BG5V O Bandgap output External capacitor required 28 VBASE3V3 PWR 3.3 V digital regulator control output Connect to ext. PNP base 29 VDD5 POWER 5.0 V Supply 30 VBASE1V8 PWR 1.8 V digital regulator control output Connect to 12 MHz crystal 3v3 Connect to ext. PNP base 9/35 Pinout and pin description Table 3. Pin number VL6522 Pin description (continued) Pin name Pin type Description 31 SUPPLY3V6 POWER External reservoir cap. 32 VID3V3 POWER 3.3 V supply for video analog 33 VIDVSS POWER Ground for video analog 34 SFP3 I GPI (input only) 35 MICBIAS O Microphone bias voltage 36 MICIN I Microphone input signal 10/35 Comments 3v3 VL6522 Detailed description 4 Detailed description 4.1 Image data pipeline (IDP) 4.1.1 Overview The video processing blocks included in the VL6522 IDP are listed below: 4.1.2 ● Dark level compensation ● Flicker cancellation ● Statistics ● Lens shading correction ● Channel offset ● Channel gain ● Defect correction ● Interpolation ● Color matrix ● Sharpening ● Gamma correction ● RGB to YUV 422 ● Automatic frame rate control ● Fade to black Dark level compensation A dedicated DSP uses information from special dark lines within the pixel array to apply an offset to the video data and ensure a consistent ‘black’ level. 4.1.3 Flicker cancellation The 50/60 Hz flicker frequency present in the lighting (due to fluorescent lighting) can be cancelled by the system. 4.1.4 Statistics The function of the statistics processor is to gather statistics on Bayer IDP data. The statistics are made available to the Imaging Control Bus Host for tasks such as automatic exposure control and white balance. 4.1.5 Lens shading correction The lens shading correction module is used to reduce the visible effect of vignetting where inherent problems in lens design can cause non-uniformities in levels of light transmission across the image plane. The extent of transmission loss is primarily a function of lens quality and fabrication tolerances, but generally increases radially from the lens’ optical centre towards the edges of the scene. 11/35 Detailed description VL6522 Typically, the visual effect is at its worst where the distance from the optical centre to the edge of the image is at its maximum and manifests itself as the familiar ‘darkening of the image corners’. 4.1.6 Channel offset The channel offset module is used to add or subtract a programmable offset from each of the four Bayer color channels of the incoming IDP. These offsets are typically used to remove a data pedestal or cancel a dark offset introduced at an earlier stage in the pipe. 4.1.7 Channel gain The channel gain module is used to apply a programmable gain to each of the four Bayer color channels of input data. These gains are used as controls of Automatic Exposure Control (AEC) and Automatic White Balance (AWB). 4.1.8 Defect correction This function runs a defect correction filter over the data in order to remove defects from the final output. This function has been optimized to attain the minimum level of defects from the system. 4.1.9 Interpolation (demosaic) The interpolation module converts Bayer pixel data to RGB and applies an anti-alias filter to the data. 4.1.10 Color matrix The color matrix correction transformation is performed on the outputs of the interpolation module. 4.1.11 Sharpening The sharpening module’s function is to add a certain amount of peaking components to the original interpolated RGB. Indeed, the interpolation process involves a certain degree of low-pass filtering that blurs the original sharpness of the image. In order to realize 2-dimensional sharpness easily, the sharpening filter is only applied on the green components (green carries the highest luma component). The output of the filter is re-injected into the R, G, and B components from the matrix, via a process called coring. 4.1.12 Gamma correction The gamma correction module applies a non-linear compensation to the IDP RGB data stream in order to achieve correct reproduction of intensity on the host display. 4.1.13 RGB to YUV 422 Conversion of RGB to YUV 4:2:2. The YUV comprises luminance (Y) and chrominance (U and V) components. 12/35 VL6522 4.1.14 Detailed description Automatic frame rate control When enabled, the automatic frame rate control will reduce the frame rate in low light levels to improve image quality. By default the minimum frame rate that the device will use is 5 fps. 4.1.15 Fade to black Using programmable levels the microprocessor will fade the output signal to black. This ensures that under the darkest conditions, when the image is not of sufficient quality, the device will output black. This operation is achieved by scaling the RGB to the YCbCr matrix. 4.2 Audio data pipeline (ADP) The audio block contains functions allowing the capture and processing of audio data from an external microphone. The processed data is then written into an external FIFO which is in turn read by the USB control. 4.2.1 Audio overview The audio processing blocks used in the VL6522 ADP are listed below: ● Microphone amplifier with programmable gain ● 16-bit sigma delta ADC ● Digital AGC(b), volume and noise gate ● Variable sample rate at both 8 and 16 bits ● Interface to external async audio FIFO ● ICB register bank to provide control and status 4.3 ICB system control 4.3.1 System control overview In the VL6522, the embedded microcontroller has five main functions: ● USB management ● Power management ● SFP management ● Auto exposure control (AEC) The task of the exposure control is to ensure that all scenes are correctly exposed to provide a good level of contrast. In normal operation the VL6522 will use hardware-generated statistics to determine appropriate exposure settings for a particular scene and adjust the system accordingly to give a correctly exposed image. ● Auto white balance (AWB) Using hardware-generated statistics the microcontroller adjusts the gains applied to the individual color channels in order to achieve a correctly color balanced image. b. The Automatic Gain Control is disabled by default 13/35 Detailed description 4.3.2 VL6522 I2C mastering This allows the control of the slave I2C lines, which can be useful for reading from and writing to an EEPROM, or for control of any other I2C device. If 'manual_mode' is set, then the SCL/SDA lines can be bit bashed by writing direct to 'sda' and 'scl'. Otherwise these are controlled automatically. The 'clk_div' reg is used to slow down the clock if necessary (default is zero which should result in approx 400 kHz SCL). The 'start' bit will generate an I2C start bus condition when set high. The 'cmd_processed' bit will initially be set low and then go high when the command is complete. The 'stop' bit will generate an I2C stop bus condition when set high.The 'cmd_processed' bit will initially be set low and then go high when the command is complete. The 'read' bit will kick off a read from the current address. The 'cmd_processed' bit will be set low and then go high when the command is complete. At this point the READ_BYTE register will contain the data. If the 'multiple_read' bit is set, then the address will be auto-incremented after each 'read'. That is, you can kick off another read without first having to set the address. To write a byte, write the data value into the WRITE_BYTE register, then wait for the 'cmd_processed' bit to go high. Finally check that the 'ack_rx' (acknowledge recieved) bit is high. The 'eeprom_present' bit is set by the firmware when it first attempts to address the eeprom. If it gets an acknowledge then this bit is set high, otherwise it is set low. Note: 14/35 See Table 10 on page 17 for locations of and information on relevant registers. VL6522 Register description 5 Register description 5.1 Register interpreter Register contents represent different data types as described in Table 4. Table 4. Register naming prefix Prefix Description UIA_BYTE = b One byte unsigned data UIA_UINT16 = w Twobyte data UIA_UINT16 = uw Two byte unsigned data Flag_e(F) = f One byte data. Only two possible values UIA_FLOAT = fp Two byte data. Expect value in Floating Point 16 notation UIA_INT8 = sb One byte signed data Registers not listed in this datasheet should be considered as reserved or read-only and should not be written to, as this may cause unpredictable results. The VL6522 registers can be written to using the extension units within the Windows video class. All register locations contain an 8-bit byte. However, certain parameters require 16 bits to represent them and are therefore stored in more than 1 location. Note: For all 16 bit parameters, the MSB register must be written before the LSB register. The data stored in each location can be interpreted in different ways as shown below. Register contents represent different data types as described in Table 5. Table 5. Data type Data type Description BYTE Single field register 8 bit parameter UINT_16 Multiple field registers - 16 bit parameter FLAG_e Bit 0 of register must be set/cleared CODED Coded register - function depends on value written FLOAT Float Value Float number format Float 900 is used in ST co-processors to represent floating point numbers in 2 bytes of data. It conforms to the following structure: Bit[15] = Sign bit (1 represents negative) Bit[14:9] = 6 bits of exponent, biased at decimal 31 Bit[8:0] = 9 bits of mantissa 15/35 Register description VL6522 5.2 Hardware control registers 5.2.1 Status Table 6. Status Index Status register [read only] REVISION_NUMBER 0x0002 Default value 0x04 Purpose Identifies the cut of silicon(1) Type BYTE Possible values <0x00> Cut 1.0 <0x01> Cut 1.1 <0x02> Cut 1.2 <0x03> Cut 1.3 <0x04> Cut 1.4 1. This document refers to cut 1.4 of silicon. 5.2.2 SETUP register Table 7. SETUP register Index SETUP register IMAGE_ORIENTATION 0x0002 Default value 0x00 Purpose Selects the orientation of the image Type BYTE Possible values <0x00> Normal <0x01> Horizontal flip (mirrored) <0x02> Vertical flip <0x03> Horizontal & vertical flip 5.2.3 MAN_SPEC_AV register Table 8. MAN_SPEC_AV register Index MAN_SPEC_AV register R2_COEFF 0x322a 16/35 Default value 0x04 Purpose Radial R2 anti-vignetting (lens shading) coefficient, to allow lightening and darkening of image corners (for special effects, as well as standard av compensation). Type BYTE Possible values -127 to 127 VL6522 Register description 5.2.4 MAN_SPEC_AUDIO register Table 9. MAN_SPEC_AUDIO register Index MAN_SPEC_AUDIO register ALC 0x3340 Default value 0x00 Purpose Automatic gain control enable Type BYTE Possible values <0x00> Automatic gain control off <0x80> Automatic gain control on VOLUME 0x3346 Default value 0x3f Purpose Audio volume Type BYTE Possible values 0 to 63 MIC_GAIN 0x3348 Default value 0x06 Purpose Microphone input stage gain Type BYTE Possible values 0 to 7 5.2.5 MAN_SPEC_I2C_MASTER register Table 10. MAN_SPEC_I2C_MASTER register MAN_SPEC_I2C_MASTER register(1) Index CTRL 0x3350 Default value 0x07 Purpose Control for the I2C Type CODED Possible values <0> SCL <1> SDA <2> Manual mode <4:3> Clock divider 17/35 Register description Table 10. VL6522 MAN_SPEC_I2C_MASTER register (continued) MAN_SPEC_I2C_MASTER register(1) Index CMD 0x3351 Default value 0x00 Purpose I2C command Type CODED Possible values <0> Start <1> Stop <2> Read <3> Multiple read WRITE_BYTE Default value 0x3352 0x00 Purpose Type BYTE Possible values 0 to 255 READ_BYTE [read only] Default value 0x3353 0x00 Purpose Type BYTE Possible values 0 to 255 STATUS [read only] 0x3354 Default value 0x01 Purpose I2C Status Type CODED Possible values <0> Command processed <1> Acknowledge received <2> EEPROM present <3> EEPROM error 1. More detail on how to use the I2C master can be found in the I2C mastering section 4.3.2 18/35 VL6522 Register description 5.3 Firmware control registers 5.3.1 ID codes Table 11. ID codes IDCodes(1) register Index idVendor 0x8008 Default value 0x0553 Purpose Vendor identification Type UINT_16 Possible values 0x0000 to 0xffff (1) idProduct 0x800a Default value 0x0522 Purpose Product identification Type UINT_16 Possible values 0x0000 to 0xffff (1) 1. This data is stored in little endian format: the LSB is located at the lower index. 5.3.2 Misc controls Table 12. Misc controls Index MiscControls register fDisableVideoClassGUI 0x84dc Default value 0x00 Purpose Disables the GUI Type FLAG_e Possible values <0x00> GUI enabled <0x01> GUI disabled 5.3.3 Exposure controls Table 13. Exposure controls Index ExposureControls register bAntiFlickerMode 0x8510 Default value <0> AntiFlickerMode_Inhibit Purpose Anti flicker mode Type CODED Possible values <0> AntiFlickerMode_Inhibit <1> AntiFlickerMode_ManualEnable <2>AntiFlickerMode_AutomaticEnable 19/35 Register description 5.3.4 Fade to black Table 14. Fade to black VL6522 Index FadeToBlack register fDisable 0x85cb Default value 0x00 Purpose Disables the Fade to Black Type FLAG_e Possible values <0x00> Fade to Black enabled <0x01> Fade to Black disabled fpBlackValue 0x85cc Default value 0x0000 (0.0000) Purpose Black Value Type FLOAT Possible values -8581545984 to 8581545984 (0xffff to 0x7fff) fpDamperLowThreshold 0x85ce Default value 0x6a25 (4497408) Purpose Low Threshold for exposure for calculating the damper slope Type FLOAT Possible values -8581545984 to 8581545984 (0xffff to 0x7fff) fpDamperHighThreshold 0x85d0 Default value 0x6c9f (10993664) Purpose High Threshold for exposure for calculating the damper slope Type FLOAT Possible values -8581545984 to 8581545984 (0xffff to 0x7fff) fpDamperOutput [read only] 0x85d2 20/35 Default value 0x00 (0.0000) Purpose Minimum possible damper output. Type FLOAT Possible values 0 to 1 (0x0000 to 0x3e00) VL6522 Register description 5.3.5 Frame dimension parameter host inputs Table 15. Frame dimension parameter host inputs Index FrameDimensionParameterHostInputs register bLightingFrequency_Hz Default value 0x64 Purpose AC Frequency - used for flicker free time period calculations this mains frequency determines the flicker free time period. Type BYTE Possible values 0 to 255 Note: The value is double the desire frequency in Hz. i.e. 0x64 = 100 which equates to 50 Hz. 0x85fa 5.3.6 White balance controls Table 16. White balance controls Index WhiteBalanceControls register bMode Default value 0x00 Purpose Disables the GUI Type CODED Possible values <0> OFF - No White balance, all gains will be unity in this mode <1> AUTOMATIC - Automatic mode, relative step is computed here <3> MANUAL_RGB - User manual mode, gains are applied manually <4> DAYLIGHT_PRESET - DAYLIGHT and all the modes below, fixed value of gains are applied here. <5> TUNGSTEN_PRESET <6> FLUORESCENT_PRESET <7> HORIZON_PRESET <8> MANUAL_COLOUR_TEMP <9> FLASHGUN_PRESET 0x8652 bManualRedGain 0x8653 Default value 0x00 Purpose User setting for Red Channel gain. Type BYTE Possible values 0 to 255 Applied_Red_Gain = (1 + bManualRedGain / 128) / MinGain Where MinGain = the smallest value from either Applied_Red_Gain, Applied_Green_Gain or Applied_Blue_Gain 21/35 Register description Table 16. VL6522 White balance controls (continued) Index WhiteBalanceControls register bManualGreenGain 0x8654 Default value 0x00 Purpose User setting for Green Channel gain. Type BYTE Possible values 0 to 255 Applied_Green_Gain = (1 + bManualGreenGain / 128) / MinGain Where MinGain = the smallest value from either Applied_Red_Gain, Applied_Green_Gain or Applied_Blue_Gain fManualBlueGain 0x8655 Default value 0x00 Purpose User setting for Blue Channel gain. Type BYTE Possible values 0 to 255 Applied_Blue_Gain = (1 + bManualBlueGain / 128) / MinGain Where MinGain = the smallest value from either Applied_Red_Gain, Applied_Green_Gain or Applied_Blue_Gain 5.3.7 Automatic frame rate control Table 17. Automatic frame rate control Index AutomaticFrameRateControl register bMode 0x8680 Default value 0x00 Purpose Sets manual or auto frame rate Type FLAG_e Possible values <0x00> Manual frame rate. <0x01> Automatic frame rate. bImpliedGainThresholdLow_num 0x8681 22/35 Default value 0x05 Purpose Numerator for calculation of low threshold of automatic framerate control Type BYTE Possible values 0 to 255 VL6522 Table 17. Register description Automatic frame rate control (continued) Index AutomaticFrameRateControl register bImpliedGainThresholdLow_den 0x8682 Default value 0x01 Purpose Denominator for calculation of low threshold of automatic framerate control. Type BYTE Possible values 0 to 255 bImpliedGainThresholdHigh_num 0x8683 Default value 0x08 Purpose Numerator for calculation of high threshold of automatic framerate control Type BYTE Possible values 0 to 255 bImpliedGainThresholdHigh_den 0x8684 Default value 0x01 Purpose Denominator for calculation of high threshold of automatic framerate control Type BYTE Possible values 0 to 255 bUserMinimumFrameRate_Hz 0x8685 Default value 0x05 Purpose Sets the minimum framerate employed when in automatic framerate mode. Type BYTE Possible values 0 to 255 bUserMaximumFrameRate_Hz 0x8686 Default value 0x3c Purpose Sets the maximum framerate employed when in automatic framerate mode. Type BYTE Possible values 0 to 255 bRelativeChange_num 0x8687 Default value 0x02 Purpose Numerator for calculation of relative change in framerate. Type BYTE Possible values 0 to 255 23/35 Register description Table 17. VL6522 Automatic frame rate control (continued) Index AutomaticFrameRateControl register bRelativeChange_den 0x8688 Default value 0x02 Purpose Denominator for calculation of relative change in framerate Type BYTE Possible values 0 to 255 5.3.8 Video control processing unit descriptors Table 18. Video control processing unit descriptors VideoControlProcessingUnitDescriptors register(1) Index Brightness 0x8709 Default value 0x0018 Purpose Video class brightness control Type UINT_16 Possible values 0x0000 to 0x0025(1) Contrast 0x870b Default value 0x007c Purpose Video class contrast control Type UINT_16 Possible values 0x0000 to 0x00c8 (1) Saturation 0x870d Default value 0x0079 Purpose Video class saturation control Type UINT_16 Possible values 0x0000 to 0x00c8(1) Sharpness 0x870f 24/35 Default value 0x000f Purpose Video class sharpness control Type UINT_16 Possible values 0x0000 to 0x003f (1) VL6522 Table 18. Register description Video control processing unit descriptors (continued) VideoControlProcessingUnitDescriptors register(1) Index Gamma 0x8711 Default value 0x0012 Purpose Video class gamma control Type UINT_16 Possible values 0x0001 to 0x001f (1) 1. This data is stored in little endian format: the LSB is located at the lower index. 25/35 Electrical characteristics VL6522 6 Electrical characteristics 6.1 Absolute maximum ratings Table 19. Absolute maximum ratings Symbol Parameter Min. Max. Unit TSTO Storage temperature -40 85 °C V5V 5 V supply 4.1 5.6 V Caution: Stresses above those listed under “Absolute Maximum Ratings” can cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions above those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. 6.2 Operating conditions Table 20. Supply specifications Symbol 26/35 Parameter Min. Max. Unit TAF Operating temperature, functional (Camera is electrically functional) -30 70 °C TAN Operating temperature, nominal (Camera produces acceptable images) -25 55 °C TAO Operating temperature, optimal (Camera produces optimal optical performance) 5 30 °C V5V 5 V supply 4.1 5.6 V VL6522 Electrical characteristics 6.3 DC electrical characteristics Note: Over operating conditions unless otherwise specified. Table 21. DC electrical characteristics (non-characterized data, guide values only) Symbol Description Test conditions Min. Typ. Max. Unit VIL Input low voltage -0.3 TBD 0.3 VDD3IO V VIH Input high voltage 0.7 VDD3IO TBD VDD3IO + 0.3 V VOL Output low voltage IOL < 2.29 mA TBD TBD 0.4 VDD V VOH Output high voltage IOH < 1.48 mA 2.6 TBD TBD V IIL Input leakage current Input pins I/O pins 0 < VIN < VDD TBD TBD +/- 10 +/- 1 µA µA CIN Input capacitance, SCL TA = 25° C, freq = 1 MHz TBD TBD TBD pF COUT Output capacitance TA = 25 °C, freq = 1 MHz TBD TBD TBD pF CI/O I/O capacitance, SDA TA = 25 °C, freq = 1 MHz TBD TBD TBD pF Table 22. Symbol Typical current consumption (non-characterised data, guide values only) Description Suspend Active(1) Video(2) Video + Audio(3) Units IVDD5 Total 5 V supply to device 0.1 0.1 9.5 14.7 mA I3V3total Total 3.3 V supply to device 0.3 7.2 14.5 16.3 mA I1V8total Total 1.8 V supply to device 0.0 28.6 44.1 45.1 mA 1. VL6522, enumerated but not streaming 2. VL6522, streaming 30 fps VGA 3. VL6522, streaming 30 fps VGA and streaming audio Note: Note: Total current drawn on single 5 V input is 0.38 mA in suspend mode. This assumes transistors are in place to provide the 3.3 V & 1.8 V from the single 5 V supply. 27/35 Electrical characteristics 6.4 AC electrical characteristics 6.4.1 USB2.0 interface VL6522 Conforms to the USB2.0 chapter 7.1. 6.4.2 External crystal The primary reason for choosing the crystal frequency and tolerance is because of the USB data rate. To comply with the USB2.0 specification, when in high speed mode (480 Mb/s), the bit accuracy has to be +/- 500 ppm. It is recommended to use a crystal with a frequency of 12 MHz and a frequency accuracy of +/- 100 ppm or better. 6.4.3 RESETN After RESETN is pulsed low (during power up for example), the device shall start up in it’s default condition. This will include reading the EEPROM, if fitted. During startup, the RESETN line should be held low for between 100 µs and 50 ms after the supplies are stable. On the reference design board, an RC circuit is used to delay the rise of RESETN using values of 470 kΩ and 100 nF. This gives a delay of approximately 20 ms between VDD3IO reaching 3 V and the device coming out of reset. 6.4.4 I2C Interface The VL6522 can be used as a I2C master. By writing to the video class extension units on the device over usb, the SDA & SCL pins can be controlled. This allows the slaving of such devices as servos, EEPROMs or any device with an I2C interface. More detail on this interface can be found in section 4.3.2. 28/35 VL6522 7 User precaution User precaution As is common with many CMOS imagers the camera should not be pointed at bright static objects for long periods of time as permanent damage to the sensor may occur. 29/35 Package mechanical data 8 VL6522 Package mechanical data In order to meet environmental requirements, ST offers these devices in ECOPACK® packages. These packages have a lead-free second level interconnect. The category of second level interconnect is marked on the package and on the inner box label, in compliance with JEDEC Standard JESD97. The maximum ratings related to soldering conditions are also marked on the inner box label. ECOPACK is an STMicroelectronics trademark. ECOPACK specifications are available at: www.st.com. Caution: The LGA package is not hermetically sealed. To prevent contamination, handle the device carefully in a clean environment and avoid contact with any liquids. Table 23. POA for optical 36LGA 10X10X1.9 0.8 Data book (mm) Reference 30/35 Typ. Min. Max. A 1.90 1.80 2.00 A4 0.4 0.35 0.45 A5 0.8 0.7 0.9 B1 2.0 B2 3.5 B3 0.55 b 0.30 0.25 0.35 D 10.00 9.90 10.10 D1 9.70 9.60 9.80 D2 5 D4 5.4 e 0.8 E 10.00 9.90 10.10 E1 9.70 9.60 9.80 E2 5 E4 4.5 G 1.1 1.0 1.2 G1 1 G2 0.4 0.3 0.5 G3 0.9 0.8 1.0 G4 0.8 H 0.9 0.8 1.0 H1 0.8 H2 0.4 0.3 0.5 VL6522 Package mechanical data Table 23. POA for optical 36LGA 10X10X1.9 0.8 (continued) Data book (mm) Reference Note: Typ. Min. Max. I 4.05 3.95 4.15 J 4.1 K 0.3 PHI 5° 4° 6° 0.7 0.9 z 1.65 L 0.8 bbb 0.01 ccc 0.1 ddd 0.08 eee 0.08 nD 9 nE 9 n 36 1 Optical- LGA stands for Optical Land Grid Array. 2 The optical centre of the imaging array is the same as the mechanical centre of the LGA package. This allows for easy alignment of the lens to the imaging array. 31/35 Package mechanical data Figure 4. 32/35 Package drawing VL6522 VL6522 9 Glossary Glossary Table 24. Glossary Acronym Description ADC Analogue to Digital Converter ADP Audio Data Pipeline AEC Automatic Exposure Control AGC Automatic Gain Control AWB Automatic White Balance CMOS Complementary Metal Oxide Semiconductor EEPROM Electronically Erasable Programmable Read Only Memory FIFO First In First Out ICB Image Control Bus IDP Image Data Pipeline JEDEC Joint Electron Device Engineering Council LED Light Emitting Diode LGA Land Grid Array LSB Least Significant Bit MSB Most Significant Bit OSC Oscillator PCM Pulse Coded Modulation PID Product Identification PLL Phase Locked Loop POA Package Outline Assembly RGB Red Green Blue SCL Serial Clock SDA Serial Data SFP Special Function Pin (Port) USB Universal Serial Bus VGA Video Graphic Array VID Vendor Identification YUV Y stands for the luminance component (the brightness) and U and V are the chrominance (color) components 33/35 Ordering information 10 VL6522 Ordering information Table 25. Order codes Part number VL6522V0MH 11 Packing LGA36 Tray Revision history Table 26. 34/35 Package Document revision history Date Revision Changes 14-Mar-2007 1 Initial release. 05-Jul-2007 2 Added Chapter 7: User precaution and a caution in Chapter 8: Package mechanical data. VL6522 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST’s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. © 2007 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 35/35