Download presentation
Presentation is loading. Please wait.
Published byAina Amundsen Modified over 5 years ago
1
Embedded System Development Lecture 10 3/21/2007
CS590 Embedded System Development Lecture 10 3/21/2007
2
Class Notes Homework #2 is due. Any questions.
2/3-Term Exam will be March 28th. We’ll talk about that later. Microchip discounts expire 3/31.
3
Operating System Services
Tasks must be able to communicate with one another to coordinate their activities or to share data. We will discuss the following methods that most RTOSs offer: Queues Mailboxes Pipes
4
Queues Initialization Allowing for multiple queues
What’s in the queues? What happens on a write? What happens on a read? VxWorks Examples
5
Mailboxes In general, mailboxes are much like queues.
Create, read, write, check, destroy Some RTOSs allow a certain number of messages in each mailbox. Others allow only one. Some RTOSs have a pool of messages for all mailboxes Some RTOSs allow prioritization of messages.
6
Pipes Pipes are also much like queues. Create, read, write…
Some RTOSs allow you to write messages of varying length onto pipes. Pipes in some RTOSs are entirely byte-oriented. Some RTOSs use the standard C library functions fread and fwrite to read from and write to pipes.
7
Pitfalls Most RTOSs do not restrict which tasks can read from or write to any given queue, mailbox or pipe. The RTOS cannot ensure that data written onto a queue, mailbox or pipe will be properly interpreted by the task that reads it.
8
Pitfalls Running out of space in queues, mailboxes, or pipes is usually a disaster for embedded software. Passing pointers from one task to another through a queue, mailbox, or pipe is one of several ways to create shared data inadvertently.
9
Timers Most embedded systems must keep track of the passage of time.
Task delays Task timers System ticks Board supported timing hardware Extremely accurate timing
10
Events An event is essentially a Boolean flag that tasks can set or reset and that other tasks can wait for. More than one task can block waiting for the same event. RTOSs typically form groups of events, and tasks can wait on any subset. Different RTOSs deal in different ways with the issue of resetting events.
11
Memory Management Most RTOSs have some kind of memory management subsystem. Some offer malloc and free. General block allocation is time consuming and can lead to memory fragmentation. Pools of fixed block sizes.
12
Interrupt Routines in an RTOS
Rule 1. An interrupt routine must not call any RTOS function that might block the caller. Rule 2. An interrupt routine may not call any RTOS function that might cause the RTOS to switch tasks unless the RTOS knows that an interrupt routine, and not a task, is executing.
13
2/3 Term Exam Chapters 1 – 7 in the book.
Project questions (PIC, Demo board…). Problems and short answer. Open book and note. Entire class period available. Should take minutes.
14
Class Project Any questions from last week?
LCD Demo Code and Libraries
15
Project Team 1 Anne-Marie Buibish John Mallinger Anthony Megna
16
Project Team 2 Steve Gardner Andrew Marcum Seth Schapiro Erik Certain
17
Project Team 3 John Bodenschatz Elhadi Elomda Mary Green
Richard Hoffman
18
Project Team 4 Angelyn Begley Michael Carsten Keith Shie
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.