EE345M Embedded and Real-Time Systems Lab (2/5/2012 version
EE380L.6 Real-time
Operating Systems
Credit for both EE345M and EE380L.6 will not be allowed. Graduate students
should register for EE380L.6 and undergraduates should register for EE345M.
Class: ENS115, Monday, Wednesday, Friday 10-10:50am
Office Hours (change): Tuesday 3:30-4:50pm, Wednesday 1-2pm,
Friday 12noon-1
Instructor: Jonathan W. Valvano, ENS627, 471-5141
email valvano@mail.utexas.edu
(put "EE345M" or "EE380L" in the email title)
Web page http://users.ece.utexas.edu/~valvano
Unique Numbers, Lab ENS252A:
16505 16805 MW 12:30PM-2:00PM
16510 16810 MW 2:00PM-3:30PM
16515 16795 MW 6:30PM-8:00PM
16520 16815 TTh 6:30PM-8:00PM
Text: Embedded Systems: Real-Time Operating Systems for the Arm
Cortex-M3, Volume 3, 2011, ISBN: 978-1466468863. Available
on Amazon Available on CreateSpace
Optional reference Text: MicroC/OS-III: The
Real-time Kernel, Third Edition, Jean J. Labrosse. This is a nice book, but it cost $200 and
includes a STM32 board (not our board, but similar). It covers general OS
topics, explains the use of MicroC/OS-III and
includes details of the M3. There is also a second edition MicroC/OS-II that covers an earlier and simpler OS, without
a board. The 3rd edition is nicely written but specific for the MicroC/OS-III.
Great TAs:
Song Zhang, szhang0119@gmail.com
Zahidul Haq, zahidul3@gmail.com
EE445L TAs:
Nachiappan Valliappan nachi@mail.utexas.edu
Sundeep Korrapati sundeep.korrapati@gmail.com
Lecture notes and lab manual http://users.ece.utexas.edu/~valvano/EE345M/
Development board: We will be using the TI Stellaris LM3S8962 development kit
Each group of two students will must buy/borrow one kit.
However I strongly suggest each student purchase their own
kit. During the first couple of days of the semester we will be selling the
kits for $67.50 using Bevobucks. After this initial purchase period, we will
not be selling any more until all of the EE302 students purchase their MyDAQs. Details will be presented in class.
Reference materials: Data sheets for most of the devices used in this
class are available as pdf files on the class
website. See http://users.ece.utexas.edu/~valvano/Datasheets
Data sheets for devices used in EE319K, EE345L EE345M and EE380L.6
http://www.keil.com/uvision/
Information about the compiler/debugger system
We will use 32-k limited version of the Keil uVision4 see http://www.keil.com/arm/mdk.asp
Download it. A large
number of software examples for the LM3S8962 will be available by installing
the StellarisWare(R).
Starter files: http://users.ece.utexas.edu/~valvano/arm/
Cortex M3 program files for EE445L and EE345M
Old Exams http://users.ece.utexas.edu/~valvano/EE345Moldquiz/
Other references: For programming in C,
see the EE312 text, or C
programming book
EE445L textbook: Embedded Systems: Real-Time
Interfacing to the Arm Cortex M3, 2011, ISBN: 978-1463590154
Prerequisites: EE345L or EE345S. This class is the third in a sequence
of three microcontroller laboratories. I expect you to have experiences with
assembly language, serial ports (SCI and SPI), periodic interrupts, ADCs, edge
triggered interrupts, FIFO queues and C programming. We will be using the
Arm Cortex-M3, and we expect the prior experiences for most students would have
been with a different microcontroller. You are also expected to understand how
the DFT is used to observe digitally sampled data in the frequency domain.
Teaching philosophy
I strongly encourage students to take an active role in this class.
There will be a copious amount of action in this class: debugging, soldering,
screwing, cutting, and testing. Questions are welcome before, during and after
class. Please feel free to email, visit or call me if you have questions.
Specific Objectives of EE345M/EE380L.6
The primary objective of EE345M/EE380L.6 is for
the students to develop the ability to design real-time systems. This class
allows students to combine principles of microcomputer interfacing, software
development, digital logic and analog circuits into the design of
microcomputer-based systems.
ARM architecture, and C programming
Minimally
intrusive debugging
Performance
measures
Synchronization methods
Busy-wait,
interrupt, DMA, periodic polling, priority interrupts
Embedded Communication Systems
Serial
network protocols, layered software, CAN, Ethernet, and USB
Real time operating systems
Foreground
and background thread scheduling
Synchronization
using spinlock and blocking semaphores
Interthread
communication
Digital Device Interfaces
SD
drive interface using SPI, file systems
Diodes,
transistors, DC motors, servos, stepper motors, relays, solenoids,
Optical
sensors, IR distance sensors and contact switch sensors
Time Domain Interfaces
Input
capture/output compare, frequency, period and pulse width measurements,
Pulse-width
modulation
Data Acquisition Systems
Op
amp amplifiers, analog low pass filters, ADC,
FIFO queues, digital filters
Control systems
Open
loop and closed loop, Linear and Nonlinear,
Bang-bang
control, incremental control, PID Control
The purpose of EE345M/EE380L.6 is to provide students an in depth understanding
of real-time operating systems, real-time debugging, and embedded systems.
After the successful conclusion of EE345M/EE380L.6 students should be able to
design real-time embedded systems, such as motor controllers, data store
systems, data acquisition systems, communication systems and robotic systems.
Attendance: Students are expected to attend all lectures, which are at
10 o'clock in the morning. Since there is no book, fundamental material
will be presented in class, and the details can be found in data sheets and
library files provided by the manufacturer. Some lecture material will be
posted on the web, while other lecture material will only be presented in
class. If you decide that you do not want to come to every lecture,
please drop this class.
EE345M Grading: 40% Laboratory
15%
Quiz 1, closed book, Friday March 2, 10-10:50am, in ENS115
15%
Quiz 2, open book, open book, Friday April 6, 10-10:50am, in ENS115
30%
Final, part closed book part open book, Monday May 14, 2-5pm, regularly
scheduled
Please notice the dates for the exams; there will be no re-tests, make-ups, or
incompletes. Class attendance will be used for deciding grades in borderline
cases. I will not use A- grades, but otherwise I plan to use +/- grading. I
have no expected grade cutoffs or expected GPA for this class. You can view the
previous GPA for classes at UT at www.MyEdu.com.
This web site reports I give a GPA in EE345M of 3.48. All professors want
a 5 on their teaching evaluation, and all students want an A. However, I feel
both should only be awarded for excellence.
EE380L.6 Project: The graduate student will attend the lectures, take
the exams, and perform the labs. In addition to all the regular EE345M
assignments, the graduate student will design, build, debug, and document an
extra lab project involving the design, implementation and testing of an
embedded system with a real-time operating system. The complexity of this project
should be equivalent to one of the regular labs. The project
should be approved in advance by the instructor. A 1/2 page written
proposal concerning the project is due by the end of February. The project must
be demonstrated to a TA by the last class day of the semester. Project report
is due to the instructor the first Monday after classes are over. You are free
to choose a project in your field of interest. It must include an embedded
system and a real-time operating system of your design. You must write
microcomputer software and/or build microcomputer hardware. It must actually be
built and tested. The report will be typed double spaced. The minimum page
count is 15 and the maximum page count is 20 (including hardware diagrams, but
not software listings.) The grading policy for the report has four parts:
25%
English style, grammar, spelling, clarity of discussion, objectives
25%
Neatness, hardware diagrams, data flow graphs, call graphs
25%
Engineering quality, how well it works, creativity, correctness
25%
Evaluation and test procedures, how do you verify its correctness.
EE380L.6 Grading:
80%
Regular EE345M grade
20%
Project
Lab Partners: All labs should be performed with a partner. The lab
partnership must be registered with your TA (a simple hand written note signed
by both students will suffice) at least a week before the assignment is due.
Once registered, the partnership will continue. A partnership can be dissolved
only after discussion with the TA. Both partners must be present during the
demonstration. It is expected that both partners will contribute to all aspects
of each lab, and both partners are expected to be present during the check out.
The point values are the same for all labs. The TA will sign your software
listing when you demonstrate your system. All parts of the assignment must be
demonstrated to a TA by the end of your lab period the week shown in the column
labeled "Demo/Report". Any EE345M/EE380L TA is authorized to checkout
your lab. The report (hardware, software, data and plots) are due one day
after the demonstration is due. Please consult with your TA for specific due
dates for your lab section.
EE345M/EE380L Laboratories (1/15 version)
1. Real-time clock, oLED Display, ADC and serial port drivers on the
LM3S8962 board running on an Arm Cortex-M3 (review of EE345L)
2. Real-time operating system kernel (thread switching and synchronization)
3. Blocking semaphores, priority scheduling, performance measures, dumping RTOS
profile data to the PC
4. Microphone input, digital filters, FFT, display spectrum on the oLED
5. Solid state disk, SSI, address translation, layered software, file system
Formula 0001 Racing Robot (teams of 3, 4 or 5)
6. Distributed data acquisition using a controller area network (CAN) of IR
distance sensor,
7A. Moving and turning, PID control
7B. Sensor design and interfacing
7C. Control algorithm, system performance analysis
Lab Schedule
|
Week |
First session |
Second session |
Friday 10am |
Comments |
|
1/16 |
none |
none |
|
no lab activities |
|
1/23 |
Meet the TA, |
1 PrePrep, Select partners |
|
Keil uVision4 demonstration |
|
1/30 |
1 Prep |
|
|
Spectrum analyzer demo |
|
2/6 |
1 Demo |
2 Prep |
1 Report |
|
|
2/13 |
|
|
|
|
|
2/20 |
|
2 Demo
|
2 Report |
|
|
2/27 |
3 Prep |
|
|
Quiz 1 is 3/2 |
|
3/5 |
3 Demo |
4 Prep (bonus) |
3 Report (on line, 5pm) 4 Prep (on line, 5pm) |
There is a hard deadline on Lab 3. If Lab 3 is not demonstrated by second session, revert to Lab 2 and complete rest of labs with Lab 2 OS. |
|
3/19 |
4 Demo |
5 Prep |
4 Report |
|
|
3/26 |
5 Demo |
6 Prep |
|
|
|
4/2 |
5 Report |
6 Demo |
6 Report |
Quiz 2 is 4/6 |
|
4/9 |
|
7A Prep |
|
|
|
4/16 |
|
7A Demo |
|
|
|
4/23 |
|
|
7B Demo |
|
|
4/30 |
|
7C Demo |
7C Report |
Turn in equipment by 5/4 |
No lab 1/17-19
Prep = you turn in your lab preparation
Demo = you demonstrate your lab to the TA
Report = you turn in your complete lab report to the TA
Lecture Schedule (rough draft)
|
Week |
Book |
Topic |
|
1/18 |
1-3 |
Modular programming, call graphs, synchronization, data
flow graphs, show differences between busy-wait and interrupt
synchronization, uVision4 compiler, device drivers, quality software, friendly |
|
1/23 |
1, 2.5, 2.6, 3.7 |
Arm architecture, instruction set, stack, interrupt servicing, lab environment, debugging techniques, intrusiveness, monitor, output to scope, simulator, periodic interrupts |
|
1/30 |
|
RTOS, threads, TCB switching, spinlock
semaphores, draw initial TCB, performance measures (response time,
throughput), |
|
2/6 |
4.2, 4.3, 4.4, 3.7 |
Blocking semaphores, add cooperative multitasking
priority scheduling |
|
2/13 |
3.6, 3.7, 2.12, 5.1, 5.2 |
Critical sections, debugging of the RTOS |
|
2/20 |
5.3, 5.3, 5.4, 5.5 |
Analog filters, Digital filers, FFT, graphics (both section 5.3’s) |
|
2/27 |
5.5, 6.1, 6.2, 6.3, 6.6 |
DFT, windowing, |
|
F 3/2 |
|
Quiz 1 in ENS115, covering material in Labs 1, 2 |
|
3/5 |
6.4, 7 |
DMA, File system |
|
3/19 |
9.2, 3.4, 3.1 |
Controller area network, FIFO queue, layered software |
|
3/26 |
|
Transistor interfaces (TIP120, L293, IRF540), motor
interfacing |
|
4/2 |
|
Control systems, PID |
|
F 4/6 |
|
Quiz 2 in ENS115, covering material in Labs 1, 2, 3, 4, 5 |
|
4/9 |
|
Fuzzy logic, Fixed rate scheduler |
|
4/16 |
|
MicroC/OS-II, Vxworks, effect of sampling jitter |
|
4/23 |
|
Team work, testing and the design process |
|
M 4/30 |
|
course review and evaluation |
|
W 5/2 |
|
Robot preliminary competitions 3rd floor ENS |
|
F 5/4 |
|
Robot final competitions 3rd floor ENS |
|
F 5/4 |
|
all Lab notebooks are due to the TA |
|
F 5/4 |
|
Turn in Lab Equipment so that we won't bar your
registration |
|
5/14 |
|
Final exam, Monday, 2-6pm, Time/place regularly
scheduled |
|
|
|
|
No
lab activities occur during the week of January 18. During the week of
January 24-27, please go to your scheduled lab sessions in ENS252C to get a
demonstration of the lab equipment. We will be using the TI TI Stellaris LM3S8962 development kit
this semester. It will be extremely convenient for both partners to have a
working board. Each student will get exactly one board on about Feb 1. If
you loose it or destroy it, you can purchase another from Keil. For more
information on purchasing a replacement kit, go to the TI web site listed
above. Lab partners will be selected in your lab the week of January 23-26.
The lab preparations (hardware diagrams and syntax-free software source code
printouts) are due at the beginning of your lab period. In other words, please
type your software into the PC before lab. Attendance in lab is required. All
software for lab, and tests must include comments. All
hardware must include R&C values specifying tolerance and type (e.g., 5%
carbon), and chip numbers (be very specific e.g., OPA2350PA). Pin numbers are
required only for lab, not for the exams.
Students are encouraged to go to the last 1 hour of the
other lab periods, but the first priority will be to the regular students.
During the first 15 minutes of lab, the TA will collect preparations. For the
next 15 minutes, the TA will lead a lab discussion session. The remaining lab time
is available for debugging and lab checkout. At the end of the semester please
verify with the checkout counter that your record is clear. All reports must be
given to the TA by Friday May 4, 5pm.
Legal Stuff: The 12th class day is February 1. The
drop policy has recently changed. See your academic advisor or the Dean of
Students for more information. Course evaluation is conducted on the last class
day in accordance with the Measurement and Evaluation Center form. The final
exam is at the time and place stated in the course schedule. The University of
Texas at Austin provides upon request appropriate academic adjustments for
qualified students with disabilities. Students with disabilities may request
appropriate academic accommodations from the Division of Diversity and
Community Engagement, For more information, contact
Services for Students with Disabilities, 471-6259, http://www.utexas.edu/diversity/ddce/ssd/.
Scholastic dishonesty: "Faculty in the ECE Department are committed to
detecting and responding to all instances of scholastic dishonesty and will
pursue cases of scholastic dishonesty in accordance with university policy.
Scholastic dishonesty, in all its forms, is a blight
on our entire academic community. All parties in our community -- faculty,
staff, and students -- are responsible for creating an environment that
educates outstanding engineers, and this goal entails excellence in technical
skills, self-giving citizenry, an ethical integrity.
Industry wants engineers who are competent and fully trustworthy, and both
qualities must be developed day by day throughout an entire lifetime.
Scholastic dishonesty includes, but is not limited to, cheating, plagiarism,
collusion, falsifying academic records, or any act designed to give an unfair
academic advantage to the student. The fact that you are in this class as an
engineering student is testament to your abilities. Penalties for scholastic
dishonesty are severe and can include, but are not limited to, a written
reprimand, a zero on the assignment/exam, re-taking the exam in question, an F
in the course, or expulsion from the University. Don't jeopardize your career
by an act of scholastic dishonesty. Details about academic integrity and what
constitutes scholastic dishonesty can be found at the website for the UT Dean
of Students Office and the General Information Catalog, Section
11-802."
You are encouraged to study together and to discuss information and concepts
with other students. You can give "consulting" help to or receive
"consulting" help from such students in oral form. However, this
permissible cooperation should never involve one student having possession of a
copy of all or part of work done by someone else, in the form of an email, an
email attachment file, a portable storage device, or a hard copy. Copying of
any part of a program is cheating without explicit reference to its source. If
we find two programs that are copied, there will be a substantial penalty to
both students, e.g., failure in the course. Students who cheat on tests or in
lab will fail. Prosecution of cases is very traumatic to both the student and
instructor. It is appropriate to use software out of the book, class website as
long as all copy-pasted software is explicitly referenced. Copy-pasting
software from current or past EE345M students is scholastic dishonesty.
Policies concerning the use of other people's software in this class:
· I strongly encourage you to study existing software.
· All applications and libraries must be legally
obtained. E.g.,
You
may use libraries that came when you bought a compiler.
You may use software obtained
from the web.
You may copy and paste from the
existing source code.
· You may use any existing source code that is clearly
referenced and categorized:
original: completely written by
you,
derived: fundamental approach
is copied but it is your implementation,
modified: source code
significantly edited to serve your purpose,
copied: source code includes
minor modifications.
Many manufacturers will send free samples to students. There are no required
parts you need to sample in EE345M this semester, so this information is for
reference only. Devices come in many sizes and shapes. So, when requesting
samples be sure to specify the package you want: big
surface mount, tiny surface mount, or DIP.
You will need register with an official University email address (e.g.,
YourName@mail.utexas.edu) rather than a junk email address (e.g., aol.com or
gmail.com)
Analog Devices http://www.analog.com/en/index.html
Maxim http://www.maxim-ic.com/
Texas Instruments http://www.ti.com
SamTec http://www.samtec.com/ Click Samples, register
Cool chips, but not
needed Spring 2012
AD8032ANZ rail-to-rail dual op amp
MAX1247ACPE+ 12-bit ADC, such as the (A or B, with or without +)
MAX492CPA rail-to-rail dual op amp (any plastic DIP, with or without +)
MAX494CPD rail-to-rail quad op amp (any plastic DIP, with or without +)
MAX539ACPA single 12-bit SPI interface DAC (ACPA or BCPA)
MAX6225ACPA+ 2.500V analog reference (with or without +) (ACPA or BCPA)
MAX5154ACPE dual 12-bit SPI interface DAC (ACPE or BCPE)
TLC2272ACP rail-to-rail dual op amp
TLC2274ACN rail-to-rail quad op amp
INA122P rail-to-rail instrumentation amp
OPA2350PA rail-to-rail dual op amp
LM4041CILPR adjustable shunt reference
SD-115-G-2 (could use two for LM3S8962 Board)
SD-110-G-2 (could use two for LM3S2110 Board)
Places to buy prototyping boards and other parts
In Austin
|
AlTex Electronics |
832-9131 |
|
Frys Electronics |
733-7000 |
|
Radio Shack |
multiple |
Internet sales
|
BG Micro, Dallas |
|
Freescale |
||
|
All Electronics, Los Angeles |
|
Technological Arts |
||
|
Digikey |
|
Maxim |
||
|
Mouser Electronics |
|
Fairchild |
||
|
Jameco, Belmont CA |
|
Texas Instruments |
Curious about my research? See
http://users.ece.utexas.edu/~valvano/research