Giter Club home page Giter Club logo

freertos-communicating-tasks-project's Introduction

FreeRtos-Communicating-Tasks-Project

Objectives

This project applies knowledge from the embedded programming part of the course and provides hands-on experience with RTOS concepts such as:

  • Tasks
  • Timers
  • Queues
  • Semaphores

Project Specifications

The project is implemented using FreeRTOS on the target emulation board provided via Eclipse CDT Embedded. The key components include:

  1. Tasks:

    • Three sender tasks: Two with the same priority and one with a higher priority.
    • One receiver task.
  2. Timers:

    • Each sender task has an associated timer.
    • The receiver task has its own timer.
  3. Queues:

    • A single queue is used for communication between the sender and receiver tasks.

    • image

      • image
  4. Semaphores:

    • Semaphores are used to synchronize the timers and tasks.

Task and Timer Behavior

  • Sender Tasks: Sleep for a random period (Tsender), then send a message to the queue. If the queue is full, a counter for blocked messages is incremented.
  • Receiver Task: Sleeps for a fixed period (Treceiver), then checks the queue for messages, processes one message if available, and increments a counter for received messages.

image

image

Callback Functions

  • Sender Timer Callback: Unblocks the corresponding sender task by releasing its semaphore.
  • Receiver Timer Callback: Unblocks the receiver task by releasing its semaphore and periodically resets the system state every 1000 messages.

Reset Function

This function performs the following:

  1. Prints statistics of sent and blocked messages.
  2. Resets the counters for messages.
  3. Clears the queue.
  4. Updates the Tsender period to new values from predefined arrays.
  5. Destroys timers and stops execution when all values are used.

Results

  • The project collects and plots the number of sent, received, and blocked messages as functions of the average sender timer period.
  • Comparisons are made with different queue sizes (3 and 10).

Documentation

The project documentation includes:

  1. System Design: Illustrates the overall flow of the program, task communication, and synchronization.
  2. Results: Contains graphs and interpretation of the data collected during the execution.
  3. References: Lists any references used.

Authors

freertos-communicating-tasks-project's People

Contributors

youssefzidan-0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.