ARM Processor Architecture

Similar documents
The ARM Cortex-M0 Processor Architecture Part-1

ARM Architecture and Assembly Programming Intro

ECE 471 Embedded Systems Lecture 2

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

ECE 471 Embedded Systems Lecture 3

Interconnects, Memory, GPIO

ARM Cortex core microcontrollers 3. Cortex-M0, M4, M7

OUTLINE. STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and Pipelining Cortex-M0 Programming Model Toolchain and Project Structure

ARM Ltd. ! Founded in November 1990! Spun out of Acorn Computers

Embedded System Design

ARM architecture road map. NuMicro Overview of Cortex M. Cortex M Processor Family (2/3) All binary upwards compatible

STM32 F0 Value Line. Entry-level MCUs

Universität Dortmund. ARM Architecture

ECE 471 Embedded Systems Lecture 2

STM32F7 series ARM Cortex -M7 powered Releasing your creativity

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

ELC4438: Embedded System Design ARM Cortex-M Architecture II

Chapter 5. Introduction ARM Cortex series

AVR Microcontrollers Architecture

Introduction to ASIC Design

STM32SnippetsL0. STM32L0xx Snippets firmware package. Features. Description

The course provides all necessary theoretical and practical know-how for start developing platforms based on STM32L4 family.

STM32F7 series ARM Cortex -M7 powered Releasing your creativity

Hercules ARM Cortex -R4 System Architecture. Processor Overview

STM32L4+ MCU series Excellence in ultra-low-power with more performance

New STM32 F7 Series. World s 1 st to market, ARM Cortex -M7 based 32-bit MCU

ECE254 Lab3 Tutorial. Introduction to MCB1700 Hardware Programming. Irene Huang

STM32 F-2 series High-performance Cortex-M3 MCUs

Hi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan

ECE 471 Embedded Systems Lecture 2

Hello, and welcome to this presentation of the STM32L4 System Configuration Controller.

The Next Steps in the Evolution of Embedded Processors

STM8L and STM32 L1 series. Ultra-low-power platform

Basic Components of Digital Computer

Chapter 15. ARM MCUs Architecture, Programming and Development Tools

ELCT 912: Advanced Embedded Systems

AND SOLUTION FIRST INTERNAL TEST

Chapter 15 ARM Architecture, Programming and Development Tools

ARM Processors for Embedded Applications

STM32 Cortex-M3 STM32F STM32L STM32W

LPC4370FET256. Features and benefits

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Stm32 Microcontroller General Purpose Timers Tim2 Tim5

NXP Unveils Its First ARM Cortex -M4 Based Controller Family

STM32L4 System operating modes

ATmega128. Introduction

STM32G0 MCU Series Efficiency at its Best

ELC4438: Embedded System Design Embedded Processor

ARM Cortex-M4 Architecture and Instruction Set 1: Architecture Overview

Cortex-M4 Processor Overview. with ARM Processors and Architectures

ARM Cortex core microcontrollers

Introduction to Embedded Programming with ARM Cortex-M3

ARM Processor. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

STM32 Journal. In this Issue:

Contents of this presentation: Some words about the ARM company

AN4809 Application note

STM32 F2 series High performance Cortex M3 MCUs

Copyright 2016 Xilinx

ARM Cortex-M and RTOSs Are Meant for Each Other

ARM Processor. Dr. P. T. Karule. Professor. Department of Electronics Engineering, Yeshwantrao Chavan College of Engineering, Nagpur

AN4624 Application note

Advanced Microcontrollers Grzegorz Budzyń Extras: STM32F4Discovery

STM32 MICROCONTROLLER

ARM Cortex-A9 ARM v7-a. A programmer s perspective Part1

L2 - C language for Embedded MCUs

EE 308: Microcontrollers

Low-Cost Microcontrollers

Lecture 1. Course Overview and The 8051 Architecture

MICROPROCESSOR BASED SYSTEM DESIGN

Basic Computer Architecture

Introduction to ARM LPC2148 Microcontroller

STM bit ARM Cortex MCUs STM32F030 Series

Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be

Computer Architecture Dr. Charles Kim Howard University

Designing with STM32F2x & STM32F4

STM32F429 Overview. Steve Miller STMicroelectronics, MMS Applications Team October 26 th 2015

Microprocessor Systems

ARM ARCHITECTURE. Contents at a glance:

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

