cancel
Showing results for 
Search instead for 
Did you mean: 

Hi i have a problem with a sensor vl53l0x on the board b-l475e-iot01a. In particular when i use the VL53L0X_PROXIMITY_GetDistance() in a task with HAL_Delay() it work but when i use the osDelay it work only for a repetition of the for(;;).

Dcapu.2440
Associate II

If i use 2 task, and in first task put the VL53L0X_PROXIMITY_GetDistance() with osDelay, second task never start. I tried to replace osDelay() with other function for context switch but i have same problem.

1 REPLY 1
John E KVAM
ST Employee

My guess:

osDelay delays by wasting cycles in a big for(;;) loop as you say.

HAL_Delay() allows the other tasks to run.

  • john

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.