cancel
Showing results for 
Search instead for 
Did you mean: 

RANGING_FREQUENCY - VL53L8A

drodriguez_id
Associate

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

3 REPLIES 3
Anne BIGOT
ST Employee

Hello,

Your request was raised internally. We will come back to you soon.

Best regards

Anne


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
Anne BIGOT
ST Employee

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.


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
Zhiyuan.Han
ST Employee

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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.