Introduction to Embedded Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

STM32F3. Cuauhtémoc Carbajal ITESM CEM 12/08/2013

University of Dayton. Electrical & Computer Engineering. ECE 536 Microprocessor Applications. Dr. Ralph Barrera. Assignment (4)

Xynergy It really makes the difference!

BLE MODULE SPECIFICATIONS

x86 Architectures; Assembly Language Basics of Assembly language for the x86 and x86_64 architectures

Proven 8051 Microcontroller Technology, Brilliantly Updated

Chapter 2 Sections 1 8 Dr. Iyad Jafar

ELC4438: Embedded System Design ARM Embedded Processor

Embedded Systems: Architecture

Design and Implementation Interrupt Mechanism

EEM870 Embedded System and Experiment Lecture 3: ARM Processor Architecture

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Unlocking the Potential of Your Microcontroller

EECS 150 Homework 11 Solutions Fall 2008

Computer Organization Laboratory. Class Notes. Instructor: Ken Q. Yang Dept. of ECE, URI

EE4144: ARM Cortex-M Processor

AT-501 Cortex-A5 System On Module Product Brief

Kinetis Software Optimization

SoC Platforms and CPU Cores

Introduction to Embedded Systems

Transcription:

Chapters 1 and 3 ARM Processor Architecture Embedded Systems with ARM Cortext-M Updated: Monday, February 5, 2018

A Little about ARM The company Originally Acorn RISC Machine (ARM) Later Advanced RISC Machine Then it became ARM Ltd owned by ARM Holdings (parent company) In 2016 SoftBank bought ARM for $31 billion ARM: Develops the architecture and licenses it to other companies Other companies design their own products that implement one of those architectures including systemson-chips (SoC) and systems-on-modules (SoM) that incorporate memory, interfaces, radios, etc. It also designs cores that implement this instruction set and licenses these designs to a number of companies that incorporate those core designs into their own products. ARM Processors RISC based processors In 2010 alone, 6.1 billion ARM-based processor, representing 95% of smartphones, 35% of digital televisions and set-top boxes and 10% of mobile computers over 100 billion ARM processors produced as of 2017 The most widely used instruction set architecture in terms of quantity produced https://en.wikipedia.org/wiki/arm_architecture

M R https://en.wikipedia.org/wiki/arm_architecture

ARM Family and Architecture CPU

ARM FAMILY TREE CORTEX- CORTEX- CORTEX-

ARM Cortex Processors ARM Cortex-A family: Applications processors Support OS and highperformance applications Such as Smartphones, Smart TV ARM Cortex-R family: Real-time processors with high performance and high reliability Support real-time processing and mission-critical control ARM Cortex-M family: Microcontroller Cost-sensitive, support SoC 6

CORTEX- Cortex-M is a great trade-off between performance, cost, efficiency; used for IoT, various applications. Has on-chip peripherals Core is licensed by ARM Harvard Architecture

CORTEX-M: CORE + Peripherals Core Memory FLASH: Non-Volatile / Instruction memory SRAM/DRAM: Volatile / data memory Processor ALU Processor Control Unit (CPU) Registers Special Purpose Registers General Purpose Registers Buses Data Bus Instruction Bus Bus bridge to connect diff. buses Advanced High-performance Bus (AHB) Advanced Peripheral Bus (APB) GPIO Peripherals ADC LCD Controller SPI I2C Etc.

Core Architecture Von-Neumann Instructions and data are stored in the same memory. Harvard Data and instructions are stored into separate memories. Simple and inexpensive Access to data or instruction, one at a time Faster More energy efficient Different bus sizes 9

Core Architecture Von-Neumann Instructions and data are stored in the same memory. Harvard Data and instructions are stored into separate memories. 10

ARM Simplified Block Diagram System on Chip (SoC) http://www.microdigitaled.com/arm/asm_arm/powerpoints/arm_asm_ppts.htm

