vTaskDelay hangs
Posted: Fri Apr 13, 2018 3:35 am
Here is one of the functions I use to test some stepper drivers:
This code misbehaves. The log shows "1st command sent" is printed, but none of the other commands are printed. The code appears to hang in the 1st vTaskDelay.
If I change the task delays to 500ms, the code works properly.
What is going on?
Code: Select all
abs_stepper_run(STEPPER_0, 10, 45, 8);
ESP_LOGE(STEPPER_TAG, "1st command sent");
vTaskDelay(1000 / portTICK_PERIOD_MS);
ESP_LOGE(STEPPER_TAG, "1st delay done");
abs_stepper_run(STEPPER_0, 10, -45, 8);
ESP_LOGE(STEPPER_TAG, "2nd command sent");
vTaskDelay(1000 / portTICK_PERIOD_MS);
ESP_LOGE(STEPPER_TAG, "2nd delay done");
If I change the task delays to 500ms, the code works properly.
What is going on?