Time Measurement time slicing : In the examples, both tasks were created at the same priority, and both tasks were always able to run. Therefore, each task executed for a ‘time slice’, entering the Running state at the start of a time slice, and exiting the Running state at the end of a time slice. The length of the time slice is effectively set by the tick interrupt frequency, which is configured by the application-defined configTICK_RATE_HZ For example, if configTICK_RATE_HZ is set to 100 (Hz), then the time slice will be 10 milliseconds. The time between two tick interrupts is called the ‘tick period’. One time slice equals one tick period. FreeRTOS API calls always specify time in multiples of tick periods, which are often referred to simply as ‘ticks’. The pdMS_TO_TICKS() macro converts a time specified in milliseconds into a time specified in ticks. pdMS_TO_TICKS() cannot be used if the tick frequency is above 1KHz (if configTICK_RATE_HZ is greater than 1...
留言
張貼留言