Skip to main content
Associate II
May 14, 2025
Solved

The interrupt of VL53L4CD cannot be used

  • May 14, 2025
  • 3 replies
  • 1088 views

I found a problem while using the VL53L4CD. My usual practice is to initialize the VL53L4CD after the terminal is turned on. During subsequent use, I only use Start and Stop to control whether to start ranging.

Now it is found that when I stop, the terminal enters a low-power state. When this state persists for a period of time, when operating VL53L4CD again and sending the start instruction, no interrupt signal can be received. Moreover, after I send VL53L4CD_ClearInterrupt, the interrupt signal remains at a low level all the time.

When I start, I first call VL53L4CD_ClearInterrupt, and then call VL53L4CD_StartRanging. At this time, there is no occlusion before VL53L4CD, and the register value printed out is after the VL53L4CD_StartRanging interface is called.

Tof reg [0], value [1]
Tof reg [1], value [29]
Tof reg [2], value [2]
Tof reg [3], value [10]
Tof reg [4], value [0]
Tof reg [5], value [2f]
Tof reg [6], value [bc]
Tof reg [7], value [cc]
Tof reg [8], value [9]
Tof reg [9], value [80]
Tof reg [a], value [7]
Tof reg [b], value [0]
Tof reg [c], value [0]
Tof reg [d], value [3f]
Tof reg [e], value [ff]
Tof reg [f], value [ef]
Tof reg [10], value [ff]
Tof reg [11], value [7f]
Tof reg [12], value [f]
Tof reg [13], value [0]
Tof reg [14], value [b]
Tof reg [15], value [2]
Tof reg [16], value [0]
Tof reg [17], value [0]
Tof reg [18], value [0]
Tof reg [19], value [0]
Tof reg [1a], value [0]
Tof reg [1b], value [0]
Tof reg [1c], value [0]
Tof reg [1d], value [0]
Tof reg [1e], value [0]
Tof reg [1f], value [0]
Tof reg [20], value [0]
Tof reg [21], value [0]
Tof reg [22], value [0]
Tof reg [23], value [0]
Tof reg [24], value [5]
Tof reg [25], value [0]
Tof reg [26], value [0]
Tof reg [27], value [0]
Tof reg [28], value [0]
Tof reg [29], value [0]
Tof reg [2a], value [0]
Tof reg [2b], value [0]
Tof reg [2c], value [0]
Tof reg [2d], value [0]
Tof reg [2e], value [0]
Tof reg [2f], value [0]
Tof reg [30], value [11]
Tof reg [31], value [2]
Tof reg [32], value [0]
Tof reg [33], value [2]
Tof reg [34], value [8]
Tof reg [35], value [0]
Tof reg [36], value [8]
Tof reg [37], value [10]
Tof reg [38], value [1]
Tof reg [39], value [1]
Tof reg [3a], value [0]
Tof reg [3b], value [0]
Tof reg [3c], value [0]
Tof reg [3d], value [0]
Tof reg [3e], value [ff]
Tof reg [3f], value [0]
Tof reg [40], value [f]
Tof reg [41], value [0]
Tof reg [42], value [0]
Tof reg [43], value [0]
Tof reg [44], value [0]
Tof reg [45], value [0]
Tof reg [46], value [0]
Tof reg [47], value [b]
Tof reg [48], value [0]
Tof reg [49], value [0]
Tof reg [4a], value [2]
Tof reg [4b], value [14]
Tof reg [4c], value [21]
Tof reg [4d], value [0]
Tof reg [4e], value [0]
Tof reg [4f], value [5]
Tof reg [50], value [0]
Tof reg [51], value [0]
Tof reg [52], value [0]
Tof reg [53], value [0]
Tof reg [54], value [c8]
Tof reg [55], value [0]
Tof reg [56], value [0]
Tof reg [57], value [38]
Tof reg [58], value [ff]
Tof reg [59], value [1]
Tof reg [5a], value [0]
Tof reg [5b], value [8]
Tof reg [5c], value [0]
Tof reg [5d], value [0]
Tof reg [5e], value [1]
Tof reg [5f], value [e9]
Tof reg [60], value [7]
Tof reg [61], value [2]
Tof reg [62], value [9b]
Tof reg [63], value [5]
Tof reg [64], value [0]
Tof reg [65], value [a0]
Tof reg [66], value [1]
Tof reg [67], value [0]
Tof reg [68], value [8]
Tof reg [69], value [38]
Tof reg [6a], value [0]
Tof reg [6b], value [0]
Tof reg [6c], value [0]
Tof reg [6d], value [0]
Tof reg [6e], value [1f]
Tof reg [6f], value [51]
Tof reg [70], value [0]
Tof reg [71], value [0]
Tof reg [72], value [0]
Tof reg [73], value [32]
Tof reg [74], value [0]
Tof reg [75], value [32]
Tof reg [76], value [0]
Tof reg [77], value [1]
Tof reg [78], value [7]
Tof reg [79], value [5]
Tof reg [7a], value [6]
Tof reg [7b], value [6]
Tof reg [7c], value [0]
Tof reg [7d], value [0]
Tof reg [7e], value [2]
Tof reg [7f], value [c7]
Tof reg [80], value [ff]
Tof reg [81], value [9b]
Tof reg [82], value [0]
Tof reg [83], value [0]
Tof reg [84], value [0]
Tof reg [85], value [1]
Tof reg [86], value [0]
Tof reg [87], value [40]
Tof reg [88], value [0]
Tof reg [89], value [4]
Tof reg [8a], value [9]
Tof reg [8b], value [0]
Tof reg [8c], value [ce]
Tof reg [8d], value [58]
Tof reg [8e], value [0]
Tof reg [8f], value [87]
Tof reg [90], value [0]
Tof reg [91], value [f]
Tof reg [92], value [0]
Tof reg [93], value [18]
Tof reg [94], value [10]
Tof reg [95], value [ea]
Tof reg [96], value [0]
Tof reg [97], value [0]
Tof reg [98], value [0]
Tof reg [99], value [87]
Tof reg [9a], value [ff]
Tof reg [9b], value [ff]
Tof reg [9c], value [ff]
Tof reg [9d], value [ff]
Tof reg [9e], value [0]
Tof reg [9f], value [18]
Tof reg [a0], value [ff]
Tof reg [a1], value [ff]
Tof reg [a2], value [d]
Tof reg [a3], value [de]
Tof reg [a4], value [0]
Tof reg [a5], value [0]
Tof reg [a6], value [ff]
Tof reg [a7], value [ff]
Tof reg [a8], value [11]
Tof reg [a9], value [c3]
Tof reg [aa], value [ff]
Tof reg [ab], value [ff]
Tof reg [ac], value [ff]
Tof reg [ad], value [ff]
Tof reg [ae], value [ff]
Tof reg [af], value [ff]
Tof reg [b0], value [ff]
Tof reg [b1], value [ff]
Tof reg [b2], value [ff]
Tof reg [b3], value [44]
Tof reg [b4], value [0]
Tof reg [b5], value [0]
Tof reg [b6], value [1]
Tof reg [b7], value [d]
Tof reg [b8], value [0]
Tof reg [b9], value [0]
Tof reg [ba], value [15]
Tof reg [bb], value [7c]
Tof reg [bc], value [0]
Tof reg [bd], value [0]
Tof reg [be], value [d]
Tof reg [bf], value [14]
Tof reg [c0], value [0]
Tof reg [c1], value [0]
Tof reg [c2], value [1]
Tof reg [c3], value [d2]
Tof reg [c4], value [0]
Tof reg [c5], value [0]
Tof reg [c6], value [0]
Tof reg [c7], value [b]
Tof reg [c8], value [0]
Tof reg [c9], value [1]
Tof reg [ca], value [57]
Tof reg [cb], value [2d]
Tof reg [cc], value [0]
Tof reg [cd], value [1]
Tof reg [ce], value [56]
Tof reg [cf], value [d5]
Tof reg [d0], value [0]
Tof reg [d1], value [0]
Tof reg [d2], value [1]
Tof reg [d3], value [d2]
Tof reg [d4], value [ff]
Tof reg [d5], value [0]
Tof reg [d6], value [49]
Tof reg [d7], value [d1]
Tof reg [d8], value [4]
Tof reg [d9], value [b]
Tof reg [da], value [0]
Tof reg [db], value [0]
Tof reg [dc], value [18]
Tof reg [dd], value [1f]
Tof reg [de], value [0]
Tof reg [df], value [26]
Tof reg [e0], value [1]
Tof reg [e1], value [0]
Tof reg [e2], value [1]
Tof reg [e3], value [2]
Tof reg [e4], value [0]
Tof reg [e5], value [3]
Tof reg [e6], value [0]
Tof reg [e7], value [2a]
Tof reg [e8], value [1]
Tof reg [e9], value [df]
Tof reg [ea], value [0]
Tof reg [eb], value [0]
Tof reg [ec], value [0]
Tof reg [ed], value [32]
Tof reg [ee], value [0]
Tof reg [ef], value [32]
Tof reg [f0], value [0]
Tof reg [f1], value [0]
Tof reg [f2], value [7]
Tof reg [f3], value [5]
Tof reg [f4], value [6]
Tof reg [f5], value [6]
Tof reg [f6], value [0]
Tof reg [f7], value [2]
Tof reg [f8], value [c7]
Tof reg [f9], value [ff]
Tof reg [fa], value [9b]
Tof reg [fb], value [0]
Tof reg [fc], value [0]
Tof reg [fd], value [1f]
Tof reg [fe], value [1f]

