Loading...
Searching...
No Matches

Register definitions for ST VL6180X Ranging and Ambient Light Sensing (ALS) module. More...

Detailed Description

Register definitions for ST VL6180X Ranging and Ambient Light Sensing (ALS) module.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file vl6180x_regs.h.

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Register addresses

#define VL6180X_REG_MODEL_ID   (0x00)
 Device ID.
 
#define VL6180X_REG_MODEL_REV_MAJOR   (0x01)
 Device revision (major)
 
#define VL6180X_REG_MODEL_REV_MINOR   (0x02)
 Device revision (minor)
 
#define VL6180X_REG_MODULE_REV_MAJOR   (0x03)
 Module revision (major)
 
#define VL6180X_REG_MODULE_REV_MINOR   (0x04)
 Module revision (minor)
 
#define VL6180X_REG_GPIO0_MODE   (0x10)
 GPIO0 mode definition.
 
#define VL6180X_REG_GPIO1_MODE   (0x11)
 GPIO1 mode definition.
 
#define VL6180X_REG_HISTORY_CTRL   (0x12)
 ALS and Ranging history control.
 
#define VL6180X_REG_INT_CONFIG   (0x14)
 Interrupt mode config.
 
#define VL6180X_REG_INT_CLR   (0x15)
 Interrupt clear.
 
#define VL6180X_REG_FRESH_RST   (0x16)
 Fresh out of reset bit.
 
#define VL6180X_REG_RNG_START   (0x18)
 Range measurement start.
 
#define VL6180X_REG_RNG_THRESH_HI   (0x19)
 Range measurement high threshold.
 
#define VL6180X_REG_RNG_THRESH_LO   (0x1a)
 Range measurement low threshold.
 
#define VL6180X_REG_RNG_PERIOD   (0x1b)
 Range measurement period in continuous mode.
 
#define VL6180X_REG_RNG_MAX_TIME   (0x1c)
 Range measurement time limit.
 
#define VL6180X_REG_RNG_VALUE   (0x62)
 Range 8-bit value in mm.
 
#define VL6180X_REG_ALS_START   (0x38)
 ALS measurement start.
 
#define VL6180X_REG_ALS_THRESH_HI   (0x3a)
 ALS measurement high threshold.
 
#define VL6180X_REG_ALS_THRESH_LO   (0x3c)
 ALS measurement low threshold.
 
#define VL6180X_REG_ALS_PERIOD   (0x3e)
 ALS measurement period in continuous mode.
 
#define VL6180X_REG_ALS_GAIN   (0x3f)
 ALS analogue gain.
 
#define VL6180X_REG_ALS_INT_TIME   (0x40)
 ALS integration time.
 
#define VL6180X_REG_ALS_VALUE   (0x50)
 ALS 16-bit count value.
 
#define VL6180X_REG_RNG_STATUS   (0x4d)
 Range measurement status.
 
#define VL6180X_REG_ALS_STATUS   (0x4e)
 ALS measurement status.
 
#define VL6180X_REG_INT_STATUS   (0x4f)
 Interrupt status.
 
#define VL6180X_REG_I2C_ADDR   (0x212)
 Programmable device address.
 
#define VL6180X_REG_INTERLEAVED_MODE   (0x2a3)
 Interleaved mode enable.
 

Register structures

#define VL6180X_RNG_MODE_CONT   (0x02)
 Continuous range measurement mode.
 
#define VL6180X_RNG_START_STOP   (0x01)
 Start/stop range measurement.
 
#define VL6180X_ALS_MODE_CONT   (0x02)
 ALS measurement mode.
 
#define VL6180X_ALS_START_STOP   (0x01)
 Start/stop ALS measurement.
 
#define VL6180X_RNG_ERR_CODE   (0xf0)
 Range measurement error code mask.
 
#define VL6180X_RNG_ERR_CODE_S   (4)
 Range measurement error code shift.
 
#define VL6180X_RNG_DEVICE_RDY   (0x01)
 Range device ready.
 
#define VL6180X_ALS_ERR_CODE   (0xf0)
 ALS measurement error code mask.
 
#define VL6180X_ALS_ERR_CODE_S   (4)
 ALS measurement error code shift.
 
#define VL6180X_ALS_DEVICE_RDY   (0x01)
 ALS device ready.
 
#define VL6180X_ALS_GAIN_LIGHT   (0x07)
 ALS analogue gain mask (light channel)
 
#define VL6180X_INT_RNG   (0x07)
 RNG interrupt mask.
 
#define VL6180X_INT_RNG_S   (0)
 RNG interrupt shift.
 
