CORTEX-M0 Structure Discussion 2 – Core Peripherals

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Exceptions. Exception Types Exception Handling Vectoring Interrupts Interrupt Handlers Interrupt Priorities Interrupt applications 6-2.
Developing a Generic Hard Fault handler for ARM Cortex-M3/Cortex-M4
Exceptional Control Flow Processes Today. Control Flow Processors do only one thing: From startup to shutdown, a CPU simply reads and executes (interprets)
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
I/O Unit.
CSCI 4717/5717 Computer Architecture
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
LOGO Chapter 1 Interrupt handling. hardware interrupt Under x86, hardware interrupts are called IRQ's. When the CPU receives an interrupt, it stops whatever.
1 Interrupts INPUT/OUTPUT ORGANIZATION: Interrupts CS 147 JOKO SUTOMO.
INPUT/OUTPUT ORGANIZATION INTERRUPTS CS147 Summer 2001 Professor: Sin-Min Lee Presented by: Jing Chen.
Midterm Wednesday 11/19 Overview: 25% First Midterm material - Number/character representation and conversion, number arithmetic - DeMorgan’s Law, Combinational.
What are Exception and Interrupts? MIPS terminology Exception: any unexpected change in the internal control flow – Invoking an operating system service.
Cortex-M3 Debugging System
Interrupts. 2 Definition: An electrical signal sent to the CPU (at any time) to alert it to the occurrence of some event that needs its attention Purpose:
Exception and Interrupt Handling
Embedded Systems 7763B Mt Druitt College of TAFE
Introduction to Embedded Systems
Lecture 23: LM3S9B96 Microcontroller - Interrupts.
MICROPROCESSOR INPUT/OUTPUT
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Introduction to Embedded Systems Rabie A. Ramadan 6.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 part 4 Exceptions.
Department of Electrical Engineering, National Taiwan Ocean University ARM Cortex-M0 Introduction 3/1/2012 Richard Kuo Assistant Professor.
Interrupt.
ARM Cortex-M0 August 23, 2012 Paul Nickelsberg Orchid Technologies Engineering and Consulting, Inc. CORTEX-M0 Structure Discussion.
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
Z80 Overview internal architecture and major elements of the Z80 CPU.
AT91 Interrupt Handling. 2 Stops the execution of main software Redirects the program flow, based on an event, to execute a different software subroutine.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
6-1 Infineon 167 Interrupts The C167CS provides 56 separate interrupt sources that may be assigned to 16 priority levels. The C167CS uses a vectored interrupt.
System Integration Module MTT Motoola SYSTEM INTEGRATION MODULE (SIM)
9/20/6Lecture 3 - Instruction Set - Al1 Exception Handling.
Renesas Electronics America Inc. © 2011 Renesas Electronics America Inc. All rights reserved. RX Interrupt Control Unit (ICU) Ver
CS-280 Dr. Mark L. Hornick 1 Sequential Execution Normally, CPU sequentially executes instructions in a program Subroutine calls are synchronous to the.
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.
Cortex-M3 Exceptions RTLAB. Hyeonggon Jo.  Exceptions Exception types & priority Abort model SVC and PendSV  Interrupt operation Pre-emption & Exit.
Interrupt 마이크로 프로세서 (Micro Processor) 2015년 2학기 충북대학교 전자공학과 박 찬식
Exceptions and Interrupts Chap 7, 8 Tae-min Hwang.
Computer System Structures Interrupts
-Low Power and System Control Features
ARM Cortex M3 & M4 Chapter 4 - Architecture
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Interrupt and Exception Programming
68HC11 Interrupts & Resets.
Microprocessor Systems Design I
Timer and Interrupts.
Anton Burtsev February, 2017
ARM Cortex-M3 RTLAB 박 유 진.
Interrupts In 8085 and 8086.
Interrupt and Exception Programming
Interrupt and Exception Programming
Interrupt and Exception Programming
Module 2.2 COP4600 – Operating Systems Richard Newman
Computer System Overview
Lecture 18 Interrupt 동국대학교 홍유표.
Interrupt and Exception Programming
COMPUTER PERIPHERALS AND INTERFACES
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Interrupt and Exception Programming
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
ARM Cortex-M0 The 8 / 32-Bit Difference
CORTEX-M0 Structure Discussion 1
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Computer System Overview
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

