From the course: IoT Foundations: Operating Systems Fundamentals
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Use software timers
From the course: IoT Foundations: Operating Systems Fundamentals
Use software timers
- [Instructor] Timers plays a crucial role in both the OS kernel and the user applications. The OS kernel uses them to schedule tasks, while user applications rely on timers to control when and how often functions run. Let's explore the different timing mechanisms in an embedded system. Every IoT or embedded device includes internal core clocks that are often used by CPU cores of a processor. Many also feature dedicated peripheral or hardware timers that applications can use. Timers track time using ticks and notify the operating system when they expire. Upon expiration, a timer generates an interrupt, which the OS typically handles through a dedicated task. Most operating systems provide a timer interface via software timers, which can leverage the already-existing system ticks generated by the hardware timer. We are focused on software timers supported by FreeRTOS, which are useful in many application scenarios. The timer functionality is not part of FreeRTOS kernel, and it can be…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.