#define VL6180X_INT_ALS   (0x38)
 ALS interrupt mask.
 
#define VL6180X_INT_ALS_S   (3)
 ALS interrupt shift.
 
#define VL6180X_ERR_INT   (0xc0)
 Error interrupt mask (VL6180X_REG_INT_STATUS only)
 
#define VL6180X_ERR_INT_S   (6)
 Error interrupt shift.
 
#define VL6180X_INT_RNG_LOW   (0x01)
 range < lower threshold
 
#define VL6180X_INT_RNG_HIGH   (0x02)
 range > upper threshold
 
#define VL6180X_INT_RNG_OUT   (0x03)
 range < lower threshold or range > upper threshold
 
#define VL6180X_INT_RNG_DRDY   (0x04)
 new range data are ready to be read
 
#define VL6180X_INT_ALS_LOW   (0x08)
 ALS < lower threshold.
 
#define VL6180X_INT_ALS_HIGH   (0x10)
 ALS > upper threshold.
 
#define VL6180X_INT_ALS_OUT   (0x18)
 ALS < lower threshold or ALS > upper threshold.
 
#define VL6180X_INT_ALS_DRDY   (0x20)
 new ALS data are ready to be read
 
#define VL6180X_INT_ERR_LASER   (0x40)
 Laser safety error.
 
#define VL6180X_INT_ERR_PLL   (0x80)
 PLL error.
 
#define VL6180X_CLR_ERR_INT   (0x04)
 Clear error interrupt.
 
#define VL6180X_CLR_ALS_INT   (0x02)
 Clear ALS interrupt.
 
#define VL6180X_CLR_RNG_INT   (0x01)
 Clear range interrupt.
 
#define VL6180X_CLR_ALL_INT   (0x07)
 Clear all interrupts.
 
#define VL6180X_GPIO0_SHUT   (0x40)
 GPIO0 shutdown function mask.
 
#define VL6180X_GPIO0_SHUT_ON   (0x40)
 GPIO0 shutdown function enabled.
 
#define VL6180X_GPIO0_SHUT_OFF   (0x00)
 GPIO0 shutdown function disabled.
 
#define VL6180X_GPIO0_POL   (0x20)
 GPIO0 polarity mask.
 
#define VL6180X_GPIO0_POL_LOW   (0x00)
 GPIO0 polarity is low.
 
#define VL6180X_GPIO0_POL_HIGH   (0x20)
 GPIO0 polarity is high.
 
#define VL6180X_GPIO0_FUNC   (0x1e)
 GPIO0 function mask.
 
#define VL6180X_GPIO0_FUNC_OFF   (0x00)
 GPIO0 function off.
 
#define VL6180X_GPIO0_FUNC_ON   (0x10)
 GPIO0 function on.
 
#define VL6180X_GPIO1_POL   (0x20)
 GPIO1 polarity mask.
 
#define VL6180X_GPIO1_POL_LOW   (0x00)
 GPIO1 polarity is low.
 
#define VL6180X_GPIO1_POL_HIGH   (0x20)
 GPIO1 polarity is high.
 
#define VL6180X_GPIO1_FUNC   (0x1e)
 GPIO1 function mask.
 
#define VL6180X_GPIO1_FUNC_OFF   (0x00)
 GPIO1 function off.
 
#define VL6180X_GPIO1_FUNC_ON   (0x10)
 GPIO1 function on.
 

Default register values

These values are the register values after reset or overwritten at boot-up by NVM contents.

#define VL6180X_MODEL_ID   (0xb4)
 VNCL6180 Device ID.
 

Macro Definition Documentation

◆ VL6180X_ALS_DEVICE_RDY

#define VL6180X_ALS_DEVICE_RDY   (0x01)

ALS device ready.

Definition at line 86 of file vl6180x_regs.h.

◆ VL6180X_ALS_ERR_CODE

#define VL6180X_ALS_ERR_CODE   (0xf0)

ALS measurement error code mask.

Definition at line 84 of file vl6180x_regs.h.

◆ VL6180X_ALS_ERR_CODE_S

#define VL6180X_ALS_ERR_CODE_S   (4)

ALS measurement error code shift.

Definition at line 85 of file vl6180x_regs.h.

◆ VL6180X_ALS_GAIN_LIGHT

#define VL6180X_ALS_GAIN_LIGHT   (0x07)

ALS analogue gain mask (light channel)

Definition at line 89 of file vl6180x_regs.h.

◆ VL6180X_ALS_MODE_CONT

#define VL6180X_ALS_MODE_CONT   (0x02)

ALS measurement mode.

Definition at line 75 of file vl6180x_regs.h.

