Resets & Interrupts MTT48 3 - 80 CPU08 Core Motorola CPU08 RESETS & INTERRUPTS.

Slides:



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

System Overview MTT48 V Motorol a MOTOROLA 68HC08 INTRODUCTION AND SYSTEM OVERVIEW.
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
External Interrupt Module MTT EXTERNAL INTERRUPT REQUEST MODULE (IRQ)
CSCI 4717/5717 Computer Architecture
68HC11 Polling and Interrupts
EET 2261 Unit 9 Interrupts  Read Almy, Chapters 17 – 19.  Homework #9 and Lab #9 due next week.  Quiz next week.
ECE 372 – Microcontroller Design Parallel IO Ports - Interrupts
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
Exception Processing ECE511: Digital System & Microprocessor.
Chapter 7 Interupts DMA Channels Context Switching.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
The Processor Data Path & Control Chapter 5 Part 4 – Exception Handling N. Guydosh 3/1/04+
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
ECE 265 – LECTURE 12 The Hardware Interface 8/22/ ECE265.
Exception and Interrupt Handling
Introduction to Embedded Systems
Monitor ROM Module MTT48 V MONITOR ROM MODULE (MON)
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
UNIT 8 Keypad Interface Contact Closure Counter Exceptions (Interrupts and Reset)
Chapter 6: Interrupts and Resets
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
M Semiconductor Products Sector Computer Operating Properly Module Detail Slide #1 of 7 Tutorial Introduction PURPOSE -To explain how to configure and.
Revised: Aug 1, ECE 263 Embedded System Design Lessons 23, 24 - Exceptions - Resets and Interrupts.
Nurudeen Olayiwola Thomas Gutierrez
HC08 ARCHITECTURE DETAILS
Interrupts and reset operations. Overview  Introduction to interrupts – What are they – How are they used  68HC11 interrupt mechanisms – Types of interrupts.
Direct Memory Access Module MTT M DIRECT MEMORY ACCESS MODULE (DMA)
Low Power Modes MTT48 V LOW POWER OPERATION.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
1 Interrupts, Resets Today: First Hour: Interrupts –Section 5.2 of Huang’s Textbook –In-class Activity #1 Second Hour: More Interrupts Section 5.2 of Huang’s.
AT91 Interrupt Handling. 2 Stops the execution of main software Redirects the program flow, based on an event, to execute a different software subroutine.
Appendix B: System Development Example MTT48 V2.1 B - 1 APPENDIX B: SYSTEM DEVELOPMENT.
Addressing Modes MTT CPU08 Core Motorola CPU08 ADDRESSING MODES.
Chapter 6: Computer Components Dr Mohamed Menacer Taibah University
System Integration Module MTT Motoola SYSTEM INTEGRATION MODULE (SIM)
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
MICRO-CONTROLLER MOTOROLA HCS12 Interrupts Mechatronics Department Faculty of Engineering Ain Shams University.
EPROM/OTPROM Module MTT48 V EPROM PROGRAMMING.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Computer Operating Properly Module MTT COMPUTER OPERATING PROPERLY MODULE (COP)
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.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
Cortex-M3 Exceptions RTLAB. Hyeonggon Jo.  Exceptions Exception types & priority Abort model SVC and PendSV  Interrupt operation Pre-emption & Exit.
HCS12 Exceptions Maskable Interrupts
Interrupts and signals
ECE 3430 – Intro to Microcomputer Systems
68HC11 Interrupts & Resets.
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.
Timer and Interrupts.
Interrupts In 8085 and 8086.
Tutorial Introduction
Computer System Overview
8085 Microprocessor Architecture
Resets & Interrupts.
BIC 10503: COMPUTER ARCHITECTURE
Interrupts.
Interrupts 1/18/2019.
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Basic Instruction Cycle
Lecture 3 - Instruction Set - Al
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Computer System Overview
CPU Structure and Function
COMP3221: Microprocessors and Embedded Systems
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Presentation transcript:

Resets & Interrupts MTT CPU08 Core Motorola CPU08 RESETS & INTERRUPTS

Resets & Interrupts MTT CPU08 Core Motorola Resets & Interrupts Kinds Break Interrupt (see Break Module) Exception –Reset processing –Interrupt processing Vector Table CPU08 TOPICS

Resets & Interrupts MTT CPU08 Core Motorola Resets & Interrupts Resets initialize the CPU to a known state All resets are managed through the System Integration Module Reset types: –Power On – External Pin –COP – LVI –Illegal Address– Illegal Opcode Interrupts suspend normal processing so the CPU can perform some requested service Interrupt sources –IRQ1 – IRQ2 –SCI– SPI –TIM– DMA –CGM (PLL)– SWI

