Skip to main content
PGibs.1
Associate
March 15, 2026
Solved

Clarification about OPERATION constants in VL53L8CX ULD

  • March 15, 2026
  • 3 replies
  • 172 views

Hi, just wondering if these constants (specifically NONE and OR both being 0) in the ULD for VL53L8CX are correct

#define VL53L8CX_OPERATION_NONE				((uint8_t)0U)
#define VL53L8CX_OPERATION_OR				((uint8_t)0U)
#define VL53L8CX_OPERATION_AND				((uint8_t)2U)

 it look like it should be a sequence (0, 1, 2) so the repeated (0, 0, 2) appears out of place. It's hard to tell from the examples if this is intentional though.

Best answer by Zhiyuan.Han

Yes, the values are correct, there is no #define for 1.

3 replies

PGibs.1
PGibs.1Author
Associate
March 16, 2026

It looks like the VL53L5CX has the same values

Zhiyuan.Han
Technical Moderator
March 16, 2026

Hi 

 

VL53L8CX interrupt thresholds could be set as below conditions.

• Resolution 4x4: using 1 threshold per zone (total of 16 thresholds)
• Resolution 4x4: using 2 thresholds per zone (total of 32 thresholds)
• Resolution 8x8: using 1 threshold per zone (total of 64 thresholds)

The interrupt function also support mathematic operation, but it works only for 4x4 – 2 threshold combinations per zone. The user can set a combination using several thresholds in one zone.  you should set mathematic_operation as either OR or AND. 

  • thresholds[2*i].mathematic_operation = VL53LCX_OPERATION_OR;
  • thresholds[2*i+1].mathematic_operation = VL53LCX_OPERATION_AND;

But for the 1st and 3rd trig method, it doesn't support mathematic operation, but the structure parameter mathematic_operation you need to initialize, here you should set NONE  

  • thresholds[i].mathematic_operation = VL53LCX_OPERATION_NONE;

 

Br

Zhiyuan.Han

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.
PGibs.1
PGibs.1Author
Associate
March 16, 2026

Are the values correct? Both VL53L8CX_OPERATION_NONE and VL53L8CX_OPERATION_OR are supposed to be zero, and VL53L8CX_OPERATION_AND is 2? And there is no corresponding #define for 1

Zhiyuan.Han
Zhiyuan.HanBest answer
Technical Moderator
March 17, 2026

Yes, the values are correct, there is no #define for 1.

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.