cancel
Showing results for 
Search instead for 
Did you mean: 

VL6180X API Software hints or problems?

LloydSlonim
Associate II

Hi,

I'm the firmware guy on a project using the VL6180X to detect a person walking up to a machine, and reaching towards it. I have boards here with our processor (MSP430 family) running other parts of the system and it's time to get the VL6180X running.

I downloaded the API "STSW-IMG003_VL6180X_API_3.2.2_Mass_Market". Just wondering if there are any hints or known problems anyone has run into, and if this is the version of the code I should be using.

This will be a huge production run, 100,000 pieces predicted in the first 12 months so anything that will make the driver code more robust would be appreciated.

Thanks,

Lloyd

4 REPLIES 4
John E KVAM
ST Employee

That API is pretty robust. And it's the one you want. But we did make a change in Oct 2021, to correct a minor issue. If you re-download it from the website, you will get the modified version.

(The issue was an extremely rare case of returning a random number if the host polled the sensor at exactly the wrong time. The solution was to increase the priority of the task doing the work so the I2C access did not disrupt it at a critical time.

  • john


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.
LloydSlonim
Associate II

John,

I appreciate your answering my question, but I'd like to point out that I asked it 10 months ago. Do you have anything to say about the delay?

In the interim, I ported your code to a member of the MSP430, found and fixed several problems with the sizes of variables, and found and fixed a problem where the API ignored a setting of Ambient Light Gain that was passed in if I recall correctly (it was a long time ago). I also ran into a problem where your chip uses 16 bit register addresses where most others use 8 bit register addresses. This meant that the readily available I2C drivers for the MPS430 required an overhaul to work.

Thanks,

Lloyd

John E KVAM
ST Employee

All posts before Feb of 2021 got lost. I was aware of the issue some months later, and unfortunately did not go back and clear the lost issues. I hoped you would either have fixed your issue, or would have posted again.

But having issues with no replies bothers me. You should have had a response, even if it means you chide me for my lateness.

Glad you fixed fixed the issue.

Still might take a look at the latest 1..4.0. There is one change in there that fixes a very rare bad result if you poll the sensor often looking for the 'done' condition.

Some folks post their modifications to the drivers to GitHub. ST cannot support all the MCUs out there, but if you would like to share your efforts, it's a good place.

  • john

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.
LloydSlonim
Associate II

Thanks for explaining the delay. I'll post my porting of the driver once the product is done. Right now we're having many issues getting parts, as are many other people.

Thanks,

Lloyd