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

2 REPLIES 2
Anne BIGOT
ST Employee

Hello,

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

Best regards

Anne


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.
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.


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.