Designing ARM Cortex-M0 Processor into a Mixed Signal Application. Shyam Sadasivan

Similar documents
Get Better Code Density than 8/16 bit MCU s NXP LPC1100 Cortex M0. Oct 2009

Overview of the Cortex-M3

The ARM Architecture. With a focus on v7a and Cortex-A8

Software based Finite State Machine (FSM) with general purpose processors

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Embedded Development Tools

Designing a System-on-Chip (SoC) with an ARM Cortex -M Processor

World-wide University Program

Migrating Application Code from ARM Cortex-M4 to Cortex-M7 Processors

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

Cortex -M0 Devices. Generic User Guide. Copyright 2009 ARM Limited. All rights reserved. ARM DUI 0497A (ID112109)

THUMB Instruction Set

ZigBee Technology Overview

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

ARM Ltd 110 Fulbourn Road, Cambridge, CB1 9NJ, UK.

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

7a. System-on-chip design and prototyping platforms

ARM-Architektur. Toni Reber Redacom AG, 2560 Nidau.

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

Chapter 13. PIC Family Microcontroller

ARM Processors and the Internet of Things. Joseph Yiu Senior Embedded Technology Specialist, ARM

STM32L. Ultra-low-power Cortex -M3 devices

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

ARM Cortex-M3 Introduction. ARM University Relations

Wireless Microcontrollers for Environment Management, Asset Tracking and Consumer. October 2009

The new 32-bit MSP432 MCU platform from Texas

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

UNIT 4 Software Development Flow

Exception and Interrupt Handling in ARM

Lab Experiment 1: The LPC 2148 Education Board

An Introduction to the ARM 7 Architecture

Embedded Component Based Programming with DAVE 3

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

Cortex -M3. Technical Reference Manual. Revision: r1p1. Copyright 2005, 2006 ARM Limited. All rights reserved. ARM DDI 0337E

1) The Keil Blinky example: 6

Adding WiFi to Your Embedded System. WPG Americas & Gainspan Titus Wandinger (WPG) & Su Li (Gainspan) April 23, 2013

AN10866 LPC1700 secondary USB bootloader

Building A RISC Microcontroller in an FPGA

Developing Embedded Applications with ARM Cortex TM -M1 Processors in Actel IGLOO and Fusion FPGAs. White Paper

