Interconnects, Memory, GPIO

Similar documents
Introduction to ARM LPC2148 Microcontroller

STM32F7 series ARM Cortex -M7 powered Releasing your creativity

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

Universität Dortmund. ARM Cortex-M3 Buses

STM32F7 series ARM Cortex -M7 powered Releasing your creativity

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

STM32 ARM Cortex TM - M3 Based Product Introduction. Sept 2007

Universität Dortmund. IO and Peripheral Interfaces

Introduction to Microcontrollers

AK-STM32-ETH Development Board

Microcontrollers: Lecture 2 Low power Modes, Buses, Memory, GPIOs. Michele Magno

LPC4370FET256. Features and benefits

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

Copyright 2016 Xilinx

to ARM Cortex TM -M3 October 17, 2007 MCD Application Team

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

8051 Microcontroller

STM32 F0 Value Line. Entry-level MCUs

STM32 Journal. In this Issue:

ATmega128. Introduction

[MG2420] MCU Module Datasheet. (No. ADS0705) V1.0

Welcome to this presentation of the STM32 direct memory access controller (DMA). It covers the main features of this module, which is widely used to

Military Grade SmartFusion Customizable System-on-Chip (csoc)

STM32 MICROCONTROLLER

STM32 MCU family. 32-bit Flash microcontrollers powered by ARM Cortex -M3. June

Product Technical Brief S3C2412 Rev 2.2, Apr. 2006

Getting Started With the Stellaris EK-LM4F120XL LaunchPad Workshop. Version 1.05

AN Migrating to the LPC1700 series

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

AN5123 Application note

Diploma in Embedded Systems

STM bit ARM Cortex MCUs STM32F030 Series

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

Advanced Microcontrollers Grzegorz Budzyń Extras: STM32F4Discovery

STM32 F2 series High performance Cortex M3 MCUs

Product Technical Brief S3C2413 Rev 2.2, Apr. 2006

CN310 Microprocessor Systems Design

Product Technical Brief S3C2416 May 2008

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

Embedded Busses. Large semiconductor. Core vendors. Interconnect IP vendors. STBUS (STMicroelectronics) Many others!

ARM Cortex M3 & General Purpose Input/Output (GPIO)

AT-501 Cortex-A5 System On Module Product Brief

STM32L4 System operating modes

Department of Electronics and Instrumentation Engineering Question Bank

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

WHICH MICRO? What does MCU needs to do in my system? What are the tasks? Dr. Adriana Becker-Gomez

L2 - C language for Embedded MCUs

2-Oct-13. the world s most energy friendly microcontrollers and radios

STM32 MCU family. 32-bit Flash microcontrollers powered by ARM Cortex -M3. August

Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003

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

Memory Expansion. Lecture Embedded Systems

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

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

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

NXP AN11528 sensor Application note

AVR Microcontrollers Architecture

VLSI Design Lab., Konkuk Univ. Yong Beom Cho LSI Design Lab

NXP Microcontrollers Selection Guide

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

Performance line Access line STM32F103VB STM32F101VB STM32F103V8 STM32F101V pins LQFP/BGA LQFP/BGA

Bus AMBA. Advanced Microcontroller Bus Architecture (AMBA)

Hardware Platforms for Embedded Computing

User Manual For CP-JR ARM7 USB-LPC2148 / EXP

Hello, and welcome to this presentation of the STM32 Reset and Clock Controller.

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

Arduino Uno R3 INTRODUCTION

Freedom FRDM-KV31F Development Platform User s Guide

Introducing STM32 L0x Series. April

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

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

STM32: Peripherals. Alberto Bosio November 29, Univeristé de Montpellier

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

STM32F4 Labs. T.O.M.A.S Technically Oriented Microcontroller Application Services V1.07

MICROPROCESSOR BASED SYSTEM DESIGN

Kinetis KE1xF512 MCUs

STM32 Cortex-M3 STM32F STM32L STM32W

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

Product Series SoC Solutions Product Series 2016

ARM Processor Architecture

Z8 Encore! XP F1680 Series 8-Bit Flash Solution with Extended Peripherals

Overview of Microcontroller and Embedded Systems

8051 Microcontroller

Microcontroller basics

Hello, and welcome to this presentation of the STM32 general-purpose IO interface. It covers the general-purpose input and output interface and how

联系人黄生 : QQ: General Description The KN02GxxA series are low-cost 32-bit microcontroller with embedded ARM Cortex -M0 core for i

Buses. Maurizio Palesi. Maurizio Palesi 1

STM32F4 Introduction F1/F2/F4 Comparison Features Highlight

ecog1kg Microcontroller Product Brief

