Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Concept/Structure of FreeRTOS Driver

Posted by momus Vie on July 14, 2010
Ollah Seniores!

i was unable to find any tutorial or documentation about how to "best" write a driver
for an FreeRTOS system. Are there any guidlines, concepts, tutorial of any kind? ( i even bought the book, but nothing their either, why? )

They only thing I found is this ( http://hroch.sh.cvut.cz/replicator/index.php?option=com_content&view=article&id=14:uart-driver&catid=8:drivers&Itemid=12 ) and i dont think the uartDriver is using the mutex end semaphores as they should be used ...

Thx for any help.

RE: Concept/Structure of FreeRTOS Driver

Posted by Dave on July 14, 2010
There is no fixed driver model that you have to stick to rigidly, the best method will depend on the requirements of your actual application.

FreeRTOS provides primitives for passing messages between and synchronizing between tasks and interrupts, how you use the primitives is up to you. Generally each demo application includes at least one ISR as an example scheme, although these are not always optimised and can just be to show how the API functions can be used.

If your ISR is fast then all processing can be done in the ISR itself. If the ISR requires some processing to be performed then it is often best to use a FreeRTOS API to do nothing else in the ISR than unblock a task, and have the processing actually performed in the task. The task that does the processing can be set to a high priority if necessary, so the ISR interrupts one task but returns directly to the ISR handler task, so the processing is done all in one go just as if it had all been done in the ISR. The demo application will show you how to do that.

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

Version 10.1.0 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner