The information contained herein is subject to change without notice.
The information contained herein is presented only as a guide for the applications of our products. No
responsibility is assumed by Hynix for any infringements of patents or other rights of the third parties
which may result from its use. No license is granted by implication or otherwise under any patent or
patent rights of Hynix or others.
These Hynix products are intended for usage in general electronic equipment (office equipment,
communication equipment, measuring equipment, domestic electrification, etc.).
Please make sure that you consult with us before you use these Hynix products in equipment which
require high quality and / or reliability, and in equipment which could have major impact to the welfare of
human life (atomic energy control, airplane, spaceship, traffic signal, combustion control, all types of
safety devices, etc.). Hynix cannot accept liability to any damage which may occur in case these Hynix
products were used in the mentioned equipment without prior consult ation with Hynix.
Table 14.7 Control Signal Timing - Preliminary - ...........194
Table 14.8 Bus Timing - Preliminary -..........195
Table 14.9 Operating Conditions of the AD Conversion - Preliminary -.............196
Table 14.10 Electrical characteristics of the AD converter - Preliminary -.............196
10 Preliminary
Page 11
Flash MCU(HMS39C7092)
Preliminary 11
Page 12
Flash MCU(HMS39C7092)
12 Preliminary
Page 13
Flash MCU(HMS39C7092) Introduction
Chapter 1
Introduction
Preliminary 13
Page 14
Introduction Flash MCU(HMS39C7092)
1.1 General Description
The 16bit MCU with embedded flash memory for optical storage is the first member
of Hynix Micro Electronics 16/32bit MCU Family of high performance microcontroller
units (MCUs). This family includes a series of peripherals from which numerous
MCUs are assembled. Th is MCU contains extensive peripherals : 192Kbytes flas h
memory, 4K bytes SRAM, 6 channel 16bit Timer, Watch Dog Timer, 2 channel UART,
Programmable Priority Interrupt Controller, 81bits PIO, BUS Controller including Chip
select logic, which is On-Chip Modular Architecture (using AMBA).
• Six 16bit Multi Function Timers/Counters for General Purpose Applications
• One 8bit Watch Dog Timer (WDT)
• Two UARTs (Universal Asynchronous Receiver Transmitter) compatible with
16C550 UART
• Programmable Input/Output ports (81-bits)
• 100 TQFP Package
BUS
BUS
Controller
Controller
SRAM
SRAM
4kbyte
4kbyte
Arbiter
Arbiter
ARM7TDMI
ARM7TDMI
ASB (Max. 50MHz)
Flash Memory
Flash Memory
192kbyte
192kbyte
Multi-Function Pin MUX
Multi-Function Pin MUX
TIC*
TIC*
APB
APB
Bridge
Bridge
* TIC : Test Interface Controller
PMU
PMU
Figure 1.2 HMS39C7092 Block Diagram
Max. 50MHz
PIO
INTC
INTC
WDT
WDT
TIMER
TIMER
UART
UART
ADC
ADC
PIO
Preliminary 15
Page 16
Introduction Flash MCU(HMS39C7092)
1.3 Pin Descriptions
Table 1.1 Pin Descriptions
PIN SYMBOL DIR DESCRIPTION
1 VDD - Power Supply 3.3V
nCS7 O External Chip Selection Number 7
2
TCIOA3 I/O PWM output, Compare match output of Reg.A and signal capture input of Timer Ch3
PB0 I/O General purpose input output of port B bit0
nCS6 O External Chip Selection Number 6
3
TCIOB3 I/O PWM output, Compare match output of Reg.B and signal capture input of Timer Ch3
PB1 I/O General purpose input output of port B bit 1
nCS5 O External Chip Selection Number 5
4
TIOCA4 I/O PWM output, Compare match output of Reg.A and signal capture input of Timer Ch4
PB2 I/O General purpose input output of port B bit2
nCS4 O External Chip Selection Number 4
5
TIOCB4 I/O PWM output, Compare match output of Reg.B and signal capture input of Timer Ch4
PB3 I/O General purpose input output of port B bit3
6
7
8
9
10 TVPPD I 5Vinput for the use of Programming and Erasing of the Flash Memory
11 VSS - Power ground
12
13
14
15
16
17
18
19
20
21
TMS I JTAG Test Mode Selection
PB4 I/O General purpose input output of port B bit4
TDO O JTAG Test Data Output
PB5 I/O General purpose input output of port B bit5
TDI I JTAG Test Data Input
PB6 I/O General purpose input output of port B bit6
TCK I JTAG Test Clock
PB7 I/O General purpose input output of port B bit7
TxD0 O Transmit Data of UART Ch0
P90 I/O General purpose input output of port 9 bit 0
RxD0 O Receive Data of UART Ch0
P91 I/O General purpose input output of port 9 bit 1
TxD1 O Transmit Data of UART Ch1
P92 I/O General purpose input output of port 9 bit 2
RxD1 O Receive Data of UART Ch1
P93 I/O General purpose input output of port 9 bit 3
nIRQ4 I External Interrupt Request number 4
P94 I/O General purpose input output of port 9 bit 4
nIRQ5 I External Interrupt Request number 5
P95 I/O General purpose input output of port 9 bit 5
D0 I/O External Data Bus bit 0
P40 I/O General purpose input output or port 4 bit 0
D1 I/O External Data Bus bit 1
P41 I/O General purpose input output or port 4 bit 1
D2 I/O External Data Bus bit 2
P42 I/O General purpose input output or port 4 bit 2
D3 I/O External Data Bus bit 3
P43 I/O General purpose input output or port 4 bit 3
16 Preliminary
Page 17
Flash MCU(HMS39C7092) Introduction
Table 1.1 Pin Descriptions (Continued)
PIN SYMBOL DIR DESCRIPTION
22 VSS - Power ground
23
24
25
26
27
28
29
30
31
32
33
34
35 VDD - Power Supply 3.3V
36
37
38
39
40
41
42
43
44 VSS - Power ground
45
46
47
D4 I/O External Data Bus bit 4
P44 I/O General purpose input output or port 4 bit 4
D5 I/O External Data Bus bit 5
P45 I/O General purpose input output or port 4 bit 5
D6 I/O External Data Bus bit 6
P46 I/O General purpose input output or port 4 bit 6
D7 I/O External Data Bus bit 7
P47 I/O General purpose input output or port 4 bit 7
D8 I/O External Data Bus bit 8
P30 I/O General purpose input output or port 3 bit 0
D9 I/O External Data Bus bit 9
P31 I/O General purpose input output or port 3 bit 1
D10 I/O External Data Bus bit 10
P32 I/O General purpose input output or port 3 bit 2
D11 I/O External Data Bus bit 11
P33 I/O General purpose input output or port 3 bit 3
D12 I/O External Data Bus bit 12
P34 I/O General purpose input output or port 3 bit 4
D13 I/O External Data Bus bit 13
P35 I/O General purpose input output or port 3 bit 5
D14 I/O External Data Bus bit 14
P36 I/O General purpose input output or port 3 bit 6
D15 I/O External Data Bus bit 15
P37 I/O General purpose input out put or port 3 bit 7
A0 O External Address Bus bit 0
P10 I/O General purpose input output or port 1 bit 0
A1 O External Address Bus bit 1
P11 I/O General purpose input output or port 1 bit 1
A2 O External Address Bus bit 2
P12 I/O General purpose input output or port 1 bit 2
A3 O External Address Bus bit 3
P13 I/O General purpose input output or port 1 bit 3
A4 O External Address Bus bit 4
P14 I/O General purpose input output or port 1 bit 4
A5 O External Address Bus bit 5
P15 I/O General purpose input output or port 1 bit 5
A6 O External Address Bus bit 6
P16 I/O General purpose input output or port 1 bit 6
A7 O External Address Bus bit 7
P17 I/O General purpose input output or port 1 bit 7
A8 O External Address Bus bit 8
P20 I/O General purpose input output or port 2 bit 0
A9 O External Address Bus bit 9
P21 I/O General purpose input output or port 2 bit 1
A10 O External Address Bus bit 10
P22 I/O General purpose input output or port 2 bit 2
Preliminary 17
Page 18
Introduction Flash MCU(HMS39C7092)
Table 1.1 Pin Descriptions (Continued)
PIN SYMBOL DIR DESCRIPTION
48
49
50
51
52
53
54
55
56
57 VSS - Power ground
58
59
60
61
62 nSTBY O Standby mode signal. Power Down mode indicating
63 nRES I External Reset input
64
65 VSS - Power ground
66 XTALOUT O Crystal feedback output
67 XTALIN I Crystal or External Oscillator input
68 VDD - Power Supply 3.3V
69
70
71
72
73 MODE0 I MODE bit 0
74 MODE1 I MODE bit 1
75 MODE2 I MODE bit 2
76 AVDD - Analog Power Supply 3.3V
77 AVREF - ADC Reference Voltage
A11 O External Address Bus bit 11
P23 I/O General purpose input output or port 2 bit 3
A12 O External Address Bus bit 12
P24 I/O General purpose input output or port 2 bit 4
A13 O External Address Bus bit 13
P25 I/O General purpose input output or port 2 bit 5
A14 O External Address Bus bit 14
P26 I/O General purpose input output or port 2 bit 6
A15 O External Address Bus bit 15
P27 I/O General purpose input output or port 2 bit 7
A16 O External Address Bus bit 16
P50 I/O General purpose input output of port 5 bit 0
A17 O External Address Bus bit 17
P51 I/O General purpose input output of port 5 bit 1
A18 I External Address Bus bit 18
P52 I/O General purpose input output of port 5 bit 2
A19 O External Address Bus bit 19
P53 I/O General purpose input output of port 5 bit 3
nWAIT I External BUS cycle wait signal
P60 I/O General purpose input output of port 6 bit 0
nBREQ I External BUS Request
P61 I/O General purpose input output of port 6 bit 1
nBACK I External BUS Acknowledge
P62 I/O General purpose input output of port 6 bit 2
CLKO O BUS Clock Output
P67 I/O General purpose input output of port 6 bit 7
nTRST I JTAG Test Reset input
P97 I/O General purpose input output of port 9 bit 7
nAS O External Address Bus strobe
P63 I/O General purpose input output of port 6 bit 3
nRD O External Bus Read
P64 I/O General purpose input output of port 6 bit 4
nHWR O External upper 8 bit data bus write
P65 I/O General purpose input output of port 6 bit 5
nLWR O External lower 8 bit data bus write
P66 I/O General purpose input output of port 6 bit 6
18 Preliminary
Page 19
Flash MCU(HMS39C7092) Introduction
Table 1.1 Pin Descriptions (Continued)
PIN SYMBOL DIR DESCRIPTION
78
79
80
81
82
83 VSS - Power ground
85
86 P75 I/O General purpose input output of port 7 bit 5
87
89
91
92 VSS - Power ground
93
94
95
96
97
P70 O General purpose output of port 7 bit 0
AN0 I ADC Channel 0 input
P71 O General purpose output of port 7 bit 1
AN1 I ADC Channel 1 input
P72 O General purpose output of port 7 bit 2
AN2 I ADC Channel 2 input
P73 O General purpose output of port 7 bit 3
AN3 I ADC Channel 3 input
P74 O General purpose output of port 7 bit 4
AN4 I ADC Channel 4 input
TIOCA5 I/O PWM output, Compare match output of Reg.A and signal capture input of Timer Ch5
nIRQ6 I External Interrupt Request number 6 84
P76 I/O General purpose input output of port 7 bit 6
TIOCB5 I/O PWM output, Compare match output of Reg.B and signal capture input of Timer Ch5
nIRQ7 I External Interrupt Request number 7
P77 I/O General purpose input output of port 7 bit 7
nIRQ0 I External Interrupt Request number 0
P80 I/O General purpose input output of port 8 bit 0
nCS3 O External Chip Selection Number 3
nIRQ1 I External Interrupt Request number 1 88
P81 I/O General purpose input output of port 8 bit 1
nCS2 O External Chip Selection Number 2
nIRQ2 I External Interrupt Request number 2
P82 I/O General purpose input output of port 8 bit 2
nCS1 O External Chip Selection Number 1
nIRQ3 I External Interrupt Request number 3 90
P83 I/O General purpose input output of port 8 bit 3
nCS0 O External Chip Selection Number 0
P84 I/O General purpose input output of port 8 bit 4
TCLKA I External timer input clock A
PA0 I/O General purpose input output of port A bit 0
TCLKB I External timer input clock B
PA1 I/O General purpose input output of port A bit 1
TCLKC I External timer input clock C
TIOCA0 I/O PWM output, Compare match output of Reg.A and signal capture input of Timer Ch0
PA2 I/O General purpose input output of port A bit 2
TCLKD I External timer input clock D
TIOCB0 I/O PWM output, Compare match output of Reg.B and signal capture input of Timer Ch0
PA3 I/O General purpose input output of port A bit 3
A23 O External Address Bus bit 23
TIOCA1 I/O PWM output, Compare mat ch output of Reg.A and signal capture input of Timer Ch1
PA4 I/O General purpose input output of port A bit 4
Preliminary 19
Page 20
Introduction Flash MCU(HMS39C7092)
Table 1.1 Pin Descriptions (Continued)
PIN SYMBOL DIR DESCRIPTION
98
99
100
A22 O External Address Bus bit 22
TIOCB1 I/O PWM output, Compare match output of Reg.B and signal capture input of Timer Ch1
PA5 I/O General purpose input output of port A bit 5
A21 O External Address Bus bit 21
TIOCA2 I/O PWM output, Compare match output of Reg.A and signal capture input of Timer Ch2
PA6 I/O General purpose input output of port A bit 6
A20 O External Address Bus bit 20
TIOCB2 I/O PWM output, Compare match output of Reg.B and signal capture input of Timer Ch2
PA7 I/O General purpose input output of port A bit 7
20 Preliminary
Page 21
Flash MCU(HMS39C7092) Introduction
1.4 Operation Mode description
HMS39C7092 is Flash Memory-embedded ARM microcontroller. It has six-operation
modes shown in Table 1.2. HMS39C7092 External pin function is changed by setting
external MODE pin or configuring the PIN MUX registers. The pin assignment by
mode is shown in Table 1.3 . Especially changing mode causes memory remap for
appropriate mode. Figure 1.3 shows default memory map and the memory maps of
respective modes are shown in Figure 1.4, Figure 1.5 and Figure 1.6.
The Mode definition is listed as follows:
Table 1.2 HMS39C7092 Operation modes
MODE MODE DESCRIPTION
0,1 Reserved for Test
2 External 8-bit data bus with 16MBytes of Address Range
3 External 16-bit data bus with 16MBytes of Address Range
4 Flash-boot mode with 16-bit data bus
5 Flash-boot mode (micro-computer mode)
6 UART-boot mode with 16-bit data bus
7 UART-boot mode (micro-computer mode)
The ARM7TDMI is a member of the ARM family of general-purpose 32bit
microprocessors, which offer s high performance for very low power consumption and
price. This processor employs a unique architectural strategy known as THUMB,
which makes it ideally suited to high volume applications with memory restrictions or
applications where code density is an issue.
The key idea behind THUMB is a super reduced instruction set. Essentially, the
ARM7TDMI has two instruction sets, the standard 32bit ARM set and 16bit THUMB
set. The THUMB set’s 16bit instruction length allows it to approach twice the density
of standard ARM code while retaining most of the ARM’s performance advantage
over a traditional 16bit processor by using 16bit registers. Th is is possible because
THUMB code operates on the same 32bit register set as ARM code.
See also ARM7TDMI Datasheet (ARM DDI 0029E) for detail.
2.2 Feature
• 32bit RISC architecture
• Low power consumption
• ARM7TDMI core with;
- On-chip ICEbreaker debug support
- 32bit x 8 hardware multiplier
- Thumb decompressor
• Utilizes the ARM7TDMI embedded processor
- High performance 32 bit RISC architecture
- High density 16 bit instruction set (THUMB code)
• Fully static operation : 0 ~ 80MHz
• 3-stage pipeline architecture (Fetch, decode, and execut ion stage)
• Enhanced ARM software toolkit
THUMB code is able to provide up to 65% of the code size of ARM, and 160% of the
performance of an equivalent ARM processor connected to a 16-bit memory system.
3 0 0 1 Op Rd Offset8 Move/compare/add/subtract immediate
4 0 1 0 0 0 0 Op Rs Rd ALU operation
5 0 1 0 0 0 1 Op H1 H2 Rs/Hs Rd/Hd Hi register operations/branch exchange
6 0 1 0 0 1 Rd Word8 PC-relative load
7 0 1 0 1 L B 0 Ro Rb Rd Load/store with register Offset
8 0 1 0 1 H S 1 Ro Rb Rd Load/store sign-extended byte/halfword
9 0 1 1 B L Offset5 Rb Rd Load/store with immediate
10 1 0 0 0 L Offset5 Rb Rd Load/store halfword
11 1 0 0 1 L Rd Word8 SP-relative load/store
12 1 0 1 0 SP Rd Word8 Load address
13 1 0 1 1 0 0 0 0 S SWord7 Add offset to stack pointer
14 1 0 1 1 L 1 0 R Rlist Push/pop registers
15 1 1 0 0 L Rb Rlist Multiple load/store
16 1 1 0 1 Cond Soffset8 Conditional branch
17 1 1 0 1 1 1 1 1 Value8 Software Interrupt
18 1 1 1 0 0 Offset11 Unconditional branch
19 1 1 1 1 H Offset11 Long branch with link
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Figure 2.4 THUMB instruction set formats
Preliminary 33
Page 34
ARM7TDMI Core Flash MCU(HMS39C7092)
Table 2.2 THUMB instruction set opcodes
Mnemonic Instruction Lo reg . oper. Hi reg. oper Condition code set
ADCAdd with Carry
ADDAddVVV
ANDANDV
ASRArithmetic Shift Right V
BUnconditional branchV
B xxConditional branchV
BICBit ClearV
BLBranch and Link
BXBranch and ExchangeV
CMNCompare NegativeV
CMPCompare VVV
EOREORV
LDMIALoad multipleV
LDRLoad wordV
LDRBLoad byteV
LDRHLoad halfwordV
LSLLogical Shift LeftV
LDSB Load sign-extended byteV
LDSH Load sign-extended HalfwordV
LSRLogical Shift Right V
MOVMove registerVVV
MULMultiplyV
MVNMove Negative register V
NEGNegateV
ORRORV
POPPop registersV
PUSH Push registersV
RORRotate RightV
SBCSubtract with CarryV
STMIAStore MultipleV
STRStore word V
STRBStore byteV
STRHStore halfwordV
SWISoftware Interrupt
SUBSubtractV
TSTTest bitsV
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
34 Preliminary
Page 35
Flash MCU(HMS39C7092) ARM7TDMI Core
THUMB state General Registers and Program Counter
System & User FIQ Supervisor Abort IRQ Undefined
R0 R0 R0
R1 R1 R1
R2 R2 R2
R3 R3 R3
R4 R4 R4
R5 R5 R5
R6 R6 R6
R7 R7 R7
SP SP_fiq SP_svc
LR LR_fiq LR_svc
PC PC PC
THUMB state Program Status Registers
CPSR CPSR CPSR
SPSR_fiq SPSR_svc
= banked register
Figure 2.5 Register Organization in THUMB state
R0
R1
R2
R3
R4
R5
R6
R7
SP_abt
LR_abt
PC
CPSR
SPSR_abt
R0
R1
R2
R3
R4
R5
R6
R7
SP_irq
LR_irq
PC
CPSR
SPSR_irq
R0
R1
R2
R3
R4
R5
R6
R7
SP_und
LR_und
PC
CPSR
SPSR_und
THUMB state ARM state
R0 R0
R1 R1
Lo registers Hi registers
R2 R2
R3 R3
R4 R4
R5 R5
R6 R6
R7 R7
R8
R9
R10
R11
R12
Stack Pointer (SP) Stack Pointer (R13)
Link Register (LR) Link Register (R14)
Program Counter (PC) Program Counter (R15)
CPSR CPSR
SPSR SPSR
Figure 2.6 Mapping of THUMB state registers onto ARM state registers.
Preliminary 35
Page 36
ARM7TDMI Core Flash MCU(HMS39C7092)
Table 2.3 Condition code summary
CodeSuffixFlagsMeaning
0000 EQ Z
0001 NE Z
0010 CS C
0011 CC C
0100 MI N
0101 PL N
0110 VS V
0111 VC V
1000 HI C
1001 LS C
1010 GE N
1011 LT N
1100 GT Z
1101 LE Z
1110 AL (Ignored)
2.4.3 The Program Status Registers
The ARM7TDMI contains Current Program Status Register (CPSR), plus five Saved
Program Status Register (SPSRs) for use by exception handlers. These registers
hold information about the most recently performed ALU operation control the
enabling and disabling of interrupts set the processor operating mode
The arrangement of bits is shown in Fig. 2.7 Program status register format.
Condition code flags (reserved) Control bits
31 30 29 28 27 26 25 24 23 8 7 6 5 4 3 2 1 0
N Z C V . . . . .… … … I F T M4 M3 M2 M1 M0
Overflow Mode bits
Carry / Borrow / Extend State bit
Zero FIQ disable
Negative / Less Than IRQ disable
Figure 2.7 Program status register format
set equal
clear not equal
set unsigned higher or same
clear unsigned lower
set negative
clear positive or zero
set overflow
clear no overflow
set and Z clear unsigned higher
clear or Z set unsigned lower or same
equals V greater or equal
not equal to V less than
clear AND (N equals V) greater than
set OR (N not equal to V) less than or equal
always
36 Preliminary
Page 37
Flash MCU(HMS39C7092) ARM7TDMI Core
2.4.3.1 The condition code flags
The N,Z,C and V bits are the condition code flags. These may be changed as a
result of arithmetic and logical operations, and m ay be tested to determine whether
an instruction should be executed.
In ARM state, all instructions may be executed conditionally : see table 2.3 in chapter
2.4.2.
In THUMB state, only the Branch instruction is capable of conditional execution
2.4.3.2 The control bits
The bottom 8 bits of a PSR(incorporating I,F,T and M[4:0]) are known collectively as
the control bits. These will change when an exception arises. If the processor is
operating in a privileged mode, they can also be manipulated by software.
The T bit This reflects the operating states. When this bit is
set, the processor is executing in THUMB state,
otherwise it is executing in ARM state.
Note that the software must never change the state
of the TBIT in the CPSR. If this happens, the
Interrupt disable bits The I and F bits are the interrupt disable bits. When
The mode bits The M4, M3, M2, M1 and M0 bits (M[4:0]) are th e
Reserved bits The remaining bits in the PSRs are reserved.
processor will enter an unpredictable state.
set, these disable the IRQ and FIQ interrupts
respectively.
mode bits. These determine the processor’s
operating mode, as shown in following table 2.4.
Not all combinations of the mode bits define a valid
processor mode. Only those explicitly described
shall be used. The user should be aware that if
any illegal value is programmed into the mode bits,
M{4:0}, then the processor will enter an
unrecoverable state. If this occurs, reset should be
applied.
When changing a PSR’s flag or control bits, you must
ensure these unused bits are not altered. Also,
your program should not rely on them containing
specific values, since in future processors they may
read as one or zero.
The ADR pseudo-instruction loads a program-relative or register-relative address into a register.
The syntax of ADR is:
ADR{ condition} register, expression
where:
register is the register to load.
expression is a program-relative or register-relative expression that evaluates to:
• a non word-aligned address within 255 bytes
• a word-aligned address within 1020 bytes.
The address can be either before or after the address of the instruction or the base
register.
ADR always assembles to one instruction. The assembler attempts to produce a single ADD or
SUB instruction to load the address. If the address cannot be constructed in a single instruction,
an error is generated and the assembly fails.
Use the ADRL pseudo-instruction to assemble a wider range of effective addresses.
If expression is program-relative, it must evaluate to an address in the same code area as the
ADR pseudo-instruction. Otherwise the address may be out of range after linking.
start MOV r0,#10
ADR r4,start ; => SUB r4,pc,#0xc
Preliminary 39
Page 40
ARM7TDMI Core Flash MCU(HMS39C7092)
ADRL
The ADRL pseudo-instruction loads a program-relative or register-relative address into a
register. It is similar to the ADR pseudo-instruction. ADRL can load a wider range of addresses
Syntax
Usage
Note
Example
than ADR because it generates two data processing instructions.
The syntax of ADRL is:
ADRL{ condition} register, expression
where:
register is the register to load.
expression is a register-relative or program-relative expression that evaluates to:
• a non word-aligned address within 64KB
• a word-aligned address within 256KB.
The address can be either before or after the address of the instruction or the base
register.
ADRL always assembles to two instructions. Even if the address can be reached in a single
instruction, a second, redundant instruction is produced.
If the assembler cannot construct the address in two instructions, it generates an error message
and the assembly fails. See LDR ARM pseudo-instruction for information on loading a wider
range of addresses. See also Chapter 5 Basic Assembly Language Programming in the ARM Software Development Toolkit User Guide.
If expression is program-relative, it must evaluate to an address in the same code area as the
ADRL pseudo-instruction. Otherwise the address may be out of range after linking.
ADRL is not available when assembling Thumb instructions. Use it only in ARM code.
start MOV r0,#10
ADRL r4,start + 60000 ; => ADD r4,pc,#0xe800
; ADD r4,r4,#0x254
40 Preliminary
Page 41
Flash MCU(HMS39C7092) ARM7TDMI Core
LDR
Note
Syntax
Usage
Example
The LDR pseudo-instruction loads a register with either:
• a 32-bit constant value
• an address.
This section describes the LDR pseudo-instruction only. Refer to the ARM ArchitecturalReference Manual for information on the LDR instruction.
condition is an optional condition code.
register is the register to be loaded.
expression evaluates to a numeric constant:
• If the value of expression is within range of a MOV or MVN instruction,
the assembler generates the appropriate instruction.
• If the value of expression is not within range of a MOV or MVN
instruction, the assembler places the constant in a literal pool and
generates a program-relative LDR instruction that reads the constant
from the literal pool.
The offset from the pc to the constant must be less than 4KB. You are responsible
for ensuring that there is a literal pool within range. See LTORG directive for more
information.
label-expression is a program-relative or external expression. The assembler places
the value of label-expression in a literal pool and generates a program -relative LDR
instruction that loads the value from the literal pool.
The offset from the pc to the value in the literal pool must be less than 4KB. You are
responsible for ensuring that there is a literal pool within range. See LTORG directive for more information.
If label-expression is an external expression, or is not contained in the current area,
the assembler places a linker relocation directive in the object file. The linker
ensures that the correct address is generated at link time.
The LDR pseudo-instruction is used for two main purposes:
• to generate literal constants when an immediate value cannot be moved into a
register because it is out of range of the MOV and MVN instructions.
• to load a program-relative or external address into a register. The address remains
valid regardless of where the linker places the AOF area containing the LDR.
Refer to Chapter 5 Basic Assembly Language Programming in the ARM Software Development Toolkit User Guide for a more detailed explanation of how to use LDR,
and for more information on MOV and MVN.
LDR r1,=0xfff ; loads 0xfff into r1
;
LDR r2,=place ; loads the address of
; place into r2
Preliminary 41
Page 42
ARM7TDMI Core Flash MCU(HMS39C7092)
NOP
Syntax
Usage
NOP generates the preferred ARM no-operation code. This is:
MOV r0,r0
The syntax of NOP is:
NOP
NOP cannot be used conditionally. Not executing a no-operation is the same as executing it, so
conditional execution is not required. Condition codes are unaltered by NOP.
42 Preliminary
Page 43
Flash MCU(HMS39C7092) ARM7TDMI Core
2.4.5 THUMB pseudo-instructions
ADR
Syntax
Usage
Example
txampl DCW 0,0,0,0
The thumb ADR pseudo-instruction loads a program-relative or register-relative address into a
register.
The syntax of ADR is:
ADR register, expression
where:
register is the register to load.
Expression is a register-relative or program-relative expression that evaluates to a
word-aligned address within the range +4 to +1020 bytes. Expression must be
defined locally, it cannot be imported.
Refer to ^ or MAP directive for more information on register-relative expressions.
In Thumb state, ADR can generate word-aligned addresses only. Use the ALIGN directive to
ensure that expression is aligned.
If expression is program-relative, it must evaluate to an address in the same code area as the
ADR pseudo-instruction. There is no guarantee that the address will be within range after linking
if it resides in another AOF area.
ADR r4, txampl ; => ADD r4,pc,#nn
; code
ALIGN
Preliminary 43
Page 44
ARM7TDMI Core Flash MCU(HMS39C7092)
LDR
Note
Syntax
Usage
Example
The thumb LDR pseudo-instruction loads a low register with either:
• a 32-bit constant value
• an address.
This section describes the LDR pseudo-instruction only. Refer to the ARM Architectural Reference Manual for information on the LDR instruction.
The syntax of LDR is:
LDR register, =[ expression| label-expression]
where:
register is the register to be loaded. LDR can access the low registers (r0-r7) only.
expression evaluates to a numeric constant:
• If the value of expression is within range of a MOV instruction, the
assembler generates the instruction.
• If the value of expression is not within range of a MOV instruction, the
assembler places the constant in a literal pool and generates a
program-relative LDR instruction that reads the constant from the literal
pool.
The offset from the pc to the constant must be positive and less than
1KB. You are responsible for ensuring that there is a literal pool within
range. See LTORG directive for more information.
label-expression is a program-relative or external expression. The assembler places
the value of label-expression in a literal pool and generates a program -relative LDR
instruction that loads the value from the literal pool.
The offset from the pc to the value in the literal pool must be positive and less than
1KB. You are responsible for ensuring that there is a literal pool within range. See
LTORG directive for more information.
If label-expression is an external expression, or is not contained in the current area,
the assembler places a linker relocation directive in the object file. The linker
ensures that the correct address is generated at link time.
The LDR pseudo-instruction is used for two main purposes:
• to generate literal constants when an immediate value cannot be
moved into a register because it is out of range of the MOV instruction.
• to load a program-relative or external address into a register. The
address remains valid regardless of where the linker places the AOF
area containing the LDR.
Refer to Chapter 5 Basic Assembly Language Programming in the ARM Software Development Toolkit User Guide for a more detailed explanation of how to use LDR,
and for more information on MOV.
LDR r1, =0xfff ; loads 0xfff into r1
;
LDR r2, = labelname ; loads the address of
; labelname into r2
44 Preliminary
Page 45
Flash MCU(HMS39C7092) ARM7TDMI Core
MOV
Note
Syntax
Usage
Example
The Thumb MOV pseudo -instruction moves the value of a low register to another low register
(r0-r7).
The Thumb MOV instruction cannot move values from one low register to another.
The ADD immediate instruction generated by the assembler has the side-effect of updating the
condition codes.
The syntax of MOV is:
MOV Rd, Rs
where:
Rd is the destination register.
Rs is the source register.
The MOV pseudo-instruction uses an ADD immediate instruction with a zero immediate value.
Refer to the ARM Architectural Reference Manual for more information on the Thumb MOV
instruction.
MOV Rd, Rs ; generates the opcode for ADD Rd, Rs, #0
Preliminary 45
Page 46
ARM7TDMI Core Flash MCU(HMS39C7092)
NOP
Syntax
Usage
NOP generates the preferred Thumb no-operation instruction. This is:
MOV r8,r8
The syntax for NOP is:
NOP
Condition codes are unaltered by NOP
46 Preliminary
Page 47
Flash MCU(HMS39C7092) BUS controller
Chapter 3
BUS Controller
Preliminary 47
Page 48
BUS controller Flash MCU(HMS39C7092)
3.1 Overview
The HMS39C7092 has an on-chip bus controller that manages the external address
space divided into eight areas, which can attaches SRAM, ROM, Flash-memory or
off-chip peripheral devices. The bus specifications, such as bus width and number of
access states, can be set independently for each area, enabling multiple memories to
be connected easily.
3.1.1 Features
The features of the bus controller are listed below.
• 8-bit access or 16-bit access can be selected for each area
(In THUMB mode, only 16-bit accessing of external code memory is allowed)
• A ctive low chip select signals (nCS0 to nCS7) can be output for area 0 to 7
• Bus specifications can be set independently for each area
• Support Little-Endian M emory Format
• Variable wait states (up to 16 waits)
• Bus transfers can be extended using the nWAIT signal. The nWAIT signal
is active LOW
• Each area is 16MB(when SM=’0’ in PMU), or 1MB(when SM=’1’ in PMU) in
Size and can be programmed individually.
nCS[7:0]
SM
MD[2:0]
nAS
nHWR
nLWR
nRD
nWAIT
nBREQ
nBACK
Internal Address BUS
Internal Data BUS
Internal signalsConfiguration Reg.
Bus reset / Clock signal
Access Control signal
BUS size signals
BUS slave signals
Main State
Machine
External BUS
Control
Signals
Wait State
Controller
Bus
Arbiter
Address
Decoder
BUS control
Register
Pack
(BCRn)
Wait
Figure 3.1 Block Diagram of the Bus Controller
48 Preliminary
Page 49
Flash MCU(HMS39C7092) BUS controller
3.1.2 Pin Configuration
Table 3.1 summarizes the input/output pins of the bus controller.
Table 3.1 Bus Controller Pins
Name I/O Function
nCSn O Strobe signals selecting areas 0 to 7
nAS O Strobe signal indicating valid address output on the
address bus
nRD O Strobe signal indicating reading from the external address
space
nHWR O Strobe signal indicating writing to the external address
space, with valid data on the upper data bus (D15 to D8)
nLWR O Strobe signal indicating writing to the external address
space, with valid data on the lower data bus (D7 to D0)
nWAIT I Wait request signal
nBREQ I Request signal for releasing the bus to an external device
nBACK O Acknowledge signal indicating release of the bus to an
external device
Preliminary 49
Page 50
BUS controller Flash MCU(HMS39C7092)
3.2 Bus Controller Registers
The base address for the BUS Controller’s registers is 0x0900_0100. Each
configuration registers (BCR0~7) are assigned to chip selected area, CS0~CS7.
Table 3.2 BUS Controller Register Map
Reg.
BCR0 0x0100 R/W CS0 Bus Configuration Register 0x00F*
BCR1 0x0104 R/W CS1 Bus Configuration Register 0x0
BCR2 0x0108 R/W CS2 Bus Configuration Register 0x0
BCR3 0x010C R/W CS3 Bus Configuration Register 0x0
BCR4 0x0110 R/W CS4 Bus Configuration Register 0x0
BCR5 0x0114 R/W CS5 Bus Configuration Register 0x0
BCR6 0x0118 R/W CS6 Bus Configuration Register 0x0
BCR7 0x011C R/W CS7 Bus Configuration Register 0x0
Notes : 1) In mode 2, the initial value of BCR0 is 0x010F.
2) In mode 3, the initial value of BCR0 is 0x000F.
3) The initial value of the other control registers are 0x0000.
I/O
Offset
Dir. Description
Initial
Value
50 Preliminary
Page 51
Flash MCU(HMS39C7092) BUS controller
3.2.1 Configuration Registers
The configuration register (BCR0~7) is a 16-bit read-write register .
BCR0~7 Bus Configuration Register (0x0900_0100 to 0x0900_011C R/W)
B15 - b9 b8 b7 B6 B5 b4 b3 b2 b1 b0
BCR n
Reset 0000000 1 0 0 0 0 1 1 1 1
Reserved MemWidth Reserved
Initial value : 0x010F (BCR0 at Mode2)
0x000F (BCR0 at Mode3)
0x0000 (BCR1~7)
MemWidth Select the size of the external bus width. When
this bit is 0, means that the MCU interface with 8bit
external bus. When 1, the external bus of the
MCU is 16 bit width bus.
NormWait Select the values of the normal access wait state
0000 : 1 wait state
0001 : 2 wait state
0010 : 3 wait state
0011 : 4 wait state
0100 : 5 wait state
0101 : 6 wait state
0110 : 7 wait state
0111 : 8 wait state
1000 : 9 wait state
1001 : 10 wait state
1010 : 11 wait state
1011 : 12 wait state
1100 : 13 wait state
1101 : 14 wait state
1110 : 15 wait state
1111 : 16 wait state
Reserved Normal Wait
Preliminary 51
Page 52
0x000F FFFF
0x001F FFFF
0x002F FFFF
0x003F FFFF
0x004F FFFF
0x005F FFFF
0x006F FFFF
0x007F FFFF
a) 16- Mbyte modes (Default)
0x00FF FFFF
0x03FF FFFF
b) 1-Mbyte mode
0x0080 0000
0x0070 0000
0x0060 0000
0x0050 0000
0x0040 0000
0x0030 0000
0x0020 0000
0x0010 0000
0x0000 0000
0x0700 0000
0x0600 0000
0x0500 0000
0x0400 0000
0x0300 0000
0x0200 0000
0x0100 0000
0x0000 0000
BUS controller Flash MCU(HMS39C7092)
3.3 Operation
3.3.1 Area Division
The external address space is divided into area 0 to 7. Each area has a size of 16Mbyte modes, or 1-Mbyte modes. Figure 3.2 shows a general view of the memory
map.
nCS7
0x07FF FFFF
Reserved
0x07FF FFFF
nCS6
nCS5
nCS4
nCS3
nCS2
nCS1
nCS0
0x06FF FFFF
0x05FF FFFF
0x04FF FFFF
0x02FF FFFF
0x01FF FFFF
nCS7
nCS6
nCS5
nCS4
nCS3
nCS2
nCS1
nCS1
52 Preliminary
SM=0 in the PMU
Figure 3.2 Access Area Map for Each Operating Mode
Chip select signals (nCS0 to nCS7) can be output for area 0 to 7. The bus
specifications for each area are selected in BCR0 to BCR7.
SM=1 in the PMU
Page 53
Flash MCU(HMS39C7092) BUS controller
3.3.2 Area Division
The external space bus specifications consist of two elements: (1) bus width, (2)
number of wait states.
The bus width and number of access states for on-chip memory and registers are
fixed, and are not affected by the bus controller.
Bus Width: A bus width of 8 or 16 bits can be selected with MemWidth bit-field in
BCR0 to 7. An area for which an 8-bit bus is selected functions as an 8-bit access
space, and an area for which a 16-bit bus is selected functions as a 16-bit access
space.
If all areas are designed for 8-bit access, 8-bit bus mode is set; if any area is
designed for 16-bit access, 16-bit bus mode is set.
Number of Wait States: One to 16 wait states can be selected with NormalWait bitfield in BCR0 to 7. When using nWAIT signal, then wait state is the minimum over
two-states.
3.3.3 Chip Select Signals
For each of areas 0 to 7, the HMS39C7092 can output a chip select signal (nCS0 to
nCS7) that goes low when the corresponding area is selected in expanded mode.
From Figure 3.3 to Figure 3.15 shows the output timing of nCS
Output of nCS0 to nCS7: Output of nCS0 to nCS7 is enabled or disabled in the data
direction register of the corresponding port.
0 ~ 7
signal.
Preliminary 53
Page 54
Byte size
Half-word size
Word size
Lower Byte
1st bus cycle
Lower Byte
2nd bus cycle
Lower Byte
1st bus cycle
Lower Byte
2nd bus cycle
Lower Byte
3rd bus cycle
Lower Byte
4th bus cycle
BUS controller Flash MCU(HMS39C7092)
3.4 Basic Bus Interface
3.4.1 Overview
The HMS39C7092 has only a basic interface that allows direct connection of ROM,
SRAM, off-chip peripheral devices and so on.
3.4.2 Byte Lane Write Control
Data size for the CPU and other internal masters are byte(8-bit), half-word(16-bit),
word(32-bit). The bus controller has a data alignment function, and when accessing
external space, controls whether the upper data bus (D15 to D8) or lower data bus (D7
to D0) is used according to the bus specifications for the area being accessed (8-bit
access area or 16-bit access area) and the data size.
8-Bit Access Areas:Figure 3.3 shows data alignment control for 8-bit access space.
With 8-bit access space, the lower data bus (D7 to D0) is always used for accesses.
The amount of data that can be accessed at one time is one byte: a half -word access
is performed as two byte accesse s, and a word access, as four byte accesses.
Figure 3.3 Access Size and Data Alignment Control (8-Bit Access Area)
Lower Byte
54 Preliminary
Page 55
Byte size
1st bus cycle
Lower Byte
2nd bus cycle
Lower By te
Even Address
Upper Byte
Upper Byte
Flash MCU(HMS39C7092) BUS controller
16-Bit Access Areas: Figure 3.4 shows data alignment control for 16-bit access
areas. With 16-bit access areas, the lower data bus (D7 to D0) and higher data bus
(D15 to D8) are used for accesses. The amount of data that can be accessed at one
time is one byte or one half-word, and a word access is executed as two half-word
accesses.
Half-word size
Word size
Figure 3.4 Access Size and Data Alignment Control (16-Bit Access Area)
nHWR, nLWR signals are generated according to the memory transfer width,
external memory width, A0, and the access sequencing. The following table shows
the basic coding example assuming 16-bit external memory:
Table 3.3 Byte Lane condition by XA[0]
CPU access Size A0 nHWR nLWR
Word (32bit) X Low Low 2
Half-word (16-bit) X Low Low 1
Byte (8bit) 0 High Low 1
Byte (8bit) 1 Low High 1
Odd AddressUpper Byte
Upper Byte
Lower Byte
Lower Byte
Number of
Access
Preliminary 55
Page 56
XIN
nCS
Address
nAS
Data
nHWR
nLWR
n
n + 2
Valid
Valid
nRD
‘1’
XIN
nCS
Address
nAS
Data
nHWR
nLWR
n
n + 2
nRD
‘1’
‘1’
Valid
Valid
BUS controller Flash MCU(HMS39C7092)
3.4.3 Basic Bus Control Signal Timing
16-Bit 1-Wait-Access Areas: Figure 3.5 shows the write timing of bus control
signals for a 16 -Bit 1-wait-access area (in case of 32 -bit word access). Figure 3.6
shows the read timing of bus control signals for a 16-Bit 1-wait-access area (In case
of 32-bit word access). In this case the NormWait value in BCR of this area is ‘0’.
Note: Sequential read access keeps nRD signal to LOW state.
n
Figure 3.5 Bus Control Signal Write Timing for 16-Bit, 1-Wait (Word Access)
n
Figure 3.6 Bus Control Signal Read Timing for 16-Bit, 1-Wait (Word Access)
56 Preliminary
Page 57
Address
nAS
nLWR
n
n + 2
nRD
‘1’
Address
nAS
nHWR
nLWR
n
n + 2
‘1’
‘1’
Flash MCU(HMS39C7092) BUS controller
Figure 3.7 shows the write timing of bus control signals for a 16-Bit 1-wait-access
area (In case of half-word access). Figure 3.8 shows the read timing of bus control
signals for a 16-Bit 1-wait-access area (In case of half-word access).
XIN
nCS
n
Data
nHWR
ValidValid
Figure 3.7 Bus Control Signal Write Timing for 16-Bit, 1-Wait (Half-word Access)
XIN
nCS
n
Data
nRD
Valid
Valid
Figure 3.8 Bus Control Signal Read Timing for 16-Bit, 1-Wait (Half-word Access)
Preliminary 57
Page 58
Data
nLWR
n
nRD
‘1’
‘1’
XIN
nCS
Address
nAS
Data
nHWR
nLWR
n
nRD
Valid
BUS controller Flash MCU(HMS39C7092)
Figure 3.9 shows the write timing of bus control signals for a 16-Bit 1-wait-access
area (In case of byte access). Figure 3.10 shows the read timing of bus control
signals for a 16-Bit 1-wait-access area (In case of byte access).
XIN
nCS
n
nAS
Address
nHWR
Figure 3.9 Bus Control Signal Write Timing for 16-Bit, 1-Wait (Byte Access)
n
Valid
Figure 3.10 Bus Control Signal Read Timing for 16-Bit, 1-Wait (Byte Access)
58 Preliminary
Page 59
XIN
nCS
nAS
Data
nLWR
nRD
n
Valid
Valid
‘1’
Address
nAS
Data
nHWR
n
n + 2
‘1’
‘1’
Valid
Flash MCU(HMS39C7092) BUS controller
Figure 3.11 shows the write timing of bus control signals for a 16-Bit 2-wait-access
area (In case of word access). Figure 3.12 shows the read timing of bus control
signals for a 16-Bit 2-wait-access area (In case of word access).
n
Address
nHWR
n + 2
Figure 3.11 Bus Control Signal Write Timing for 16-Bit, 2-Wait (Word Access)
XIN
nCS
n
Valid
nLWR
nRD
Figure 3.12 Bus Control Signal Read Timing for 16-Bit, 2-Wait (Wo rd Access)
Preliminary 59
Page 60
XIN
nCS
nAS
Data
nLWR
n
Valid
nRD
‘1’
XIN
nCS
Address
nAS
Data
nHWR
nLWR
n
nRD
Valid
BUS controller Flash MCU(HMS39C7092)
Figure 3.13 shows the write timing of bus control signals for a 16-Bit 2-wait-access
area (In case of half-word access). Figure 3.14 shows the read timing of bus control
signals for a 16-Bit 2-wait-access area (In case of half -word access).
n
Address
nHWR
Figure 3.13 Bus Control Signal Write Timing for 16-Bit, 2-Wait (Half-Word Access)
n
Figure 3.14 Bus Control Signal Read Timing for 16-Bit, 2-Wait (Half-Word Access)
60 Preliminary
Page 61
nCS
Address
nAS
nLWR
n
nRD
‘1’
‘1’
XIN
nCS
nAS
n
Flash MCU(HMS39C7092) BUS controller
Figure 3.15 shows the write timing of bus control signals for a 16-Bit 2-wait-access
area (In case of byte access). Figure 3.16 shows the read timing of bus control
signals for a 16-Bit 2-wait-access area (In case of byte access).
XIN
n
Data
nHWR
Valid
Figure 3.15 Bus Control Signal Write Timing for 16-Bit, 2-Wait (Byte Access)
n
Address
Data
nHWR
nLWR
nRD
Figure 3.16 Bus Control Signal Read Timing for 16-Bit, 2-Wait (Byte Access)
Valid
Preliminary 61
Page 62
XIN
Address
Data
nHWR
nLWR
n
‘1’
‘1’
Valid
nWAIT
T1T2Tw
Tw
Tw
T3
BUS controller Flash MCU(HMS39C7092)
3.4.4 Wait Control
When accessing external space, the HMS39C7092 can extend the bus cycle by
inserting wait states (Tw). There are two ways of inserting wait states: (1) program
wait insertion and (2) pin wait insertion using the nWAIT pin.
Program Wait Insertion: From 1 to 16 wait states can be inserted automatically
between the T2 state and T3 state on an individual basis in each access space,
according to the settings of NormWait bit fields in BCR0~7.
Pin Wait Insertion: When external space is accessed in this state, a program wait is
first inserted. If the nWAIT pin is low at the falling edge of XIN in the last T2 or Tw
state, another Tw state is inserted. If the nWAIT pin is held low, Tw states are
inserted until it goes high.
Figure 3.17 shows an example of the timing for insertion of one program wait state in
3-wait-state space.
nCS
n
nAS
nRD
Figure 3.17 Example of Wait State Insertion Timing.
62 Preliminary
Page 63
Flash MCU(HMS39C7092) BUS controller
3.4.5 Bus Arbiter
The bus controller has a built-in bus arbiter that arbitrates between different bus
masters. The bus master can be either the CPU or an external bus master. When a
bus master has the bus right it can carry out read and write operations. Each bus
master uses a bus request signal to request the bus right. At fixed times the bus
arbiter determines priority and uses a bus acknowledge signal to grant the bus to a
bus master, which can operate using the bus.
The bus arbiter checks whether the bus request signal from a bus master is active or
inactive, and returns an acknowledge signal to the bus master. When two or more
bus masters request the bus, the highest-priority bus master receives an
acknowledge signal can continue to use the bus until the acknowledge signal is
deactivated.
The bus master priority order is:
(High) External bus master > ARM CPU (Low)
The bus arbiter samples the bus request signals and determines priority at all times,
but it does not always grant the bus immediately, even when it receives a bus request
a bus master with higher priority than the current bus master. Each bus master has
certain times at which it can release the bus to a higher-priority bus master.
ARM CPU: The ARM CPU is the lowest-priority bus master. If an external bus master
requests the bus while the CPU has the right, the bus arbiter transfers the bus right to
the bus master that requested it. The bus right is transferred at the following times:
l The bus right is transferred at the boundary of a bus cycle. If word data is
accessed by two consecutive byte accesses, however, the bus right is not
transferred between the two byte accesses.
l If another bus master requests the bus while the CPU is performing internal
operations, such as executing a multiply or divide instruction, the b us right
is transferred immediately. The CPU continues its internal operations.
l If another bus master requests the bus while the CPU is in power down
mode, the bus right is transferred immediately.
External Bus Master: The HMS39C7092 can be always release d to an external bus
master. The external bus master has highest priority, and requests the bus right from
the bus arbiter driving the nBREQ signal low. Once the external bus master acquires
the bus, it keeps the bus until the nBREQ signal goes to high. Wh ile the bus is
released to an external bus master, the HMS39C7092 chip holds the address bus,
data bus, bus control signals (nAS, nRD, nHWR, and nLWR ), and chip select signals
(nCS0 to 7), and holds the nBACK pin in the low output state.
The bus arbiter samples the nBREQ pin at the rise of the system clock (XIN). If nBREQ is low, the bus is released to the external bus master at the appropriate
opportunity. The nBREQ signal should be held low until the nBACK goes low.
When the nBREQ pin is high in two consecutive samples, the nBACK pin is driven
high to end the bus-release cycle.
Preliminary 63
Page 64
nCS
nAS
nHWR
nLWR
nRD
‘1’
‘1’
Valid
Tw T3CPU Cycle
External Bus Cycle
nBREQ
nBACK
BUS controller Flash MCU(HMS39C7092)
Figure 3.18 shows the timing when the bus right is requested by an external bus
master during a read cycle in a 1-wait-state access area. There is a minimum interval
of three states from when the nBREQ signal goes low until the bus is released.
XIN
n
Address
Data
Figure 3.18 Example of External Bus Master Operation
T0T1T2Tw
n
64 Preliminary
Page 65
Flash MCU(HMS39C7092) MCU controller
Chapter 4
MCU Controller
Preliminary 65
Page 66
MCU controller Flash MCU(HMS39C7092)
4.1 General Description
The MCU Controller (MCUC) is composed of 11 multi -function pin multiplex control
signal registers and device code register.
4.2 Pin Function Description
Table 4.1 shows Pin function description.
Table 4. 1 Pin Function Descriptions
NAME
Port A
Port B
Port 1
Port 2
Port 3
*XP96/XFVPPD pin is package bonding options
Note: Each port functions are changed by Mode-setting or user definition.
Default functions are showed in 4.3.2 PINMUX Register
Table 4.2 is the memory map of the MCU Controller. The base address of MCU
control Register is 0x0900_0000. Table 4.3 shows the initial value in each mode. The
initial values are different by operation mode.
Table 4.2 Memory map of the MCU Controller
Reg.
PAMR 0x0000 R/W Pin MUX Control Register for Port A
PBMR 0x0004 R/W Pin MUX Control Register for Port B
P1MR 0x0008 R/W Pin MUX Control Register for Port 1
P2MR 0x000C R/W Pin MUX Control Register for Port 2
P3MR 0x0010 R/W Pin MUX Control Register for Port 3
P4MR 0x0014 R/W Pin MUX Control Register for Port 4
P5MR 0x0018 R/W Pin MUX Control Register for Port 5
P6MR 0x001C R/W Pin MUX Control Register for Port 6
P7MR 0x0020 R/W Pin MUX Control Register for Port 7
P8MR 0x0024 R/W Pin MUX Control Register for Port 8
P9MR 0x0028 R/W Pin MUX Control Register for Port 9
DCR 0x002C R MCU Device Code Register
Table 4.3 MCU Controller Initial values in each mode
This Register is read only. Device Code Value is ‘0x3943_7092’
72 Preliminary
Page 73
Flash MCU(HMS39C7092) Power Management Unit
Chapter 5
Power Management Unit
Preliminary 73
Page 74
Register
RESET Filter
Generator
PMU State Machine
MODE
1/2
RESET Filter
XnRES
MODE[2:0]
XTALOUT
XTALIN
SCLK_GEN
CLKIN
SCLK
BCLK
MUX
XCLKOUT
Module Clock
RES_OUT
0
MUX
WDT_Overflow
nFIQ Interrupt
nIRQ Interrupt
Power Management Unit Flash MCU(HMS39C7092)
5.1 General Description
The PMU block provides:
• Clock distribution of all over system
• Reset, RUN and Power down modes control
TEST
Clock Control
RESET
Figure 5.1 PMU Block Diagram
PIN
MUX
Internal System
Internal Blocks
PIN
MUX
RESET
INTC
TIMER
WDT
UART0,1
ADC
74 Preliminary
Page 75
Flash MCU(HMS39C7092) Power Management Unit
5.2 Operation Modes
5.2.1 Introduction
The PMU is consisted of clock controller and reset controller. User can control
internal clocks those are embedded peripherals and main clock of MCU by setting
the registers of PMU. The MCU has three reset sources those are external power-on
reset, soft-reset of PMU, soft-reset of WDT and overflow reset of WDT. And PMU has
status registers that old reset value and PMU status.
To improve power management, support for a power-saving mode where bus clocks
may be disabled (or dropped to lower clock) is included.
The reset and power-down mechanism provides:
• Stable power-up sequence
• Power On Reset
• Soft Reset
Additionally a system bus, once operational, benefits from well-defined modes of
operation:
• RUN
• Power-down mode
5.2.2 Reset and Operation Modes
A set of four use ful states or modes is defined as follows:
RESET
When it is power-on, watchdog timer overflow, watchdog soft-reset or PMU soft-reset,
the MCU is initialized
Power on Reset
This state should be forced by any on-chip power-on-reset cell or external power-on
signal and maintained until bus clock is safe and stable.
The POR is forced to be in an asynchronous start-up condition and must be
recognized by all master and slave devices to disable output drives (and wait for a
valid clock). The MCU is running after 32 clocks end of reset timing that rising edge
of reset signal.
Soft- Reset of PMU
The soft-reset, which may need to apply to allow all soft resetting of the bus for a
number of clock cycles. In this reset states the PMU block initializes all the ASB
blocks, Bus controller, DRAM Controller, DMA Controller, ARM CPU core, and Arbiter,
Decoder.
Preliminary 75
Page 76
Reset
Wake-up
by Interrupt
(nFIQ or nIRQ)
Soft-Reset
Wake-up
by Power-On Reset
Power Management Unit Flash MCU(HMS39C7092)
Overflow and Soft-Reset of Watchdog timer
The watchdog timer can generate reset signal, when timer overflows or sets the
register value. Detailed information are in the watchdog timer manual, please refer to
it.
PDN – Power-Down Mode
When MCU system is in the PDN State, PMU block disables all of the blocks in the
ASB and APB, so the power consumption of system is dramatically low. Although
MCU is in the power down mode, user can set interrupt controller block working in
the power down mode.
Wake-up from the PDN Mode.
The Wake-up is a temporal state for wake-up from power down state through the
interruption. After wake-up state, next state becomes RUN state automatically.
WDT_Overflow
Reset
Power-On
RESET
WDT, PMU
RUN
Figure 5.2 Reset and Power Management State Machine.
Power Down
PMU
Command
76 Preliminary
Page 77
Flash MCU(HMS39C7092) Power Management Unit
5.3 Power Management Unit Register Map
The start address of the PMU(Power Management Unit) is 0x0900_1000.
Table 5.1 Register Map of the PMU
Name I/O Offset DIR Description
PMUCR 0x1000 W PMU operation mode controls register.
PMUSR 0x1000 R PMU status register shows the just previous
PCLKCR 0x1008 R/W Peripheral clock control register .
MEMSR 0x100C R Memory remap status register.
MEMCR 0x1010 W Memory remap control register
RSTCR 0x1030 W Soft-Reset control register
PMU state.
Preliminary 77
Page 78
Power Management Unit Flash MCU(HMS39C7092)
5.4 Register Description
The PMU supplies the clock to all of the blocks in the MCU. The start address of
register is 0x0900_1000.
PMUCR PMU Control Register (0x0900_1000 Write-Only)
b31 - b8 b7 b6 b5 b4 b3 b2 b1 b0
PMUCR Reserved PD
Reset - 0 0 0 0 0 0 0 0
Initial value : 0x -00
PD11 : Entering the Power down Mode
This register controls the operation mode of PMU. When power on reset states,
register value is initialized by Run State (00). If PMUCR is 3, device enters the
PD(Power Down) mode. The other values don’t effect. The address of register is
0x0900_1000.
PMUST PMU Status Register (0x0900_1000 Read -Only)
b31 - b8 b5 b4 b3 b2 b1 b0
PMUST Reserved PMUST ReservedPMUST
Reset - 0 0 - 0 0
Initial value : 0x -00
This register holds the previous status and reset state of PMU. The address of
register is 0x0900_1000.
00 : Clear PMU Status Register
PMUST (Previous Reset Status bits)
00 – The Power-On reset state (nPOR)
01 – PMU Soft-reset state
10 – WDT Soft-reset state
11 – WDT Overflow-reset state
PMUST (PMU Status bits)
00 – Start after Power-On reset
01 – reserved state
10 – reserved state
11 – Start after Power-Down mode
INTC_CC : Interrupt controller clock control register
0 - Interrupt controller use the XIN clock. XIN is not killed at any
mode
1 - Interrupt controller use the BCLK of internal Bus clock. The
WDT_CC : Clock control register of WDT
000 - BCLK
001 - BCLK/2
010 ~ 111 – Reserved
UART_Clk : UART0, 1 clocks on-off control register.
00 - UART0,1 clocks ON
01 - UART1 clock ON, UART0 clock OFF
10 - UART1 clock OFF, UART0 clock ON
11 – UART0,1 clocks OFF
UART_CC : Clocks Control register of UART.
000 - BCLK
001 - BCLK/2
010 ~ 111 – Reserved
TIMER_CC : Clocks Control register of TIMER.
000 - BCLK
001 - BCLK/2
010 ~ 111 – Reserved
ADC_CC : Clocks Control register of ADC.
Values are same as WDT_CC
Bus clock is killed when Power-down mode
Preliminary 79
Page 80
Power Management Unit Flash MCU(HMS39C7092)
MEMCR Memory map Control Register (0x0900_1010 Write-Only)
MEMSR Memory map Status Register (0x0900_100C Read -Only)
b31 - b3 b2 b1 b0
MEMCR
MEMSR
Reset - 0 0 0
RSTCR Soft-Reset Control Register (0x0900_1030 R/W)
b31 - b1 b0
RSTCR ReservedRSTCR
Reset - 0
Reserved SM On-FlashREMAP
Initial value : 0x -0
In write operation, the address of register is 0x0900_1010 and in read operation,
the address of register is 0x0900_100C.
SM : External bus controller mapping change.
0 - Each nCS0 ~ nCS7 of address space is 16MB
size
1 - Each nCS0 ~ nCS7 of address space is 1MB
size
On-Flash : Re-mapping of Flash start address to 0x0 in MODE
6 and 7.
0 - Default value.
1 - Re-mapping of Flash start address to 0x0 in the
memory map. It is valid at MODE 6 and 7.
REMAP : Re-map internal SRAM address location.
0 - Default value.
1 – Re-mapping of internal SRAM start address to
0x0 in the memory map. It is used at MODE
2,3,4,5,6 and 7.
Initial value : 0x -0
RSTCR1 : Normal reset 0 : Normal
This register is used for generating the Soft-reset operation. The MCU is entered in
reset state, when this register is set to high, it is cleared automatically at the end of
Soft-Reset procedure. The address is 0x 0900_1030.
80 Preliminary
Page 81
Flash MCU(HMS39C7092) Power Management Unit
5.5 Signal Timing Diagram
The PMU signal timing is as shown below.
5.5.1 Power on Reset
5.5.2 Watch Dog Timer Overflow
CLKIN
XnRES
32 clks
BnRES
Figure 5.3 Power on Reset Timing Diag ram
BCLK
WD_OF_IN
WD_OF_OUT 256 clks
BnRES
Figure 5.4 Watch Dog Timer Overflow Timing Diagram
512 clks
Preliminary 81
Page 82
Power Management Unit Flash MCU(HMS39C7092)
5.5.3 Soft-Reset
There are two Soft-Reset cases. The first Soft-Reset operation is switched by
MAN_RST signal from WDT.
Another case is from PMU reset control register.
BCLK
MAN_RST
BnRES512 clks
Figure 5.5 Soft Reset (from WDT) Timing Diagram
BCLK
RSTCR
BnRES
Figure 5.6 Soft Reset (from PMU) Timing Diagram
512 clks
82 Preliminary
Page 83
Flash MCU(HMS39C7092) Interrupt controller
Chapter 6
The Interrupt Controller
Preliminary 83
Page 84
Control
Control
Control
Control
21 21
Interrupt controller Flash MCU(HMS39C7092)
6.1 About the Interrupt controller
The interrupt controller has the following features :
• Asynchronous interrupt controller
• 8 external interrupt sources
• 13 internal interrupt sources
• Low interrupt s latency
• Selection of the active modes of all interrupt s source inputs
(Level or Edge trigger)
• Mask-able for each interrupt source and output signal
• Selection of the output paths (IRQ or FIQ for each interrupt source)
The interrupt controller provides interface between multiple interrupt sources and the
processor. The interrupt controller supports internal and external interrupt sources.
Internally there are 11 peripheral interrupt sources. Externally there are 8 interrupt
sources. Therefore certain interrupt bits can be defined for the basic functionality
required in any system, while the remaining bits are available for use by other
devices in any particular implementation.
Table 6.1 Interrupt Controller Default Setting Value
The Users can set the active mode of all interrupt source inputs. The default mode is
the falling -edge trigger mode. Any inversion or latching required to providing edge
sensitivity must be provided at the generating source of the interrupt.
No hardware priority scheme or any form of interrupt vectoring is provided, but the
priority can be determined using FIQ mask regis ter and IRQ mask register under
software control.
FIQ mask register and IRQ mask register are also provided to generate an interrupt
under software control. Typically these registers may be used to determine either a
FIQ interrupt or an IRQ interrupt.
6.1.2 Interrupt Control
The interrupt controller provides the interrupt source status and the interrupt request
status. The interrupt mask register s are used to determine whether an active interrupt
source should generate an interrupt request to the process or or not. A logic-level
HIGH in the interrupt mask register indicates that the interrupt source is masked and
then doesn‘t generate a request.
FIQ mask register and IRQ mask register indicate whether the interrupt source
caus es a processor interrupt or not.
Preliminary 85
Page 86
Interrupt controller Flash MCU(HMS39C7092)
The interrupt modes are configurable by interrupt trigger mode register and interrupt
trigger polarity register. And Interrupt direction register indicates whether each
interrupt source drives IRQ or FIQ.
The FIQ and IRQ status register is used to refl ect the status of all channels set to
produce an FIQ interrupt or IRQ interrupt. And the status registers are cleared by
writing ‘1’ to the status clear register in the edge trigger mode only.
Bit 20 is used as a software interrupt source. When source mask control register bit
20 is HIGH, an interrupt request occurs. To disable the software interrupt, Source
Mask Control Register bit 20 should be Low. Software interrupt source input is fixed
active HIGH and level sensitive.
86 Preliminary
Page 87
b14
b14
Flash MCU(HMS39C7092) Interrupt controller
6.2 Interrupt Controller Registers
The start address of the interrupt controller is 0x0900_1200. The offset of any
particular register from the start address is fixed. The following registers are
provided for both FIQ and IRQ interrupt controllers:
Initial value : 0x 01FFFFF Bit field I0-I24 1 : Mask
0 : Unmask
The interrupt mask register is used to mask the interrupt input sources and defines
which active sources will generate an interrupt request to the processor. If certain bits
within the interrupt controller are not implemented, the corresponding bits in the
interrupt mask register must be masked. A bit value 0 indicates that the interrupt is
unmasked and will allow an interrupt request to reach the processor. A bit value 1
indicates that the interrupt is masked. Once a bit is masked, the corresponding bit in
the status register is cleared. On reset, all interrupt input -sources are masked.
Initial value : 0x 0100000 Bit field I0-I24 1 : Level Trigger Mode
0 : Edge Trigger Mode
The interrupt trigger mode register is used to configure the interrupts with the
interrupt trigger polarity register. Each interrupt can be configured to level or edge
triggered. A bit value 0 indicates that the interrupt is configured to edge triggered and
a bit value 1 indicates that the interrupt is configured to level triggered. On reset, all
interrupt input sources are configured to edge triggered.
Initial value : 0x 01000000 Bit field I0-I24 1 : High/Rising Edge
0 : Low/Falling Edge
The interrupt trigger polarity register is used to configure the interrupts with the
interrupt trigger mode register. Each interrupt can be configured to rising/high or
falling/low active. A bit value 0 indicates that the interrupt is configured to falling
active for edge trigger mode and to low active for level trigger mode. A bit value 1
indicates that the interrupt is configured to rising active for edge trigger mode and to
high active for level trigger mode. On reset, all interrupt input sources are configured
to falling/low active.
Table 6.3 Interrupt Source Trigger Mode
DETECTION MODE TMR TPR
Falling-Edge (Default) 0 0
Rising-Edge 0 1
Low-Level 1 0
High-Level 1 1
IDR Interrupt Direction Reg ister (0x0900_120C R/W)
Initial value : 0x 00000000 Bit field I0-I24 1 : Direction to FIQ
0 : Direction to IRQ
The interrupt direction register is used to determine whether each interrupt source
drives IRQ or FIQ. A bit value 0 indicates that the interrupt is driven to IRQ and a bit
value 1 indicates that the interrupt is driven to FIQ. On reset, all interrupt input
sources drive IRQ.
Initial value : 0x 00000000 Bit field I0-I24 1 : FIQ Pending
0 : FIQ Idle
The FIQ status register is used to reflect the status of all channels set to produce an
FIQ interrupt (IDRn = 1). When an interrupt is set for an FIQ occurring, the
corresponding bit is set in FIQ status register. The interrupt handler will examine this
register to determine the channel(s) that caused the FIQ interrupt. When the status
clear register is written to ‘1’, the corresponding bit is cleared if that channel is
configured to edge trigger mode. A HIGH bit indicates that the interrupt is active and
will generate an interrupt to the processor.
Initial value : 0x 00000000 Bit field I0-I24 1 : IRQ Pending
0 : IRQ Idle
The IRQ status register is used to reflect the status of all channels set to produce an
IRQ interrupt (IDR(i) = 0). When an interrupt is set for an IRQ occurring, the
corresponding bit is set in IRQ status register. The interrupt handler will examine this
register to determine the channel(s) that caused the IRQ interrupt. When the status
clear register is written to ‘1’, the corresponding bit is cleared if that channel is
configured to edge trigger mode. A HIGH bit indicates that the interrupt is active and
will generate an interrupt to the processor.
Initial value : 0x 00000000 Bit field I0-I24 1 : Disable FIQ
0 : Enable FIQ
The FIQ request mask register is used to mask the request to generate an interrupt
to a processor. If certain bits within the interrupt controller are not implemented, the
corresponding bits in the FIQ reques t mask register must be masked. A bit value 0
indicates that the interrupt is unmasked and will allow an interrupt request to reach
the processor. A bit value 1 indicates that the interrupt is masked. On reset, all FIQ
requests are unmasked.
Initial value : 0x 00000000 Bit field I0-I24 1 : Disable IRQ
0 : Enable IRQ
The IRQ request mask register is used to mask the request to generate an interrupt
to a processor. If certain bits within the interrupt controller are not implemented, the
corresponding bits in the IRQ request mask register must be masked. A bit value 0
indicates th at the interrupt is unmasked and will allow an interrupt request to reach
the processor. A bit value 1 indicates that the interrupt is masked. On reset, all IRQ
requests are unmasked.
ISCR Interrupt Status Clear Register (0x0900_1220 Write Only)
Initial value : 0x 00000000 Bit field I0-I24 1 : Clear Interrupt Status
0 : No action
The status clear register is used to clear bits in the status register configured to the
edge trigger mode. If the channels are configured to the level trigger mode, the
corresponding bits in the FIQ status register and the IRQ status register have no
effect. This register is cleared when this register is written to ‘1’. When writing to this
register, each data bit that is HIGH causes the corresponding bit in the status register
to be cleared. Data bits that are LOW have no effect on the corresponding bit in the
status register. Note that the status clear register has an effect on the status register
in the edge trigger mode.
b13b12b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
b13b12b11 b10 B9 b8 b7 b6 b5 B4 b3 b2 b1 b0
90 Preliminary
Page 91
Flash MCU(HMS39C7092) Watchdog Timer
Chapter 7
Watchdog Timer
Preliminary 91
Page 92
Watchdog Timer Flash MCU(HM S39C7092)
7.1 General Description
The watchdog timer has:
• watchdog timer mode and interval timer mode
• interrupt signal INT_WDT to interrupt controller in the watchdog timer mode &
interval timer mode
• output signal PORESET and MNRESET to PMU(Power Management Unit)
• eight counter clock sources
• selection whether to reset the chip internally or not
• two types of reset signal : power-on reset and manual reset
System Clock
PORST
INT_WDT
MNRST
Figure 7.1 Watchdog Timer Module Block Diagram
Clock
Generation
Reset
Control
Control Logic
Overflow
RSTSR
Module data bus
TCNT : Timer Counter (8-bit)
TRCR : Timer/Reset Control Register (8-bit)
RSTSR : Reset Status Register (2-bit)
Clock
Selection
Interrupt
Control
TCNT
Clock
TRCR
Bus
Interface
Internal
Signals
92 Preliminary
Page 93
Flash MCU(HMS39C7092) Watchdog Timer
7.2 Watchdog Timer Introduction
The HMS39C7092 has a one-channel watchdog timer(WDT) for monitoring system
operations. If a system becomes uncontrolled and the timer counter overflows without
being rewritten correctly by the CPU, an reset signal is output to PMU.
When this watchdog function is not needed, the WDT can be used as an interval
timer. In the interval timer operation, an interval timer interrupt is generated at each
counter overflow.
The WDT has a clock generator which produces eight counter clock sources. The
clock signals are obtained by dividing the frequency of the system clock. Users can
select one of eight internal clock sources for input to the WTCNT by CKS2 - CKS0 in
the WTCR.
Preliminary 93
Page 94
value
WTCNT
Watchdog Timer Flash MCU(HM S39C7092)
7.3 Watchdog Timer Operation
The Watchdog Timer Mode
To use the WDT as a watchdog timer, set the WT/nIT and TMEN bits of the WTCR to
1. Software must prevent WTCNT overflow by rewriting the TCNT value(normally by
writing 0x00) before overflow occurs. If the WTCNT fails to be rewritten and overflow
due to a system crash or the like, INT_WDT signal and PORESET/MNRESET signal
are output. The INT_WDT signal is not output if INTEN is disabled (INTEN = 0).
WTCNT
WT/nIT = 1
0xFF
0x00
0x00 written in
TMEN = 1
FAULT and internal reset generated
WTOVF = 1
Figure 7.2 Operation in the Watchdog Timer Mode
If the RSTEN bit in the WTCR is set to 1, a signal to reset the chip will be generated
internally when TCNT overflows. Either a power-on reset or a manual reset can be
selected by the RSTSEL bit.
Time
94 Preliminary
Page 95
Flash MCU(HMS39C7092) Watchdog Timer
The Interval Timer Mode
To use the WDT as an interval timer, clear WT/nIT to 0 and set TMEN to 1. A
watchdog timer interrupt (INT_WDT) is generated each time the timer counter
overflows. This function can be used to generate interval timer interrupts at regular
intervals.
WTCNT
value
WT/nIT = 0
0xFF
0x00
TMEN = 1
ITOVF = 1
WDTINT generated
Figure 7.3 Operation in the Interval Timer Mode
7.3.1 Timing of Setti ng and Clearing the Overflow Flag
Timing of setting the overflow flag
In the interval timer mode when the WTCNT overflows, the ITOVF flag is set to 1 and
watchdog timer interrupt (INT_WDT) is requested.
In the watchdog timer mode when the WTCNT overflows, the WTOVF bit of the SR is
set to 1 and a WDTOUT signal is output. When RSTEN bit is set to 1, WTCNT
overflow enables an internal reset signal to be generated for the entire chip.
Timing of clearing the overflow flag
When the Reset Status Register (WRSR) is read, the overflow flag is cleared.
Time
Preliminary 95
Page 96
Watchdog Timer Flash MCU(HM S39C7092)
7.4 Watchdog Timer Memory Map
The WDT has five registers. They are used to select the internal clock source, switch
to the WDT mode, control the reset signal, and test it. The start address of the
watchdog timer is fixed to 0x0900_1100 and the offset of any particular register from
the base address is fixed.
Table 7.1 Memory Map of the Watchdog Timer APB Peripheral
Name I/O Offset DIR Description
WTCR 0x1100 R/W WDT control. (8-bit)
WRSR 0x1104 R WDT Reset status reg. (2-bit)
WTCNT 0x1108 R/W WDT Timer counter. (8-bit)
96 Preliminary
Page 97
Flash MCU(HMS39C7092) Watchdog Timer
7.5 Watchdog Timer Register Descriptions
The following registers are provided for watchdog timer:
WTCR Watchdog Timer Control Register ( 0x0900_1100 R/W )
000 SYSCLK / 2 12.8 us
001 SYSCLK / 8 51.2 us
010 SYSCLK / 32 204.8 us
011 SYSCLK / 64 409.6 us
100 SYSCLK / 256 1.64 ms
101 SYSCLK / 512 3.28 ms
110 SYSCLK / 2048 13.11 ms
111 SYSCLK / 8192 52.43 ms
Initial value : 0x -0 1 : Overflowed
0 : Normal
WTOVF : Watchdog timer overflow flag. Indicates
that the WTCNT has overflowed in the watchdog
timer mode.
ITOVF : Interval timer overflow flag. Indicates that the
WTCNT has overflowed in the watchdog timer
mode.
Two-bit read only register. The WRSR indicates whether WTCNT is overflowed or not.
The WRSR is initialized to 0x0 by the reset signal, nB_RES.
Bit 0 (WTOVF) indicates that the WTCNT has overflowed in the watchdog timer
mode. Bit 1 (ITOVF) indicates that the WTCNT has overflowed in the interval timer
mode.
98 Preliminary
Page 99
Flash MCU(HMS39C7092) Watchdog Timer
WTCNT Watchdog Timer Counter ( 0x0900_1108 R/W )
b31 - b8 b7 b6 b5 b4 b3 b2 b1 b0
WTCNT Reserved I7 I6 I5 I4 I3 I2 I1 I0
Reset - 0 0 0 0 0 0 0 0
Initial value : 0x -00 Bit field I0-I7
8-bit readable and writable upcounter. When the timer is enabled, the timer counter
starts counting pulse of the selected clock source. When the value of the WTCNT
changes from 0xFF-0x00(overflows), a watchdog timer overflow signal is generated
in the both timer modes. The WTCNT is initialized to 0x00 by a power-reset
(nB_RES).
Preliminary 99
Page 100
WTCR
WDTINT
WRSR
PORESET
MNRESET
OVERFLOW
WTCNT
SCLK
MAIN-CLK
FE
FF
00
01
10
11
12
13
14 ‘0‘0’
0xA0
0xA0
2’b00
2’b10
2’b00
Read RSTSR
Watchdog Timer Flash MCU(HM S39C7092)
7.6 Examples of Register Setting
7.6.1 Interval Timer Mode
WTCNT = 0x00
WTCR = 0xA0
Figure 7.4 Interrupt Clear in the Interval Timer Mode
100 Preliminary
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.