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: Http://www.samsungsemi.com/
Printed in the Republic of Korea
S3C2440A MICROCONTROLLER iii
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
iv S3C2440A MICROCONTROLLER
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
S3C2440A MICROCONTROLLER v
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