4 - 1 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH) Module 4 : Interrupt System C28x 32-Bit-Digital.

Slides:



Advertisements
Similar presentations
Commande d’actionneurs à l’aide d’un microprocesseur
Advertisements

Microprocessors.
Exceptions. Exception Types Exception Handling Vectoring Interrupts Interrupt Handlers Interrupt Priorities Interrupt applications 6-2.
Interrupts, Low Power Modes and Timer A (Chapters 6 & 8)
External Interrupt Module MTT EXTERNAL INTERRUPT REQUEST MODULE (IRQ)
8051 Core Specification.
Interrupts Disclaimer: All diagrams and figures in this presentation are scanned from the book “Microprocessors and Programmed Logic” authored by Kenneth.
I/O Unit.
Texas Instruments Incorporated Module 13 : C28x BOOT – ROM 32-Bit-Digital Signal Controller TMS320F2812.
68HC11 Polling and Interrupts
ECE 372 – Microcontroller Design Parallel IO Ports - Interrupts
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
1 Computer System Overview OS-1 Course AA
1 Interrupts INPUT/OUTPUT ORGANIZATION: Interrupts CS 147 JOKO SUTOMO.
Chapter 6 Interrupts (I. Scott Mackenzie).
© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. TI C55x instruction set C55x programming model. C55x assembly language. C55x memory organization.
Chapter 10 Interrupts. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 10, Slide 2 Learning Objectives  Introduction to interrupts.
INTERRUPTS PROGRAMMING
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
MSP430 Mixed Signal Microcontroller – Parte 2 Afonso Ferreira Miguel Source: slau056d – Texas instruments.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an overview of the CPU architecture.
1. Registers Used in Timer/Counter  TH0, TL0, TH1, TL1  TMOD (Timer mode register)  TCON (Timer control register) 2.
Microprocessors 1 MCS-51 Interrupts.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This training course provides an overview of the CPU architecture.
Timer Timer is a device, which counts the input at regular interval (δT) using clock pulses at its input. The counts increment on each pulse and store.
Microprocessor. Interrupts The processor has 5 interrupts. CALL instruction (3 byte instruction). The processor calls the subroutine, address of which.
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.
1 - 1 Digital Signal Controller TMS320F2812 Module 1 : Architecture.
AT91 Interrupt Handling. 2 Stops the execution of main software Redirects the program flow, based on an event, to execute a different software subroutine.
32-Bit-Digital Signal Controller Texas Instruments Incorporated
Interrupts  An interrupt is any service request that causes the CPU to stop its current execution stream and to execute an instruction stream that services.
Lecture 1: Review of Computer Organization
System Integration Module MTT Motoola SYSTEM INTEGRATION MODULE (SIM)
Embedded Systems Design 1 Lecture Set 8 MCS-51 Interrupts.
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
MICRO-CONTROLLER MOTOROLA HCS12 Interrupts Mechatronics Department Faculty of Engineering Ain Shams University.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
Renesas Electronics America Inc. © 2011 Renesas Electronics America Inc. All rights reserved. RX Interrupt Control Unit (ICU) Ver
Interrupt-Driven I/O There are different types of interrupts –Hardware Generated by the 8259 PIC – signals the CPU to suspend execution of the current.
Interrupts ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Interrupts ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
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.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Lecture – 8 Interrupt 1. Outline Introduction Handling interrupt Interrupt sources Switching interrupt Peripheral interrupts Using two interrupts Conclusions.
One more PIC18F252 example and revision for exam B222L Branislav Vuksanovic, UoP, ECE.
Chapter 10 Interrupts. Basic Concepts in Interrupts  An interrupt is a communication process set up in a microprocessor or microcontroller in which:
68HC11 Interrupts & Resets.
Microprocessor Systems Design I
Timer and Interrupts.
Interrupts In 8085 and 8086.
Overheads for Computers as Components 2nd ed.
Interrupt Source: under
UNIT 5 TIMRERS/COUNTERS
Interrupt.
Subject Name: Microprocessors Subject Code:10EC46 Department: Electronics and Communication Date: /20/2018.
Interrupts Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device The process.
8051 Timers / Counters It has two timers Timer 0 and Timer 1.
Chapter 10 Interrupts.
전자의료시스템 및 실습 System Configuration/Interrupt
Interrupt Source: under
Interrupts.
Interrupt Source: under
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Computer System Overview
Overheads for Computers as Components 2nd ed.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Presentation transcript:

4 - 1 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH) Module 4 : Interrupt System C28x 32-Bit-Digital Signal Controller TMS320F2812

4 - 2 C28x Core Interrupt Lines C28xCORE  2 non-maskable interrupts (RS, “selectable” NMI)  14 maskable interrupts (INT1 – INT14) INT1 INT2 INT3 INT4 INT5 INT6 INT7 INT8 INT9 INT10 INT11 INT12 INT13 INT14 RS NMI