Resets & Interrupts MTT CPU08 Core Motorola Exception Processing Application ProgramException Handler RTI EXCEPTION Save Context (stacking) Find new Address (Vector Table) Load Address in PC Restore Old Context

Resets & Interrupts MTT CPU08 Core Motorola Exception Processing Resets and Interrupts are both CPU exceptions (to normal processing) Determining what type of handling is required, is called exception processing Exception processing is handled through discrete tasks Different for resets and interrupts –Recognition –Arbitration –Stacking –Vector fetching

Resets & Interrupts MTT CPU08 Core Motorola Exception Processing - Recognition- Detection of either a Reset or a pending Interrupt Resets: Recognized and acted upon immediately once asserted Interrupts: Recognized during last cycle of current instruction –Unless asserted during last cycle Will be recognized during last cycle of next instruction Acted upon after last cycle of current instruction

Resets & Interrupts MTT CPU08 Core Motorola Exception Processing - Arbitration - Resets: Equal and highest priority –No arbitration Interrupts: Differing priorities –Lower than resets Performed by SIM

Resets & Interrupts MTT CPU08 Core Motorola Exception Processing - Stacking - Saving of CPU information Resets: No stacking performed CPU state is reset Interrupts: Stacks CPU registers –PC, X, A, CCR H register is not stacked –Compatibility INTERRUPTINTERRUPT RETURNRETURN Condition Code Register Accumulator Index Register X Program Counter (H) Program Counter (L) Higher Address Lower Address

Resets & Interrupts MTT CPU08 Core Motorola Exception Processing - Vector Fetching - Resets: All use same vector Can determine source by examining a SIM register Interrupts: Vector depends on interrupt source 68HC708XL36 Vector Table $FFE0 - $FFE1IRQ2/Keypad $FFE2 - $FFE3SCI Transmit $FFE4 - $FFE5SCI Receive $FFE6 - $FFE7SCI Error $FFE8 - $FFE9SPI Transmit $FFEA - $FFEBSPI Receive $FFEC - $FFEDTIM Overflow $FFEE - $FFEFTIM Channel 3 $FFF0 - $FFF1TIM Channel 2 $FFF2 - $FFF3TIM Channel 1 $FFF4 - $FFF5TIM Channel 0 $FFF6 - $FFF7DMA $FFF8 - $FFF9PLL $FFFA - $FFFBIRQ1 $FFFC - $FFFDSWI $FFFE - $FFFFRESET

Resets & Interrupts MTT CPU08 Core Motorola Reset Processing RESET Fetch Reset Vector from $FFFE-$FFFF UserMonitor Fetch Reset Vector from $FEFE-$FEFF Mode ? Set I-bit in CCR to prevent interrupts Reset internal registers. Includes CPU and sub module registers. See individual registers for reset states. Load Stack Pointer with $00FF Load Program Counter with contents of Reset Vector Begin execution

Resets & Interrupts MTT CPU08 Core Motorola Interrupt Processing Note that the H Index register is not saved on the stack. The I-bit is cleared by the unstacking of the Condition Code Register. INTERRUPT Last cycle of current instruction Complete next instruction fetch (Redundant) Stack Program Counter Stack X Index register Stack Accumulator Stack Condition Code register Fetch vector Load Program Counter with vector contents Set I bit to prevent interrupts Begin execution. Service the interrupt. Complete next instruction fetch (Unused) Unstack Condition Code register Unstack Accumulator Unstack X Index register Unstack Program Counter Fetch next instruction Interrupt Pending? Yes No 1 1 First cycle of next instruction

Resets & Interrupts MTT CPU08 Core Motorola Masking Enabling/Disabling of exception processing. Resets: Can NOT be masked. Interrupts: Can be masked I bit enables/disables all interrupt processing Local masks in peripherals for masking individual interrupts

Resets & Interrupts MTT CPU08 Core Motorola DESIGN EXERCISE PART2 Write a code sequence Executes at RESET Calls your RAM initialization –How do you make sure this code executes at RESET? Given: ORG$6E00 STARTUP......; Program startup and initialization ORG$FFE0; Vector Table FCBIRQ2SRV; IRQ2 Service Routine FCBSCIXMIT; SCI Transmit Service Routine FCBSCIRECV; SCI Receive Service Routine FCB?????;Reset Handler