2018-05-20 09:53 PM
Hi
I am trying to get the VL53L0X using the api provided and the source code available on
https://os.mbed.com/users/andcor02/code/vl53l0x_api/
which is just a copy of the VL53L0X api. I am using the STM32L432KC NUCLEO board with I2C connnection to a breakout board available on ebay ->The module works fine but the interrupt pin does not do anything. I am trying to use the 0x04 setting for NEW_DATA_READY setting as per the API, but don't see any trigger on the interrupt or on a digital logic analyzer.
Please help
Best
Chandra
2018-05-29 03:03 AM
My configuration for continuous interrupt
VL53L0X_DataInit();
VL53L0X_StaticInit();
VL53L0X_PerformRefCalibration()
VL53L0X_PerformRefSpadManagement()
VL53L0X_SetDeviceMode(VL53L0X_DEVICEMODE_CONTINUOUS_RANGING)
VL53L0X_SetLimitCheckEnable()
VL53L0X_SetLimitCheckEnable()
VL53L0X_SetLimitCheckValue()
VL53L0X_SetLimitCheckValue()
VL53L0X_SetMeasurementTimingBudgetMicroSeconds()
VL53L0X_SetVcselPulsePeriod()
VL53L0X_SetVcselPulsePeriod()
VL53L0X_SetGpioConfig( VL53L0X_DEVICEMODE_CONTINUOUS_RANGING, VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY, VL53L0X_INTERRUPTPOLARITY_LOW)
VL53L0X_ClearInterruptMask()
VL53L0X_PerformRefCalibration()
// set gpio
VL53L0X_StartMeasurement()
// check gpio input or falling interrupt
VL53L0X_GetRangingMeasurementData()
VL53L0X_ClearInterruptMask()
or VL53L0X_WrByte(VL53L0X_REG_SYSTEM_INTERRUPT_CLEAR, 0x01) // according to crazyflie 2.0 code
2018-05-30 01:55 AM
Hi
‌Thank you for trying to help me out. Let me know if you have tried this code snippet and if it actually works because I tried something very similar and did not get anything out of the interrupt.
Best
Chandra
2018-06-15 03:06 AM
It's part of my project I'm working on.
(It does not contain whole function, but you can catch your code of intention.)
I hope it's helpful for you!
Data ready pin level of a vl53l0x sensor.
(Configuration is long range - 33ms, 2M, data ready pin is active low)
________________ Attachments : VL53L0X_TEST.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxUo&d=%2Fa%2F0X0000000ayp%2FX_6E5eLfhNyMRe991N6ZSNZgW3BNjuwTtYD4sB53cvA&asPdf=false