4 - 3 C28x Reset Sources Watchdog Timer RS pin active To RS pin RS C28x Core

4 - 4 Register Bits Initialized at Reset Register bits defined by reset PC0x3F FFC0PC loaded with reset vector ACC0x Accumulator cleared XAR0 - XAR7 0x Auxiliary Registers DP0x0000Data Page pointer points to page 0 P0x P register cleared XT0x XT register cleared SP0x0400Stack Pointer to address 0400 RPC0x Return Program Counter cleared IFR0x0000no pending interrupts IER0x0000maskable interrupts disabled DBGIER0x0000debug interrupts disabled

4 - 5 Control Bits Initialized at Reset Status Register 0 (ST0) SXM = 0Sign extension off OVM = 0Overflow mode off TC = 0test/control flag C = 0carry bit Z = 0zero flag Status Register 1 (ST1) INTM = 1Disable all maskable interrupts - global DBGM = 1Emulation access/events disabled PAGE0 = 0Stack addressing mode enabled/Direct addressing disabled VMAP = 1Interrupt vectors mapped to PM 0x3F FFC0 – 0x3F FFFF SPA = 0stack pointer even address alignment status bit LOOP = 0Loop instruction status bit EALLOW = 0emulation access enable bit IDLESTAT = 0Idle instruction status bit AMODE = 0C27x/C28x addressing mode OBJMODE = 0C27x object mode M0M1MAP = 1mapping mode bit XF = 0XF status bit ARP = 0ARP points to AR0 N = 0negative flag V = 0overflow bit PM = 000set to left-shift-by-1 OVC = overflow counter

4 - 6  A valid signal on a specific interrupt line causes the latch to display a “1” in the appropriate bit Maskable Interrupt Processing Conceptual Core Overview (IFR) “Latch”INT1 INT2 INT14CoreInterruptC28xCore (INTM) “Global Switch” (IER) “Switch”  If the individual and global switches are turned “on” the interrupt reaches the core

4 - 7 Interrupt Flag Register (IFR) RTOSINTDLOGINTINT14INT13INT12INT11INT10INT INT8INT7INT6INT5INT4INT3INT2INT Pending :IFR Bit = 1 Absent :IFR Bit = 0  Compiler generates atomic instructions (non-interruptible) for setting/clearing IFR  If interrupt occurs when writing IFR, interrupt has priority  IFR(bit) cleared when interrupt is acknowledged by CPU  Register cleared on reset /*** Manual setting/clearing IFR ***/ extern cregister volatile unsigned int IFR; IFR |= 0x0008;//set INT4 in IFR IFR |= 0x0008;//set INT4 in IFR IFR &= 0xFFF7;//clear INT4 in IFR IFR &= 0xFFF7;//clear INT4 in IFR

4 - 8 Interrupt Enable Register (IER) RTOSINTDLOGINTINT14INT13INT12INT11INT10INT INT8INT7INT6INT5INT4INT3INT2INT Enable: Set IER Bit = 1 Disable: Clear IER Bit = 0  Compiler generates atomic instructions (non-interruptible) for setting/clearing IER  Register cleared on reset /*** Interrupt Enable Register ***/ extern cregister volatile unsigned int IER; IER |= 0x0008;//enable INT4 in IER IER |= 0x0008;//enable INT4 in IER IER &= 0xFFF7;//disable INT4 in IER IER &= 0xFFF7;//disable INT4 in IER

4 - 9 Interrupt Global Mask Bit  INTM used to globally enable/disable interrupts:  Enable:INTM = 0  Disable:INTM = 1 (reset value)  INTM modified from assembly code only: INTM ST1 Bit 0 Bit 0 /*** Global Interrupts ***/ asm(“ CLRC INTM”); //enable global interrupts asm(“ CLRC INTM”); //enable global interrupts asm(“ SETC INTM”); //disable global interrupts asm(“ SETC INTM”); //disable global interrupts

Peripheral Interrupt Expansion - PIE Peripheral Interrupts 12x8 = 96 IFR IER INTM 28xCore 28x Core Interrupt logic PIE module for 96 Interrupts INT1.x interrupt group INT2.x interrupt group INT3.x interrupt group INT4.x interrupt group INT5.x interrupt group INT6.x interrupt group INT7.x interrupt group INT8.x interrupt group INT9.x interrupt group INT10.x interrupt group INT11.x interrupt group INT12.x interrupt group INT1 – INT Interrupts 96 INT1.1 INT1.2 INT INT1 PIEIFR1PIEIER1 Interrupt Group 1 INT13 INT13 (TINT1 / XINT13) INT14 INT14 (TINT2) NMI

