ST VD6283 User Manual
ST VD6283 User Manual

ST VD6283 User Manual

Multispectral sensor application programming interface

Advertisement

Quick Links

Getting started with VD6283 multispectral sensor application programming
Introduction
VD6283 is an ambient light sensor with a flicker extraction engine.
The purpose of this user manual is to describe the integration model and the set of functions to use the VD6283 bare driver.
References
UM2867 - Getting started with the STMicroelectronics X-CUBE-ALS software package for STM32CubeMX
DS13735 - Hybrid filter multispectral sensor with light flicker engine
UM2878 - Rev 1 - June 2021
For further information contact your local STMicroelectronics sales office.
UM2878
User manual
interface
www.st.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VD6283 and is the answer not in the manual?

Questions and answers

Summary of Contents for ST VD6283

  • Page 1 Introduction VD6283 is an ambient light sensor with a flicker extraction engine. The purpose of this user manual is to describe the integration model and the set of functions to use the VD6283 bare driver. References • UM2867 - Getting started with the STMicroelectronics X-CUBE-ALS software package for STM32CubeMX •...
  • Page 2: Vd6283 System Overview

    This driver is OS agnostic, meaning that it can be integrated in a SW stack of any customer platform without any modification. The bare driver is an implementation of a set of functions required to use the VD6283 device. It makes minimal assumptions on the OS integration and services. As such, sequencing of actions, execution/threading model, platform adaptation, and device structure allocation are not part of the bare driver implementation but left open to the integrator.
  • Page 3: Description Of Modes

    UM2878 Description of modes Description of modes The VD6383 device supports several modes that are described in the following diagrams. The diagrams in the following sections show two channels, blue and red, enabled as an example to describe the device behavior. Synchronous mode without intermeasurement period The following diagram shows how to use the bare driver to collect light count values in synchronous mode without any intermeasurement.
  • Page 4: Synchronous Gated Mode With Intermeasurement Period

    UM2878 Synchronous gated mode with intermeasurement period Synchronous gated mode with intermeasurement period The following diagram shows how to use the bare driver to collect light count values in synchronous mode with an intermeasurment period. Figure 3. Bare driver signals with intermeasurement period UM2878 - Rev 1 page 4/27...
  • Page 5: Single Shot

    UM2878 Single shot Single shot The following diagram shows how to use the bare driver to collect light count values in a single shot mode. Figure 4. Bare driver signals in single shot UM2878 - Rev 1 page 5/27...
  • Page 6: Bare Driver Basic Functions

    Figure 5. Power modes STALS API definition 3.2.1 STALS_ErrCode_t STALS_GetVersion STALS_ErrCode_t STALS_GetVersion (uint32_t *pVersion, uint32_t *pRevision) This function provides the driver version of the VD6283. Table 1. Parameters Parameter Description pVersion Pointer on a value that contains the version of the driver once this function is called...
  • Page 7: Stals_Errcode_T Stals_Init

    I2C address shall be performed with this I2C slave address. A call to the STALS_Init function shall be done to set the VD6283 device in IDLE mode. The VD6283 device needs a delay between powering it and calling STALS_Init. Please refer to the device user manual for more details.
  • Page 8: Stals_Errcode_T Stals_Getchannelcolor

    Note that a fixed readout period of ~6 ms takes place just after exposure time. This is needed by the device to set the event count values in the registers. It also returns the actual applied value in the device. For VD6283 possible values are multiples of 1.6 ms with a range of 1.6 ms to 1.6 s. Note: Exposure time is irrelevant for flicker detection.
  • Page 9: Stals_Errcode_T Stals_Getexposuretime

    UM2878 STALS API definition 3.2.6 STALS_ErrCode_t STALS_GetExposureTime STALS_ErrCode_t STALS_GetExposureTime (void *pHandle, uint32_t *pAppliedExpoTimeUs) This function returns the actual exposure time. Table 11. Parameters Parameters Description pHandle Opaque pointer used as the id of the instance of the driver pAppliedExpoTimeUs Pointer in which the value of the actual exposure time is returned Table 12.
  • Page 10: Stals_Errcode_T Stals_Getintermeasurementtime

    UM2878 STALS API definition 3.2.8 STALS_ErrCode_t STALS_GetInterMeasurementTime STALS_ErrCode_t STALS_GetInterMeasurementTime (void *pHandle, uint32_t *pAppliedInterMeasurmentInUs) This function returns the actual intermeasurement. Table 15. Parameters Parameter Description pHandle Opaque pointer used as the id of the instance of the driver pAppliedInterMeasurmentInUs Pointer in which the value of the actual intermeasurement time is returned Table 16.
  • Page 11: Stals_Errcode_T Stals_Getuid

    UM2878 STALS API definition 3.2.10 STALS_ErrCode_t STALS_GetUid STALS_ErrCode_t STALS_GetUid (void *pHandle, char **pUid) This function returns the device unique id. Unique id is a null terminated string. Table 19. Parameters Parameter Description pHandle Opaque pointer used as the id of the instance of the driver pUid Pointer on a char pointer in which address of uid string will be set Table 20.
  • Page 12: Stals_Errcode_T Stals_Getgain

    UM2878 STALS API definition 3.2.12 STALS_ErrCode_t STALS_GetGain STALS_ErrCode_t STALS_GetGain (void *pHandle, enum STALS_Channel_Id_t ChannelId, uint16_t *pAppliedGain) This function gets the actual gain applied in the device. Table 23. Parameters Parameter Description pHandle Opaque pointer used as the id of the instance of the driver ChannelId This id identifies the channel number.
  • Page 13: Stals_Errcode_T Stals_Start

    UM2878 STALS API definition 3.2.14 STALS_ErrCode_t STALS_Start STALS_ErrCode_t STALS_Start (void *pHandle, enum STALS_Mode_t Mode, uint8_t Channels) This function starts the device. Table 27. Parameters Parameter Description pHandle Opaque pointer used as the id of the instance of the driver Mode shall be STALS_MODE_ALS_SINGLE_SHOT, Mode STALS_MODE_ALS_SYNCHRONOUS or STALS_MODE_FLICKER.
  • Page 14: Stals_Errcode_T Stals_Getalsvalues

    UM2878 STALS API definition 3.2.16 STALS_ErrCode_t STALS_GetAlsValues STALS_ErrCode_t STALS_GetAlsValues (void *pHandle, uint8_t Channels, struct STALS_Als_t *pAlsValue, uint8_t *pMeasureValid) This function provides the event count values for the selected channels. Table 30. Parameters Parameter Description pHandle Opaque pointer used as the id of the instance of the driver An OR value of the STALS_Channel_Id_t that sets the channels from which the Channels event count values are to be retrieved.
  • Page 15: Stals_Errcode_T Stals_Setcontrol

    UM2878 STALS API definition 3.2.18 STALS_ErrCode_t STALS_SetControl STALS_ErrCode_t STALS_SetControl (void *pHandle, enum STALS_Control_Id_t ControlId, uint32_t ControlValue ) This function sets a control to the STALS driver. Table 34. Parameters Parameter Description pHandle Opaque pointer used as the id of the instance of the driver ControlId Identifier of the params.
  • Page 16: Stals.h File Reference

    UM2878 STALS.h file reference STALS.h file reference 3.3.1 Data structures • struct STALS_FlickerInfo_t This structure contains the fields filled by the driver and which contain the discovered information related to the flicker. • struct STALS_Als_t This structure defines the parameters which provide the event counts values of the last light integration, for the selected channels.
  • Page 17: Functions

    UM2878 STALS.h file reference 3.3.4 Functions • STALS_ErrCode_t STALS_Init (char *pDeviceName, void *pClient, void **pHandle) This function initializes the STALS driver. • STALS_ErrCode_t STALS_Term (void *pHandle) This function terminates the provided STALS driver instance. • STALS_ErrCode_t STALS_GetVersion (uint32_t *pVersion, uint32_t *pRevision) This function returns the bare driver version •...
  • Page 18: Macro Definition Documentation

    STALS_COLOR_RED indicates color RED is set STALS_COLOR_GREEN indicates color GREEN is set STALS_COLOR_BLUE indicates color BLUE is set STALS_COLOR_UV indicates UV filter - not available on VD6283 STALS_COLOR_CLEAR indicates clear filter is set STALS_COLOR_CLEAR_IR_CUT indicates clear filter with ir cut is set...
  • Page 19: Enum Stals_Errcode_T

    STALS_PEDESTAL_VALUE Control to set the value of the pedestal For example : STALS_SetControl(pHandle, STALS_PEDESTAL_VALUE, 6); STALS_OUTPUT_DARK_ENABLE Control to set if dark is output. For VD6283 dark count will be output on channel 2. STALS_SDA_DRIVE_VALUE_MA Control to set drive current in sda pad in mA when device is driving sda line.
  • Page 20: Enum Stals_Mode_T

    UM2878 Enumeration type documentation • use STALS_GetControl() to get wa status. pControlValue is then an in/out parameter. You call it with the wa for which you want to know state. On exit you read msb bit to know wa status. 3.5.6 enum STALS_Mode_t This enumeration is aimed at defining the different behavior modes of the STALS device.
  • Page 21: Appendix A Examples

    Examples ALS measure in single shot mode CustomerPrivate client; void *hdl; // sensor initialization Error = STALS_Init("VD6283", &client, &hdl); // First configure device settings Error = STALS_SetExposureTime(hdl, 10000, &current_exposure); Error = STALS_SetGain(hdl, STALS_CHANNEL_1, 0x0100, &current_gain); // Start ALS acquisition Error = STALS_Start(hdl, STALS_MODE_ALS_SINGLE_SHOT, STALS_CHANNEL_1);...
  • Page 22: Flicker Measure Using An External Adc

    Flicker measure using an external ADC Flicker measure using an external ADC CustomerPrivate client; void *hdl; // sensor initialization Error = STALS_Init("VD6283", &client, &hdl); // First configure sensor settings Error = STALS_SetGain(hdl, STALS_CHANNEL_6, 0x0a00, &current_gain); Error = STALS_SetFlickerOutputType(hdl, STALS_FLICKER_OUTPUT_ANALOG); // start Flicker sampling Error = STALS_Start(hdl, STALS_MODE_FLICKER, STALS_CHANNEL_6);...
  • Page 23: Parallel Als And Flicker Measure Using An External Adc

    CustomerPrivate client; void *hdl; int als_started = 0; int start_flk = 0; // sensor initialization Error = STALS_Init("VD6283", &client, &hdl); // First configure device settings Error = STALS_SetInterMeasurementTime(hdl, 0, &current_inter_measurement); Error = STALS_SetExposureTime(hdl, 50000, &current_exposure); Error = STALS_SetGain(hdl, STALS_CHANNEL_1, 0x0100, &current_gain);...
  • Page 24: Revision History

    UM2878 Revision history Table 39. Document revision history Date Version Changes 28-Jun-2021 Initial release UM2878 - Rev 1 page 24/27...
  • Page 25: Table Of Contents

    VD6283 system overview ........
  • Page 26 UM2878 Contents 3.3.4 Functions ............. 17 Macro definition documentation.
  • Page 27 ST’s terms and conditions of sale in place at the time of order acknowledgement. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of Purchasers’...

Table of Contents