Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists