vTaskDelay delays way too long
vTaskDelay delays way too long
I set up a simple "hello world" project to verify functionality of FreeRTOS. My main loop creates a thread with function stillAlive(), which is supposed to print a message every 10ms, but it's actually printing every 1000ms. How do I fix this?
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: vTaskDelay delays way too long
You need to divide by portTICK_PERIOD_MS, not multiply.
-
- Posts: 2
- Joined: Mon Jan 08, 2024 1:25 pm
Re: vTaskDelay delays way too long
Change your line 9
vTaskDelay(10 / portTICK_PERIOD_MS);
vTaskDelay(10 / portTICK_PERIOD_MS);
Who is online
Users browsing this forum: Baidu [Spider], Google [Bot] and 119 guests