CORTEX-M0 Structure Discussion 2 – Core Peripherals ARM Cortex-M0 CORTEX-M0 Structure Discussion 2 – Core Peripherals August 22, 2012 Paul Nickelsberg Orchid Technologies Engineering and Consulting, Inc. www.orchid-tech.com

Cortex-M0 Structure Discussion 2 – Core Peripherals Topics Today CORTEX-M0 SYSTICK Core Peripheral CORTEX-M0 NVIC Core Peripheral CORTEX-M0 SCB Core Peripheral

Cortex-M0 Core Peripherals Cortex-M0 32 Bit CPU SYSTICK NVIC SCB Core Peripherals are Common to All Cortex Devices

Core Peripheral Memory Map Memory Region Usage Memory Attribute XN Memory Region Start Memory Region Stop Device Access Device 0xE0100000 0xFFFFFFFF Private Peripheral Strongly Ordered 0xE0000000 0xE00FFFFF External Device 0xA0000000 0xDFFFFFFF External Memory Normal -- 0x60000000 0x9FFFFFFF Internal Peripheral 0x40000000 0x5FFFFFFF Internal SRAM 0x20000000 0x3FFFFFFF Internal Code Execute 0x00000000 0x1FFFFFFF

Core Peripheral Memory Map Memory Region Start Memory Region Stop Nested Vector Controller (NVIC) 0xE000EF00 0xE000EF03 System Control Block (SCB) 0xE000ED00 0xE000ED3F 0xE000E100 0xE000E4EF SysTick Timer (STK) 0xE000E010 0xE000E01F 0xE000E008 0xE000E00F

SYSTICK Core Peripheral Cortex-M0 CPU System Clock SysTick Interrupt 24-Bit Reload Register IRQ Control Register 24-Bit Down Counter

SYSTICK Core Peripheral P e r i o d i c I n t e r r u p t s time Time interval = Reload Count / Clock Frequency

