У нас вы можете посмотреть бесплатно FreeRTOS Critical Section vs vTaskSuspendAll() | Protecting Shared Data in ESP32 Demo (M2L7P2) или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
📘 Description In this lecture, we demonstrate how to protect shared data in a multitasking system using ESP32. In the previous lecture, we observed how a race condition occurs when two tasks update the same global variable without proper synchronization. In this lecture, we fix the problem by using two FreeRTOS protection mechanisms: • taskENTER_CRITICAL() / taskEXIT_CRITICAL() • vTaskSuspendAll() / xTaskResumeAll() Through a live ESP32 demo, we run the same program in three different ways: 1️⃣ Without protection – showing how the counter becomes corrupted 2️⃣ Using Critical Section – protecting the shared variable 3️⃣ Using Scheduler Suspend – preventing task switching This experiment clearly shows how context switching can break the read–modify–write operation when accessing shared resources. Topics Covered • Resource sharing in FreeRTOS • What happens when multiple tasks modify the same variable • Why read–modify–write operations are dangerous • Using taskENTER_CRITICAL() for short protected operations • Using vTaskSuspendAll() to temporarily stop task scheduling Code Demonstrated • Shared global variable • Two tasks pinned to the same ESP32 core • Forced context switching using vTaskDelay() • Demonstration of race condition and its protection This lecture is part of the FreeRTOS with ESP32 Series and is essential for understanding safe resource sharing in RTOS-based systems. These concepts apply to: • ESP32 • FreeRTOS • Embedded RTOS systems • Multitasking microcontroller applications 👍 If you found this lecture helpful, please Like, Share, and Subscribe to follow the complete FreeRTOS + ESP32 embedded systems series.