Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Hi guys I am little confused about a topic I was going through the scheduling algorithms and my question is:
Let’s say I have 2 tasks
Task 1 has higher priority
Task 2 has lower priority
Task1_10ms()
{
CAN_send1();
CAN_send2();
CAN_send3();
Motor_algo();
}
Task2_20ms()
{
Read_inp();
DCDC();
LV_check();
}
All CAN msg should be sent at 10ms.
Now this Task1 loop will be executed every 10ms and so that means when system is started :
CAN_send1() will be sent at first 10th ms
CAN_send2() will be sent at 20th ms
CAN_send3() will be sent at 30th ms
Motor_algo() at 50th ms..
Is this correct because it feels wrong and I am confused now..
no all 3 will run when you run task 1
unless you have some global state somewhere checking and stopping the task
feels like a fizzbuzz test
Okay understood
Nah nah it’s just I have lost touch of RTOS and was doing revision worked on it long back… After that I started to work with APIs and lost touch of RTOS..
CONTRIBUTE TO THIS THREAD