ARM Cortex-M0 August 23, 2012 Paul Nickelsberg Orchid Technologies Engineering and Consulting, Inc. www.orchid-tech.com CORTEX-M0 Structure Discussion.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Augusto Panecatl Technical Information and Customer Support
ECE 353 Introduction to Microprocessor Systems
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.
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
Interrupts (contd..) Multiple I/O devices may be connected to the processor and the memory via a bus. Some or all of these devices may be capable of generating.
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
A look at interrupts What are interrupts and why are they needed in an embedded system? Equally as important – how are these ideas handled on the Blackfin.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
LOGO Chapter 1 Interrupt handling. hardware interrupt Under x86, hardware interrupts are called IRQ's. When the CPU receives an interrupt, it stops whatever.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Exception Processing ECE511: Digital System & Microprocessor.
Introduction To The ARM Microprocessor
Chapter 7 Interupts DMA Channels Context Switching.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
A look at interrupts What are interrupts and why are they needed.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
1 Interrupts INPUT/OUTPUT ORGANIZATION: Interrupts CS 147 JOKO SUTOMO.
Introduction to Interrupts
COMP3221 lec28-exception-II.1 Saeid Nooshabadi COMP 3221 Microprocessors and Embedded Systems Lectures 28: Exceptions & Interrupts - II
CHAPTER 9: Input / Output
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
Interrupt Mechanisms in the 74xx PowerPC Architecture Porting Plan 9 to the PowerPC Architecture Ajay Surie Adam Wolbach.
Midterm Wednesday 11/19 Overview: 25% First Midterm material - Number/character representation and conversion, number arithmetic - DeMorgan’s Law, Combinational.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – System Control Refer to Chapter 6 in the reference book “Stellaris® LM3S9B96 Microcontroller.
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.
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
Introduction to Embedded Systems
Exceptions and Interrupts 2
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.
CORTEX-M0 Structure Discussion 2 – Core Peripherals
LPC2148 Programming Using BLUEBOARD
MSP430 Mixed Signal Microcontroller – Parte 2 Afonso Ferreira Miguel Source: slau056d – Texas instruments.
MICROPROCESSOR INPUT/OUTPUT
Introduction to Embedded Systems Rabie A. Ramadan 6.
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 part 4 Exceptions.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Lecture 11 Low Power Modes & Watchdog Timers
The Stack This is a special data structure: –The first item to be placed into the stack will be the last item taken out. Two basic operations: –Push: Places.
Low Power Modes MTT48 V LOW POWER OPERATION.
CSNB374: Microprocessor Systems Chapter 5: Procedures and Interrupts.
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.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the Direct Memory.
Managing Processors Jeff Chase Duke University. The story so far: protected CPU mode user mode kernel mode kernel “top half” kernel “bottom half” (interrupt.
بسم الله الرحمن الرحيم MEMORY AND I/O.
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
Memory system Kang Min Ju. 01 Memory map NVIC : Nested Vector Interrupt Controller MPU : Memory Protection Unit * This arrangement allows:
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학기 충북대학교 전자공학과 박 찬식
-Low Power and System Control Features
AT91 Power Management This training module describes the Power Management options provided by the AT91 family of microcontrollers. These options address.
ARM Cortex M3 & M4 Chapter 4 - Architecture
HCS12 Exceptions Maskable Interrupts
Interrupts and exceptions
Microprocessor Systems Design I
Timer and Interrupts.
Refer to Chapter 5 in the reference book
Interrupts In 8085 and 8086.
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
CORTEX-M0 Structure Discussion 1
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

ARM Cortex-M0 August 23, 2012 Paul Nickelsberg Orchid Technologies Engineering and Consulting, Inc. CORTEX-M0 Structure Discussion 3

Cortex-M0 Structure Discussion 3 Topics Today CORTEX-M0 Power Management CORTEX-M0 Fault Handling CORTEX-M0 Stack Structures CORTEX-M0 SVC/WFE/WFI Instructions

Cortex-M0 Power Management Our discussion focuses on Cortex-M0 Power Management as distinct from additional power management features which may be implemented by a particular device vendor Cortex-M0 Power Management Low Power Instruction Execution Sleep Mode Support Deep Sleep Mode Support Wake-Up Interrupt Controller WFE / WFI Instruction Support Device Specific Power Management Peripheral Power On/Off Control Phase Locked Loop Control Peripheral Clock Source Control Peripheral Clock Rate Control State Saving Registers Real Time Clock Features On-Chip Oscillator Support

Cortex-M0 Power Management Low Power Instruction Execution Approx Current in mA Approx Speed in MHz

Cortex-M0 Power Management Sleep Mode Stops Processor Clock Deep Sleep Mode Stops System Clock, Power off PLL, and Memory Mode Selection made using SCB Register Cortex-M0 Power Modes

Cortex-M0 Power Management WFI Instruction Execution of WFI Instruction causes processor to immediately enter selected sleep mode WFE Instruction Execution of WFE Instruction causes processor to enter selected sleep mode if event bit is set Exit Processor Exception If SLEEPONEXIT bit is set in SCB Register, processor enters selected sleep mode on return from exception to thread mode Cortex-M0 Entry into Power Saving Modes

Cortex-M0 Power Management Wake-Up from WFI or SLEEPONEXIT Upon receipt of Prioritized Interrupt, processor immediately resumes execution of instructions Wakeup from WFE Upon receipt of Prioritized Interrupt or external event signal, processor immediately resumes execution of instructions Wakeup using WIC Upon receipt of Wake-up Interrupt Controller Signal, processor immediately resumes execution of instruction. This feature is optional and when implemented usually applies to Deep Sleep wakeup only Cortex-M0 Exit from Power Saving Modes

Cortex-M0 Power Management Normal Instruction Execution WFI Normal Instruction Execution Sleep IRQ Time Full Pwr Low Pwr

Cortex-M0 Fault Handling HARDFAULT Vector The HARDFAULT Vector catches processor faults Processor Faults SVC Instruction Priority Error BKPT w/o Debugger System Generated Bus Error Attempted execution of instruction in XN Memory Area Attempted execution of undefined instruction Attempted load or store to unaligned address Processor Lockup (Double Fault) Occurs when Fault occurs in NMI or HARDFAULT Handler

Cortex-M0 Fault Handling Normal Instruction Execution Bad Instruction Normal Instruction Execution HardFault RESET Bad Instruction Lock Up Reset or NMI restarts processor HardFault Exception preempts all other exceptions

Cortex-M0 Stack Structure Cortex-M0 Stack pushes data onto the stack from higher to lower addresses SPContent SP + 0x1CPSR SP + 0x18PC SP + 0x14LR SP + 0x10R12 SP + 0x0CR3 SP + 0x08R2 SP + 0x04R1 SP + 0x00R0 SP Here before Interrupt SP Here after Interrupt

Meaning and Implications Processor Architecture – 8 Bit World to 32 Bit World Processing Capability 8 Bit Architecture 32 Bit CORTEX-M0 - Low Power Instruction Execution - Sleep Power Mode - Deep Sleep Power Mode - WFI / WFE Sleep Entry - Fault Handling