Lab Manual CAO
Lab Manual CAO
Lab Manual CAO
1. Pre-lab Report
• Read Chapters 45 (PIT), Chapter 48 (RTC) and Chapter 61 (TSI) of the
TWR-K70F120M Reference Manual.
• Read this lab handout carefully. Take notes and prepare the programs
required in this handout.
The purpose of this lab is to learn and gain first hand experiences on
interrupt processing of the ARM Cortex M4 processor. You will apply your
knowledge and basic concepts of exception processing and interrupt handling
that you have learnt in the lectures to the lab experiments.
Specifically, you will learn and exercise the basics of
2.1. Exception priorities, vector tables, and handler routines;
3. Basics
As discussed in the classes, interrupt is one of the most important mechanisms used in
a computer system to handle various unexpected events such as address errors, undefined
instructions, access errors, and so forth. It is also the most important interfacing technique
to allow smooth communication between high speed devices such as CPU and RAM and
low speed devices such as disks, displays, serial ports, printers etc. To design a
microprocessor based system for any application, interrupt is one of the key mechanisms
an engineer should master.
The ARM Cortex M4 processor has a hardware interrupt controller. In this lab, you
will configure and program the controller to implement at least two interrupt handlers
In this lab, you are required to handle two interrupts: Real Time Clock interrupt
and Touch sense input interrupt exceptional events.
Design a real time clock with alarm function using RTC. You can use the RTC
interrupt request periodically to display current time in digital clock format.
And use the TSI interrupt as the function of the alarm.
In the Lab:
In your lab report, you should discuss your designs, trade-offs. Explanation and
interpretation of your results are very important. The lab report will be graded
based on your report and discussions. Total mark for the report is 100 points.
In the following items, numbers inside each bracket “[]” indicates the point you
will earn on a satisfactory report and discussions.
In your discussion and explanations of your results, you should consider the
following:
C. Who is your team partner? How did you collaborate with each other
and what roles did each of the team members play in the lab? [5]
Hand in the debugged source code with comments; the machine code is not
necessary. Note that both hardcopy and a file with programs are required for
the report. Be very specific with your comments that explain what you are
doing and why you are doing it.