MS_uC / dnd / V08 5- 1 VIC - Vectored Interrupts Programming Microcontroller VIC – Vectored interrupt controller Autumn term 2007 32K Byte Burst Flash.

Slides:



Advertisements
Similar presentations
MS_uC / dnd / V RTC - Real Time Clock Programming Microcontroller CAN – Analog Digital Converter Autumn term K Byte Burst Flash 64K or 96K.
Advertisements

Lab III Real-Time Embedded Operating System for a SoC System.
Exceptions. Exception Types Exception Handling Vectoring Interrupts Interrupt Handlers Interrupt Priorities Interrupt applications 6-2.
Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 1.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
I/O Unit.
MS_uC / dnd / V ARM966E-Mem-JTAG-Clock Programming Microcontroller ARM966E-S specifications: Memory – JTAG - Clock Autumn term K Byte Burst.
MS_uC / dnd / V RTC - Real Time Clock Programming Microcontroller ADC – Analog Digital Converter Autumn term K Byte Burst Flash 64K or 96K.
Interrupts What is an interrupt? What does an interrupt do to the “flow of control” Interrupts used to overlap computation & I/O – Examples would be console.
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
MS_uC / dnd / V Programming and GPIO Programming Microcontroller IDE usage, debugger GPIO – General Purpose Input/Output Week 2 - autumn term 2007.
6-1 I/O Methods I/O – Transfer of data between memory of the system and the I/O device Most devices operate asynchronously from the CPU Most methods involve.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
MS_uC / dnd / V TIM - Timer Programming Microcontroller TIM - Timer Autumn term K Byte Burst Flash 64K or 96K Byte SRAM 256K or 512K Byte.
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: internal fault (e.g.. divide by.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
MS_uC / dnd / V UART - Serial communic. Programming Microcontroller UART – Universal Asynchronous Receiver Transmitter K Byte Burst Flash.
1 Interrupts INPUT/OUTPUT ORGANIZATION: Interrupts CS 147 JOKO SUTOMO.
MS_uC / dnd / V RTC - Real Time Clock Programming Microcontroller RTC – Real Time Clock Autumn term K Byte Burst Flash 64K or 96K Byte SRAM.
INPUT/OUTPUT ORGANIZATION INTERRUPTS CS147 Summer 2001 Professor: Sin-Min Lee Presented by: Jing Chen.
2. Methods for I/O Operations
NS Training Hardware. System Controller Module.
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
Exception and Interrupt Handling
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Lecture 23: LM3S9B96 Microcontroller - Interrupts.
System Clocks.
LPC2148 Programming Using BLUEBOARD
ELEC4601 Microprocessor systems Lab 3 Tutorial
Revised: Aug 1, ECE 263 Embedded System Design Lessons 23, 24 - Exceptions - Resets and Interrupts.
MICROPROCESSOR INPUT/OUTPUT
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Timers.
Using Direct Memory Access to Improve Performance
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
1 ARM University Program Copyright © ARM Ltd 2013 Using Direct Memory Access to Improve Performance.
AT91 Interrupt Handling. 2 Stops the execution of main software Redirects the program flow, based on an event, to execute a different software subroutine.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Renesas Electronics America Inc. © 2011 Renesas Electronics America Inc. All rights reserved. RX Interrupt Control Unit (ICU) Ver
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.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
EE 345S Real-Time Digital Signal Processing Lab Fall 2008 Lab #3 Generating a Sine Wave Using the Hardware & Software Tools for the TI TMS320C6713 DSP.
1 The LPC1768 Architecture (with focus on Cortex-M3)
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
68HC11 Interrupts & Resets.
Microprocessor Systems Design I
Timer and Interrupts.
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: Internal fault (e.g.. divide by.
Interrupts In 8085 and 8086.
Programming Microcontroller ADC – Analog Digital Converter
8259-programmable interrupt controller
Programming Microcontroller
Programming Microcontroller
Programming Microcontroller GPIO – General Purpose Input/Output
Chapter 8 Input/Output I/O basics Keyboard input Monitor output
8253 Timer In software programming of 8085, it has been shown that a delay subroutine can be programmed to introduce a predefined time delay. The delay.
YOVI 2008 Core Interrupt Controller (INTC)
8259 Programmable Interrupt Controller
嵌入式微控制器编程 Embedded Microcontroller Programming
CNET 315 Microprocessor & Assembly Language
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Programmable Interrupt Controller (PIC)
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

MS_uC / dnd / V VIC - Vectored Interrupts Programming Microcontroller VIC – Vectored interrupt controller Autumn term K Byte Burst Flash 64K or 96K Byte SRAM 256K or 512K Byte Burst Flash OTP Mem UARTI2CSPI TIMRTC EXT. Bus GPIO USB 2.0FS CAN 2.0B Enet MAC PFQ BC DMA INTR Cntl ARM966 E CORE w/DSP 96 MHz CLK Cntl ADC LVD BOD PLL JTAGETM9 STR912FW44 Internal system building block

MS_uC / dnd / V VIC - Vectored Interrupts Programming without interrupts  The main() function executes all peripheral calls in a fixed sequence

MS_uC / dnd / V VIC - Vectored Interrupts What are interrupts?  Interrupts are asynchronous events that may happen any time  Interrupts stop the execution of the current task  The processor jumps into the interrupt service routine (ISR)  The short ISR is executed  Control is given back to the previously executing task  Interrupts may have priorities.  Concurrent interrupts (interrupts that happen at the same time) are serviced according to their priority  Interrupts may be enabled or disabled  Library functions that may be executed by an ISR must be thread-safe (they have to adhere to some specific rules)  An ISR should if possible not trigger another interrupt

MS_uC / dnd / V VIC - Vectored Interrupts Load the PC with the address contained in PC minus 0x0FF0 0x LDR PC, [PC, #-0x0FF0] Load the PC with the address of Label FIQ_Addr: 0x C LDR PC, FIQ_Addr

MS_uC / dnd / V VIC - Vectored Interrupts Example of interrupt routine assembly code 349: __irq void EXTIT0_IRQHandler(void) 350: { 351: // used to enable LED interrupt 0x C E92D500F STMDB R13!,{R0-R3,R12,R14} … and at the end: 0x E8BD500F LDMIA R13!,{R0-R3,R12,R14} 0x C E25EF004 SUBS PC,R14,#0x

MS_uC / dnd / V VIC - Vectored Interrupts VIC –Interrupt Controller Features zTwo ARM Interrupt Controllers are connected in Daisy Chain zGenerates Fast interrupt (FIQ) and Vectored interrupt requests (IRQ) to CPU z32 vectored interrupts, 16 from each VIC zProgrammable priority on interrupts z27 interrupts assigned to internal Peripherals z5 interrupts assigned to Wake Up Unit ( external interrupts) zUp to 30 external interrupts from Ports 3 ( 6 inputs), 5, 6 and 7 zWake Up Unit enables/disables external interrupts, generating Wake up event in low power mode ®

MS_uC / dnd / V VIC - Vectored Interrupts VIC Features zFIQ is a non-vectored interrupt and is dedicated to a user specified source. zIRQ is an ORed output of up to 32 interrupts. The CPU reads the current IRQ vector address in the VIC and jumps to ISR. Reading of the vector address clears the IRQ request. zVectored_Intr_0 has the highest and Vectored_Intr_31 has the lowest priority. The interrupt input source to each Vectored Interrupt is software selectable (programmable peripheral interrupt priority). zThe VIC hardware resolves the priority when multiple interrupts occur. z The IRQ and FIQ can be generated even when the AHB clock is disabled in a low power mode. ®

MS_uC / dnd / V VIC - Vectored Interrupts VIC-Wake Up Unit Features zWake Up Unit Generates 5 interrupts to the VIC yInterrupt_0 as an ORed interrupt of all 30 external interrupts, RTC and USB Resume interrupt yInterrupt_1 to _3, are interrupts selected from Ports 3,4,5 and 6 (one from each port) zEnables and configures external interrupts as inputs to the VIC zEnables and configures external inputs as Wake Up event to the CPU in Sleep mode zAll inputs can be masked individually, and edge polarity is programmable ®

MS_uC / dnd / V VIC - Vectored Interrupts VIC Configuration zA vectored interrupt requires the following VIC register configuration: zEnable interrupt channel by setting the enable bit in VICx_IntEnable register zClear bit in VICx_Select register to configure input as vectored IRQ interrupt or as FIQ interrupt. zSet the E bit and specify the interrupt source in the VICx_VectCntl (control) register ®

MS_uC / dnd / V VIC - Vectored Interrupts External Intr. Configuration zUp to 30 external interrupts from Ports 3,5,6 and 7 zOnly one interrupt from each port can be selected at one time. zWIU_TR Register– configure triggering edge of each interrupt zWIU_MR Register – mask out not used interrupt inputs zWIU_CTRL Register – define input as interrupt or/and as wake up event zSCU_WKUPSEL Register – select one input from each port (Ports 3,5,6,7) as interrupt input to the VIC. ®

MS_uC / dnd / V VIC - Vectored Interrupts Interrupt control block

MS_uC / dnd / V VIC - Vectored Interrupts Hardware interrupt sources

MS_uC / dnd / V VIC - Vectored Interrupts Interrupt request logic 1

MS_uC / dnd / V VIC - Vectored Interrupts Interrupt request logic 2

MS_uC / dnd / V VIC - Vectored Interrupts Interrupt channels VIC0

MS_uC / dnd / V VIC - Vectored Interrupts Interrupt channels VIC1

MS_uC / dnd / V VIC - Vectored Interrupts

MS_uC / dnd / V VIC - Vectored Interrupts