Unlocking the Potential of Your Microcontroller

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

Designing with ALTERA SoC Hardware

STM32G0 MCU Series Efficiency at its Best

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

Lab 1 Introduction to Microcontroller

Xynergy It really makes the difference!

Designing with STM32F2x & STM32F4

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

Basic System Memory Architecture View (Functional)

MeshConnect. Voice over

Transcription:

Interconnects, Memory, GPIO Dr. Francesco Conti f.conti@unibo.it Slide contributions adapted from STMicroelectronics and from Dr. Michele Magno, others

Processor vs. MCU

Pipeline Harvard architecture Separate Instruction & Data buses enable parallel fetch & store Advanced 3-Stage Pipeline Includes Branch Forwarding & Speculation Additional Write-Back via Bus Matrix

Example: STM32 Microcontroller System Core and operating conditions - ARM Cortex -M3-1.25 DMIPS/MHz up to 24 MHz - 2.0 V to 3.6 V range - -40 to +105 C Rich connectivity - 8 communication periphs Advanced analog - 12-bit1.2 µs conversion time ADC - Dual channel 12-bit DAC Enhanced control - 16-bit motor control timer - 6x 16-bit PWM timers CORTEX TM -M3 CPU 24 MHz JTAG/SW Debug Nested vect IT Ctrl 1 x Systick Timer DMA 7 Channels 1 x 16-bit PWM Synchronized AC Timer Up to 16 Ext. ITs 37/51/80 I/Os 1 x SPI 1 x USART/LIN Smartcard/IrDa Modem Control ARM Lite Hi-Speed Bus Matrix / Arbiter (max 24MHz) Bridge ARM Peripheral Bus (max 24MHz) Flash I/F Bridge 64kB - 128kB Flash Memory 8kB SRAM 20B Backup Data Clock Control ARM Peripheral Bus (max 24MHz) 6 x 16-bit Timer 2 x Watchdog (independent & window) 2-channel 12-bit DAC 1 x 12-bit ADC up to16 channels Temperature Sensor Power Supply Reg 1.8V POR/PDR/PVD XTAL oscillators 32KHz + 4~25MHz Int. RC oscillators 40KHz + 8MHz PLL RTC / AWU 1 x CEC 2 x USART/LIN Smartcard / IrDa Modem Control 1 x SPI 2 x I 2 C

Advanced Microcontroller Bus Architecture Advanced Microcontroller Bus Architecture (AMBA) is a standard provided by ARM http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0011a/index.html AHB Advanced High-Performance Bus High performance Pipelined operation Burst transfers Multiple bus masters Split transactions APB Advanced Peripheral Bus Low power Latched address/control Simple interface Suitable for many peripherals

Bus Arbitration: AHB Example Arbiter Master #1 #1 Master #2 Address and control mux #2 Master #3 Write data mux Read data mux #3 #4 Decoder

Bus Arbitration: AHB Example Arbiter Master #1 #1 Master #2 Address and control mux #2 Master #3 Write data mux Read data mux #3 1. Masters #1,2 try to make an access request in the same cycle; #1 to slave #2, #2 to slave #4 Decoder #4

Bus Arbitration: AHB Example Arbiter Master #1 #1 Master #2 Address and control mux #2 Master #3 Write data mux Read data mux #3 2. Only master #2 is granted access by the arbiter and its request is propagated to the slaves Decoder #4

Bus Arbitration: AHB Example Arbiter Master #1 #1 Master #2 Address and control mux #2 Master #3 Write data mux Read data mux #3 3. Only slave #4 which is addressed by master #2 issues a response propagated to the correct master #2 by the decoder Decoder #4

Example: Cortex M3 Core IF Multiply possibilities of bus accesses to SRAM, Flash, Peripherals, DMA BusMatrix added to Harvard architecture allows parallel access Efficient DMA and Rapid data flow Direct path to SRAM through arbiter, guarantees alternating access Harvard architecture + BusMatrix allows Flash execution in parallel with DMA transfer Increase Peripherals Speed for better performance Dual Advanced Peripheral buses (APB) architecture w/ High Speed APB (APB2) up to 72MHz and Low Speed APB (APB1) up to 36MHz Allows to optimize use of peripherals (18MHz SPI, 4.5Mbps USART, 72MHz PWM Timer, 18MHz toggling I/Os)

The Zoo of Memory in MCUs SRAM Volatile memory for runtime execution Fastest access, low amount (usually <100KB, always <1MB) Used in the usual fashion Flash ROM On-chip non-volatile memory used for code or data storage 8-512Kb, about 10k write cycles Bootloader: protected section to upload code in flash Ferroelectric Random Access Memory (FRAM) Forefront of next generation non-volatile memory technology On-chip non-volatile memory faster (50ns) and lower power (250x less) than Flash. External memory Connected via serial (I2C, SPI) or dedicated (FSMC) interface

