Quality RTOS & Embedded Software

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


Loading

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 ]    [ Sitemap ]    [ ]




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

Latest News

Meet us at Embedded World. Hall 3A-525.

Hear from Richard Barry at Embedded World. Feb 28, 16:00, Hall 4-428.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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