This is the corresponding register status. Could you help me check what the problem is.

Besides, I noticed that your new driver has fixed a similar problem. Could you help me see how to confirm whether it is the fixed problem.This is the update log of your driver:

Version : 2.2.1.0
Date : 08/01/2024
-Comments : Update VL53L4CD_StopRanging() to fix issue of interrupt after stop ranging.

Best answer by John E KVAM

I really do think it would fix it.

When you issued the 'stop' statement in the prior version, you were saying, stop after the current range is done. 

And if your integration time was 30ms, you might get an interrupt 30ms after you said stop. And at that time, the interrupt goes active (low presumably) and you would have to clear it again. 

By issuing the abort and stop, you are not going to get that interrupt at some seemingly random time. 

You issue the clear interrupt soon after getting one, then issue 'abort and stop' and you should be fine.

- john

3 replies

Blue666Author
Associate II
May 19, 2025

Is there anyone who can help solve this problem?

John E KVAM
ST Employee
May 19, 2025

Sorry it took so long. 

With the latest release of the driver, a change was made to how we stop the sensor. 

Instead of just stopping, we set a bit to enable "abort and stop".

My guess as to what was happening was that you issued the stop command and somewhere in the next bunch of milliseconds, the sensor completed and lifted the interrupt pin. 

The latest driver has been changed

