Post by Ayoub Jridi

ร‰tudiant(e) ร  Ecole Nationale dโ€™Ingรฉnieurs de Tunis

๐Ÿš€ Just Built My First FreeRTOS App using CMSIS-RTOS V2! I recently took a deep dive into designing real-time embedded systems on an STM32, focusing on task synchronization and queue communication. Here is how the project works: ๐Ÿ› ๏ธ The Architecture I designed a two-task system that communicates bidirectionally using dual queues: -Task A (Command Center): Reads user commands (like "delay 500") over UART, parses them, and pushes the new delay time into Queue 1. It also listens to Queue 2 for status updates. -Task B (LED Driver): Pulls the delay value from Queue 1 and flashes the onboard LED (LD2). Every 100 blinks, it pushes a "BLINK" message into Queue 2 to update the console. ๐Ÿ” Debugging & Results Using STM32's Live Expressions, I tracked memory pointers and variables in real-time to ensure no data corruption between tasks. The serial terminal confirmed everything works exactly as planned: 1.Command Parsing: Sending "delay 500" or "delay 100" successfully updates the LED blink rate dynamically. 2.Error Handling: Invalid inputs are caught immediately by the parser. 3.Asynchronous Feedback: The console cleanly outputs "BLINK" notifications sent from Task B without blocking the user input loop. Moving away from basic super-loops and mastering RTOS queues feels like a massive step forward for building scalable, responsive embedded systems. Next up: Semaphores and Mutexes! ๐Ÿฆพ #STM32 #FreeRTOS #EmbeddedSystems #Microcontrollers #Firmware #LearningJourney

Post contentPost contentPost contentPost content