3

which parameters define time slice duration in FreeRTOS, and how to calculate how long it will run one task before switching out that task and switching in another task.

I've found configTICK_RATE_HZ which sets number of ticks per second but how it relates to switch in and switch out in terms of tasks.

user505160
  • 1,176
  • 8
  • 25
  • 44

1 Answers1

1

configTICK_RATE_HZ defines the timer tick frequency and thus the timeslice duration. With pre-emption enabled the set of tasks that have the highest priority and are ready to run (ie not blocked) will share the CPU with round-robin. On every tick interrupt a new task from that set will be scheduled.

stathisv
  • 489
  • 2
  • 7