But it's a minor changes. The StopRanging() function is:

status |= VL53L4CD_ULP_WrByte(dev, VL53L4CD_ULP_SYSTEM_START, 0x00);

But a better way would be:

status |= VL53L4CD_ULP_WrByte(dev, VL53L4CD_ULP_SYSTEM_START, 0x80);

That '8' in the 80 says "abort current range'.

See if that works for you.

- john

Blue666Author
Associate II
May 20, 2025

Thank you for your reply.

I have seen the changes regarding the stop interface in the new version. My confusion is, what problem does this change fix? Is it also a problem that the IRQ pin keeps being pulled low and cannot be pulled high?

Because I repeatedly tested start and stop interfaces, but didn't find this problem. Only when I stopped and didn't use it for a long time, and then tried start again, did I find that the IRQ pin couldn't be high level.

Is there any way to help me confirm whether the problem I'm currently encountering is the one fixed in the new version? For example, register values.

As of now, it seems that this problem of mine is not certain to occur. I haven't found the pattern yet.

John E KVAM
John E KVAMBest answer
ST Employee
May 20, 2025

I really do think it would fix it.

When you issued the 'stop' statement in the prior version, you were saying, stop after the current range is done. 

And if your integration time was 30ms, you might get an interrupt 30ms after you said stop. And at that time, the interrupt goes active (low presumably) and you would have to clear it again. 

By issuing the abort and stop, you are not going to get that interrupt at some seemingly random time. 

You issue the clear interrupt soon after getting one, then issue 'abort and stop' and you should be fine.

- john

Blue666Author
Associate II
May 21, 2025

Ok. I will try the new driver.

Is the problem you mentioned that after calling VL53L4CD_ClearInterrupt, the irq pin cannot be high level? The problem I'm currently encountering is exactly like this. And I've found that this phenomenon is bound to the chip. Some VL53L4CD chips will have this issue, but others won't. So I'm very confused about why this phenomenon occurs.

 

John E KVAM
ST Employee
June 12, 2025


Blue666 - 

It's better to ask a new question than keep a running conversation. 

-----

if the photons go out and none - or very few - come back the sensor cannot get a range. 

This can happen if you are at the limit of the range or if the target is especially non-reflective or if it's only partially in the field of view. 

Lack of photons can happen. It means "there is nothing close'.

Nothing wrong with the chip. It's just warning you that the answer you have is suspect. 

You can get a 4 error with fast motion. Or a target that is beyond the distance the sensor can legitimately see.

- john