2024-05-20 08:07 AM
Hi,
I am testing VL53L8A with NUCLEO-F401RE and 53L8A1_SimpleRanging software under STM32CubeIDE.
Changing RANGING_FREQUENCY from 5U to 15U does not increase the frame rate, always 5Hz.
What am I doing wrong? I have changed also the TIMING_BUDGET to 5U (ms).
#define TIMING_BUDGET (5U) /* 5 ms < TimingBudget < 100 ms */
#define RANGING_FREQUENCY (15U) /* Ranging frequency Hz (shall be consistent with TimingBudget value) */ // era 5
#define POLLING_PERIOD (1000U/RANGING_FREQUENCY) /* refresh rate for polling mode (milliseconds) */
Thanks,
David
2024-05-21 12:38 AM
Hello,
Your request was raised internally. We will come back to you soon.
Best regards
Anne
2024-06-14 04:48 AM
The application example is not really optimized and shows a HAL_Delay(POLLING_PERIOD) in acquisition loop which is not mandatory and shall be removed because the VL53L8A1_RANGING_SENSOR_GetDistance() is already polling for results as we configure RS_MODE_BLOCKING_CONTINUOUS in VL53L8A1_RANGING_SENSOR_Start()
However, UART speed and printf() functions may limit the actual ranging frequency too.
A better way should be to store several results in buffer before display with timestamping by HAL_GetTick() for instance to figure out the actual ranging frequency achieved.
2024-08-29 02:54 AM
Hi
The polling examples have been reworked in version 3.4.2 of X-CUBE-TOF1 pack.
please download the v3.4.2 from below link:
X-CUBE-TOF1 - Time-of-Flight sensors software expansion for STM32Cube - STMicroelectronics
Br
Zhiyuan.Han