◆ VL6180X_ALS_START_STOP

#define VL6180X_ALS_START_STOP   (0x01)

Start/stop ALS measurement.

Definition at line 76 of file vl6180x_regs.h.

◆ VL6180X_CLR_ALL_INT

#define VL6180X_CLR_ALL_INT   (0x07)

Clear all interrupts.

Definition at line 114 of file vl6180x_regs.h.

◆ VL6180X_CLR_ALS_INT

#define VL6180X_CLR_ALS_INT   (0x02)

Clear ALS interrupt.

Definition at line 112 of file vl6180x_regs.h.

◆ VL6180X_CLR_ERR_INT

#define VL6180X_CLR_ERR_INT   (0x04)

Clear error interrupt.

Definition at line 111 of file vl6180x_regs.h.

◆ VL6180X_CLR_RNG_INT

#define VL6180X_CLR_RNG_INT   (0x01)

Clear range interrupt.

Definition at line 113 of file vl6180x_regs.h.

◆ VL6180X_ERR_INT

#define VL6180X_ERR_INT   (0xc0)

Error interrupt mask (VL6180X_REG_INT_STATUS only)

Definition at line 96 of file vl6180x_regs.h.

◆ VL6180X_ERR_INT_S

#define VL6180X_ERR_INT_S   (6)

Error interrupt shift.

Definition at line 97 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_FUNC

#define VL6180X_GPIO0_FUNC   (0x1e)

GPIO0 function mask.

Definition at line 123 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_FUNC_OFF

#define VL6180X_GPIO0_FUNC_OFF   (0x00)

GPIO0 function off.

Definition at line 124 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_FUNC_ON

#define VL6180X_GPIO0_FUNC_ON   (0x10)

GPIO0 function on.

Definition at line 125 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_POL

#define VL6180X_GPIO0_POL   (0x20)

GPIO0 polarity mask.

Definition at line 120 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_POL_HIGH

#define VL6180X_GPIO0_POL_HIGH   (0x20)

GPIO0 polarity is high.

Definition at line 122 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_POL_LOW

#define VL6180X_GPIO0_POL_LOW   (0x00)

GPIO0 polarity is low.

Definition at line 121 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_SHUT

#define VL6180X_GPIO0_SHUT   (0x40)

GPIO0 shutdown function mask.

Definition at line 117 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_SHUT_OFF

#define VL6180X_GPIO0_SHUT_OFF   (0x00)

GPIO0 shutdown function disabled.

Definition at line 119 of file vl6180x_regs.h.

◆ VL6180X_GPIO0_SHUT_ON

#define VL6180X_GPIO0_SHUT_ON   (0x40)

GPIO0 shutdown function enabled.

Definition at line 118 of file vl6180x_regs.h.

◆ VL6180X_GPIO1_FUNC

#define VL6180X_GPIO1_FUNC   (0x1e)

GPIO1 function mask.

Definition at line 131 of file vl6180x_regs.h.

◆ VL6180X_GPIO1_FUNC_OFF

#define VL6180X_GPIO1_FUNC_OFF   (0x00)

GPIO1 function off.

Definition at line 132 of file vl6180x_regs.h.

◆ VL6180X_GPIO1_FUNC_ON

#define VL6180X_GPIO1_FUNC_ON   (0x10)

GPIO1 function on.

Definition at line 133 of file vl6180x_regs.h.

◆ VL6180X_GPIO1_POL

#define VL6180X_GPIO1_POL   (0x20)

GPIO1 polarity mask.

Definition at line 128 of file vl6180x_regs.h.

◆ VL6180X_GPIO1_POL_HIGH

#define VL6180X_GPIO1_POL_HIGH   (0x20)

GPIO1 polarity is high.

Definition at line 130 of file vl6180x_regs.h.

◆ VL6180X_GPIO1_POL_LOW

#define VL6180X_GPIO1_POL_LOW   (0x00)

GPIO1 polarity is low.

Definition at line 129 of file vl6180x_regs.h.

◆ VL6180X_INT_ALS

#define VL6180X_INT_ALS   (0x38)

ALS interrupt mask.

Definition at line 94 of file vl6180x_regs.h.

◆ VL6180X_INT_ALS_DRDY

#define VL6180X_INT_ALS_DRDY   (0x20)

new ALS data are ready to be read

Definition at line 106 of file vl6180x_regs.h.

◆ VL6180X_INT_ALS_HIGH

#define VL6180X_INT_ALS_HIGH   (0x10)

ALS > upper threshold.

Definition at line 104 of file vl6180x_regs.h.

◆ VL6180X_INT_ALS_LOW

