Replies: 1 comment
-
This is not an accurate assumption: a task can run for as long as needed, though it can have consequence on the rest of the system. In the Crazyflie FreeRTOS works with a tick rate of 1KHz. This means that at worst case every 1ms the RTOS will make sure that the highest priority task that is ready to run is the one currently running. If a high-priority task is taking a lot of time, it will block the CPU for any lower priority task that would like to run at the same time. So setting the priority is very important and care should be taken to not be too inefficient in high-priority tasks. For example in the Crazyflie we have a mechanism of worker where works can be executed asynchronously by a worker task running at IDLE priority. This allows to run heavy not time critical operations without affecting the rest of the system. |
Beta Was this translation helpful? Give feedback.
-
It seems that RTOS has created many tasks, but these tasks need to be completed within 1ms. Can it be done? I would like to know the time each task takes up in 1MS during the operation of the drone, such as stabilizerTask and sensorsTask.
@evoggy @ataffanel @tobbeanton @knmcguire @bitcraze-ci
Beta Was this translation helpful? Give feedback.
All reactions