cancel
Showing results for 
Search instead for 
Did you mean: 

Vl53l8 configuring the ranging frequency

vishnusf
Associate III

Hi,

I am using the VL53l8 sensor. i need to change the ranging frequency. im using the Xcube tof code. I see in the app tof code that #define RANGING_FREQUENCY (10U). so if i change 10u to 15. Willi get ranging frequency to 15 hz.?

 

Thank u 

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

that should work just fine. 

and, as you are using an STM32, go ahead and insert:

//Counting cycles is a piece of cake. 
//Stick this code somewhere in your code.

       cur_timestamp = HAL_GetTick();
       printf("%4lums \n",cur_timestamp - prev_timestamp);
       prev_timestamp = cur_timestamp;

Each tick is a ms. - but remember that there is going to be a roll-over at some point. But it's great for just testing!!


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

View solution in original post

1 REPLY 1
John E KVAM
ST Employee

that should work just fine. 

and, as you are using an STM32, go ahead and insert:

//Counting cycles is a piece of cake. 
//Stick this code somewhere in your code.

       cur_timestamp = HAL_GetTick();
       printf("%4lums \n",cur_timestamp - prev_timestamp);
       prev_timestamp = cur_timestamp;

Each tick is a ms. - but remember that there is going to be a roll-over at some point. But it's great for just testing!!


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.