#define VL6180X_INT_ALS_LOW   (0x08)

ALS < lower threshold.

Definition at line 103 of file vl6180x_regs.h.

◆ VL6180X_INT_ALS_OUT

#define VL6180X_INT_ALS_OUT   (0x18)

ALS < lower threshold or ALS > upper threshold.

Definition at line 105 of file vl6180x_regs.h.

◆ VL6180X_INT_ALS_S

#define VL6180X_INT_ALS_S   (3)

ALS interrupt shift.

Definition at line 95 of file vl6180x_regs.h.

◆ VL6180X_INT_ERR_LASER

#define VL6180X_INT_ERR_LASER   (0x40)

Laser safety error.

Definition at line 107 of file vl6180x_regs.h.

◆ VL6180X_INT_ERR_PLL

#define VL6180X_INT_ERR_PLL   (0x80)

PLL error.

Definition at line 108 of file vl6180x_regs.h.

◆ VL6180X_INT_RNG

#define VL6180X_INT_RNG   (0x07)

RNG interrupt mask.

Definition at line 92 of file vl6180x_regs.h.

◆ VL6180X_INT_RNG_DRDY

#define VL6180X_INT_RNG_DRDY   (0x04)

new range data are ready to be read

Definition at line 102 of file vl6180x_regs.h.

◆ VL6180X_INT_RNG_HIGH

#define VL6180X_INT_RNG_HIGH   (0x02)

range > upper threshold

Definition at line 100 of file vl6180x_regs.h.

◆ VL6180X_INT_RNG_LOW

#define VL6180X_INT_RNG_LOW   (0x01)

range < lower threshold

Definition at line 99 of file vl6180x_regs.h.

◆ VL6180X_INT_RNG_OUT

#define VL6180X_INT_RNG_OUT   (0x03)

range < lower threshold or range > upper threshold

Definition at line 101 of file vl6180x_regs.h.

◆ VL6180X_INT_RNG_S

#define VL6180X_INT_RNG_S   (0)

RNG interrupt shift.

Definition at line 93 of file vl6180x_regs.h.

◆ VL6180X_MODEL_ID

#define VL6180X_MODEL_ID   (0xb4)

VNCL6180 Device ID.

Definition at line 144 of file vl6180x_regs.h.

◆ VL6180X_REG_ALS_GAIN

#define VL6180X_REG_ALS_GAIN   (0x3f)

ALS analogue gain.

Definition at line 53 of file vl6180x_regs.h.

◆ VL6180X_REG_ALS_INT_TIME

#define VL6180X_REG_ALS_INT_TIME   (0x40)

ALS integration time.

Definition at line 54 of file vl6180x_regs.h.

◆ VL6180X_REG_ALS_PERIOD

#define VL6180X_REG_ALS_PERIOD   (0x3e)

ALS measurement period in continuous mode.

Definition at line 52 of file vl6180x_regs.h.

◆ VL6180X_REG_ALS_START

#define VL6180X_REG_ALS_START   (0x38)

ALS measurement start.

Definition at line 49 of file vl6180x_regs.h.

◆ VL6180X_REG_ALS_STATUS

#define VL6180X_REG_ALS_STATUS   (0x4e)

ALS measurement status.

Definition at line 58 of file vl6180x_regs.h.

◆ VL6180X_REG_ALS_THRESH_HI

#define VL6180X_REG_ALS_THRESH_HI   (0x3a)

ALS measurement high threshold.

Definition at line 50 of file vl6180x_regs.h.

◆ VL6180X_REG_ALS_THRESH_LO

#define VL6180X_REG_ALS_THRESH_LO   (0x3c)

ALS measurement low threshold.

Definition at line 51 of file vl6180x_regs.h.

◆ VL6180X_REG_ALS_VALUE

#define VL6180X_REG_ALS_VALUE   (0x50)

ALS 16-bit count value.

Definition at line 55 of file vl6180x_regs.h.

◆ VL6180X_REG_FRESH_RST

#define VL6180X_REG_FRESH_RST   (0x16)

Fresh out of reset bit.

Definition at line 40 of file vl6180x_regs.h.

◆ VL6180X_REG_GPIO0_MODE

#define VL6180X_REG_GPIO0_MODE   (0x10)

GPIO0 mode definition.

Definition at line 35 of file vl6180x_regs.h.

◆ VL6180X_REG_GPIO1_MODE

#define VL6180X_REG_GPIO1_MODE   (0x11)

GPIO1 mode definition.

Definition at line 36 of file vl6180x_regs.h.

◆ VL6180X_REG_HISTORY_CTRL

#define VL6180X_REG_HISTORY_CTRL   (0x12)

