Skip to main content
Dcapu.2440
Associate II
March 9, 2020
Question

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(;;).

  • March 9, 2020
  • 1 reply
  • 583 views

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.

This topic has been closed for replies.

1 reply

John E KVAM
ST Employee
April 9, 2020

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.