Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes

Similar documents
Course Introduction. Purpose: Objectives: Content: Learning Time:

This course provides an overview of the SH-2 32-bit RISC CPU core used in the popular SH-2 series microcontrollers

Data Transfer between On-chip RAM Areas with DMAC (Burst Mode) 1. Introduction Description of Sample Application... 3

Interrupt/Timer/DMA 1

8051 Microcontroller

Purpose This course provides an overview of the SH-2A 32-bit RISC CPU core built into newer microcontrollers in the popular SH-2 series

Module Introduction. PURPOSE: The intent of this module is to explain MCU processing of reset and interrupt exception events.

ELC4438: Embedded System Design ARM Cortex-M Architecture II

Chapter 2. Overview of Architecture and Microcontroller-Resources

These three counters can be programmed for either binary or BCD count.

Offering compact implementation of sophisticated, high-performance telematics products and industrial equipment, and short development times

MICROPROCESSOR BASED SYSTEM DESIGN

8086 Interrupts and Interrupt Responses:

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

Design and Implementation Interrupt Mechanism

Grundlagen Microcontroller Interrupts. Günther Gridling Bettina Weiss

Introduction to Embedded Systems

Introduction to general architectures of 8 and 16 bit micro-processor and micro-controllers

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester

Chapter 7 Central Processor Unit (S08CPUV2)

Description of the Simulator

SECTION 5 PROGRAM CONTROL UNIT

Question Bank Microprocessor and Microcontroller

Efficiency and memory footprint of Xilkernel for the Microblaze soft processor

Microprocessors & Interfacing

Module 3. Embedded Systems I/O. Version 2 EE IIT, Kharagpur 1

Interrupts (I) Lecturer: Sri Notes by Annie Guo. Week8 1

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

EE 308: Microcontrollers

Renesas 78K/78K0R/RL78 Family In-Circuit Emulation

ECE 372 Microcontroller Design Parallel IO Ports - Interrupts. ECE 372 Microcontroller Design Parallel IO Ports - Interrupts

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

Hercules ARM Cortex -R4 System Architecture. Processor Overview

ARM ARCHITECTURE. Contents at a glance:

Hello, and welcome to this presentation of the STM32 Flash memory interface. It covers all the new features of the STM32F7 Flash memory.

MICROPROCESSOR MEMORY ORGANIZATION

Instruction Set Architecture of MIPS Processor

EEL 4744C: Microprocessor Applications. Lecture 7. Part 1. Interrupt. Dr. Tao Li 1

Reading Assignment. Interrupt. Interrupt. Interrupt. EEL 4744C: Microprocessor Applications. Lecture 7. Part 1

V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs

System Reset / C167. Figure 17-1 External Reset Circuitry. Semiconductor Group 17-1

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

Microcontrollers. Microcontroller

EEL 4744C: Microprocessor Applications. Lecture 7. Part 2. M68HC12 Interrupt. Dr. Tao Li 1

SECTION 5 RESETS AND INTERRUPTS

Tutorial Introduction

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director

ME 4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 6

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

The ARM Cortex-M0 Processor Architecture Part-1

5 MEMORY. Overview. Figure 5-0. Table 5-0. Listing 5-0.

COEN-4720 Embedded Systems Design Lecture 4 Interrupts (Part 1) Cristinel Ababei Dept. of Electrical and Computer Engineering Marquette University

Interfacing. Introduction. Introduction Addressing Interrupt DMA Arbitration Advanced communication architectures. Vahid, Givargis

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

QUIZ Ch.6. The EAT for a two-level memory is given by:

Chapter 4. Enhancing ARM7 architecture by embedding RTOS

Chapter 2 Sections 1 8 Dr. Iyad Jafar

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

INTERRUPTS in microprocessor systems

AVR Microcontrollers Architecture

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

SuperH RISC engine Family

Unit DMA CONTROLLER 8257

Interconnects, Memory, GPIO

Types of Interrupts:

Chapter 09. Programming in Assembly

Implementing In-Application Programming on the ADuC702x

ECE251: Thursday September 27

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Today's plan: Announcements General Strategy Microcontroller programming concepts/last bits of assembly Activity 2

EE4390 Microprocessors

DERTS Design Requirements (1): Microcontroller Architecture & Programming

Copyright 2016 Xilinx

Product Update. Errata to Z8 Encore! 8K Series Silicon. Z8 Encore! 8K Series Silicon with Date Codes 0402 and Later

April 4, 2001: Debugging Your C24x DSP Design Using Code Composer Studio Real-Time Monitor

Computer Architecture 5.1. Computer Architecture. 5.2 Vector Address: Interrupt sources (IS) such as I/O, Timer 5.3. Computer Architecture

Interrupts in Zynq Systems

NEC 78K0- Family On-Chip Emulation

Microcontroller basics

3. The MC6802 MICROPROCESSOR

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Interrupt Handling Module No: CS/ES/13 Quadrant 1 e-text

Hello and welcome to this Renesas Interactive module that covers the Independent watchdog timer found on RX MCUs.

