Advanced Search
Search Results
319 total results found
5.6 Synchronization Mechanisms: A Comparative Guide
FreeRTOS provides three primary mechanisms for safely managing shared resources between tasks and ISRs. Critical Sections: The "Big Hammer" for Protection A critical section is a section of code that is guaranteed to run to completion without being preempted...
Module 4 - Complex Logic Gates
A complex logic gate is a digital circuit component that performs a logical function built from a combination of basic logic gates like AND, OR, and NOT. The most commonly used complex gates are NAND (Not-AND), NOR (Not-OR), XOR (Exclusive-OR), and XNOR (Exclu...
5.7 Choosing the Right Tool: A Practical Comparison
Deciding which synchronization mechanism to use is a key skill in embedded programming. Use the following table and questions as a guide. Mechanism Purpose Transfers Data? When to Use Primary Risk Critical Section Mutual Exclusion No Protect...
Module 5 - Decoder & Encoder
5.8 Advanced Project: A Multi-Sensor Data Logger
In this chapter, we will build a complete data logging application that utilizes all the core concepts we have learned: hardware interrupts for precise data acquisition, queues for safe data transfer, multiple tasks with different priorities for processing and...
Module 6 - Multiplexer & Demultiplexer
Understand how Multiplexer and Demultiplexer works.
Module 7 - Arithmetic Circuit
Module 8 - Flip-Flop & Latch
PlatformIO Guide
About PlatformIO is a versatile, open-source ecosystem designed for embedded development, providing a unified platform for building, managing, and debugging firmware across a wide range of microcontroller architectures. Integrated with popular IDEs like VSCode...
Module 9 - Register & Counter
4.1 Learning Objectives
After completing this module, students are expected to be able to: Understand the importance of synchronization in multi-tasking systems and the risks of race conditions. Recognize and implement basic synchronization mechanisms: Mutexes and Semaphores in Free...
Module 2 - Dataflow Style
4.2 Introduction: The Problem of Shared Resource Access
In multi-tasking systems, multiple tasks often need to access the same resource simultaneously, such as a global variable, a sensor interface, or a data structure. If this access is not managed properly, it can lead to data corruption, inconsistencies, or unex...
Module 2 - Task Management
4.3 Synchronization Mechanisms in FreeRTOS
FreeRTOS provides several synchronization primitives, the most common of which are Mutexes and Semaphores. Both are built upon a basic data structure called a queue. Mutex (Mutual Exclusion) A mutex can be thought of as a "key" to a resource. A task that wan...
Module 2 : Functions in C
Learning Objectives: Understand the concept and importance of functions in C programmingDeclare and define functions with proper syntaxUse function parameters and return values effectivelyApply different parameter passing mechanisms (pass by value)Understand ...
4.4 Common Problems in Synchronization
Deadlock A deadlock is a situation where two or more tasks are blocked forever, each waiting for a resource that is held by another task in the cycle. Example Deadlock Scenario: Task A successfully locks Mutex 1. Task B successfully locks Mutex 2. Task A no...