2. FreeRTOS Introduction:
● FreeRTOS is solely owned, developed and maintained by Real Time
Engineers Ltd.
● Real Time engineers working in close partnership with world’s leading chip
companies to provide you award winning, commercial grade and completely
free high quality software.
● FreeRTOS is ideally suited to deeply embedded real-time applications that
use microcontrollers or small microprocessor.
3. What is freeRTOS?
● FreeRTOS is real time kernel(or real time scheduler) on top of which
embedded application can be built to meet their hard real-time requirements.
● It allows applications to be organized as collection of independent threads of
execution.
● For a single core processor, only a single thread(or Task) can be executed by
at one time.
● The kernel decides which thread should be executing based on priority and
requirements assigned to each thread by application designer.
4. Why use freeRTOS(Real Time Kernel)?
● Simple embedded software can be written without the use of kernel, but in
terms of complex cases, using a kernel is more preferable.
● Abstracting away timing information - kernel takes responsibility of
executing timing and provides a time related API to the application. This
allows structure of application to be simpler & smaller.
● Maintainability/Extensibility - Abstracting away timing information leads to
fewer inter dependencies between modules which allows software to be
evolved in controlled and predictable way.
● Modularity - Tasks are independent modules
● Team development - Allowing easier team development with well defined
interfaces.
● Easier testing - Easier testing because of independent task modules.
5. Why use freeRTOS(Real Time Kernel)?
● Code reuse - Great modularity & Fewer Interdependencies, result in code
reuse.
● Improved efficiency - Code executes only when there is something that
must be done, no polling for events that have not occurred which means
kernel allows software to be event driven. Counter to efficiency saving is the
need to process RTOS Tick Interrupt and to switch execution from one task to
another.
● Idle time - Idle task is created automatically when scheduler is started. It
executes whenever there are no application tasks wishing to execute.
○ The idle task can be used to measure spare processing capacity to perform background
checks, or to simply place the processor in low power mode.
6. Why use freeRTOS(Real Time Kernel)?
● Power Management - efficiency is gained in low power mode which allows
the processor to spend more time in low power mode.
○ Free RTOS Tickless mode - it allows the processor to enter low power
mode for longer time.
● Flexible interrupt handling - Interrupt handlers can be kept very short by
deferring processing to either a task created by the application writer.
● Mixed processing requirements - Simple patterns can be achieve a mix of
specific, continuous and event driven processing with an application.
○ In addition hard and soft real time requirements can be met by selecting
appropriate task and interrupt priorities.
7. Types of requirements
● Hard Real Time Requirements:
○ Hard Real time Requirements are those that state a time deadline and
breaching the deadline would result in absolute failure of the system.
■ E.g. Delay in a driver’s airbag can potentially harm, if it give slow
response to crash detection sensor.
● Soft Real Time Requirements
○ Soft Real Time requirements are those that a state a time deadline, but
breaching the deadline would not render the system useless.
■ E.g. Responding to keystrokes too slowly might make a system
seem annoying unresponsive without actually making it unusable.
8. RTOS Features:
● Pre-emptive or co-operative operation
● Very flexible task priority assignment
● Flexible, fast and lightweight task
notification mechanism
● Queues
● Binary semaphores
● Counting semaphores
● Mutexes
● Recursive Mutexes
● Software timers
● Event groups
● Tick hook functions
● Idle hook functions
● Stack overflow checking
● Trace recording
● Task run-time statistics gathering
● Optional commercial licensing and
support
● Full interrupt nesting model (for some
architectures)
● tick-less capability for extreme low
power applications
● Software managed interrupt stack
when appropriate (this can help save
RAM)
9. FreeRTOS Family
● Open RTOS
○ It is a commercially license version of freeRTOS provided under license from Real Time
Engineers ltd. by a third party.
● Safe RTOS
○ It shares the same usage model as FreeRTOS, but has been developed in accordance with
practices, procedures and processes necessary to claim compliance with various
internationally recognized safety related standards.