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

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. It helps the next guy.