In this example, we'll be using all three LEDs on the dev board to indicate different states:
- Green LED: GreenTaskA() 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 ...