ESP32 Dual Core with FreeRTOS and Arduino IDE

ESP32 dual core with FreeRTOS and Arduino IDE example

In this tutorial, we will learn how to use ESP32 dual-core using FreeRTOS and Arduino IDE. The ESP32 development board consists of 2 Xtensa 32-bit LX6 microprocessors which makes it a dual-core microcontroller. This core0 and core1 are included for better performance and efficiency. When programming ESP32 using Arduino IDE, by default core1 is used … Read more

FreeRTOS Event Groups – Tasks Synchronization Example with Arduino

FreeRTOS event groups example with arduino

In this tutorial, we will learn to use Event groups. Events groups are also an important feature that is provided by FreeRTOS. Firstly, we will see an Introduction to Events groups that shows how and where to use it. After that, we will see a demo example with Arduino.  Recommended Components The following are recommended … Read more

FreeRTOS Gatekeeper Task with Arduino

FreeRTOS gatekeeper task tutorial with Arduino

In this tutorial, we will learn to use FreeRTOS gatekeeper tasks API. We will see examples with Arduino. Gatekeeper tasks are used to implement mutual exclusion events without the risk of priority inversion and deadlocks. As we have discussed in previous tutorials, FreeRTOS mutex suffers from priority inversion and deadlocks problems. Although, we can resolve … Read more

FreeRTOS Interrupt Management Examples with Arduino

FreeRTOS Interrupt Management Example writing read data from queue with ISR

In this tutorial, you will learn how interrupt management works with FreeRTOS. In other words, you will learn to manage interrupts with the FreeRTOS kernel. Real-time operating systems, each application consists of several tasks. These tasks can be periodic, aperiodic, and sporadic in nature. But along these some tasks execute only whenever an interrupt occurs. … Read more

FreeRTOS Mutex Tutorial with Arduino – Avoid Priority Inversion

FreeRTOS mutex example

Resource management is a key factor in designing applications based on real-time operating systems. In RTOS, more than one tasks share resources with each other such as peripherals, data, or external devices. Therefore, FreeRTOS provides a mutex semaphore to share resources between tasks securely and without data corruption. In this tutorial, we will learn to … Read more

FreeRTOS Counting Semaphore Examples with Arduino

FreeRTOS counting semaphore example with Arduino for resource management

In the last tutorial, we have seen how to use Binary Semaphore with FreeRTOS and Arduino. We have learned to synchronize software tasks and tasks with interrupt service routines using binary semaphore. In this tutorial, we will learn to use the counting semaphore of FreeRTOS and examples with Arduino. Firstly, we will provide an introduction … Read more

FreeRTOS Binary Semaphore – Examples of Tasks Interrupt Synchronization using Arduino

FreeRTOS Using a binary semaphore to synchronize a task with an interrupt

In this tutorial,  we will learn to use binary semaphores in FreeRTOS using Arduino. First, we will see the introduction of binary semaphore and a few applications. After that, we will discuss FreeRTOS API functions that are used to create and manage binary semaphore with tasks and interrupt service routine. In the end, we will … Read more

FreeRTOS Software Timer: Change Period and Reset Timer

FreeRTOS Software timer period change example with Arduino

In this post, we will learn how to change the FreeRTOS software timer period and how to reset the software timer. we will demonstrate examples with Arduino. In the last tutorials, we have learned to use FreeRTOS software timer with Arduino and we have learned how to update or query software timer ID.  Recommended Components … Read more

FreeRTOS Software Timer with Arduino: Update and Query Timer ID

FreeRTOS software timer ID update and query example with Arduino

In the last tutorial, we have learned to use FreeRTOS software timers. We learned to create and start one-shot and auto-reload type software timers. But we didn’t discuss the use of timer ID tag while creating software timer with xTimerCreate() function. We assigned zero value to the argument of xTimerCreate() function that is responsible to … Read more

FreeRTOS Software Timers with Arduino – Create One-shot and Auto-Reload Timer

FreeRTOS software timers output for one shot and auto reload timers with Arduino

In this tutorial, we will learn to use FreeRTOS software timers with Arduino. Unlike, hardware timers of Arduino, Software timers are provided by the FreeRTOS kernel and they do not use Arduino timers hardware resources. Because they are implemented by FreeRTOS and under the control of RTOS kernel. Most, importantly, they do not use Arduino … Read more