Understand the design, features, operation, and application of the Data Transfer Controller (DTC) and DMA Controller (DMAC).

Interrupts and Low Power Features

Microcomputer Architecture and Programming

Hello and welcome to this Renesas Interactive course that covers the Watchdog timer found on RX MCUs.

CISC RISC. Compiler. Compiler. Processor. Processor

ARM Processors for Embedded Applications

Memory Expansion. Lecture Embedded Systems

Programming Embedded Systems

Product Technical Brief S3C2412 Rev 2.2, Apr. 2006


FR Series MCUs with on-chip DMAC

Clock Synchronous Control Module for Serial Flash Memory Access Firmware Integration Technology

Mark II Aiken Relay Calculator

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

Introduction to ARM LPC2148 Microcontroller

COSC 243. Input / Output. Lecture 13 Input/Output. COSC 243 (Computer Architecture)

Transcription:

Course Introduction Purpose: This course provides an overview of the Direct Memory Access Controller and the Interrupt Controller on the SH-2 and SH-2A families of 32-bit RISC microcontrollers, which are members of the SuperH series Objectives: Gain a basic knowledge of the features and operation of the direct memory access controller Learn about the features and operation of the interrupt controller Content: 27 pages 4 questions Learning Time: 20 minutes 1

SuperH Peripheral Functions Microcontrollers for embedded system applications require extensive on-chip peripherals to Minimize system chip count Reduce overall system cost Facilitate small system size, etc. Built-in peripheral functions must Provide required capabilities Deliver needed performance levels Offer design flexibility Maintain a basic commonality within product family, if possible Offer an acceptable cost-benefit compromise, etc. SH7145 SuperH Series Microcontroller SH-2 SuperH 32-bit RISC CPU Multi-function Timer Pulse Unit Compare-Match Timer Watchdog Timer A/D Converter High-performance User Debug Interface Advanced User Debugger Bus Interface I/O Ports Flash Data Transfer Controller Bus State Controller Clock Pulse Generator RAM Direct Memory Access Controller Interrupt Controller User Break Controller Serial Communication Interface

Direct Memory Access Controller Performs data transfers between: External devices with DACK External memory On-chip memory Memory-mapped external I/O On-chip peripheral modules Frees the CPU from handling these data transfers DMAC On-chip Peripherals External Memory Memorymapped I/O On-chip Memory External Devices with DACK So CPU resources can be focused on computational operations SuperH CPU Microcontroller 3

DMAC Features 4 or 8 channels 2 or 4 with external triggering 4GB of address space Transfers of up to 16,777,216 units Byte, word, longword, and 16-byte data transfer units Dual-and single-address modes Processing of transfer requests from External devices On-chip peripherals SCIF x 8 sources IIC3 x 2 sources (supported by SH-2A only) ADC x 2 sources MTU2 x 5 sources CMT x 2 sources (supported by SH-2A only) Software (auto request) Cycle-steal and burst-bus modes Fixed and round-robin priority schemes Interrupts after half or full data transfer 4

Dual-Address Mode Both source and destination are accessed by internal or external addresses Two bus cycles are required for data transfer First bus cycle Second bus cycle 5

Single-Address Mode Both source and destination are external devices One source is accessed by the DACK signal and the other by the address Transfer can be performed in one cycle MCU 6

Supported Data Transfers DMAC Address Mode vs. Transfer Destination Notes: Dual = Dual-address mode; Single = Single address mode A 16-byte transfer is available only for on-chip peripherals that support longword access. 7

PROPERTIES On passing, 'Finish' button: On failing, 'Finish' button: Allow user to leave quiz: User may view slides after quiz: User may attempt quiz: Goes to Next Slide Goes to Slide At any time After passing quiz Unlimited times

Channel Priority When more than one DMAC channel is triggered, channelpriority modes determine the order of transfers. DMAC has two channel priority modes: Fixed The priority among channels remains fixed Two schemes are available: CH0 > CH1 > CH2 > CH3 > CH4 > CH5 > CH6 > CH7 CH0 > CH4 > CH1 > CH5 > CH2 > CH6 > CH3 > CH7 Round robin Priority changes after each unit is transferred Channel of just-completed transfer moves to the position of lowest priority Priority after reset: CH0 > CH1 > CH2 > CH3 > CH4 > CH5 > CH6 > CH7 9

Bus Modes Two bus modes direct the use of the microcontroller s buses Cycle-steal mode Normal Upon completion of a transfer, the bus is given to another bus master (CPU, external bus request, etc.) Bus released for 1 cycle Intermittent (SH-2A series devices only) Upon completion of a transfer, the bus is given to another bus master (CPU, external bus request, etc.) Bus released for 16 or 64 cycles DMAC occupies the bus less frequently Burst mode Fastest way to transfer data DMAC doesn t release the bus until all requested transfers have been completed 10

Interrupt Controller Controls interrupt requests to the CPU Ascertains the priority of interrupt sources Provides key features and functions 16 levels of priority NMI noise-canceller function /IRQOUT pin, which can signal the occurrence of an interrupt Register bank interaction (in SH-2A devices) to save and restore CPU registers at high speed Interrupt Source 2 Interrupt Source 3 Interrupt Source 4.. Interrupt Source 1 INTC Interrupt Source n CPU 11

