FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2010 Threads] Concept/Structure of FreeRTOS DriverPosted 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 DriverPosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|