logo资料库

s3c2440芯片手册.pdf

第1页 / 共595页
第2页 / 共595页
第3页 / 共595页
第4页 / 共595页
第5页 / 共595页
第6页 / 共595页
第7页 / 共595页
第8页 / 共595页
资料共595页,剩余部分请下载后查看
table of contents
list of figures
list of tables
1. Product Overview
2. Programmers Model
3. ARM Instruction Set
4. Thumb Instruction Set
5. Memory Controller
6. NAND Flash Contorller
7. Clock&Power Management
8. DMA
9. IO Ports
10. PWM Timer
11. UART
12. USB Host Controller
13. USB Device Controller
14. Interrupt Controller
15. LCD Controller
16. ADC&Touch Screen Interface
17. Real Time Clock
18. Watchdog Timer
19. MMC/SD/SDIO Controller
20. IIC-BUS Interface
21. IIS-BUS Interface
22. SPI
23. Camera Interface
24. AC97 Controller
25. BUS Priorities
26. Mechanical Data
27. Electrical Data
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. S3C2440A 32-Bit CMOS Microcontroller User's Manual, Revision 1 Publication Number: 21-S3-C2440A-072004 © 2004 Samsung Electronics "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. 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: FAX: Home-Page URL: Http://www.samsungsemi.com/ Printed in the Republic of Korea (82)-(031)-209-1490 (82) (331) 209-1909
Table of Contents Chapter 1 Product 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 2 Programmer'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 S3C2440A MICROCONTROLLER iii
Table of Contents (Continued) Chapter 3 ARM 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 iv S3C2440A MICROCONTROLLER
Table of Contents (Continued) Chapter 3 ARM 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 S3C2440A MICROCONTROLLER v
Table of Contents (Continued) Chapter 3 ARM 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 4 Thumb 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 vi S3C2440A MICROCONTROLLER
Table of Contents (Continued) Chapter 4 Thumb 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 S3C2440A MICROCONTROLLER vii
Table of Contents (Continued) Chapter 4 Thumb Instruction Set (Continued) Format 14: Push/Pop Registers ............................................................................................................4-31 Operation....................................................................................................................................4-31 Instruction Cycle Times................................................................................................................4-32 Examples ...................................................................................................................................4-32 Format 15: Multiple Load/Store.............................................................................................................4-33 Operation....................................................................................................................................4-33 Instruction Cycle Times................................................................................................................4-33 Examples ...................................................................................................................................4-33 Format 16: Conditional Branch..............................................................................................................4-34 Operation....................................................................................................................................4-34 Instruction Cycle Times................................................................................................................4-35 Examples ...................................................................................................................................4-35 Format 17: Software Interrupt................................................................................................................4-36 Operation....................................................................................................................................4-36 Instruction Cycle Times................................................................................................................4-36 Examples ...................................................................................................................................4-36 Format 18: Unconditional Branch..........................................................................................................4-37 Operation....................................................................................................................................4-37 Examples ...................................................................................................................................4-37 Format 19: long branch with link ...........................................................................................................4-38 Operation....................................................................................................................................4-38 Instruction Cycle Times................................................................................................................4-39 Examples ...................................................................................................................................4-39 Instruction Set Examples .....................................................................................................................4-40 Multiplication by A Constant Using Shifts and Adds........................................................................4-40 General Purpose Signed Divide.....................................................................................................4-41 Division by a Constant .................................................................................................................4-43 viii S3C2440A MICROCONTROLLER
分享到:
收藏