Personal tools

FreeRTOS

From Gluonpilot

Jump to: navigation, search

FreeRTOS is a real time operating system targetted at small microcontrollers.

The gluonpilot code only uses FreeRTOS's scheduler and semaphore mechanism. It is not that complex, but you need to have some basic OS knowledge to understand it.

The scheduler is used to create separate tasks (threads), each with their own priority:

  1. Control task: 50Hz. Highest priority. Manual control will always work, even if all other tasks fail.
  2. Sensor task: 50Hz. Without sensor data, only manual control is possible. With Control + Sensor task, stabilized and manual mode is possible.
  3. Gps + Navigation (GpsNavi) task: Parses both GPS info and calculated navigation. With Control + Sensor + GpsNavi, we can do all modes: manual, stabilized and navigation!
  4. Input commands task: allows you to send commands to the module using a wireless modem/ftdi cable (new waypoints, return home, ...)
  5. Datalogging: Full datalogging. Export to google earth, excel, ... for visualisation and analysis.
  6. Telemetry
  7. OSD: On screen display is the lowest priority task


The semaphores are used to allow mutual exclusion of

  • The use of the SPI port (pressure sensor and flash chip both use it).
  • Releasing the blocked Gps task when a new sentence has arrived (which is received in an interrupt)

Gluonpilot
Automating your flight!

Contact page

Products Documentation ForumShop
Copyright (C) Gluonpilot.com