Samsung S3C380D 16/32-bit RISC microcontroller is a cost-effective and high-performance microcontroller
solution for TV applications.
Among the outstanding features of the S3C380D is its CPU core, a 16/32-bit RISC processor (ARM7TDMI)
designed by Advanced RISC Machines, Ltd. The ARM7TDMI core is a low-power, general-purpose
microprocessor macro-cell that was developed for use in application-specific and customer-specific integrated
circuits. Its simple, elegant, and fully static design is particularly suitable for cost-sensitive and power-sensitive
applications.
The S3C380D was developed using the ARM7TDMI core, CMOS standard cell, and a data path compiler. Most
of the on-chip function blocks were designed using an HDL synthesizer. The S3C380D has been fully verified in
the Samsung ASIC test environment.
By providing a complete set of common system peripherals, the S3C380D minimizes overall system costs and
eliminates the need to configure additional components.
The integrated on-chip functions that are described in this document include:
•4-Kbyte RAM (3008-byte (1504 × 16 bits) general register and 1088-byte (544 × 16 bits) OSD/CCD RAM)
•128-Kbyte internal program memory
•Two 14-bit PWM modules
•Three 16-bit timers
•On screen display module
•Crystal/Ceramic oscillator or external clock can be used as the clock source
•Standby mode support: SLEEP mode
•One 8-bit basic timer and 3-bit watchdog timer
•Interrupt controller (16 interrupt sources and 2 vectors)
•Five 4-bit ADCs
•Four programmable I/O ports
•42-pin SDIP
1-1
Page 2
PRODUCT OVERVIEWS3C380D/F380D
FEATURES
CPU
•ARM7T CPU core
Memory
•4-Kbyte RAM (3008-byte general purpose register
area + 1088-byte OSD/CCD RAM)
•128 Kbyte internal program memory
General I/O
•Four I/O ports (25 pins total)
(6 V O/D: 3 pins, 5 V O/D: 4 pins)
Basic timer and watchdog timer
•8-bit counter + 3-bit counter
•Overflow signal of 8-bit counter makes a basic
timer interrupt and control the oscillation warm-up
time
•Overflow signal of 3-bit counter makes a system
reset
Timer/Counters
•Three general purpose 16-bit timer/counters with
interval timer modes
P0.4-P0.7General I/O Port (4-bit), Input or Output
P1.0-P1.3I/OInput/output mode or push-pull output mode
P1.4-P1.7General I/O Port (4-bit), configurable for
P2.0-P2.3I/OGeneral I/O Port (4-bit), input or push-pull
P2.4-P2.7I/OInput mode or push-pull output mode is
P3.0I/OInput mode or push-pull output mode is
PWM0OOutput pin for 14-bit PWM0 circuit61P0.0
PWM1OOutput pin for 14-bit PWM1 circuit32P0.1
ADC1-4IInput for 4-bit resolution flash A/D
INT0-INT3IExternal interrupt input pins214-17P2.0-3
OSDHTOHalftone control signal output for OSD621P2.7
IRINI
General I/O Port (3-bit), Input or n-channel
open-drain output is software configurable.
Pins can withstand up to 6-volt loads. An
alternative function is supported.
P0.1: PWM1 (14-Bit PWM Output)
mode (push-pull or n-channel open drain) is
software configurable.
is software configurable.
digital input or n-channel open drain output.
P1.4-P1.7 can withstand up to 5-volt loads.
Multiplexed for alternative use as external
inputs ADC1-ADC4.
output mode is software configurable.
Multiplexed for alternative use as external
interrupt inputs INT0-INT3.
software configurable. An alternative
function is supported. P2.7: OSDHT
(Halftone signal output)
software configurable.
Converter
Remocon signal input
Normal mode: Remocon signal input
OTP Write mode: VPP=12.5 V
Pin DescriptionCircuit
Type
61PWM0
32-3
738-41
64-7
48-11ADC1-
214-17INT0-INT3
618-21OSDHT
635
48-11P1.4-7
136–
Pin
Numbers
42
Share
Pins
PWM1
ADC4
CVI INIVideo signal input828ADC0
1-5
Page 6
PRODUCT OVERVIEWS3C380D/F380D
Table 1-1. S3C380D Pin Descriptions (Continued)
Pin NamePin
RESET
Type
ISystem reset input pin933–
Pin DescriptionCircuit
Type
Pin
Numbers
Share
Pins
LPF–PLL filter pin–29–
H-SYNCIH-sync input for OSD and CCD126–
V-SYNCIV-sync input for OSD and CCD127–
V
blank
V
red
V
green
V
blue
ADC0IInput for 4-bit resolution flash
OVideo blank signal output for OSD and CCD525–
ORed signal output for OSD and CCD524–
OGreen signal output for OSD and CCD523–
OBlue signal output for OSD and CCD522–
828CVI IN
A/D Converter (1.5V-2.0V)
V
DD1
V
SS1
V
SS3
XIN, X
, V
, V
DD2
SS2
OUT
–Power supply pins–12, 34
13, 37
30
I, OSystem clock pins (32,768 Hz)–31,32–
–
1-6
Page 7
S3C380D/F380DPRODUCT OVERVIEW
PIN CIRCUITS
In
Schmitt Trigger Input
Noise Filter
Figure 1-3. Pin Circuit Type 1 (H-Sync, V-Sync, IRIN)
VDD
Data
Output
DIsable
Input
Schmitt
Trigger Input
In/Out
INT
Noise Filter
Figure 1-4. Pin Circuit Type 2 (P2.0-P2.3, INT0-INT3)
1-7
Page 8
PRODUCT OVERVIEWS3C380D/F380D
In/Out
Data
Input
Schmitt Trigger Input
NOTE: Circuit type 3 can withstand up to 6 V loads.
Figure 1-5. Pin Circuit Type 3 (P0.1-P0.3, PWM1)
Data
Input
Schmitt Trigger Input
A/D IN
NOTE: Circuit type 4 can withstand up to 5 V loads.
Figure 1-6. Pin Circuit Type 4 (P1.4-P1.7, ADC1-ADC4)
The S3C380D CPU core is the ARM7TDMI processor, a general purpose, 32-bit microprocessor developed by
Advanced RISC Machines, Ltd. (ARM). The core's architecture is based on Reduced Instruction Set Computer
(RISC) principles. The RISC architecture makes the instruction set and its related decoding mechanisms simpler
and more efficient than with microprogrammed Complex Instruction Set Computer (CISC) systems. The resulting
benefit is high instruction throughput and impressive real-time interrupt response. Pipelining is also employed so
that all components of the processing and memory systems can operate continuously. The ARM7TDMI has a
32-bit address bus.
An important feature of the ARM7TDMI processor, differentiating it from the ARM7 processor, is a unique
architectural strategy called THUMB. The THUMB strategy is an extension of the basic ARM architecture and
consists of 36 instruction formats. These formats are based on the standard 32-bit ARM instruction set, but have
been re-coded using 16-bit wide opcodes.
Because THUMB instructions are one-half the bit width of normal ARM instructions, they produce very highdensity code. When a THUMB instruction is executed, its 16-bit opcode is decoded by the processor into its
equivalent instruction in the standard ARM instruction set. The ARM core then processes the 16-bit instruction as
it would a normal 32-bit instruction. In other words, the Thumb architecture gives 16-bit systems a way to access
the 32-bit performance of the ARM core without incurring the full overhead of 32-bit processing.
Because the ARM7TDMI core can execute both standard 32-bit ARM instructions and 16-bit Thumb instructions,
it lets you mix routines of Thumb instructions and ARM code in the same address space. In this way, you can
adjust code size and performance, routine by routine, to find the best programming solution for a specific
application.
Address Register
Address Register
Register Bank
Multiplexer
Barrel Shifter
32-Bit ALU
Instruction
Decoder and
Logic Control
Instruction
Pipeline and
Read Data
Register
Write Data Register
Figure 1-12. ARM7TDMI Core Block Diagram
1-11
Page 12
PRODUCT OVERVIEWS3C380D/F380D
INSTRUCTION SET
The S3C380D instruction set is divided into two subsets: a standard 32-bit ARM instruction set and a 16-bit
THUMB instruction set.
The 32-bit ARM instruction set is comprised of thirteen basic instruction types which can, in turn, be divided into
four broad classes:
•Four types of branch instructions which control program execution flow, instruction privilege levels, and
switching between ARM code and THUMB code.
•Three types of data processing instructions which use the on-chip ALU, barrel shifter, and multiplier to
perform high-speed data operations in a bank of 31 registers (all with 32-bit register widths).
•Three types of load and store instructions which control data transfer between memory locations and the
registers. One type is optimized for flexible addressing, another for rapid context switching, and the third for
swapping data.
•Three types of co-processor instructions which are dedicated to controlling external co-processors. These
instructions extend the off-chip functionality of the instruction set in an open and uniform way.
NOTE
All 32-bit ARM instructions can be executed conditionally.
The 16-bit THUMB instruction set contains 36 instruction formats drawn from the standard 32-bit ARM instruction
set. The THUMB instructions can be divided into four functional groups:
•Four branch instructions.
•Twelve data processing instructions, which are a subset of the standard ARM data processing instructions.
•Eight load and store register instructions.
•Four load and store multiple instructions.
NOTE
Each 16-bit THUMB instruction has a corresponding 32-bit ARM instruction with the identical processing
model.
The 32-bit ARM instruction set and the 16-bit THUMB instruction sets are good targets for compilers of many
different high-level languages. When assembly code is required for critical code segments, the ARM
programming technique is straightforward, unlike that of some RISC processors which depend on sophisticated
compiler technology to manage complicated instruction interdependencies.
Pipelining is employed so that all parts of the processor and memory systems can operate continuously.
Typically, while one instruction is being executed, its successor is being decoded, and a third instruction is being
fetched from memory.
1-12
Page 13
S3C380D/F380DPRODUCT OVERVIEW
OPERATING STATES
From a programmer's point of view, the ARM7TDMI core is always in one of two operating states. These states,
which can be switched by software or by exception processing, are:
•ARM state (when executing 32-bit, word-aligned, ARM instructions), and
•THUMB state (when executing 16-bit, half-word aligned THUMB instructions).
OPERATING MODES
The ARM7TDMI core supports seven operating modes:
•User mode: the normal program execution state
•FIQ (Fast Interrupt Request) mode: for supporting a specific data transfer or channel process
•IRQ (Interrupt ReQuest) mode: for general purpose interrupt handling
•Supervisor mode: a protected mode for the operating system
•Abort mode: entered when a data or instruction pre-fetch is aborted
•System mode: a privileged user mode for the operating system
•Undefined mode: entered when an undefined instruction is executed
Operating mode changes can be controlled by software, or they can be caused by external interrupts or exception
processing. Most application programs execute in User mode. Privileged modes (that is, all modes other than
User mode) are entered to service interrupts or exceptions, or to access protected resources.
1-13
Page 14
PRODUCT OVERVIEWS3C380D/F380D
REGISTERS
The S3C380D CPU core has a total of 37 registers: 31 general-purpose, 32-bit registers, and 6 status registers.
Not all of these registers are always available. Which registers are available to the programmer at any given time
depends on the current processor operating state and mode.
NOTE
When the S3C380D is operating in ARM state, 16 general registers and one or two status registers can
be accessed at any time. In privileged mode, mode-specific banked registers are switched in.
Two register sets, or banks, can also be accessed, depending on the core's current state: the ARM state registerset and the THUMB state register set:
•The ARM state register set contains 16 directly accessible registers: R0-R15. All of these registers, except for
R15, are for general-purpose use, and can hold either data or address values. An additional (seventeenth)
register, the CPSR (Current Program Status Register), is used to store status information.
•The THUMB state register set is a subset of the ARM state set. You can access eight general registers, R0-
R7, as well as the program counter (PC), a stack pointer register (SP), a link register (LR), and the CPSR.
Each privileged mode has a corresponding banked stack pointer, link register, and saved process status
register (SPSR).
The THUMB state registers are related to the ARM state registers as follows:
•THUMB state R0-R7 registers and ARM state R0-R7 registers are identical
•THUMB state CPSR and SPSRs and ARM state CPSR and SPSRs are identical
•THUMB state SP, LR, and PC map directly to ARM state registers R13, R14, and R15, respectively
In THUMB state, registers R8-R15 are not part of the standard register set. However, you can access them for
assembly language programming and use them for fast temporary storage, if necessary.
1-14
Page 15
S3C380D/F380DPRODUCT OVERVIEW
EXCEPTIONS
An exception arises whenever the normal flow of program execution is interrupted. For example, when
processing must be diverted to handle an interrupt from a peripheral. The processor's state just prior to handling
the exception must be preserved so that the program flow can be resumed when the exception routine is
completed. Multiple exceptions may arise simultaneously.
To process exceptions, the S3C380D uses the banked core registers to save the current state. The old PC value
and the CPSR contents are copied into the appropriate R14 (LR) and SPSR register. The PC and mode bits in
the CPSR are forced to a value which corresponds to the type of exception being processed.
The S3C380D core supports seven types of exceptions. Each exception has a fixed priority and a corresponding
privileged processor mode, as shown in Table 1-2.