dui0497a cortex m0 r0p0 generic ug

Download DUI0497A Cortex m0 r0p0 Generic Ug

Post on 01-Dec-2014

62 views

Category:

Documents

13 download

Embed Size (px)

TRANSCRIPT

Cortex -M0 Devices

Generic User Guide

Copyright 2009 ARM Limited. All rights reserved. ARM DUI 0497A (ID112109)

Cortex-M0 DevicesGeneric User Guide Copyright 2009 ARM Limited. All rights reserved.Release Information The following changes have been made to this book.Change History Date 08 October 2009 Issue A Confidentiality Non-Confidential, Unrestricted Access Change First release

Proprietary Notice Words and logos marked with or are registered trademarks or trademarks of ARM Limited in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners. Neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder. The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded. This document is intended only to assist the reader in the use of the product. ARM Limited shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product. Confidentiality Status This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to. Unrestricted Access is an ARM internal classification. Product Status The information in this document is final, that is for a developed product. Web Addresshttp://www.arm.com

ii

Copyright 2009 ARM Limited. All rights reserved. Non-Confidential, Unrestricted Access

ARM DUI 0497A ID112109

Contents Cortex-M0 Devices Generic User Guide

PrefaceAbout this book ............................................................................................ viii Feedback ....................................................................................................... xi

Chapter 1 Chapter 2

Introduction1.1 About the Cortex-M0 processor and core peripherals ................................ 1-2

The Cortex-M0 Processor2.1 2.2 2.3 2.4 2.5 Programmers model .................................................................................... 2-2 Memory model .......................................................................................... 2-12 Exception model ....................................................................................... 2-19 Fault handling ........................................................................................... 2-27 Power management .................................................................................. 2-28

Chapter 3

The Cortex-M0 Instruction Set3.1 3.2 3.3 3.4 3.5 3.6 3.7 Instruction set summary .............................................................................. 3-2 Intrinsic functions ........................................................................................ 3-5 About the instruction descriptions ............................................................... 3-7 Memory access instructions ...................................................................... 3-16 General data processing instructions ........................................................ 3-27 Branch and control instructions ................................................................. 3-45 Miscellaneous instructions ........................................................................ 3-48

ARM DUI 0497A ID112109

Copyright 2009 ARM Limited. All rights reserved. Non-Confidential, Unrestricted Access

iii

Contents

Chapter 4

Cortex-M0 Peripherals4.1 4.2 4.3 4.4 About the Cortex-M0 peripherals ................................................................ 4-2 Nested Vectored Interrupt Controller .......................................................... 4-3 System Control Block ............................................................................... 4-11 Optional system timer, SysTick ................................................................ 4-21

Appendix A

Cortex-M0 OptionsA.1 Cortex-M0 implementation options ............................................................. A-2

Glossary

iv

Copyright 2009 ARM Limited. All rights reserved. Non-Confidential, Unrestricted Access

ARM DUI 0497A ID112109

List of Tables Cortex-M0 Devices Generic User Guide

Table 2-1 Table 2-2 Table 2-3 Table 2-4 Table 2-5 Table 2-6 Table 2-7 Table 2-8 Table 2-9 Table 2-10 Table 2-11 Table 2-12 Table 3-1 Table 3-2 Table 3-3 Table 3-4 Table 3-5 Table 3-6 Table 3-7 Table 3-8 Table 3-9 Table 3-10

Change History ............................................................................................................. ii Summary of processor mode and stack use options ................................................ 2-2 Core register set summary ........................................................................................ 2-3 PSR register combinations ........................................................................................ 2-5 APSR bit assignments .............................................................................................. 2-6 IPSR bit assignments ................................................................................................ 2-7 EPSR bit assignments .............................................................................................. 2-8 PRIMASK register bit assignments ........................................................................... 2-9 CONTROL register bit assignments .......................................................................... 2-9 Memory access behavior ........................................................................................ 2-15 Memory region shareability and cache policies ...................................................... 2-15 Properties of the different exception types .............................................................. 2-20 Exception return behavior ....................................................................................... 2-26 Cortex-M0 instructions .............................................................................................. 3-2 CMSIS intrinsic functions to generate some Cortex-M0 instructions ........................ 3-5 CMSIS intrinsic functions to access the special registers ......................................... 3-6 Condition code suffixes ........................................................................................... 3-15 Memory access instructions .................................................................................... 3-16 Data processing instructions ................................................................................... 3-27 ADC, ADD, RSB, SBC and SUB operand restrictions ............................................ 3-31 Branch and control instructions ............................................................................... 3-45 Branch ranges ......................................................................................................... 3-46 Miscellaneous instructions ...................................................................................... 3-48

ARM DUI 0497A ID112109

Copyright 2009 ARM Limited. All rights reserved. Non-Confidential, Unrestricted Access

v

List of Tables

Table 4-1 Table 4-2 Table 4-3 Table 4-4 Table 4-5 Table 4-6 Table 4-7 Table 4-8 Table 4-9 Table 4-10 Table 4-11 Table 4-12 Table 4-13 Table 4-14 Table 4-15 Table 4-16 Table 4-17 Table 4-18 Table 4-19 Table 4-20 Table 4-21 Table 4-22 Table 4-23 Table A-1

Core peripheral register regions ............................................................................... 4-2 NVIC register summary ............................................................................................ 4-3 CMSIS access NVIC functions ................................................................................. 4-3 ISER bit assignments ............................................................................................... 4-4 ICER bit assignments ............................................................................................... 4-5 ISPR bit assignments ............................................................................................... 4-6 ICPR bit assignments ............................................................................................... 4-6 IPR bit assignments .................................................................................................. 4-7 CMSIS functions for NVIC control .......................................................................... 4-10 Summary of the SCB registers ............................................................................... 4-11 CPUID register bit assignments .............................................................................. 4-12 ICSR bit assignments ............................................................................................. 4-13 AIRCR bit assignments ........................................................................................... 4-16 SCR bit assignments .............................................................................................. 4-17 CCR bit assignments ....................................

Recommended

View more >