samsung s3c2440a microcontroller user's manual

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

S3C2440A
32-BIT CMOS
MICROCONTROLLER
USER'S MANUAL
Revision 1
Important Notice
The information in this publication has been carefully checked and is believed to be entirely accurate at the time of publication. Samsung assumes no responsibility, however, for possible errors or omissions, or for any consequences resulting from the use of the information contained herein. Samsung reserves the right to make changes in its products or product specifications with the intent to improve function or design at any time and without notice and is not required to update this documentation to reflect such changes.
This publication does not convey to a purchaser of semiconductor devices described herein any license under the patent rights of Samsung or others. Samsung makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does Samsung assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability, including without limitation any consequential or incidental damages."Typical" parameters can and do vary in different applications. All operating parameters, including "Typicals" must be validated for each customer application by the customer's technical experts. Samsung products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, for other applications intended to support or sustain life, or for any other application in which the failure of the Samsung product could create a situation where personal injury or death may occur.
Should the Buyer purchase or use a Samsung product for any such unintended or unauthorized application, the Buyer shall indemnify and hold Samsung and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, expenses, and reasonable attorney fees arising out of, either directly or indirectly, any claim of personal injury or death that may be associated with such unintended or unauthorized use, even if such claim alleges that Samsung was negligent regarding the design or manufacture of said product.
S3C2440A 32-Bit CMOS Microcontroller
User's Manual, Revision 1
Publication Number: 21-S3-C2440A-072004
© 2004 Samsung Electronics
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electric or mechanical, by photocopying, recording, or otherwise, without the prior written consent of Samsung Electronics.
Samsung Electronics' microcontroller business has been awarded full ISO-14001
certification (BVQ1 Certificate No. 9330). All semiconductor products are designed and
manufactured in accordance with the highest quality standards and objectives.
Samsung Electronics Co., Ltd.
San #24 Nongseo-Ri, Giheung- Eup
Yongin-City, Gyeonggi-Do, Korea
C.P.O. Box #37, Suwon 449-900
TEL:(82)-(031)-209-1490
FAX:(82) (331) 209-1909
Home-Page URL: /
Printed in the Republic of Korea
Table of Contents
Chapter 1Product Overview
Introduction.........................................................................................................................................1-1 Features.............................................................................................................................................1-2 Block Diagram....................................................................................................................................1-5 Pin Assignments.................................................................................................................................1-6 Signal Descriptions..............................................................................................................................1-20 S3C2440A Special Registers................................................................................................................1-26 Chapter 2Programmer's Model
Overview.............................................................................................................................................2-1 Processor Operating States.........................................................................................................2-1 Switching State...........................................................................................................................2-1 Memory Formats.........................................................................................................................2-1 Big-Endian Format.......................................................................................................................2-2 Little-Endian Format....................................................................................................................2-2 Instruction Length........................................................................................................................2-2 Operating Modes.........................................................................................................................2-3 Registers....................................................................................................................................2-3 The Program Status Registers......................................................................................................2-7 Exceptions.................................................................................................................................2-10 Interrupt Latencies.......................................................................................................................2-15 Reset.........................................................................................................................................2-15
Table of Contents (Continued)
Chapter 3ARM Instruction Set
Instruction Set Summay.......................................................................................................................3-1 Format Summary........................................................................................................................3-1 Instruction Summary....................................................................................................................3-2 The Condition Field..............................................................................................................................3-4 Branch and Exchange (Bx)...................................................................................................................3-5 Instruction Cycle Times................................................................................................................3-5 Assembler Syntax.......................................................................................................................3-5 Using R15 as an Operand............................................................................................................3-5 Branch and Branch with Link (B, Bl)......................................................................................................3-7 The Link Bit................................................................................................................................3-7 Instruction Cycle Times................................................................................................................3-7 Assembler Syntax.......................................................................................................................3-8 Data Processing..................................................................................................................................3-9 Cpsr Flags..................................................................................................................................3-11 Shifts.........................................................................................................................................3-12 Immediate Operand Rotates.........................................................................................................3-16 Writing to R15.............................................................................................................................3-16 Using R15 as an Operandy...........................................................................................................3-16 TEQ, TST, Cmp and Cmn Opcodes...............................................................................................3-16 Instruction Cycle Times................................................................................................................3-16 Assembler Syntax.......................................................................................................................3-17 Examples...................................................................................................................................3-17 Psr Transfer (MRS, MSR).....................................................................................................................3-18 Operand Restrictions...................................................................................................................3-18 Reserved Bits..............................................................................................................................3-20 Examples...................................................................................................................................3-20 Instruction Cycle Times................................................................................................................3-20 Assembly Syntax........................................................................................................................3-21 Examples...................................................................................................................................3-21 Multiply And Multiply-Accumulate (MUL, MLA).......................................................................................3-22 Cpsr Flags..................................................................................................................................3-24 Instruction Cycle Times................................................................................................................3-24 Assembler Syntax.......................................................................................................................3-24 Examples...................................................................................................................................3-24 Multiply Long And Multiply-Accumulate Long (MULL, MLAL)...................................................................3-25 Operand Restrictions...................................................................................................................3-26 Cpsr Flags..................................................................................................................................3-26 Instruction Cycle Times................................................................................................................3-26 Assembler Syntax.......................................................................................................................3-27 Examples...................................................................................................................................3-27
Table of Contents (Continued)
Chapter 3ARM Instruction Set (Continued)
Single Data Transfer (LDR, STR)...........................................................................................................3-28 Offsets and Auto-Indexing............................................................................................................3-29 Shifted Register Offset.................................................................................................................3-29 Bytes and Words........................................................................................................................3-29 Use of R15..................................................................................................................................3-31 Example.....................................................................................................................................3-31 Data Aborts................................................................................................................................3-31 Instruction Cycle Times................................................................................................................3-31 Assembler Syntax.......................................................................................................................3-32 Examples...................................................................................................................................3-33 Halfword and Signed Data Transfer (LDRH/STRH/LDRSB/LDRSH)...........................................................3-34 Offsets and Auto-Indexing............................................................................................................3-35 Halfword Load and Stores.............................................................................................................3-36 Use of R15..................................................................................................................................3-37 Data Aborts................................................................................................................................3-37 Instruction Cycle Times................................................................................................................3-37 Assembler Syntax.......................................................................................................................3-38 Examples...................................................................................................................................3-39 Block Data Transfer (LDM, STM)...........................................................................................................3-40 The Register List.........................................................................................................................3-40 Addressing Modes.......................................................................................................................3-41 Address Alignment......................................................................................................................3-41 Use of the S Bit...........................................................................................................................3-43 Use of R15 as The Base..............................................................................................................3-43 Inclusion of the Base in the Register List.......................................................................................3-44 Data Aborts................................................................................................................................3-44 Instruction Cycle Times................................................................................................................3-44 Assembler Syntax.......................................................................................................................3-45 Examples...................................................................................................................................3-46 Single Data Swap (SWP).....................................................................................................................3-47 Bytes and Words........................................................................................................................3-47 Use of R15..................................................................................................................................3-48 Data Aborts................................................................................................................................3-48 Instruction Cycle Times................................................................................................................3-48 Assembler Syntax.......................................................................................................................3-48 Software Interrupt (SWI).......................................................................................................................3-49 Return from the Supervisor...........................................................................................................3-49 Comment Field............................................................................................................................3-49 Instruction Cycle Times................................................................................................................3-49 Assembler Syntax.......................................................................................................................3-50 Coprocessor Data Operations (CDP).....................................................................................................3-51 Coprocessor Instructions..............................................................................................................3-51 Instruction Cycle Times................................................................................................................3-52 Examples...................................................................................................................................3-52
Table of Contents (Continued)
Chapter 3ARM Instruction Set (Continued)
Coprocessor Data Transfers (LDC, STC)................................................................................................3-53 The Coprocessor Fields...............................................................................................................3-54 Addressing Modes.......................................................................................................................3-54 Address Alignment......................................................................................................................3-54 Data Aborts................................................................................................................................3-54 Assembler Syntax.......................................................................................................................3-55 Examples...................................................................................................................................3-55 Coprocessor Register Transfers (MRC, MCR).................................................................................3-56 The Coprocessor Fields...............................................................................................................3-56 Transfers to R15..........................................................................................................................3-57 Transfers from R15......................................................................................................................3-57 Instruction Cycle Times................................................................................................................3-57 Assembler Syntax.......................................................................................................................3-57 Examples...................................................................................................................................3-57 Undefined Instruction...................................................................................................................3-58 Instruction Cycle Times................................................................................................................3-58 Assembler Syntax.......................................................................................................................3-58 Instruction Set Examples.............................................................................................................3-59 Using the Conditional Instructions.................................................................................................3-59 Pseudo-Random Binary Sequence Generator.................................................................................3-61 Multiplication by Constant Using the Barrel Shifter..........................................................................3-61 Loading a Word from an Unknown Alignment.................................................................................3-63 Chapter 4Thumb Instruction Set
Thumb Instruction Set Format...............................................................................................................4-1 Format Summary........................................................................................................................4-2 Opcode Summary.......................................................................................................................4-3 Format 1: Move Shifted Register...........................................................................................................4-5 Operation....................................................................................................................................4-5 Instruction Cycle Times................................................................................................................4-6 Examples...................................................................................................................................4-6 Format 2: Add/Subtract........................................................................................................................4-7 Operation....................................................................................................................................4-7 Instruction Cycle Times................................................................................................................4-8 Examples...................................................................................................................................4-8 Format 3: Move/Compare/Add/Subtract Immediate.................................................................................4-9 Operations..................................................................................................................................4-9 Instruction Cycle Times................................................................................................................4-10 Examples...................................................................................................................................4-10
Table of Contents (Continued)
Chapter 4Thumb Instruction Set (Continued)
Format 4: ALU Operations....................................................................................................................4-11 Operation....................................................................................................................................4-11 Instruction Cycle Times................................................................................................................4-12 Examples...................................................................................................................................4-12 Format 5: Hi-Register Operations/Branch Exchange...............................................................................4-13 Operation....................................................................................................................................4-13 Instruction Cycle Times................................................................................................................4-14 The BX Instruction.......................................................................................................................4-14 Examples...................................................................................................................................4-15 Using R15 As an Operand............................................................................................................4-15 Format 6: PC-Relative Load..................................................................................................................4-16 Operation....................................................................................................................................4-16 Instruction Cycle Times................................................................................................................4-17 Examples...................................................................................................................................4-17 Format 7: Load/Store With Register Offset.............................................................................................4-18 Operation....................................................................................................................................4-19 Instruction Cycle Times................................................................................................................4-19 Examples...................................................................................................................................4-19 Format 8: Load/Store Sign-Extended Byte/Halfword................................................................................4-20 Operation....................................................................................................................................4-20 Instruction Cycle Times................................................................................................................4-21 Examples...................................................................................................................................4-21 Format 9: Load/Store With Immediate Offset..........................................................................................4-22 Operation....................................................................................................................................4-23 Instruction Cycle Times................................................................................................................4-23 Examples...................................................................................................................................4-23 Format 10: Load/Store Halfword............................................................................................................4-24 Operation....................................................................................................................................4-24 Examples...................................................................................................................................4-25 Format 11: SP-Relative Load/Store.......................................................................................................4-26 Operation....................................................................................................................................4-26 Instruction Cycle Times................................................................................................................4-27 Examples...................................................................................................................................4-27 Format 12: Load Address.....................................................................................................................4-28 Operation....................................................................................................................................4-28 Instruction Cycle Times................................................................................................................4-29 Examples...................................................................................................................................4-29 Format 13: Add Offset to Stack Pointer.................................................................................................4-30 Operation....................................................................................................................................4-30 Instruction Cycle Times................................................................................................................4-30 Examples...................................................................................................................................4-30。

相关文档
最新文档