Exceptions and Interrupts Exceptions are unusual and unexpected occurrences Time and location generally cannot be predicted Example is an Illegal instruction Hardware offers methods to react, recover, and restart Exception sources include: Resets Address errors Illegal instructions TRAPA instructions Interrupts are unusual occurrences that are expected to occur Example is data-byte reception by a serial communications channel CPU can launch a routine to handle the event Interrupt sources include: NMI User Break External IRQ On-chip peripherals

Interrupt Acceptance & Handling INTC accepts interrupt requests according to priority If interrupt request is accepted, interrupt handling process begins: /IRQOUT driven low Status Register pushed on stack and interrupt priority adjusted in CPU status register Program counter pushed onto stack /IRQOUT driven high Address of interrupt service routine read from vector table Interrupt service routine executed High Address Stack grows down Stack 31 0 R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 31 Status Register 0 MQI3I2I1I0ST Global Base Register GBR Vector Base Register VBR Jump Table Base Register TBR MAC Registers MAC H MAC L Procedure Register PR Program Counter PC Low Address

Interrupt Handling Flow 14

PROPERTIES On passing, 'Finish' button: On failing, 'Finish' button: Allow user to leave quiz: User may view slides after quiz: User may attempt quiz: Goes to Next Slide Goes to Slide At any time After passing quiz Unlimited times

SH-2 Series Interrupt Controller 16

SH-2 Interrupt Response Time Number of States NMI, Peripheral Module IRQ Remarks DMAC/DTC active judgment 0 or 1 1 1 state required for interrupt signals for which DMAC/DTC activation is possible Compare identified interrupt 2 3 priority with SR mask level Wait for completion of X ( 0) The longest sequence is for interrupt or sequence currently being address-error processing (X = 4 + m1 + M2 + executed by CPU m3 + m4). If an interrupt-masking instruction follows, the time may be longer Time from start of interrupt 5 + m1 + m2 + m3 exception processing until start of fetch of exception service routine s first instruction Interrupt total: 7 + m1 + m2 + m3 9 + m1 + m3 Response, minimum: 10 12 0.25µs to 0.3µs Time, maximum: 12 + 2 (m1 + m2 + m3) + m4 13 + 2 (m1 + m2 + m3) + m4 0.48µs @ 40MHz Note: m1 m4 are the number of states needed for the following memory accesses: m1: SR save (longword); m2: PC save (longword write); m3: vector address read (longword write); m4: fetch first ISR instruction 17

PROPERTIES On passing, 'Finish' button: On failing, 'Finish' button: Allow user to leave quiz: User may view slides after quiz: User may attempt quiz: Goes to Next Slide Goes to Slide At any time After passing quiz Unlimited times

SH-2A Interrupt Controller 19

SH-2A Register Banks SH-2A CPU has 15 register banks, one for each interrupt priority Register banks save and restore CPU register contents during interrupt handling When bank is full and overflows, the stack can be used SH-2A CPU can generate bank overflow and underflow exceptions 20

SH-2A Interrupt Latency 21

SH-2A Interrupt Response Times 22

Vector Table Complete table contains entries for Exception processing Interrupt processing Entries are always 32 bits wide and longword aligned Vector table entries point to functions with no calling parameters and no return values Vector base register provides a location base for the vector table that helps improve Interrupt processing speed in ROM-less systems Memory access in ROM monitor or bootloader applications Interrupt source Vector Vector table address offset IRQ0 64 0x00000100-0x00000103 IRQ1 65 0x00000104-0x00000107 IRQ2 66 0x00000108-0x0000010B IRQ3 67 0x0000010C-0x0000010F IRQ4 68 0x00000110-0x00000113 IRQ5 69 0x00000114-0x00000117 IRQ6 70 0x00000118-0x0000011B IRQ7 71 0x0000011C-0x0000011F On-chip peripheral modules 72... 255 0x00000120-0x00000123... 0x000003FC-0x000003FF Vector tables can be 0x400 bytes long!

Exception Processing - Resets CPU reads initial values for PC and SP from exception vector table Vector base register is initialized to 0x00000000 Interrupt mask bits of the SR are set to maximum (all interrupts masked) Program execution begins at PC value read from exception vector table Two reset types are supported: Power-on reset Reset vector from 0x00000000 SP from 0x00000004 Manual reset (/RES=1, /MRES=0) Reset vector from 0x00000008 SP from 0x0000000C

Exception Processing-Instructions Exceptions can be triggered by instructions TRAPA General illegal (unimplemented) op-code Illegal slots General illegal instruction Instruction that rewrites the PC

PROPERTIES On passing, 'Finish' button: On failing, 'Finish' button: Allow user to leave quiz: User may view slides after quiz: User may attempt quiz: Goes to Next Slide Goes to Slide At any time At any time Unlimited times

Course Summary Direct memory access controller Interrupt controller 27