Version 1.3.2.
All text, source code and diagrams are the exclusive property of Real Time Engineers Ltd. Distribution or publication in any form is strictly prohibited without prior written authority from Real Time Engineers Ltd.
© Real Time Engineers Ltd. 2010. All rights reserved.
FreeRTOS™, FreeRTOS.org™ and the FreeRTOS logo are trademarks of Real Time Engineers Ltd.
OPENRTOS™, SAFE RTOS™, and the OPEN RTOS and SAFERTOS logos are trademarks of WITTENSTEIN Aerospace and Simulation Ltd.
ARM™ and Cortex™ are trademarks of ARM Limited. Al l other brands or product names are the property of their respective holders.
http://www.freertos.org
This document was supplied to jmclurkin@rice.edu
www.FreeRTOS.org This document was supplied to jmclurkin@rice.edu
Contents
List of Figures vi
List of Code Listings viii
List of Tables xi
List of Notation xii
Preface FreeRTOS and the Cortex-M3 1
Multitasking on a Cortex-M3 Microcontroller 2
An Introduction to Multitasking in Small Embedded Systems 2
A Note About Terminology 2
Why Use a Real-time Kernel? 3
The Cortex-M3 Port of FreeRTOS 4
Resources Used By FreeRTOS 5
The FreeRTOS, OpenRTOS, and SafeRTOS Family 6
Using the Examples that Accompany this Book 8
Required Tools and Hardware 8
Chapter 1 Task Management 9
1.1 Chapter Introduction and Scope 10
Scope 10
1.2 Task Functions 11
1.3 Top Level Task States 12
1.4 Creating Tasks 13
The xTaskCreate() API Function 13
Example 1. Creating tasks 16
Example 2. Using the task parameter 19
1.5 Task Priorities 22
Example 3. Experimenting with priorities 23
1.6 Expanding the ‘Not Running’ State 26
The Blocked State 26
The Suspended State 27
The Ready State 27
Completing the State Transition Diagram 27
Example 4. Using the Blocked state to create a delay 28
The vTaskDelayUntil() API Function 31
Example 5. Converting the example tasks to use vTaskDelayUntil() 33
Example 6. Combining blocking and non-blocking tasks 34
1.7 The Idle Task and the Idle Task Hook 37
Idle Task Hook Functions 37
Limitations on the Implementation of Idle Task Hook Functions 38
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