SYSTICK Core Peripheral Simple Periodic Interval Timer Identical Structure in Cortex-M0, M3, M4 Settable Interrupt Priority 24-Bit Counter Width Count Enable Control Interrupt Enable Control

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is an Interrupt Controller? INSTRUCTION Normal Program Flow Instruction Proceed in Sequence

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is an Interrupt Controller? INSTRUCTION INSTRUCTION Interrupt Event Normal Program Flow Interrupt Service Program Flow Interrupt Return

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is an Interrupt Controller? An Interrupt Controller manages the process of interrupting normal program flow upon receipt of an interrupt event Interrupt Entry: Push Stack Frame Fetch Interrupt Vector Interrupt Exit: Pop Stack Frame Resume normal program execution

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Vectored’ Interrupt Controller? Vector Table contains Start Address of Interrupt Service Routine Vector Table Interrupt Controller Interrupt Service Routine 2 VECTOR 0 VECTOR 1 VECTOR 2 VECTOR 3 VECTOR 4 VECTOR 5 VECTOR 6 VECTOR 7 VECTOR 8 VECTOR N Interrupt Service Routine 8 Individual Interrupts Interrupt Service Routine 4 Interrupt Service Routine 6

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Vectored’ Interrupt Controller? An Interrupt Vector is a unique 32-Bit value which is set to the Start Address of an Interrupt Service Routine Interrupt Vectors are Stored in a Sequential Table of Vectors Vectored Interrupts have low latency

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Vectored’ Interrupt Controller? Exception Number IRQ Number Vector Offset Initial Stack Value 0x00 1 Reset Vector 0x04 2 -14 NMI Vector 0x08 3 -13 Hard Fault Vector 0x0C 4 RESERVED 5 6 7 8 9 10 11 -5 SVCall Vector 0x2C 12 13 14 -2 PendSV Vector 0x38 15 -1 SYSTICK Vector 0x3C 16 IRQ0 Vector 0x40 17 IRQ1 Vector 0x44 18 IRQ2 Vector 0x48 47 31 IRQ31 Vector 0xBC

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Vectored’ Interrupt Controller? NOT VECTORED VECTORED Normal Program Flow Normal Program Flow Has extra steps longer latency Receive Interrupt Receive Interrupt Branch to Global Service Routine Service Unique Interrupt Service Unique Interrupt Determine Unique Interrupt Return to Normal Program Flow Return to Normal Program Flow Older ARM7 Style New CORTEX Style

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Nested’ Vectored Interrupt Controller? Low Priority High Priority INSTRUCTION INSTRUCTION INSTRUCTION Interrupt Event Interrupt Event Normal Program Flow Interrupt Service Program Flow Interrupt Service Program Flow Interrupt Return Interrupt Return

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Nested’ Vectored Interrupt Controller? Nested Interrupt Support Individual Interrupts have Priority Higher Priority Interrupt will Preempt Lower Lower or Equal Priority Interrupt will Wait Interrupt Tail Chaining to Reduce Latency Interrupt Late Arriving to Reduce Latency

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Nested’ Vectored Interrupt Controller? Interrupt Types Interrupt Priority Reset Highest Priority -3 Non Maskable Interrupt (NMI) Priority -2 Hard Fault Priority -1 SVCall Configurable Priority PendSV SysTick Interrupt (IRQ0 - 31)

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Nested’ Vectored Interrupt Controller? Interrupt Preemption Higher Priority Interrupt preempts lower priority interrupt Interrupt Tail Chaining At completion of interrupt, it another interrupt event has occurred, then stack pop is skipped and new interrupt service starts Interrupt Late Arriving If low priority interrupt begins and while saving the stack frame a higher priority interrupt occurs, then higher priority interrupt will execute first.

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Nested’ Vectored Interrupt Controller? Int Push Stack Frame Service Interrupt Pop Stack Frame Normal program flow Normal program flow Int 1 Int 2 Service Interrupt 1 Service Interrupt 2 Service Interrupt 1 Push Stack Frame 1 Push Stack Frame 2 Pop Stack Frame 2 Pop Stack Frame 1 Normal program flow Normal program flow Interrupt Preemption – Int 2 Higher Priority Than Int 1

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Nested’ Vectored Interrupt Controller? Int Push Stack Frame Service Interrupt Pop Stack Frame Normal program flow Normal program flow Int 1 Int 2 Service Interrupt 2 Push Stack Frame Service Interrupt 1 Pop Stack Frame Normal program flow Normal program flow Interrupt Tail Chaining – Int 1 Higher or Equal Priority Than Int 2

Nested-Vectored Interrupt Controller NVIC Core Peripheral What is a ‘Nested’ Vectored Interrupt Controller? Int Push Stack Frame Service Interrupt Pop Stack Frame Normal program flow Normal program flow Int 1 Int 2 Service Interrupt 1 Push Stack Frame Service Interrupt 2 Pop Stack Frame Normal program flow Normal program flow Interrupt Late Arriving – Int 2 Higher Priority Than Int 1

SCB Core Peripheral Register Set which provides system implementation and system control functions CPU ID Register Interrupt Control and State Register Application Interrupt and Reset Control Register System Control Register Configuration Control Register System Handler Priority Registers

Cortex-M0+ Peripheral MPC Core Peripheral Memory Protection Unit CORTEX-M0+ Eight Separate Regions CORTEX-M0+ Overlapping Regions CORTEX-M0+ Background Regions

Meaning and Implications 32 Bit CORTEX-M0 Processing Capability Sophisticated NVIC Interrupt Control Low Latency Interrupt Features Vectoring, Preemption, Chaining, Late Arrival Core Control Features Memory Protection Unit 8 Bit Architecture Processor Architecture – 8 Bit World to 32 Bit World