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.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.

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.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.

That makes sense. Thanks, John.