Lab 5 – Interrupts vs Polling

Slides:



Advertisements
Similar presentations
Lab III Real-Time Embedded Operating System for a SoC System.
Advertisements

A look at interrupts What are interrupts and why are they needed in an embedded system? Equally as important – how are these ideas handled on the Blackfin.
7/23 Coldfire Exceptions and Interrupts Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee
Communication Lab - Interrupts 1/13 Sequential Programming  Our C++ programs are sequential ( סדרתיים), they start at the first instruction and end at.
A look at interrupts What are interrupts and why are they needed.
Interrupt Mechanisms in the 74xx PowerPC Architecture Porting Plan 9 to the PowerPC Architecture Ajay Surie Adam Wolbach.
The 8051 Microcontroller and Embedded Systems
INTERRUPTS PROGRAMMING
Embedded Systems 7763B Mt Druitt College of TAFE
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
CORTEX-M0 Structure Discussion 2 – Core Peripherals
Interrupts Stopping program flow to execute a special piece of code that handles an event Definition and classification PowerPC interrupt structure Precise.
Fall EE 333 Lillevik 333f06-l7 University of Portland School of Engineering Computer Organization Lecture 7 ALU design MIPS data path.
MIPS I/O and Interrupt. .data val1:.float 0.6 val2:.float 0.8 msg_done:.asciiz "done\n".text.globl main main: li.s $f0, mfc1 $a0, $f0 jal calsqrt.
CSC 2405 Computer Systems II Exceptions Mini-Lecture Traps & Interrupts.
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
MicroComputer Engineering OperatingSystem slide 1 the Operating System (OS)
AT91 Interrupt Handling. 2 Stops the execution of main software Redirects the program flow, based on an event, to execute a different software subroutine.
Dec Hex Bin 14 E ORG ; FOURTEEN Interrupts In x86 PC.
AT91 C-startup. 2 For reasons of modularity and portability most application code for an embedded application is written in C The application entry point.
Chapter 3 : Top Level View of Computer Functions Basic CPU function, Interconnection, Instruction Format and Interrupt.
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
Resets & Interrupts MTT CPU08 Core Motorola CPU08 RESETS & INTERRUPTS.
Structure and Role of a Processor
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
The 8051 Microcontroller Chapter 6 INTERRUPTS. 2/29 Interrupt is the occurrence of a condition an event that causes a temporary suspension of a program.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names.
A walk through interrupts on the PPC 823
Processor States normal exception
Exceptional Control Flow
68HC11 Interrupts & Resets.
Microprocessor Systems Design I
MPC8360 Micro Controllers Lab 7 - DMA Fall , 2010.
Mon. Oct 2 Announcements Quiz Postponed to Wednesday – still only on 2.a + 2.b Video lecture for 2.a posted Lab 6 experiment extension You must come to.
Homework Reading Machine Projects Labs
MIPS I/O and Interrupt.
Gunjeet Kaur Dronacharya Group of institutions
the Operating System (OS)
Lab 3 - Branching & Subroutines
MPC8360 Micro Controllers Introduction Fall , 2010.
Introduction of microprocessor
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
Introduction to Micro Controllers & Embedded System Design Interrupt
Interrupt and Exception Programming
MIPS I/O and Interrupt.
8259 Chip The Intel 8259 is a family of Programmable Interrupt Controllers (PIC) designed and developed for use with the Intel 8085 and Intel 8086 microprocessors.
Interrupt and Exception Programming
Arithmetic using a stack
Interrupt.
Number Representations and Basic Processor Architecture
Interrupt and Exception Programming
Lecture 18 Interrupt 동국대학교 홍유표.
Real-Time Embedded Operating System for a SoC System
전자의료시스템 및 실습 System Configuration/Interrupt
BIC 10503: COMPUTER ARCHITECTURE
Tri-state buffer A circuit which allows an input to go to output when desired Otherwise it behaves as if “nothing” is connected to the wire An equivalent.
COMS 361 Computer Organization
Computer Architecture
ARM Introduction.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Computer System Overview
COMP3221: Microprocessors and Embedded Systems
Computer Operation 6/22/2019.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
CS 111 – Sept. 16 Machine language examples Instruction execution
Presentation transcript:

