
Explore real-time operating systems, focusing on determinism, time-bound task execution, and priority-based preemptive scheduling to ensure low latency, minimal jitter, and predictable deadlines in embedded microcontroller applications.
Contrast bare metal super loop programming with RTOS task-based execution, where each task runs independently, handles interrupts, and free RTOS memory needs depend on RAM and flash constraints.
Classify real-time operating systems into hard, soft, and firm categories with real-world examples like airbag systems and pacemakers, and explore FreeRTOS, Zephyr, and RTEMS for embedded applications.
Set up the STM32 tool chain with STM32 Cube IDE to generate HAL files and drivers for the microcontroller, saving time and enabling git-managed projects.
Create a new STM32CubeIDE project for the Nucleo H563ZI board, configure pins and clocks with ioc, and generate gpio and main.c for a future led blink demo.
Blink the Nucleo H563Zi board leds using CubeIDE and HAL, with BSP led init and led toggle in a 1-second loop, preparing for FreeRTOS integration.
Explore how the RTOS kernel manages tasks, scheduling, time management, inter-task communication, and synchronization, from hardware and board support packages to memory and device I/O.
Learn how tasks become the core units of execution, their ready, running, blocked, suspended, and terminated states, and how the RTOS scheduler switches them by priority.
Explore multitasking in real-time operating systems, comparing single core switching to true parallelism and concurrency on multi-core CPUs, and learn scheduling, context switching, and inter-task communication.
Discover how rtos schedulers manage multitasking with preemptive, cooperative, round-robin, fixed priority, and earliest deadline first policies, ensuring deterministic task switching and balanced cpu time across ready tasks.
Explore how RTOS memory management allocates and frees memory for tasks, stacks, and queues, contrasting static memory allocation, dynamic memory allocation, memory pools, and stack overflow protection for deterministic performance.
Context switching saves the current task state, updates the task control block, and restores the highest priority ready task to resume execution on a single core.
Explore inter-task communication in RTOS, covering semaphores, mutexes with priority inheritance, event flags, queues, and buffers. Learn best practices to avoid deadlocks and latency, including direct-to-task notifications and signaling mechanisms.
Explore how a real-time operating system manages delays and timeouts to achieve deterministic task execution, using blocking and periodic delays, timeouts, and the system tick with its granularity and frequency.
Master interrupt handling in RTOS by learning how ISRs signal tasks via binary semaphores, queues, or direct task notifications, while keeping ISRs minimal and deferring heavy work to tasks.
Configure a simple UART debugging template on STM32 with HL drivers and HAL interfaces, enabling a virtual COM port and transmitting messages at 115200 baud to monitor program flow.
redirect printf to the UART peripheral to print debugging messages directly over UART using the STM32 stdio wrapper and the _io_putc function, or use int _write for the same effect.
Explore FreeRTOS data types, including tick type T and base type T, and how tick counts, tick period, and pdTrue/pdFalse relate to timing, with naming prefixes C, S, L, X.
FreeRTOS function names prefix the return type and source file, such as V task priority set in task.c, while macros are uppercase with a prefix indicating where defined.
Explore how the FreeRTOS configuration file controls compile-time options to enable or disable features like dynamic and static memory, heap choices, and task scheduling, alongside CMSIS-RTOS v2 wrappers.
Explain how FreeRTOS utilizes core resources on a microcontroller, including SysTick timer, MSP/PSP stacks, and pendSV for context switching. Show estimated flash and RAM usage for task stacks.
Configure FreeRTOS on the html32 board in CubeIDE, enable the CMSIS RTOS wrapper, and set heap 1, 1 ms tick, and preemption.
Understand FreeRTOS memory management on microcontrollers, including static vs dynamic allocation, heap schemes (heap1-heap5), and safe use of malloc/calloc with proper deallocation to prevent fragmentation and stack issues.
Explore dynamic memory allocation in FreeRTOS on stm32, why malloc and calloc are unsuitable for embedded systems, and how pvPortMalloc and pvPortFree enable thread-safe, deterministic memory management with heap1–heap5.
Learn how heap_1 in FreeRTOS uses a fixed pre-rtos heap to allocate task control blocks and stacks before startup. Ensure determinism and prevent memory fragmentation in embedded systems.
FreeRTOS offers static and dynamic memory allocation for kernel objects such as stars, queues, semaphores and event groups; static allocation is compile-time deterministic, dynamic uses malloc at run time.
Explore heap 2, 3, and the upgraded heap 4 in FreeRTOS for STM32, highlighting best-fit allocation and fragmentation risks. Heap 3 offers thread-safe malloc, while heap 4 adds features.
Master heap4 memory management in FreeRTOS by applying first-fit allocation and coalescing adjacent free blocks with pvPortMalloc to reduce fragmentation.
Explore HIP-5 memory allocation in FreeRTOS, which combines multiple memory segments into one HIP and allocates or deallocates memory across segments via vport-define-hip-region.
Explore FreeRTOS heap utilities and macros for memory profiling, including config total heap size, get free heap size, minimum ever free heap size, vtask get info, and malloc failed hook.
Enable static memory allocation in FreeRTOS by setting configSUPPORT_STATIC_ALLOCATION to 1, letting developers supply memory blocks and use static kernel functions like xTaskCreateStatic for compile-time knowledge and determinism.
Learn how FreeRTOS task functions run forever as independent C functions with separate stacks, and how the scheduler switches tasks between running and paused states.
Master task creation in FreeRTOS using static and dynamic APIs, restricted and privileged variants, and affinity for multi-core CPUs, covering TCB and stack RAM requirements.
Master the xTaskCreate API in FreeRTOS on STM32, learning how to specify task function, name, stack depth in words, parameters, priority, and task handle, with pdPass or pdFail outcomes.
Create a single FreeRTOS task on stm32 that sends data over uart with printf, updates a global variable, and uses a delay; then start the scheduler.
Learn to create multiple FreeRTOS tasks on STM32, define task functions, start the scheduler, and debug via the serial port to observe task switching and per-task counters.
Discover how FreeRTOS schedules tasks by priority, preemption, and time slicing, and how changing priorities with vTaskPrioritySet and configMaxPriorities shapes CPU time.
Explore how task priorities shape FreeRTOS scheduling on STM32 by debugging priority scenarios, time slicing, and delays, showing how high and low priority tasks share CPU time.
Learn how to run multiple tasks using a single function in FreeRTOS on STM32 by passing different arguments through a void pointer, giving each task its own variable scope.
create a new task from within another task in FreeRTOS, using xTaskCreate, and explore shared variable access and time-sliced execution.
Master FreeRTOS on STM32 by examining tick interrupts, time slices, and the scheduler; configure tick rate hertz and understand block state, ISR, and round-robin on single core.
Explore FreeRTOS task states on STM32, contrasting continuous and event-driven tasks, and learn how ready, running, blocked, and suspended states interact with priorities, timeouts, queues, and semaphores.
Learn how FreeRTOS delay functions work, comparing vTaskDelay and vTaskDelayUntil, converting milliseconds to ticks with pdMS_to_ticks, and using the blocked state for periodic or timed tasks.
Explore how the idle task maintains a runnable state in FreeRTX, with config idle yield, and how task delete and task hook function enable memory cleanup and background processing.
Learn how to change and query running task priorities in FreeRTOS using the WeaveTaskPrioritySet and uxTaskPriorityGet APIs, including self-priority changes with null and the configMaxPriority limit.
Use vTaskDelete to remove a running task in FreeRTOS, enabled when config include vTaskDelete is set to 1; if a task is created dynamically, idle frees its memory.
Explore nonreentrant functions and why they are unsafe with interrupts and concurrent calls. Learn how to make code reentrant or thread and ISR safe using local variables and synchronization.
Learn how local storage in free RDoS stores per-task data in the task control block (TCB) to support thread-specific state and manage re-entrant versus non-re-entrant functions.
Explore how real-time scheduling algorithms decide which task runs on a single-core system. Learn about fixed priority, preemption, time slicing, and round-robin behavior, plus tickless idle power savings.
Master preemptive scheduling with and without time slicing in FreeRTOS, including config preemption, config time slicing, idle tasks, and round-robin behavior among same-priority tasks.
Explore cooperative scheduling in FreeRTOS, where tasks run without preemption and yield control, enabling safer resource sharing and improved data integrity at the cost of responsiveness.
Discover how FreeRTOS queues provide FIFO inter-task communication with fixed length and item size, enabling decoupled data transfer; compare queue by copy versus queue by reference, and note memory management.
Explores how FreeRTOS queues are accessed by multiple tasks and ISRs, with blocking reads and writes, priority-based unblocking, and queue sets for multi-queue blocking.
Create and manage FreeRTOS queues with xQueueCreate or xQueueCreateStatic, setting queue length and item size. Send data with xQueueSendToBack or xQueueSendToFront, waiting with ticks when full, and reset with xQueueReset.
Learn how to receive data from a FreeRTOS queue with xQueueReceive, which copies the front item to a buffer, removes it, and uses xTicksToWait to wait.
Unlock the full potential of real-time embedded systems with Mastering FreeRTOS: Beginner to Expert. This course is a comprehensive, hands-on journey into the world of FreeRTOS, one of the most widely used real-time operating systems in embedded development.
Whether you're a student, a professional engineer, or a hobbyist, this course is designed to take you from the fundamentals of task scheduling and inter-task communication to advanced topics like real-time debugging, memory management, and RTOS integration with hardware.
You’ll not only learn how FreeRTOS works, but also why it works the way it does, through practical projects, detailed walkthroughs, and real-world scenarios.
Some highlights
Complete Beginner to Advanced Coverage
Start from the basics and progress to expert-level FreeRTOS concepts and applications.
Hands-On Learning with Real Hardware
Learn FreeRTOS by building real projects using ARM Cortex-M or STM32 microcontrollers.
Master Real-Time Scheduling
Understand how tasks, priorities, and preemption work in real-time systems.
Practical Task Management
Create, manage, and synchronize tasks using queues, semaphores, and mutexes.
Debug Like a Pro
Learn advanced debugging techniques using IDEs, hardware debuggers, and tracing tools.
Modular & Structured Content
Well-organized lessons, clearly separated into beginner, intermediate, and advanced modules.
Hardware & Peripheral Integration
Integrate FreeRTOS with GPIO, timers, interrupts, and communication interfaces.
Memory and Stack Optimization
Learn best practices for efficient memory management and safe stack usage.
Industry-Ready Skills
Prepare for roles in embedded firmware, IoT, and real-time systems development.
10. Downloadable Resources & Code Examples
Get full source code, lab templates, and documentation for every section.