free, small footprint, supported on popular microcontrollers and CPUS, large community of users, maintained by amazon web services, integrates easily with IoT development
19
New cards
FreeRTOS Open Sources
can be customized to specific architectures
20
New cards
Vanilla FreeRtos
original FreeRTOS that runs only on single-core CPUs
21
New cards
Xtensa Port of FreeRTOS
Extends Vanilla FreeROTS to support dual core processing on Xtensa architecture
22
New cards
Symmetric Multiprocessing (SMP) System Concepts
have multiple processor cores running independently, each core has an identical view of memory, multiple threads can execute at the same time, thread can switch between CPU cores during execution
23
New cards
ESP-IDF Free RTOS Task Management Functions
Creating tasks with Vanilla RTOS functions, ESP-IDF specific functions
24
New cards
Characteristics of ESP-IDF FreeRTOS Tasks
can only be in one of the 4 task states (running, ready, block, or suspended), implemented in user-defined a function that never returns, typically implemented in an infinite loop
25
New cards
Semaphore
a “key” that one or more tasks can acquire or release for the purpose of synchronization or mutual exclusion (binary, counting and MuTex)
26
New cards
Binary Semaphore Basics
can have two possible values (0 or 1), when a task takes a semaphore its value becomes 0, when a task releases the semaphore its value becomes 1
27
New cards
Counting semaphore basics
used for access to a pool of identical resources, can have values from 0 to N, when a task takes a counting its value is decremented by 1, when n=0, counting semaphore is no longer available, when task releases the counting its value is incremented by 1, n=1 is just a binary semaphore
28
New cards
MuTex (Mutual Exclusion Object)
same general concept as binary semaphore except locking mechanism, is an object, only modified by the current task, operations are locked or unlocked
29
New cards
Advantages of MuTex over Binary Semaphore
provides mutually exclusive access to a critical selection, only one thread can acquire the lock at a time, if a thread acquires a lock no other thread can take it away, prevents race conditions when multiple threads try to acquire the lock simultaneously
30
New cards
Inter-Task Communication Mechanisms in FreeRTOS
Direct Task Notifications, Mailboxes, Queues, Pipes
31
New cards
Direct Task Notifications in FreeRTOS
event sent directly to a task that can unblock the receiving task, and optionally update the receiving task’s notification value, can only be used when theres only one task that can be the recipient of the event
32
New cards
Mailboxes in FreeRTOS
data buffer managed by the RTOS and used for sending a message to a task, object is like a posting mailbox, task can have a mailbox into which others can post mail, any task or ISK can send the message to mailbox of another task
33
New cards
Using message queues in FreeRTOS
queue can be considered an array of mailboxes, FIFO structure, task or ISR deposits message out in the order they were put in
34
New cards
Queue creation includes
name or ID, length, sending task waiting list, receiving task waiting list
35
New cards
Pipes for RTOS Inter-Task Communication
RTOS object that provides simple communication channels used for unstructured data exchange among tasks, can be opened closed written to and read from, unidirectional data exchange