cancel
Showing results for 
Search instead for 
Did you mean: 

What's the address of the SYSALS__INTEGRATION_PERIOD register?

BCoch
Senior

Rev 7 of the VL6180X datasheet shows the SYSALS__INTEGRATION_PERIOD register at 0x040, however Version 2 of AN4545 changed the address of what presumably is the same register from 0x040 to 0x041. Which is it?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

The SYSALS__INTEGRATION_PERIOD register is at 0x040 and it is a 16-bit address. (so 0x40 and 0x41).

The ST API uses:

status = VL6180x_WrWord(dev, SYSALS_INTEGRATION_PERIOD, SetIntegrationPeriod);

Where

#define SYSALS_INTEGRATION_PERIOD             0x040

In the app note they are only writing the value 0x63 - so they cheated and wrote 1 byte into the LSByte of the word.

Although this is a bit confusing and syntactly tacky, it is correct - sort of. Not a very good example.

Sorry about that.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

View solution in original post

2 REPLIES 2
John E KVAM
ST Employee

The SYSALS__INTEGRATION_PERIOD register is at 0x040 and it is a 16-bit address. (so 0x40 and 0x41).

The ST API uses:

status = VL6180x_WrWord(dev, SYSALS_INTEGRATION_PERIOD, SetIntegrationPeriod);

Where

#define SYSALS_INTEGRATION_PERIOD             0x040

In the app note they are only writing the value 0x63 - so they cheated and wrote 1 byte into the LSByte of the word.

Although this is a bit confusing and syntactly tacky, it is correct - sort of. Not a very good example.

Sorry about that.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

That makes sense. Thanks, John.