ARM Cortex-M4 Organization (STM32L4) Interrupts ` Cortex-M4 Processor Core Interrupt Controller (NVIC) Trace & Debug Interface Processor Control Unit Note that the Kit we are using Has an STM32F401 Single Instruction Multiple Data (DSP) FPU (optional) ALU Instruction Decoder Instruction Fetch Unit Memory Interface SW/JTAG Instruction Bus Memory Protection Unit (MPU) Data Bus System Bus Direction Memory Access (DMA) Controllers AHB Bus Matrix System-on-a-chip Harvard Based Architecture Instructions Data Flash Memory Advanced Highperformance Bus (AHB) AHB to APB Bridge 1 GPIO Port A GPIO Port B GPIO Port C GPIO Port D GPIO Port E GPIO Port F GPIO Port G GPIO Port H SRAM General Purpose IO AHB to APB Bridge 2 LCD TIM2 TIM3 TIM4 TIM6 TIM7 USART2 USART3 USART4 USART5 LPUART1 EXTI WKUP TIM1/PWM TIM8/PWM TIM15 TIM16 TIM17 USART1 SPI2 SPI3 I2C1/SMBUS I2C2/SMBUS I2C3/SMBUS USB 2.0 FS bxcan SWPMI1 LPTIM1 LPTIM2 OpAmp APB1 Advanced Peripheral Bus ABP2 (APB) SPI1 SAI1 SAI2 DFSDM COMP1 COMP2 Firewall 12

Memory Memory is arranged as a series of locations Each location has a unique address Each location holds a byte (byte-addressable) e.g. the memory location at address 0x080001B0 contains the byte value 0x70, i.e., 112 The number of locations in memory is limited e.g. 4 GB of RAM 1 Gigabyte (GB) = 2 30 bytes 2 32 locations è 4,294,967,296 locations! Values stored at each location can represent either program data or program instructions e.g. the value 0x70 might be the code used to tell the processor to add two values together Data 70 BC 18 01 A0 Address 8 bits 32 bits 0xFFFFFFFF 0x080001B0 0x080001AF 0x080001AE 0x080001AD 0x080001AC 13 0x00000000 Memory

Memory Mapping Answer the following questions: What is the size of the EEPROM? What is the size of the Flash? Which Memory portion is non-volatile? What does SRAM generally used for in an ARM core processor? Where is 0x743 address? Where is 0x1000AB address?

ARM Register and ALU 16 Processor Registers 13 for general purpose 3 for specific purpose

Processor Registers Low Registers High Registers 32 bits R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 (SP) R14 (LR) R15 (PC) General Purpose Register R13 (MSP) } Fastest way to read and write } Registers are within the processor chip } A register stores 32-bit value } Cortex M (STM32L) has } R0-R12: 13 general-purpose registers } R13: Stack pointer (Shadow of MSP or PSP) } R14: Link register (LR) } R15: Program counter (PC) } Special registers (xpsr, BASEPRI, PRIMASK, etc.)- more later R13 (PSP) 32 bits xpsr BASEPRI PRIMASK FAULTMASK CONTROL Special Purpose Register 16

Program Execution Program Counter (PC) is a register that holds the memory address of the next instruction to be fetched from the memory. Memory Content ànext Instruction 4770 2000 188B 2201 2100 Memory Address 0x080001B4 0x080001B2 0x080001B0 0x080001AE 0x080001AC PC PC = 0x080001B0 Instruction = 188B or 2000188B or 8B180020 17

Three-state pipeline: Fetch, Decode, Execution Pipelining allows hardware resources to be fully utilized One 32-bit instruction or two 16-bit instructions can be fetched. 1. Fetch instruction at PC address 3. Execute the instruction 2. Decode the instruction Pipeline of 32-bit instructions 18

Loading Code and Data into Memory SRAM 19

ARM Register and ALU

Machine codes are stored in memory r15 r14 r13 r12 r11 r10 r9 r8 r7 r6 r5 r4 r3 r2 r1 r0 Registers pc lr sp ALU CPU Data 4770 2000 188B 2201 2100 Address 0xFFFFFFFF 0x080001B4 0x080001B2 0x080001B0 0x080001AE 0x080001AC 0x00000000 Memory 21

Fetch Instruction: pc = 0x08001AC Decode Instruction: 2100 = MOVS r1, #0x00 r15 r14 r13 r12 r11 r10 r9 r8 r7 r6 r5 r4 r3 r2 r1 r0 0x080001AC Registers pc lr sp ALU CPU Data 4770 2000 188B 2201 2100 Address 0xFFFFFFFF 0x080001B4 0x080001B2 0x080001B0 0x080001AE 0x080001AC 0x00000000 Memory 22

Execute Instruction: MOVS r1, #0x00 r15 r14 r13 r12 r11 r10 r9 r8 r7 r6 r5 r4 r3 r2 r1 r0 0x080001AC 0x00000000 Registers pc lr sp ALU CPU Data 4770 2000 188B 2201 2100 Address 0xFFFFFFFF 0x080001B4 0x080001B2 0x080001B0 0x080001AE 0x080001AC 0x00000000 Memory 23

Fetch Next Instruction: pc = pc + 2 Decode & Execute: 2201 = MOVS r2, #0x01 r15 r14 r13 r12 r11 r10 r9 r8 r7 r6 r5 r4 r3 r2 r1 r0 0x080001AE 0x00000001 0x00000000 Registers pc lr sp ALU CPU Data 4770 2000 188B 2201 2100 Address 0xFFFFFFFF 0x080001B4 0x080001B2 0x080001B0 0x080001AE 0x080001AC 0x00000000 Memory 24

Fetch Next Instruction: pc = pc + 2 Decode & Execute: 188B = ADDS r3, r1, r2 r15 r14 r13 r12 r11 r10 r9 r8 r7 r6 r5 r4 r3 r2 r1 r0 0x080001B0 0x00000001 0x00000001 0x00000000 Registers pc lr sp ALU CPU Data 4770 2000 188B 2201 2100 Address 0xFFFFFFFF 0x080001B4 0x080001B2 0x080001B0 0x080001AE 0x080001AC 0x00000000 Memory 25

Fetch Next Instruction: pc = pc + 2 Decode & Execute: 2000 = MOVS r0, #0x00 r15 r14 r13 r12 r11 r10 r9 r8 r7 r6 r5 r4 r3 r2 r1 r0 0x080001B2 0x00000001 0x00000000 0x00000000 Registers pc lr sp ALU CPU Data 4770 2000 188B 2201 2100 Address 0xFFFFFFFF 0x080001B4 0x080001B2 0x080001B0 0x080001AE 0x080001AC 0x00000000 Memory 26

ARM Applications.

iphone 5 Teardown The A6 processor is the first Apple System-on-Chip (SoC) to use a custom design, based off the ARMv7 instruction set. http://www.ifixit.com 28

iphone 6 Teardown The A8 processor is the first 64- bit ARM based SoC. It supports ARM A64, A32, and T32 instruction set. http://www.ifixit.com 29

iphone 7 Teardown A10 processor: 64-bit system on chip (SoC) ARMv8-A core 30

Apple Watch Apple S1 Processor 32-bit ARMv7-A compatible # of Cores: 1 CMOS Technology: 28 nm L1 cache 32 KB data L2 cache 256 KB GPU PowerVR SGX543 31

Kindle HD Fire Texas Instruments OMAP 4460 dualcore processor http://www.ifixit.com 32

Fitbit Flex Teardown STMicroelectronics 32L151C6 Ultra Low Power ARM Cortex M3 Microcontroller Nordic Semiconductor nrf8001 Bluetooth Low Energy Connectivity IC www.ifixit.com 33

Samsung Galaxy Gear source: ifixit.com STMicroelectronics STM32F401B ARM- Cortex M4 MCU with 128KB Flash 34

Pebble Smartwatch source: ifixit.com STMicroelectronics STM32F205RE ARM Cortex-M3 MCU, with a maximum speed of 120 MHz 35

Oculus VR Facebook s $2 Billion Acquisition Of Oculus in 2014 ST Microelectronics STM32F072VB ARM Cortex-M0 32-bit RISC Core Microcontroller source: ifixit.com 36

HTC Vive STMicroelectronics 32F072R8 ARM Cortex-M0 Microcontroller source: ifixit.com 37

Nest Learning Thermostat source: ifixit.com ST Microelectronics STM32L151VB ultra-low-power 32 MHz ARM Cortex-M3 MCU 38

Samsung Gear Fit Fitness Tracker source: ifixit.com STMicroelectronics STM32F439ZI 180 MHz, 32 bit ARM Cortex-M4 CPU 39

A Little About STM32 STM32 is a family of 32-bit microcontroller integrated circuits by STMicroelectronics The STM32 chips are grouped into related series that are based around the same 32-bit ARM processor core, such as the Cortex-M7F, Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each microcontroller consists of the processor core, static RAM memory, flash memory, debugging interface, and various peripherals. https://en.wikipedia.org/wiki/stm32

STM32 Nucleo Family

Other ARM Chips