2026-04-09 9:06 AM
Hi everyone,
I am a beginner working with the VL53L1X sensor on an STM32F103C8T6 using the STSW-IMG009 (Ultra Lite Driver). I am trying to implement a calibration routine, but I am encountering two specific compilation errors inside my VL53L1X_calibration.c file:
The errors:
1. 'VL53L1X_ERROR_TIMEOUT' undeclared (first use in this function); did you mean 'HAL_DMA_ERROR_TIMEOUT'?
2. implicit declaration of function 'VL53L1_WaitMs' [-Wimplicit-function-declaration]
I have checked the driver files but cannot find their declarations.
I have not changed any of the driver files. Am I missing something? Any help is appreciated. Thank you!
Solved! Go to Solution.
2026-04-10 12:01 AM
Hi:
I just downloaded a new one STSW-IMG009 and compile again, actually there are no errors or warnings reported.
and I also check VL53L1X_ERROR_TIMEOUT is declared in VL53L1X_api.h. we add this timeout just for make sure sensor can't stuck here by some unstable environment (for instance, if a cable or a sensor breaks for some reason).
In addition, VL53L1_WaitMs , there is no problem with the function declaration and definition.
you can download a new one from www.st.com and try again, make sure the version is 3.5.5.
2026-04-10 12:01 AM
Hi:
I just downloaded a new one STSW-IMG009 and compile again, actually there are no errors or warnings reported.
and I also check VL53L1X_ERROR_TIMEOUT is declared in VL53L1X_api.h. we add this timeout just for make sure sensor can't stuck here by some unstable environment (for instance, if a cable or a sensor breaks for some reason).
In addition, VL53L1_WaitMs , there is no problem with the function declaration and definition.
you can download a new one from www.st.com and try again, make sure the version is 3.5.5.