Skip to Content
Hands-On RTOS with Microcontrollers
book

Hands-On RTOS with Microcontrollers

by Brian Amos
May 2020
Intermediate to advanced
496 pages
13h 54m
English
Packt Publishing
Content preview from Hands-On RTOS with Microcontrollers

Setting up the code 

In this example, we'll be using all three LEDs on the dev board to indicate different states:

  • Green LEDGreenTaskA() blinks at a steady 5 Hz with a 50% duty cycle.
  • Blue LED: Rapid blinks three times when TaskB() receives the semaphore within 500 ms.
  • Red LED: Turned on after a timeout from xSemaphoreTake(). This is left on until it's reset by TaskB(), as long as it receives the semaphore within 500 ms of starting to wait for it.
In many systems, missing a deadline can be a cause for (major) concern. It all depends on what it is you're implementing. This example is just a simple loop with a red light for when a deadline is missed. However, other systems may require (emergency) procedures to be taken to prevent significant ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RTOS with Microcontrollers - Second Edition

Hands-On RTOS with Microcontrollers - Second Edition

Jim Yuill, Penn Linder

Publisher Resources

ISBN: 9781838826734Supplemental Content