Introduction to RTOS Part 8 - Software Timer | Digi-Key Electronics
In embedded systems, timers offer the ability to delay a call to a function, periodically call a function, or control some peripheral without the need for CPU intervention. In FreeRTOS, a software timer is controlled by a timer service task and can be used to execute a function some time in the future based on the RTOS tick timer.
The solution to the challenge in the video can be found here: https://www.digikey.com/en/maker/projects/introduction-to-rtos-solution-to-part-8-software-timers/0f64cf758da440a29476165a5b2e577e
Code for this video series (including demonstrations, challenges, and solutions) can be found here: https://github.com/ShawnHymel/introduction-to-rtos
FreeRTOS gives us a software timer library that we can use to configure several timers. These timers are tied to the tick timer, so we cannot get a resolution greater than the tick timer’s resolution (1 ms by default in the ESP32 Arduino package).
When we include the timer library, it will automatically spawn a timer service (or “daemon”) task that runs at priority 1 (default in ESP32 Arduino package). This service task is in charge of managing all of the software timers that are set.
Timers can count up or down and can be set to “one-shot” or “auto-reload.” Whenever a counter reaches its maximum value (as set in code), it will execute the callback function associated with that timer. A “one-shot” timer will execute the callback function only once, unless the timer is told to start counting again. An “auto-reload” timer will execute the callback function periodically at a rate specified by the timer’s max value.
In the video, we demonstrate the use of software timers and explain how they function within FreeRTOS. We also issue a challenge to create an auto-dimming LED feature whenever an interface is not being used.
Product Links:
https://www.digikey.com/en/products/detail/adafruit-industries-llc/3405/7244967
Related Videos:
Introduction to RTOS Part 1 - What is a Real-Time Operating System (RTOS)? - https://youtu.be/F321087yYy4
Introduction to RTOS Part 2 - Getting Started with FreeRTOS - https://youtu.be/JIr7Xm_riRs
Introduction to RTOS Part 3 - Task Scheduling - https://youtu.be/95yUbClyf3E
Introduction to RTOS Part 4 - Memory Management - https://youtu.be/Qske3yZRW5I
Introduction to RTOS Part 5 - Queue - https://youtu.be/pHJ3lxOoWeI
Introduction to RTOS Part 6 - Mutex - https://youtu.be/I55auRpbiTs
Introduction to RTOS Part 7 - https://youtu.be/5JcMtbA9QEE
Introduction to RTOS Part 8 - https://youtu.be/b1f1Iex0Tso
Introduction to RTOS Part 9 - https://youtu.be/qsflCf6ahXU
Introduction to RTOS Part 10 - https://youtu.be/hRsWi4HIENc
Introduction to RTOS Part 11 - https://youtu.be/C2xKhxROmhA
Introduction to RTOS Part 12 - https://youtu.be/LPSHUcH5aQc
Related Project Links:
https://www.digikey.com/en/maker/projects/introduction-to-rtos-solution-to-part-8-software-timers/0f64cf758da440a29476165a5b2e577e
Related Articles:
https://www.digikey.com/en/maker/videos/shawn-hymel/getting-started-with-stm32-and-nucleo-part-3-how-to-run-multiple-threads-with-cmsis-rtos-interface
Learn more:
Maker.io - https://www.digikey.com/en/maker
Digi-Key’s Blog – TheCircuit https://www.digikey.com/en/blog
Connect with Digi-Key on Facebook https://www.facebook.com/digikey.electronics/
And follow us on Twitter https://twitter.com/digikey
Видео Introduction to RTOS Part 8 - Software Timer | Digi-Key Electronics канала Digi-Key
The solution to the challenge in the video can be found here: https://www.digikey.com/en/maker/projects/introduction-to-rtos-solution-to-part-8-software-timers/0f64cf758da440a29476165a5b2e577e
Code for this video series (including demonstrations, challenges, and solutions) can be found here: https://github.com/ShawnHymel/introduction-to-rtos
FreeRTOS gives us a software timer library that we can use to configure several timers. These timers are tied to the tick timer, so we cannot get a resolution greater than the tick timer’s resolution (1 ms by default in the ESP32 Arduino package).
When we include the timer library, it will automatically spawn a timer service (or “daemon”) task that runs at priority 1 (default in ESP32 Arduino package). This service task is in charge of managing all of the software timers that are set.
Timers can count up or down and can be set to “one-shot” or “auto-reload.” Whenever a counter reaches its maximum value (as set in code), it will execute the callback function associated with that timer. A “one-shot” timer will execute the callback function only once, unless the timer is told to start counting again. An “auto-reload” timer will execute the callback function periodically at a rate specified by the timer’s max value.
In the video, we demonstrate the use of software timers and explain how they function within FreeRTOS. We also issue a challenge to create an auto-dimming LED feature whenever an interface is not being used.
Product Links:
https://www.digikey.com/en/products/detail/adafruit-industries-llc/3405/7244967
Related Videos:
Introduction to RTOS Part 1 - What is a Real-Time Operating System (RTOS)? - https://youtu.be/F321087yYy4
Introduction to RTOS Part 2 - Getting Started with FreeRTOS - https://youtu.be/JIr7Xm_riRs
Introduction to RTOS Part 3 - Task Scheduling - https://youtu.be/95yUbClyf3E
Introduction to RTOS Part 4 - Memory Management - https://youtu.be/Qske3yZRW5I
Introduction to RTOS Part 5 - Queue - https://youtu.be/pHJ3lxOoWeI
Introduction to RTOS Part 6 - Mutex - https://youtu.be/I55auRpbiTs
Introduction to RTOS Part 7 - https://youtu.be/5JcMtbA9QEE
Introduction to RTOS Part 8 - https://youtu.be/b1f1Iex0Tso
Introduction to RTOS Part 9 - https://youtu.be/qsflCf6ahXU
Introduction to RTOS Part 10 - https://youtu.be/hRsWi4HIENc
Introduction to RTOS Part 11 - https://youtu.be/C2xKhxROmhA
Introduction to RTOS Part 12 - https://youtu.be/LPSHUcH5aQc
Related Project Links:
https://www.digikey.com/en/maker/projects/introduction-to-rtos-solution-to-part-8-software-timers/0f64cf758da440a29476165a5b2e577e
Related Articles:
https://www.digikey.com/en/maker/videos/shawn-hymel/getting-started-with-stm32-and-nucleo-part-3-how-to-run-multiple-threads-with-cmsis-rtos-interface
Learn more:
Maker.io - https://www.digikey.com/en/maker
Digi-Key’s Blog – TheCircuit https://www.digikey.com/en/blog
Connect with Digi-Key on Facebook https://www.facebook.com/digikey.electronics/
And follow us on Twitter https://twitter.com/digikey
Видео Introduction to RTOS Part 8 - Software Timer | Digi-Key Electronics канала Digi-Key
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Introduction to RTOS Part 9 - Hardware Interrupts | Digi-Key Electronics](https://i.ytimg.com/vi/qsflCf6ahXU/default.jpg)
![How to Make a Raspberry Pi CM4 Carrier Board - Part 3: Solder and Flash eMMC | Digi-Key Electronics](https://i.ytimg.com/vi/3GCe6gF_zoo/default.jpg)
![Getting Started With STM32 & Nucleo Part 4: Working with ADC and DMA - Maker.io](https://i.ytimg.com/vi/EsZLgqhqfO0/default.jpg)
![#381 How to work with a Real Time Operating System and is it any good? (FreeRTOS, ESP32)](https://i.ytimg.com/vi/684KSAvYbw4/default.jpg)
![Introduction to RTOS Part 11 - Priority Inversion | Digi-Key Electronics](https://i.ytimg.com/vi/C2xKhxROmhA/default.jpg)
![Introduction to RTOS Part 1 - What is a Real-Time Operating System (RTOS)? | Digi-Key Electronics](https://i.ytimg.com/vi/F321087yYy4/default.jpg)
![](https://i.ytimg.com/vi/eD8cXN320ps/default.jpg)
![It Jobs without Programming with high package | IT jobs without coding | IT jobs with zero coding](https://i.ytimg.com/vi/p04fp43Eg_0/default.jpg)
![](https://i.ytimg.com/vi/Y2Z4DYIw730/default.jpg)
![Intro to Raspberry Pi Pico and RP2040 - MicroPython Part 3: PIO | Digi-Key Electronics](https://i.ytimg.com/vi/PrMQpv9iCFw/default.jpg)
![Introduction to RTOS Part 10 - Deadlock and Starvation | Digi-Key Electronics](https://i.ytimg.com/vi/hRsWi4HIENc/default.jpg)
![Introduction to RTOS Part 5 - Queue | Digi-Key Electronics](https://i.ytimg.com/vi/pHJ3lxOoWeI/default.jpg)
![Introduction to ESP32 - Getting Started](https://i.ytimg.com/vi/xPlN_Tk3VLQ/default.jpg)
![Introduction to RTOS Part 12 - Multicore Systems | Digi-Key Electronics](https://i.ytimg.com/vi/LPSHUcH5aQc/default.jpg)
![Introduction to FPGA Part 1 - What is an FPGA? | Digi-Key Electronics](https://i.ytimg.com/vi/lLg1AgA2Xoo/default.jpg)
![Getting Started with the ESP32 Development Board | Programming an ESP32 in C/C++](https://i.ytimg.com/vi/dOVjb2wXI84/default.jpg)
![Introduction to RTOS Part 7 - Semaphore | Digi-Key Electronics](https://i.ytimg.com/vi/5JcMtbA9QEE/default.jpg)
![Introduction to Embedded Linux Part 1 - Buildroot | Digi-Key Electronics](https://i.ytimg.com/vi/9vsu67uMcko/default.jpg)
![Arduino IDE 2.0 - Testing Release Candidate 3](https://i.ytimg.com/vi/rQSEHY6vbkY/default.jpg)
![Getting Started With STM32 and Nucleo Part 3: FreeRTOS - How To Run Multiple Threads w/ CMSIS-RTOS](https://i.ytimg.com/vi/OPrcpbKNSjU/default.jpg)