Lab 5 – Interrupts vs Polling MPC8360 Micro Controllers 371-1-2403 Lab 5 – Interrupts vs Polling Fall , 2010

Interrupts Interrupts in the MPC8360 Interrupts vs Polling

Interrupt Flow Interrupt save/restore register - SSR0 0x10C Main Program …. 0x100 xor r3,r3,r3 0x104 r4,r4,r4 0x108 add r3,r3,r5 0x10C or r3,r4,r5 0x110 and r3,r7,r6 Interrupt Handler 0x500 add r4,r5,r3 0x504 sub r7,r4,r2 0x508 lwz r3,0(r7) … 0x570 rfi PC PC PC PC PC PC PC PC PC save/restore register - SSR0 0x10C save/restore register - SSR1 MSR

Interrupt Handler What happens to the original value of the registers overwritten by the Interrupt handler ? What Happens when we get an Interrupt inside the Interrupt handler ? Interrupt Handler 0x500 add r4,r5,r3 0x504 sub r7,r4,r2 0x508 lwz r3,0(r7) … 0x570 rfi

Interrupt Handler – General Structure 0x500 Disable Interrupts 0x504 Push Registers … 0x570 Pop Registers 0x574 Enable Interrupts 0x578 rfi

Vector Offset Interrupt Type Vector Offset (hex) Exception Conditions Reserved 00000 ---- System reset 00100 Caused by the assertion of either sreset or hreset. Machine check 00200 Caused by the assertion of the tea signal during a data bus transaction, assertion of mcp,an address or data parity error, or an instruction or data cache parity error. DSI 00300 Determined by the bit settings in the DSISR. ISI 00400 Caused when an instruction fetch cannot be performed. External interrupt 00500 Caused when MSR[EE] = 1 and the int signal is asserted. Alignment 00600 Caused when the core cannot perform a memory access.

Interrupt Flow E300 Core QUICC Engine Timers Interrupt Controller QE High QE Low

QUICC Engine System Interrupt Mask Register (CIMR) Offset 0xA0 1 …. 27 28 29 30 31 UCC1 UCC2 Timer1 Timer2 Timer3 Timer4 E300 Core QUICC Engine Timers Interrupt Controller Interrupt Controller QE High QE Low The user can mask an interrupt by clearing (setting the bit to 0) the relevant bit.

System Internal Interrupt Mask Register (SIMSR_H) E300 Core Offset 0x720 1 …. 31 QE High QE Low QUICC Engine Timers Interrupt Controller Interrupt Controller QE High QE Low The user can mask an interrupt by clearing (setting the bit to 0) the relevant bit.

Machine State Register (MSR) E300 Core QUICC Engine …. 16 ….. 31 EE Timers Interrupt Controller Interrupt Controller QE High QE Low The user can mask an interrupt by clearing (setting the bit to 0) the relevant bit.

Global Timers Mode Registers (GTMDR1) Offset 0x10 7 8 9 10 11 12 13 14 15 R W SPS CE OM ORI FRR ICLK GE Reset All Zeros

Global Timers Mode Registers (GTMDR1) Offset 0x10 7 8 9 10 11 12 13 14 15 R W SPS CE OM ORI FRR ICLK GE Reset All Zeros ORI Output Reference Interrupt Enable Disable interrupt for reference reached (does not affect interrupt on capture function). 1 Enable interrupt upon reaching the reference value.

Interrupts Flow Write an interrupt handler Load the interrupt handler to the specific location. Enable the desired interrupts Unmask the desired interrupts in all the interrupt controllers Enable the external interrupt in the MSR

General Notes Make sure to bring the codes you have written in previous labs. Please READ the exercise before you start working on it !!

Quick Overview