Memory - Address Space On-Chip Flash/ROM and RAM memory Not only memory: everything is mapped into a single, contiguous address space: All memory, including RAM, Flash/ROM, information memory, special function registers (SFRs), and peripheral registers. Flash / ROM RAM Peripherals Memory Address Description Access End: 0FFFFh Interrupt Vector Table Word/Byte Start: 0FFE0h End: 0FFDFh Flash/ROM Word/Byte 0F800h Start *: 01100h End *: 010FFh 0107Fh Information Memory Start: 01000h (Flash devices only) End: 0FFFh Boot Memory Start: 0C00h (Flash devices only) End *: Start: End: Start: End: Start: End: Start: 09FFh 027Fh 0200h 01FFh 0100h 00FFh 0010h 000Fh 0000h RAM 16-bit Peripheral modules 8-bit Peripheral modules Special Function Registers Word/Byte Word/Byte Word/Byte Word Byte Byte 12

General Purpose I/O Each MCU pin can be used as a General Purpose digital input or output. Input: read binary value of specified pin, used for simple communication with external world (e.g. buttonstate) Can be configured to trigger interrupt Output: set binary value of specified pin (e.g. LED, simple signal trigger)

GPIO - Inside Inputs/Outputs Each pin is independent Ports (out) and Pins (in) are different!!! Output section Input section

GPIO in STM32 The STM32 is well served with general purpose I/O pins, having up to 81 bidirectional I/O pins with interrupt capability. The I/O pins are arranged as five ports each having 16 I/O lines. PA [15:0] PB [15:0] PC [15:0] PD [15:0] PE [15:0] GPIO port A GPIO port B GPIO port C GPIO port D GPIO port E APB2

GPIO General Purpose I/O Avoid floating inputs!!! Use a pull-up/down resistor, GND, or internal programmable logic To Input Logic VCC Button 5.6KW Button produces either Vcc or Floating input. Adding a pull-down resistor fixes it. VCC Button 5.6KW Some ports have internal programmable resistors Port Pin

Microcontroller External Pins Configuration MCUs are often pin-limited Not enough I/O pins for all I/O peripherals and functions!

Microcontroller External Pins Configuration MCUs are often pin-limited Not enough I/O pins for all I/O peripherals and functions! Pins have to be multiplexed (shared) between peripherals and functions

Microcontroller External Pins Configuration MCUs are often pin-limited Not enough I/O pins for all I/O peripherals and functions! Pins have to be multiplexed (shared) between peripherals and functions Most pins can be configured for several functions: As input or output pin As an interrupt pin Setup a pull-up / pull-down internal resistor (NO floating pins!)

Microcontroller External Pins Configuration MCUs are often pin-limited Not enough I/O pins for all I/O peripherals and functions! Pins have to be multiplexed (shared) between peripherals and functions Most pins can be configured for several functions: As input or output pin As an interrupt pin Setup a pull-up / pull-down internal resistor (NO floating pins!) Assigned as general-purpose I/O (GPIO) or to a specific peripheral Digital peripherals such as UARTs, SPIs, I2Cs Analog peripherals such as ADCs or DACs

Microcontroller External Pins Configuration Example to understand how this functionality works in a MCU the specific circuit and register may change wildly between MCUs Memory-Mapped registers Function Select Register PxSEL Interrupt Edge Select Register PxIES Interrupt Enable Register PxIE Interrupt Flag Register PxIFG Direction Register PxDIR PAD 1 Output Register PxOUT Input Register PxIN 7 6 5 4 3 2 1 0

Memory-Mapped Peripherals Suppose our purpose is to blink a LED (i.e., a GPIO pin): GPIOC_LED0_ADDR

Memory-Mapped Peripherals Suppose our purpose is to blink a LED (i.e., a GPIO pin): GPIOC_LED0_ADDR

Memory-Mapped Peripherals Suppose our purpose is to blink a LED (i.e., a GPIO pin): STORE GPIOC_LED0_ADDR,0x1 GPIOC_LED0_ADDR

Memory-Mapped Peripherals Suppose our purpose is to blink a LED (i.e., a GPIO pin): STORE GPIOC_LED0_ADDR,0x1 GPIOC_LED0_ADDR

Memory-Mapped Peripherals Suppose our purpose is to blink a LED (i.e., a GPIO pin): STORE GPIOC_LED0_ADDR,0x1 GPIOC_LED0_ADDR