<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Real-Time Systems on Vamsi Kiran | Firmware Engineer</title><link>https://vamsikiran277.github.io/tags/real-time-systems/</link><description>Recent content in Real-Time Systems on Vamsi Kiran | Firmware Engineer</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 18 Apr 2026 10:00:00 +0000</lastBuildDate><atom:link href="https://vamsikiran277.github.io/tags/real-time-systems/index.xml" rel="self" type="application/rss+xml"/><item><title>FreeRTOS Task Management &amp; Sensor Suite</title><link>https://vamsikiran277.github.io/projects/freertos-tasks/</link><pubDate>Sat, 18 Apr 2026 10:00:00 +0000</pubDate><guid>https://vamsikiran277.github.io/projects/freertos-tasks/</guid><description>&lt;h3 id="-technology-stack"&gt;🛠 Technology Stack&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Languages:&lt;/strong&gt; Embedded C (C11)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operating System:&lt;/strong&gt; FreeRTOS (POSIX Port)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Protocols:&lt;/strong&gt; I2C, Hardware Interrupts (GPIO)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tools:&lt;/strong&gt; libgpiod, GDB, GCC, Linux terminal&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="the-project-overview"&gt;The Project Overview&lt;/h3&gt;
&lt;p&gt;The objective was to design a robust, thread-safe sensor acquisition system on a Linux-based RTOS environment. This project demonstrates high-reliability multitasking where multiple sensors share a single communication bus without data corruption or timing jitter.&lt;/p&gt;
&lt;h3 id="technical-highlights"&gt;Technical Highlights&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Kernel-Level Multitasking:&lt;/strong&gt; Leveraged the &lt;strong&gt;FreeRTOS POSIX Port&lt;/strong&gt; to manage three concurrent tasks using fixed-priority preemption, ensuring mission-critical tasks always receive CPU time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thread-Safe I2C Management:&lt;/strong&gt; Implemented a &lt;strong&gt;Mutex Semaphore&lt;/strong&gt; to arbitrate access to the I2C bus. This prevents data collisions between the &lt;strong&gt;ADXL345 Accelerometer&lt;/strong&gt; and &lt;strong&gt;DS3231 RTC&lt;/strong&gt; tasks when accessing shared hardware.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asynchronous Event Handling:&lt;/strong&gt; Developed a high-priority hardware listener using &lt;strong&gt;libgpiod&lt;/strong&gt; to capture falling-edge interrupts on GPIO 17, triggering a system-wide graceful shutdown.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deterministic Scheduling:&lt;/strong&gt; Replaced standard sleep calls with &lt;code&gt;vTaskDelayUntil()&lt;/code&gt; to ensure a consistent &lt;strong&gt;10Hz sampling frequency&lt;/strong&gt;, eliminating timing drift critical for real-time telemetry analysis.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resource Cleanup:&lt;/strong&gt; Engineered a custom &lt;code&gt;shutdown()&lt;/code&gt; sequence ensuring all RTOS tasks are deleted and Linux file descriptors (I2C/GPIO) are properly closed before process termination.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="live-rtos-execution--task-arbitration"&gt;Live RTOS Execution &amp;amp; Task Arbitration&lt;/h3&gt;
&lt;p&gt;The following terminal trace captures the live execution of the FreeRTOS tasks. It demonstrates the real-time arbitration of the I2C bus between the high-frequency accelerometer and the low-frequency real-time clock.&lt;/p&gt;</description></item></channel></rss>