ALS and Ranging history control.

Definition at line 37 of file vl6180x_regs.h.

◆ VL6180X_REG_I2C_ADDR

#define VL6180X_REG_I2C_ADDR   (0x212)

Programmable device address.

Definition at line 61 of file vl6180x_regs.h.

◆ VL6180X_REG_INT_CLR

#define VL6180X_REG_INT_CLR   (0x15)

Interrupt clear.

Definition at line 39 of file vl6180x_regs.h.

◆ VL6180X_REG_INT_CONFIG

#define VL6180X_REG_INT_CONFIG   (0x14)

Interrupt mode config.

Definition at line 38 of file vl6180x_regs.h.

◆ VL6180X_REG_INT_STATUS

#define VL6180X_REG_INT_STATUS   (0x4f)

Interrupt status.

Definition at line 59 of file vl6180x_regs.h.

◆ VL6180X_REG_INTERLEAVED_MODE

#define VL6180X_REG_INTERLEAVED_MODE   (0x2a3)

Interleaved mode enable.

Definition at line 62 of file vl6180x_regs.h.

◆ VL6180X_REG_MODEL_ID

#define VL6180X_REG_MODEL_ID   (0x00)

Device ID.

Definition at line 29 of file vl6180x_regs.h.

◆ VL6180X_REG_MODEL_REV_MAJOR

#define VL6180X_REG_MODEL_REV_MAJOR   (0x01)

Device revision (major)

Definition at line 30 of file vl6180x_regs.h.

◆ VL6180X_REG_MODEL_REV_MINOR

#define VL6180X_REG_MODEL_REV_MINOR   (0x02)

Device revision (minor)

Definition at line 31 of file vl6180x_regs.h.

◆ VL6180X_REG_MODULE_REV_MAJOR

#define VL6180X_REG_MODULE_REV_MAJOR   (0x03)

Module revision (major)

Definition at line 32 of file vl6180x_regs.h.

◆ VL6180X_REG_MODULE_REV_MINOR

#define VL6180X_REG_MODULE_REV_MINOR   (0x04)

Module revision (minor)

Definition at line 33 of file vl6180x_regs.h.

◆ VL6180X_REG_RNG_MAX_TIME

#define VL6180X_REG_RNG_MAX_TIME   (0x1c)

Range measurement time limit.

Definition at line 46 of file vl6180x_regs.h.

◆ VL6180X_REG_RNG_PERIOD

#define VL6180X_REG_RNG_PERIOD   (0x1b)

Range measurement period in continuous mode.

Definition at line 45 of file vl6180x_regs.h.

◆ VL6180X_REG_RNG_START

#define VL6180X_REG_RNG_START   (0x18)

Range measurement start.

Definition at line 42 of file vl6180x_regs.h.

◆ VL6180X_REG_RNG_STATUS

#define VL6180X_REG_RNG_STATUS   (0x4d)

Range measurement status.

Definition at line 57 of file vl6180x_regs.h.

◆ VL6180X_REG_RNG_THRESH_HI

#define VL6180X_REG_RNG_THRESH_HI   (0x19)

Range measurement high threshold.

Definition at line 43 of file vl6180x_regs.h.

◆ VL6180X_REG_RNG_THRESH_LO

#define VL6180X_REG_RNG_THRESH_LO   (0x1a)

Range measurement low threshold.

Definition at line 44 of file vl6180x_regs.h.

◆ VL6180X_REG_RNG_VALUE

#define VL6180X_REG_RNG_VALUE   (0x62)

Range 8-bit value in mm.

Definition at line 47 of file vl6180x_regs.h.

◆ VL6180X_RNG_DEVICE_RDY

#define VL6180X_RNG_DEVICE_RDY   (0x01)

Range device ready.

Definition at line 81 of file vl6180x_regs.h.

◆ VL6180X_RNG_ERR_CODE

#define VL6180X_RNG_ERR_CODE   (0xf0)

Range measurement error code mask.

Definition at line 79 of file vl6180x_regs.h.

◆ VL6180X_RNG_ERR_CODE_S

#define VL6180X_RNG_ERR_CODE_S   (4)

Range measurement error code shift.

Definition at line 80 of file vl6180x_regs.h.

◆ VL6180X_RNG_MODE_CONT

#define VL6180X_RNG_MODE_CONT   (0x02)

Continuous range measurement mode.

Definition at line 71 of file vl6180x_regs.h.

◆ VL6180X_RNG_START_STOP

#define VL6180X_RNG_START_STOP   (0x01)

Start/stop range measurement.

Definition at line 72 of file vl6180x_regs.h.