Limitations

So, what's not to love about software timers? Not too much, as long as the following are kept in mind:

  • Jitter: Since the callbacks are executed within the context of a task, their exact execution time will depend on all the interrupts in the system, as well as any higher-priority tasks. FreeRTOS allows this to be tuned by adjusting the priority of the timer task being used (which must be balanced with the responsiveness of other tasks in the system).
  • Single Priority: All software timer callbacks execute inside the same task.
  • Resolution: A software timer's resolution is only as precise as the FreeRTOS tick rate (defined as 1 ms for most ports).

If lower jitter or higher resolution is required, it probably makes sense to use a hardware timer with ISRs instead of software timers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.190.93