PIE Registers INTx.2INTx.3INTx.4INTx.5INTx.6INTx.7INTx.8INTx reserved PIEIFRx register (x = 1 to 12) INTx.2INTx.3INTx.4INTx.5INTx.6INTx.7INTx.8INTx reserved PIEIERx register (x = 1 to 12) reserved PIEACKx PIE Interrupt Acknowledge Register (PIEACK) ENPIE PIEVECT PIECTRL register #include “DSP28_Device.h” PieCtrlRegs.PIEIFR1.bit.INTx4 = 1; //manually set IFR for XINT1 in PIE group 1 PieCtrlRegs.PIEIER3.bit.INTx5 = 1; //enable CAPINT1 in PIE group 3 PieCtrlRegs.PIEACK.all = 0x0004; //acknowledge the PIE group 3 PieCtrlRegs.PIECTRL.bit.ENPIE = 1; //enable the PIE

F2812/10 PIE Interrupt Assignment Table INTx.8INTx.7INTx.6INTx.5INTx.4INTx.3INTx.2INTx.1 INT1WAKEINTTINT0ADCINTXINT2XINT1PDPINTBPDPINTA INT2T1OFINTT1UFINTT1CINTT1PINTCMP3INTCMP2INTCMP1INT INT3CAPINT3CAPINT2CAPINT1T2OFINTT2UFINTT2CINTT2PINT INT4T3OFINTT3UFINTT3CINTT3PINTCMP6INTCMP5INTCMP4INT INT5CAPINT6CAPINT5CAPINT4T4OFINTT4UFINTT4CINTT4PINT INT6MXINTMRINTSPITXINTASPIRXINTA INT7 INT8 INT9SCITXINTBSCIRXINTBSCITXINTASCIRXINTA INT10 INT11 INT12 ECAN0INTECAN1INT

Interrupt Response - Hardware Sequence Note: some actions occur simultaneously, none are interruptible CPU ActionDescription TST0 AHAL PHPL AR1AR0 DPST1 DBSTATIER PC(msw)PC(lsw) Registers  stack14 Register words auto saved 0  IFR (bit)Clear corresponding IFR bit 0  IFR (bit)Clear corresponding IFR bit 0  IER (bit)Clear corresponding IER bit 0  IER (bit)Clear corresponding IER bit 1  INTM/DBGMDisable global ints/debug events 1  INTM/DBGMDisable global ints/debug events Vector  PCLoads PC with int vector address Vector  PCLoads PC with int vector address Clear other status bitsClear LOOP, EALLOW, IDLESTAT Clear other status bitsClear LOOP, EALLOW, IDLESTAT

C28x CPU Timers RESET Timer Reload SYSCLKOUT TCR Bit divide down TDDRH:TDDR 16 - Bit prescaler PSCH:PSC 32 - Bit period PRDH:PRD 32 - Bit counter TIMH:TIM BORROW INT

C28x Timer Interrupt System IFR IER INTM 28xCore 28x Core Interrupt logic PIE unit INT1.7 interrupt INT1 TINT1 / XINT13 TINT1 / XINT13 TINT2 TINT0 INT13 INT14

AddressRegisterName 0x0000 0C00TIMER0TIMTimer 0, Counter Register Low 0x0000 0C01TIMER0TIMHTimer 0, Counter Register High 0x0000 0C02TIMER0PRDTimer 0, Period Register Low 0x0000 0C03TIMER0PRDHTimer 0, Period Register High 0x0000 0C04TIMER0TCRTimer 0, Control Register 0x0000 0C06 TIMER0TPRTimer 0, Prescaler Register 0x0000 0C07 TIMER0TPRHTimer 0, Prescaler Register High 0x0000 0C08TIMER1TIMTimer 1, Counter Register Low 0x0000 0C09TIMER1TIMHTimer 1, Counter Register High 0x0000 0C0ATIMER1PRDTimer 1, Period Register Low 0x0000 0C0BTIMER1PRDHTimer 1, Period Register High 0x0000 0C0CTIMER1TCRTimer 1, Control Register 0x0000 0C0DTIMER1TPRTimer 1, Prescaler Register 0x0000 0C0FTIMER1TPRHTimer 1, Prescaler Register High 0x0000 0C10 to 0C17 Timer 2 Registers ; same layout as above C28x Timer Registers

C28x Timer Control Registers TIMERxTCR Emulator Interaction 1x = run free 0 reservedTRB reserved TSSreserved TIEreservedFREE reservedSOFTreserved TIF Timer Stop Status 0 = start / 1 = stop Timer Reload Bit 1 = reload Timer Interrupt Flag Write 1 clear bit Timer Interrupt Enable Write 1 to enable INT