VL53L0X API Library - division by Zero fault in VL53L0X_calc_timeout_mclks
Hello ST Team!
In one of my new projects i use the VL53L0X TOF Sensor to measure simple distances.
The mcu i use is the STM32F103.
To get values from the sensor i use the ST API Library. It's kind of s special version since i use the modified one which is working with the Cube MX Hal.
This is the repository i cloned and pointing to the master branch:
As this project is for the L4 i just replaced the hal include from
in the vl53l0x_platform.h file.
1. The INIT VL53L0X_PROXIMITY_Init() finishes without errors
2. The problem occurs when i do VL53L0X_PROXIMITY_GetDistance()
Within the function VL53L0X_calc_timeout_mclks() the division by zero fault occurs and i don't know exactly why since the range measurement is already done correctly.
Following depicts the callstack before the divsion happens.

Additionally the "DeviceSpecificParameters"

If I work around this the next division by zero is following immediatly.

Can you give me some hints why the zero division is happening?
Do i have to set some parameters as mentioned here? : VL53L0X Divide by Zero error in API - STMicroelectronics Community
Problem is that i do not have the VL53L0_i2c_platfform.c platform files.
Thank you in advance!
Regards, Lukas
