NET3001-F12 Course Page


Instructor

Times and Locations

Course Outline

Course Notes

Assignments

Grading, Midterm & Exams

Resources (new page)

Change list

Instructor:

Pat Beirne (patb@sce.carleton.ca)

Office hours:

Tuesdays & Thursdays from 1pm until 2pm and by appointment, AP230A

Class Times & Locations

  • Lectures Tuesdays and Thursdays at 11:30 until 13:00 from Sept 6th to Dec 1st inclusive

  • Labs Tuesday from 14:00 (2pm) until 17:00 (5pm), Sept 11th to Nov. 27th inclusive

Exam

will be held in AP134, Wednesday Dec 12, 11am (3 hours)

Web Pages

This page, of course. As an experiment, we also may communicate through Facebook group called Carleton-NET3001

Course Requirements:

There is no textbook for this course; the information is all in the notes and the reference web pages.

Every student is required to use a personal laptop computer for the labs and assignments of this course. Windows (any) or Linux laptops are supported; if you have a Mac, you will need to use Parallels/VMWare/VirtualBox and run through the virtual machine.

Course Description & Outline

Real-time systems are designed to interact with their environment in a time-critical manner. NET3001 provides an introduction to the fundamental principles of these systems. It also presents different issues associated with using a single processor computer system to implement a real-time system. The objectives of this course are to:

  • introduce the development of real-time embedded systems

  • introduce hardware interrupts as the sources of asynchronous events

  • introduce the concept of concurrency in a single processor computer system using the event, message and dispatcher model

  • provide practical laboratory exercises that reinforce an event-driven perspective in the development of embedded real-time systems

The course will provide practical experience in low-level programming in an embedded platform. A special programming system has been developed for this course, containing an ARM/Cortex-M3 (the STM32) microcontroller and a host of specialized input/output devices and interfaces.

The development will be done on the Eclipse IDE platform, using both Assembly Language and C. The student will learn to program on both a device simulator and an actual device hosted by the MTS2 Project Board.

Roughly, the course breaks down into: one quarter assembly language, one quarter C coding, one quarter interrupt coding and one quarter event-driven event-driven programming. The concepts that will be covered are applicable to a wide range of computer systems, programming languages, and applications.


There is no specific textbook required for this course. However, several PDF files can be found in the Resources section below.

Lab Equipment   

Each student will be given a NET3001 MTS2 board for use during the term. The student can bring the MTS2 board home; I expect the student to take reasonable care of the board assigned to him/her.

The MTS board will be used for all assignments and labs.

Each student will be required to leave a $200 security deposit on receipt of the MTS2 board. This deposit will be returned on Nov 29th upon returning the MTS2 board to the lab personnel. [Boards which are returned in a non-functional state will have a repair fee deducted from the security deposit.]

Lecture schedule (tentative)

1

Sept 6

Course objectives, organization and administration; Lab information.

Introduction : What is an embedded system? What is a real time system? Microprocessors vs. Microcontrollers.

Programmer’s Model of the ARM/Cortex-M3: Instruction Set, Memory, I/O. Notes

2

Sept 11

Introduction to the Eclipse IDE. Programming the ARM/Cortex-M3 assembly language. Instruction Set: format, addressing modes. Basic operations: data transfer,. Notes

Lab 1: Review of C coding techniques. Installing Eclipse on your laptop.

3

Sept 13

Arithmetic, overflow, assembler program definition Directives. Basic operations (cont.): multiple-byte operations (carry condition register). Assembly code in Eclipse. Notes and more notes

4

Sept 18

Symbol table; Control flow: conditions, jumps. Basic operations: shift and Boolean logic operations. Notes

Lab2: assembly language; multi-byte operations; subroutines, buttons & LEDs; some possible solutions

5

Sept 20

Program execution time. Assembly 2-Pass Process, Linking, Cross-Assembly, Simulation, Execution, Debugging. Hardware and software development tools.

6

Sept 25

Symbol Table.

Array manipulation. Strings. Structures. Notes


Lab3: loops, arrays, strings, subroutines, more LEDs and a solution

7

Sept 27

The stack. Introduction to subroutines. Subroutine definition policies. The stack frame. Parameter passing: by value, by reference. Notes

8

Oct 2

Introduction to ANSI C language programming using the GNU C compiler. Notes

Basic concepts of Input/Output. Overview of the Cortex-M3 parallel ports

Interfacing with simple Input/Output devices: LEDs. Notes

Lab4: delays, subroutines, libraries, beeper & LCD

9

Oct 4

Intro to C. Notes

10

Oct 9

C startup code. Variables. Stepper motor. DC motor.

Lab5: basic I/O, timers, DC motors, servo motor, PWM (in C) sample solution

11

Oct 11

Timer Functions. Real-time interrupt. Timer counter register. Pulse width modulation. Notes

Interrupts: fundamental concepts. Reset vector.

12

Oct 16

MIDTERM

Lab6: stepper motor, libraries, first interrupts with timer & keyboard; required files

13

Oct 18

Review the midterm. Interrupt Programming in C. Notes and more notes

14

Oct 23

Interrupts

Lab7: interrupts, timers, LCD

15

Oct 25

Libraries.

16

Oct 30

Message and event based programming. Notes

State machines; some demo code and its state diagram

Lab8: interrupts

17

Nov 1

State machines. Timers: notes and more notes

More state machines. The cooperative multitasking framework: dispatcher.

18

Nov 6

More state machines.

Lab9: multitasking framework

19

Nov 8

Crosswalk demo


20

Nov 13

Discussion of interrupt programming issues: randomness of interrupt occurrence,  timing diagrams (notes)