How To Design A Single Chip System Bus (Amba) For A Single Threaded Microprocessor (Mma) (I386) (Mmb) (Microprocessor) (Ai) (Bower) (Dmi) (Dual

ARM Microprocessor and ARM-Based Microcontrollers

Am186ER/Am188ER AMD Continues 16-bit Innovation

Which ARM Cortex Core Is Right for Your Application: A, R or M?

Programmazione Microcontrollori

System Design Issues in Embedded Processing

Cortex-A9 MPCore Software Development

Hello and welcome to this presentation of the STM32L4 Firewall. It covers the main features of this system IP used to secure sensitive code and data.

DesignWare IP for IoT SoC Designs

Keil C51 Cross Compiler

Application Note 179. Cortex -M3 Embedded Software Development. Released on: March Copyright All rights reserved.

Development With ARM DS-5. Mervyn Liu FAE Aug. 2015

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Building Blocks for PRU Development

Pre-tested System-on-Chip Design. Accelerates PLD Development

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

Implementation Details

Interrupt handling. Andrew N. Sloss

Architectures, Processors, and Devices

All Programmable Logic. Hans-Joachim Gelke Institute of Embedded Systems. Zürcher Fachhochschule

ARM Architecture. ARM history. Why ARM? ARM Ltd developed by Acorn computers. Computer Organization and Assembly Languages Yung-Yu Chuang

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Atmel Norway XMEGA Introduction

A Choices Hypervisor on the ARM architecture

Silabs Ember Development Tools

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Multitasking ARM-Applications with uvision and RTX

SmartFusion csoc: Basic Bootloader and Field Upgrade envm Through IAP Interface

An introduction to nxpusblib. March 2012

Infineon XMC4000: Cortex -M4 Lab

Using DAVE with MDK Version 5

FLYPORT Wi-Fi G

Using the CoreSight ITM for debug and testing in RTX applications

PAC52XX Clock Control Firmware Design

PM0056 Programming manual

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Palaparthi.Jagadeesh Chand. Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P.

USER GUIDE EDBG. Description

USB 3.0 Connectivity using the Cypress EZ-USB FX3 Controller

Smartphone Quick-Jack Solution FASTER TO PRODUCT FASTER TO MARKET

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

How To Use Nuc123 (Nuc123) For A Week

This idea could limit unnecessary visits and help developing countries to provide healthcare remotely as well.

Selecting the Right MCU Can Squeeze Nanoamps out of Your Next Internet of Things Application

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Architekturen und Einsatz von FPGAs mit integrierten Prozessor Kernen. Hans-Joachim Gelke Institute of Embedded Systems Professur für Mikroelektronik

ARM Cortex -A8 SBC with MIPI CSI Camera and Spartan -6 FPGA SBC1654

SoC IP Interfaces and Infrastructure A Hybrid Approach

Motor Control using NXP s LPC2900

ARM Cortex STM series

Radio sensor powered by a mini solar cell the EnOcean STM 110 now functions with even less light

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

Applying the Benefits of Network on a Chip Architecture to FPGA System Design

ARM Cortex-A9 MPCore Multicore Processor Hierarchical Implementation with IC Compiler

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

Freescale Semiconductor, I

Transcription:

Designing ARM Cortex-M0 Processor into a Mixed Signal Application Shyam Sadasivan 1

Analog Mixed Signal Requirement Digital Analog Analog MCU 2

Broader Market Challenges 8/16-bit running out of performance headroom As complexity rises so does frequency and memory requirement Need for greater energy efficiency Wireless sensors, motor control, metering Increased features at lower cost Increasing connectivity (e.g. USB, Ethernet, 802.15, NFC) Drive for increased code reuse and more richer tools environment Analog devices with increased processing and communication needs 3

ARM Cortex-M0 Processor Wake up Interrupt Controller Efficient 3-stage Processor Pipeline Nested Vectored Interrupt Controller Thumb-2 code density technology Optional CoreSightcompliant Debug Single AHB-Lite Master Interface 4

Cortex-M0 Processor Benefits Energy efficiency Lower energy costs Ease of use Lower software costs Low power implementation Sleep mode support Wake-up Interrupt Controller Increased intelligence at node Broad tools and OS support Binary compatible roadmap Pure C target High performance Competitive products 32-bit RISC architecture High efficiency processor cores Integrated Interrupt Controller (NVIC) Reduced system cost Lower silicon costs Thumb -2 code density Area optimised designs CoreSight support 5

Instruction Set Architecture Thumb 32-bit operations in 16-bit instructions Introduced in the ARM7TDMI processor ( T stands for Thumb) Subsequently supported in every ARM processor developed since Thumb-2 Enables a performance optimised blend of 16/32-bit instructions All processor operations can all be handled in Thumb state Supported across the Cortex-M processor range Thumb instruction set upwards compatibility Thumb ARM7 ARM9 Cortex-M0 Cortex-M3 Cortex-M4 Cortex-R4 Cortex-A9 6

Cortex-M0 Instructions Simple 16-bit Thumb ISA from ARM7TDMI Just 56 instructions, all with guaranteed execution time 8, 16 or 32-bit data transfers possible in one instruction Thumb User assembly code, compiler generated Thumb-2 System, OS ADC ADD ADR AND ASR B NOP BIC BL BX CMN CMP SEV WFE EOR LDM LDR LDRB LDRH LDRSB WFI YIELD LDRSH LSL LSR MOV MUL MVN DMB ORR POP PUSH ROR RSB SBC DSB STM STR STRB STRH SUB SVC ISB TST BKPT BLX CPS REV REV16 MRS REVSH SXTB SXTH UXTB UXTH MSR Thumb instructions present in ARM7TDMI 7

Program Registers All registers are 32-bit wide The same as ARM7TDMI and other ARM processors Instructions exist to efficiently support packed 8/16/32-bit data in memory 13 general purpose registers Registers r0 r7 (Low registers) Registers r8 r12 (High registers) Only 3 registers with special meaning/usage Stack Pointer (SP) r13 Link Register (LR) r14 Program Counter (PC) r15 r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 (SP) r14 (LR) r15 (PC) xpsr 8

Programmer s Model Memory Map 0xFFFFFFFF 0xE0000000 0xA0000000 0x60000000 0x40000000 0x20000000 0x00000000 System region Device region RAM region Peripheral region SRAM region CODE region Off chip peripherals Off chip memory peripherals SRAM Program flash System components (NVIC) debug components 4GB linear memory space Standard across all Cortex-M implementations for consistency and code portability Divided in to regions for better portability No need for complex software paging schemes 9

Nested Vectored Interrupt Controller Very fast interrupt response With less software effort ISR written directly in C Interrupt table is simply a set of pointers to C routines ISRs are standard C functions Focus is on ease of programming 8 bit example Cortex-M 1. SJMP/L JMP from vector table to handler 2. PUSH PSW 3. ORL PSW, #00001000b (to switch register bank) 4. Starting real handler code 1. Starting real handler code Integrated NVIC handles: Saving corruptible registers Exception prioritization Exception nesting Tail-chaining 10

Interrupt Handling with NVIC Traditional approach: Exception table Fetch instruction to branch Top-level handler Routine handles re-entrancy IRQVECTOR LDR PC, IRQHandler.. IRQHandler PROC STMFD sp!,{r0-r4,r12,lr} MOV r4,#0x80000000 LDR r0,[r4,#0] SUB sp,sp,#4 CMP r0,#1 BLEQ C_int_handler MOV r0,#0 STR r0,[r4,#4] ADD sp,sp,#4 LDMFD sp!,{r0-r4,r12,lr} SUBS pc,lr,#4 ENDP ARM Cortex-M family: NVIC automatically handles Saving corruptible registers Exception prioritization Exception nesting ISR can be written directly in C Pointer to C routine at vector ISR is a C function Faster interrupt response With less software effort WFI and Sleep On Exit provide further flexibility 11

Debug Debug Extensions Optional CoreSight -technology compliant debug CoreSight is a flexible standard debug system developed by ARM for SoC and microcontrollers CoreSight supports both invasive and non-invasive debug: Single stepping support Debugger has background access to all memory and registers Profiling support to help to optimize code Debug Breakpoint and Watchpoint Unit Debugger Interface Breakpoints for instruction comparison Maximum of 4 instruction comparators are supported Data Watchpoints for data comparison Up to 2 hardware comparators are supported 12

Optimised Debug with 2-pin SWD Debug Access Port JTAG or Serial Wire Cortex-M0 integration Cortex-M0 DAP Bus BPU DWT Processor core Break Point Unit Data Watchpoint Core debug support (halt, single step, etc) Debugger (e.g. μvision) USB In-Circuit Debugger (e.g. ULINK2) JTAG or Serial Wire ROM / Flash SRAM Peripherals Additional test logic Microcontroller Targeted embedded system Debugger access to memory, peripherals and optional test logic The recommended 2 pin debug solution: Optimised to access memory mapped debug devices Tested and supported with ARM deliverables Silicon proven since 2004 Widely supported by a large debug tool ecosystem 13

An Example AMBA AHB-Lite System ARM Processor APB UART Optional External Memory Interface AHB-Lite APB Bridge Timers Keypad On-chip RAM, AHB-lite ROM or FLASH Single Master Simple Slaves No retry or split responses Standard AHB modules can be used Allows easier module design/debug GPIO Single clock edge operation Uni-directional busses No tri-state signals Good for synthesis Allows burst transfers Pipelined operation Very low gate count for simple systems 14

ARM Cortex-M0 AMBA System Example PMU Reset Controller power control interface interrupts GPIO 2 ARM Cortex-M0 AMBA AHB-lite Interconnect APB Bridge GPIO 1 GPIO 0 SRAM ctrl On-chip ROM ctrl On-chip AHB Default Slave Example ROM tables Reserved Private Peripheral Bus AHB default slave GPIO 2 GPIO 1 GPIO 0 AHB default slave Memory SRAM AHB default slave Memory ROM Example memory map 0xFFFFFFFF 0xF0001FFF 0xF0000000 0xE0100000 0xE0000000 0x40001800 0x40001000 0x40000800 0x40000000 0x20100000 0x20000000 0x00100000 0x00000000 RAM ROM Example system provided as part of the processor package Integration and implementation guide and C source files for integration test Includes example AMBA AHB-lite single master, single layer interconnect Includes example GPIO, zero wait-state SRAM/ROM ctrl, PMU components 15

ARM Cortex-M0 State Machine Example software state machine implementation Events communicated via IRQ lines Interrupt context saving behaviour bypassed to reduce latency Core placed into low power Wait For Event state (WFE) A WFE A WFE LDR r0,[intpend] TST r0,#1 BEQ eventc B.eventB B C.eventB.eventC Event B within 3 cycles Event B within 7 cycles Event C within 9 cycles 16

Hardware State Machine to Software Cortex-M0 has just 56 instructions, and is C-friendly Broad ecosystem of development tools, RTOS and middleware Several routes from hardware to software state machine Hardware (HDL) or Abstract State machine Graphical Input tools High-level Language Assembler Object into System memory UML C/C++ OBJ System 17

Keil Development Tools for Cortex-M0 18

Cortex-M0 Processor Support Cortex-M0 support in Keil MDK v4.11 Compiler, simulator and debugger New µvision4 IDE MicroLib library Reduced code size for embedded applications ~50% typical code size saving CMSIS compliant Common interface standard for Cortex-M devices Applications, peripherals, RTOS, and middleware Cortex-M0 device support Includes start-up code and Flash programming algorithms Complete device simulation possible using an open API Examples, templates, and Board Support Packages (BSPs) 19

Cortex-M0 RTOS and Library Support Running an RTOS on a mixed signal device may seem overkill but The footprint may only be 1 to 2K bytes A simple schedule could make firmware development easier Many optimized solutions available: RTOS with scheduling and task management facilities Library support for USB, TCP/IP, File System & CAN Focus on application development RTX & RL-ARM offer reliable scheduling low-level operations Co-developed with Cortex-M0 Integrated support in MDK-ARM 20

Cortex-M0 Starter Kits MDK evaluation CD and ULINK-ME included to offer user fully functional development environment. RealView MDK (Eval) ULINK-ME Example Portfolio (optional) Development Board 21

Cortex-M0 mbed Evaluation System Very low cost USB / evaluation board Plug it in Appears as USB Disk linking to website No Installation! Save to the board and program runs! Hello World! in 5 minutes http://mbed.org/ Compile a program online 22

ARM Cortex-M0 Configuration Cortex-M0 RTL is highly configurable Tune for your application Consistent programmer s model Software compatibility All tools remain compatible Interrupt options 1, 2, 4, 8, 16, 24 or 32 interrupts Multiplier options Fast or small (1 or 32 cycle) Optional timer SysTick Removable hardware debug 4-2 breakpoints, 2-1 watchpoints JTAG or SWD interface ARM Cortex-M0 r0p0 Base Area (gates) Total smallest usable configuration NVIC, 1 interrupt, small multiply 12.4k ARM Cortex-M0 r0p0 Full Area* (gates) Debug (SWD, 1 watchpt, 2 breakpt) + 4.8k - to 2 watchpt, 4 breakpt + 1.4k NVIC 16 Interrupts configuration + 1.5k - to 32 Interrupts configuration + 1.5k Fast multiplier (1 cycle) + 2.8k System timer + 0.9k WIC (max. configuration of 34 lines) + 0.2k Total 25.5k Gate count numbers at 50MHz targeting 180ULL Metro 10% lower gate count possible on 90G Advantage 23

Physical IP Support for Mixed Signal Attributes Cost sensitive market (Area + time to market + low mask cost) Long battery life (Power: Leakage & Dynamic) Medium Performance on mature processes (e.g. 180nm) CLK CE CEN A [ ] D [ ] WEN [ ] GWEN Q Retention D-Flop Power Gate Power Management Kit Support for retention (low leakage) mode Power gating support On-Chip RAM On-Chip ROM 32 Bit Wide Memory Byte write capability Optimized for Density / Power CLK CE CEN A [ ] D [ ] WEN [ ] GWEN Q Clock Gate Peripherals Via Programmable ROM Reduced re-program costs Optimized Cell Library Optimized for Density / Power Includes clock gating cell 24

T-180uLL Logic Library Overview ARM provides multiple standard cell libraries for the 180uLL process SC9 High Density 9-track library for mainstream applications requiring a balance between speed, area and power Part of Free Library Program with TSMC SC7 Ultra High Density 7-track library for low power, high density (low cost) applications Library architecture optimized for low power applications Large number of drive strengths with very fine granularity Tap-less cell design enables advanced power management features End-user licensable SC7 Ultra High Density Power-Management Kit Provides functionality to actively manage dynamic and leakage power like power gates and retention flip-flops Optional available for SC7 Standard Cell Library, end-user licensable 25

Cortex-M Low Power Technologies All Cortex-M processors are specifically designed for low power, with a range of complementary technologies including: Integrated architectural clock gating Sleep and deep sleep modes: Puts the processor into a low-power state with flexible software control Sleep-on-exit interrupt handling: Enables the processor to sleep whenever all outstanding Interrupts are complete Wakeup Interrupt Controller (WIC) Enables advanced interrupt-controlled processing Enables nw power consumption in deep sleep mode with instant wakeup 26

SC7 PMK ULP Sleep Modes in Cortex-M ARM Cortex-M family has architected support for sleep states Enables ultra low-power standby operation Critical for extended life battery based applications Includes very low gate count Wake-Up Interrupt Controller (WIC) Cortex-M0 Power Management Unit Deep Sleep NVIC Wake-up WIC Sleep CPU can be clock gated NVIC remains sensitive to interrupts Deep sleep WIC remains sensitive to selected interrupts Cortex-M0 can be put into state retention WIC signals wake-up to PMU Core can be woken almost instantaneously React to critical external events External interrupts Wake-up sensitive Interrupts Use the SC7 PMK to implement ultra-low Power Sleep modes & retention in Cortex-M processors 27

180nm Cortex-M0 Processor using SC7 UHD Ability to obtain best leakage, dynamic power and area trade-off depending on features desired! 28

Advanced Design Flow Support EDA Specification/Package 6.2-130 ARM products are validated with tools from leading EDA vendors 29

Existing Cortex-M3 AMS Devices Several analog plus microcontroller devices available Two ARM Cortex-M3 processor-based product announcements this year so far: Actel SmartFusion Cypress PSoC 5 30

NXP LPC1100 Family Key Features: ARM Cortex-M0 processor 50-MHz operation Nested Vectored Interrupt Controller for fast deterministic interrupts Wakeup Interrupt Controller enables automatic wake from any priority interrupt Three reduced power modes: sleep, deep-sleep, and deep power-down 31

Mocha - Configurable Mixed Signal SoC Another example of Cortex-M0 and analog Triad Semiconductor - Mocha at a Glance Low power, high performance Cortex-M0 Completely configurable mixed signal resources 4-week fabrication, Low NRE, Low risk Configurable Digital IIC, SPI, UART USB, GPIO, PWM FPGA Replacement Custom Digital, Applications Solar Power Micro-Inverter Automatic Meter Reading Implantable Medical Neuro-Stimulation Human Interface Control Low Power, Portable Devices Configurable Analog Op-Amps, Resistors Capacitors, Switches, Transistors Filters, ADCs, DACs Temperature Sensors Custom Analog, 32

Full ARM Cortex-M Processor Family Forget traditional 8/16/32-bit classifications A compatible architecture spanning the embedded application range ARM Cortex-M4 32-bit/DSC applications Efficient digital signal control ARM Cortex-M3 16/32-bit applications Performance efficiency ARM Cortex-M0 8/16-bit applications Low-cost & simplicity 33

Thank You Please visit www.arm.com for ARM related technical details For any queries contact < Salesinfo-IN@arm.com > 34