Lab10: Using the radio library files

21

Nov 15

Multitasking in Linux

22

Nov 20

Assignment 5 solution. Flashlight demo code and helper

Lab 11: free time for project work (assignment 6)

23

Nov 22

Review Starts


25

Nov 27

Review

Lab 12: free time for project work (assignment 6)

24

Nov 29

Review and wrap up



Course Notes

Intro

NET3001-1-Intro.pdf

Assembly language

NET3001-2-Asm.pdf
NET3001-3-MoreAsm.pdf
NET3001-4-AdvAsm.pdf

C coding

NET3001-5-C.pdf

Interrupts

NET3001-6-Interrupts.pdf

I/O

NET3001-7-IO.pdf
NET3001-7a-IO.pdf

Timers

NET3001-8-RTI.pdf
NET3001-8-Timers.pdf

Multitasking

NET3001-9-CooperativeMultitasking.pdf
NET3001-9a-StateMachine.pdf
NET3001-9b-COM-Rational.pdf
NET3001-9c-COM-HowTo.pdf

Misc

NET3001-10-MiscTopics.pdf
NET3001-10a-MiscTopics.pdf
NET3001-10b-MiscTopics.pdf
NET3001-11-ADC.pdf

While every attempt will be made to keep to the schedule listed above, circumstances may necessitate modifications throughout the semester




Assignments

Assignment Deadlines

Assignment 1. Sept 13, midnight

Assignment 2. Sept 27, midnight. Here is a possible solution.

Assignment 3. Oct 11, midnight

Assignment 4. Oct 25, midnight

Assignment 5. Nov 15, midnight

Assignment 6. Nov 29, midnight

All assignments will be handed in electronically by running this program. Here are instructions for using the program. Late assignments will recieve a mark of 0.

Resources

Web Site

Course materials will be placed on the NET3001 Web site, so students are expected to have Internet access. The URL for the NET 3001 website is http://www.csit.carleton.ca/~pbeirne/NET3001/Outline.html

Laboratory and Assignments:

The term work is made up of six graded assignments. Assignments will be posted here on the course web page. Each assignment must be handed in on (or before) the due date and time. Late assignments will not be accepted without a valid medical certificate. Students are encouraged to discuss design issues when working on assignments; however, they are expected to write their own programs individually. There is a fine line between cooperating with your colleagues (discussing problems and ideas) and copying program code (plagiarism). Some assignments may require reuse of code from earlier assignments, so be sure to get all of the assignments working, and keep an extra copy when submitting assignments.

Students are warned that the assignments form a very important part of this course – doing the assignments is by far the best way of learning the material. In this context, it should be noted that copying assignments is a self-defeating exercise. Primarily, you won't learn the course material; any student who resorts to copying is not likely to do well on the mid-term or final exam. And secondly, the person marking the assignments uses a sophisticated pattern match tool to locate student copying.

Lab work will be marked. The target for each lab is straightforward, and is always designed to produce a building block for the current assignment. Don't skip the lab.

Grading Scheme:

To pass the course, a student must pass the final examination (D- or better) and obtain an overall passing average (labs plus assignments plus midterm plus final exam). Students who miss an assignment or midterm must present a valid medical certificate to the instructor within a reasonable time after the deadline or midterm; otherwise, the student will receive a zero for that item. For students who pass the final exam, the final grade will be calculated as follows:

Labs: 6%

Assignments: 18%

Mid-term test: 25%

Final exam: 54%
[These marks add up to 103; this is intentional]

Exams & Midterms:

There is one midterm in this course.

There will be one closed book, no calculators, mid-term test. It will be administered in class on October 16 and reviewed 2 days later.

A closed book, no calculators, final exam will be held during the University's formal examination period. The final exam is for evaluation purposes only and will not be returned to the students.

Students who miss the final exam may be granted permission to write a deferred examination (see the Undergraduate Calendar for regulations on deferred exams). These students have additional months to study and a less crowded examination schedule compared to their colleagues who write the final exam in December. As such, it is only fair to expect substantially better performance from these students on the deferred examination than on the final exam.

Special Accomodations:

You may need special arrangements to meet your academic obligations during the term. For an accommodation request the processes are as follows:

Pregnancy obligation: write to me with any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website

Religious obligation: write to me with any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website

Students with disabilities requiring academic accommodations in this course must register with the Paul Menton Centre for Students with Disabilities (PMC) for a formal evaluation of disability-related needs. Documented disabilities could include but are not limited to mobility/physical impairments, specific Learning Disabilities (LD), psychiatric/psychological disabilities, sensory disabilities, Attention Deficit Hyperactivity Disorder (ADHD), and chronic medical conditions. Registered PMC students are required to contact the PMC, 613-520-6608, every term to ensure that I receive your Letter of Accommodation, no later than two weeks before the first assignment is due or the first in-class test/midterm requiring accommodations. If you only require accommodations for your formally scheduled exam(s) in this course, please submit your request for accommodations to PMC by the deadlines published on the PMC website:



Medical certificate: please note that in all occasions that call for a medical certificate you must use or furnish the information demanded in the standard university form. here


Plagiarism:

Plagiarism (copying and handing in for credit someone else's work) is a serious instructional offense that will not be tolerated. Please refer to the section on instructional offenses in the Undergraduate Calendar for additional information.



Changes

2012/09/25

I added some extra information: solution to assignment 1, code from lecture 6 with more to come. You can always surf through the website here and here

That Lecture6 example include several examples of how I want subroutines written: header, EABI compliant, last instruction is either "BX LR" or some equivalent that copys R14 into R15.