V850es/jc3-H, V850es/je3-H
V850es/jc3-H, V850es/je3-H
V850ES/JC3-H, V850ES/JE3-H
32 User’s Manual: Hardware
RENESAS MCU
V850ES/Jx3-H Microcontrollers
V850ES/JC3-H V850ES/JE3-H
μPD70F3809 μPD70F3820
μPD70F3810 μPD70F3821
μPD70F3811 μPD70F3822
μPD70F3812 μPD70F3823
μPD70F3813 μPD70F3824
μPD70F3814 μPD70F3825
μPD70F3815
μPD70F3816
μPD70F3817
μPD70F3818
μPD70F3819
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).
(Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its majority-
owned subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
NOTES FOR CMOS DEVICES
Readers This manual is intended for users who wish to understand the functions of the
V850ES/JC3-H and V850ES/JE3-H and design application systems using the
V850ES/JC3-H and V850ES/JE3-H.
Purpose This manual is intended to give users an understanding of the hardware functions of the
V850ES/JC3-H and V850ES/JE3-H shown in the Organization below.
Organization The manual of these products is divided into two volumes: Hardware (this volume) and
Architecture (V850ES Architecture User’s Manual).
Hardware Architecture
How to Read This Manual It is assumed that the readers of this manual have general knowledge in the fields of
electrical engineering, logic circuits, and microcontrollers.
Register format
→ The name of the bit whose number is in angle brackets (<>) in the figure of the register
format of each register is defined as a reserved word in the device file.
The “yyy bit of the xxx register” is described as the “xxx.yyy bit” in this manual. Note with
caution that if “xxx.yyy” is described as is in a program, however, the compiler/assembler
cannot recognize it correctly.
The mark <R> shows major revised points. The revised points can be easily searched
by copying an “<R>” in the PDF file and specifying it in the “Find what: ” field.
Conventions Data significance: Higher digits on the left and lower digits on the right
Active low representation: xxx (overscore over pin or signal name)
Memory map address: Higher addresses on the top and lower addresses on the
bottom
Note: Footnote for item marked with Note in the text
Caution: Information requiring particular attention
Remark: Supplementary information
Numeric representation: Binary ... xxxx or xxxxB
Decimal ... xxxx
Hexadecimal ... xxxxH
Prefix indicating power of 2
(address space, memory
capacity): K (kilo): 210 = 1,024
M (mega): 220 = 1,0242
G (giga): 230 = 1,0243
Related Documents The related documents indicated in this publication may include preliminary versions.
However, preliminary versions are not marked as such.
CHAPTER 1 INTRODUCTION................................................................................................................. 21
1.1 General ...................................................................................................................................... 21
1.2 Features .................................................................................................................................... 25
1.3 Application Fields .................................................................................................................... 27
1.4 Ordering Information ............................................................................................................... 27
1.5 Pin Configuration (Top View).................................................................................................. 29
1.6 Function Block Configuration................................................................................................. 36
1.6.1 Internal block diagram.....................................................................................................................36
1.6.2 Internal units ...................................................................................................................................39
CHAPTER 15 D/A CONVERTER (V850ES/JC3-H (48 pin), V850ES/JE3-H only) ............................ 667
15.1 Functions ................................................................................................................................ 667
15.2 Configuration.......................................................................................................................... 667
15.3 Registers ................................................................................................................................. 668
15.4 Operation ................................................................................................................................ 670
15.4.1 Operation in normal mode.............................................................................................................670
15.4.2 Operation in real-time output mode...............................................................................................670
15.4.3 Cautions........................................................................................................................................671
CHAPTER 1 INTRODUCTION
The V850ES/JC3-H and V850ES/JE3-H are products in the low-power series of Renesas Electronics’ V850 single-chip
microcontrollers designed for real-time control applications.
1.1 General
The V850ES/JC3-H and V850ES/JE3-H are 32-bit single-chip microcontrollers that use the V850ES CPU core and
incorporate peripheral functions such as ROM/RAM, a timer/counter, serial interfaces, an A/D converter, a D/A converter, a
DMA controller, CAN, and a USB function controller.
In addition to high real-time response characteristics and 1-clock-pitch basic instructions, the V850ES/JC3-H and
V850ES/JE3-H feature multiply instructions realized by a hardware multiplier, saturated operation instructions, and bit
manipulation instructions.
Table 1-1 lists the products of the V850ES/JC3-H (40 pin), Table 1-2 lists the products of the V850ES/JC3-H (48 pin),
and Table 1-3 lists the products of the V850ES/JE3-H.
Note The figures in parentheses indicate the number of external interrupts that can release STOP mode.
Note The figures in parentheses indicate the number of external interrupts that can release STOP mode.
Notes 1. The figures in parentheses indicate the number of external interrupts that can release STOP mode.
2. Including NMI.
3. μ PD70F3824 only
1.2 Features
{ Minimum instruction execution time: 20.8 ns (main clock (fXX) = 48 MHz: VDD = 2.85 to 3.6 V)
30.5 μs (subclock (fXT) = 32.768 kHz)
{ General-purpose registers: 32 bits × 32 registers
{ CPU features: Signed multiplication (16 × 16 → 32): 1 or 2 clocks
Signed multiplication (32 × 32 → 64): 1 to 5 clocks
Saturated operations (overflow and underflow detection functions included)
32-bit shift instruction: 1 clock
Bit manipulation instructions
Load/store instructions with long/short format
{ Memory space: 64 MB of linear address space (for programs and data)
• Internal memory: RAM: 8/16/24 KB (see Table 1-1, Table 1-2 and Table 1-3)
Flash memory: 16/32/64/128/256 KB (see Table 1-1, Table 1-2 and Table 1-3)
{ Interrupts and exceptions:
Internal External
Non-maskable Maskable Total Non-maskable Maskable Total
V850ES/JC3-H μ PD70F3809 1 51 52 − 10 10
(40 pin) μ PD70F3810 1 51 52 − 10 10
μ PD70F3811 1 51 52 − 10 10
μ PD70F3812 1 51 52 − 10 10
μ PD70F3813 1 51 52 − 10 10
V850ES/JC3-H μ PD70F3814 1 52 53 − 10 10
(48 pin) μ PD70F3815 1 52 53 − 10 10
μ PD70F3816 1 52 53 − 10 10
μ PD70F3817 1 52 53 − 10 10
μ PD70F3818 1 52 53 − 10 10
μ PD70F3819 1 56 57 − 10 10
V850ES/JE3-H μ PD70F3820 1 52 53 1 11 11
μ PD70F3821 1 52 53 1 11 11
μ PD70F3822 1 52 53 1 11 11
μ PD70F3823 1 52 53 1 11 11
μ PD70F3824 1 52 53 1 11 11
μ PD70F3825 1 56 57 1 11 11
Software exceptions: 32 sources
Exception trap: 2 sources
{ I/O lines: I/O ports: 25 (V850ES/JC3-H (40 pin))
32 (V850ES/JC3-H (48 pin))
45 (V850ES/JE3-H)
{ Timer function: 16-bit interval timer M (TMM): 4 channels
16-bit timer/event counter AA (TAA): 4 channels
16-bit timer/event counter AB (TAB): 1 channel
Notes1. In the μ PD70F3819 and 70F3825, one channel is shared with CAN.
2. μ PD70F3819, 70F3825 only
3. V850ES/JC3-H (48 pin), V850ES/JE3-H only
Equipment requiring a USB interface such as PC peripheral, Healthcare, OA, Consumer, USB interface.
• V850ES/JE3-H
P911/SOF3/RXDC2/INTP15
P910/SIF3/TXDC2/INTP14
PDL5/FLMD1
P913/INTP16
P912/SCKF3
P74/ANI4
P73/ANI3
P72/ANI2
P71/ANI1
P70/ANI0
40
39
38
37
36
35
34
33
32
31
AVREF0 1 30 P97/TIAA20/TOAA20
exposed die pad
AVSS 2 29 P96/TIAA21/TOAA21/INTP11
VDD 3 28 FLMD0Note2
Note1
REGC 4 27 P56/INTP05/DRST
VSS 5 26 P55/SCKF2/KR5/RTP05/DMS
X1 6 25 P54/SOF2/KR4/RTP04/DCK
X2 7 24 P53/SIF2/KR3/RTP03/DDO
RESET 8 23 P52/KR2/RTP02/DDI
XT1 9 22 P42/SCKF0/INTP10
XT2 10 21 P41/SOF0/RXDC4/SCL01
11
12
13
14
15
16
17
18
19
20
P40/SIF0/TXDC4/SDA01
P32/ASCKC0/SCKF4/TIAA00/TOAA00
P31/RXDC0/SIF4/INTP08
P30/TXDC0/SOF4/INTP07
P34/TIAA10/TOAA10/INTP09
VSS
EVDD
UDPF
UDMF
P03/INTP02/ADTRG/UCLK
P911/SOF3/RXDC2/INTP15
P910/SIF3/TXDC2/INTP14
P94/TENC00/EVTT0
PDL5/FLMD1
P913/INTP16
P912/SCKF3
P75/ANI5
P74/ANI4
P73/ANI3
P72/ANI2
P71/ANI1
P70/ANI0
48
47
46
45
44
43
42
41
40
39
38
37
36 P93/TECR0/TIT00/TOT01
AVREF0 1
35 P92/TENC01/TIT01/TOT01
AVSS 2
34 P97/TIAA20/TOAA20
P10/ANO0 3
33 P96/TIAA21/TOAA21/INTP11
AVREF1 4
32 FLMD0Note1
VDD 5
31 P56/INTP05/DRST
REGCNote2 6
30 P55/SCKF2/KR5/RTP05/DMS
VSS 7
29 P54/SOF2/KR4/RTP04/DCK
X1 8
28 P53/SIF2/KR3/RTP03/DDO
X2 9
27 P52/KR2/RTP02/DDI
RESET 10
26 P42/SCKF0/INTP10
XT1 11
25 P41/SOF0/RXDC4/SCL01
XT2 12
13
14
15
16
17
18
19
20
21
22
23
24
P40/SIF0/TXDC4/SDA01
P32/ASCKC0/SCKF4/TIAA00/TOAA00
P31/RXDC0/SIF4/INTP08
P30/TXDC0/SOF4/INTP07
P37/RXDC3/SDA00/CRXD0Note3
Note3
P34/TIAA10/TOAA10/INTP09
VSS
EVDD
UDPF
UDMF
P03/INTP02/ADTRG/UCLK
P36/TXDC3/SCL00/CTXD0
P911/SOF3/RXDC2/INTP15
P910/SIF3/TXDC2/INTP14
P94/TENC00/EVTT0
PDL5/FLMD1
P913/INTP16
P912/SCKF3
P75/ANI5
P74/ANI4
P73/ANI3
P72/ANI2
P71/ANI1
P70/ANI0
48
47
46
45
44
43
42
41
40
39
38
37
36 P93/TECR0/TIT00/TOT01
AVREF0 1
exposed die pad 35 P92/TENC01/TIT01/TOT01
AVSS 2
34 P97/TIAA20/TOAA20
P10/ANO0 3
33 P96/TIAA21/TOAA21/INTP11
AVREF1 4
32 FLMD0Note1
VDD 5
31 P56/INTP05/DRST
REGCNote2 6
30 P55/SCKF2/KR5/RTP05/DMS
VSS 7
29 P54/SOF2/KR4/RTP04/DCK
X1 8
28 P53/SIF2/KR3/RTP03/DDO
X2 9
27 P52/KR2/RTP02/DDI
RESET 10
26 P42/SCKF0/INTP10
XT1 11
25 P41/SOF0/RXDC4/SCL01
XT2 12
13
14
15
16
17
18
19
20
21
22
23
24
P40/SIF0/TXDC4/SDA01
P32/ASCKC0/SCKF4/TIAA00/TOAA00
P31/RXDC0/SIF4/INTP08
P30/TXDC0/SOF4/INTP07
Note3
P36/TXDC3/SCL00/CTXD0Note3
P34/TIAA10/TOAA10/INTP09
VSS
EVDD
UDPF
UDMF
P03/INTP02/ADTRG/UCLK
P37/RXDC3/SDA00/CRXD0
• V850ES/JE3-H
64-pin plastic LQFP (fine pitch) (10 × 10)
μ PD70F3820GB-GAH-AX μ PD70F3821GB-GAH-AX μ PD70F3822GB-GAH-AX
μ PD70F3823GB-GAH-AX μ PD70F3824GB-GAH-AX μ PD70F3825GB-GAH-AX
P911/SOF3/RXDC2/INTP15
P910/SIF3/TXDC2/INTP14
P913/TOAB1OFF/INTP16
P94/TENC00/EVTT0
PDL5/FLMD1
P912/SCKF3
P79/ANI9
P78/ANI8
P77/ANI7
P76/ANI6
P75/ANI5
P74/ANI4
P73/ANI3
P72/ANI2
P71/ANI1
P70/ANI0
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
AVREF0 48 P93/TECR0/TIT00/TOT01
1
AVSS 47 P92/TENC01/TIT01/TOT01
2
P10/ANO0 46 P97/TIAA20/TOAA20
3
AVREF1 45 P96/TIAA21/TOAA21/INTP11
4
VDD 44 EVDD
5
REGCNote2 43 VSS
6
VSS 42 FLMD0Note1
7
X1 41 P56/INTP05/DRST
8
X2 40 P55/SCKF2/KR5/RTP05/DMS
9
RESET 39 P54/SOF2/KR4/RTP04/DCK
10
XT1 38 P53/SIF2/KR3/RTP03/DDO
11
XT2 37 P52/KR2/RTP02/DDI
12
P60/TOAB1T1/TIAB11/TOAB11 36 P35/TIAA11/TOAA11/RTC1HZ
13
P61/TOAB1B1/TIAB10/TOAB10 35 P33/TIAA01/TOAA01/RTCDIV/RTCCL
14
P62/TOAB1T2/TOAB12/TIAB12 34 P42/SCKF0/INTP10
15
P63/TOAB1B2/TRGAB1 33 P41/SOF0/RXDC4/SCL01
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
P40/SIF0/TXDC4/SDA01
P32/ASCKC0/SCKF4/TIAA00/TOAA00
P31/RXDC0/SIF4/INTP08
P30/TXDC0/SOF4/INTP07
P37/RXDC3/SDA00/CRXD0Note3
P36/TXDC3/SCL00/CTXD0Note3
P34/TIAA10/TOAA10/TOAA1OFF/INTP09
VSS
EVDD
UVDD
UDPF
UDMF
P03/INTP02/ADTRG/UCLK
P02/NMI
P65/TOAB1B3/EVTAB1
P64/TOAB1T3/TOAB13/TIAB13
• V850ES/JE3-H
64-pin plastic WQFN (9 × 9)
μ PD70F3820K8-6B4-AX μ PD70F3821K8-6B4-AX μ PD70F3822K8-6B4-AX
μ PD70F3823K8-6B4-AX μ PD70F3824K8-6B4-AX μ PD70F3825K8-6B4-AX
P911/SOF3/RXDC2/INTP15
P910/SIF3/TXDC2/INTP14
P913/TOAB1OFF/INTP16
P94/TENC00/EVTT0
PDL5/FLMD1
P912/SCKF3
P79/ANI9
P78/ANI8
P77/ANI7
P76/ANI6
P75/ANI5
P74/ANI4
P73/ANI3
P72/ANI2
P71/ANI1
P70/ANI0
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
AVREF0 48 P93/TECR0/TIT00/TOT01
1
AVSS exposed die pad 47 P92/TENC01/TIT01/TOT01
2
P10/ANO0 46 P97/TIAA20/TOAA20
3
AVREF1 45 P96/TIAA21/TOAA21/INTP11
4
VDD 44 EVDD
5
REGCNote2 43 VSS
6
VSS 42 FLMD0Note1
7
X1 41 P56/INTP05/DRST
8
X2 40 P55/SCKF2/KR5/RTP05/DMS
9
RESET 39 P54/SOF2/KR4/RTP04/DCK
10
XT1 38 P53/SIF2/KR3/RTP03/DDO
11
XT2 37 P52/KR2/RTP02/DDI
12
P60/TOAB1T1/TIAB11/TOAB11 36 P35/TIAA11/TOAA11/RTC1HZ
13
P61/TOAB1B1/TIAB10/TOAB10 35 P33/TIAA01/TOAA01/RTCDIV/RTCCL
14
P62/TOAB1T2/TOAB12/TIAB12 34 P42/SCKF0/INTP10
15
P63/TOAB1B2/TRGAB1 33 P41/SOF0/RXDC4/SCL01
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
P40/SIF0/TXDC4/SDA01
P32/ASCKC0/SCKF4/TIAA00/TOAA00
P31/RXDC0/SIF4/INTP08
P30/TXDC0/SOF4/INTP07
P37/RXDC3/SDA00/CRXD0Note3
P36/TXDC3/SCL00/CTXD0Note3
P34/TIAA10/TOAA10/TOAA1OFF/INTP09
VSS
EVDD
UVDD
UDPF
UDMF
P03/INTP02/ADTRG/UCLK
P02/NMI
P65/TOAB1B3/EVTAB1
P64/TOAB1T3/TOAB13/TIAB13
8
7
6
5
4
3
2
1
A B C D E F G H H G F E D C B A
Pin names
16-bit timer/
counter T:
1 ch Ports CLKOUT
oscillator
Internal
CRC
XT1
CG
WDT CG XT2
X1
PDL5
P96 , P97 ,P910 to P913
P70 to P74
P52 to P56
P40 to P42
P30 to P32, P34
P03
PLL X2
RTC
RESET
RTP02 to RTP05 RTO LVI
VDD
SIF0, SIF2 to SIF4 Regulator VSS
SOF0, SOF2 to SOF4 CSIF:
4 ch REGC
SCKF0, SCKF2 to SCKF4
FLMD0
RXDC0, RXDC2, RXDC4
TXDC0, TXDC2, TXDC4 UARTC: FLMD1
3 ch ANI0 to ANI4
ASCKC0 A/D ADTRG EVDD
converter AVREF0
SDA01 AVSS
I2C: 1 ch
SCL01
DRST
UDMF USB DMS
UDPF function DCU DDI
Key return DCK
function KR2 to KR5
DDO
Notes 1. μ PD70F3809: 16 KB
μ PD70F3810: 32 KB
μ PD70F3811: 64 KB
μ PD70F3812: 128 KB
μ PD70F3813: 256 KB
2. μ PD70F3809: 8KB
μ PD70F3810: 16 KB
μ PD70F3811, 70F3812, 70F3813: 24 KB
oscillator
Internal
CRC
XT1
WDT CG
CG XT2
X1
PDL5
P97,P910 to P913
P70 to P75
P52 to P56
P40 to P42
P30 to P33, P34, P36, P37
P10
P03
P92 to P94,P96,
PLL X2
RTC
RESET
LVI
VDD
RTP02 to RTP05 RTO Regulator VSS
REGC
SIF0, SIF2 to SIF4
SOF0, SOF2 to SOF4 CSIF: FLMD0
4 ch
SCKF0, SCKF2 to SCKF4 FLMD1
CLM
EVDD
RXDC0, RXDC2 to RXDC4
TXDC0, TXDC2 to TXDC4 UARTC:
4 ch ANI0 to ANI5
ASCKC0 A/D ADTRG
converter AVREF0
SDA00, SDA01 AVSS DRST
I2C: 2 ch
SCL00, SCL01
DMS
D/A AVREF1 DCU DDI
UDMF USB converter
UDPF function ANO0 DCK
DDO
CRXD0 Key return
CANNote 3: 1 ch function KR2 to KR5
CTXD0
Notes 1. μ PD70F3814: 16 KB
μ PD70F3815: 32 KB
μ PD70F3816: 64 KB
μ PD70F3817: 128 KB
μ PD70F3818, 70F3819: 256 KB
2. μ PD70F3814: 8KB
μ PD70F3815: 16 KB
μ PD70F3816, 70F3817, 70F3818, 70F3819: 24 KB
3. μ PD70F3819 only
• V850ES/JE3-H
NMI
INTP02, INTP05, Flash memory CPU
INTC
INTP07 to INTP11,
INTP14 to INTP16 Instruction
Note 1 PC queue
TIAB10 to TIAB13,
EVTAB1, 32-bit barrel Multiplier
TRGAB1, RAM shifter 16 × 16 → 32
16-bit timer/
TOAB1OFF counter AB:
1 ch Note 2 System BCU
TOAB10 to TOAB13 register
TOAB1T1 to TOAB1T3, ALU
TOAB1B1 to TOAB1B3 General-purpose
registers 32 bits × 32
TIAA00, TIAA10, TIAA20 DMAC:
TIAA01,TIAA11, TIAA21 4 ch
TOAA1OFF 16-bit timer/
counter AA:
TOAA00, TOAA10, TOAA20 4 ch
TOAA01, TOAA11, TOAA21
16-bit interval
timer M:
4 ch Ports
oscillator
Internal
CRC
XT1
TECR0, TENC00, TENC01, CG
16-bit timer/ CG XT2
EVTT0, TIT00, TIT01 counter T: X1
1 ch
PDL5
X2
WDT RESET
LVI
RTC1HZ
RTCCL RTC VDD
RTCDIV Regulator VSS
REGC
RTP02 to RTP05 RTO
FLMD0
SIF0, SIF2 to SIF4 FLMD1
SOF0, SOF2 to SOF4 CSIF:
4 ch EVDD, UVDD
SCKF0, SCKF2 to SCKF4 CLM
Notes 1. μ PD70F3820: 16 KB
μ PD70F3821: 32 KB
μ PD70F3822: 64 KB
μ PD70F3823: 128 KB
μ PD70F3824, 70F3825: 256 KB
2. μ PD70F3820: 8KB
μ PD70F3821: 16 KB
μ PD70F3822, 70F3823, 70F3824, 70F3825: 24 KB
3. μ PD70F3825 only
(1) CPU
The CPU uses five-stage pipeline control to enable single-clock execution of address calculations, arithmetic logic
operations, data transfers, and almost all other instruction processing.
Other dedicated on-chip hardware, such as a multiplier (16 bits × 16 bits → 32 bits) and a barrel shifter (32 bits)
contribute to faster complex processing.
(4) RAM
This is a 24/16/8 KB RAM mapped to addresses 3FF9000H to 3FFEFFFH/3FFB000H to 3FFEFFFH/
3FFD000H to 3FFEFFFH. It can be accessed from the CPU in one clock during data access.
(8) Timer/counter
Four-channel 16-bit timer/event counter AA (TAA), one-channel 16-bit timer/event counter AB (TAB) Note, one-channel
16-bit timer/event counter T (TMT), and four-channel 16-bit interval timer M (TMM) are provided on chip. The motor
control function can be realized using TAB1 and TAA4 in combination.
(19) Ports
The following general-purpose port functions and control pin functions are available.
• V850ES/JE3-H
P0 2-bit I/O NMI, external interrupt, A/D converter trigger, serial interface
P1 1-bit I/O D/A converter analog output
P3 8-bit I/O External interrupt, real-time counter, serial interface, timer I/O
P4 3-bit I/O Serial interface, external interrupt
P5 5-bit I/O Timer I/O, real-time output, key interrupt input
P6 6-bit I/O Timer I/O
P7 10it I/O A/D converter analog input
P9 9-bit I/O Serial interface, key interrupt input, timer I/O, external interrupt
PDL 1bit I/O External address/data bus
The names and functions of the pins of the V850ES/JC3-H and V850ES/JE3-H are described below.
There are four types of pin I/O buffer power supplies: AVREF0, AVREF1, EVDD and UVDD. The relationship between these
power supplies and the pins is described below.
(2/2)
Pin Name I/O Function Alternate Function Pin No.
JC3-H JE3-H
40 pin 48 pin
P70 I/O Port 7 ANI0 40 48 64
P71 5-bit I/O port (JC3-H (40 pin )) ANI1 39 47 63
6-bit I/O port (JC3-H (48 pin) )
P72 ANI2 38 46 62
10-bit I/O port (JE3-H)
P73 ANI3 37 45 61
Input/output can be specified in 1-bit units.
P74 ANI4 36 44 60
P75 ANI5 − 43 59
P76 ANI6 − − 58
P77 ANI7 − − 57
P78 ANI8 − − 56
P79 ANI9 − − 55
P92 I/O Port 9 TENC01/TIT01/TOT01 − 35 47
P93 6-bit I/O port (JC3-H (40 pin)) TECR0/TIT00/TOT00 − 36 48
9-bit I/O port (JE3-H, JC3-H (48 pin))
P94 TENC00/EVTT0 − 38 50
Input/output can be specified in 1-bit units.
P96 TIAA21/TOAA21/INTP11 29 33 45
P97 TIAA20/TOAA20 30 34 46
P910 SIF3/TXDC2/INTP14 32 39 51
P911 SOF3/RXDC2/INTP15 33 40 52
P912 SCKF3 34 41 53
P913 TOAB1OFF/INTP16 − − 54
INTP16 35 42 −
PDL5 I/O Port DL FLMD1 31 37 49
1-bit I/O port
Input/output can be specified in 1-bit units.
(2/4)
Pin Name I/O Function Alternate Function Pin No.
JC3-H JE3-H
40 pin 48 pin
INTP02 Input External interrupt request input P03/ADTRG/UCLK 11 13 20
(maskable, analog noise elimination)
INTP05 P56/DRST 27 31 41
Analog noise elimination or digital noise
INTP07 elimination selectable for INTP02 pin. P30/TXDC0/SOF4 17 21 29
INTP08 5 V tolerant (INTP02, INTP05, INTP07, P31/RXDC0/SIF4 18 22 30
INTP08 to INTP10) .
INTP09 P34/TIAA10/TOAA10/TOAA1OFF − − 26
P34/TIAA10/TOAA10 16 18 −
INTP10 P42/SCKF0 22 26 34
INTP11 P96/TIAA21/TOAA21 29 33 45
INTP14 P910/SIF3/TXDC2 32 39 51
INTP15 P911/SOF3/RXDC2 33 40 52
INTP16 P913/TOAB1OFF − − 54
P913 35 42 −
KR2 Input Key interrupt input (on-chip analog P52/RTP02/DDI 23 27 37
KR3 noise eliminator) P53/SIF2/ RTP03/DDO 24 28 38
5 V tolerant.
KR4 P54/SOF2/RTP04/DCK 25 29 39
KR5 P55/SCKF2/RTP05/DMS 26 30 40
NMI Input External interrupt input P02 − − 19
(non-maskable, analog noise
elimination), 5 V tolerant.
REGC − Connection of regulator output − 4 6 6
stabilization capacitance (4.7 μF:
Recommend value)
RESET Input System reset input − 8 10 10
RTC1HZ Output Real-time counter correction clock (1 P35/TIAA11/TOAA11 − − 36
Hz) output, 5 V tolerant.
RTCCL Output Real-time counter clock (32 kHz P33/TIAA01/TOAA01/RTCDIV − − 35
primary oscillation) output, 5 V tolerant.
RTCDIV Output Real-time counter clock (32 kHz P33/TIAA01/TOAA01/RTCCL − − 35
division) output, 5 V tolerant.
RTP02 Real-time counter clock (32 kHz P52/KR2/DDI 23 27 37
RTP03 division) output, 5 V tolerant. P53/SIF2/KR3/DDO 24 28 38
RTP04 P54/SOF2/KR4/DCK 25 29 39
RTP05 P55/SCKF2/KR5/DMS 26 30 40
RXDC0 Input Serial receive data input (UARTC0, P31/SIF4/INTP08 18 22 30
RXDC2 UARTC2 to UARTC4) P911/SOF3/INTP15 33 40 52
5 V tolerant
−
Note
RXDC3 P37/SDA00/CRXD0 20 28
(RXDC0, RXDC3, RXDC4).
RXDC4 P41/SOF0/SCL01 21 25 33
(3/4)
Pin Name I/O Function Alternate Function Pin No.
JC3-H JE3-H
40 pin 48 pin
SCKF0 I/O Serial clock I/O (CSIF0, CSIF2 to CSIF4) P42/INTP10 22 26 34
SCKF2 N-ch open-drain output selectable P55/KR5/RTP05/DMS 26 30 40
SCKF3 5 V tolerant (SCKF0, SCKF2, SCKF4). P912 34 41 53
SCKF4 P32/ASCKC0/TIAA00/TOAA00 19 23 31
−
2 2 Note
SCL00 I/O Serial clock I/O (I C00 to I C01) P36/TXDC3/CTXD0 19 27
SCL01 N-ch open-drain output selectable, P41/SOF0/RXDC4 21 25 33
5 V tolerant.
−
2 Note
SDA00 I/O Serial transmit/receive data I/O (I C00 to P37/RXDC3/CRXD0 20 28
2
SDA01 I C01) P40/SIF0/TXDC4 20 24 32
N-ch open-drain output selectable,
5 V tolerant
SIF0 Input Serial receive data input (CSIF0, CSIF2 P40/TXDC4/SDA01 20 24 32
SIF2 to CSIF4) P53/KR3/RTP03/DDO 24 28 38
5 V tolerant (SIF0, SIF3, SIF4).
SIF3 P910/TXDC2/INTP14 32 39 51
SIF4 P31/RXDC0/INTP08 18 22 30
SOF0 Output Serial transmit data output (CSIF0, P41/RXDC4/SCL01 21 25 33
SOF2 CSIF2 to CSIF4) P54/KR4/RTP04/DCK 25 29 39
5 V tolerant (SOF0, SOF3, SOF4).
SOF3 P911/RXDC2/INTP15 33 40 52
SOF4 P30/TXDC0/INTP07 17 21 29
TECR0 Input TMT0 encoder clear input P93/TIT00/TOT00 − 36 48
TENC00 TMT0 encoder input P94/ EVTT0 − 38 50
TENC01 P92/TIT01/TOT01 − 35 47
TIAA00 External event count input/capture trigger P32/ASCKC0/SCKF4/TOAA00 19 23 31
input/external trigger input (TAA0),
5 V tolerant
TIAA01 Capture trigger input (TAA0), 5 V tolerant P33/TOAA01/RTCDIV/RTCCL − − 35
TIAA10 External event count input/capture trigger P34/TOAA10/TOAA1OFF/INTP09 − − 26
input/external trigger input (TAA1), 5 V P34/TOAA10/INTP09 16 18 −
tolerant
TIAA11 Capture trigger input (TAA1), 5 V tolerant P35/TOAA11/RTC1HZ − − 36
TIAA20 External event count input/capture trigger P97/TOAA20 30 34 46
input/external trigger input (TAA2)
TIAA21 Capture trigger input (TAA2) P96/TOAA21/INTP11 29 33 45
TIAB10 Capture trigger input (TAB1) P61/TOAB1B1/TOAB10 − − 14
TIAB11 P60/TOAB1T1/TOAB11 − − 13
TIAB12 P62/TOAB1T2/TOAB12 − − 15
TIAB13 P64/TOAB1T3/TOAB13 − − 17
TIT00 TMT0 external trigger input/capture P93/TECR0/TOT00 − 36 48
trigger input
TIT01 TMT0 capture trigger input P92/TENC01/TOT01 − 35 47
TOAA00 Output Timer output (TAA0) P32/ASCKC0/SCKF4/TIAA00 19 23 31
TOAA01 N-ch open-drain output selectable, 5 V P33/TIAA01/RTCDIV/RTCCL − − 35
tolerant
(4/4)
Pin Name I/O Function Alternate Function Pin No.
JC3-H JE3-H
40 pin 48 pin
The operation states of pins in the various operation modes are described below.
Notes 1. Duration until 1 ms elapses after the supply voltage reaches the operating supply voltage range (lower limit)
when the power is turned on.
2. Operates while alternate functions are operating.
3. The state of the pins in the idle state inserted after the T3 state is shown.
4. Pulled down during external reset. During internal reset by the watchdog timer or clock monitor, etc., the state
of this pin differs according to the OCDM.OCDM0 bit setting.
5. The bus control pins function alternately as port pins, so they are initialized to the input mode (port mode).
6. V850ES/JC3-H (48 pin), V850ES/JE3-H only
2.3 Pin I/O Circuit Types, I/O Buffer Power Supplies and Connection of Unused Pins
Table 2-3. Pin I/O Circuit Types, I/O Buffer Power Supplies and Connection of Unused Pins (1/3)
Table 2-3. Pin I/O Circuit Types, I/O Buffer Power Supplies and Connection of Unused Pins (2/3)
Table 2-3. Pin I/O Circuit Types, I/O Buffer Power Supplies and Connection of Unused Pins (3/3)
AVREF0
Data
IN P-ch
IN/OUT
Output N-ch
disable
Schmitt-triggered input with hysteresis characteristics
AVSS
Comparator P-ch
Type 5 +
EVDD _
N-ch
Data
P-ch VREF0 AVSS
(Threshold voltage)
IN/OUT
Output N-ch
disable Input enable
Input Data
enable P-ch
XT1 XT2
2.4 Cautions
When the power is turned on, the following pins may output an undefined level temporarily even during reset.
• P10/ANO0 pin
• P53/SIF2/KR3/RTP03/DDO pin
The CPU of the V850ES/JC3-H and V850ES/JE3-H is based on RISC architecture and executes almost all instructions
with one clock by using a 5-stage pipeline.
3.1 Features
Minimum instruction execution time: 20.8 ns (operating with main clock (fXX) of 48 MHz: VDD = 2.85 to 3.6 V)
30.5 μs (operating with subclock (fXT) of 32.768 kHz)
Memory space Program (physical address) space: 64 MB linear
Data (logical address) space: 4 GB linear
General-purpose registers: 32 bits × 32 registers
Internal 32-bit architecture
5-stage pipeline control
Multiplication/division instruction
Saturation operation instruction
32-bit shift instruction: 1 clock
Load/store instruction with long/short format
Four types of bit manipulation instructions
• SET1
• CLR1
• NOT1
• TST1
The registers of the V850ES/JC3-H and V850ES/JE3-H can be classified into two types: general-purpose program
registers and dedicated system registers. All the registers are 32 bits wide.
For details, refer to the V850ES Architecture User’s Manual.
31 0 31 0
r0 (Zero register) EIPC (Interrupt status saving register)
r1 (Assembler-reserved register) EIPSW (Interrupt status saving register)
r2
r3 (Stack pointer (SP)) FEPC (NMI status saving register)
r4 (Global pointer (GP)) FEPSW (NMI status saving register)
r5 (Text pointer (TP))
r6
ECR (Interrupt source register)
r7
r8
PSW (Program status word)
r9
r10
CTPC (CALLT execution status saving register)
r11
CTPSW (CALLT execution status saving register)
r12
r13
r14
DBPC (Exception/debug trap status saving register)
DBPSW (Exception/debug trap status saving register)
r15
r16
r17 CTBP (CALLT base pointer)
r18
r19
r20
r21
r22
r23
r24
r25
r26
r27
r28
r29
r30 (Element pointer (EP))
r31 (Link pointer (LP))
31 0
PC (Program counter)
r2 Register for address/data variable (if real-time OS does not use r2)
r5 Text pointer Used as register that indicates the beginning of a text area (area
where program codes are located)
r6 to r29 Register for address/data variable
Remark For further details on the r1, r3 to r5, and r31 that are used in the assembler and C compiler, refer to the
CA850 (C Compiler Package) Assembly Language User’s Manual.
31 26 25 1 0
Default value
PC Fixed to 0 Instruction address during program execution 0
00000000H
√ √
Note 1
0 Interrupt status saving register (EIPC)
√ √
Note 1
1 Interrupt status saving register (EIPSW)
√ √
Note 1
2 NMI status saving register (FEPC)
√ √
Note 1
3 NMI status saving register (FEPSW)
4 Interrupt source register (ECR) × √
5 Program status word (PSW) √ √
6 to 15 Reserved for future function expansion (operation is not guaranteed if these × ×
registers are accessed)
16 CALLT execution status saving register (CTPC) √ √
17 CALLT execution status saving register (CTPSW) √ √
√ √
Note 2 Note 2
18 Exception/debug trap status saving register (DBPC)
√ √
Note 2 Note 2
19 Exception/debug trap status saving register (DBPSW)
20 CALLT base pointer (CTBP) √ √
21 to 31 Reserved for future function expansion (operation is not guaranteed if these × ×
registers are accessed)
Notes 1. Because only one set of these registers is available, the contents of these registers must be saved by
program if multiple interrupts are enabled.
2. These registers can be accessed only during the interval between the execution of the DBTRAP instruction
or illegal opcode and DBRET instruction execution.
Caution Even if EIPC or FEPC, or bit 0 of CTPC is set to 1 by the LDSR instruction, bit 0 is ignored when
execution is returned to the main routine by the RETI instruction after interrupt servicing (this is
because bit 0 of the PC is fixed to 0). Set an even value to EIPC, FEPC, and CTPC (bit 0 = 0).
31 26 25 0
Default value
EIPC 0 0 0 0 0 0 (Contents of saved PC)
0xxxxxxxH
(x: Undefined)
31 8 7 0
(Contents of Default value
EIPSW 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
saved PSW) 000000xxH
(x: Undefined)
31 26 25 0
Default value
FEPC 0 0 0 0 0 0 (Contents of saved PC)
0xxxxxxxH
(x: Undefined)
31 8 7 0
(Contents of Default value
FEPSW 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
saved PSW) 000000xxH
(x: Undefined)
31 16 15 0
Default value
ECR FECC EICC
00000000H
31 8 7 6 5 4 3 2 1 0
Default value
PSW RFU NP EP ID SAT CY OV S Z
00000020H
(2/2)
Note The result of the operation that has performed saturation processing is determined by the contents of the OV
and S flags. The SAT flag is set to 1 only when the OV flag is set to 1 when a saturation operation is
performed.
31 26 25 0
Default value
CTPC 0 0 0 0 0 0 (Saved PC contents)
0xxxxxxxH
(x: Undefined)
31 8 7 0
(Saved PSW Default value
CTPSW 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
contents) 000000xxH
(x: Undefined)
31 26 25 0
Default value
DBPC 0 0 0 0 0 0 (Saved PC contents)
0xxxxxxxH
(x: Undefined)
31 8 7 0
(Saved PSW Default value
DBPSW 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
contents) 000000xxH
(x: Undefined)
31 26 25 0
Default value
CTBP 0 0 0 0 0 0 (Base address) 0
0xxxxxxxH
(x: Undefined)
Image 63
4 GB
Data space
Use-prohibited area 64 MB
Use-prohibited area
64 MB
Image 0
Caution Because the 4 KB area of addresses 03FFF000H to 03FFFFFFH is an on-chip peripheral I/O area,
instructions cannot be fetched from this area. Therefore, do not execute an operation in which
the result of a branch address calculation affects this area.
Program space
00000001H
00000000H
(+) direction (−) direction
03FFFFFFH
03FFFFFEH
Program space
Data space
00000001H
00000000H
(+) direction (−) direction
FFFFFFFFH
FFFFFFFEH
Data space
03FE0000H
03FEFFFFH
Note 1
Use prohibited
03FEF000H
03FEEFFFH
Programmable peripheral
I/O areaNote 2 or
use prohibitedNote 3
03FEC000H
003FFFFFH
Use prohibited
Use prohibited
00280000H
USB function area 0027FFFFH
(Use prohibited)
00240000H
0023FFFFH
USB function area
(Peripheral I/O area)
00200000H
00400000H
003FFFFFH 001FFFFFH
Notes 1. Use of addresses 03FEF000H to 03FEFFFFH is prohibited because they overlap an on-chip
peripheral I/O area.
2. The programmable peripheral I/O area is seen as 256 MB areas in the 4 GB address space.
3. In on-chip CAN controller products, addresses 03FEC000H to 03FEEFFFH are assigned to
addresses 03FEC000H to 03FECBFFH as a programmable peripheral I/O area. In other products,
use of this area is prohibited.
03FFFFFFH
Use prohibited
(program fetch prohibited area)
03FFF000H
03FFEFFFH
03FFE000H
03FEFFFFH
Use prohibited
00100000H
000FFFFFH Internal ROM area
(1 MB)
00000000H
3.4.4 Areas
000FFFFFH
Access-prohibited
area
00004000H
00003FFFH Internal ROM
00000000H (16 KB)
000FFFFFH
Access-prohibited
area
00008000H
00007FFFH
Internal ROM
(32 KB)
00000000H
000FFFFFH
Access-prohibited
area
00010000H
0000FFFFH
Internal ROM
(64 KB)
00000000H
000FFFFFH
Access-prohibited
area
00020000H
0001FFFFH
Internal ROM
(128 KB)
00000000H
000FFFFFH
Access-prohibited
area
00040000H
0003FFFFH
Internal ROM
(256 KB)
00000000H
03FFEFFFH FFFFEFFFH
Internal RAM
03FFD000H (8 KB) FFFFD000H
03FFCFFFH FFFFCFFFH
Access-prohibited
area
03FF0000H FFFF0000H
03FFEFFFH FFFFEFFFH
Internal RAM
(16 KB)
03FFB000H FFFFB000H
03FFAFFFH FFFFAFFFH
Access-prohibited
area
03FF0000H FFFF0000H
03FFEFFFH FFFFEFFFH
Internal RAM
(24 KB)
03FF9000H FFFF9000H
03FF8FFFH FFFF8FFFH
Access-prohibited
area
03FF0000H FFFF0000H
03FFFFFFH FFFFFFFFH
03FFF000H FFFFF000H
Peripheral I/O registers that have functions to specify the operation mode for and monitor the status of the on-chip
peripheral I/O are mapped to the on-chip peripheral I/O area. Program cannot be fetched from this area.
Cautions 1. When a register is accessed in word units, a word area is accessed twice in halfword units in
the order of lower area and higher area, with the lower 2 bits of the address ignored.
2. If a register that can be accessed in byte units is accessed in halfword units, the higher 8 bits
are undefined when the register is read, and data is written to the lower 8 bits.
3. Addresses not defined as registers are reserved for future expansion. The operation is
undefined and not guaranteed when these addresses are accessed.
4. The internal ROM/RAM area and on-chip peripheral I/O area are assigned to successive
addresses.
When accessing the internal ROM/RAM area by incrementing or decrementing addresses
using a pointer operation or such, be careful not to access the on-chip peripheral I/O area by
mistakenly extending over the internal ROM/RAM area boundary.
Caution If a branch instruction is at the upper limit of the internal RAM area, a prefetch operation (invalid
fetch) straddling the on-chip peripheral I/O area does not occur.
24 KB 03FF9000H to 03FFEFFFH
16 KB 03FFB000H to 03FFEFFFH
8 KB 03FFD000H to 03FFEFFFH
Example: μPD70F3822
0007FFFFH
00007FFFH
(R = ) 0 0 0 0 0 0 0 0 H
On-chip peripheral 4 KB
FFFFF000H I/O area
FFFFEFFFH
FFFF9000H
4 KB
FFFF8000H
On-chip
peripheral I/O
FFFFF000H
FFFFEFFFH
Internal RAM
FFFFFFFFH
FFFEC000H On-chip
FFFEBFFFH peripheral I/O
FFFFF000H
FFFFEFFFH
Internal RAM
FFFF9000H
FFFEFFFFH
04000000H FFFEC000H
FFFEBFFFH
03FFFFFFH
Use prohibited
03FFF000H
03FFEFFFH
Internal RAM
03FF9000H
03FEFFFFH
03FEC000H
03FEBFFFH
Use prohibited
Program space
64 MB
Use prohibited
00100000H
000FFFFFH
Internal ROM
00000000H
00100000H
000FFFFFH
00080000H
0007FFFFH Internal ROM
00000000H Internal ROM
(2/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
FFFFF102H Interrupt mask register 1 IMR1 R/W √ FFFFH
FFFFF102H Interrupt mask register 1L IMR1L √ √ FFH
FFFFF103H Interrupt mask register 1H IMR1H √ √ FFH
FFFFF104H Interrupt mask register 2 IMR2 √ FFFFH
FFFFF104H Interrupt mask register 2L IMR2L √ √ FFH
FFFFF105H Interrupt mask register 2H IMR2H √ √ FFH
FFFFF106H Interrupt mask register 3 IMR3 √ FFFFH
FFFFF106H Interrupt mask register 3L IMR3L √ √ FFH
FFFFF107H Interrupt mask register 3H IMR3H √ √ FFH
FFFFF108H Interrupt mask register 4 IMR4 √ FFFFH
FFFFF108H Interrupt mask register 4L IMR4L √ √ FFH
FFFFF109H Interrupt mask register 4H IMR4H √ √ FFH
FFFFF10AH Interrupt mask register 5 IMR5 √ FFFFH
FFFFF10AH Interrupt mask register 5L IMR5L √ √ FFH
FFFFF10BH Interrupt mask register 5H IMR5H √ √ FFH
FFFFF110H Interrupt control register LVIIC √ √ 47H
FFFFF116H Interrupt control register PIC02 √ √ 47H
FFFFF11CH Interrupt control register PIC05 √ √ 47H
FFFFF120H Interrupt control register PIC07 √ √ 47H
FFFFF122H Interrupt control register PIC08 √ √ 47H
FFFFF124H Interrupt control register PIC09 √ √ 47H
FFFFF126H Interrupt control register PIC10 √ √ 47H
FFFFF128H Interrupt control register PIC11 √ √ 47H
FFFFF12EH Interrupt control register PIC14 √ √ 47H
FFFFF130H Interrupt control register PIC15 √ √ 47H
FFFFF132H Interrupt control register PIC16 √ √ 47H
FFFFF142H Interrupt control register TAB1OVIC √ √ 47H
FFFFF144H Interrupt control register TAB1CCIC0 √ √ 47H
FFFFF146H Interrupt control register TAB1CCIC1 √ √ 47H
FFFFF148H Interrupt control register TAB1CCIC2 √ √ 47H
FFFFF14AH Interrupt control register TAB1CCIC3 √ √ 47H
FFFFF14CH Interrupt control register TT0OVIC √ √ 47H
FFFFF14EH Interrupt control register TT0CCIC0 √ √ 47H
FFFFF150H Interrupt control register TT0CCIC1 √ √ 47H
FFFFF152H Interrupt control register TT0IECIC √ √ 47H
FFFFF154H Interrupt control register TAA0OVIC √ √ 47H
FFFFF156H Interrupt control register TAA0CCIC0 √ √ 47H
FFFFF158H Interrupt control register TAA0CCIC1 √ √ 47H
FFFFF15AH Interrupt control register TAA1OVIC √ √ 47H
FFFFF15CH Interrupt control register TAA1CCIC0 √ √ 47H
(3/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
FFFFF15EH Interrupt control register TAA1CCIC1 R/W √ √ 47H
FFFFF160H Interrupt control register TAA2OVIC √ √ 47H
FFFFF162H Interrupt control register TAA2CCIC0 √ √ 47H
FFFFF164H Interrupt control register TAA2CCIC1 √ √ 47H
FFFFF16CH Interrupt control register TAA4OVIC √ √ 47H
FFFFF16EH Interrupt control register TAA4CCIC0 √ √ 47H
FFFFF170H Interrupt control register TAA4CCIC1 √ √ 47H
FFFFF178H Interrupt control register TM0EQIC0 √ √ 47H
FFFFF17AH Interrupt control register TM1EQIC0 √ √ 47H
FFFFF17CH Interrupt control register TM2EQIC0 √ √ 47H
FFFFF17EH Interrupt control register TM3EQIC0 √ √ 47H
FFFFF180H Interrupt control register CF0RIC/IICIC1 √ √ 47H
FFFFF182H Interrupt control register CF0TIC √ √ 47H
FFFFF188H Interrupt control register CF2RIC √ √ 47H
FFFFF18AH Interrupt control register CF2TIC √ √ 47H
FFFFF18CH Interrupt control register CF3RIC √ √ 47H
FFFFF18EH Interrupt control register CF3TIC √ √ 47H
FFFFF190H Interrupt control register CF4RIC √ √ 47H
FFFFF192H Interrupt control register CF4TIC √ √ 47H
FFFFF194H Interrupt control register UC0RIC √ √ 47H
FFFFF196H Interrupt control register UC0TIC √ √ 47H
FFFFF19CH Interrupt control register UC2RIC √ √ 47H
FFFFF19EH Interrupt control register UC2TIC √ √ 47H
√ √
Note
FFFFF1A0H Interrupt control register UC3RIC/IICIC0 47H
√ √
Note
FFFFF1A2H Interrupt control register UC3TIC 47H
FFFFF1A4H Interrupt control register UC4RIC √ √ 47H
FFFFF1A6H Interrupt control register UC4TIC √ √ 47H
FFFFF1A8H Interrupt control register ADIC √ √ 47H
FFFFF1AAH Interrupt control register DMAIC0 √ √ 47H
FFFFF1ACH Interrupt control register DMAIC1 √ √ 47H
FFFFF1AEH Interrupt control register DMAIC2 √ √ 47H
FFFFF1B0H Interrupt control register DMAIC3 √ √ 47H
FFFFF1B2H Interrupt control register KRIC √ √ 47H
FFFFF1B4H Interrupt control register RTC0IC √ √ 47H
FFFFF1B6H Interrupt control register RTC1IC √ √ 47H
FFFFF1B8H Interrupt control register RTC2IC √ √ 47H
FFFFF1BAH Interrupt control register ERRIC0 √ √ 47H
FFFFF1BCH Interrupt control register WUPIC0 √ √ 47H
FFFFF1BEH Interrupt control register RECIC0 √ √ 47H
FFFFF1C0H Interrupt control register TRXIC0 √ √ 47H
FFFFF1C8H Interrupt control register UFIC0 √ √ 47H
FFFFF1CAH Interrupt control register UFIC1 √ √ 47H
Note V850ES/JC3-H (48 pin), V850ES/JE3-H only.
(4/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
FFFFF1FAH In-service priority register ISPR R √ √ 00H
FFFFF1FCH Command register PRCMD W √ Undefined
FFFFF1FEH Power save control register PSC R/W √ √ 00H
FFFFF200H A/D converter mode register 0 ADA0M0 √ √ 00H
FFFFF201H A/D converter mode register 1 ADA0M1 √ √ 00H
FFFFF202H A/D converter channel specification register ADA0S √ √ 00H
FFFFF203H A/D converter mode register 2 ADA0M2 √ √ 00H
FFFFF204H Power-fail compare mode register ADA0PFM √ √ 00H
FFFFF205H Power-fail compare threshold value register ADA0PFT √ √ 00H
FFFFF210H A/D conversion result register 0 ADA0CR0 R √ Undefined
FFFFF211H A/D conversion result register 0H ADA0CR0H √ Undefined
FFFFF212H A/D conversion result register 1 ADA0CR1 √ Undefined
FFFFF213H A/D conversion result register 1H ADA0CR1H √ Undefined
FFFFF214H A/D conversion result register 2 ADA0CR2 √ Undefined
FFFFF215H A/D conversion result register 2H ADA0CR2H √ Undefined
FFFFF216H A/D conversion result register 3 ADA0CR3 √ Undefined
FFFFF217H A/D conversion result register 3H ADA0CR3H √ Undefined
FFFFF218H A/D conversion result register 4 ADA0CR4 √ Undefined
FFFFF219H A/D conversion result register 4H ADA0CR4H √ Undefined
FFFFF21AH A/D conversion result register 5 ADA0CR5 √ Undefined
FFFFF21BH A/D conversion result register 5H ADA0CR5H √ Undefined
FFFFF21CH A/D conversion result register 6 ADA0CR6 √ Undefined
FFFFF21DH A/D conversion result register 6H ADA0CR6H √ Undefined
FFFFF21EH A/D conversion result register 7 ADA0CR7 √ Undefined
FFFFF21FH A/D conversion result register 7H ADA0CR7H √ Undefined
FFFFF220H A/D conversion result register 8 ADA0CR8 √ Undefined
FFFFF221H A/D conversion result register 8H ADA0CR8H √ Undefined
FFFFF222H A/D conversion result register 9 ADA0CR9 √ Undefined
FFFFF223H A/D conversion result register 9H ADA0CR9H √ Undefined
FFFFF280H D/A conversion value setting register 0 DA0CS0 R/W √ 00H
FFFFF282H D/A converter mode register DA0M √ √ 00H
FFFFF300H Key return mode register KRM √ √ 00H
FFFFF308H Selector operation control register 0 SELCNT0 √ √ 00H
FFFFF310H CRC input register CRCIN √ 00H
FFFFF312H CRC data register CRCD √ 0000H
FFFFF320H Prescaler mode register 1 PRSM1 √ √ 00H
FFFFF321H Prescaler compare register 1 PRSCM1 √ √ 00H
FFFFF324H Prescaler mode register 2 PRSM2 √ √ 00H
FFFFF325H Prescaler compare register 2 PRSCM2 √ √ 00H
FFFFF328H Prescaler mode register 3 PRSM3 √ √ 00H
FFFFF329H Prescaler compare register 3 PRSCM3 √ √ 00H
FFFFF340H IIC division clock select register 0 OCKS0 √ 00H
FFFFF344H IIC division clock select register 1 OCKS1 √ 00H
(5/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
√ √
Note 1
FFFFF400H Port 0 register P0 R/W 00H
√ √
Note 2
FFFFF402H Port 1 register P1 00H
√ √
Note 2
FFFFF406H Port 3 register P3 00H
√ √
Note 2
FFFFF408H Port 4 register P4 00H
√ √
Note 2
FFFFF40AH Port 5 register P5 00H
√ √
Note 1 Note 2
FFFFF40CH Port 6 register P6 00H
√ √
Note 2
FFFFF40EH Port 7 register L P7L 00H
√ √
Note 2
FFFFF40FH Port 7 register H P7H 00H
√
Note 2
FFFFF412H Port 9 register P9 0000H
√ √
Note 2
FFFFF412H Port 9 register L P9L 00H
√ √
Note 2
FFFFF413H Port 9 register H P9H 00H
FFFFF420H Port 0 mode register PM0 √ √ FFH
FFFFF422H Port 1 mode register PM1 √ √ FFH
FFFFF426H Port 3 mode register PM3 √ √ FFH
FFFFF428H Port 4 mode register PM4 √ √ FFH
FFFFF42AH Port 5 mode register PM5 √ √ FFH
FFFFF42CH Port 6 mode register PM6
Note 1
√ √ FFH
FFFFF42EH Port 7 mode register L PM7L √ √ FFH
FFFFF42FH Port 7 mode register H PM7H √ √ FFH
FFFFF432H Port 9 mode register PM9 √ FFFFH
FFFFF432H Port 9 mode register L PM9L √ √ FFH
FFFFF433H Port 9 mode register H PM9H √ √ FFH
FFFFF440H Port 0 mode control register PMC0 √ √ 00H
FFFFF446H Port 3 mode control register PMC3 √ √ 00H
FFFFF448H Port 4 mode control register PMC4 √ √ 00H
FFFFF44AH Port 5 mode control register PMC5 √ √ 00H
FFFFF44CH Port 6 mode control register PMC6
Note 1
√ √ 00H
FFFFF452H Port 9 mode control register PMC9 √ 0000H
FFFFF452H Port 9 mode control register L PMC9L √ √ 00H
FFFFF453H Port 9 mode control register H PMC9H √ √ 00H
FFFFF460H Port 0 function control register PFC0 √ √ 00H
FFFFF466H Port 3 function control register PFC3 √ √ 00H
FFFFF468H Port 4 function control register PFC4 √ √ 00H
FFFFF46AH Port 5 function control register PFC5 √ √ 00H
FFFFF46CH Port 6 function control register PFC6
Note 1
√ √ 00H
FFFFF472H Port 9 function control register PFC9 √ 0000H
FFFFF472H Port 9 function control register L PFC9L √ √ 00H
FFFFF473H Port 9 function control register H PFC9H √ √ 00H
FFFFF484H Data wait control register 0 DWC0 √ 7777H
FFFFF488H Address wait control register AWC √ FFFFH
FFFFF48AH Bus cycle control register BCC √ AAAAH
(6/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
√ √
Note
FFFFF560H TAB1 control register 0 TAB1CTL0 R/W 00H
√ √
Note
FFFFF561H TAB1 control register 1 TAB1CTL1 00H
√ √
Note
FFFFF562H TAB1 I/O control register 0 TAB1IOC0 00H
√ √
Note
FFFFF563H TAB1 I/O control register 1 TAB1IOC1 00H
√ √
Note
FFFFF564H TAB1 I/O control register 2 TAB1IOC2 00H
√ √
Note
FFFFF565H TAB1 option register 0 TAB1OPT0 00H
√
Note
FFFFF566H TAB1 capture/compare register 0 TAB1CCR0 0000H
√
Note
FFFFF568H TAB1 capture/compare register 1 TAB1CCR1 0000H
√
Note
FFFFF56AH TAB1 capture/compare register 2 TAB1CCR2 0000H
√
Note
FFFFF56CH TAB1 capture/compare register 3 TAB1CCR3 0000H
√
Note
FFFFF56EH TAB1 counter read buffer register TAB1CNT R 0000H
√ √
Note
FFFFF570H TAB1 I/O control register 4 TAB1IOC4 R/W 00H
√ √
Note
FFFFF580H TAB1 option register 1 TAB1OPT1 00H
√ √
Note
FFFFF581H TAB1 option register 2 TAB1OPT2 00H
√ √
Note
FFFFF582H TAB1 I/O control register 3 TAB1IOC3 A8H
√
Note
FFFFF584H TAB1 dead time compare register 1 TAB1DTC 0000H
√ √
Note
FFFFF590H High impedance output control register 0 HZACTL0 00H
√ √
Note
FFFFF591H High impedance output control register 1 HZACTL1 00H
FFFFF600H TMT0 control register 0 TT0CTL0 √ √ 00H
FFFFF601H TMT0 control register 1 TT0CTL1 √ √ 00H
FFFFF602H TMT0 control register 2 TT0CTL2 √ √ 00H
FFFFF603H TMT0I/O control register 0 TT0IOC0 √ √ 00H
FFFFF604H TMT0I/O control register 1 TT0IOC1 √ √ 00H
FFFFF605H TMT0I/O control register 2 TT0IOC2 √ √ 00H
FFFFF606H TMT0I/O control register 3 TT0IOC3 √ √ 00H
FFFFF607H TMT0 option register 0 TT0OPT0 √ √ 00H
FFFFF608H TMT0 option register 1 TT0OPT1 √ √ 00H
FFFFF609H TMT0 option register 2 TT0OPT2 √ √ 00H
FFFFF60AH TMT0 capture/compare register 0 TT0CCR0 √ 0000H
FFFFF60CH TMT0 capture/compare register 1 TT0CCR1 √ 0000H
FFFFF60EH TMT0 counter read buffer register TT0CNT R √ 0000H
FFFFF610H TMT0 counter write register TT0TCW R/W √ 0000H
FFFFF630H TAA0 control register 0 TAA0CTL0 √ √ 00H
FFFFF631H TAA0 control register 1 TAA0CTL1 √ √ 00H
FFFFF632H TAA0 I/O control register 0 TAA0IOC0 √ √ 00H
FFFFF633H TAA0 I/O control register 1 TAA0IOC1 √ √ 00H
FFFFF634H TAA0 I/O control register 2 TAA0IOC2 √ √ 00H
FFFFF635H TAA0 option register 0 TAA0OPT0 √ √ 00H
FFFFF636H TAA0 capture/compare register 0 TAA0CCR0 √ 0000H
FFFFF638H TAA0 capture/compare register 1 TAA0CCR1 √ 0000H
FFFFF63AH TAA0 counter read buffer register TAA0CNT R √ 0000H
(7/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
FFFFF63CH TAA0 I/O control register 4 TAA0IOC4 R/W √ √ 00H
FFFFF63DH TAA0 option register 1 TAA0OPT1 √ √ 00H
FFFFF640H TAA1 control register 0 TAA1CTL0 √ √ 00H
FFFFF641H TAA1 control register 1 TAA1CTL1 √ √ 00H
FFFFF642H TAA1 I/O control register 0 TAA1IOC0 √ √ 00H
FFFFF643H TAA1 I/O control register 1 TAA1IOC1 √ √ 00H
FFFFF644H TAA1 I/O control register 2 TAA1IOC2 √ √ 00H
FFFFF645H TAA1 option register 0 TAA1OPT0 √ √ 00H
FFFFF646H TAA1 capture/compare register 0 TAA1CCR0 √ 0000H
FFFFF648H TAA1 capture/compare register 1 TAA1CCR1 √ 0000H
FFFFF64AH TAA1 counter read buffer register TAA1CNT R √ 0000H
FFFFF64CH TAA1 I/O control register 4 TAA1IOC4 R/W √ √ 00H
FFFFF650H TAA2 control register 0 TAA2CTL0 √ √ 00H
FFFFF651H TAA2 control register 1 TAA2CTL1 √ √ 00H
FFFFF652H TAA2 I/O control register 0 TAA2IOC0 √ √ 00H
FFFFF653H TAA2 I/O control register 1 TAA2IOC1 √ √ 00H
FFFFF654H TAA2 I/O control register 2 TAA2IOC2 √ √ 00H
FFFFF655H TAA2 option register 0 TAA2OPT0 √ √ 00H
FFFFF656H TAA2 capture/compare register 0 TAA2CCR0 √ 0000H
FFFFF658H TAA2 capture/compare register 1 TAA2CCR1 √ 0000H
FFFFF65AH TAA2 counter read buffer register TAA2CNT R √ 0000H
FFFFF65CH TAA2 I/O control register 4 TAA2IOC4 R/W √ √ 00H
FFFFF65DH TAA2 option register 1 TAA2OPT1 √ √ 00H
FFFFF670H TAA4 control register 0 TAA4CTL0 √ √ 00H
FFFFF671H TAA4 control register 1 TAA4CTL1 √ √ 00H
FFFFF676H TAA4 capture compare register 0 TAA4CCR0 √ 0000H
FFFFF678H TAA4 capture compare register 1 TAA4CCR1 √ 0000H
FFFFF67AH TAA4 counter read buffer register TAA4CNT R √ 0000H
FFFFF6C0H Oscillation stabilization time select register OSTS R/W √ 06H
FFFFF6C1H PLL lockup time specification register PLLS √ 03H
FFFFF6D0H Watchdog timer mode register 2 WDTM2 √ 67H
FFFFF6D1H Watchdog timer enable register WDTE √ 9AH
FFFFF6E0H Real-time output buffer register 0L RTBL0 √ √ 00H
FFFFF6E2H Real-time output buffer register 0H RTBH0 √ √ 00H
FFFFF6E4H Real-time output port mode register 0 RTPM0 √ √ 00H
FFFFF6E5H Real-time output port control register 0 RTPC0 √ √ 00H
(8/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
FFFFF700H Port 0 function control expansion register PFCE0 R/W √ √ 00H
FFFFF706H Port 3 function control expansion register PFCE3 √ √ 00H
FFFFF708H Port 4 function control expansion register PFCE4 √ √ 00H
FFFFF70AH Port 5 function control expansion register PFCE5 √ √ 00H
√ √
Note
FFFFF70CH Port 6 function control expansion register PFCE6 00H
FFFFF712H Port 9 function control expansion register PFCE9 √ 0000H
FFFFF712H Port 9 function control expansion register L PFCE9L √ √ 00H
FFFFF713H Port 2 function control expansion register H PFCE9H √ √ 00H
FFFFF724H TAA noise elimination control register TANFC √ √ 00H
FFFFF726H TMT noise elimination control register TTNFC √ √ 00H
FFFFF728H Noise elimination control register INTNFC √ √ 00H
FFFFF802H System status register SYS √ √ 00H
FFFFF80CH Internal oscillation mode register RCM √ √ 00H
FFFFF810H DMA trigger factor register 0 DTFR0 √ √ 00H
FFFFF812H DMA trigger factor register 1 DTFR1 √ √ 00H
FFFFF814H DMA trigger factor register 2 DTFR2 √ √ 00H
FFFFF816-H DMA trigger factor register 3 DTFR3 √ √ 00H
FFFFF820H Power save mode register PSMR √ √ 00H
FFFFF822H Clock control register CKC √ √ 0AH
FFFFF824H Lock register LOCKR R √ √ 00H
FFFFF828H Processor clock control register PCC R/W √ √ 03H
FFFFF82CH PLL control register PLLCTL √ √ 01H
FFFFF82EH CPU operation clock status register CCLS R √ √ 00H
FFFFF870H Clock monitor mode register CLM R/W √ √ 00H
FFFFF888H Reset source flag register RESF √ √ 00H
FFFFF892H Internal RAM data status register RAMS √ √ 01H
FFFFF8B0H Prescaler mode register 0 PRSM0 √ √ 00H
FFFFF8B1H Prescaler compare register 0 PRSCM0 √ 00H
FFFFFA00H UARTC0 control register 0 UC0CTL0 √ √ 10H
FFFFFA01H UARTC0 control register 1 UC0CTL1 √ 00H
FFFFFA03H UARTC0 option control register 0 UC0OPT0 √ √ 14H
FFFFFA04H UARTC0 status register UC0STR √ √ 00H
FFFFFA06H UARTC0 receive data register UC0RX R √ 01FFH
FFFFFA06H UARTC0 receive data register L UC0RXL √ FFH
FFFFFA08H UARTC0 transmit data register UC0TX R/W √ 01FFH
FFFFFA08H UARTC0 transmit data register L UC0TXL √ FFH
FFFFFA0AH UARTC0 option control register 1 UC0OPT1 √ √ 00H
FFFFFA20H UARTC2 control register 0 UC2CTL0 √ √ 10H
FFFFFA21H UARTC2 control register 1 UC2CTL1 √ 00H
FFFFFA22H UARTC2 control register 2 UC2CTL2 √ FFH
FFFFFA23H UARTC2 option control register 0 UC2OPT0 √ √ 14H
FFFFFA24H UARTC2 status register UC2STR √ √ 00H
(10/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
FFFFFA26H UARTC2 receive data register UC2RX R √ 01FFH
FFFFFA26H UARTC2 receive data register L UC2RXL √ FFH
FFFFFA28H UARTC2 transmit data register UC2TX R/W √ 01FFH
FFFFFA28H UARTC2 transmit data register L UC2TXL √ FFH
FFFFFA2AH UARTC2 option control register 1 UC2OPT1 √ √ 00H
√ √
Note
FFFFFA30H UARTC3 control register 0 UC3CTL0 10H
√
Note
FFFFFA31H UARTC3 control register 1 UC3CTL1 00H
√
Note
FFFFFA32H UARTC3 control register 2 UC3CTL2 FFH
√ √
Note
FFFFFA33H UARTC3 option control register 0 UC3OPT0 14H
√ √
Note
FFFFFA34H UARTC3 status register UC3STR 00H
√
Note
FFFFFA36H UARTC3 receive data register UC3RX R 01FFH
√
Note
FFFFFA36H UARTC3 receive data register L UC3RXL FFH
√
Note
FFFFFA38H UARTC3 transmit data register UC3TX R/W 01FFH
√
Note
FFFFFA38H UARTC3 transmit data register L UC3TXL FFH
√ √
Note
FFFFFA3AH UARTC3 option control register 1 UC3OPT1 00H
FFFFFA40H UARTC4 control register 0 UC4CTL0 √ √ 10H
FFFFFA41H UARTC4 control register 1 UC4CTL1 √ 00H
FFFFFA42H UARTC4 control register 2 UC4CTL2 √ FFH
FFFFFA43H UARTC4 option control register 0 UC4OPT0 √ √ 14H
FFFFFA44H UARTC4 status register UC4STR √ √ 00H
FFFFFA46H UARTC4 receive data register UC4RX R √ 01FFH
FFFFFA46H UARTC4 receive data register L UC4RXL √ FFH
FFFFFA48H UARTC4 transmit data register UC4TX R/W √ 01FFH
FFFFFA48H UARTC4 transmit data register L UC4TXL √ FFH
FFFFFA4AH UARTC4 option control register 1 UC4OPT1 √ √ 00H
FFFFFA80H TMM0 control register 0 TM0CTL0 √ √ 00H
FFFFFA84H TMM0 compare register 0 TM0CMP0 √ 0000H
FFFFFA90H TMM1 control register 0 TM1CTL0 √ √ 00H
FFFFFA94H TMM1 compare register 0 TM1CMP0 √ 0000H
FFFFFAA0H TMM2 control register 0 TM2CTL0 √ √ 00H
FFFFFAA4H TMM2 compare register 0 TM2CMP0 √ 0000H
FFFFFAB0H TMM3 control register 0 TM3CTL0 √ √ 00H
FFFFFAB4H TMM3 compare register 0 TM3CMP0 √ 0000H
FFFFFAD0H Sub-count register RC1SUBC R √ 0000H
FFFFFAD2H Second count register RC1SEC R/W √ 00H
FFFFFAD3H Minute count register RC1MIN √ 00H
FFFFFAD4H Hour count register RC1HOUR √ 12H
FFFFFAD5H Week count register RC1WEEK √ 00H
FFFFFAD6H Day count register RC1DAY √ 01H
FFFFFAD7H Month count register RC1MONTH √ 01H
FFFFFAD8H Year count register RC1YEAR √ 00H
FFFFFAD9H Time error correction register RC1SUBU √ √ 00H
FFFFFADAH Alarm minute set register RC1ALM √ 00H
Note V850ES/JC3-H (48 pin), V850ES/JE3-H only.
(11/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
FFFFFADBH Alarm time set register RC1ALH R/W √ 12H
FFFFFADCH Alarm week set register RC1ALW √ √ 00H
FFFFFADDH RTC control register 0 RC1CC0 √ √ 00H
FFFFFADEH RTC control register 1 RC1CC1 √ √ 00H
FFFFFADFH RTC control register 2 RC1CC2 √ √ 00H
FFFFFAE0H RTC control register 3 RC1CC3 √ √ 00H
FFFFFC00H External interrupt falling edge specification register 0 INTF0 √ √ 00H
FFFFFC06H External interrupt falling edge specification register 3 INTF3 √ √ 00H
FFFFFC08H External interrupt falling edge specification register 4 INTF4 √ √ 00H
FFFFFC0AH External interrupt falling edge specification register 5 INTF5 √ √ 00H
FFFFFC12H External interrupt falling edge specification register 9 INTF9 √ 0000H
FFFFFC12H External interrupt falling edge specification register 9H INTF9H √ √ 00H
FFFFFC13H External interrupt falling edge specification register 9L INTF9L √ √ 00H
FFFFFC20H External interrupt rising edge specification register 0 INTR0 √ √ 00H
FFFFFC26H External interrupt rising edge specification register 3 INTR3 √ √ 00H
FFFFFC28H External interrupt rising edge specification register 4 INTR4 √ √ 00H
FFFFFC2AH External interrupt rising edge specification register 5 INTR5 √ √ 00H
FFFFFC32H External interrupt rising edge specification register 9 INTR9 √ 0000H
FFFFFC32H External interrupt rising edge specification register 9H INTR9H √ √ 00H
FFFFFC33H External interrupt rising edge specification register 9L INTR9L √ √ 00H
FFFFFC60H Port 0 function register PF0 √ √ 00H
FFFFFC66H Port 3 function register PF3 √ √ 00H
FFFFFC68H Port 4 function register PF4 √ √ 00H
FFFFFC6AH Port 5 function register PF5 √ √ 00H
FFFFFD00H CSIF0 control register 0 CF0CTL0 √ √ 01H
FFFFFD01H CSIF0 control register 1 CF0CTL1 √ √ 00H
FFFFFD02H CSIF0 control register 2 CF0CTL2 √ 00H
FFFFFD03H CSIF0 status register CF0STR √ √ 00H
FFFFFD04H CSIF0 receive data register CF0RX R √ 0000H
FFFFFD04H CSIF0 receive data register L CF0RXL √ 00H
FFFFFD06H CSIF0 transmit data register CF0TX R/W √ 0000H
FFFFFD06H CSIF0 transmit data register L CF0TXL √ 00H
FFFFFD20H CSIF2 control register 0 CF2CTL0 √ √ 01H
FFFFFD21H CSIF2 control register 1 CF2CTL1 √ √ 00H
FFFFFD22H CSIF2 control register 2 CF2CTL2 √ 00H
FFFFFD23H CSIF2 status register CF2STR √ √ 00H
FFFFFD24H CSIF2 receive data register CF2RX R √ 0000H
FFFFFD24H CSIF2 receive data register L CF2RXL √ 00H
FFFFFD26H CSIF2 transmit data register CF2TX R/W √ 0000H
FFFFFD26H CSIF2 transmit data register L CF2TXL √ 00H
(12/12)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
FFFFFD30H CSIF3 control register 0 CF3CTL0 R/W √ √ 01H
FFFFFD31H CSIF3 control register 1 CF3CTL1 √ √ 00H
FFFFFD32H CSIF3 control register 2 CF3CTL2 √ 00H
FFFFFD33H CSIF3 status register CF3STR √ √ 00H
FFFFFD34H CSIF3 receive data register CF3RX R √ 0000H
FFFFFD34H CSIF3 receive data register L CF3RXL √ 00H
FFFFFD36H CSIF3 transmit data register CF3TX R/W √ 0000H
FFFFFD36H CSIF3 transmit data register L CF3TXL √ 00H
FFFFFD40H CSIF4 control register 0 CF4CTL0 √ √ 01H
FFFFFD41H CSIF4 control register 1 CF4CTL1 √ √ 00H
FFFFFD42H CSIF4 control register 2 CF4CTL2 √ 00H
FFFFFD43H CSIF4 status register CF4STR √ √ 00H
FFFFFD44H CSIF4 receive data register CF4RX R √ 0000H
FFFFFD44H CSIF4 receive data register L CF4RXL √ 00H
FFFFFD46H CSIF4 transmit data register CF4TX R/W √ 0000H
FFFFFD46H CSIF4 transmit data register L CF4TXL √ 00H
√
Note
FFFFFD80H IIC shift register 0 IIC0 00H
√ √
Note
FFFFFD82H IIC control register 0 IICC0 00H
√
Note
FFFFFD83H Slave address register 0 SVA0 00H
√ √
Note
FFFFFD84H IIC clock select register 0 IICCL0 00H
√ √
Note
FFFFFD85H IIC function expansion register 0 IICX0 00H
√ √
Note
FFFFFD86H IIC status register 0 IICS0 R 00H
√ √
Note
FFFFFD8AH IIC flag register 0 IICF0 R/W 00H
FFFFFD90H IIC shift register 1 IIC1 √ 00H
FFFFFD92H IIC control register 1 IICC1 √ √ 00H
FFFFFD93H Slave address register 1 SVA1 √ 00H
FFFFFD94H IIC clock select register 1 IICCL1 √ √ 00H
FFFFFF40H USB clock selection register UCKSEL √ √ 00H
FFFFFF41H USB function control register UFCKMSK √ √ 03H
FFFFFF44H USB function selection register EPRMK √ √ 03H
FFFFFD95H IIC function expansion register 1 IICX1 √ √ 00H
FFFFFD96H IIC status register 1 IICS1 R √ √ 00H
FFFFFD9AH IIC flag register 1 IICF1 R/W √ √ 00H
Note V850ES/JC3-H (48 pin), V850ES/JE3-H only.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BPC PA15 0 PA13 PA12 PA11 PA10 PA09 PA08 PA07 PA06 PA05 PA04 PA03 PA02 PA01 PA00
Caution If the PA15 bit is set to 1, be sure to set the BPC register to 8FFBH.
If the PA15 bit is set to 0, be sure to set the BPC register to 0000H.
For the list of programmable peripheral I/O registers, refer to Table 19-16 Register Access Types.
In addition, the PRCDM register is provided to protect against a write access to the special registers so that the
application system does not inadvertently stop due to a program loop. A write access to the special registers is made in a
specific sequence, and an illegal store operation is reported to the SYS register.
ST.B r11, PSMR[r0] ; Set PSMR register (setting IDLE1, IDLE2, and STOP modes).
<1>CLR1 0, DCHCn[r0] ; Disable DMA operation. n = 0 to 3
<2>MOV0x02, r10
<3>ST.B r10, PRCMD[r0] ; Write PRCMD register.
<4>ST.B r10, PSC[r0] ; Set PSC register.
Note
<5>NOP ; Dummy instruction
<6>NOPNote ; Dummy instruction
Note
<7>NOP ; Dummy instruction
<8>NOPNote ; Dummy instruction
Note
<9>NOP ; Dummy instruction
<10>SET1 0, DCHCn[r0] ; Enable DMA operation. n = 0 to 3
(next instruction)
Note Five NOP instructions or more must be inserted immediately after setting the IDLE1 mode, IDLE2 mode, or
STOP mode (by setting the PSC.STP bit to 1).
Cautions 1. When a store instruction is executed to store data in the command register, interrupts are not
acknowledged. This is because it is assumed that steps <3> and <4> above are performed by
successive store instructions. If another instruction is placed between <3> and <4>, and if an
interrupt is acknowledged by that instruction, the above sequence may not be established,
causing malfunction.
2. Although dummy data is written to the PRCMD register, use the same general-purpose
register used to set the special register (<4> in Example) to write data to the PRCMD register
(<3> in Example). The same applies when a general-purpose register is used for addressing.
7 6 5 4 3 2 1 0
PRCMD REG7 REG6 REG5 REG4 REG3 REG2 REG1 REG0
< >
SYS 0 0 0 0 0 0 0 PRERR
Remark Even if an on-chip peripheral I/O register is read (except by a bit manipulation instruction) between
an operation to write the PRCMD register and an operation to write a special register, the PRERR
flag is not set, and the set data can be written to the special register.
Cautions 1. If 0 is written to the PRERR bit of the SYS register, which is not a special register,
immediately after a write access to the PRCMD register, the PRERR bit is cleared to 0 (the
write access takes precedence).
2. If data is written to the PRCMD register, which is not a special register, immediately after a
write access to the PRCMD register, the PRERR bit is set to 1.
3.4.9 Cautions
After setting the VSWC, OCDM, and WDTM2 registers, set the other registers as necessary.
When using the external bus, set each pin to the alternate-function bus control pin mode by using the port-related
registers after setting the above registers.
VSWC
(2/2)
Peripheral Function Register Name Access k
2 2
I C00 to I C01 IICS0 to IICS1 Read 1
CRC CRCD Write 1
Note
CAN controller C0GMABT, Read/Write fXX/fCANMOD + 1) / (2 + j) (MIN.)
Note
(m = 0 to 31, a = 1 to 4) C0GMABTD, (2 × fXX/fCANMOD + 1) / (2 + j) (MAX.)
C0MASKaL, C0MASKaH,
C0LEC,
C0INFO,
C0ERC,
C0IE,
C0INTS,
C0BRP,
C0BTR,
C0TS
Note
C0GMCTRL, Read/Write (fXX/fCAN + 1) / (2 + j) (MIN.)
Note
C0GMCS, (2 × fXX/fCAN + 1) / (2 + j) (MAX.)
C0CTRL
Note
C0RGPT, Write (fXX/fCANMOD + 1) / (2 + j) (MIN.)
Note
C0TGPT (2 × fXX/fCANMOD + 1) / (2 + j) (MAX.)
Note
Read (3 × fXX/fCANMOD + 1) / (2 + j) (MIN.)
Note
(4 × fXX/fCANMOD + 1) / (2 + j) (MAX.)
Note
C0LIPT, Read (3 × fXX/fCANMOD + 1) / (2 + j) (MIN.)
Note
C0LOPT (4 × fXX/fCANMOD + 1) / (2 + j) (MAX.)
Note
C0MCTRLm Write (4 × fXX/fCAN + 1) / (2 + j) (MIN.)
Note
(5 × fXX/fCAN + 1) / (2 + j) (MAX.)
Note
Read (3 × fXX/fCAN + 1) / (2 + j) (MIN.)
Note
(4 × fXX/fCAN + 1) / (2 + j) (MAX.)
Note
C0MDATA01m, C0MDATA0m, Write (8 bits) (4 × fXX/fCANMOD + 1) / (2 + j) (MIN.)
Note
C0MDATA1m, C0MDATA23m, (5 × fXX/fCANMOD + 1) / (2 + j) (MAX.)
C0MDATA2m, C0MDATA3m, Note
Write (16 bits) (2 × fXX/fCANMOD + 1) / (2 + j) (MIN.)
C0MDATA45m, C0MDATA4m, Note
(3 × fXX/fCANMOD + 1) / (2 + j) (MAX.)
C0MDATA5m, C0MDATA67m,
Note
C0MDATA6m, C0MDATA7m, Read (8/16 bits) (3 × fXX/fCANMOD + 1) / (2 + j) (MIN.)
Note
C0MDLCm, (4 × fXX/fCANMOD + 1) / (2 + j) (MAX.)
C0MCONFm,
C0MIDLm,
C0MIDHm
Caution Accessing the above registers is prohibited in the following statuses. If a wait cycle is generated,
it can only be cleared by a reset.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
(a) Description
If a conflict occurs between the decode operation of an instruction in <2> immediately before the sld instruction
following an instruction in <1> and an interrupt request before the instruction in <1> is complete, the execution
result of the instruction in <1> may not be stored in a register.
Instruction <1>
• ld instruction: ld.b, ld.h, ld.w, ld.bu, ld.hu
• sld instruction: sld.b, sld.h, sld.w, sld.bu, sld.hu
• Multiplication instruction: mul, mulh, mulhi, mulu
Instruction <2>
mov reg1, reg2 not reg1, reg2 satsubr reg1, reg2 satsub reg1, reg2
satadd reg1, reg2 satadd imm5, reg2 or reg1, reg2 xor reg1, reg2
and reg1, reg2 tst reg1, reg2 subr reg1, reg2 sub reg1, reg2
add reg1, reg2 add imm5, reg2 cmp reg1, reg2 cmp imm5, reg2
mulh reg1, reg2 shr imm5, reg2 sar imm5, reg2 shl imm5, reg2
<Example>
<i> ld.w [r11], r10 If the decode operation of the mov instruction <ii> immediately before the sld
• instruction <iii> and an interrupt request conflict before execution of the ld instruction
• <i> is complete, the execution result of instruction <i> may not be stored in a register.
•
<ii> mov r10, r28
<iii> sld.w 0x28, r10
(b) Countermeasure
4.1 Features
{ I/O ports
• V850ES/JC3-H (40 pin): 25
5 V tolerant/N-ch open-drain output selectable: 15
• V850ES/JC3-H (48 pin): 32
5 V tolerant/N-ch open-drain output selectable: 17
• V850ES/JE3-H: 45
5 V tolerant/N-ch open-drain output selectable: 19
{ Input/output specifiable in 1-bit units
The V850ES/JC3-H (40 pin) features a total of 25 I/O ports consisting of ports 0, 3 to 5, 7, 9, and DL.
The V850ES/JC3-H (48 pin) features a total of 32 I/O ports consisting of ports 0, 1, 3 to 5, 7, 9, and DL.
The V850ES/JE3-H features a total of 45 I/O ports consisting of ports 0, 1, 3 to 7, 9, and DL.
The port configuration is shown below.
Table 4-1. I/O Buffer Power Supplies for Pins (V850ES/JC3-H (40 pin))
AVREF0 Port 7
EVDD RESET, ports 0, 3 to 5, 9, CM, CT, and DL
Table 4-2. I/O Buffer Power Supplies for Pins (V850ES/JC3-H (48 pin))
AVREF0 Port 7
AVREF1 Port 1
EVDD RESET, ports 0, 3 to 5, 9, and DL
AVREF0 Port 7
AVREF1 Port 1
EVDD RESET, ports 0, 3 to 6, 9, and DL
P50 P913
Port 5
P56 PDL5 Port DL
P40 P910
Port 4
P42 P913
P50
Port 5
P56 PDL5 Port DL
P02 P70
Port 0
P03
Port 7
Port 1 P10 P79
P30 P92
Port 3
P37 P94
P96
P40
P97 Port 9
Port 4
P42
P910
P50
Port 5 P913
P56
Item Configuration
Item Configuration
Item Configuration
7 6 5 7 3 2 1 0
Pn Pn7 Pn6 Pn5 Pn4 Pn3 Pn2 Pn1 Pn0
Data is written to or read from the Pn register as follows, regardless of the setting of the PMCn register.
Note The value written to the output latch is retained until a new value is written to the output latch.
Note The PFnm bit of the PFn register is valid only when the PMnm bit of the PMn register is 0 (when the
output mode is specified) in port mode (PMCnm bit = 0). When the PMnm bit is 1 (when the input mode
is specified), the set value of the PFn register is invalid.
Port mode
Alternate function
(when two alternate
functions are available)
“0”
Alternate function
(when three or more alternate
“1”
functions are available)
If the PMCn register is set first, an unintended function may be set while the PFCn and PFCEn
registers are being set.
4.3.1 Port 0
Port 0 witch I/O settings can be controlled in 1-bit units.
The number of I/O ports differs for each part.
Caution The P02 and P03 pins have hysteresis characteristics in the input mode of the alternate function, but
do not have hysteresis characteristics in the port mode.
(a) V850ES/JC3-H
7 6 5 4 3 2 1 0
P0 0 0 0 0 P03 0 0 0
(b) V850ES/JE3-H
7 6 5 4 3 2 1 0
P0 0 0 0 0 P03 P02 0 0
(a) V850ES/JC3-H
7 6 5 4 3 2 1 0
PM0 1 1 1 1 PM03 1 1 1
(b) V850ES/JE3-H
7 6 5 4 3 2 1 0
PM0 1 1 1 1 PM03 PM02 1 1
(a) V850ES/JC3-H
7 6 5 4 3 2 1 0
PMC0 0 0 0 0 PMC03 0 0 0
(b) V850ES/JE3-H
7 6 5 4 3 2 1 0
PMC0 0 0 0 0 PMC03 PMC02 0 0
7 6 5 4 3 2 1 0
PFC0 0 0 0 0 PFC03 0 0 0
Remark For details of alternate function specification, see 4.3.1 (6) Port 0 alternate function
specifications.
7 6 5 4 3 2 1 0
PFCE0 0 0 0 0 PFCE03 0 0 0
Remark For details of alternate function specification, see 4.3.1 (6) Port 0 alternate function
specifications.
0 0 INTP02 input
0 1 ADTRG input
1 0 UCLK input
1 1 Setting prohibited
(a) V850ES/JC3-H
7 6 5 4 3 2 1 0
PF0 0 0 0 0 PF03 0 0 0
(b) V850ES/JE3-H
7 6 5 4 3 2 1 0
PF0 0 0 0 0 PF03 PF02 0 0
Caution When an output pin is pulled up to EVDD or higher, be sure to set the PF0n bit to 1.
4.3.2 Port 1
Port 1 is a 1-bit port for which I/O settings can be controlled in 1-bit units.
Port 1 includes the following alternate-function pins.
Caution When the power is turned on, the P10 pin may output an undefined level temporarily even during
reset.
7 6 5 4 3 2 1 0
P1 0 0 0 0 0 0 0 P10
Caution Do not read or write the P1 register during D/A conversion (see 15.4.3 Cautions).
7 6 5 4 3 2 1 0
PM1 0 0 0 0 0 0 0 PM10
Cautions 1. When using P10 as the alternate function (ANO0 pin output), set the PM10 bit to
1.
2. When using one of the PM10 pin as an I/O port and the other as a D/A output
pin, do so in an application where the port I/O level does not change during D/A
output.
4.3.3 Port 3
Port 3 witch I/O settings can be controlled in 1-bit units.
The number of I/O ports differs for each part.
Caution The P30 to P37 pins have hysteresis characteristics in the input mode of the alternate-function pin,
but do not have the hysteresis characteristics in the port mode.
7 6 5 4 3 2 1 0
P3 P37Note1 P36Note1 P35Note2 P34 P33Note2 P32 P31 P30
7 6 5 4 3 2 1 0
Note1 Note1 Note2 Note2
PM3 PM37 PM36 PM35 PM34 PM33 PM32 PM31 PM30
Remark For details of alternate function specification, see 4.3.4 (6) Port 3 alternate function
specifications.
Remark For details of alternate function specification, see 4.3.4 (6) Port 3 alternate function
specifications.
Note1 Note1
PFCE37 PFC37 Specification of P37 pin alternate function
0 0 RXDC3 input
0 1 SDA00 I/O
Note2
1 0 CRXD0 input
1 1 Setting prohibit
Note1 Note1
PFCE36 PFC36 Specification of P36 pin alternate function
0 0 TXDC3 output
0 1 SCL00 I/O
Note2
1 0 CTXD0 output
1 1 Setting prohibit
Note Note
PFCE35 PFC35 Specification of P35 pin alternate function
0 0 TIAA11 input
0 1 TOAA11 output
1 0 RTC1HZ output
1 1 Setting prohibited
Note Note
PFCE33 PFC33 Specification of P33 pin alternate function
0 0 TIAA01 input
0 1 TOAA01 output
1 0 RTCDIV output
1 1 RTCCL output
0 0 RXDC0 input
0 1 SIF4 input
1 0 INTP08 input
1 1 Setting prohibited
0 0 TXDC0 output
0 1 SOF4 output
1 0 INTP07 input
1 1 Setting prohibited
4.3.4 Port 4
Port 4 is a 3-bit port that controls I/O in 1-bit units.
Port 4 includes the following alternate-function pins.
Caution The P40 to P42 pins have hysteresis characteristics in the input mode of the alternate-function pin,
but do not have the hysteresis characteristics in the port mode.
Remark For details of alternate function specification, see 4.3.5 (6) Port 4 alternate function
specifications.
Remark For details of alternate function specification, see 4.3.5 (6) Port 4 alternate function
specifications.
0 SCKF0 I/O
1 INTP10 input
0 0 SIF0 input
0 1 TXDC4 output
1 0 SDA01 I/O
1 1 Setting prohibited
4.3.5 Port 5
Port 5 is 5-bit port that controls I/O in 1-bit units.
Port 5 includes the following alternate-function pins.
Note The DDI, DDO, DCK, DMS, and DRST pins are used for on-chip debugging.
If on-chip debugging is not used, fix the P05/INTP02/DRST pin to low level between when the reset by the
RESET pin is released and when the OCDM.OCDM0 bit is cleared (0).
For details, see 4.5.3 Cautions on on-chip debug pins.
Cautions 1. When the power is turned on, the P53 pin may output an undefined level temporarily even during
reset.
2. The P52 to P56 pins have hysteresis characteristics in the input mode of the alternate-function
pin, but do not have the hysteresis characteristics in the port mode.
Remark For details of alternate function specification, see 4.3.6 (6) Port 5 alternate function
specifications.
Remark For details of alternate function specification, see 4.3.6 (6) Port 5 alternate function
specifications.
0 0 SCKF2 I/O
0 1 KR5 input
1 0 RTP05 output
1 1 Setting prohibited
0 0 SOF2 output
0 1 KR4 input
1 0 RTP04 output
1 1 Setting prohibited
0 0 KR2 input
0 1 Setting prohibited
1 0 RTP02 output
1 1 Setting prohibited
Caution The P60 to P65 pins have hysteresis characteristics in the input mode of the alternate-function pin,
but do not have the hysteresis characteristics in the port mode.
Remark For details of alternate function specification, see 4.3.7 (6) Port 6 alternate function
specifications.
4.3.7 Port 7
Port 5 witch I/O settings can be controlled in 1-bit units.
The number of I/O ports differs for each part.
After reset: 00H (output latch) R/W Address: P7L FFFFF40EH, P7H FFFFF40FH
Caution Do not read or write the P7H and P7L registers during A/D conversion (see 14.6 (4)
Alternate I/O).
Remark These registers cannot be accessed in 16-bit units as the P7 register. They can be read
or written in 8-bit or 1-bit units as the P7H and P7L registers.
Caution When using the P7n pin as its alternate function (ANIn pin), set the PM7n bit to 1.
Remark These registers cannot be accessed in 16-bit units as the PM7 register. They can be
read or written in 8-bit or 1-bit units as the PM7H and PM7L registers.
4.3.8 Port 9
Port 9 is a 16-bit port for which I/O settings can be controlled in 1-bit units.
Port 9 includes the following alternate-function pins.
−
Note
P92 35 47 TENC01/TIT01/TOT01 I/O Selectable as N-ch open-drain
P93
Note
− 36 48 TECR0/TIT00/TOT00 I/O output
−
Note
P94 38 50 TENC00/EVTT0 I/O
P96 29 33 45 TIAA21/TOAA21 I/O
/INTP11
P97 30 34 46 SIF1/TIAA20/TOAA20 I/O
P910 32 39 51 SIF3/TXDC2/INTP14 I/O
P911 33 40 52 SOF3/RXDC2/INTP15 I/O
P912 34 41 53 SCKF3 I/O
P913 35 42 54 TOAB1OFF/INTP16 I/O
Caution The P92 to P94, P96, P97, P910 to P913 pins have hysteresis characteristics in the input mode of the
alternate-function pin, but do not have the hysteresis characteristics in the port mode.
15 14 13 12 11 10 9 8
P9 (P9H) 0 0 P913 P912 P911 P910 0 0
15 14 13 12 11 10 9 8
PM9 (PM9H) 0 0 PM913 PM912 PM911 PM910 0 0
15 14 13 12 11 10 9 8
PMC9 (PMC9H) 0 0 PMC913 PMC912 PMC911 PMC910 0 0
15 14 13 12 11 10 9 8
PFC9 (PFC9H) 0 0 PFC913 PFC912 PFC911 PFC910 0 0
Remarks 1. For details of alternate function specification, see 4.3.9 (6) Port 9 alternate function
specifications.
2. The PFC9 register can be read or written in 16-bit units.
However, when using the higher 8 bits of the PFC9 register as the PFC9H register
and the lower 8 bits as the PFC9L register, they can be read or written in 8-bit or 1-bit
units.
3. To read/write bits 8 to 15 of the PFC9 register in 8-bit or 1-bit units, specify them as
bits 0 to 7 of the PFC9H register.
15 14 13 12 11 10 9 8
PFCE9 (PFCE9H) 0 0 PFCE913 PFCE912 PFCE911 PFCE910 0 0
Remarks 1. For details of alternate function specification, see 4.3.9 (6) Port 9 alternate function
specifications.
2. The PFCE9 register can be read or written in 16-bit units.
However, when using the higher 8 bits of the PFCE9 register as the PFCE9H register
and the lower 8 bits as the PFCE9L register, they can be read or written in 8-bit or 1-
bit units.
3. To read/write bits 8 to 15 of the PFCE9 register in 8-bit or 1-bit units, specify them as
bits 0 to 7 of the PFCE9H register.
0 SCKF3 I/O
1 Setting prohibited
0 0 SIF3 input
0 1 TXDC2 output
1 0 INTP14 input
1 1 Setting prohibited
0 0 SIF1 input
0 1 TIAA20 input
1 0 TOAA20 output
1 1 Setting prohibited
0 0 TIAA21 input
0 1 TOAA21 output
1 0 INTP11 input
1 1 Setting prohibited
Note Note
PFCE94 PFC94 Specification of P94 pin alternate function
0 0 Setting prohibited
0 1 Setting prohibited
1 0 TENC00 input/EVTT0 input
1 1 Setting prohibited
Note Note
PFCE93 PFC93 Specification of P93 pin alternate function
0 0 TECR0 input
0 1 TIT00 input
1 0 TOT00 output
1 1 Setting prohibited
Note Note
PFCE92 PFC92 Specification of P92 pin alternate function
0 0 TENC01 input
0 1 TIT01 input
1 0 TOT01 output
1 1 Setting prohibited
4.3.9 Port DL
Port DL is a 16-bit port for which I/O settings can be controlled in 1-bit units.
Port DL includes the following alternate-function pins.
−
Note
PDL5 31 37 49 FLMD1 I/O
Note Since this pin is set in the flash memory programming mode, it does not need to be manipulated with the port
control register. For details, see CHAPTER 30 FLASH MEMORY.
15 14 13 12 11 10 9 8
PDL (PDLH) 0 0 0 0 0 0 0 0
(PDLL) 0 0 PDL5 0 0 0 0 0
15 14 13 12 11 10 9 8
PMDL (PMDLH) 0 0 0 0 0 0 0 0
(PMDLL) 0 0 PMDL5 0 0 0 0 0
Table 4-17 shows the port register settings when each port is used for an alternate function. When using a port pin as
an alternate-function pin, refer to the description of each pin.
Pin Name Alternate Function Pnx Bit of PMnx Bit of PMCnx Bit of PFCEnx Bit of PFCnx Bit of Other Bits
Name I/O Pn Register PMn Register PMCn Register PFCEn Register PFCn Register (Registers)
P02 Note 1 NMI Input P02 = Setting not required PM02 = Setting not required PMC02 = 1 − −
P03 INTP02 Input P03 = Setting not required PM03 = Setting not required PMC03 = 1 PFCE03 = 0 PFC03 = 0
ADTRG Input P03 = Setting not required PM03 = Setting not required PMC03 = 1 PFCE03 = 0 PFC03 = 1
UCLK Input P03 = Setting not required PM03 = Setting not required PMC03 = 1 PFCE03 = 1 PFC03 = 0
P10 Note 2 ANO0 Output P10 = Setting not required PM10 = 1 − − −
P30 TXDC0 Output P30 = Setting not required PM30 = Setting not required PMC30 = 1 PFCE30 = 0 PFC30 = 0
SOF4 Output P30 = Setting not required PM30 = Setting not required PMC30 = 1 PFCE30 = 0 PFC30 = 1
INTP07 Input P30 = Setting not required PM30 = Setting not required PMC30 = 1 PFCE30 = 1 PFC30 = 0
P31 RXDC0 Input P31 = Setting not required PM31 = Setting not required PMC31 = 1 PFCE31 = 0 PFC31 = 0
SIF4 Input P31 = Setting not required PM31 = Setting not required PMC31 = 1 PFCE31 = 0 PFC31 = 1
INTP08 Input P31 = Setting not required PM31 = Setting not required PMC31 = 1 PFCE31 = 1 PFC31 = 0
P32 ASCKC0 Input P32 = Setting not required PM32 = Setting not required PMC32 = 1 PFCE32 = 0 PFC32 = 0
SCKF4 I/O P32 = Setting not required PM32 = Setting not required PMC32 = 1 PFCE32 = 0 PFC32 = 1
TIAA00 Input P32 = Setting not required PM32 = Setting not required PMC32 = 1 PFCE32 = 1 PFC32 = 0
TOAA00 Output P32 = Setting not required PM32 = Setting not required PMC32 = 1 PFCE32 = 1 PFC32 = 1
P33 Note 1 TIAA01 Input P33 = Setting not required PM33 = Setting not required PMC33 = 1 PFCE33 = 0 PFC33 = 0
TOAA01 Output P33 = Setting not required PM33 = Setting not required PMC33 = 1 PFCE33 = 0 PFC33 = 1
RTCDIV Output P33 = Setting not required PM33 = Setting not required PMC33 = 1 PFCE33 = 1 PFC33 = 0
RTCCL Output P33 = Setting not required PM33 = Setting not required PMC33 = 1 PFCE33 = 1 PFC33 = 1
P34 TIAA10 Input P34 = Setting not required PM34 = Setting not required PMC34 = 1 PFCE34 = 0 PFC34 = 0
Pin Name Alternate Function Pnx Bit of PMnx Bit of PMCnx Bit of PFCEnx Bit of PFCnx Bit of Other Bits
Name I/O Pn Register PMn Register PMCn Register PFCEn Register PFCn Register (Registers)
P36 Note 1 TXDC3 Output P36 = Setting not required PM36 = Setting not required PMC36 = 1 PFCE36 = 0 PFC36 = 0
SCL00 I/O P36 = Setting not required PM36 = Setting not required PMC36 = 1 PFCE36 = 0 PFC36 = 1 PF36 (PF3) = 1
Note 2
CTXD0 Output P36 = Setting not required PM36 = Setting not required PMC36 = 1 PFCE36 = 1 PFC36 = 0
P37 Note 1 RXDC3 Input P37 = Setting not required PM37 = Setting not required PMC37 = 1 PFCE37 = 0 PFC37 = 0
SDA00 I/O P37 = Setting not required PM37 = Setting not required PMC37 = 1 PFCE37 = 0 PFC37 = 1 PF37 (PF3) = 1
CRXD0Note 2 Input P37 = Setting not required PM37 = Setting not required PMC37 = 1 PFCE37 = 1 PFC37 = 0
P40 SIF0 Input P40 = Setting not required PM40 = Setting not required PMC40 = 1 PFCE40 = 0 PFC40 = 0
TXDC4 Output P40 = Setting not required PM40 = Setting not required PMC40 = 1 PFCE40 = 0 PFC40 = 1
SDA01 I/O P40 = Setting not required PM40 = Setting not required PMC40 = 1 PFCE40 = 1 PFC40 = 0 PF40 (PF4) = 0
P41 SOF0 Output P41 = Setting not required PM41 = Setting not required PMC41 = 1 PFCE41 = 0 PFC41 = 0
RXDC4 Input P41 = Setting not required PM41 = Setting not required PMC41 = 1 PFCE41 = 0 PFC41 = 1
SCL01 I/O P41 = Setting not required PM41 = Setting not required PMC41 = 1 PFCE41 = 1 PFC41 = 0 PF41 (PF4) = 0
P42 SCKF0 I/O P42 = Setting not required PM42 = Setting not required PMC42 = 1 − PFC42 = 0
INTP10 Input P42 = Setting not required PM42 = Setting not required PMC42 = 1 − PFC42 = 1
KR2 Input P52 = Setting not required PM52 = Setting not required PMC52 = 1 PFCE52 = 0 PFC52 = 0
P53 SIF2 Input P53 = Setting not required PM53 = Setting not required PMC53 = 1 PFCE53 = 0 PFC53 = 0
RTP03 Output P53 = Setting not required PM53 = Setting not required PMC53 = 1 PFCE53 = 1 PFC53 = 1
P54 SOF2 Output P54 = Setting not required PM54 = Setting not required PMC54 = 1 PFCE54 = 0 PFC54 = 0
KR4 Input P54 = Setting not required PM54 = Setting not required PMC54 = 1 PFCE54 = 0 PFC54 = 1
RTP04 Output P54 = Setting not required PM54 = Setting not required PMC54 = 1 PFCE54 = 1 PFC54 = 0
Pin Name Alternate Function Pnx Bit of PMnx Bit of PMCnx Bit of PFCEnx Bit of PFCnx Bit of Other Bits
Name I/O Pn Register PMn Register PMCn Register PFCEn Register PFCn Register (Registers)
P61 Note1 TIAB10 Input P61 = Setting not required PM61 = Setting not required PMC61 = 1 PFCE61 = 0 PFC61 = 1
TOAB10 Output P61 = Setting not required PM61 = Setting not required PMC61 = 1 PFCE61 = 1 PFC61 = 0
Note1
P62 TOAB1T2 Output P62 = Setting not required PM62 = Setting not required PMC62 = 1 PFCE62 = 0 PFC62 = 0
TOAB12 Output P62 = Setting not required PM62 = Setting not required PMC62 = 1 PFCE62 = 0 PFC62 = 0
TIAB12 Input P62 = Setting not required PM62 = Setting not required PMC62 = 1 PFCE62 = 0 PFC62 = 1
P63 Note1 TOAB1B2 Output P63 = Setting not required PM63 = Setting not required PMC63 = 1 PFCE63 = 0 PFC63 = 0
TRGAB1 Input P63 = Setting not required PM63 = Setting not required PMC63 = 1 PFCE63 = 0 PFC63 = 1
Note1
P64 TOAB1T3 Output P64 = Setting not required PM64 = Setting not required PMC64 = 1 PFCE64 = 0 PFC64 = 0
TOAB13 Output P64 = Setting not required PM64 = Setting not required PMC64 = 1 PFCE64 = 0 PFC64 = 0
TIAB13 Input P64 = Setting not required PM64 = Setting not required PMC64 = 1 PFCE64 = 0 PFC64 = 1
P65 Note1 TOAB1B3 Output P65 = Setting not required PM65 = Setting not required PMC65 = 1 PFCE65 = 0 PFC63 = 0
EVTAB1 Input P65 = Setting not required PM65 = Setting not required PMC65 = 1 PFCE65 = 0 PFC65 = 1
P70 ANI0 Input P70 = Setting not required PM70 = 1 − − −
P71 ANI1 Input P71 = Setting not required PM71 = 1 − − −
P72 ANI2 Input P72 = Setting not required PM72 = 1 − − −
P73 ANI3 Input P73 = Setting not required PM73 = 1 − − −
P74 ANI4 Input P74 = Setting not required PM74 = 1 − − −
P75 Note2 ANI5 Input P75 = Setting not required PM75 = 1 − − −
− − −
Note1
P76 ANI6 Input P76 = Setting not required PM76 = 1
P77 Note1 ANI7 Input P77 = Setting not required PM77 = 1 − − −
Pin Alternate Function Pnx Bit of PMnx Bit of PMCnx Bit of PFCEnx Bit of PFCnx Bit of Other Bits
Name Name I/O Pn Register PMn Register PMCn Register PFCEn Register PFCn Register (Registers)
P92 Note1 TENC01 Input P92 = Setting not required PM92 = Setting not required PMC92 = 1 PFCE92 = 0 PFC92 = 0
TIT01 Input P92 = Setting not required PM92 = Setting not required PMC92 = 1 PFCE92 = 0 PFC92 = 1
TOT01 Output P92 = Setting not required PM92 = Setting not required PMC92 = 1 PFCE92 = 1 PFC92 = 0
P93 Note1 TECR0 Input P93 = Setting not required PM93 = Setting not required PMC93 = 1 PFCE93 = 0 PFC93 = 0
TIT00 Input P93 = Setting not required PM93 = Setting not required PMC93 = 1 PFCE93 = 0 PFC93 = 1
TOT00 Output P93 = Setting not required PM93 = Setting not required PMC93 = 1 PFCE93 = 1 PFC93 = 0
P94 Note1 TENC00 Input P94 = Setting not required PM94 = Setting not required PMC94 = 1 PFCE94 = 1 PFC94 = 0
EVTT0 Input P94 = Setting not required PM94 = Setting not required PMC94 = 1 PFCE94 = 1 PFC94 = 0
P96 TIAA21 Input P96 = Setting not required PM96 = Setting not required PMC96 = 1 PFCE96 = 0 PFC96 = 0
TOAA21 Output P96 = Setting not required PM96 = Setting not required PMC96 = 1 PFCE96 = 1 PFC96 = 0
INTP11 Input P96 = Setting not required PM96 = Setting not required PMC96 = 1 PFCE96 = 1 PFC96 = 0
TIAA20 Input P97 = Setting not required PM97 = Setting not required PMC97 = 1 PFCE97 = 0 PFC97 = 1
TOAA20 Output P97 = Setting not required PM97 = Setting not required PMC97 = 1 PFCE97 = 1 PFC97 = 0
P910 SIF3 Input P910 = Setting not required PM910 = Setting not required PMC910 = 1 PFCE910 = 0 PFC910 = 0
TXDC2 Output P910 = Setting not required PM910 = Setting not required PMC910 = 1 PFCE910 = 0 PFC910 = 1
INTP14 Input P910 = Setting not required PM910 = Setting not required PMC910 = 1 PFCE910 = 1 PFC910 = 0
P911 SOF3 Output P911 = Setting not required PM911 = Setting not required PMC911 = 1 PFCE911 = 0 PFC911 = 0
RXDC2 Input P911 = Setting not required PM911 = Setting not required PMC911 = 1 PFCE911 = 0 PFC911 = 1
INTP15 Input P911 = Setting not required PM911 = Setting not required PMC911 = 1 PFCE911 = 1 PFC911 = 0
P912 SCKF3 I/O P912 = Setting not required PM912 = Setting not required PMC912 = 1 − PFC912 = 0
4.5 Cautions
(1) In the V850ES/JC3-H and V850ES/JE3-H, the general-purpose port functions share pins with several peripheral
function I/O pins. Switch between the general-purpose port (port mode) and the peripheral function I/O pin
(alternate-function mode) by setting the PMCn register. Note the following cautions with regards to this register
setting sequence.
If the PMCn register is set first, note that unexpected operations may occur at that moment or depending on
the change of the pin states in accordance with the setting of the PFn, PFCn, and PFCEn registers.
A concrete example is shown in [Example] below.
Caution Regardless of the port mode/alternate-function mode, the Pn register is read and written as
follows.
• Pn register read: Read the port output latch value (when PMn.PMnm bit = 0), or read the
pin states (PMn.PMnm bit = 1).
• Pn register write: Write to the port output latch
0 don’t care 1 P41 (in output port mode, N-ch open-drain output)
1 0 1 SOF0 output (N-ch open-drain output)
1 1 SCL01 I/O (N-ch open-drain output)
The setting procedure that may cause malfunction on switching from the P41 pin to the SCL01 pin
is shown below.
In <2>, I2C communication may be affected since the alternate-function SOF0 output is output to the
pin. In the CMOS output period of <2> or <3>, unnecessary current may be generated.
[Example 1] Switching from general-purpose port (P02) to external interrupt pin (NMI)
When the P02/NMI pin is pulled up as shown in Figure 4-4 and the rising edge is specified by the
NMI pin edge detection setting, even though a high level is input continuously to the NMI pin
when switching from the P02 pin to the an NMI pin (PMC02 bit = 0 → 1), this is detected as a
rising edge as if a low level changed to a high level, and an NMI interrupt occurs.
To avoid this, set the NMI pin’s valid edge after switching from the P02 pin to the NMI pin.
7 6 5 4 3 2 1 0
PMC0 0→1
3V
PMC0m bit = 0: Port mode
PMC0m bit = 1: Alternate-function mode
Remark m = 2, 3
7 6 5 4 3 2 1 0
PMC0 1→0
3V
PMC0m bit = 0: Port mode
PMC0m bit = 1: Alternate-function mode
Remark m = 2, 3
(2) In port mode, the PFn.PFnm bit is valid only in the output mode (PMn.PMnm bit = 0). In the input mode (PMnm bit
= 1), the value of the PFnm bit is not reflected in the buffer.
• Clear the OCDM0 bit of the OCDM register (special register) (0)
At this time, fix the P56/INTP05/DRST pin to low level from when reset by the RESET pin is released until the above
action is taken.
If a high level is input to the DRST pin before the above action is taken, it may cause a malfunction (CPU deadlock).
Handle the P56 pin with the utmost care.
Caution After reset by the WDT2RES signal, clock monitor (CLM), or low-voltage detector (LVI), the
P56/INTP05/DRST pin is not initialized to function as an on-chip debug pin (DRST). The OCDM
register holds the current value.
• P10/ANO0 pin
• P53/SIF2/KR3/RTP03/DDO pin (V850ES/JC3-H (48 pin), V850ES/JE3-H only)
P02, P03
P30 to P37
P40 to P42
P52 to P56
P60 to P65
P92 to P94, P96, P97, P910 to P913
5.1 Overview
5.2 Configuration
FRC bit
IDLE
control CLS, CK3
MFRC PLLON bits
bit bit IDLE mode
CK2 to CK0
fX bits
X1 Main clock
PLL IDLE fXX Prescaler 2
Selector
Selector
mode
fXX/32
Main clock
oscillator fXX/16
Selector
Selector
stop control fXX/8 HALT fCPU
CPU clock
control
fXX/4
STOP mode fCLK Internal
fXX/2
SELPLL bit system clock
fXX
RSTOP bit
CLKOUT Port CM
UCKSEL
bit
Prescaler 1 Peripheral clock
Selector
USB clock
UCLK
• In clock-through mode
fX = 3.0 to 6.0 MHz
• In PLL mode
fX = 3.0 to 6.0 MHz (×8)
(5) Prescaler 1
This prescaler generates the clock (fXX to fXX/1,024) to be supplied to the following on-chip peripheral functions:
TAA, TAB, TMM, TMT, CSIF, UARTC, I2C, CAN, ADC, DAC, WDT2
(6) Prescaler 2
This circuit divides the main clock (fXX).
The clock generated by prescaler 2 (fXX to fXX/32) is supplied to the selector that generates the CPU clock (fCPU)
and internal system clock (fCLK).
fCLK is the clock supplied to the INTC, ROM, and RAM blocks, and can be output from the CLKOUT pin.
(7) Prescaler 3
This circuit divides the clock generated by the main clock oscillator (fX) to a specific frequency (32.768 kHz) and
supplies that clock to the real-time counter (RTC) block.
(8) PLL
This circuit multiplies the clock generated by the main clock oscillator (fX) by 8.
It operates in two modes: clock-through mode in which fX is output as is, and PLL mode in which a multiplied clock
is output. These modes can be selected by using the PLLCTL.SELPLL bit.
5.3 Registers
Cautions 1. Do not change the CPU clock (by using the CK3 to CK0 bits) while CLKOUT is being
output.
2. Use a bit manipulation instruction to manipulate the CK3 bit. When using an 8-bit
manipulation instruction, do not change the set values of the CK2 to CK0 bits.
Cautions 1. When stopping the main clock, stop the PLL. Also stop the operations of the on-chip
peripheral functions operating with the main clock.
2. If the following conditions are not satisfied, change the CK2 to CK0 bits so that the
conditions are satisfied, then change to the subclock operation mode.
Internal system clock (fCLK) > Subclock (fXT: 32.768 kHz) × 4
Remark Internal system clock (fCLK): Clock generated from the main clock (fXX) by setting the CK2 to CK0
bits
[Description example]
_DMA_DISABLE:
clrl 0, DCHCn[r0] -- DMA operation disabled. n = 0 to 3
<1> _SET_SUB_RUN :
st.b r0, PRCMD[r0]
set1 3, PCC[r0] -- CK3 bit ← 1
<2> _CHECK_CLS :
tst1 4, PCC[r0] -- Wait until subclock operation starts.
bz _CHECK_CLS
<3> _STOP_MAIN_CLOCK :
st.b r0, PRCMD[r0]
set1 6, PCC[r0] -- MCK bit ← 1, main clock is stopped.
_DMA_ENABLE:
setl 0, DCHCn[r0] -- DMA operation enabled. n = 0 to 3
Remark The description above is simply an example. Note that in <2> above, the CLS bit is read in a closed
loop.
Caution Enable operation of the on-chip peripheral functions operating with the main clock only after
the oscillation of the main clock stabilizes. If their operations are enabled before the lapse of
the oscillation stabilization time, a malfunction may occur.
[Description example]
_DMA_DISABLE:
clrl 0, DCHCn[r0] -- DMA operation disabled. n = 0 to 3
<1> _START_MAIN_OSC :
st.b r0, PRCMD[r0] -- Release of protection of special registers
clr1 6, PCC[r0] -- Main clock starts oscillating.
<2> movea 0x55, r0, r11 -- Wait for oscillation stabilization time.
_WAIT_OST :
nop
nop
nop
addi -1, r11, r11
cmp r0, r11
bne _WAIT_OST
<3> st.b r0, PRCMD[r0]
clr1 3, PCC[r0] -- CK3 ← 0
<4> _CHECK_CLS :
tst1 4, PCC[r0] -- Wait until main clock operation starts.
bnz _CHECK_CLS
_DMA_ENABLE:
setl 0, DCHCn[r0] -- DMA operation enabled. n = 0 to 3
Remark The description above is simply an example. Note that in <4> above, the CLS bit is read in a closed
loop.
< >
RCM 0 0 0 0 0 0 0 RSTOP
Cautions 1. The internal oscillator cannot be stopped while the CPU is operating on the internal
oscillation clock (CCLS.CCLSF bit = 1). Do not set the RSTOP bit to 1.
2. The internal oscillator oscillates if the CCLS.CCLSF bit is set to 1 (when WDT overflow
occurs during oscillation stabilization) even when the RSTOP bit is set to 1. At this time,
the RSTOP bit remains being set to 1.
CCLS 0 0 0 0 0 0 0 CCLSF
Note If WDT overflow occurs during oscillation stabilization after a reset is released, the CCLSF bit is set
to 1 and the reset value is 01H.
5.4 Operation
Remark : Operable
×: Stopped
5.5.1 Overview
In the V850ES/JC3-H and V850ES/JE3-H, an operating clock that is 8 times higher than the oscillation frequency
output by the PLL function or the clock-through mode can be selected as the operating clock of the CPU and on-chip
peripheral functions.
When PLL function is used (×8): Input clock = 3.0 to 6.0 MHz (output: 24 to 48 MHz)
Clock-through mode: Input clock = 3.0 to 6.0 MHz (output: 3.0 to 6.0 MHz)
5.5.2 Registers
Cautions 1. When the PLLON bit is cleared to 0, the SELPLL bit is automatically cleared to 0 (clock-
through mode).
2. The SELPLL bit can be set to 1 only when the PLL clock frequency is stabilized. If not
(unlocked), "0" is written to the SELPLL bit if data is written to it.
CKC 0 0 0 0 1 0 1 CKDIV0
Caution 1. Be sure to set the CKC register to 0BH. When setting this register to a value other than
0BH or leaving it set to its initial value without setting it to 0BH, enabling PLL operation
(PLLCTL.SELPLL = 1) is prohibited.
2. Be sure to set bits 3 and 1 to ‘‘1’’ and clear bits 7 to 4 and 2 to ‘‘0’’.
Remark Both the CPU clock and peripheral clock are divided by the CKC register, but only the CPU clock is
divided by the PCC register.
< >
LOCKR 0 0 0 0 0 0 0 LOCK
Caution The LOCK register does not reflect the lock status of the PLL in real time. The set/clear
conditions are as follows.
[Set conditions]
• Upon system resetNote
• In IDLE2 or STOP mode
• Upon setting of PLL stop (clearing of PLLCTL.PLLON bit to 0)
• Upon stopping main clock and using CPU with subclock (setting of PCC.CK3 bit to 1 and setting of
PCC.MCK bit to 1)
Note This register is set to 01H by reset and cleared to 00H after the reset has been released and the
oscillation stabilization time has elapsed.
[Clear conditions]
• Upon overflow of oscillation stabilization time following reset release (OSTS register default time (see 24.2
(3) Oscillation stabilization time select register (OSTS)))
• Upon oscillation stabilization timer overflow (time set by OSTS register) following STOP mode release,
when the STOP mode was set in the PLL operating status
• Upon PLL lockup time timer overflow (time set by PLLS register) when the PLLCTL.PLLON bit is changed
from 0 to 1
• After the setup time inserted upon release of the IDLE2 mode is released (time set by the OSTS register)
when the IDLE2 mode is set during PLL operation.
5.5.3 Usage
(a) When transiting to the IDLE2 or STOP mode from the clock through mode
• STOP mode: Set the OSTS register so that the oscillation stabilization time is 1 ms (min.) or longer.
• IDLE2 mode: Set the OSTS register so that the setup time is 350 μs (min.) or longer.
(b) When transiting to the IDLE 2 or STOP mode while remaining in the PLL operation mode
• STOP mode: Set the OSTS register so that the oscillation stabilization time is 1 ms (min.) or longer.
• IDLE2 mode: Set the OSTS register so that the setup time is 800 μs (min.) or longer.
When transiting to the IDLE1 mode, the PLL does not stop. Stop the PLL if necessary.
6.1 Overview
Note External event count input pins and external trigger input pins are alternately used as capture/trigger input pins
(TIAAm0).
Remark n = 0 to 2, 4
m = 0 to 2
k = 2 (V850ES/JC3-H)
k =0 to 2 (V850ES/JE3-H)
6.2 Functions
• Interval timer
• External event counter
• External trigger pulse output
• One-shot pulse output
• PWM output
• Free-running timer
• Pulse width measurement
• Timer-tuned function
• Simultaneous-start function
6.3 Configuration
Item Configuration
Notes 1. When using the functions of the TIAAm0, TIAAm1, TOAAm0, and TOAAm1 pins, see Table 4-17
Using Port Pin as Alternate-Function Pin.
2. The TIAAm0 pin functions alternately as a capture trigger input signal, external event count input
signal, and external trigger input signal.
Remark n = 0 to 2, 4
m = 0 to 2
k = 2 (V850ES/JC3-H)
k =0 to 2 (V850ES/JE3-H)
Internal bus
fXX TAAnCNT
fXX/2
fXX/4
Selector
fXX/8
Note
Selector
fXX/16 16-bit counter INTTAAnOV
fXX/32 Clear
fXX/64
controller
TOAAm0
Output
fXX/128
TOAAm1
CCR0
buffer
register CCR1 INTTAAnCC0
buffer INTTAAnCC1
register
detector
TIAAm0 TAAnCCR0
Edge
TIAAk1 TAAnCCR1
Internal bus
Note TAA2: fXX/2, fXX/4, fXX/8, fXX/16, fXX/64, fXX/256, fXX/512, fXX/1024.
(6) Selector
This selector selects the count clock for the 16-bit counter. Eight types of internal clocks or an external event can
be selected as the count clock.
Notes 1. The TAAm0 pin functions alternately as a capture trigger input function, external event input function, and
external trigger input function.
2. The V850ES/JE3-H only
Cautions1. When using the external trigger pulse output mode, one-shot pulse output mode, and pulse width
measurement mode, select the internal clock as the count clock (by clearing the
TAAnCTL1.TAAnEEE bit to 0).
2. To use the external event count mode, specify that the valid edge of the TIAAn0 pin capture trigger
input is not detected (by setting the TAAnCTL1.TAAnEEE bit to 1).
Remarks1. TAA4 has no timer input pin and output pin functions. When TAA4 is used solely, therefore, only
the interval timer function can be used. The 6-phase PWM output function is available by using
TAA4 in combination with TAB1.
2. n = 0 to 2, 4
m = 0 to 2
6.4 Registers
Remarks 1. When using the functions of the TIAAm0, TIAAm1, TOAAm0, and TOAAm1 pins, see Table 4-17 Using
Port Pin as Alternate-Function Pin.
2. n = 0 to 2, 4
m = 0 to 2
7 6 5 4 3 2 1 0
TAAnCTL0 TAAnCE 0 0 0 0 TAAnCKS2 TAAnCKS1 TAAnCKS0
(n = 0 to 2, 4)
TAAnCE TAAn operation control
0 TAAn operation disabled (TAAn reset asynchronouslyNote ).
1 TAAn operation enabled. TAAn operation started.
Note TAAnOPT0.TAAnOVF bit, 16-bit counter, timer output (TOAAn0, TOAAn1 pins)
Cautions 1. Set the TAAnCKS2 to TAAnCKS0 bits when the TAAnCE bit = 0.
When the value of the TAAnCE bit is changed from 0 to 1, the
TAAnCKS2 to TAAnCKS0 bits can be set simultaneously.
2. Be sure to set bits 3 to 6 to “0”.
7 6 5 4 3 2 1 0
TAA0CTL1 TAA0SYE TAA0EST TAA0EEETAA0SYM 0 TAA0MD2 TAA0MD1 TAA0MD0
Cautions 1. The TAAnEST bit is valid only in the external trigger pulse output
mode or one-shot pulse output mode. In any other mode, writing 1
to this bit is ignored.
2. Be sure to clear the sections of the TAAnCTL1 register of each
channel, where 0 is specified, to 0.
(2/2)
The TAAmEEE bit selects whether counting is performed with the internal count
clock or the valid edge of the external event count input.
Cautions 1. External event count input is selected in the external event count mode
regardless of the value of the TAAmEEE bit.
2. Set the TAAmEEE and TAAmMD2 to TAAmMD0 bits when the
TAAmCTL0.TAAmCE bit = 0. (The same value can be written when the
TAAmCE bit = 1.) The operation is not guaranteed when rewriting is
performed with the TAAmCE bit = 1. If rewriting was mistakenly
performed, clear the TAAnCE bit to 0 and then set the bits again (m = 0 to
3, 5).
7 6 5 4 3 2 1 0
TAAnIOC0 0 0 0 0 TAAnOL1 TAAnOE1 TAAnOL0 TAAnOE0
(n = 0 to 2)
TAAnOL1 TOAAn1 pin output level settingNote
0 TOAAn1 pin output starts at high level
1 TOAAn1 pin output starts at low level
Note The output level of the timer output pin (TOAAnm) specified by the
TAAnOLm bit is shown below.
7 6 5 4 3 2 1 0
TAAnIOC1 0 0 0 0 TAAnIS3 TAAnIS2 TAAnIS1 TAAnIS0
(n = 0 to 2)
TAAnIS3 TAAnIS2 Capture trigger input signal (TIAAn1 pin)Note valid edge setting
0 0 No edge detection (capture operation invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
TAAnIS1 TAAnIS0 Capture trigger input signal (TIAAn0 pin) valid edge setting
0 0 No edge detection (capture operation invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
Note n = 2 (V850ES/JC3-H)
n = 0 to 2 (V850ES/JE3-H)
7 6 5 4 3 2 1 0
TAAnIOC2 0 0 0 0 TAAnEES1 TAAnEES0 TAAnETS1 TAAnETS0
(n = 0 to 2)
TAAnEES1 TAAnEES0 External event count input signal (TIAAn0 pin) valid edge setting
0 0 No edge detection (external event count invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
TAAnETS1 TAAnETS0 External trigger input signal (TIAAn0 pin) valid edge setting
0 0 No edge detection (external trigger invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
Cautions 1. Accessing the TAAnIOC4 register is prohibited in the following statuses. For details, see 3.4.9
(2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
2. The TAAnIOC4 register can be set only in the interval timer mode and free-running timer mode.
Be sure to set the TAAnIOC4 register to 00H in all other modes (for details of the mode setting,
see 6.4 (2) TAAn control register 1 (TAAnCTL1)). The TAAnIOC4 register setting is invalid if the
TAAnCCR0 and TAAnCCR1 registers are set to the capture function, even if the free-running
timer mode is set.
7 6 5 4 3 2 1 0
TAAnIOC4 0 0 0 0 TAAnOS1 TAAnOR1 TAAnOS0 TAAnOR0
(n = 0 to 2)
TAAnOS1 TAAnOR1 Toggle control of TIAAn1 pin
0 0 No request. Normal toggle operation.
0 1 Reset request
Fix to inactive level upon next match between value of 16-bit
counter and value of TAAnCCR1 register.
1 0 Set request
Fix to active level upon next match between value of 16-bit
counter and value of TAAnCCR1 register.
1 1 Keep request
Keep current output level.
7 6 5 4 3 2 1 0
TAAnOPT0 0 0 TAAnCCS1TAAnCCS0 0 0 0 TAAnOVF
(n = 0 to 2)
TAAnCCS1 TAAnCCR1 register capture/compare selection
0 Compare register selected
1 Capture register selected
The TAAnCCS1 bit setting is valid only in the free-running timer mode.
7 6 5 4 3 2 1 0
TAAnOPT1 TAAnCSE 0 0 0 0 0 0 0
(n = 0, 2)
TAAnCSE Cascade control
0 Individual operation or operation as lower side of cascade function
1 Operation as higher side of cascade function
Caution Accessing the TAAnCCR0 register is prohibited in the following statuses. For details, see 3.4.9
(2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TAAnCCR0
(n = 0 to 2, 4)
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 6-3. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Caution Accessing the TAAnCCR1 register is prohibited in the following statuses. For details, see 3.4.9
(2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TAAnCCR1
(n = 0 to 2, 4)
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 6-4. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Caution Accessing the TAAnCNT register is prohibited in the following statuses. For details, see 3.4.9 (2)
Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TAAnCNT
(n = 0 to 2, 4)
Caution Time equal to the sampling clock × 3 clocks is required until the digital noise eliminator is
initialized after the sampling clock has been changed. If the valid edge of TIAAn0 and TIAAn1 is
input after the sampling clock has been changed and before the time of the sampling clock × 3
clocks passes, therefore, an interrupt request signal may be generated. Therefore, when using
the external trigger function, the external event function, and the capture trigger function of TAA,
enable TAA operation after the time of the sampling clock × 3 clocks has elapsed.
Remark n = 0 to 2
m = 2 (V850ES/JC3-H)
0 to 2 (V850ES/JE3-H)
Remarks 1. Since sampling is performed 3 times, the noise width for reliably eliminating
noise is 2 sampling clocks.
2. In the case of noise with a width smaller than 2 sampling clocks, an
interrupt request signal is generated if noise synchronized with the
sampling clock is input.
A timing example of noise elimination performed by the timer AA input pin digital filter is shown Figure 6-2.
Sampling
3 times
Internal signal
Remarks1. If there are two or fewer noise elimination clocks while the TIAAn0 or TIAAm1 input signal is
high level (or low level), that input signal is eliminated as noise. If it is sampled three times or
more, the edge is detected as a valid input.
2. n = 0 to 2
m = 2 (V850ES/JC3-H)
m = 0 to 2 (V850ES/JE3-H)
6.5 Operation
Notes 1. To use the external event count mode, specify that the valid edge of the TIAAn0 pin capture trigger input is not
detected (by clearing the TAAnIOC1.TAAnIS1 and TAAnIOC1.TAAnIS0 bits to “00”).
2. When using the external trigger pulse output mode, one-shot pulse output mode, and pulse width measurement
mode, select the internal clock as the count clock (by clearing the TAAnCTL1.TAAnEEE bit to 0).
Remark n = 0 to 2
Figure 6-3. Example of Basic Anytime Write Operation Flowchart (Interval Timer Mode of TAA0)
START
Initial settings
Timer operation
• Match between 16-bit counter INTTAA0CC1 signal output
and CCR1 buffer registerNote
• Match between 16-bit counter INTTAA0CC0 signal output
and CCR0 buffer register
• 16-bit counter clear & start
Note The 16-bit counter is not cleared upon a match between the 16-bit counter value
and the CCR1 buffer register value. It is cleared upon a match between the 16-bit
counter value and the CCR0 buffer register value.
Remark n = 0, 1
Figure 6-4. Example of Anytime Write Timing (Interval Timer Mode of TAA0)
TAA0CE bit = 1
D01 D01
FFFFH
D02
0000H
INTTAA0C0 signal
INTTAA0CC1 signal
Figure 6-5. Example of Basic Batch Write Operation Flowchart (PWM Output Mode of TAA0)
START
Initial settings
Timer operation
• Match between 16-bit counter INTTAA0CC1 signal output
and CCR1 buffer registerNote
• Match between 16-bit counter INTTAA0CC0 signal output
and CCR0 buffer register
• 16-bit counter clear & start
• Transfer of values of TAA0CCRn
register to CCRn buffer register
Note The 16-bit counter is not cleared upon a match between the 16-bit counter value and the CCR1
buffer register value. It is cleared upon a match between the 16-bit counter value and the CCR0
buffer register value.
Caution Writing to the TAA0CCR1 register includes enabling of batch write. Thus, rewrite the
TAA0CCR1 register after rewriting the TAA0CCR0 register.
Remark n = 0, 1
TAA0CE bit = 1
D01
FFFFH
D03
D02 D02
D11
16-bit counter D12 D12 D12 D12
0000H
INTTAA0CC0 signal
INTTAA0CC1 signal
Notes 1. Because the TAA0CCR1 register was not rewritten, D03 is not transferred.
2. Because the TAA0CCR1 register has been written (D12), data is transferred to the CCR1
buffer register upon a match between the value of the 16-bit counter and the value of the
TAA0CCR0 register (D01).
3. Because the TAA0CCR1 register has been written (D12), data is transferred to the CCR1
buffer register upon a match between the value of the 16-bit counter and the value of the
TAA0CCR0 register (D02).
Clear
Match signal
INTTAAnCC0 signal
TAAnCCR0 register
Remark m = 0 to 2
n = 0 to 2, 4
FFFFH
D0 D0 D0 D0
16-bit counter
0000H
TAAnCE bit
TAAnCCR0 register D0
INTTAAnCC0 signal
Remark m = 0 to 2
n = 0 to 2, 4
When the TAAnCE bit is set to 1, the value of the 16-bit counter is cleared from FFFFH to 0000H in synchronization
with the count clock, and the counter starts counting. At this time, the output of the TOAAn0 pin is inverted. Additionally,
the set value of the TAAnCCR0 register is transferred to the CCR0 buffer register.
When the count value of the 16-bit counter matches the value of the CCR0 buffer register, the 16-bit counter is cleared
to 0000H, the output of the TOAAn0 pin is inverted, and a compare match interrupt request signal (INTTAAnCC0) is
generated.
The interval can be calculated by the following expression.
Remark m = 0 to 2
n = 0 to 2, 4
Figure 6-9. Register Settings for Interval Timer Mode Operation (1/2)
0, 0, 0:
Interval timer mode
0: Operates on count clock
selected by TAAmCKS0
to TAAmCKS2 bits
1: Counts with external
event count input signal
Note This bit can be set to 1 only when the interrupt request signals (INTTAAmCC0 and INTTAAmCC1) are
masked by the interrupt mask flags (TAAmCCMK0 and TAAmCCMK1) and timer output (TOAAm1) is
performed. However, set the TAAmCCR0 and TAAmCCR1 registers to the same value (see 6.5.1 (2) (d)
Operation of TAAnCCR1 register).
Remark m = 0 to 2
n = 0 to 2, 4
Figure 6-9. Register Settings for Interval Timer Mode Operation (2/2)
Remarks 1. TAAm I/O control register 1 (TAAmIOC1), TAAm I/O control register 2 (TAAmIOC2), and
TAAm option register 0 (TAAmOPT0) are not used in the interval timer mode.
2. m = 0 to 2
n = 0 to 2, 4
FFFFH
D0 D0 D0
16-bit counter
0000H
TAAnCE bit
TAAnCCR0 register D0
INTTAAnCC0 signal
<1> <2>
START
STOP
Remark m = 0 to 2
n = 0 to 2, 4
Count clock
TAAnCE bit
INTTAAnCC0 signal
Remark m = 0 to 2
n = 0 to 2, 4
FFFFH
16-bit counter
0000H
TAAnCE bit
INTTAAnCC0 signal
Remark m = 0 to 2
n = 0 to 2, 4
FFFFH
D1 D1
16-bit counter
D2 D2 D2
0000H
TAAnCE bit
TAAnCCR0 register D1 D2
TAAnOL0 bit L
INTTAAnCC0 signal
If the value of the TAAnCCR0 register is changed from D1 to D2 while the count value is greater than D2 but
less than D1, the count value is transferred to the CCR0 buffer register as soon as the TAAnCCR0 register has
been rewritten. Consequently, the value of the 16-bit counter that is compared is D2.
Because the count value has already exceeded D2, however, the 16-bit counter counts up to FFFFH, overflows,
and then counts up again from 0000H. When the count value matches D2, the INTTAAnCC0 signal is
generated and the output of the TOAAm0 pin is inverted.
Therefore, the INTTAAnCC0 signal may not be generated at the interval time “(D1 + 1) × Count clock cycle” or
“(D2 + 1) × Count clock cycle” as originally expected, but may be generated at an interval of “(10000H + D2 + 1)
× Count clock period”.
TAAnCCR1 register
Output
CCR1 buffer register TOAAn1 pinNote
controller
Match signal
INTTAAnCC1 signal
Clear
Match signal
INTTAAnCC0 signal
TAAnCCR0 register
Note The TOAA01 pin and TOAA11 pin are only in The V850ES/JE3-H.
Remark n = 0 to 2
If the set value of the TAAnCCR1 register is less than the set value of the TAAnCCR0 register, the
INTTAAnCC1 signal is generated once per cycle. At the same time, the output of the TOAAn1 pin is inverted.
The TOAAn1 pin outputs a square wave with the same cycle as that output by the TOAAn0 pin.
FFFFH
D01 D01 D01 D01
16-bit counter
D11 D11 D11 D11
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
Remark n = 0 to 2
If the set value of the TAAnCCR1 register is greater than the set value of the TAAnCCR0 register, the count
value of the 16-bit counter does not match the value of the TAAnCCR1 register. Consequently, the
INTTAAnCC1 signal is not generated, nor is the output of the TOAAn1 pin changed.
FFFFH
D01 D01 D01 D01
16-bit counter
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal L
Remark n = 0 to 2
Clear
TAAnCCR0 register
Remark n = 0 to 2
FFFFH
D0 D0 D0
16-bit counter
External event
TAAnCE bit count input
(TIAAn0 pin input)
Remarks 1. This figure shows the basic timing when the rising edge is specified as the valid edge of the
external event count input.
2. n = 0 to 2
When the TAAnCE bit is set to 1, the value of the 16-bit counter is cleared from FFFFH to 0000H. The counter counts
each time the valid edge of external event count input is detected. Additionally, the set value of the TAAnCCR0 register is
transferred to the CCR0 buffer register.
When the count value of the 16-bit counter matches the value of the CCR0 buffer register, the 16-bit counter is cleared
to 0000H, and a compare match interrupt request signal (INTTAAnCC0) is generated.
The INTTAAnCC0 signal is generated each time the valid edge of the external event count input has been detected (set
value of TAAnCCR0 register + 1) times.
Figure 6-16. Register Setting for Operation in External Event Count Mode (1/2)
0: Stops counting
1: Enables counting
0, 0, 1:
External event count mode
Figure 6-16. Register Setting for Operation in External Event Count Mode (2/2)
Caution When an external clock is used as the count clock, the external clock can be input only
from the TIAAn0 pin. At this time, set the TAAnIOC1.TAAnIS1 and TAAnIOC1.TAAnIS0
bits to 00 (capture trigger input (TIAAn0 pin): no edge detection).
Remarks 1. TAAn I/O control register 1 (TAAnIOC1) and TAAn option register 0 (TAAnOPT0) are not
used in the external event count mode.
2. n = 0 to 2
FFFFH
D0 D0 D0
16-bit counter
0000H
TAAnCE bit
TAAnCCR0 register D0
INTTAAnCC0 signal
<1> <2>
START
STOP
Remark n = 0 to 2
Cautions 1. In the external event count mode, do not set the TAAnCCR0 register to 0000H.
2. In the external event count mode, use of the timer output is disabled. If performing timer
output using external event count input, set the interval timer mode, and select the operation
of the count clock to be enabled by the external event count input (TAAnCTL1.TAAnMD2 to
TAAnCTL1.TAAnMD0 bits = 000, TAAnCTL1.TAAnEEE bit = 1).
FFFFH
16-bit counter
0000H
TAAnCE bit
INTTAAnCC0 signal
Remark n = 0 to 2
FFFFH
D1 D1
16-bit counter
D2 D2 D2
0000H
TAAnCE bit
TAAnCCR0 register D1 D2
INTTAAnCC0 signal
Remark n = 0 to 2
If the value of the TAAnCCR0 register is changed from D1 to D2 while the count value is greater than D2 but
less than D1, the count value is transferred to the CCR0 buffer register as soon as the TAAnCCR0 register has
been rewritten. Consequently, the value that is compared with the 16-bit counter is D2.
Because the count value has already exceeded D2, however, the 16-bit counter counts up to FFFFH, overflows,
and then counts up again from 0000H. When the count value matches D2, the INTTAAnCC0 signal is
generated.
Therefore, the INTTAAnCC0 signal may not be generated at the valid edge count of “(D1 + 1) times” or “(D2 + 1)
times” as originally expected, but may be generated at the valid edge count of “(10000H + D2 + 1) times”.
TAAnCCR1 register
Match signal
INTTAAnCC1 signal
Clear
Edge
TIAAn0 pin 16-bit counter
detector
Match signal
INTTAAnCC0 signal
TAAnCCR0 register
Remark n = 0 to 2
If the set value of the TAAnCCR1 register is smaller than the set value of the TAAnCCR0 register, the
INTTAAnCC1 signal is generated once per cycle.
FFFFH
D01 D01 D01 D01
16-bit counter
D11 D11 D11 D11
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
Remark n = 0 to 2
If the set value of the TAAnCCR1 register is greater than the set value of the TAAnCCR0 register, the
INTTAAnCC1 signal is not generated because the count value of the 16-bit counter and the value of the
TAAnCCR1 register do not match.
FFFFH
D01 D01 D01 D01
16-bit counter
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal L
Remark n = 0 to 2
6.5.3 External trigger pulse output mode (TAAnMD2 to TAAnMD0 bits = 010)
In the external trigger pulse output mode, 16-bit timer/event counter AA waits for a trigger when the TAAnCTL0.TAAnCE
bit is set to 1. When the valid edge of an external trigger input signal is detected, 16-bit timer/event counter AA starts
counting, and outputs a PWM waveform from the TOAAn1 pin.
Pulses can also be output by generating a software trigger instead of using the external trigger. When using a software
trigger, a square wave that has one cycle of the PWM waveform as half its cycle can also be output from the TOAAn0 pin.
TAAnCCR1 register
Edge Transfer
TIAAn0 pin
detector
Output
S
CCR1 buffer register controller TOAAn1 pin
R (RS-FF)
Software trigger
generation Match signal
INTTAAnCC1 signal
Clear
Count Count
clock Output
start 16-bit counter TOAAn0 pin
selection controller
control
Match signal
INTTAAnCC0 signal
Transfer
TAAnCCR0 register
Remark n = 0 to 2
FFFFH
D0 D0 D0 D0
16-bit counter D1 D1 D1 D1
0000H
TAAnCE bit
TAAnCCR0 register D0
INTTAAnCC0 signal
TOAAn0 pin output
(only when software
trigger is used)
TAAnCCR1 register D1
INTTAAnCC1 signal
16-bit timer/event counter AA waits for a trigger when the TAAnCE bit is set to 1. When the trigger is generated, the 16-
bit counter is cleared from FFFFH to 0000H, starts counting at the same time, and outputs a PWM waveform from the
TOAAn1 pin. If the trigger is generated again while the counter is operating, the counter is cleared to 0000H and restarted.
(The output of the TOAAn0 pin is inverted. The TOAAn1 pin outputs a high level regardless of the status (high/low) when a
trigger occurs.)
The active level width, cycle, and duty factor of the PWM waveform can be calculated as follows.
Active level width = (Set value of TAAnCCR1 register) × Count clock cycle
Cycle = (Set value of TAAnCCR0 register + 1) × Count clock cycle
Duty factor = (Set value of TAAnCCR1 register)/(Set value of TAAnCCR0 register + 1)
The compare match request signal INTTAAnCC0 is generated the next time the 16-bit counter counts after its count
value matches the value of the CCR0 buffer register, and the 16-bit counter is cleared to 0000H at the same time. The
compare match interrupt request signal INTTAAnCC1 is generated when the count value of the 16-bit counter matches the
value of the CCR1 buffer register.
The value set to the TAAnCCRm register is transferred to the CCRm buffer register when the count value of the 16-bit
counter matches the value of the CCRm buffer register and the 16-bit counter is cleared to 0000H.
The valid edge of an external trigger input signal, or setting the software trigger (TAAnCTL1.TAAnEST bit) to 1 is used
as the trigger.
Remark n = 0 to 2
m = 0, 1
Figure 6-23. Setting of Registers in External Trigger Pulse Output Mode (1/2)
0, 1, 0:
External trigger pulse
output mode
Note Clear this bit to 0 when the TOAAn0 pin is not used in the external trigger pulse output mode.
Figure 6-23. Setting of Registers in External Trigger Pulse Output Mode (2/2)
Remarks 1. TAAn I/O control register 1 (TAAnIOC1) and TAAn option register 0 (TAAnOPT0) are not
used in the external trigger pulse output mode.
2. n = 0 to 2
Figure 6-24. Software Processing Flow in External Trigger Pulse Output Mode (1/2)
FFFFH
D01 D01 D01
16-bit counter D00 D00 D11 D11 D00
D10 D10 D10 D10
0000H
TAAnCE bit
INTTAAnCC0 signal
TOAAn0 pin output
(only when software
trigger is used)
INTTAAnCC1 signal
Remark n = 0 to 2
Figure 6-24. Software Processing Flow in External Trigger Pulse Output Mode (2/2)
Remark n = 0 to 2
m = 0, 1
FFFFH
D01 D01
16-bit counter D00 D00 D00 D11 D11
D10 D10 D10
0000H
TAAnCE bit
INTTAAnCC0 signal
TOAAn0 pin output
(only when software
trigger is used)
INTTAAnCC1 signal
In order to transfer data from the TAAnCCRm register to the CCRm buffer register, the TAAnCCR1 register
must be written.
To change both the cycle and active level width of the PWM waveform at this time, first set the cycle to the
TAAnCCR0 register and then set the active level width to the TAAnCCR1 register.
To change only the cycle of the PWM waveform, first set the cycle to the TAAnCCR0 register, and then write
the same value to the TAAnCCR1 register.
To change only the active level width (duty factor) of the PWM waveform, only the TAAnCCR1 register has to
be set.
After data is written to the TAAnCCR1 register, the value written to the TAAnCCRm register is transferred to the
CCRm buffer register in synchronization with clearing of the 16-bit counter, and is used as the value compared
with the 16-bit counter.
To write the TAAnCCR0 or TAAnCCR1 register again after writing the TAAnCCR1 register once, do so after the
INTTAAnCC0 signal is generated. Otherwise, the value of the CCRm buffer register may become undefined
because the timing of transferring data from the TAAnCCRm register to the CCRm buffer register conflicts with
writing the TAAnCCRm register.
Remark n = 0 to 2
m = 0, 1
Count clock
TAAnCE bit
TAAnCCR0 register D0 D0 D0
INTTAAnCC0 signal
INTTAAnCC1 signal
Remark n = 0 to 2
To output a 100% waveform, set a value of (set value of TAAnCCR0 register + 1) to the TAAnCCR1 register. If
the set value of the TAAnCCR0 register is FFFFH, 100% output cannot be produced.
Count clock
TAAnCE bit
TAAnCCR0 register D0 D0 D0
TAAnCCR1 register D0 + 1 D0 + 1 D0 + 1
INTTAAnCC0 signal
INTTAAnCC1 signal
Remark n = 0 to 2
(c) Conflict between trigger detection and match with TAAnCCR1 register
If the trigger is detected immediately after the INTTAAnCC1 signal is generated, the 16-bit counter is cleared to
0000H at the same time, the output signal of the TOAAn1 pin is asserted, and the counter continues counting.
Consequently, the inactive period of the PWM waveform is shortened.
TAAnCCR1 register D1
INTTAAnCC1 signal
Shortened
Remark n = 0 to 2
If the trigger is detected immediately before the INTTAAnCC1 signal is generated, the INTTAAnCC1 signal is
not generated, and the 16-bit counter is cleared to 0000H and continues counting. The output signal of the
TOAAn1 pin remains active. Consequently, the active period of the PWM waveform is extended.
TAAnCCR1 register D1
INTTAAnCC1 signal
Extended
Remark n = 0 to 2
(d) Conflict between trigger detection and match with TAAnCCR0 register
If the trigger is detected immediately after the INTTAAnCC0 signal is generated, the 16-bit counter is cleared to
0000H again and continues counting up. Therefore, the active period of the TOAAn1 pin is extended by the
time from generation of the INTTAAnCC0 signal to trigger detection.
TAAnCCR0 register D0
INTTAAnCC0 signal
Extended
Remark n = 0 to 2
If the trigger is detected immediately before the INTTAAnCC0 signal is generated, the INTTAAnCC0 signal is
not generated. The 16-bit counter is cleared to 0000H, the TOAAn1 pin is asserted, and the counter continues
counting. Consequently, the inactive period of the PWM waveform is shortened.
TAAnCCR0 register D0
INTTAAnCC0 signal
Shortened
Remark n = 0 to 2
Count clock
16-bit counter D1 − 2 D1 − 1 D1 D1 + 1 D1 + 2
TAAnCCR1 register D1
INTTAAnCC1 signal
Remark n = 0 to 2
Usually, the INTTAAnCC1 signal is generated in synchronization with the next count-up, after the count value of
the 16-bit counter matches the value of the TAAnCCR1 register.
In the external trigger pulse output mode, however, it is generated one clock earlier. This is because the timing
is changed to match the timing of changing the output signal of the TOAAn1 pin.
TAAnCCR1 register
Edge Transfer
TIAAn0 pin
detector
Output
S
CCR1 buffer register controller TOAAn1 pin
R (RS-FF)
Software trigger
generation Match signal
INTTAAnCC1 signal
Clear
Output
Count clock Count start S
16-bit counter controller TOAAn0 pin
selection control R (RS-FF)
Match signal
INTTAAnCC0 signal
Transfer
TAAnCCR0 register
Remark n = 0 to 2
FFFFH
D0 D0 D0
16-bit counter
D1 D1 D1
0000H
TAAnCE bit
TAAnCCR0 register D0
INTTAAnCC0 signal
TOAAn0 pin output
(only when software
trigger is used)
TAAnCCR1 register D1
INTTAAnCC1 signal
When the TAAnCE bit is set to 1, 16-bit timer/event counter AA waits for a trigger. When the trigger is generated, the
16-bit counter is cleared from FFFFH to 0000H, starts counting, and outputs a one-shot pulse from the TOAAn1 pin. After
the one-shot pulse is output, the 16-bit counter is set to FFFFH, stops counting, and waits for a trigger. If a trigger is
generated again while the one-shot pulse is being output, it is ignored.
The output delay period and active level width of the one-shot pulse can be calculated as follows.
Output delay period = (Set value of TAAnCCR1 register) × Count clock cycle
Active level width = (Set value of TAAnCCR0 register − Set value of TAAnCCR1 register + 1) × Count clock cycle
The compare match interrupt request signal INTTAAnCC0 is generated when the 16-bit counter counts after its count
value matches the value of the CCR0 buffer register. The compare match interrupt request signal INTTAAnCC1 is
generated when the count value of the 16-bit counter matches the value of the CCR1 buffer register.
The valid edge of an external trigger input or setting the software trigger (TAAnCTL1.TAAnEST bit) to 1 is used as the
trigger.
Remark n = 0 to 2
Figure 6-27. Register Setting for Operation in One-Shot Pulse Output Mode (1/2)
0, 1, 1:
One-shot pulse output mode
Note Clear this bit to 0 when the TOAAn0 pin is not used in the one-shot pulse output mode.
Figure 6-27. Register Setting for Operation in One-Shot Pulse Output Mode (2/2)
Caution One-shot pulses are not output even in the one-shot pulse output mode, if the set
value of the TAAnCCR1 register is greater than the set value of the TAAnCCR0 register.
Remarks 1. TAAn I/O control register 1 (TAAnIOC1) and TAAn option register 0 (TAAnOPT0) are not
used in the one-shot pulse output mode.
2. n = 0 to 2
FFFFH
D00
D01
16-bit counter
D10 D11
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
<1> Count operation start flow <2> TAAnCCR0, TAAnCCR1 register setting change flow
As rewriting the
START TAAnCCRm register
immediately forwards
to the CCRm buffer
Setting of TAAnCCR0,
register, rewriting
TAAnCCR1 registers
immediately after
Register initial setting Initial setting of these the generation of the
TAAnCTL0 register registers is performed INTTAAnCCR0 signal
(TAAnCKS0 to TAAnCKS2 bits), before setting the is recommended.
TAAnCTL1 register, TAAnCE bit to 1.
TAAnIOC0 register,
TAAnIOC2 register,
TAAnCCR0 register, <3> Count operation stop flow
TAAnCCR1 register
Count operation is
The TAAnCKS0 to TAAnCE bit = 0
stopped
TAAnCKS2 bits can be
TAAnCE bit = 1 set at the same time
when counting has been
started (TAAnCE bit = 1).
Trigger wait status STOP
Remark n = 0 to 2
m = 0, 1
FFFFH
D00 D00 D00
TAAnCE bit
INTTAAnCC0 signal
TOAAn0 pin output
(only when software
trigger is used)
INTTAAnCC1 signal
When the TAAnCCR0 register is rewritten from D00 to D01 and the TAAnCCR1 register from D10 to D11 where
D00 > D01 and D10 > D11, if the TAAnCCR1 register is rewritten when the count value of the 16-bit counter is
greater than D11 and less than D10 and if the TAAnCCR0 register is rewritten when the count value is greater
than D01 and less than D00, each set value is reflected as soon as the register has been rewritten and
compared with the count value. The counter counts up to FFFFH and then counts up again from 0000H.
When the count value matches D11, the counter generates the INTTAAnCC1 signal and asserts the TOAAn1
pin. When the count value matches D01, the counter generates the INTTAAnCC0 signal, deasserts the
TOAAn1 pin, and stops counting.
Therefore, the counter may output a pulse with a delay period or active period different from that of the one-
shot pulse that is originally expected.
Remark n = 0 to 2
m = 0, 1
Count clock
16-bit counter D1 − 2 D1 − 1 D1 D1 + 1 D1 + 2
TAAnCCR1 register D1
INTTAAnCC1 signal
Remark n = 0 to 2
Usually, the INTTAAnCC1 signal is generated the next time the 16-bit counter counts after its count value
matches the value of the TAAnCCR1 register.
In the one-shot pulse output mode, however, it is generated one clock earlier. This is because the timing is
changed to match the change timing of the TOAAn1 pin.
TAAnCCR1 register
Transfer
Output
S
CCR1 buffer register controller TOAAn1 pin
R (RS-FF)
Match signal
INTTAAnCC1 signal
Clear
Count
Output
clock 16-bit counter TOAAn0 pin
controller
selection
Match signal
INTTAAnCC0 signal
Transfer
TAAnCCR0 register
Remark n = 0 to 2
FFFFH
D01 D01
16-bit counter D00 D00 D00 D11 D11
D10 D10 D10
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
When the TAAnCE bit is set to 1, the 16-bit counter is cleared from FFFFH to 0000H, starts counting, and outputs a
PWM waveform from the TOAAn1 pin.
The active level width, cycle, and duty factor of the PWM waveform can be calculated as follows.
Active level width = (Set value of TAAnCCR1 register) × Count clock cycle
Cycle = (Set value of TAAnCCR0 register + 1) × Count clock cycle
Duty factor = (Set value of TAAnCCR1 register)/(Set value of TAAnCCR0 register + 1)
The PWM waveform can be changed by rewriting the TAAnCCRm register while the counter is operating. The newly
written value is reflected when the count value of the 16-bit counter matches the value of the CCR0 buffer register and the
16-bit counter is cleared to 0000H.
The compare match interrupt request signal INTTAAnCC0 is generated the next time the 16-bit counter counts after its
count value matches the value of the CCR0 buffer register, and the 16-bit counter is cleared to 0000H. The compare
match interrupt request signal INTTAAnCC1 is generated when the count value of the 16-bit counter matches the value of
the CCR1 buffer register.
The value set to the TAAnCCRm register is transferred to the CCRm buffer register when the count value of the 16-bit
counter matches the value of the CCRm buffer register and the 16-bit counter is cleared to 0000H.
Remark n = 0 to 2
m = 0, 1
1, 0, 0:
PWM output mode
Remarks 1. TAAn I/O control register 1 (TAAnIOC1) and TAAn option register 0 (TAAnOPT0) are not
used in the PWM output mode.
2. n = 0 to 2
FFFFH
D01 D01 D01
16-bit counter D00 D00 D11 D11 D00
D10 D10 D10 D10
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
Remark n = 0 to 2
m = 0, 1
TAAnCCR1 write
processing is necessary TAAnCE bit = 0 Counting is stopped.
Setting of TAAnCCR0 register
even if only the set cycle
is changed.
Remark n = 0 to 2
m = 0, 1
FFFFH
D01 D01
16-bit counter D00 D00 D00 D11 D11
D10 D10 D10
0000H
TAAnCE bit
INTTAAnCC0 signal
To transfer data from the TAAnCCRm register to the CCRm buffer register, the TAAnCCR1 register must be
written.
To change both the cycle and active level of the PWM waveform at this time, first set the cycle to the
TAAnCCR0 register and then set the active level to the TAAnCCR1 register.
To change only the cycle of the PWM waveform, first set the cycle to the TAAnCCR0 register, and then write
the same value to the TAAnCCR1 register.
To change only the active level width (duty factor) of the PWM waveform, only the TAAnCCR1 register has to
be set.
After data is written to the TAAnCCR1 register, the value written to the TAAnCCRm register is transferred to the
CCRm buffer register in synchronization with clearing of the 16-bit counter, and is used as the value compared
with the 16-bit counter.
To write the TAAnCCR0 or TAAnCCR1 register again after writing the TAAnCCR1 register once, do so after the
INTTAAnCC0 signal is generated. Otherwise, the value of the CCRm buffer register may become undefined
because the timing of transferring data from the TAAnCCRm register to the CCRm buffer register conflicts with
writing the TAAnCCRm register.
Remark n = 0 to 2
m = 0, 1
Count clock
16-bit counter FFFF 0000 D00 − 1 D00 0000 0001 D00 − 1 D00 0000
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
Remark n = 0 to 2
To output a 100% waveform, set a value of (set value of TAAnCCR0 register + 1) to the TAAnCCR1 register. If
the set value of the TAAnCCR0 register is FFFFH, 100% output cannot be produced.
Count clock
16-bit counter FFFF 0000 D00 − 1 D00 0000 0001 D00 − 1 D00 0000
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
Remark n = 0 to 2
Count clock
16-bit counter D1 − 2 D1 − 1 D1 D1 + 1 D1 + 2
TAAnCCR1 register D1
INTTAAnCC1 signal
Remark n = 0 to 2
Usually, the INTTAAnCC1 signal is generated in synchronization with the next count-up after the count value of
the 16-bit counter matches the value of the TAAnCCR1 register.
In the PWM output mode, however, it is generated one clock earlier. This is because the timing is changed to
match the change timing of the output signal of the TOAAn1 pin.
Output
TAAnCCR1 register TOAAn1 pin output
controller
(compare)
Output
TOAAn0 pin output
controller
TAAnCCR0 register
(compare)
TAAnCCS0, TAAnCCS1 bits
(capture/compare selection)
Remark n = 0 to 2
m = 2 (V850ES/JC3-H)
m = 0 to 2 (V850ES/JE3-H)
When the TAAnCE bit is set to 1, 16-bit timer/event counter AA starts counting, and the output signals of the TOAAn0
and TOAAn1 pins are inverted. When the count value of the 16-bit counter later matches the set value of the TAAnCCRm
register, a compare match interrupt request signal (INTTAAnCCm) is generated, and the output signal of the TOAAnm pin
is inverted.
The 16-bit counter continues counting in synchronization with the count clock. When it counts up to FFFFH, it
generates an overflow interrupt request signal (INTTAAnOV) at the next clock, is cleared to 0000H, and continues counting.
At this time, the overflow flag (TAAnOPT0.TAAnOVF bit) is also set to 1. Clear the overflow flag to 0 by executing the CLR
instruction by software.
The TAAnCCRm register can be rewritten while the counter is operating. If it is rewritten, the new value is reflected at
that time, and compared with the count value.
FFFFH
D00 D00
D01 D01
16-bit counter
D10 D10
D11 D11 D11
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
INTTAAnOV signal
TAAnOVF bit
Remark n = 0 to 2
m = 0, 1
When the TAAnCE bit is set to 1, the 16-bit counter starts counting. When the valid edge input to the TIAAnm pin is
detected, the count value of the 16-bit counter is stored in the TAAnCCRm register, and a capture interrupt request signal
(INTTAAnCCm) is generated.
The 16-bit counter continues counting in synchronization with the count clock. When it counts up to FFFFH, it
generates an overflow interrupt request signal (INTTAAnOV) at the next clock, is cleared to 0000H, and continues counting.
At this time, the overflow flag (TAAnOPT0.TAAnOVF bit) is also set to 1. Clear the overflow flag to 0 by executing the CLR
instruction by software.
FFFFH
D10 D11
D00 D12 D13
16-bit counter D01
D02
D03
0000H
TAAnCE bit
INTTAAnCC0 signal
INTTAAnCC1 signal
INTTAAnOV signal
TAAnOVF bit
Remark n = 0 to 2
m = 2 (V850ES/JC3-H)
m = 0 to 2 (V850ES/JE3-H)
1, 0, 1:
Free-running mode
Overflow flag
Specifies if TAAnCCR0
register functions as
capture or compare register
Specifies if TAAnCCR1
register functions as
capture or compare register
Remark n = 0 to 2
m = 0, 1
Figure 6-37. Software Processing Flow in Free-Running Timer Mode (Compare Function) (1/2)
FFFFH
D00 D00
D01 D01
16-bit counter
D10 D10
D11 D11 D11
0000H
TAAnCE bit
INTTAAnCC0 signal
D10 D11
TAAnCCR1 register
Set value changed
INTTAAnCC1 signal
INTTAAnOV signal
TAAnOVF bit
Remark n = 0 to 2
Figure 6-37. Software Processing Flow in Free-Running Timer Mode (Compare Function) (2/2)
START
NO
TAAnOVF bit = 1
YES
STOP
Remark n = 0 to 2
Figure 6-38. Software Processing Flow in Free-Running Timer Mode (Capture Function) (1/2)
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TAAnCE bit
INTTAAnOV signal
TAAnOVF bit
TAAnOVF0 flagNote
TAAnOVF1 flagNote
Remark n = 0 to 2
m = 2 (V850ES/JC3-H)
m = 0 to 2 (V850ES/JE3-H)
Figure 6-38. Software Processing Flow in Free-Running Timer Mode (Capture Function) (2/2)
START
NO
TAAnOVF bit = 1
YES
STOP
Remark n = 0 to 2
FFFFH
D02
D10
D00
16-bit counter D11 D03
D01 D12
D04
D13
0000H
TAAnCE bit
INTTAAnCC0 signal
Interval period Interval period Interval period Interval period Interval period
(D00 + 1) (10000H + (D02 − D01) (10000H + (10000H +
D01 − D00) D03 − D02) D04 − D03)
INTTAAnCC1 signal
When performing an interval operation in the free-running timer mode, two intervals can be set with one
channel.
To perform the interval operation, the value of the corresponding TAAnCCRm register must be re-set in the
interrupt servicing that is executed when the INTTAAnCCm signal is detected.
The set value for re-setting the TAAnCCRm register can be calculated by the following expression, where “Dm”
is the interval period.
Remark m = 0, 1
n = 0 to 2
FFFFH
D02
D10
D00
16-bit counter D11 D03
D01 D12
D04
D13
0000H
TAAnCE bit
INTTAAnCC0 signal
Pulse interval Pulse interval Pulse interval Pulse interval Pulse interval
(D00) (10000H + (D02 − D01) (10000H + (10000H +
D01 − D00) D03 − D02) D04 − D03)
INTTAAnCC1 signal
INTTAAnOV signal
TAAnOVF bit
When executing pulse width measurement in the free-running timer mode, two pulse widths can be measured
with one channel.
To measure a pulse width, the pulse width can be calculated by reading the value of the TAAnCCRm register in
synchronization with the INTTAAnCCm signal, and calculating the difference between the read value and the
previously read value.
Remark m = 0, 1
n = 0 to 2
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TAAnCE bit
INTTAAnOV signal
TAAnOVF bit
The following problem may occur when two pulse widths are measured in the free-running timer mode.
<1> Read the TAAnCCR0 register (setting of the default value of the TIAAn0 pin input).
<2> Read the TAAnCCR1 register (setting of the default value of the TIAAn1 pin input).
<3> Read the TAAnCCR0 register.
Read the overflow flag. If the overflow flag is 1, clear it to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<4> Read the TAAnCCR1 register.
Read the overflow flag. Because the flag is cleared in <3>, 0 is read.
Because the overflow flag is 0, the pulse width can be calculated by (D11 − D10) (incorrect).
When two capture registers are used, and if the overflow flag is cleared to 0 by one capture register, the other
capture register may not obtain the correct pulse width.
Use software when using two capture registers. An example of how to use software is shown below.
(1/2)
Example when two capture registers are used (using overflow interrupt)
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TAAnCE bit
INTTAAnOV signal
TAAnOVF bit
TAAnOVF0 flagNote
TAAnOVF1 flagNote
Note The TAAnOVF0 and TAAnOVF1 flags are set on the internal RAM by software.
<1> Read the TAAnCCR0 register (setting of the default value of the TIAAn0 pin input).
<2> Read the TAAnCCR1 register (setting of the default value of the TIAAm1 pin input).
<3> An overflow occurs. Set the TAAnOVF0 and TAAnOVF1 flags to 1 in the overflow interrupt servicing,
and clear the overflow flag to 0.
<4> Read the TAAnCCR0 register.
Read the TAAnOVF0 flag. If the TAAnOVF0 flag is 1, clear it to 0.
Because the TAAnOVF0 flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<5> Read the TAAnCCR1 register.
Read the TAAnOVF1 flag. If the TAAnOVF1 flag is 1, clear it to 0 (the TAAnOVF0 flag is cleared in
<4>, and the TAAnOVF1 flag remains 1).
Because the TAAnOVF1 flag is 1, the pulse width can be calculated by (10000H + D11 − D10)
(correct).
<6> Same as <3>
(2/2)
Example when two capture registers are used (without using overflow interrupt)
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TAAnCE bit
INTTAAnOV signal
TAAnOVF bit
TAAnOVF0 flagNote
TAAnOVF1 flagNote
Note The TAAnOVF0 and TAAnOVF1 flags are set on the internal RAM by software.
<1> Read the TAAnCCR0 register (setting of the default value of the TIAAn0 pin input).
<2> Read the TAAnCCR1 register (setting of the default value of the TIAAm1 pin input).
<3> An overflow occurs. Nothing is done by software.
<4> Read the TAAnCCR0 register.
Read the overflow flag. If the overflow flag is 1, set only the TAAnOVF1 flag to 1, and clear the
overflow flag to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<5> Read the TAAnCCR1 register.
Read the overflow flag. Because the overflow flag is cleared in <4>, 0 is read.
Read the TAAnOVF1 flag. If the TAAnOVF1 flag is 1, clear it to 0.
Because the TAAnOVF1 flag is 1, the pulse width can be calculated by (10000H + D11 − D10)
(correct).
<6> Same as <3>
Remark n = 0 to 2
FFFFH
Dm0
16-bit counter
Dm1
0000H
TAAnCE bit
INTTAAnOV signal
TAAnOVF bit
Pulse width
The following problem may occur when a long pulse width is measured in the free-running timer mode.
<1> Read the TAAnCCRm register (setting of the default value of the TIAAnm pin input).
<2> An overflow occurs. Nothing is done by software.
<3> An overflow occurs a second time. Nothing is done by software.
<4> Read the TAAnCCRm register.
Read the overflow flag. If the overflow flag is 1, clear it to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + Dm1 − Dm0)
(incorrect).
Actually, the pulse width must be (20000H + Dm1 − Dm0) because an overflow occurs twice.
If an overflow occurs twice or more when the capture trigger interval is long, the correct pulse width may not be
obtained.
If the capture trigger interval is long, slow the count clock to lengthen one cycle of the 16-bit counter, or use
software. An example of how to use software is shown next.
Remark m = 0, 1
n = 0 to 2
FFFFH
Dm0
16-bit counter
Dm1
0000H
TAAnCE bit
INTTAAnOV signal
TAAnOVF bit
Overflow 0H 1H 2H 0H
counterNote
Pulse width
Note The overflow counter is set arbitrarily by software on the internal RAM.
<1> Read the TAAnCCRm register (setting of the default value of the TIAAnm pin input).
<2> An overflow occurs. Increment the overflow counter and clear the overflow flag to 0 in the overflow
interrupt servicing.
<3> An overflow occurs a second time. Increment (+1) the overflow counter and clear the overflow flag to
0 in the overflow interrupt servicing.
<4> Read the TAAnCCRm register.
Read the overflow counter.
→ When the overflow counter is “N”, the pulse width can be calculated by (N × 10000H + Dm1 –
Dm0).
In this example, the pulse width is (20000H + Dm1 – Dm0) because an overflow occurs twice.
Clear the overflow counter (0H).
Remark m = 0, 1
n = 0 to 2
(i) Operation to write 0 (without conflict with setting) (iii) Operation to clear to 0 (without conflict with setting)
Overflow Overflow
set signal L set signal L
Overflow flag
(TAAnOVF bit)
(ii) Operation to write 0 (conflict with setting) (iv) Operation to clear to 0 (conflict with setting)
Overflow Overflow
set signal set signal
Overflow flag H
(TAAnOVF bit)
Remark n = 0 to 2
To clear the overflow flag to 0, read the overflow flag to check if it is set to 1, and clear it with the CLR
instruction. If 0 is written to the overflow flag without checking if the flag is 1, the set information of the overflow
may be erased by writing 0 ((ii) in the above chart). Therefore, software may judge that no overflow has
occurred even when an overflow has actually occurred.
If execution of the CLR instruction conflicts with occurrence of an overflow when the overflow flag is cleared to
0 with the CLR instruction, the overflow flag remains set (1) even after execution of the clear instruction.
Clear
Count
clock
16-bit counter INTTAAnOV signal
selection
INTTAAnCC0 signal
TAAnCE bit
Remark n = 0 to 2
m = 0, 1
k = 2 (V850ES/JC3-H)
k = 0 to 2 (V850ES/JE3-H)
FFFFH
16-bit counter
0000H
TAAnCE bit
INTTAAnCCm signal
INTTAAnOV signal
Cleared to 0 by
TAAnOVF bit CLR instruction
Remark n = 0 to 2
m = 0, 1
When the TAAnCE bit is set to 1, the 16-bit counter starts counting. When the valid edge input to the TIAAnm pin is
later detected, the count value of the 16-bit counter is stored in the TAAnCCRm register, the 16-bit counter is cleared to
0000H, and a capture interrupt request signal (INTTAAnCCm) is generated.
The pulse width is calculated as follows.
If the valid edge is not input to the TIAAnm pin even when the 16-bit counter counted up to FFFFH, an overflow interrupt
request signal (INTTAAnOV) is generated at the next count clock, and the counter is cleared to 0000H and continues
counting. At this time, the overflow flag (TAAnOPT0.TAAnOVF bit) is also set to 1. Clear the overflow flag to 0 by
executing the CLR instruction via software.
If the overflow flag is set to 1, the pulse width can be calculated as follows.
Pulse width = (10000H × TAAnOVF bit set (1) count + Captured value) × Count clock cycle
Remark n = 0 to 2
m = 0, 1
1, 1, 0:
Pulse width measurement
mode
Overflow flag
Remarks 1. TAAn I/O control register 0 (TAAnIOC0), and TAAn I/O control register 2 (TAAnIOC2) are not
used in the pulse width measurement mode.
2. m = 0, 1
n = 0 to 2
FFFFH
16-bit counter
0000H
TAAnCE bit
INTTAAnCC0 signal
<1> <2>
START
STOP
Remark n = 0 to 2
(i) Operation to write 0 (without conflict with setting) (iii) Operation to clear to 0 (without conflict with setting)
Overflow Overflow
set signal L set signal L
Overflow flag
(TAAnOVF bit)
(ii) Operation to write 0 (conflict with setting) (iv) Operation to clear to 0 (conflict with setting)
Overflow Overflow
set signal set signal
Overflow flag H
(TAAnOVF bit)
Remark n = 0 to 2
To clear the overflow flag to 0, read the overflow flag to check if it is set to 1, and clear it with the CLR
instruction. If 0 is written to the overflow flag without checking if the flag is 1, the set information of the overflow
may be erased by writing 0 ((ii) in the above chart). Therefore, software may judge that no overflow has
occurred even when an overflow has actually occurred.
If execution of the CLR instruction conflicts with occurrence of an overflow when the overflow flag is cleared to
0 with the CLR instruction, the overflow flag remains set (1) even after execution of the clear instruction.
Remark n = 0 to 2
Table 6-6. Truth Table of TOAAn0 and TOAAn1 Pins Under Control of Timer Output Control Bits
0 0 × Low-level output
1 0 Low-level output
1 Low level immediately before counting, high
level after counting is started
1 0 × High-level output
1 0 High-level output
1 High level immediately before counting, low level
after counting is started
Remark n = 0 to 2
m = 0, 1
TAA1 TAA0
TAB1 TAA4
Figure 6-43 shows an example where individual operation and tuned operation of TAA0 (as the master timer) and TAA1
(as the slave timer) are performed in PWM output mode.
Figure 6-43. Differences Between Individual Operation and Tuned Operation Using TAA0 and TAA1
Two PWM outputs are available when PWM Three PWM outputs are available when
is operated separately with each timer. PWM is operated in tuned-operation mode.
Table 6-8 show the timer modes that can be used in the tuned-operation mode and Table 6-9 shows the differences of
the timer output functions between individual operation and tuned operation (√: Settable, ×: Not settable).
Remark The timing of transmitting data from the compare register of the buffer register is as follows.
• PPG: CPU write timing
• Toggle, PWM, triangular wave PWM: Timing at which timer counter and compare register match TOAAn0
and TOABm0
(ii) Overflow
If the counter overflows, an overflow interrupt (INTTAA1OV) of the master timer is generated and the overflow
flag (TAA1OVF) is set to “1”.
The overflow interrupt (INTTAA0OV) and overflow flag (TAA0OVF) of the slave timer do not operate and are
always at the low level.
[Initial settings]
Master timer: TAA1CTL0.TAA1CE = 0 (operation disabled)
Slave timer: TAA0CTL0.TAA0CE = 0 (operation disabled)
Remark The initial settings of the master timer and slave timer may be performed in any order.
[Starting counting]
<1> Set TAA1CTL0.TAA1CE of the master timer to 1.
<2> Start counting.
<3> Changing the setting of the register during operation
• The compare register can be rewritten (anytime write).
[End condition]
• Set TAA1CTL0.TAA1CE of the master timer to 0.
FFFFH
D01 D01
D00 D00
TAA1 D11 D11
16-bit counter
D10 D10
0000H
TAA1CE
TAA1CCR0 D10
TAA1CCR1 D11
TAA0CCR0 D00
TAA0CCR1 D01
INTTAA1CC0
INTTAA1CC1
INTTAA0CC0
INTTAA0CC1
INTTAA1OV
TAA1OVF
TOAA11
TOAA00
TOAA01
INTTAA0OV L
TAA0OVF L
[Initial settings]
Master timer: TAA1CTL0.TAA1CE = 0 (operation disabled)
Slave timer: TAA0CTL0.TAA0CE = 0 (operation disabled)
Remark The initial settings of the master timer and slave timer may be performed in any order.
[Starting counting]
<1> Set TAA1CTL0.TAA1CE of the master timer to 1.
<2> Start counting.
[End condition]
• Set TAA1CTL0.TAA1CE of the master timer to 0.
FFFFH
D110 D011
D000 D001
TAA1 D110 D111
16-bit counter
D100 D101
0000H
TAA1CE
TIAA10
TIAA11
TIAA00
TIAA01
INTTAA1CC0
INTTAA1CC1
INTTAA0CC0
INTTAA0CC1
INTTAA1OV
TAA1OVF
TAA0OVF L
[Initial settings]
Master timer: TAA1CTL0.TAA1CE = 0 (operation disabled)
Slave timer: TAA0CTL0.TAA0CE = 0 (operation disabled)
Remark The initial settings of the master timer and slave timer may be performed in any order.
[Starting counting]
<1> Set TAA1CTL0.TAA1CE of the master timer to 1.
<2> Start counting.
[End condition]
• Set TAA1CTL0.TAA1CE of the master timer to 0.
FFFFH
D100
D010 D010
TAA1 D000 D000
16-bit counter
D110 D111
0000H
TAA1CE
TIAA10
TIAA11
INTTAA1CC0
INTTAA1CC1
INTTAA0CC0
INTTAA0CC1
INTTAA1OV
TAA1OVF
TOAA01
INTTAA0OV L
TAA0OVF L
TAA1 TAA0
TAB1 TAA4
Figure 6-48 shows an example where individual operation and simultaneous-start operation of TAA0 (as the master
timer) and TAA1 (as the slave timer) are performed in PWM output mode.
Figure 6-48. Differences Between Individual Operation and Simultaneous-Start Operation Using TAA1 and TAA0
Simultaneous-start signal
TAA0 TAA0 (slave)
If PWM operates separately with each timer, With the simultaneous-start function, PWM
the 16-bit counter starts and the PWM output output operates with the count start timing and
starts at a different timing for each timer. the count clock of both timers being synchronized.
[Initial settings]
Master timer: TAA1CTL0.TAA1CE = 0 (operation disabled)
Slave timer: TAA0CTL0.TAA0CE = 0 (operation disabled)
Remark The initial settings of the master timer and slave timer may be performed in any order.
[Starting counting]
<1> Set TAA1CTL0.TAA1CE of the master timer to 1.
<2> Start counting.
<3> Changing the setting of the register during operation
• The compare register can be rewritten (anytime write).
[End condition]
• Set TAA1CTL0.TAA0CE of the master timer to 0.
Figure 6-49. Timing Example of Simultaneous-Start Function (TAA1: Master, TAA0: Slave)
FFFFH
D11 D11
TAA1
16-bit counter D10 D10
0000H
FFFFH
0000H
TAA1CE bit
INTTAA1CC0 interrupt
INTTAA1CC1 interrupt
INTTAA0CC0 interrupt
INTTAA0CC1 interrupt
This section explains an operation of connecting two channels of TAA in cascade to form a 32-bit capture timer.
For cascade connection, the free-running timer mode must be set and all the capture/compare registers must be set as
capture registers (TAA0CCSn = 1).
Combinations of TAA channels that can be connected in cascade are shown in the following table.
TAA1 TAA0
In the following example, TAA1 is used as the lower timer (master timer) and TAA0 is used as the higher timer (slave
timer) to use them as a 32-bit capture timer by cascade connection.
The operation of each pin and signal when TAA1 and TAA0 are connected in cascade is shown below.
TIAA10 pin input Lower Capture input 0 The value of the lower timer counter is stored in the
TAA1CCR0 register and the value of the higher timer
counter is stored in the TAA0CCR0 register when the
valid edge of this input is detected.
Note
TIAA11 pin input Lower Capture input 1 The value of the lower timer counter is stored in the
TAA1CCR1 register and the value of the higher timer
counter is stored in the TAA0CCR1 register when the
valid edge of this input is detected.
INTTAA1CCR0 interrupt signal Lower Capture interrupt 0 This interrupt is generated when the valid edge of the
TIAA10 pin is detected.
INTTAA1CCR1 interrupt signal Lower Capture interrupt 1 This interrupt is generated when the valid edge of the
TIAA11 pin is detected.
INTTAA1OV interrupt signal Lower Overflow interrupt This interrupt is generated when an overflow of the
lower timer counter is detected.
TIAA00 pin input Higher Capture input 0 Does not operate.
Note
TIAA01 pin input Higher Capture input 1 Does not operate.
INTTAA0CCR0 interrupt signal Higher Capture interrupt 0 Does not operate.
INTTAA0CCR1 interrupt signal Higher Capture interrupt 1 Does not operate.
INTTAA0OV interrupt signal Higher Overflow interrupt This interrupt is generated when an overflow of the
higher timer counter is detected.
Figure 6-51. Operation Flow in Cascade Connection of TAA1 and TAA0 (1/2)
TIAA10 input
Overflow interrupt
(INTTAA0OV)
Overflow flag
(TAA0OVF)
Cleared to 0 by Cleared to 0 by
CLR instruction CLR instruction
<1> <2> <3> <4> <5>
Figure 6-51. Operation Flow in Cascade Connection of TAA1 and TAA0 (2/2)
START
NO
INTTAA0CCR1 generated?
YES
NO
Reading TAA1CCR0 and TAA0OVF bit = 1
TAA0CCR0 registers
(reading capture register 0)
YES
YES
Counter is initialized by
TAA1CE bit = 0 stopping counting operation
(TAA1CE bit = 0).
STOP
Figure 6-52. Example of Basic Timing When TAA1 and TAA0 Are Connected in Cascade
TIAA10 input
Capture interrupt 1
(INTTAA1CC1)
Overflow interrupt
(INTTAA0OV)
Overflow flag
(TAA0OVF)
The counting operation is started when the TAA1CTL.TAA1CE bit is set to 1 and the count clock is supplied.
When the valid edge input to the TIAA10 pin is detected, the count value is stored in the capture register 0
(TAA1CCR0 and TAA0CCR0), and capture interrupt 0 signal (INTTAA1CC0) is issued.
The timer counter continues the counting operation in synchronization with the count clock. When it counts
up to FFFFFFFFH, the overflow interrupt (INTTAA0OV) is generated at the next clock and the overflow flag
(TAA0OVF) is set to 1. The timer counter is cleared to 00000000H and continues counting up.
The overflow flag (TAA0OVF) is cleared by an instruction issued from the CPU that writes “0” to it.
Because the free-running timer mode is set, the timer counter cannot be cleared by detection of the valid
edge input to the TIAA10 pin.
Using TOAA10 output is prohibited because it alternately functions as the TIAA10 input.
Capture register 1 (TAA1CCR1 and TAA0CCR1) also operates in the same manner.
If the lower timer counter (TAA1) overflows, an overflow interrupt (TAA1OVF) is generated. However, it is
recommended to mask this interrupt because it cannot be used as an overflow interrupt of the 32-bit counter.
In the V850ES/JC3-H and V850ES/JE3-H, the alternate-function pins of ports or peripheral I/O (TAA1, TAB0, UARTC0,
or UARTC1) signals can be selected as the capture trigger input of TAA1 and TAB0.
If the signal input from the UARTCn pin is selected by the selector function when RXDCn is used, baud rate errors of
the LIN reception transfer rate of UARTCn can be calculated (n = 0, 1).
7 6 5 4 3 2 1 0
SELCNT0 0 0 0 0 ISEL3 0 0 ISEL0Note
Cautions 1. To set the ISEL4, ISEL3, and ISEL0 bits to 1, set the corresponding function pin to
the capture input mode.
2. Set the ISEL3, and ISEL0 bits when the operation of TAA1, UARTC0, and CAN0 are
stopped.
3. Be sure to set bits 7 to 5, 2, and 1 to “0”.
6.10 Cautions
FFFFH
16-bit counter
0000H
Count clock
TAAnCE bit
Capture Capture
trigger input trigger input
FFFFH
16-bit counter
0000H
Count clock
TAAnCE bit
Capture Capture
trigger input trigger input
7.1 Overview
7.2 Functions
• Interval timer
• External event counter
• External trigger pulse output
• One-shot pulse output
• PWM output
• Free-running timer
• Pulse width measurement
• Triangular wave PWM output
• Timer-tuned operation function
• Simultaneous-start function
7.3 Configuration
Item Configuration
Note When using the functions of the TIAB10 to TIAB13 and TOAB10 to TOAB13 pins, see Table 4-17 Using Port
Pin as Alternate-Function Pin.
Cautions1. When using the external trigger pulse output mode, one-shot pulse output mode, and pulse width
measurement mode, select the internal clock as the count clock (by clearing the
TAB1CTL1.TAB1EEE bit to 0).
2. To use the external event count mode, specify that the valid edge of the TIAA10 pin capture trigger
input is not detected (by setting the TAB1CTL1.TABEEE0 bits to 1).
Internal bus
fXX
fXX/2 TAB1CNT
fXX/4
Selector
fXX/8
fXX/16 INTTAB1OV
16-bit counter
fXX/32
Counter control
Clear
fXX/64
fXX/128 TOAB10
controller
TOAB11
Output
CCR0 TOAB12
detector
buffer
Edge
TRGAB TOAB13
EVTAB register
CCR1
buffer
register CCR2 INTTAB1CC0
buffer INTTAB1CC1
TIAB10 TAB1CCR0 INTTAB1CC2
register
Edge detector
CCR3
TIAB11 buffer INTTAB1CC3
TAB1CCR1 register
TIAB12 TAB1CCR2
TIAB13 TAB1CCR3
Internal bus
(8) Selector
This selector selects the count clock for the 16-bit counter. Eight types of internal clocks or an external event can
be selected as the count clock.
7.4 Registers
Remark When using the functions of the TIAB10 to TIAB13 and TOAB10 to TOAB13 pins, see Table 4-17 Using
Port Pin as Alternate-Function Pin.
7 6 5 4 3 2 1 0
TAB1CTL0 TAB1CE 0 0 0 0 TAB1CKS2 TAB1CKS1 TAB1CKS0
Note TAB1OPT0.TAB1OVF bit, 16-bit counter, timer output (TOAB10 to TOAB13 pins)
Cautions 1. Set the TAB1CKS2 to TAB1CKS0 bits when the TAB1CE bit = 0.
When the value of the TAB1CE bit is changed from 0 to 1, the
TAB1CKS2 to TAB1CKS0 bits can be set simultaneously.
2. Be sure to set bits 3 to 6 to “0”.
7 6 5 4 3 2 1 0
TAB1CTL1 0 TAB1EST TAB1EEE 0 0 TAB1MD2 TAB1MD1 TAB1MD0
The TAB1EEE bit selects whether counting is performed with the internal count
clock or the valid edge of the external event count input.
Cautions 1. The TAB1EST bit is valid only in the external trigger pulse output mode or
one-shot pulse output mode. In any other mode, writing 1 to this bit is
ignored.
2. Be sure to set bits 3, 4, and 7 to “0”.
3. External event count input is selected in the external event count mode
regardless of the value of the TAB1EEE bit.
4. Set the TAB1EEE and TAB1MD2 to TAB1MD0 bits when the
TAB1CTL0.TAB1CE bit = 0. (The same value can be written when the
TAB1CE bit = 1.) The operation is not guaranteed when rewriting is
performed with the TAB1CE bit = 1. If rewriting was mistakenly
performed, clear the TAB1CE bit to 0 and then set the bits again.
7 6 5 4 3 2 1 0
TAB1IOC0 TAB1OL3 TAB1OE3 TAB1OL2 TAB1OE2 TAB1OL1 TAB1OE1 TAB1OL0 TAB1OE0
Note The output level of the timer output pin (TOAB1m) specified by the
TAB1OLm bit is shown below.
Remark m = 0 to 3
7 6 5 4 3 2 1 0
TAB1IOC1 TAB1IS7 TAB1IS6 TAB1IS5 TAB1IS4 TAB1IS3 TAB1IS2 TAB1IS1 TAB1IS0
TAB1IS7 TAB1IS6 Capture trigger input signal (TIAB13 pin) valid edge setting
0 0 No edge detection (capture operation invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
TAB1IS5 TAB1IS4 Capture trigger input signal (TIAB12 pin) valid edge detection
0 0 No edge detection (capture operation invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
TAB1IS3 TAB1IS2 Capture trigger input signal (TIAB11 pin) valid edge setting
0 0 No edge detection (capture operation invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
TAB1IS1 TAB1IS0 Capture trigger input signal (TIAB10 pin) valid edge setting
0 0 No edge detection (capture operation invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
7 6 5 4 3 2 1 0
TAB1IOC2 0 0 0 0 TAB1EES1 TAB1EES0 TAB1ETS1 TAB1ETS0
TAB1EES1 TAB1EES0 External event count input signal (EVTAB1 pin) valid edge setting
0 0 No edge detection (external event count invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
TAB1ETS1 TAB1ETS0 External trigger input signal (TRGAB1 pin) valid edge setting
0 0 No edge detection (external trigger invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
Cautions 1. Accessing the TAB1IOC4 register is prohibited in the following statuses. For details, see 3.4.9
(2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates on the subclock and the main clock oscillation is stopped
• When the CPU operates on the internal oscillation clock
2. The TAB1IOC4 register can be set only in the interval timer mode and free-running timer mode.
Be sure to set the TAB1IOC4 register to 00H in all other modes (for details of the mode setting,
see 7.4 (2) TAB1 control register 1 (TAB1CTL1)). Even in free-running timer mode, if the
TAB1CCR0 to TAB1CCR3 registers are set to the capture function, the setting of the TAB1IOC4
register becomes invalid.
7 6 5 4 3 2 1 0
TAB1IOC4 TAB1OS3 TAB1OR3 TAB1OS2 TAB1OR2 TAB1OS1 TAB1OR1 TAB1OS0 TAB1OR0
7 6 5 4 3 2 1 0
Note
TAB1OPT0 TAB1CCS3 TAB1CCS2 TAB1CCS1 TAB1CCS0 0 TAB1CMS TAB1CUF TAB1OVF
Note The TAB1CMS bit is used for the motor control function. For details,
see CHAPTER 10 MOTOR CONTROL FUNCTION.
Remark m = 0 to 3
Caution Accessing the TAB1CCR0 register is prohibited in the following statuses. For details, see 3.4.9
(2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates on the subclock and the main clock oscillation is stopped
• When the CPU operates on the internal oscillation clock
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TAB1CCR0
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 7-2. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Caution Accessing the TAB1CCR1 register is prohibited in the following statuses. For details, see 3.4.9
(2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates on the subclock and the main clock oscillation is stopped
• When the CPU operates on the internal oscillation clock
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TAB1CCR1
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 7-3. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Caution Accessing the TAB1CCR2 register is prohibited in the following statuses. For details, see 3.4.9
(2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TAB1CCR2
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 7-4. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Caution Accessing the TAB1CCR3 register is prohibited in the following statuses. For details, see 3.4.9
(2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TAB1CCR3
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 7-5. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Caution Accessing the TAB1CNT register is prohibited in the following statuses. For details, see 3.4.9 (2)
Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TAB1CNT
7.5 Operation
Notes 1. To use the external event count mode, specify that the valid edge of the TIAB10 pin capture trigger input is
not detected (by clearing the TAB1IOC1.TAB1IS1 and TAB1IOC1.TAB1IS0 bits to “00”).
2. When using the external trigger pulse output mode, one-shot pulse output mode, and pulse width
measurement mode, select the internal clock as the count clock (by clearing the TAB1CTL1.TAB1EEE bit to
0).
Clear
Match signal
INTTAB1CC0 signal
TAB1CCR0 register
FFFFH
D0 D0 D0 D0
16-bit counter
0000H
TAB1CE bit
TAB1CCR0 register D0
INTTAB1CC0 signal
When the TAB1CE bit is set to 1, the value of the 16-bit counter is cleared from FFFFH to 0000H in synchronization
with the count clock, and the counter starts counting. At this time, the output of the TOAB10 pin is inverted. Additionally,
the set value of the TAB1CCR0 register is transferred to the CCR0 buffer register.
When the count value of the 16-bit counter matches the value of the CCR0 buffer register, the 16-bit counter is cleared
to 0000H, the output of the TOAB10 pin is inverted, and a compare match interrupt request signal (INTTAB1CC0) is
generated.
The interval can be calculated by the following expression.
Figure 7-4. Register Setting for Interval Timer Mode Operation (1/2)
0, 0, 0:
Interval timer mode
0: Operate on count
clock selected by bits
TAB1CKS0 to TAB1CKS2
1: Count with external
event count input signal
Note This bit can be set to 1 only when the interrupt request signals (INTTAB1CC0 and INTTAB1CCk) are
masked by the interrupt mask flags (TAB1CCMK0 to TAB1CCMKk) and the timer output (TOAB1k) is
performed at the same time. However, the TAB1CCR0 and TAB1CCRk registers must be set to the same
value (see 7.5.1 (2) (d) Operation of TAB1CCR1 to TAB1CCR3 registers) (k = 1 to 3).
Figure 7-4. Register Setting for Interval Timer Mode Operation (2/2)
Remark TAB1 I/O control register 1 (TAB1IOC1), TAB1 I/O control register 2 (TAB1IOC2), and TAB1
option register 0 (TAB1OPT0) are not used in the interval timer mode.
FFFFH
D0 D0 D0
16-bit counter
0000H
TAB1CE bit
TAB1CCR0 register D0
INTTAB1CC0 signal
<1> <2>
START
STOP
Count clock
TAB1CE bit
INTTAB1CC0 signal
FFFFH
16-bit counter
0000H
TAB1CE bit
INTTAB1CC0 signal
FFFFH
16-bit counter
0000H
TAB1CE bit
INTTAB1CC0 signal
If the value of the TAB1CCR0 register is changed from D1 to D2 while the count value is greater than D2 but
less than D1, the count value is transferred to the CCR0 buffer register as soon as the TAB1CCR0 register has
been rewritten. Consequently, the value of the 16-bit counter that is compared is D2.
Because the count value has already exceeded D2, however, the 16-bit counter counts up to FFFFH, overflows,
and then counts up again from 0000H. When the count value matches D2, the INTTAB1CC0 signal is
generated and the output of the TOAB10 pin is inverted.
Therefore, the INTTAB1CC0 signal may not be generated at the interval time “(D1 + 1) × Count clock cycle” or
“(D2 + 1) × Count clock cycle” originally expected, but may be generated at an interval of “(10000H + D2 + 1) ×
Count clock period”.
TAB1CCR1
register
Match signal
INTTAB1CC1 signal
TAB1CCR2
register
Match signal
INTTAB1CC2 signal
TAB1CCR3
register
Match signal
INTTAB1CC3 signal
Clear
Count
clock Output
16-bit counter TOAB10 pin
selection controller
Match signal
INTTAB1CC0 signal
TAB1CCR0 register
If the set value of the TAB1CCRk register is less than the set value of the TAB1CCR0 register, the
INTTAB1CCk signal is generated once per cycle. At the same time, the output of the TOAB1k pin is inverted.
The TOAB1k pin outputs a square wave with the same cycle as that output by the TOAB10 pin.
Remark k = 1 to 3,
FFFFH
D01 D01 D01 D01
D31 D31 D31 D31
16-bit counter D11 D11 D11 D11
D21 D21 D21 D21
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
If the set value of the TAB1CCRk register is greater than the set value of the TAB1CCR0 register, the count
value of the 16-bit counter does not match the value of the TAB1CCRk register. Consequently, the
INTTAB1CCk signal is not generated, nor is the output of the TOAB1k pin changed.
Remark k = 1 to 3,
FFFFH
D01 D01 D01 D01
16-bit counter
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal L
INTTAB1CC2 signal L
INTTAB1CC3 signal L
Clear
TAB1CCR0 register
FFFFH
D0 D0 D0
16-bit counter
External event
TAB1CE bit count input
(EVTAB1 pin input)
Remark This figure shows the basic timing when the rising edge is specified as the valid edge of the external
event count input.
When the TAB1CE bit is set to 1, the value of the 16-bit counter is cleared from FFFFH to 0000H. The counter counts
each time the valid edge of the external event count input is detected. Additionally, the set value of the TAB1CCR0 register
is transferred to the CCR0 buffer register.
When the count value of the 16-bit counter matches the value of the CCR0 buffer register, the 16-bit counter is cleared
to 0000H, and a compare match interrupt request signal (INTTAB1CC0) is generated.
The INTTAB1CC0 signal is generated each time the valid edge of the external event count input has been detected (set
value of TAB1CCR0 register + 1) times.
Figure 7-11. Register Setting for Operation in External Event Count Mode (1/2)
0: Stop counting
1: Enable counting
0, 0, 1:
External event count mode
Figure 7-11. Register Setting for Operation in External Event Count Mode (2/2)
Remark TAB1 I/O control register 1 (TAB1IOC1) and TAB1 option register 0 (TAB1OPT0) are not used
in the external event count mode.
FFFFH
D0 D0 D0
16-bit counter
0000H
TAB1CE bit
TAB1CCR0 register D0
INTTAB1CC0 signal
<1> <2>
START
STOP
Cautions 1. In the external event count mode, do not set the TAB1CCR0 register to 0000H.
2. In the external event count mode, use of the timer output is disabled. If performing timer
output using external event count input, set the interval timer mode, and select the operation
enabled by the external event count input for the count clock (TAB1CTL1.TAB1MD2 to
TAB1CTL1.TAB1MD0 bits = 000, TAB1CTL1.TAB1EEE bit = 1).
FFFFH
16-bit counter
0000H
TAB1CE bit
INTTAB1CC0 signal
FFFFH
D1 D1
16-bit counter
D2 D2 D2
0000H
TAB1CE bit
TAB1CCR0 register D1 D2
INTTAB1CC0 signal
If the value of the TAB1CCR0 register is changed from D1 to D2 while the count value is greater than D2 but
less than D1, the count value is transferred to the CCR0 buffer register as soon as the TAB1CCR0 register has
been rewritten. Consequently, the value that is compared with the 16-bit counter is D2.
Because the count value has already exceeded D2, however, the 16-bit counter counts up to FFFFH, overflows,
and then counts up again from 0000H. When the count value matches D2, the INTTAB1CC0 signal is
generated.
Therefore, the INTTAB1CC0 signal may not be generated at the valid edge count of “(D1 + 1) times” or “(D2 + 1)
times” originally expected, but may be generated at the valid edge count of “(10000H + D2 + 1) times”.
TAB1CCR1
register
CCR1 buffer
register
Match signal
INTTAB1CC1 signal
TAB1CCR2
register
CCR2 buffer
register
Match signal
INTTAB1CC2 signal
TAB1CCR3
register
CCR3 buffer
register
Match signal
INTTAB1CC3 signal
Clear
Edge
EVTAB1 detector 16-bit counter
Match signal
INTTAB1CC0 signal
TAB1CCR0 register
If the set value of the TAB1CCRk register is smaller than the set value of the TAB1CCR0 register, the
INTTAB1CCk signal is generated once per cycle.
Remark k = 1 to 3,
FFFFH
D01 D01 D01 D01
D31 D31 D31 D31
16-bit counter D11 D11 D11 D11
D21 D21 D21 D21
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
If the set value of the TAB1CCRk register is greater than the set value of the TAB1CCR0 register, the
INTTAB1CCk signal is not generated because the count value of the 16-bit counter and the value of the
TAB1CCRk register do not match.
Remark k = 1 to 3,
FFFFH
D01 D01 D01 D01
16-bit counter
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal L
INTTAB1CC2 signal L
INTTAB1CC3 signal L
7.5.3 External trigger pulse output mode (TAB1MD2 to TAB1MD0 bits = 010)
In the external trigger pulse output mode, TAB1 waits for a trigger when the TAB1CTL0.TAB1CE bit is set to 1. When
the valid edge of the external trigger input signal is detected, TAB1 starts counting, and outputs a PWM waveform from the
TOAB11 to TOAB13 pins.
Pulses can also be output by generating a software trigger instead of using the external trigger. When using a software
trigger, a square wave that has one cycle of the PWM waveform as half its cycle can also be output from the TOAB10 pin.
TAB1CCR1
register
Transfer
Output
CCR1 buffer S
controller TOAB11 pin
register R (RS-FF)
Match signal
INTTAB1CC1 signal
TAB1CCR2
register
Transfer
Match signal
INTTAB1CC2 signal
TAB1CCR3
register
Edge Transfer
EVTAB1 pin
detector
Output
CCR3 buffer S
controller TOAB13 pin
register R (RS-FF)
Software trigger
generation Match signal
INTTAB1CC3 signal
Clear
Transfer
TAB1CCR0 register
FFFFH D0 D0 D0 D0
D3 D3 D3 D3
D2 D2 D2 D2
16-bit counter
D1 D1 D1 D1 D1
0000H
TAB1CE bit
TAB1CCR0 register D0
INTTAB1CC0 signal
TAB1CCR1 register D1
INTTAB1CC1 signal
Active level Active level Active level Active level Active level
width width width width width
(D1) (D1) (D1) (D1) (D1)
TAB1CCR2 register D2
INTTAB1CC2 signal
TAB1CCR3 register D3
INTTAB1CC3 signal
TAB1 waits for a trigger when the TAB1CE bit is set to 1. When the trigger is generated, the 16-bit counter is cleared
from FFFFH to 0000H, starts counting at the same time, and outputs a PWM waveform from the TOAB1k pin. If the trigger
is generated again while the counter is operating, the counter is cleared to 0000H and restarted. (The output of the
TOAB10 pin is inverted. The TOAB1k pin outputs a high level regardless of the status (high/low) when a trigger is
generated.)
The active level width, cycle, and duty factor of the PWM waveform can be calculated as follows.
Active level width = (Set value of TAB1CCRk register) × Count clock cycle
Cycle = (Set value of TAB1CCR0 register + 1) × Count clock cycle
Duty factor = (Set value of TAB1CCRk register)/(Set value of TAB1CCR0 register + 1)
The compare match request signal (INTTAB1CC0) is generated when the 16-bit counter counts up next time after its
count value matches the value of the CCR0 buffer register, and the 16-bit counter is cleared to 0000H. The compare
match interrupt request signal (INTTAB1CCk) is generated when the count value of the 16-bit counter matches the value
of the CCRk buffer register.
The value set to the TAB1CCRm register is transferred to the CCRm buffer register when the count value of the 16-bit
counter matches the value of the CCR0 buffer register and the 16-bit counter is cleared to 0000H.
The valid edge of the external trigger input signal or setting the software trigger (TAB1CTL1.TAB1EST bit) to 1 is used
as the trigger.
Remark k = 1 to 3,
m = 0 to 3,
Figure 7-18. Setting of Registers in External Trigger Pulse Output Mode (1/3)
Figure 7-18. Setting of Registers in External Trigger Pulse Output Mode (2/3)
0, 1, 0:
External trigger pulse
output mode
0: Operate on count clock
selected by TAB1CKS0 to
TAB1CKS2 bits
1: Count by external event
input signal
Generate software trigger
when 1 is written
Note Clear this bit to 0 when the TOAB10 pin is not used in the external trigger pulse output mode.
Figure 7-18. Setting of Registers in External Trigger Pulse Output Mode (3/3)
Remarks 1. TAB1 I/O control register 1 (TAB1IOC1) and TAB1 option register 0 (TAB1OPT0) are not
used in the external trigger pulse output mode.
2. Updating TAB1 capture/compare register 2 (TAB1CCR2) and TAB1 capture/compare register 3
(TAB1CCR3) is enabled by writing TAB1 capture/compare register 1 (TAB1CCR1).
Figure 7-19. Software Processing Flow in External Trigger Pulse Output Mode (1/2)
FFFFH
D01
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
Figure 7-19. Software Processing Flow in External Trigger Pulse Output Mode (2/2)
Remark m = 0 to 3,
FFFFH
D01 D01
TAB1CE bit
INTTAB1CC0 signal
TOAB10 pin output
(only when software
trigger is used)
TAB1CCR1 register D10 D11
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
To transfer data from the TAB1CCRm register to the CCRm buffer register, the TAB1CCR1 register must be
written.
To change both the cycle and active level width of the PWM waveform at this time, first set the cycle to the
TAB1CCR0 register, set the active level width to the TAB1CCR2 and TAB1CCR3 registers, and then set the
active level to the TAB1CCR1 register.
To change only the cycle of the PWM waveform, first set the cycle to the TAB1CCR0 register, and then write
the same value to the TAB1CCR1 register.
To change only the active level width (duty factor) of the PWM waveform, first set the active level to the
TAB1CCR2 and TAB1CCR3 registers and then set the active level to the TAB1CCR1 register.
To change only the active level width (duty factor) of the PWM waveform output by the TOAB11 pin, only the
TAB1CCR1 register has to be set.
To change only the active level width (duty factor) of the PWM waveform output by the TOAB12 and TOAB13
pins, first set the active level width to the TAB1CCR2 and TAB1CCR3 registers, and then write the same value
to the TAB1CCR1 register.
After data is written to the TAB1CCR1 register, the value written to the TAB1CCRm register is transferred to the
CCRm buffer register in synchronization with clearing of the 16-bit counter, and is used as the value to be
compared with the 16-bit counter.
To write the TAB1CCR0 to TAB1CCR3 registers again after writing the TAB1CCR1 register once, do so after
the INTTAB1CC0 signal is generated. Otherwise, the value of the CCRm buffer register may become
undefined because the timing of transferring data from the TAB1CCRm register to the CCRm buffer register
conflicts with writing the TAB1CCRm register.
Remark m = 0 to 3,
Count clock
TAB1CE bit
TAB1CCR0 register D0 D0 D0
INTTAB1CC0 signal
INTTAB1CCk signal
Remark k = 1 to 3,
To output a 100% waveform, set a value of “set value of TAB1CCR0 register + 1” to the TAB1CCRk register. If
the set value of the TAB1CCR0 register is FFFFH, 100% output cannot be produced.
Count clock
TAB1CE bit
TAB1CCR0 register D0 D0 D0
TAB1CCRk register D0 + 1 D0 + 1 D0 + 1
INTTAB1CC0 signal
INTTAB1CCk signal
Remark k = 1 to 3,
(c) Conflict between trigger detection and match with CCRk buffer register
If the trigger is detected immediately after the INTTAB1CCk signal is generated, the 16-bit counter is
immediately cleared to 0000H, the output signal of the TOAB1k pin is asserted, and the counter continues
counting. Consequently, the inactive period of the PWM waveform is shortened.
INTTAB1CCk signal
Shortened
Remark k = 1 to 3,
If the trigger is detected immediately before the INTTAB1CCk signal is generated, the INTTAB1CCk signal is
not generated, and the 16-bit counter is cleared to 0000H and continues counting. The output signal of the
TOAB1k pin remains active. Consequently, the active period of the PWM waveform is extended.
INTTAB1CCk signal
Extended
Remark k = 1 to 3,
(d) Conflict between trigger detection and match with CCR0 buffer register
If the trigger is detected immediately after the INTTAB1CC0 signal is generated, the 16-bit counter is cleared to
0000H and continues counting up. Therefore, the active period of the TOAB1k pin is extended by time from
generation of the INTTAB1CC0 signal to trigger detection.
INTTAB1CC0 signal
Extended
Remark k = 1 to 3,
If the trigger is detected immediately before the INTTAB1CC0 signal is generated, the INTTAB1CC0 signal is
not generated. The 16-bit counter is cleared to 0000H, the TOAB1k pin is asserted, and the counter continues
counting. Consequently, the inactive period of the PWM waveform is shortened.
INTTAB1CC0 signal
Shortened
Remark k = 1 to 3,
Count clock
16-bit counter Dk − 2 Dk − 1 Dk Dk + 1 Dk + 2
INTTAB1CCk signal
Remark k = 1 to 3,
Usually, the INTTAB1CCk signal is generated in synchronization with the next count-up after the count value of
the 16-bit counter matches the value of the CCRk buffer register.
In the external trigger pulse output mode, however, it is generated one clock earlier. This is because the timing
is changed to match the timing of changing the output signal of the TOAB1k pin.
TAB1CCR1
register
Transfer
Output
CCR1 buffer S
controller TOAB11 pin
register R (RS-FF)
Match signal
INTTAB1CC1 signal
TAB1CCR2
register
Transfer
Output
CCR2 buffer S
controller TOAB12 pin
register R (RS-FF)
Match signal
INTTAB1CC2 signal
TAB1CCR3
register
Edge Transfer
TRGAB1 pin
detector
CCR3 buffer S Output
controller TOAB13 pin
register R
(RS-FF)
Software trigger
generation Match signal
INTTAB1CC3 signal
Clear
Transfer
TAB1CCR0 register
FFFFH
D0 D0 D0
D3 D3 D3
16-bit counter D2 D2 D2
D1 D1 D1
0000H
TAB1CE bit
TAB1CCR0 register D0
INTTAB1CC0 signal
TAB1CCR1 register D1
INTTAB1CC1 signal
TAB1CCR2 register D2
INTTAB1CC2 signal
TAB1CCR3 register D3
INTTAB1CC3 signal
When the TAB1CE bit is set to 1, TAB1 waits for a trigger. When the trigger is generated, the 16-bit counter is cleared
from FFFFH to 0000H, starts counting, and outputs a one-shot pulse from the TOAB1k pin. After the one-shot pulse is
output, the 16-bit counter is set to FFFFH, stops counting, and waits for a trigger. If a trigger is generated again while the
one-shot pulse is being output, it is ignored.
The output delay period and active level width of the one-shot pulse can be calculated as follows.
Output delay period = (Set value of TAB1CCRk register) × Count clock cycle
Active level width = (Set value of TAB1CCR0 register − Set value of TAB1CCRk register + 1) × Count clock cycle
The compare match interrupt request signal INTTAB1CC0 is generated when the 16-bit counter counts up after its
count value matches the value of the CCR0 buffer register. The compare match interrupt request signal (INTTAB1CCk) is
generated when the count value of the 16-bit counter matches the value of the CCRk buffer register.
The valid edge of the external trigger input or setting the software trigger (TAB1CTL1.TAB1EST bit) to 1 is used as the
trigger.
Remark k = 1 to 3
Figure 7-22. Register Setting for Operation in One-Shot Pulse Output Mode (1/3)
0, 1, 1:
One-shot pulse output mode
0: Operate on count clock
selected by TAB1CKS0 to
TAB1CKS2 bits
1: Count by external event
count input signal
Generate software trigger
when 1 is written
Figure 7-22. Register Setting for Operation in One-Shot Pulse Output Mode (2/3)
Note Clear this bit to 0 when the TOAB10 pin is not used in the one-shot pulse output mode.
Figure 7-22. Register Setting for Operation in One-Shot Pulse Output Mode (3/3)
Caution One-shot pulses are not output even in the one-shot pulse output mode, if the set
value of the TAB1CCRk register is greater than that value of the TAB1CCR0 register.
Remarks 1. TAB1 I/O control register 1 (TAB1IOC1) and TAB1 option register 0 (TAB1OPT0) are not
used in the one-shot pulse output mode.
2. k = 1 to 3
Figure 7-23. Software Processing Flow in One-Shot Pulse Output Mode (1/2)
FFFFH
D00
D01
D30
16-bit counter D20 D31
D10 D21
D11
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
Figure 7-23. Software Processing Flow in One-Shot Pulse Output Mode (2/2)
<1> Count operation start flow <2> TAB1CCR0 to TAB1CCR3 register setting change flow
As rewriting the
START TAB1CCRm register
immediately sends the
data to the CCRm
Setting of TAB1CCR0 to buffer register, rewriting
TAB1CCR3 registers immediately after
Register initial setting The initial setting of these the generation of the
TAB1CTL0 register registers is performed INTTAB1CCR0 signal
(TAB1CKS0 to TAB1CKS2 bits), before setting the is recommended.
TAB1CTL1 register, TAB1CE bit to 1.
TAB1IOC0 register,
TAB1IOC2 register,
TAB1CCR0 to TAB1CCR3 registers <3> Count operation stop flow
The TAB1CKS0 to
Count operation is
TAB1CKS2 bits can be TAB1CE bit = 0
stopped
set at the same time
TAB1CE bit = 1
when counting has been
started (TAB1CE bit = 1).
Trigger wait status
STOP
Remark m = 0 to 3
FFFFH
D00 D00
D01 D01
16-bit counter Dk0 Dk0
Dk1 Dk1
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CCk signal
When the TAB1CCR0 register is rewritten from D00 to D01 and the TAB1CCRk register from Dk0 to Dk1 where
D00 > D01 and Dk0 > Dk1, if the TAB1CCRk register is rewritten when the count value of the 16-bit counter is
greater than Dk1 and less than Dk0 and if the TAB1CCR0 register is rewritten when the count value is greater
than D01 and less than D00, each set value is reflected as soon as the register has been rewritten and
compared with the count value. The counter counts up to FFFFH and then counts up again from 0000H.
When the count value matches Dk1, the counter generates the INTTAB1CCk signal and asserts the TOAB1k
pin. When the count value matches D01, the counter generates the INTTAB1CC0 signal, deasserts the
TOAB1k pin, and stops counting.
Therefore, the counter may output a pulse with a delay period or active period different from that of the one-
shot pulse that is originally expected.
Remark k = 1 to 3
Count clock
16-bit counter Dk − 2 Dk − 1 Dk Dk + 1 Dk + 2
TAB1CCRk register Dk
INTTAB1CCk signal
Usually, the INTTAB1CCk signal is generated when the 16-bit counter counts up next time after its count value
matches the value of the TAB1CCRk register.
In the one-shot pulse output mode, however, it is generated one clock earlier. This is because the timing is
changed to match the change timing of the TOAB1k pin.
Remark k = 1 to 3
TAB1CCR1
register
Transfer
Output
CCR1 buffer S
controller TOAB11 pin
register R (RS-FF)
Match signal
INTTAB1CC1 signal
TAB1CCR2
register
Transfer
Output
CCR2 buffer S
controller TOAB12 pin
register R (RS-FF)
Match signal
INTTAB1CC2 signal
TAB1CCR3
register
Transfer
Output
CCR3 buffer S
controller TOAB13 pin
register R (RS-FF)
Match signal
INTTAB1CC3 signal
Clear
Count
Output
clock 16-bit counter TOAB10 pin
controller
selection
Match signal
INTTAB1CC0 signal
Transfer
TAB1CCR0 register
FFFFH
D0 D0 D0 D0
D3 D3 D3 D3
16-bit counter D2 D2 D2 D2
D1 D1 D1 D1
0000H
TAB1CE bit
TAB1CCR0 register D0
INTTAB1CC0 signal
TAB1CCR1 register D1
INTTAB1CC1 signal
TAB1CCR2 register D2
INTTAB1CC2 signal
TAB1CCR3 register D3
INTTAB1CC3 signal
When the TAB1CE bit is set to 1, the 16-bit counter is cleared from FFFFH to 0000H, starts counting, and outputs a
PWM waveform from the TOAB1k pin.
The active level width, cycle, and duty factor of the PWM waveform can be calculated as follows.
Active level width = (Set value of TAB1CCRk register) × Count clock cycle
Cycle = (Set value of TAB1CCR0 register + 1) × Count clock cycle
Duty factor = (Set value of TAB1CCRk register)/(Set value of TAB1CCR0 register + 1)
The PWM waveform can be changed by rewriting the TAB1CCRm register while the counter is operating. The newly
written value is reflected when the count value of the 16-bit counter matches the value of the CCR0 buffer register and the
16-bit counter is cleared to 0000H.
The compare match interrupt request signal (INTTAB1CC0) is generated when the 16-bit counter counts up next time
after its count value matches the value of the CCR0 buffer register, and the 16-bit counter is cleared to 0000H. The
compare match interrupt request signal (INTTAB1CCk) is generated when the count value of the 16-bit counter matches
the value of the CCRk buffer register.
Remark k = 1 to 3,
m = 0 to 3,
1, 0, 0:
PWM output mode
Note Clear this bit to 0 when the TOAB10 pin is not used in the PWM output mode.
Remarks 1. TAB1 I/O control register 1 (TAB1IOC1) and TAB1 option register 0 (TAB1OPT0) are not
used in the PWM output mode.
2. Updating TAB1 capture/compare register 2 (TAB1CCR2) and TAB1 capture/compare register
3 (TAB1CCR3) is enabled by writing TAB1 capture/compare register 1 (TAB1CCR1).
FFFFH
D01
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
Remark k = 1 to 3,
m = 0 to 3,
FFFFH
D01 D01
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
To transfer data from the TAB1CCRm register to the CCRm buffer register, the TAB1CCR1 register must be
written.
To change both the cycle and active level of the PWM waveform at this time, first set the cycle to the
TAB1CCR0 register, set the active level width to the TAB1CCR2 and TAB1CCR3 registers, and then set the
active level width to the TAB1CCR1 register.
To change only the cycle of the PWM waveform, first set the cycle to the TAB1CCR0 register, and then write
the same value to the TAB1CCR1 register.
To change only the active level width (duty factor) of the PWM wave, first set the active level to the TAB1CCR2
and TAB1CCR3 registers, and then set the active level to the TAB1CCR1 register.
To change only the active level width (duty factor) of the PWM waveform output by the TOAB11 pin, only the
TAB1CCR1 register has to be set.
To change only the active level width (duty factor) of the PWM waveform output by the TOAB12 and TOAB13
pins, first set the active level width to the TAB1CCR2 and TAB1CCR3 registers, and then write the same value
to the TAB1CCR1 register.
After the TAB1CCR1 register is written, the value written to the TAB1CCRm register is transferred to the CCRm
buffer register in synchronization with the timing of clearing the 16-bit counter, and is used as the value to be
compared with the value of the 16-bit counter.
To write the TAB1CCR0 to TAB1CCR3 registers again after writing the TAB1CCR1 register once, do so after
the INTTAB1CC0 signal is generated. Otherwise, the value of the CCRm buffer register may become
undefined because the timing of transferring data from the TAB1CCRm register to the CCRm buffer register
conflicts with writing the TAB1CCRm register.
Remark m = 0 to 3,
Count clock
TAB1CE bit
TAB1CCR0 register D0 D0 D0
INTTAB1CC0 signal
INTTAB1CCk signal
Remark k = 1 to 3
To output a 100% waveform, set a value of “set value of TAB1CCR0 register + 1” to the TAB1CCRk register. If
the set value of the TAB1CCR0 register is FFFFH, 100% output cannot be produced.
Count clock
TAB1CE bit
TAB1CCR0 register D0 D0 D0
TAB1CCRk register D0 + 1 D0 + 1 D0 + 1
INTTAB1CC0 signal
INTTAB1CCk signal
Count clock
16-bit counter Dk − 2 Dk − 1 Dk Dk + 1 Dk + 2
INTTAB1CCk signal
Remark k = 1 to 3
Usually, the INTTAB1CCk signal is generated in synchronization with the next counting up after the count value
of the 16-bit counter matches the value of the TAB1CCRk register.
In the PWM output mode, however, it is generated one clock earlier. This is because the timing is changed to
match the change timing of the output signal of the TOAB1k pin.
Remark m = 0 to 3,
TAB1CCR3 Output
register controller TOAB13 pin output
(compare)
TAB1CCR2 Output
register controller TOAB12 pin output
(compare)
TAB1CCR1
Output
register TOAB11 pin output
controller
(compare)
TAB1CCR0 Output
register controller
TOAB10 pin output
(compare)
TAB1CCS0,
Internal count clock Count TAB1CCS1 bits
clock (capture/compare
External event selection selection)
Edge
count input
detector
(EVTAB1 pin input) 16-bit counter INTTAB1OV signal
TAB1CE
bit 0
Edge INTTAB1CC3 signal
detector 1
TAB1CCR0 0
register INTTAB1CC2 signal
(capture) 1
TIAB11 pin Edge
(capture detector 0
trigger input) INTTAB1CC1 signal
TAB1CCR1 1
register
(capture) 0
TIAB12 pin Edge INTTAB1CC0 signal
(capture detector 1
trigger input)
TAB1CCR2
register
(capture)
TIAB13 pin Edge
(capture detector
trigger input)
TAB1CCR3
register
(capture)
When the TAB1CE bit is set to 1, TAB1 starts counting, and the output signals of the TOAB10 to TOAB13 pins are
inverted. When the count value of the 16-bit counter subsequently matches the set value of the TAB1CCRm register, a
compare match interrupt request signal (INTTAB1CCm) is generated, and the output signal of the TOAB1m pin is inverted.
The 16-bit counter continues counting in synchronization with the count clock. When it counts up to FFFFH, it
generates an overflow interrupt request signal (INTTAB1OV) at the next clock, is cleared to 0000H, and continues counting.
At this time, the overflow flag (TAB1OPT0.TAB1OVF bit) is also set to 1. Clear the overflow flag to 0 by executing the CLR
instruction by software.
The TAB1CCRm register can be rewritten while the counter is operating. If it is rewritten, the new value is reflected at
that time, and compared with the count value.
Remark m = 0 to 3,
FFFFH
D00 D00
D30 D30 D01 D01
16-bit counter D20 D20 D31 D31
D10 D21 D21
D11 D11 D11
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
INTTAB1OV signal
TAB1OVF bit
When the TAB1CE bit is set to 1, the 16-bit counter starts counting. When the valid edge input to the TIAB1m pin is
detected, the count value of the 16-bit counter is stored in the TAB1CCRm register, and a capture interrupt request signal
(INTTAB1CCm) is generated.
The 16-bit counter continues counting in synchronization with the count clock. When it counts up to FFFFH, it
generates an overflow interrupt request signal (INTTAB1OV) at the next clock, is cleared to 0000H, and continues counting.
At this time, the overflow flag (TAB1OVF bit) is also set to 1. Clear the overflow flag to 0 by executing the CLR instruction
by software.
Remark m = 0 to 3,
FFFFH
D10 D31 D32 D23
D30 D21 D22 D33
D00 D11
16-bit counter D20 D02 D13
D01 D12 D03
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
INTTAB1OV signal
TAB1OVF bit
1, 0, 1:
Free-running mode
0: Operate with count
clock selected by
TAB1CKS0 to TAB1CKS2 bits
1: Count by external
event count input signal
Overflow flag
Specifies if TAB1CCR0
register functions as
capture or compare register
Specifies if TAB1CCR1
register functions as
capture or compare register
Specifies if TAB1CCR2
register functions as
capture or compare register
Specifies if TAB1CCR3
register functions as
capture or compare register
Remark m = 0 to 3
Figure 7-32. Software Processing Flow in Free-Running Timer Mode (Compare Function) (1/2)
FFFFH
D21 D21
D00 D00
D30 D30 D01 D01
16-bit counter D20 D20 D31 D31
D10 D10
D11 D11 D11
0000H
TAB1CE bit
INTTAB1OV signal
TAB1OVF bit
Figure 7-32. Software Processing Flow in Free-Running Timer Mode (Compare Function) (2/2)
START
NO
TAB1OVF bit = 1
YES
STOP
Figure 7-33. Software Processing Flow in Free-Running Timer Mode (Capture Function) (1/2)
FFFFH
D10 D31 D32 D23
D30 D21 D22 D33
D00 D11
16-bit counter D20 D02 D13
D01 D12 D03
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
INTTAB1OV signal
TAB1OVF bit
Figure 7-33. Software Processing Flow in Free-Running Timer Mode (Capture Function) (2/2)
START
NO
TAB1OVF bit = 1
YES
STOP
TAB1CE bit
INTTAB1CC0 signal
Interval period Interval period Interval period Interval period Interval period
(D00 + 1) (D01 − D00) (10000H + (D03 − D02) (D04 − D03)
D02 − D01)
TAB1CCR1 register D10 D11 D12 D13 D14
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
When performing an interval operation in the free-running timer mode, four intervals can be set with one
channel.
To perform the interval operation, the value of the corresponding TAB1CCRm register must be re-set in the
interrupt servicing that is executed when the INTTAB1CCm signal is detected.
The set value for re-setting the TAB1CCRm register can be calculated by the following expression, where “Dm”
is the interval period.
Remark m = 0 to 3,
FFFFH
D10 D31 D13 D23
D30 D21 D32 D33
D00 D11
16-bit counter D20 D02 D22
D01 D12 D03
0000H
TAB1CE bit
INTTAB1CC0 signal
INTTAB1CC1 signal
INTTAB1CC2 signal
INTTAB1CC3 signal
INTTAB1OV signal
TAB1OVF bit
When executing pulse width measurement in the free-running timer mode, four pulse widths can be measured
with one channel.
To measure a pulse width, the pulse width can be calculated by reading the value of the TAB1CCRm register in
synchronization with the INTTAB1CCm signal, and calculating the difference between the value read this time
and the previously read value.
Remark m = 0 to 3,
(c) Processing of overflow when two or more capture registers are used
Care must be exercised in processing the overflow flag when two or more capture registers are used. First, an
example of incorrect processing is shown below.
Example of incorrect processing when two or more capture registers are used
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TAB1CE bit
INTTAB1OV signal
TAB1OVF bit
The following problem may occur when two pulse widths are measured in the free-running timer mode.
<1> Read the TAB1CCR0 register (setting of the default value of the TIAB10 pin input).
<2> Read the TAB1CCR1 register (setting of the default value of the TIAB11 pin input).
<3> Read the TAB1CCR0 register.
Read the overflow flag. If the overflow flag is 1, clear it to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<4> Read the TAB1CCR1 register.
Read the overflow flag. Because the flag is cleared in <3>, 0 is read.
Because the overflow flag is 0, the pulse width can be calculated by (D11 − D10) (incorrect).
When two or more capture registers are used, and if the overflow flag is cleared to 0 by one capture register,
the other capture register may not obtain the correct pulse width.
Use software when using two or more capture registers. An example of how to use software is shown below.
(1/2)
Example when two capture registers are used (using overflow interrupt)
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TAB1CE bit
INTTAB1OV signal
TAB1OVF bit
TAB1OVF0 flagNote
TAB1OVF1 flagNote
Note The TAB1OVF0 and TAB1OVF1 flags are set in the internal RAM by software.
<1> Read the TAB1CCR0 register (setting of the default value of the TIAB10 pin input).
<2> Read the TAB1CCR1 register (setting of the default value of the TIAB11 pin input).
<3> An overflow occurs. Set the TAB1OVF0 and TAB1OVF1 flags to 1 in the overflow interrupt servicing,
and clear the overflow flag to 0.
<4> Read the TAB1CCR0 register.
Read the TAB1OVF0 flag. If the TAB1OVF0 flag is 1, clear it to 0.
Because the TAB1OVF0 flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<5> Read the TAB1CCR1 register.
Read the TAB1OVF1 flag. If the TAB1OVF1 flag is 1, clear it to 0 (the TAB1OVF0 flag is cleared in
<4>, and the TAB1OVF1 flag remains 1).
Because the TAB1OVF1 flag is 1, the pulse width can be calculated by (10000H + D11 − D10)
(correct).
<6> Same as <3>
(2/2)
Example when two capture registers are used (without using overflow interrupt)
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TAB1CE bit
INTTAB1OV signal
TAB1OVF bit
TAB1OVF0 flagNote
TAB1OVF1 flagNote
Note The TAB1OVF0 and TAB1OVF1 flags are set in the internal RAM by software.
<1> Read the TAB1CCR0 register (setting of the default value of the TIAB10 pin input).
<2> Read the TAB1CCR1 register (setting of the default value of the TIAB11 pin input).
<3> An overflow occurs. Nothing is done by software.
<4> Read the TAB1CCR0 register.
Read the overflow flag. If the overflow flag is 1, set only the TAB1OVF1 flag to 1, and clear the
overflow flag to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<5> Read the TAB1CCR1 register.
Read the overflow flag. Because the overflow flag is cleared in <4>, 0 is read.
Read the TAB1OVF1 flag. If the TAB1OVF1 flag is 1, clear it to 0.
Because the TAB1OVF1 flag is 1, the pulse width can be calculated by (10000H + D11 − D10)
(correct).
<6> Same as <3>
FFFFH
Dm0
16-bit counter
Dm1
0000H
TAB1CE bit
INTTAB1OV signal
TAB1OVF bit
Pulse width
The following problem may occur when a long pulse width is measured in the free-running timer mode.
<1> Read the TAB1CCRm register (setting of the default value of the TIAB1m pin input).
<2> An overflow occurs. Nothing is done by software.
<3> An overflow occurs a second time. Nothing is done by software.
<4> Read the TAB1CCRm register.
Read the overflow flag. If the overflow flag is 1, clear it to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + Dm1 − Dm0)
(incorrect).
Actually, the pulse width must be (20000H + Dm1 − Dm0) because an overflow occurs twice.
Remark m = 0 to 3,
If an overflow occurs twice or more when the capture trigger interval is long, the correct pulse width may not be
obtained.
If the capture trigger interval is long, slow the count clock to lengthen one cycle of the 16-bit counter, or use
software. An example of how to use software is shown next.
FFFFH
Dm0
16-bit counter
Dm1
0000H
TAB1CE bit
INTTAB1OV signal
TAB1OVF bit
Overflow counterNote 0H 1H 2H 0H
Pulse width
Note The overflow counter is set arbitrarily by software in the internal RAM.
<1> Read the TAB1CCRm register (setting of the default value of the TIAB1m pin input).
<2> An overflow occurs. Increment the overflow counter and clear the overflow flag to 0 in the overflow
interrupt servicing.
<3> An overflow occurs a second time. Increment (+1) the overflow counter and clear the overflow flag to
0 in the overflow interrupt servicing.
<4> Read the TAB1CCRm register.
Read the overflow counter.
When the overflow counter is “N”, the pulse width can be calculated by (N × 10000H + Dm1 – Dm0).
In this example, the pulse width is (20000H + Dm1 – Dm0) because an overflow occurs twice.
Clear the overflow counter (0H).
Remark m = 0 to 3,
(i) Operation to write 0 (without conflict with setting) (iii) Operation to clear to 0 (without conflict with setting)
Overflow Overflow
set signal L set signal L
Overflow flag
(TAB1OVF bit)
(ii) Operation to write 0 (conflict with setting) (iv) Operation to clear to 0 (conflict with setting)
Overflow Overflow
set signal set signal
Overflow flag H
(TAB1OVF bit)
To clear the overflow flag to 0, read the overflow flag to check if it is set to 1, and clear it with the CLR
instruction. If 0 is written to the overflow flag without checking if the flag is 1, the set overflow information may
be erased by writing 0 ((ii) in the above chart). Therefore, software may judge that no overflow has occurred
even when an overflow actually has occurred.
If execution of the CLR instruction conflicts with occurrence of an overflow when the overflow flag is cleared to
0 with the CLR instruction, the overflow flag remains set even after execution of the CLR instruction.
Remark m = 0 to 3,
k = 1 to 3
FFFFH
16-bit counter
0000H
TAB1CE bit
INTTAB1CCm signal
INTTAB1OV signal
Cleared to 0 by
TAB1OVF bit CLR instruction
Remark m = 0 to 3,
When the TAB1CE bit is set to 1, the 16-bit counter starts counting. When the valid edge input to the TIAB1m pin is
later detected, the count value of the 16-bit counter is stored in the TAB1CCRm register, the 16-bit counter is cleared to
0000H, and a capture interrupt request signal (INTTAB1CCm) is generated.
The pulse width is calculated as follows.
If the valid edge is not input to the TIAB1m pin even when the 16-bit counter has counted up to FFFFH, an overflow
interrupt request signal (INTTAB1OV) is generated at the next count clock, and the counter is cleared to 0000H and
continues counting. At this time, the overflow flag (TAB1OPT0.TAB1OVF bit) is also set to 1. Clear the overflow flag to 0
by executing the CLR instruction via software.
If the overflow flag is set to 1, the pulse width can be calculated as follows.
Pulse width = (10000H × TAB1OVF bit setting (1) count + Captured value) × Count clock cycle
Remark m = 0 to 3,
1, 1, 0:
Pulse width measurement mode
Overflow flag
Remarks 1. TAB1 I/O control register 0 (TAB1IOC0) is not used in the pulse width measurement mode.
2. m = 0 to 3,
FFFFH
16-bit counter
0000H
TAB1CE bit
INTTAB1CC0 signal
<1> <2>
START
STOP
(i) Operation to write 0 (without conflict with setting) (iii) Operation to clear to 0 (without conflict with setting)
Overflow Overflow
set signal L set signal L
Overflow flag
(TAB1OVF bit)
(ii) Operation to write 0 (conflict with setting) (iv) Operation to clear to 0 (conflict with setting)
Overflow Overflow
set signal set signal
Overflow flag H
(TAB1OVF bit)
To clear the overflow flag to 0, read the overflow flag to check if it is set to 1, and clear it with the CLR
instruction. If 0 is written to the overflow flag without checking if the flag is 1, the set overflow information may
be erased by writing 0 ((ii) in the above chart). Therefore, software may judge that no overflow has occurred
even when an overflow actually has occurred.
If execution of the CLR instruction conflicts with occurrence of an overflow when the overflow flag is cleared to
0 with the CLR instruction, the overflow flag remains set even after execution of the CLR instruction.
Caution In the PWM mode, the capture function of the TAB1CCRm register cannot be used because this
register can be used only as a compare register.
Remark m = 0 to 3
k = 1 to 3
TAB1CE = 1
FFFFH
INTTAB1CC0
match interrupt
INTTAB1CC1
match interrupt
INTTAB1CC2
match interrupt
INTTAB1CC3
match interrupt
INTTAB1OV
TOAB10
TOAB11
TOAB12
TOAB13
Operation Mode TOAB10 Pin TOAB11 Pin TOAB12 Pin TOAB13 Pin
Interval timer mode Square wave output
External event count mode Square wave output −
External trigger pulse output mode Square wave output External trigger pulse External trigger pulse External trigger pulse
output output output
One-shot pulse output mode One-shot pulse One-shot pulse One-shot pulse
output output output
PWM output mode PWM output PWM output PWM output
Free-running timer mode Square wave output (only when compare function is used)
Pulse width measurement mode −
Triangular wave PWM output mode Square wave output Triangular PWM Triangular PWM Triangular PWM
output output output
Table 7-7. Truth Table of TOAB10 to TOAB13 Pins Under Control of Timer Output Control Bits
0 0 × Low-level output
1 0 Low-level output
1 Low level immediately before counting,
high level after counting is started
1 0 × High-level output
1 0 High-level output
1 High level immediately before counting, low
level after counting is started
Remark m = 0 to 3
TAA1 TAA0
TAB1 TAA4
For details of the timer-tuned operation function, see 6.6 Timer-Tuned Operation Function, and for details of the
simultaneous-start function, see 6.7 Simultaneous-Start Function.
7.7 Cautions
16-bit counter
0000H
Count clock
TAB1CE bit
Capture Capture
trigger input trigger input
16-bit counter
0000H
Count clock
TAB1CE bit
Capture Capture
trigger input trigger input
8.1 Overview
Note The external trigger input pin and external event count input pin (EVTT0) are shared with an encoder input pin
(TENC00).
8.2 Functions
• Interval timer
• External event counter
• External trigger pulse output
• One-shot pulse output
• PWM output
• Free-running timer
• Pulse width measurement
• Triangular-wave PWM output
• Encoder count
8.3 Configuration
Item Configuration
Internal bus
TT0CNT TT0TCW
fXX
fXX/2
fXX/4
Selector
controller
fXX/128
Output
TOT01
fXX
fXX/4
Selector
INTTT0EC
fXX/8
fXX/16 Sampling
fXX/32 clock Internal bus
fXX/64
(6) Selector
This selector selects the count clock for the 16-bit counter. Eight types of internal clocks or an external event can
be selected as the count clock.
Note The external event count input (EVTT0), encoder input (TENC00), and external trigger input are shared in a state
that cannot be controlled by using the port functions. To use each function, set them by using the TT0IOC2 and
TT0IOC3 registers after setting their corresponding ports.
8.4 Registers
0 0 0 fXX
0 0 1 fXX/2
0 1 0 fXX/4
0 1 1 fXX/8
1 0 0 fXX/16
1 0 1 fXX/32
1 1 0 fXX/64
1 1 1 fXX/128
Note The TT0OPT0.TT0OVF bit and 16-bit counter are reset simultaneously.
Moreover, timer outputs (TOT00 and TOT01) are reset at the same time as the
16-bit counter.
Cautions 1. Set the TT0CKS2 to TT0CKS0 bits when the TT0CE bit = 0.
When the value of the TT0CE bit is changed from 0 to 1, the TT0CKS2
to TT0CKS0 bits can be set simultaneously.
2. Be sure to set bits 3 to 6 to “0”.
(1/2)
The TT0EEE bit selects whether counting is performed with the internal count clock
or the valid edge of the external event count input.
(2/2)
Cautions 1. The TT0EST bit is valid only in the external trigger pulse output mode or one-shot pulse
output mode. In any other mode, writing 1 to this bit is ignored.
2. The TT0EEE bit is valid only in the interval timer mode, external trigger pulse output mode,
one-shot pulse output mode, PWM output mode, free-running timer mode, pulse width
measurement mode, or triangular-wave PWM output mode. In any other mode, writing 1 to
this bit is ignored.
3. External event count input (EVTT0) or encoder inputs (TENC00, TENC01) is selected in the
external event count mode or encoder compare mode regardless of the value of the
TT0EEE bit.
4. Set the TT0EEE and TT0MD3 to TT0MD0 bits when the TT0CTL0.TT0CE bit = 0. (The same
value can be written when the TT0CE bit = 1.) The operation is not guaranteed when
rewriting is performed with the TT0CE bit = 1. If rewriting was mistakenly performed, clear
the TT0CE bit to 0 and then set the bits again.
5. Be sure to set bits 4 and 7 to “0”.
Caution For details of each bit of the TT0CTL2 register, see 8.6.9 (5) Controlling bits of TT0CTL2 register.
(1/2)
(2/2)
Cautions 1. The TT0ECC bit is valid only in the encoder compare mode. In any other
mode, writing “1” to this bit is ignored.
If the TT0CTL0.TT0CE bit is cleared to 0 while the TT0ECC bit = 1, the
values of the timer/counter and capture registers (TT0CCR0 and
TT0CCR1), and the TT0OPT1, TT0EUF, TT0EOF, and TT0ESF flags are
retained.
If the TT0CE bit is set from 0 to 1 when the TT0ECC bit = 1, the value of the
TT0TCW register is not transferred to the 16-bit counter.
2. The TT0LDE bit is valid only when the TT0ECM1 and TT0ECM0 bits = 00,
01. Writing “1” to this bit is ignored when the TT0ECM1 and TT0ECM0 bits
= 10, 11.
3. The edge detection of the TENC00 and TENC01 inputs specified by the
TT0IOC3.TT0EIS1 and TT0IOC3.TT0EIS0 bits is invalid and fixed to both
the rising and falling edges when the TT0UDS1 and TT0UDS0 bits = 10, 11.
4. Set the TT0LDE, TT0ECM1, TT0ECM0, TT0UDS1, and TT0UDS0 bits when
the TT0CTL0.TT0CE bit = 0 (the same value can be written to these bits
when the TT0CE bit = 1). If the value of these bits is changed when the
TT0CE bit = 1, the operation cannot be guaranteed. If it is changed by
mistake, clear the TT0CE bit and then set the correct value.
5. Be sure to set bits 5 and 6 to “0”.
Note The output level of the timer output pins (TOT00 and TOT01) specified by the
TT0OLn bit is shown below ().
Cautions 1. If the setting of the TT0IOC0 register is changed when TOT00 and
TOT01 outputs are set for the port mode, the output of the pins
change. Set the port in the input mode and make the port go into a
high-impedance state, noting changes in the pin status.
2. Rewrite the TT0OL1, TT0OE1, TT0OL0, and TT0OE0 bits when the
TT0CTL0.TT0CE bit = 0. (The same value can be written when the
TT0CE bit = 1.) If rewriting was mistakenly performed, clear the
TT0CE bit to 0 and then set the bits again.
3. Even if the TT0OL0 or TT0OL1 bit is manipulated when the TT0CE,
TT0OE0, and TT0OE1 bits are 0, the output level of the TOT00 and
TOT01 pins changes.
TT0IS3 TT0IS2 Capture trigger input signal (TIT01 pin) valid edge setting
0 0 No edge detection (capture operation invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
TT0IS1 TT0IS0 Capture trigger input signal (TIT00 pin) valid edge setting
0 0 No edge detection (capture operation invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
Cautions 1. Rewrite the TT0IS3 to TT0IS0 bits when the TT0CTL0.TT0CE bit = 0.
(The same value can be written when the TT0CE bit = 1.) If rewriting
was mistakenly performed, clear the TT0CE bit to 0 and then set the
bits again.
2. The TT0IS3 and TT0IS2 bits are valid only in the free-running timer
mode (only when the TT0OPT0.TT0CCS1 bit = 1) and the pulse width
measurement mode. In all other modes, a capture operation is not
performed.
The TT0IS1 and TT0IS0 bits are valid only in the free-running timer
mode (only when the TT0OPT0. TT0CCS0 bit = 1) and the pulse width
measurement mode. In all other modes, a capture operation is not
performed.
TT0EES1 TT0EES0 External event count input signal (EVTT0 pin) valid edge setting
0 0 No edge detection (external event count invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
TT0ETS1 TT0ETS0 External trigger input signal (EVTT0 pin) valid edge setting
0 0 No edge detection (external trigger invalid)
0 1 Detection of rising edge
1 0 Detection of falling edge
1 1 Detection of both edges
Cautions 1. Rewrite the TT0EES1, TT0EES0, TT0ETS1, and TT0ETS0 bits when the
TT0CTL0.TT0CE bit = 0. (The same value can be written when the
TT0CE bit = 1.) If rewriting was mistakenly performed, clear the
TT0CE bit to 0 and then set the bits again.
2. The TT0EES1 and TT0EES0 bits are valid only when the
TT0CTL1.TT0EEE bit = 1 or when the external event count mode (the
TT0CTL1.TT0MD3 to TT0CTL1.TT0MD0 bits = 0001) has been set.
3. The TT0ETS1 and TT0ETS0 bits are valid only in the external trigger
pulse mode or one-shot pulse output mode.
(1/2)
(2/2)
TT0ECS1 TT0ECS0 Valid edge setting of encoder clear signal (TECR0 pin)
0 0 Detects no edge (clearing encoder is invalid).
0 1 Detects rising edge.
1 0 Detects falling edge.
1 1 Detects both edges.
TT0EIS1 TT0EIS0 Valid edge setting of encoder input signals (TENC00, TENC01 pins)
0 0 Detects no edge (inputting encoder is invalid).
0 1 Detects rising edge.
1 0 Detects falling edge.
1 1 Detects both edges.
Cautions 1. Rewrite the TT0CCS1 and TT0CCS0 bits when the TT0CE bit = 0. (The
same value can be written when the TT0CE bit = 1.) If rewriting was
mistakenly performed, clear the TT0CE bit to 0 and then set these bits
again.
2. Be sure to set bits 1 to 3, 6, and 7 to “0”.
(1/2)
(2/2)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TT0CCR0
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 8-3. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Remark For anytime write and batch write, see 8.6 (2) Anytime write and batch write.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TT0CCR1
The following table shows the functions of the capture/compare register in each mode, and how to write data to the
compare register.
Table 8-4. Function of Capture/Compare Register in Each Mode and How to Write Compare Register
Remark For anytime write and batch write, see 8.6 (2) Anytime write and batch write.
TT0TCW
TT0CNT
Caution Time equal to the sampling clock × 3 clocks is required until the digital noise eliminator is
initialized after the sampling clock has been changed. If the valid edge of the TIT00, TIT01,
TENC01, TECR0, and EVTT00 pins is input after the sampling clock has been changed and
before the time of the sampling clock × 3 clocks passes, therefore, an interrupt request signal
may be generated. Therefore, when using the external trigger function, the external event
function, the capture trigger function, and the encoder function of TMT, enable TMT operation
after the sampling clock × 3 clocks have elapsed.
Remarks 1. Since sampling is performed three times, the noise width for reliably
eliminating noise is 2 sampling clocks.
2. In the case of noise with a width smaller than 2 sampling clocks, an
interrupt request signal is generated if noise synchronized with the
sampling clock is input.
A timing example of noise elimination performed by the timer T input pin digital filter is shown Figure 8-2.
Sampling
3 times
Internal signal
Remark If there are two or fewer noise elimination clocks while the TIT00, TIT01, TENC01, TECR0, and
EVTT00 input signals are high level (or low level), the input signal is eliminated as noise. If it is
sampled three times or more, the edge is detected as a valid input.
The following table shows the operations and output levels of the TOT00 and TOT01 pins.
Table 8-6. Truth Table of TOT00 and TOT01 Pins Under Control of Timer Output Control Bits
Remark
8.6 Operation
The functions of TMT0 that can be implemented differ from one channel to another. The functions of each channel are
shown below.
Caution After the overflow interrupt request signal (INTTT0OV) has been generated, be sure to check
that the overflow flag (TT0OVF, TT0EOF bits) is set to 1.
• INTTT0CC0 interrupt: This signal functions as a match interrupt request signal of the CCR0 buffer register
and as a capture interrupt request signal to the TT0CCR0 register.
• INTTT0CC1 interrupt: This signal functions as a match interrupt request signal of the CCR1 buffer register
and as a capture interrupt request signal to the TT0CCR1 register.
• INTTT0OV interrupt: This signal functions as an overflow interrupt request signal.
• INTTT0EC interrupt: This signal functions as a valid edge detection interrupt request signal of the
encoder clear input (TECR0 pin).
START
Initial settings
Timer operation
• Match between 16-bit counter IINTTT0CC1 signal output
and CCR1 buffer registerNote
• Match between 16-bit counter
and CCR0 buffer register IINTTT0CC0 signal output
• 16-bit counter clear & start
Note The 16-bit counter is not cleared upon a match between the 16-bit counter value
and the CCR1 buffer register value. It is cleared upon a match between the 16-bit
counter value and the CCR0 buffer register value.
Remark The above flowchart illustrates an example of the operation in the interval
timer mode.
TT0CE bit = 1
D01 D01
FFFFH
D02
0000H
INTTT0CC0 signal
INTTT0CC1 signal
START
Initial settings
Timer operation
• Match between 16-bit counter INTTT0CC1 signal output
and CCR1 buffer registerNote
• Match between 16-bit counter INTTT0CC0 signal output
and CCR0 buffer register
• 16-bit counter clear & start
• Transfer of values of TT0CCRn
register to CCRn buffer register
Note The 16-bit counter is not cleared upon a match between the 16-bit counter value and the CCR1
buffer register value. It is cleared upon a match between the 16-bit counter value and the CCR0
buffer register value.
Caution Writing to the TT0CCR1 register includes enabling of batch write. Thus, rewrite the
TT0CCR1 register after rewriting the TT0CCR0 register.
Remark The above flowchart illustrates an example of the operation in the PWM output mode.
TT0CE bit = 1
D01
FFFFH
D03
D02 D02
D11
16-bit counter D12 D12 D12 D12
0000H
INTTT0CC0 signal
INTTT0CC1 signal
Notes 1. Because the TT0CCR1 register was not rewritten, D03 is not transferred.
2. Because the TT0CCR1 register has been written (D12), data is transferred to the CCR1
buffer register upon a match between the value of the 16-bit counter and the value of the
TT0CCR0 register (D01).
3. Because the TT0CCR1 register has been written (D12), data is transferred to the CCR1
buffer register upon a match between the value of the 16-bit counter and the value of the
TT0CCR0 register (D02).
Clear
Match signal
INTTT0CC0 signal
TT0CCR0 register
FFFFH
D0 D0 D0 D0
16-bit counter
0000H
TT0CE bit
TT0CCR0 register D0
INTTT0CC0 signal
When the TT0CE bit is set to 1, the value of the 16-bit counter is cleared from FFFFH to 0000H in synchronization with
the count clock, and the counter starts counting. At this time, the output of the TOT00 pin is inverted. Additionally, the set
value of the TT0CCR0 register is transferred to the CCR0 buffer register.
When the count value of the 16-bit counter matches the value of the CCR0 buffer register, the 16-bit counter is cleared
to 0000H, the output of the TOT00 pin is inverted, and a compare match interrupt request signal (INTTT0CC0) is
generated.
The interval can be calculated by the following expression.
Figure 8-9. Register Setting for Interval Timer Mode Operation (1/2)
0, 0, 0, 0:
Interval timer mode
Figure 8-9. Register Setting for Interval Timer Mode Operation (2/2)
Remark TMT0 control register 2 (TT0CTL2), TMT0 I/O control register 1 (TT0IOC1), TMT0 I/O control
register 2 (TT0IOC2), TMT0 I/O control register 3 (TT0IOC3), TMT0 option register 0
(TT0OPT0), TMT0 option register 1 (TT0OPT1), and TMT0 counter write register (TT0TCW)
are not used in the interval timer mode.
FFFFH
D0 D0 D0
16-bit counter
0000H
TT0CE bit
TT0CCR0 register D0
INTTT0CC0 signal
<1> <2>
START
STOP
Count clock
TT0CE bit
INTTT0CC0 signal
FFFFH
16-bit counter
0000H
TT0CE bit
INTTT0CC0 signal
FFFFH
D1 D1
16-bit counter
D2 D2 D2
0000H
TT0CE bit
TT0CCR0 register D1 D2
TT0OL0 bit L
INTTT0CC0 signal
If the value of the TT0CCR0 register is changed from D1 to D2 while the count value is greater than D2 but less
than D1, the count value is transferred to the CCR0 buffer register as soon as the TT0CCR0 register has been
rewritten. Consequently, the value of the 16-bit counter that is compared is D2.
Because the count value has already exceeded D2, however, the 16-bit counter counts up to FFFFH, overflows,
and then counts up again from 0000H. When the count value matches D2, the INTTT0CC0 signal is generated
and the output of the TOT00 pin is inverted.
Therefore, the INTTT0CC0 signal may not be generated at the interval time “(D1 + 1) × Count clock cycle” or
“(D2 + 1) × Count clock cycle” as originally expected, but may be generated at an interval of “(10000H + D2 + 1)
× Count clock cycle”.
TT0CCR1 register
Output
CCR1 buffer register TOT01 pin
controller
Match signal
INTTT0CC1 signal
Clear
Match signal
INTTT0CC0 signal
TT0CCR0 register
When the TT0CCR1 register is set to the same value as the TT0CCR0 register, the INTTT0CC0 signal is
generated at the same timing as the INTTT0CC1 signal and the TOT01 pin output is inverted. In other words, a
square wave can be output from the TOT01 pin.
The following shows the operation when the TT0CCR1 register is set to other than the value set in the
TT0CCR0 register.
If the set value of the TT0CCR1 register is less than the set value of the TT0CCR0 register, the INTTT0CC1
signal is generated once per cycle. At the same time, the output of the TOT01 pin is inverted.
The TOT01 pin outputs a square wave after outputting a short-width pulse.
FFFFH
D01 D01 D01 D01
16-bit counter
D11 D11 D11 D11
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
If the set value of the TT0CCR1 register is greater than the set value of the TT0CCR0 register, the count value
of the 16-bit counter does not match the value of the TT0CCR1 register. Consequently, the INTTT0CC1 signal
is not generated, nor is the output of the TOT01 pin changed.
When the TT0CCR1 register is not used, it is recommended to set its value to FFFFH.
FFFFH
D01 D01 D01 D01
16-bit counter
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal L
Clear
EVTT0 pin
Edge
(external event 16-bit counter
detectorNote
count input)
Match signal
INTTT0CC0 signal
TT0CCR0 register
FFFFH
D0 D0 D0
16-bit counter
Remark This figure shows the basic timing when the rising edge is specified as the valid edge of the
external event count input.
When the TT0CE bit is set to 1, the value of the 16-bit counter is cleared from FFFFH to 0000H. The counter counts
each time the valid edge of external event count input is detected. Additionally, the set value of the TT0CCR0 register is
transferred to the CCR0 buffer register.
When the count value of the 16-bit counter matches the value of the CCR0 buffer register, the 16-bit counter is cleared
to 0000H, and a compare match interrupt request signal (INTTT0CC0) is generated.
The INTTT0CC0 signal is generated each time the valid edge of the external event count input has been detected
“value set to TT0CCR0 register + 1” times.
Figure 8-16. Register Setting for Operation in External Event Count Mode (1/2)
0: Stops counting
1: Enables counting
0, 0, 0, 1:
External event count mode
Figure 8-16. Register Setting for Operation in External Event Count Mode (2/2)
Remark TMT0 control register 2 (TT0CTL2), TMT0 I/O control register 0 (TT0IOC0), TMT0 I/O control
register 1 (TT0IOC1), TMT0 I/O control register 3 (TT0IOC3), TMT0 option register 0
(TT0OPT0), TMT0 option register 1 (TT0OPT1), and TMT0 counter write register (TT0TCW) are
not used in the external event count mode.
FFFFH
D0 D0 D0
16-bit counter
0000H
TT0CE bit
TT0CCR0 register D0
INTTT0CC0 signal
<1> <2>
START
TT0CE bit = 1
STOP
FFFFH
16-bit counter
0000H
TT0CE bit
INTTT0CC0 signal
FFFFH
16-bit counter
0000H
TT0CE bit
INTTT0CC0 signal
(c) Operation with TT0CCR0 set to FFFFH and TT0CCR1 register to 0000H
When the TT0CCR0 register is set to FFFFH, the 16-bit counter counts up to FFFFH each time it has detected
the valid edge of the external event count signal. The counter is then cleared to 0000H in synchronization with
the next count-up timing and the INTTT0CC0 signal is generated. At this time, the TT0OPT0.TT0OVF bit is not
set.
If the TT0CCR1 register is set to 0000H, the INTTT0CC1 signal is generated when the 16-bit counter is cleared
to 0000H.
FFFFH
16-bit counter
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
FFFFH
D1 D1
16-bit counter
D2 D2 D2
0000H
TT0CE bit
TT0CCR0 register D1 D2
INTTT0CC0 signal
If the value of the TT0CCR0 register is changed from D1 to D2 while the count value is greater than D2 but less
than D1, the count value is transferred to the CCR0 buffer register as soon as the TT0CCR0 register has been
rewritten. Consequently, the value that is compared with the 16-bit counter is D2.
Because the count value has already exceeded D2, however, the 16-bit counter counts up to FFFFH, overflows,
and then counts up again from 0000H. When the count value matches D2, the INTTT0CC0 signal is generated.
Therefore, the INTTT0CC0 signal may not be generated at the valid edge count of “(D1 + 1) times” or “(D2 + 1)
times” as originally expected, but may be generated at the valid edge count of “(10000H + D2 + 1) times”.
TT0CCR1 register
Match signal
INTTT0CC1 signal
Clear
EVTT0 pin
Edge
(external event 16-bit counter
detectorNote
count input)
Match signal
INTTT0CC0 signal
TT0CCR0 register
If the set value of the TT0CCR1 register is smaller than the set value of the TT0CCR0 register, the INTTT0CC1
signal is generated once per cycle.
FFFFH
D01 D01 D01 D01
16-bit counter
D11 D11 D11 D11
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
If the set value of the TT0CCR1 register is greater than the set value of the TT0CCR0 register, the INTTT0CC1
signal is not generated because the count value of the 16-bit counter and the value of the TT0CCR1 register
do not match.
When the TT0CCR1 register is not used, it is recommended to set its value to FFFFH.
FFFFH
D01 D01 D01 D01
16-bit counter
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal L
8.6.3 External trigger pulse output mode (TT0MD3 to TT0MD0 bits = 0010)
In the external trigger pulse output mode, 16-bit timer/event counter T waits for a trigger when the TT0CTL0.TT0CE bit
is set to 1. When the valid edge of an external trigger input (EVTT0) is detected, 16-bit timer/event counter T starts
counting, and outputs a PWM waveform from the TOT01 pin.
Pulses can also be output by generating a software trigger instead of using the external trigger. When using a software
trigger, a square wave that has the set value of the TT0CCR0 register + 1 as half its cycle can also be output from the
TOT00 pin.
Transfer
TT0CCR0 register
Notes 1. Since the external trigger input pin and external event count input pin are the same alternate-
function pin, the external event count input function cannot be used.
2. Edge detector for external trigger input.
Set by the TT0IOC2.TT0ETS1 and TT0IOC2.TT0ETS0 bits.
3. Edge detector for external event count input.
Set by the TT0IOC2.TT0EES1 and TT0IOC2.TT0EES0 bits.
FFFFH
D0 D0 D0 D0
16-bit counter D1 D1 D1 D1
0000H
TT0CE bit
TT0CCR0 register D0
INTTT0CC0 signal
TT0CCR1 register D1
INTTT0CC1 signal
16-bit timer/event counter T waits for a trigger when the TT0CE bit is set to 1. When the trigger is generated, the 16-bit
counter is cleared from FFFFH to 0000H, starts counting at the same time, and outputs a PWM waveform from the TOT01
pin. If the trigger is generated again while the counter is operating, the counter is cleared to 0000H and restarted. (The
output of the TOT00 pin is inverted. The TOT01 pin outputs a high level regardless of the status (high/low) when a trigger
occurs.)
The active level width, cycle, and duty factor of the PWM waveform can be calculated as follows.
Active level width = (Set value of TT0CCR1 register) × Count clock cycle
Cycle = (Set value of TT0CCR0 register + 1) × Count clock cycle
Duty factor = (Set value of TT0CCR1 register)/(Set value of TT0CCR0 register + 1)
The compare match request signal (INTTT0CC0) is generated the next time the 16-bit counter counts after its count
value matches the value of the CCR0 buffer register, and the 16-bit counter is cleared to 0000H. The compare match
interrupt request signal (INTTT0CC1) is generated when the count value of the 16-bit counter matches the value of the
CCR1 buffer register.
The value set to the TT0CCRn register is transferred to the CCRn buffer register when the count value of the 16-bit
counter matches the value of the CCRn buffer register and the 16-bit counter is cleared to 0000H.
The valid edge of an external trigger input (EVTT0), or setting the software trigger (TT0CTL1.TT0EST bit) to 1 is used
as the trigger ().
Figure 8-23. Setting of Registers in External Trigger Pulse Output Mode (1/2)
0, 0, 1, 0:
External trigger pulse
output mode
Figure 8-23. Setting of Registers in External Trigger Pulse Output Mode (2/2)
Note Set the valid edge selection of the unused alternate external input signals to “No edge detection”.
Remark TMT0 control register 2 (TT0CTL2), TMT0 I/O control register 1 (TT0IOC1), TMT0 I/O control
register 3 (TT0IOC3), TMT0 option register 0 (TT0OPT0), TMT0 option register 1 (TT0OPT1),
and TMT0 counter write register (TT0TCW) are not used in the external trigger pulse output
mode.
Figure 8-24. Software Processing Flow in External Trigger Pulse Output Mode (1/2)
FFFFH
D01 D01 D01
16-bit counter D00 D00 D11 D11 D00
D10 D10 D10 D10
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
Figure 8-24. Software Processing Flow in External Trigger Pulse Output Mode (2/2)
Remark
FFFFH
D01 D01
16-bit counter D00 D00 D00 D11 D11
D10 D10 D10
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
In order to transfer data from the TT0CCRn register to the CCRn buffer register, the TT0CCR1 register must be
written.
To change both the cycle and active level width of the PWM waveform at this time, first set the cycle to the
TT0CCR0 register and then set the active level width to the TT0CCR1 register.
To change only the cycle of the PWM waveform, first set the cycle to the TT0CCR0 register, and then write the
same value (same as preset value of the TT0CCR1 register) to the TT0CCR1 register.
To change only the active level width (duty factor) of the PWM waveform, only the TT0CCR1 register has to be
set.
After data is written to the TT0CCR1 register, the value written to the TT0CCRn register is transferred to the
CCRn buffer register in synchronization with clearing of the 16-bit counter, and is used as the value compared
with the 16-bit counter.
To write the TT0CCR0 or TT0CCR1 register again after writing the TT0CCR1 register once, do so after the
INTTT0CC0 signal is generated. Otherwise, the value of the CCRn buffer register may become undefined
because the timing of transferring data from the TT0CCRn register to the CCRn buffer register conflicts with
writing the TT0CCRn register.
Remark n = 0, 1
Count clock
TT0CE bit
TT0CCR0 register D0 D0 D0
Note Note
INTTT0CC0 signal
Note Note
INTTT0CC1 signal
To output a 100% waveform, set a value of (set value of TT0CCR0 register + 1) to the TT0CCR1 register. If the
set value of the TT0CCR0 register is FFFFH, 100% output cannot be produced.
Count clock
TT0CE bit
TT0CCR0 register D0 D0 D0
TT0CCR1 register D0 + 1 D0 + 1 D0 + 1
Note Note
INTTT0CC0 signal
INTTT0CC1 signal
(c) Conflict between trigger detection and match with CCR1 buffer register
If the trigger is detected immediately after the INTTT0CC1 signal is generated, the 16-bit counter is
immediately cleared to 0000H, the TOT01 pin is asserted, and the counter continues counting. Consequently,
the inactive period of the PWM waveform is shortened.
INTTT0CC1 signal
Shortened
If the trigger is detected immediately before the INTTT0CC1 signal is generated, the INTTT0CC1 signal is not
generated, and the 16-bit counter is cleared to 0000H and continues counting. The output signal of the TOT01
pin remains active. Consequently, the active period of the PWM waveform is extended.
INTTT0CC1 signal
Extended
(d) Conflict between trigger detection and match with CCR0 buffer register
If the trigger is detected immediately after the INTTT0CC0 signal is generated, the 16-bit counter is cleared to
0000H and continues counting up again from that point. Therefore, the active period of the TOT01 pin is
extended by the time from generation of the INTTT0CC0 signal to trigger detection.
INTTT0CC0 signal
Extended
If the trigger is detected immediately before the INTTT0CC0 signal is generated, the INTTT0CC0 signal is not
generated. The 16-bit counter is cleared to 0000H, the TOT01 pin is asserted, and the counter continues
counting. Consequently, the inactive period of the PWM waveform is shortened.
INTTT0CC0 signal
Shortened
Count clock
16-bit counter D1 − 2 D1 − 1 D1 D1 + 1 D1 + 2
TT0CCR1 register D1
Note
TOT01 pin output
Note
INTTT0CC1 signal
Usually, the INTTT0CC1 signal is generated in synchronization with the next count-up, after the count value of
the 16-bit counter matches the value of the TT0CCR1 register.
In the external trigger pulse output mode, however, it is generated one clock earlier. This is because the timing
is changed to match the timing when the output signal of the TOT01 pin changes.
Transfer
TT0CCR0 register
FFFFH
D0 D0 D0
16-bit counter
D1 D1 D1
0000H
TT0CE bit
TT0CCR0 register D0
INTTT0CC0 signal
TT0CCR1 register D1
INTTT0CC1 signal
When the TT0CE bit is set to 1, 16-bit timer/event counter T waits for a trigger. When the trigger is generated, the 16-bit
counter is cleared from FFFFH to 0000H, starts counting, and outputs a one-shot pulse from the TOT01 pin. After the one-
shot pulse is output, the 16-bit counter is cleared to 0000H, stops counting, and waits for a trigger. When the trigger is
generated again, the 16-bit counter starts counting from 0000H. If a trigger is generated again while the one-shot pulse is
being output, it is ignored.
The output delay period and active level width of the one-shot pulse can be calculated as follows.
Output delay period = (Set value of TT0CCR1 register) × Count clock cycle
Active level width = (Set value of TT0CCR0 register − Set value of TT0CCR1 register + 1) × Count clock cycle
The compare match interrupt request signal (INTTT0CC0) is generated the next time the 16-bit counter counts after its
count value matches the value of the CCR0 buffer register. The compare match interrupt request signal (INTTT0CC1) is
generated when the count value of the 16-bit counter matches the value of the CCR1 buffer register.
The valid edge of an external trigger input (EVTT0 pin) or setting the software trigger (TT0CTL1.TT0EST bit) to 1 is
used as the trigger.
0, 0, 1, 1:
One-shot pulse output mode
Note Set the valid edge selection of the unused alternate external input signals to “No edge
detection”.
Remark TMT0 control register 2 (TT0CTL2), TMT0 I/O control register 1 (TT0IOC1), TMT0 I/O control
register 3 (TT0IOC3), TMT0 option register 0 (TT0OPT0), TMT0 option register 1 (TT0OPT1),
and TMT0 counter write register (TT0TCW) are not used in the one-shot pulse output mode.
FFFFH
D00
D01
16-bit counter
D10
D11
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
<1> Count operation start flow <3> Count operation stop flow
The TT0CKS0 to
TT0CKS2 bits can be
set at the same time
TT0CE bit = 1
as when counting starts
(TT0CE bit = 1).
Trigger wait status
As rewriting the
TT0CCRn register
immediately forwards
to the CCRn buffer
Setting of TT0CCR0, TT0CCR1 register, rewriting
registers immediately after
the generation of the
INTTT0CC0 signal
is recommended.
Remark n = 0, 1
Remark n = 0, 1
FFFFH
D00 D00 D00
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
When the TT0CCR0 register is rewritten from D00 to D01 and the TT0CCR1 register from D10 to D11 where D00 >
D01 and D10 > D11, if the TT0CCR1 register is rewritten when the count value of the 16-bit counter is greater
than D11 and less than D10 and if the TT0CCR0 register is rewritten when the count value is greater than D01
and less than D00, each set value is reflected as soon as the register has been rewritten and compared with the
count value. The counter counts up to FFFFH and then counts up again from 0000H. When the count value
matches D11, the counter generates the INTTT0CC1 signal and asserts the TOT01 pin. When the count value
matches D01, the counter generates the INTTT0CC0 signal, deasserts the TOT01 pin, and stops counting.
Therefore, the counter may output a pulse with a delay period or active period different from that of the one-
shot pulse that is originally expected.
Count clock
16-bit counter D1 − 2 D1 − 1 D1 D1 + 1 D1 + 2
TT0CCR1 register D1
Note
TOT01 pin output
Note
INTTT0CC1 signal
Usually, the INTTT0CC1 signal is generated the next time the 16-bit counter counts up after its count value
matches the value of the TT0CCR1 register.
In the one-shot pulse output mode, however, it is generated one clock earlier. This is because the timing is
changed to match the timing the output signal of the TOT01 pin changes.
TT0CCR1 register
Transfer
Output
S
CCR1 buffer register controller TOT01 pin
R (RS-FF)
Match signal
INTTT0CC1 signal
Internal count clock Count Clear
clock
EVTT0 pin selection
Edge Output
(external event 16-bit counter TOT00 pin
detectorNote controller
count input)
Match signal
INTTT0CC0 signal
Transfer
TT0CCR0 register
FFFFH
D01 D01
16-bit counter D00 D00 D00 D11 D11
D10 D10 D10
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
When the TT0CE bit is set to 1, the 16-bit counter is cleared from FFFFH to 0000H, starts counting, and outputs a
PWM waveform from the TOT01 pin.
The active level width, cycle, and duty factor of the PWM waveform can be calculated as follows.
Active level width = (Set value of TT0CCR1 register) × Count clock cycle
Cycle = (Set value of TT0CCR0 register + 1) × Count clock cycle
Duty factor = (Set value of TT0CCR1 register)/(Set value of TT0CCR0 register + 1)
The PWM waveform can be changed by rewriting the TT0CCRn register while the counter is operating. The newly
written value is reflected when the count value of the 16-bit counter matches the value of the CCR0 buffer register and the
16-bit counter is cleared to 0000H.
The compare match interrupt request signal (INTTT0CC0) is generated the next time the 16-bit counter counts after its
count value matches the value of the CCR0 buffer register, and the 16-bit counter is cleared to 0000H. The compare
match interrupt request signal (INTTT0CC1) is generated when the count value of the 16-bit counter matches the value of
the CCR1 buffer register.
The value set to the TT0CCRn register is transferred to the CCRn buffer register when the count value of the 16-bit
counter matches the value of the CCRn buffer register and the 16-bit counter is cleared to 0000H.
Remark n = 0, 1
TT0CTL1 0 0 0/1 0 0 1 0 0
0, 1, 0, 0:
PWM output mode
Remark TMT0 control register 2 (TT0CTL2), TMT0 I/O control register 1 (TT0IOC1), TMT0 I/O control
register 3 (TT0CTL3), TMT0 option register 0 (TT0OPT0), TMT0 option register 1
(TT0OPT1), and TMT0 counter write register (TT0TCW) are not used in the PWM output
mode.
FFFFH
D01 D01 D01
16-bit counter D00 D00 D11 D11 D00
D10 D10 D10 D10
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
Remark n = 0, 1
FFFFH
D01 D01
16-bit counter D00 D00 D00 D11 D11
D10 D10 D10
0000H
TT0CE bit
INTTT0CC0 signal
To transfer data from the TT0CCRn register to the CCRn buffer register, the TT0CCR1 register must be written.
To change both the cycle and active level of the PWM waveform at this time, first set the cycle to the TT0CCR0
register and then set the active level width to the TT0CCR1 register.
To change only the cycle of the PWM waveform, first set the cycle to the TT0CCR0 register, and then write the
same value (same as preset value of the TT0CCR1 register) to the TT0CCR1 register.
To change only the active level width (duty factor) of the PWM waveform, only the TT0CCR1 register has to be
set.
After data is written to the TT0CCR1 register, the value written to the TT0CCRn register is transferred to the
CCRn buffer register in synchronization with clearing of the 16-bit counter, and is used as the value compared
with the 16-bit counter.
To write the TT0CCR0 or TT0CCR1 register again after writing the TT0CCR1 register once, do so after the
INTTT0CC0 signal is generated. Otherwise, the value of the CCRn buffer register may become undefined
because the timing of transferring data from the TT0CCRn register to the CCRn buffer register conflicts with
writing the TT0CCRn register.
Remark n = 0, 1
Count clock
16-bit counter FFFF 0000 D00 − 1 D00 0000 0001 D00 − 1 D00 0000
TT0CE bit
Note Note
INTTT0CC0 signal
Note Note
INTTT0CC1 signal
To output a 100% waveform, set a value of (set value of TT0CCR0 register + 1) to the TT0CCR1 register. If the
set value of the TT0CCR0 register is FFFFH, 100% output cannot be produced.
Count clock
16-bit counter FFFF 0000 D00 − 1 D00 0000 0001 D00 − 1 D00 0000
TT0CE bit
Note Note
INTTT0CC0 signal
INTTT0CC1 signal
Count clock
16-bit counter D1 − 2 D1 − 1 D1 D1 + 1 D1 + 2
TT0CCR1 register D1
Note
TOT01 pin output
Note
INTTT0CC1 signal
Usually, the INTTT0CC1 signal is generated in synchronization with the next count-up after the count value of
the 16-bit counter matches the value of the TT0CCR1 register.
In the PWM output mode, however, it is generated one clock earlier. This is because the timing is changed to
match the timing at which the output signal of the TOT01 pin changes.
Output
TT0CCR1 register TOT01 pinNote 1 output
controller
(compare)
Output
TOT00 pinNote 1 output
controller
TT0CCR0 register
(capture)
TT0CCS0, TT0CCS1 bits
(capture/compare selection)
Notes 1. Because the capture trigger input pins (TIT00, TIT01) and timer output pins (TOT00, TOT01)
are the same alternate-function pins, two functions cannot be used at the same time.
2. Set by the TT0IOC2.TT0EES1 and TT0IOC2.TT0EES0 bits.
3. Set by the TT0IOC1.TT0IS1 and TT0IOC1.TT0IS0 bits.
4. Set by the TT0IOC1.TT0IS3 and TT0IOC1.TT0IS2 bits.
• Compare operation
When the TT0CE bit is set to 1, 16-bit timer/event counter T starts counting, and the output signal of the TOT0n pin is
inverted. When the count value of the 16-bit counter later matches the set value of the TT0CCRn register, a compare
match interrupt request signal (INTTT0CCn) is generated, and the output signal of the TOT0n pin is inverted.
The 16-bit counter continues counting in synchronization with the count clock. When it counts up to FFFFH, it
generates an overflow interrupt request signal (INTTT0OV) at the next clock, is cleared to 0000H, and continues
counting. At this time, the overflow flag (TT0OPT0.TT0OVF bit) is also set to 1. Confirm that the overflow flag is set
to 1 and then clear it to 0 by executing the CLR instruction via software.
The TT0CCRn register can be rewritten while the counter is operating. If it is rewritten, the new value is reflected at
that time by anytime write, and compared with the count value.
FFFFH
D00 D00
D01 D01
16-bit counter
D10 D10
D11 D11 D11
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
INTTT0OV signal
TT0OVF bit
• Capture operation
When the TT0CE bit is set to 1, the 16-bit counter starts counting. When the valid edge input to the TIT0n pin is
detected, the count value of the 16-bit counter is stored in the TT0CCRn register, and a capture interrupt request
signal (INTTT0CCn) is generated.
The 16-bit counter continues counting in synchronization with the count clock. When it counts up to FFFFH, it
generates an overflow interrupt request signal (INTTT0OV) at the next clock, is cleared to 0000H, and continues
counting. At this time, the overflow flag (TT0OPT0.TT0OVF bit) is also set to 1. Confirm that the overflow flag is set
to 1 and then clear it to 0 by executing the CLR instruction via software.
FFFFH
D10 D11
D00 D12 D13
16-bit counter D01
D02
D03
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
INTTT0OV signal
TT0OVF bit
0, 1, 0, 1:
Free-running timer mode
Overflow flag
Specifies if TT0CCR0
register functions as
capture or compare register
0: Compare register
1: Capture register
Specifies if TT0CCR1
register functions as
capture or compare register
0: Compare register
1: Capture register
Remark n = 0, 1
Figure 8-37. Software Processing Flow in Free-Running Timer Mode (Compare Function) (1/2)
FFFFH
D00 D00
D01 D01
16-bit counter
D10 D10
D11 D11 D11
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
INTTT0OV signal
TT0OVF bit
Figure 8-37. Software Processing Flow in Free-Running Timer Mode (Compare Function) (2/2)
START
No
TT0OVF bit = 1
Yes
STOP
Figure 8-38. Software Processing Flow in Free-Running Timer Mode (Capture Function) (1/2)
FFFFH
D10 D11
D00 D12
16-bit counter D01
D02
D03
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
INTTT0OV signal
TT0OVF bit
Cleared to 0 by Cleared to 0 by
<1> CLR instruction CLR instruction <3>
<2> <2>
Figure 8-38. Software Processing Flow in Free-Running Timer Mode (Capture Function) (2/2)
START
No
TT0OVF bit = 1
Yes
STOP
FFFFH
D02
D10
D00
16-bit counter D11 D03
D01 D12
D04
D13
0000H
TT0CE bit
INTTT0CC0 signal
Interval period Interval period Interval period Interval period Interval period
(D00 + 1) (10000H + (D02 − D01) (10000H + (10000H +
D01 − D00) D03 − D02) D04 − D03)
INTTT0CC1 signal
When performing an interval operation in the free-running timer mode, two intervals can be set with one
channel.
To perform the interval operation, the value of the corresponding TT0CCRn register must be re-set in the
interrupt servicing that is executed when the INTTT0CCn signal is detected.
The set value for re-setting the TT0CCRn register can be calculated by the following expression, where “Da” is
the interval period.
FFFFH
D02
D10
D00
16-bit counter D11 D03
D01 D12
D04
D13
0000H
TT0CE bit
INTTT0CC0 signal
Pulse interval Pulse interval Pulse interval Pulse interval Pulse interval
(D00) (10000H + (D02 − D01) (10000H + (10000H +
D01 - D00) D03 − D02) D04 − D03)
INTTT0CC1 signal
INTTT0OV signal
TT0OVF bit
When executing pulse width measurement in the free-running timer mode, two pulse widths can be measured
with one channel.
To measure a pulse width, the pulse width can be calculated by reading the value of the TT0CCRn register in
synchronization with the INTTT0CCn signal, and calculating the difference between the read value and the
previously read value.
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TT0CE bit
INTTT0OV signal
TT0OVF bit
The following problem may occur when two pulse widths are measured in the free-running timer mode.
<1> Read the TT0CCR0 register (setting of the default value of the TIT00 pin input).
<2> Read the TT0CCR1 register (setting of the default value of the TIT01 pin input).
<3> Read the TT0CCR0 register.
Read the overflow flag. If the overflow flag is 1, clear it to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<4> Read the TT0CCR1 register.
Read the overflow flag. Because the flag is cleared in <3>, 0 is read.
Because the overflow flag is 0, the pulse width can be calculated by (D11 − D10) (incorrect).
When two capture registers are used, and if the overflow flag is cleared to 0 by one capture register, the other
capture register may not obtain the correct pulse width.
Use software when using two capture registers. An example of how to use software is shown below.
(1/2)
Example when two capture registers are used (using overflow interrupt)
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TT0CE bit
INTTT0OV signal
TT0OVF bit
TT0OVF0 flagNote
TT0OVF1 flagNote
Note The TT0OVF0 and TT0OVF1 flags are set on the internal RAM by software.
<1> Read the TT0CCR0 register (setting of the default value of the TIT00 pin input).
<2> Read the TT0CCR1 register (setting of the default value of the TIT01 pin input).
<3> An overflow occurs. Set the TT0OVF0 and TT0OVF1 flags to 1 in the overflow interrupt servicing,
and clear the overflow flag to 0.
<4> Read the TT0CCR0 register.
Read the TT0OVF0 flag. If the TT0OVF0 flag is 1, clear it to 0.
Because the TT0OVF0 flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<5> Read the TT0CCR1 register.
Read the TT0OVF1 flag. If the TT0OVF1 flag is 1, clear it to 0 (the TT0OVF0 flag is cleared in
<4>, and the TT0OVF1 flag remains 1).
Because the TT0OVF1 flag is 1, the pulse width can be calculated by (10000H + D11 − D10)
(correct).
<6> Same as <3>
(2/2)
Example when two capture registers are used (without using overflow interrupt)
FFFFH
D11
D10
16-bit counter
D00 D01
0000H
TT0CE bit
INTTT0OV signal
TT0OVF bit
TT0OVF0 flagNote
TT0OVF1 flagNote
Note The TT0OVF0 and TT0OVF1 flags are set on the internal RAM by software.
<1> Read the TT0CCR0 register (setting of the default value of the TIT00 pin input).
<2> Read the TT0CCR1 register (setting of the default value of the TIT01 pin input).
<3> An overflow occurs. Nothing is done by software.
<4> Read the TT0CCR0 register.
Read the overflow flag. If the overflow flag is 1, set only the TT0OVF1 flag to 1, and clear the
overflow flag to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + D01 − D00).
<5> Read the TT0CCR1 register.
Read the overflow flag. Because the overflow flag is cleared in <4>, 0 is read.
Read the TT0OVF1 flag. If the TT0OVF1 flag is 1, clear it to 0.
Because the TT0OVF1 flag is 1, the pulse width can be calculated by (10000H + D11 − D10)
(correct).
<6> Same as <3>
FFFFH
Da0
16-bit counter
Da1
0000H
TT0CE bit
INTTT0OV signal
TT0OVF bit
Pulse width
The following problem may occur when long pulse width is measured in the free-running timer mode.
<1> Read the TT0CCRn register (setting of the default value of the TIT0n pin input).
<2> An overflow occurs. Nothing is done by software.
<3> An overflow occurs a second time. Nothing is done by software.
<4> Read the TT0CCRn register.
Read the overflow flag. If the overflow flag is 1, clear it to 0.
Because the overflow flag is 1, the pulse width can be calculated by (10000H + Da1 − Da0)
(incorrect).
Actually, the pulse width must be (20000H + Da1 − Da0) because an overflow occurs twice.
Remark n = 0, 1
If an overflow occurs twice or more when the capture trigger interval is long, the correct pulse width may not be
obtained.
If the capture trigger interval is long, slow the count clock to lengthen one cycle of the 16-bit counter, or use
software. An example of how to use software is shown next.
FFFFH
Da0
16-bit counter
Da1
0000H
TT0CE bit
INTTT0OV signal
TT0OVF bit
Overflow 0H 1H 2H 0H
counterNote
Pulse width
Note The overflow counter is set arbitrarily by software on the internal RAM.
<1> Read the TT0CCRn register (setting of the default value of the TIT0n pin input).
<2> An overflow occurs. Increment the overflow counter and clear the overflow flag to 0 in the
overflow interrupt servicing.
<3> An overflow occurs a second time. Increment the overflow counter and clear the overflow flag to 0
in the overflow interrupt servicing.
<4> Read the TT0CCRn register.
Read the overflow counter.
→ When the overflow counter is “N”, the pulse width can be calculated by (N × 10000H + Da1 –
Da0).
In this example, the pulse width is (20000H + Da1 – Da0) because an overflow occurs twice.
Clear the overflow counter (0H).
Remark n = 0, 1
Clear
FFFFH
16-bit counter
0000H
TT0CE bit
INTTT0CCn signal
INTTT0OV signal
Cleared to 0 by
TT0OVF bit CLR instruction
Remark n = 0, 1
When the TT0CE bit is set to 1, the 16-bit counter starts counting. When the valid edge input to the TIT0n pin is later
detected, the count value of the 16-bit counter is stored in the TT0CCRn register, the 16-bit counter is cleared to 0000H,
and a capture interrupt request signal (INTTT0CCn) is generated.
The pulse width is calculated as follows.
If the valid edge is not input to the TIT0n pin even when the 16-bit counter counted up to FFFFH, an overflow interrupt
request signal (INTTT0OV) is generated at the next count clock, and the counter is cleared to 0000H and continues
counting. At this time, the overflow flag (TT0OPT0.TT0OVF bit) is also set to 1. Clear the overflow flag to 0 by executing
the CLR instruction via software.
If the overflow flag is set to 1, the pulse width can be calculated as follows.
Pulse width = (10000H × TT0OVF bit set (1) count + Captured value) × Count clock cycle
Remark n = 0, 1
0, 1, 1, 0:
Pulse width measurement mode
Overflow flag
Remark TMT0 control register 2 (TT0CTL2), TMT0 I/O control register 0 (TT0IOC0), TMT0 I/O control
register 3 (TT0IOC3), TMT0 option register 1 (TT0OPT1), and TMT0 counter write register
(TT0TCW) are not used in the pulse width measurement mode.
FFFFH
16-bit counter
0000H
TT0CE bit
INTTT0CC0 signal
<1> <2>
START
STOP
TT0CCR1 register
Transfer
Output
S
CCR1 buffer register controller TOT01 pin
R (RS-FF)
Match signal
INTTT0CC1 signal
Clear
Internal count clock Count
clock
EVTT0 pin selection Output
Edge TOT00 pin
(external event 16-bit counter
detectorNote controller
count input)
Match signal
INTTT0CC0 signal
Transfer
TT0CCR0 register
FFFFH
D00 D02
0000H
TT0CE bit
INTTT0CC0 signal
INTTT0CC1 signal
INTTT0OV signal
The 16-bit counter is cleared from FFFFH and 0000H and starts counting when the TT0CE bit is set to 1. The triangular
PWM waveform is output from the TOT01 pin.
In the triangular-wave PWM output mode, the counter counts up or down. When the 16-bit counter reaches 0000H
while it is counting down, an overflow interrupt request signal (INTTT0OV) is generated. At this time, the
TT0OPT0.TT0OVF bit is not set to 1. If the count value of the 16-bit counter matches the value of the CCR0 buffer register
while the counter is counting up, a compare match interrupt request signal (INTTT0CC0) is generated.
The counting direction is changed from up to down when the value of the 16-bit counter matches that of the CCR0
buffer register, and from down to up when the counter is cleared to 0000H.
The PWM waveform can be changed by rewriting the TT0CCRn register during operation. To change the PWM
waveform during operation, write the TT0CCR1 register last.
The cycle of the triangular PWM waveform is set by the TT0CCR0 register and its duty factor is set by the TT0CCR1
register. Set a value to the TT0CCR0 register in a range of “0 ≤ TT0CCR0 ≤ FFFEH”. The rewritten value is reflected
when the 16-bit counter reaches 0000H while it is counting down.
Even when changing only the cycle of the PWM waveform, first set a period to the TT0CCR0 register, and then write
the same value (value same as that set to the TT0CCR1 register) to the TT0CCR1 register.
To transfer data from the TT0CCRn register to the CCRn buffer register, the data must be written to the TT0CCR1
register (n = 0, 1).
• When the value of the 16-bit counter matches the value of the compare register (the TT0CTL2.TT0ECM1 and
TT0CTL2.TT0ECM0 bits are set)
• When the edge of the encoder clear input signal (TECR0) is detected (the TT0ECS1 and TT0ECS0 bits are set
when the TT0IOC3.TT0SCE bit = 0)
• When the clear level condition of the TENC00, TENC01, and TECR0 pins is detected (the TT0ZCL, TT0BCL, and
TT0ACL bits are set when the TT0SCE bit = 1)
Remark n = 0, 1
Mode TT0UDS1, TT0ECM1 Bit TT0ECM0 Bit TT0LDE Bit Counter Clear Transfer to
TT0UDS0 Bits (<2>) (<2>) (<3>) (Target Compare Counter
(<1>) Register)
Encoder compare Can be set to 00, 0 0 0 − −
mode 01, 10, or 11. 1 Possible
1 0 TT0CCR0 −
Note
1 Possible
1 0 Invalid TT0CCR1 −
1 Invalid TT0CCR0, −
TT0CCR1
Note The counter can operate in a range from 0000H to the set value of the TT0CCR0 register.
Remark Detecting the edge of the TENC00 pin is specified by the TT0IOC3.TT0EIS1 and TT0EIS0
bits.
Figure 8-45. Operation Example (When Valid Edge of TENC00 Pin Is Specified to Be Rising Edge
and No Edge Is Specified as Valid Edge of TENC01 Pin)
TENC00
TENC01
Remark Detecting the edges of the TENC00 and TENC01 pins is specified by the
TT0IOC3.TT0EIS1 and TT0IOC3.TT0EIS0 bits.
Figure 8-46. Operation Example (When Rising Edge Is Specified as Valid Edges of TENC00 and TENC01 Pins)
TENC00
TENC01
Caution Specification of the valid edges of the TENC00 and TENC01 pins is invalid.
Figure 8-47. Operation Example (Count Operation When Valid Edges of TENC00 and TENC01 Pins do not Overlap)
TENC00
TENC01
16-bit counter 0007H 0006H 0005H 0006H 0005H 0006H 0005H 0006H 0007H
Figure 8-48. Operation Example (Count Operation When Valid Edges of TENC00 and TENC01 Pins Overlap)
TENC00
TENC01
Caution Specification of the valid edges of the TENC00 and TENC01 pins is invalid.
Figure 8-49. Operation Example (Count Operation When Valid Edges of TENC00 and TENC01 Pins do not Overlap)
TENC00
TENC01
16-bit counter 0003H 0004H 0005H 0006H 0007H 0008H 0009H 000AH 0009H 0008H 0007H 0006H 0005H
Figure 8-50. Operation Example (Count Operation When Valid Edges of TENC00 and TENC01 Pins Overlap)
TENC00
TENC01
16-bit counter 0003H 0004H 0005H 0006H 0007H 0008H 0007H 0006H 0005H 0006H
<2> TT0ECM1 and TT0ECM0 bits: Timer/counter clear function upon match of the compare register
The 16-bit counter performs its count operation in accordance with the set value of the TT0ECM1 and
TT0ECM0 bits when the count value of the counter matches the value of the CCRn buffer register.
The 16-bit counter performs a count operation under the following condition when its count value
matches the value of the CCR1 buffer register.
<3> TT0LDE bit: Transfer function of the set value of the TT0CCR0 register to the 16-bit counter when the
counter underflows
When the TT0LDE bit = 1, the set value of the TT0CCR0 register can be transferred to the 16-bit counter
when the counter underflows.
The TT0LDE bit is valid only in the encoder compare mode.
• Count operation in range from 0000H to set value of the TT0CCR0 register
If the 16-bit counter performs a count operation when the TT0LDE bit = 1 and TT0ECM1 and TT0ECM0
bits = 01, and when the count value of the counter matches the set value of the CCR0 buffer register
when the TT0ECM0 bit = 1, the 16-bit counter is cleared to 0000H if the next count operation is
counting up.
If the 16-bit counter underflows when the TT0LDE bit = 1, the set value of the TT0CCR0 register is
transferred to the counter.
Therefore, the counter can operate in a range from 0000H to the set value of the TT0CCR0 register in
which the upper-limit count value is the set value of the TT0CCR0 register and the lower-limit value is
0000H.
Figure 8-51. Operation Example (Count Operation in Range from 0000H to Set Value of TT0CCR0 Register)
16-bit counter
0000H
Figure 8-52. Operation Timing (Count Operation in Range from 0000H to Set Value of TT0CCR0 Register)
Peripheral clock
Count
timing signal
H = down counting
TT0ESF bit
TT0CCR0 register N
INTTT0CC0 signal
TT0EOF bit L
TT0EUF bit
INTTT0OV signal
(6) Function to clear counter to 0000H by encoder clear signal (TECR0 pin)
The 16-bit counter can be cleared to 0000H by the input signal of the TECR0 pin in two ways which are selected by
the TT0IOC3.TT0SCE bit. The TT0SCE bit also controls, depending on its setting, the TT0IOC3.TT0ZCL,
TT0IOC3.TT0BCL, TT0IOC3.TT0ACL, TT0IOC3.TT0ESC1, and TT0IOC3.TT0ECS0 bits.
The counter can be cleared by the methods described below only in the encoder compare mode.
Table 8-9. Relationship Between TT0SCE Bit and TT0ZCL, TT0BCL, TT0ACL, TT0ECS1, and TT0ECS0 Bits
Clearing Method TT0SCE Bit TT0ZCL Bit TT0BCL Bit TT0ACL Bit TT0ECS1, TT0ECS0 Bits
<1> 0 Invalid Invalid Invalid Valid
<2> 1 Valid Valid Valid Invalid
(a) Clearing method <1>: By detecting edge of encoder clear signal (TECR0 pin) (TT0SCE bit = 0)
When the TT0SCE bit = 0, the 16-bit counter is cleared to 0000H in synchronization with the peripheral clock if
the valid edge of the TECR0 pin specified by the TT0ECS1 and TT0ECS0 bits is detected. At this time, an
encoder clear interrupt request signal (INTTT0EC) is generated. When the TT0SCE bit = 0, the settings of the
TT0ZCL, TT0BCL, and TT0ACL bits is invalid.
Figure 8-53. Operation Example (When TT0SCE Bit = 0, TT0ECS1 and TT0ECS0 Bits = 01, and TT0UDS1 and
TT0UDS0 Bits = 11)
Encoder input
(TENC00 pin input)
Encoder input
(TENC01 pin input)
Encoder clear input
(TECR0 pin input)
Peripheral clock
Count
timing signal
INTTT0EC
interrupt
Counter clear
(b) Clearing method <2>: By detecting clear level condition of the TENC00, TENC01, and TECR0 pins
(TT0SCE bit = 1)
When the TT0SCE bit = 1, the 16-bit counter is cleared to 0000H if the clear level condition of the TECR0,
TENC00, or TENC01 pin specified by the TT0ZCL, TT0BCL, and TT0ACL bits is detected. At this time, the
encoder clear interrupt request signal (INTTT0EC) is not generated. The settings of the TT0ECS1 and
TT0ECS0 bits is invalid when the TT0SCE bit = 1.
0 0 0 L L L
0 0 1 L L H
0 1 0 L H L
0 1 1 L H H
1 0 0 H L L
1 0 1 H L H
1 1 0 H H L
1 1 1 H H H
Caution The 16-bit counter is cleared to 0000H when the clear level condition of the TT0ZCL, TT0BCL, and
TT0ACL bits match the input level of the TECR0, TENC01, or TENC00 pin.
Figure 8-54. Operation Example (When TT0SCE Bit = 1, TT0ZCL Bit = 1, TT0BCL Bit = 0, TT0ACL Bit = 1, TT0UDS1 and
TT0UDS0 Bits = 11, TECR0 = High Level, TENC01 = Low Level, and TENC00 = High Level) (1/3)
(i) If inputting the high level to the TECR0 pin lags behind inputting the low level to the TENC01 pin
while the counter is counting up, the counter is cleared after it counts up.
Encoder input H
(TENC00 pin input)
Encoder input
L
(TENC01 pin input)
Encoder clear input
H
(TECR0 pin input)
Peripheral clock
Clear signal
Count timing
signal
INTTT0CC1 signal
INTTT0CC0 signal
Figure 8-54. Operation Example (When TT0SCE Bit = 1, TT0ZCL Bit = 1, TT0BCL Bit = 0, TT0ACL Bit = 1, TT0UDS1 and
TT0UDS0 Bits = 11, TECR0 = High Level, TENC01 = Low Level, and TENC00 = High Level) (2/3)
(ii) If the high level is input to the TECR0 pin at the same time as the low level is input to the TECN01 pin
while the counter is counting up, the counter is cleared without counting up.
Encoder input H
(TENC00 pin input)
Encoder input
L
(TENC01 pin input)
Encoder clear input
H
(TECR0 pin input)
Peripheral clock
Clear signal
Count
timing signal
(iii) If the high level is input to the TECR0 pin earlier than the low level is input to the TENC01 pin while
the counter is counting up, the counter is cleared without counting up.
Encoder input H
(TENC00 pin input)
Encoder input
L
(TENC01 pin input)
Encoder clear input
H
(TECR0 pin input)
Peripheral clock
Clear signal
Count
timing signal
Figure 8-54. Operation Example (When TT0SCE Bit = 1, TT0ZCL Bit = 1, TT0BCL Bit = 0, TT0ACL Bit = 1, TT0UDS1 and
TT0UDS0 Bits = 11, TECR0 = High Level, TENC01 = Low Level, and TENC00 = High Level) (3/3)
(iv) If the high level is input to the TECR0 pin later than the low level is input to the TENC01 pin while the
counter is counting up, the counter is cleared after it counts up.
Encoder input H
(TENC00 pin input)
Encoder input
L
(TENC01 pin input)
Encoder clear input
H
(TECR0 pin input)
Peripheral clock
Clear signal
Count
timing signal
INTTT0CC1 signal
INTTT0CC0 signal
If the counter is cleared in this way, a miscount does not occur even if inputting the signal to the TECR0 pin is
late, because the clear level condition of the TECR0, TENC01, and TENC00 pins is set and the 16-bit counter
is cleared to 0000H when the clear level condition is detected.
(a) If compare match interrupt is not generated immediately after operation is started
If a value which is the same as that of the TT0TCW register is set to the TT0CCR0 or TT0CCR1 register and
the counter operation is started when the TT0CTL2.TT0ECC bit = 0, and if the count value (TT0TCW) of the
16-bit counter matches the value of the CCRn buffer register immediately after the start of the operation, the
match is masked and the compare match interrupt request signal (INTTT0CCn) is not generated (n = 0, 1). In
addition, the 16-bit counter is not cleared to 0000H by setting the TT0CTL2.TT0ECM1 and
TT0CTL2.TT0ECM0 bits.
Count clock
TT0CE bit
Peripheral clock
Count
timing signal
Count clock
TT0CE bit
Peripheral clock
Count
timing signal
Count
up/down signal L = Count up
TT0ECC bit H
Hold
Overflow does
INTTT0OV signal not occur.
TT0EOF bit
START
TT0CE bit = 1
Encoder compare mode operation processing : See Figure 9-56 Encoder Compare Mode Operation Processing.
No
Operation end?
Yes
TT0CE bit = 0
END
Yes
Count down
Which count operation?
Count up
No No
TT0ECM0 = 1? TT0ECM1 = 1?
(TT0CTL2) (TT0CTL2)
Yes Yes
Yes Yes
16-bit counter cleared 16-bit counter cleared
and started. and started.
INTTT0CC0 signal generated. INTTT0CC1 signal generated.
TT0LDE = 1? No
(TT0CTL2)
Yes
No
Underflow?
Yes
TT0CCR0 set value
transferred to 16-bit counter.
INTTT0CC0 signal generated.
TT0SCE = 1? No
(TT0IOC3)
Yes
Yes Yes
16-bit counter cleared
16-bit counter cleared
and started.
and started.
INTTIEC0 signal generated.
FFFFH
CM01
CM02
CM03 CM03
Clear Transfer
CM11
Clear Clear
0000H
INTTT0CC0 signal
INTTT0CC1 signal
TT0ESF bit
INTTT0OV signal
TT0EOF bit L
TT0EUF bit
When the 16-bit counter starts operating (TT0CE bit = 0 → 1), the set value of the TT0TCW register is
transferred to the counter and the 16-bit counter starts operating.
When the count value of the counter matches the value of the CCR0 buffer register, the compare match
interrupt request signal (INTTT0CC0) is generated. Because the TT0ECM0 bit = 1, the 16-bit counter is
cleared to 0000H if the next count operation is counting up.
When the count value of the 16-bit counter matches the value of the CCR1 buffer register, the compare match
interrupt request signal (INTTT0CC1) is generated. Because the TT0ECM1 bit = 0, the 16-bit counter is not
cleared to 0000H when its value matches that of the CCR1 buffer register.
When the TT0LDE bit = 1 and TT0ECM0 bit = 1, the counter can operate in a range from 0000H to the set
value of the TT0CCR0 register.
Underflow Overflow
FFFFH
CM10
CM02
CM01 CM01
0000H
INTTT0CC0 signal
INTTT0CC1 signal
TT0ESF bit
INTTT0OV signal
TT0EOF bit
TT0EUF bit
When the 16-bit counter starts operating (TT0CE bit = 0 → 1), the set value of the TT0TCW register is
transferred to the 16-bit counter and the counter starts operating.
When the count value of the 16-bit counter matches the value of the CCR0 buffer register, a compare match
interrupt request signal (INTTT0CC0) is generated.
When the count value of the 16-bit counter matches the value of the CCR1 buffer register, a compare match
interrupt request signal (INTTT0CC1) is generated.
The 16-bit counter is not cleared to 0000H even when its count value matches the value of the CCRn buffer
register because the TT0ECM1 and TT0ECM0 bits = 00 (n = 0, 1).
CM01 CM01
CM02
TT0CNT register
CM00 CM11
0000H Clear
INTTT0CC0 signal
INTTT0CC1 signal
TT0ESF bit
INTTT0OV signal
TT0EOF bit
TT0EUF bit
When the 16-bit counter starts operating (TT0CE bit = 0 → 1), the set value of the TT0TCW register is
transferred to the 16-bit counter and the counter starts operating.
When the count value of the 16-bit counter matches the value of the CCR0 buffer register, a compare match
interrupt request signal (INTTT0CC0) is generated. At this time, the 16-bit counter is cleared to 0000H if the
next count operation is counting up.
When the count value of the 16-bit counter matches the value of the CCR1 buffer register, a compare match
interrupt request signal (INTTT0CC1) is generated. At this time, the 16-bit counter is cleared to 0000H if the
next count operation is counting down.
9.1 Overview
• Interval function
• 8 clocks selectable
• 16-bit counter × 1
(Not available to counter lead in timer count operation.)
• Compare register × 1
(Not available to write compare register in timer count operation.)
• Compare match interrupt × 1
TMMn supports only the clear & start mode. The free-running timer mode is not supported.
Remark n = 0 to 3
9.2 Configuration
Item Configuration
Internal bus
TMnCTL0
TMnCE TMnCKS2 TMnCKS1TMnCKS0 TMnCMP0
Match
INTTMnEQ0
fXX/2
fXX/4
fXX/8
Selector
fXX/16
Note Controller 16-bit counter
fXX/64 Clear
fXX/256
fXX/512
fXX/1024
Note In case of TMM0, fXX, fXX/2, fXX/4, fXX/64, fXX/512, fXX/1024, fR, fXT
TMnCMP0
(n = 0 to 3)
9.3 Registers
Remark n = 0 to 3
<7> 6 5 4 3 2 1 0
TMnCTL0 TMnCE 0 0 0 0 TMnCKS2 TMnCKS1 TMnCKS0
(n = 0 to 3)
TMnCE Internal clock operation enable/disable specification
0 TMMn operation disabled (16-bit counter reset asynchronously).
Operation clock application stopped.
1 TMMn operation enabled. Operation clock application started. TMMn
operation started.
Internal clock control and internal circuit reset for TMMn are performed asynchronously
using the TMnCE bit. When the TMnCE bit is cleared to 0, the internal clock of TMMn
is disabled (fixed to low level) and 16-bit counter is reset asynchronously.
(m = 0)
TMmCKS2 TMmCKS1 TMmCKS0 Count clock selection
fXX = 48 MHz fXX = 32 MHz fXX = 24 MHz
0 0 0 fXX 20.8 ns 31.3 ns 41.7 ns
0 0 1 fXX/2 41.7 ns 62.5 ns 83.3 ns
0 1 0 fXX/4 83.3 ns 125 ns 167 ns
0 1 1 fXX/64 1.33 μ s 2.00 μ s 2.67 μ s
1 0 0 fXX/512 10.7 μ s 16.0 μ s 21.3 μ s
1 0 1 fXX/1024 21.3 μ s 32.0 μ s 42.7 μ s
1 1 0 fR/8 36.4 μ s 36.4 μ s 36.4 μ s
1 1 1 fXT 30.5 μ s 30.5 μ s 30.5 μ s
(m = 1 to 3)
TMmCKS2 TMmCKS1 TMmCKS0 Count clock selection
fXX = 48 MHz fXX = 32 MHz fXX = 24 MHz
0 0 0 fXX/2 41.7 ns 62.5 ns 83.3 ns
0 0 1 fXX/4 83.3 ns 125 ns 167 ns
0 1 0 fXX/8 167 ns 250 ns 333 ns
0 1 1 fXX/16 333 ns 500 ns 667 ns
1 0 0 fXX/64 1.33 μ s 2.00 μ s 2.67 μ s
1 0 1 fXX/256 5.33 μ s 8.00 μ s 10.7 μ s
1 1 0 fXX/512 10.7 μ s 16.0 μ s 21.3 μ s
1 1 1 fXX/1024 21.3 μ s 32.0 μ s 42.7 μ s
Cautions 1. Set the TMnCKS2 to TMnCKS0 bits when the TMnCE bit = 0.
When changing the value of TMnCE from 0 to 1, it is not possible to set
the value of the TMnCKS2 to TMnCKS0 bits simultaneously.
2. Be sure to clear bits 3 to 6 to “0”.
9.4 Operation
Clear
Count clock
16-bit counter INTTMnEQ0 signal
selection
Match signal
Remark n = 0 to 3
FFFFH
D D D D
16-bit counter
0000H
TMnCE bit
TMnCMP0 register D
INTTMnEQ0 signal
Remark n = 0 to 3
When the TMnCE bit is set to 1, the value of the 16-bit counter is cleared from FFFFH to 0000H in synchronization with
the count clock, and the counter starts counting.
When the count value of the 16-bit counter matches the value of the TMnCMP0 register, the 16-bit counter is cleared to
0000H and a compare match interrupt request signal (INTTMnEQ0) is generated.
The interval can be calculated by the following expression.
Remark n = 0 to 3
FFFFH
D D D
16-bit counter
0000H
TMnCE bit
TMnCMP0 register D
INTTMnEQ0 signal
<1> <2>
START
STOP
Remark n = 0 to 3
Count clock
TMnCE bit
INTTMnEQ0 signal
Remark n = 0 to 3
FFFFH
N
16-bit counter
0000H
TMnCE bit
TMnCMP0 register N
INTTMnEQ0 signal
Remark n = 0 to 3
9.4.2 Cautions
(1) It takes the 16-bit counter up to the following time to start counting after the TMnCTL0.TMnCE bit is set to 1,
depending on the count clock selected.
(n = 0)
Selected Count Clock Maximum Time Before Counting Start
fXX 2/fXX
fXX/2 3/fXX
fXX/4 6/fXX
fXX/64 128/fXX
fXX/512 1024/fXX
fXX/1024 2048/fXX
fR/8 16/fR
fXT 2/fXT
(n = 1 to 3)
Selected Count Clock Maximum Time Before Counting Start
fXX/2 4/fXX
fXX/4 6/fXX
fXX/8 12/fXX
fXX16 32/fXX
fXX/64 128/fXX
fXX/256 512/fXX
fXX/512 1024/fXX
fXX/1024 2048/fXX
(2) Rewriting the TMnCMP0 and TMnCTL0 registers is prohibited while TMMn is operating.
If these registers are rewritten while the TMnCE bit is 1, the operation cannot be guaranteed.
If they are rewritten by mistake, clear the TMnCTL0.TMnCE bit to 0, and re-set the registers.
Remark n = 0 to 3
Timer AB1 (TAB1) and the TMQ0 option (TMQOP0) can be used as an inverter function that controls a motor. It
performs a tuning operation with timer AA4 (TAA4) and A/D conversion of the A/D converter can be started when the value
of TAB1 matches the value of TAA4. The following operations can be performed as motor control functions.
• 6-phase PWM output function with 16-bit resolution (with dead-timer, for upper and lower arms)
• Timer tuning operation function (tunable with TAA4)
• Cycle setting function (cycle can be changed during operation of crest or valley interrupt)
• Compare register rewriting: Anytime rewrite, batch rewrite, or intermittent rewrite (selectable during TAB1 operation)
• Interrupt and transfer culling functions
• Dead-time setting function
• A/D trigger timing function of the A/D converter (four types of timing can be generated)
• 0% output and 100% output available
• 0% output and 100% output selectable by crest interrupt and valley interrupt
• Forcible output stop function
• When valid edge detected by external pin input (INTP09/TOAB1OFF, INTP16/TOAA1OFF)
• When main clock oscillation stop detected by clock monitor function
10.2 Configuration
Item Configuration
Timer register Dead-time counters
Compare register TAB1 dead-time compare register (TAB1DTC register)
Control registers TAB1 option register 1 (TAB1OPT1)
TAB1 option register 2 (TAB1OPT2)
TAB1 I/O control register 3 (TAB1IOC3)
High-impedance output control register 0 (HZA0CTL0)
High-impedance output control register 1 (HZA0CTL1)
• 6-phase PWM output can be produced with dead time by using the output of TAB1 (TOAB11, TOAB12, TOAB13).
• The output level of the 6-phase PWM output can be set individually.
• The 16-bit timer/counter of TAB1 counts up/down triangular waves. When the timer/counter underflows and when a
cycle match occurs, an interrupt is generated. Interrupt generation, however, can be suppressed up to 31 times.
• TAA4 can execute counting at the same time as TAB1 (timer tuning operation function). TAA4 can be set in three
ways as it can generate an A/D trigger source (TABTADT0) and two types of interrupts: a TAB1 underflow interrupt
(INTTAB1OV) and a cycle match interrupt (INTTAB1CC0).
TOAB10
TAB1 TOAB1T1
TMQ option
• Carrier
• 3-phase PWM • 6-phase PWM TOAB1B1
generation generation with
dead time from
3-phase PWM TOAB1T2
TAA4 • Culling control
• A/D trigger • A/D trigger selection
generation in TOAB1B2
synchronization
with TAB1
TOAB1T3
TAA1
TOAB1B3
• PWM generation
TOAA11
High-impedance
output
controller Noise
elimination INTP16/TOAB1OFF
Noise INTP09/TOAA1OFF
elimination
Crest interrupt
(INTTAB1CC0)
A/D trigger of A/D converter
INTC Valley interrupt
(INTTAB1OV)
• Interrupt control
Edge detection
Edge detection
Internal bus
TOAB10
TABnDTC
(10-bit dead-time value) High-impedance
output controller
Channel 2 TOAB1T2
TOAB12Note
(internal TOAB1B2
signal)
Channel 3 TOAB1T3
TOAB13Note
(internal
signal) TOAB1B3
INTTAB1CC0
Counter
Mask
control
Up/down selection
TAA4 TABTADT0
INTTAA4CC0
INTTAA4CC1
Caution When generating a dead-time period, set the TAB1DTC register to 1 or higher.
Note, when the operation is stopped (TAB1CTL0.TAB1CE bit = 0), a dead-time period is not
generated, so the output levels of the TOAB1T1 to TOAB1T3 and TOAB1B1 to TOAB1B3 pins are
in their default states. Therefore, for the protection of the system, take measures such as making
the TOAB1T1 to TOAB1T3 and TOAB1B1 to TOAB1B3 pins go into a high-impedance state before
stopping operation, or setting the output levels of the pins before switching port modes.
When a dead-time period is not needed, set the TAB1DTC register to 0.
15 10 9 0
TAB1DTC 000000 TAB1DTC9 to TAB1DTC0
Remarks 1. The operation differs when the TAB1OPT2.TAB1DTM bit = 1. For details, see 10.4.2 (4) Automatic
dead-time width narrowing function (TAB1OPT2.TAB1DTM bit = 1).
2. m = 1 to 3
<7> <6> 5 4 3 2 1 0
TAB1OPT1 TAB1ICE TAB1IOE 0 TAB1ID4 TAB1ID3 TAB1ID2 TAB1ID1 TAB1ID0
(1/2)
Cautions 1. When using interrupt culling (the TAB1OPT1.TAB1ID4 to TAB1OPT1.TAB1ID0 bits are
set to other than 00000), be sure to set the TAB1RDE bit to 1.
This means that interrupts and transfers are generated at the same timing. Interrupts
and transfers, cannot be set separately. If interrupts and transfers are set separately
(TAB1RDE bit = 0), transfers are not performed normally.
2. When generating a dead-time period, set the TAB1DTC register to 1 or higher.
Note, when the operation is stopped (TAB1CTL0.TAB1CE bit = 0), a dead-time period is
not generated, so the output levels of the TOAB1T1 to TOAB1T3 and TOAB1B1 to
TOAB1B3 pins are in their default states. Therefore, for the protection of the system,
take measures such as making the TOAB1T1 to TOAB1T3 and TOAB1B1 to TOAB1B3
pins go into a high-impedance state before stopping operation, or setting the output
levels of the pins before switching port modes.
When a dead-time period is not needed, set the TAB1DTC register to 0.
(2/2)
Note For the setting of the TAB1AT3 to TAB1AT0 bits, see CHAPTER 14 A/D CONVERTER.
Caution Set the TAB1IOC3 register to the reset value (A8H) when the timer is used in a mode other than
the 6-phase PWM output mode.
Remarks 1. Set the output level of the TOAB1Tm pin by using the TAB1IOC0 register.
2. m = 1 to 3
Figure 10-3. Output Control of TOAB1Tm and TOAB1Bm Pins (Without Dead Time)
16-bit
counter
Remark m = 1 to 3
Remark m = 1 to 3
Remark m = 1 to 3
Caution High impedance control is performed only when the target port is specified as a target pin in the
above table.
Remark n = 0, 1
(1/2)
(n = 0, 1)
HZA0DCEn High-impedance output control
0 Disable high-impedance output control operation. Pins can function as
output pins.
1 Enable high-impedance output control operation.
• Rewrite the HZA0DCNn and HZA0DCPn bits when the HZA0DCEn bit is 0.
• For the valid edge specification of the interrupts of the INTP09 and INTP16 pins,
see 22.6.2 (3) External interrupt falling, rising edge specification register 3
(INTR3, INTF3) and (5) External interrupt falling, rising edge specification
register 9H (INTR9, INTF9).
• For the edge specification of the external pins, begin with the TOAB1OFF and
TOAA1OFF pins. Then, perform edge specification for the external pins other than
the TOAB1OFF and TOAA1OFF pins. Otherwise, an undefined edge may be
detected when the edge for the TOAB1OFF and TOAA1OFF pins is specified.
• High-impedance output control is performed when the valid edge is input after the
operation is enabled (by setting HZA0DCEn bit to 1). If the external pin is at
the active level when the operation is enabled, therefore, high-impedance output
control is not performed.
(2/2)
• Pins can function as output pins when the HZA0DCM bit = 0, regardless of the
status of the external pin.
• If an edge indicating abnormality is input to the external pin (which is set by the
HZA0DCNn and HZA0DCPn bits) when the HZA0DCM bit = 1, the HZA0DCCn
bit is invalid even if it is set to 1.
• The HZA0DCCn bit is always 0 when it is read.
• The HZA0DCCn bit is invalid even if it is set to 1 when the HZA0DCEn bit = 0.
• Simultaneously setting the HZA0DCTn and HZA0DCCn bits to 1 is prohibited.
TOAA1OFF/ Analog
HZA0CTL1
INTP09 filter
TAA1 TOAA11
TOAB1OFF/ Analog
HZA0CTL0
INTP16 filter
TOAB1T2
TOAB1B3
TOAB1T3
However, if the external pin is not used with the HZA0DCPn bit and HZA0DCNn bit cleared to 0, the pin
goes into a high-impedance state when the HZA0DCTn bit is set to 1.
Remark n = 0, 1
10.4 Operation
A dead-time interval is generated from the basic 3-phase wave generated by using three 10-bit dead-time counters
and one compare register to create a wave with a reverse phase to that of the basic 3-phase wave. Then a 6-
phase PWM output wave (U, U, V, V, W, and W) is generated.
The 16-bit counter for generating the basic 3-phase wave counts up or down. After the operation has been started,
this counter counts up. When its count value matches the cycle set to the TAB1CCR0 register, the counter starts
counting down. When the count value matches 0001H, the counter counts up again. This means that a value two
times higher than the value set to the TAB1CCR0 register + 1 is the carrier cycle.
10-bit dead-time counters 1 to 3, which generate the dead-time interval, count up. Therefore, the value set to the
TAB1 dead-time compare register (TAB1DTC) is used as a dead-time value as is. Because three counters are
used, dead time can be generated independently in phases U, V, and W. However, because there is only one
register that specifies a dead-time value (TAB1DTC), the same dead-time value is used in all three phases.
A/D trigger
16-bit counter Up/down selection generator
TOAB11
(internal signal)Note
Dead-time counter 1 TOT1 TOAB1T1 pin
output (U)
TAB1DTC register
(dead-time value)
M+1 M+1
k k k k
16-bit
counter j j j j
i i i i
0000H
TAB1CCR0
register M (carrier data)
TAB1CCR1
i (phase U data)
register
TAB1CCR2
j (phase V data)
register
TAB1CCR3
register k (phase W data)
TOAB11 signal
(internal signal)
TOAB12 signal
(internal signal)
TOAB13 signal
(internal signal)
Carrier cycle = (M + 1) × 2
Basic phase U output width = (M + 1 - i) ´ 2
Basic phase V output width = (M + 1 − j) × 2
Basic phase W output width = (M + 1 − k) × 2
TAB1DTC
register N (dead-time value)
Dead-time
counter 1
Dead-time
counter 2
Dead-time
counter 3
TOAB10
pin output
TOAB1T1
pin output (U)
TOAB1B1
pin output (U)
TOAB1T2
pin output (V)
TOAB1B2
pin output (V)
TOAB1T3
pin output (W)
TOAB1B3
pin output (W)
Phase U output width = (M + 1 − i) × 2 − N
Phase U output width = (M + 1 − i) × 2 + N
Phase V output width = (M + 1 − j) × 2 − N
Phase V output width = (M + 1 − j) × 2 + N
Phase W output width = (M + 1 − k) × 2 − N
Phase W output width = (M + 1 − k) × 2 + N
Dead-time width = N
Cautions 1. Set the value “M” of the TAB1CCR0 register in a range of 0002H ≤ M ≤ FFFEH in the 6-phase
PWM output mode.
2. Only a value of up to “M + 1” can be set to the TAB1CCR1, TAB1CCR2, and TAB1CCR3
registers.
3. The output is 100% if “0000H” is set to the TAB1CCR1, TAB1CCR2, and TAB1CCR3
registers. The output is 0% if “M + 1” is set to the TAB1CCR1, TAB1CCR2, and TAB1CCR3
registers.
The output (duty 50%) rises at the crest (M + 1) of the 16-bit counter and falls at the valley
(0000H) if “M + 2” or higher is set to the TAB1CCR1, TAB1CCR2, and TAB1CCR3 registers.
4. If the operation value of an equation (such as (M + 1 – i) × 2 – N) of the output width of
phases U, V, and W is 0 or lower, it is converged to 0 (100% output). If the operation value is
higher than “(M + 1) × 2”, it is converged to (M + 1) × 2 (0% output).
• INTTAB1CC0 (crest interrupt) signal: An interrupt signal indicating a match between the value of the 16-bit
counter that counts up and the value of the TAB1CCR0 register
• INTTAB1OV (valley interrupt) signal: An interrupt signal indicating a match between the value of the 16-bit
counter that counts down and the value 0001H
For details of the transfer function of the compare register, see 10.4.4 Operation to rewrite register with transfer
function.
Status of TAB1CUF Bit Status of 16-Bit Counter Range of 16-Bit Counter Value
M+1 M+1
k k k k
16-bit
j j j j
counter
i i i i
0000H
TAB1CCR0 M (carrier data)
register
TAB1CCR1 i (phase U data)
register
TAB1CCR2 j (phase V data)
register
TAB1CCR3 k (phase W data)
register
TOAB10
pin output
TOAB1T1
pin output (U)
TOAB1B1
pin output (U)
TOAB1T2
pin output (V)
TOAB1B2
pin output (V)
TOAB1T3
pin output (W)
TOAB1B3
pin output (W)
INTTAB1CC0
(crest interrupt)
INTTAB1OV
(valley interrupt)
TAB1CUF
(up/down flag)
16-bit
counter
TOAB1m signal
(internal signal)
Dead-time
counter m
TOAB1Tm
pin output
TOAB1Bm
pin output
a a
16-bit
counter
TOAB1m signal
(internal signal)
Dead-time 0000H
counter m
TOAB1Tm
pin output
TOAB1Bm
pin output
0 0
Remark m = 1 to 3
Remark m = 1 to 3
16-bit
counter i i i i i i
TAB1CCR0
register M
TAB1CCR1
register i M+1 i M+1 i
CCR1 i i
buffer register
0000H M+1 i M+1
<1> <2> <3> <4>
TOAB1T1 0% output
pin output 0% output
TOAB1B1
pin output
Forced timing
of timer output
<1> 0% output is selected by the valley interrupt (without a match with the 16-bit counter).
The valley interrupt forcibly lowers the timer output. This produces the 0% output.
<2> 0% output is canceled by the crest interrupt (without a match with the 16-bit counter).
The crest interrupt forcibly raises the timer output. This cancels the 0% output.
<3> 0% output is selected by the crest interrupt (with a match with the 16-bit counter).
The crest interrupt forcibly raises the timer output, but lowering the timer output takes precedence when
the value of the TAB1CCRm register matches the value of the 16-bit counter. As a result, the 0% wave is
output.
<4> 0% output is canceled by the valley interrupt (without a match with the 16-bit counter).
The valley interrupt forcibly lowers the timer output. This cancels the 0% output.
16-bit
counter i i i i i i
TAB1CCR0
register M
TAB1CCR1
register i 0000H i 0000H i
CCR1
buffer register 0000H i 0000H i 0000H i
<1> <2> <3> <4>
TOAB1T1
pin output 100% 100%
TOAB1B1 output output
pin output
Forced timing
of timer output
<1> 100% output is selected by the valley interrupt (with a match with the 16-bit counter).
The valley interrupt forcibly lowers the timer output, but raising the timer output takes precedence when
the value of the TAB1CCRm register matches the value of the 16-bit counter. As a result, the 100% output
is produced.
<2> 100% output is canceled by the valley interrupt (without a match with the 16-bit counter).
The valley interrupt forcibly lowers the timer output. This cancels the 100% output.
<3> 100% output is selected by the crest interrupt (without a match with the 16-bit counter).
The crest interrupt forcibly raises the timer output. This produces the 100% output.
<4> 100% output is canceled by the crest interrupt (without a match with the 16-bit counter).
The crest interrupt forcibly raises the timer output. This cancels the 100% output.
Figure 10-11. PWM Output Waveform from 0% to 100% and from 100% to 0% (With Dead Time)
16-bit
counter
TAB1CCR0
register M
TAB1CCR1
register 0000H M+1 0000H M+1 0000H
CCR1
buffer register 0000H 0000H M+1 0000H M+1 0000H
<1> <1> <2> <2> <1>
TOAB1T1 0% output 0% output
pin output 100% 100% 100%
output output output
TOAB1B1
pin output
Forced timing
of timer output
16-bit
counter
0000H
TOAB1m signal L
(internal signal)
Dead-time 000H (dead-time counter m does not count)
counter m
TOAB1Tm
L
pin output
TOAB1Bm
pin output H
(b) In vicinity of 0% output (TAB1CCRm register = i ≥ M + 1 − a/2, TAB1CCR0 register = M, TAB1DTC register = a)
16-bit
counter
0000H
TOAB1m signal
(internal signal)
Dead-time
counter m 000H
TOAB1Tm Dead-time counter is cleared and counts again
L
pin output
TOAB1Bm
pin output
Negative-phase output width: (M + 1 − i) × 2 + a
(e.g., output width is 2 + a where TAB1CCRm register = M)
(c) In vicinity of 100% output (TAB1CCRm register = i ≤ a/2, TAB1CCR0 register = M, TAB1DTC register = a)
16-bit
counter
0000H
TOAB1m signal
(internal signal)
Dead-time
counter m 000H
TOAB1Tm
pin output
Counter is cleared and counts again
TOAB1Bm
pin output
Positive-phase output width: (M + 1 − i) × 2 − a)
(e.g., output width is 2 − a where TAB1CCRm register = 0001H.)
(d) 100% output (TAB1CCRm register = 0000H, TAB1CCR0 register = M, TAB1DTC register = a)
16-bit
counter
0000H
TOAB1m signal
(internal signal)
Dead-time 000H (dead-time counter m does not count)
counter m
TOAB1Tm
pin output
TOAB1Bm
pin output
Remark m = 1 to 3
16-bit
counter
0000H
TOAB1m signal
(internal signal)
Dead-time
counter m 000H
TOAB1Bm
pin output
16-bit
counter
0000H
TOAB1m signal
(internal signal)
Dead-time
counter m
000H
TOAB1Tm
pin output
Dead-time counter m starts counting down
TOAB1Bm
pin output
Note
Note The output width of the first wave differs from that of the second and subsequent waves immediately
after the TAB1CTL0.TAB1CE bit has been set. The first wave is shorter than the second wave because
the dead time is fully counted.
Remark m = 1 to 3
(a) When TAB1OPT2.TAB1DTM bit = 0, TAB1CCR0 register = 0006H, TAB1DTC register = 000FH,
TAB1CCRm register = 0004H
16-bit
counter
TOAB1m signal
(internal signal)
Dead-time
counter m 000H 001H 002H 003H 004H 005H 006H 001H 002H 003H 004H 005H 006H 007H 008H 009H 00AH 00BH 00CH 00DH 00EH 00FH 000H 001H
TOAB1Tm
pin output
TOAB1Bm
pin output
(b) When TAB1OPT2.TAB1DTM bit = 1, TAB1CCR0 register = 0006H, TAB1DTC register = 000FH,
TAB1CCRm register = 0002H
16-bit
counter
TOAB1m signal
(internal signal)
Dead-time
000H 001H 002H 003H 004H 005H 006H 007H 008H 009H 00AH 009H 008H 007H 006H 005H 004H 003H 002H 001H 000H 001H 002H 003H 004H 003H 002H 001H
counter m
TOAB1Tm
pin output
TOAB1Bm
pin output
Starts counting
down. Output does not change
and dead-time counter m
continues counting down
Remark m = 1 to 3
Cautions 1. When using the interrupt culling function in the batch rewrite mode (transfer mode), execute the
function in the intermittent batch rewrite mode (transfer culling mode).
2. The interrupt is generated at the timing after culling.
Remark m = 1 to 3
Figure 10-15. Interrupt Culling Operation When TAB1OPT1.TAB1ICE Bit = 1, TAB1OPT1.TAB1IOE Bit = 1,
TAB1OPT2.TAB1RDE Bit = 1 (Crest/Valley Interrupt Output)
16-bit
counter
Figure 10-16. Interrupt Culling Operation When TAB1OPT1.TAB1ICE Bit = 1, TAB1OPT1.TAB1IOE Bit = 0,
TAB1OPT2.TAB1RDE Bit = 1 (Crest Interrupt Output)
16-bit
counter
Figure 10-17. Interrupt Culling Operation When TAB1OPT1.TAB1ICE Bit = 0, TAB1OPT1.TAB1IOE Bit = 1,
TAB1OPT2.TAB1RDE Bit = 1 (Valley Interrupt Output)
16-bit
counter
(2) To alternately output crest interrupt (INTTAB1CC0) and valley interrupt (INTTAB1OV)
To alternately output the crest and valley interrupts, set both the TAB1OPT1.TAB1ICE and TAB1OPT1.TAB1IOE
bits to 1.
16-bit
counter
INTTAB1CC0
signal
INTTAB1OV
signal
Remarks 1. Transfer is performed at the culled interrupt output timing. The other transfer timing is ignored.
2. : Culled interrupt
16-bit
counter
INTTAB1CC0
signal
INTTAB1OV
signal
16-bit
counter
INTTAB1CC0
signal
INTTAB1OV
signal L
Remarks 1. Transfer is performed at the culled interrupt output timing. The other transfer timing is ignored.
2. : Culled interrupt
16-bit
counter
INTTAB1CC0
signal
INTTAB1OV
signal L
16-bit
counter
INTTAB1CC0
signal L
INTTAB1OV
signal
Remarks 1. Transfer is performed at the culled interrupt output timing. The other transfer timing is ignored.
2. : Culled interrupt
16-bit
counter
INTTAB1CC0
signal L
INTTAB1OV
signal
• TAB1CCR0: Register that specifies the cycle of the 16-bit counter (TAB)
• TAB1CCR1: Register that specifies the duty factor of TOAB1T1 (U) and TOAB1B1 (U)
• TAB1CCR2: Register that specifies the duty factor of TOAB1T2 (V) and TOAB1B2 (V)
• TAB1CCR3: Register that specifies the duty factor of TOAB1T3 (W) and TOAB1B3 (W)
• TAB1OPT1: Register that specifies the culling of interrupts
• TAA4CCR0: Register that specifies the A/D conversion start trigger generation timing (TAA4 during tuning operation)
• TAA4CCR1: Register that specifies the A/D conversion start trigger generation timing (TAA4 during tuning operation)
The following three rewrite modes are provided in the registers with a transfer function.
Operating clock
(fXX/2)
TAB1CCR0
register b a
CCR0 buffer
register b a
Note
Note After the register (TAB1CCR0, TAB1CCR2, TAB1CCR3, TAB1OPT1, TAA4CCR0, or TAA4CCR1) has
been written, the written value is transferred to an internal buffer register after four clocks of the operating
clock. However, the value of the TAB1CCR1 register is transferred after 5 clocks.
16-bit
counter
16-bit i i i i
counter
TAB1CCRm
i
register
<1> <2> <1> <2> <1> <2> <1> <2>
Figure 10-24. Example of Rewriting TAB1CCR1 to TAB1CCR3 Registers (Rewriting Before Match Occurs)
(a)
If the TAB1CCRm register is rewritten before its value matches the value of the 16-bit counter, the register
value will match the value of the 16-bit counter after the register has been rewritten. Consequently, the new
register value is immediately reflected.
16-bit i
k k k
counter
TAB1CCRm
i k
register
CCRm buffer i k
register
TOAB1Tm
pin output
(b)
If a value less than the value of the 16-bit counter (greater if the counter is counting down) is written to the
TAB1CCRm register, the output waveform is as follows because the register value does not match the
counter value.
16-bit i r r r
counter
TAB1CCRm
register i r
CCRm buffer
i r
register
TOAB1Tm
pin output
If the register value does not match the counter value, the TOAB1Tm pin output does not change. Even if
the value of the 16-bit counter does not match the value of the TAB1CCRm register, the TOAB1Tm pin
output always changes to the high level if the crest interrupt occurs and to the low level if the valley interrupt
occurs.
This is a function provided for 0% output and 100% output.
For details, see 10.4.2 (2) PWM output of 0%/100%.
Figure 10-25. Example of Rewriting TAB1CCR1 to TAB1CCR3 Registers (Rewriting After Match Occurs)
16-bit i i
counter k k k
TAB1CCRm
register i k
CCRm buffer
register i k
TOAB1Tm
pin output <1> <3>
INTTAB1CCm
signal <2>
<1> Matching of the count value of the 16-bit counter and the value of the TAB1CCRm register as a result of
rewriting the register is ignored after a match signal has been generated, and the PWM output does not
change.
<2> Even if the PWM output does not change, the interrupt generated upon a match between the 16-bit
counter value and the TAB1CCRm register value (INTTAB1CCm) is output.
<3> The next match between the 16-bit counter and TAB1CCRm register is valid after the counter has changed
its counting direction to up or down, and the PWM output changes.
If the TAB1CCRm register is rewritten after its value matches the value of the 16-bit counter, the next match is
ignored after the first match occurs and the rewritten value is not reflected in the TOAB1Tm pin output. If the
register is rewritten while the counter is counting down, the match that occurs after the counter starts counting
down is valid (the match that occurs after the counter has started counting up is valid if the register is rewritten
while the counter is counting up).
<1> Rewriting the TAB1CCR0, TAB1CCR2, TAB1CCR3, TAB1OPT1, TAA4CCR0, and TAA4CCR1 registers
Do not rewrite registers that do not have to be rewritten.
<2> Rewriting the TAB1CCR1 register
Rewrite the same value to the register even when it is not necessary to rewrite the TAB1CCR1 register.
<3> Holding the next rewriting pending until the transfer timing is generated
Rewrite the register next time after the INTTAB1OV or INTTAB1CC0 interrupt has occurred.
<4> Return to <1>.
16-bit counter
(TAB1)
Transfer <Q2>
timing
TAB1CCR0 <Q3>
register
CCR0 buffer
register
TAB1CCR1 <Q3>
register
<Q1>&<P1>
CCR1 buffer
register
TAB1CCR2 <Q3>
register
CCR2 buffer
register
TAB1CCR3 <Q3>
register
CCR3 buffer
register
TAB1OPT1 <Q3>
register
OPT1 buffer
register
INTTAB1OV signal
INTTAB1CC0 signal
16-bit counter
(TAA4)
Transfer <P2>
timing
TAA4CCR0 <P3>
register
CCR0 buffer
register
TAA4CCR1 <P3>
register
CCR1 buffer
register
[Operation of TAB1]
<Q1> Write the TAB1CCR1 register
<Q2> The target timing is the first transfer timing after a write to the TAB1CCR1 register.
<Q3> The values are transferred all at once at the transfer timing.
[Operation of TAA4]
<P1> Write the TAB1CCR1 register
<P2> The target timing is the first transfer timing after a write to the TAB1CCR1 register.
<P3> The values are transferred all at once at the transfer timing.
16-bit
counter
<1> <2> <1> <2>
The transfer timing in Figure 10-28 is at the point where the crest timing occurs. While the 16-bit counter is
counting down, the cycle changes and an asymmetrical triangular wave is output. Because the cycle changes,
rewrite the duty factor (voltage data value).
(a) M > N
M
16-bit i N+1 N+1
counter k k k k k k
Transfer
timing
TAB1CCR0 M N
register
CCR0 buffer 0000H M N
register
TAB1CCR1 i
register k
CCR1 buffer 0000H i k
register
TOAB1T1
pin output
INTTAB1CC0
signal
INTTAB1OV
signal
(b) M < N
N+1 N+1
M
16-bit i
counter k k
Transfer
timing
TAB1CCR0 M N
register
CCR0 buffer 0000H M N
register
TAB1CCR1 i
register k
CCR1 buffer 0000H i k
register
TOAB1T1
pin output
INTTAB1CC0
signal
INTTAB1OV
signal
Remarks 1. If transfer (match between the value of the 16-bit counter and the value of the CCR0 buffer
register) occurs in the 6-phase PWM output mode, the value of the TAB1CCR0 register plus 1 is
loaded to the 16-bit counter. In this way, the expected wave can be output even if the cycle value
is changed at the transfer timing of the crest (match between the 16-bit counter value and the
TAB1CCR0 register value) timing.
2. M: Value of CCR0 buffer register before rewriting
N: Value of CCR0 buffer register after rewriting
M+1
16-bit i i N+1
counter k k k k
Transfer
timing
TAB1CCR0 N
register M
CCR0 buffer
register 0000H M N
TAB1CCR1
register i k
CCR1 buffer
register 0000H i k
TOAB1T1
pin output
INTTAB1CC0
signal
INTTAB1OV
signal
Because the next transfer timing is at the point of the valley (match between the 16-bit counter value and
0001H), the cycle value changes from the next cycle and output of a symmetrical triangular wave is
maintained. Because the cycle changes, rewrite the duty value (voltage data value) as required.
16-bit r r
counter i
k
Transfer
timing
TAB1CCRm r
register i k
CCRm buffer
register 0000H i k r
TOAB1Tm
register
INTTAB1CCm
signal
<1> <2> <1> <2>
Remark m = 1 to 3
<1> Rewrite the TAB1CCR0, TAB1CCR2, TAB1CCR3, TAB1OPT1, TAA4CCR0, and TAA4CCR1 registers.
Do not rewrite registers that do not have to be rewritten.
<2> Rewrite the TAB1CCR1 register.
Rewrite the same value to the register even when it is not necessary to rewrite the TAB1CCR1 register.
<3> Hold the next rewriting pending until the transfer timing is generated.
Perform the next rewrite after the INTTAB1OV or INTTAB1CC0 interrupt has occurred.
<4> Return to <1>.
16-bit counter
(TAB1)
Transfer <Q4> <Q2> <Q4>
timing
TAB1CCR0 <Q3>
register
CCR0 buffer
register
TAB1CCR1 <Q3>
register
<Q1>&<P1>
CCR1 buffer
register
TAB1CCR2 <Q3>
register
CCR2 buffer
register
TAB1CCR3 <Q3>
register
CCR3 buffer
register
TAB1OPT1 <Q3>
register
OPT1 buffer
register
INTTAB1OV signal
<Q4> <Q4>
INTTAB1CC0 signal
16-bit counter
(TAA4)
Transfer <P4> <P2> <P4>
timing
TAA4CCR0 <P3>
register
CCR0 buffer
register
TAA4CCR1 <P3>
register
CCR1 buffer
register
[TAB1 operation]
<Q1> Write the TAB1CCR1 register.
<Q2> Rewrite the register at the transfer timing that is generated after the TAB1CCR1 register has been
rewritten.
<Q3> The registers are transferred all at once at the transfer timing.
<Q4> The transfer timing is also culled as the interrupts are culled.
[TAA4 operation]
<P1> Write the TAB1CCR1 register.
<P2> Rewrite the register at the transfer timing that is generated after the TAB1CCR1 register has been
rewritten.
<P3> The registers are transferred all at once at the transfer timing.
<P4> The transfer timing is also culled as the interrupts are culled.
Remark This is an example of the operation when the TAB1OPT1.TAB1ICE bit = 1, TAB1OPT1.TAB1IOE bit =
1, and TAB1OPT1.TAB1ID4 to TAB1OPT1.TAB1ID0 bits = 00001.
M
16-bit i i i N+1
counter k k k k
Transfer
timing
TAB1CCR0 N
M
register
CCR0 buffer
register 0000H M N
TAB1CCR1
i k
register
CCR1 buffer i k
0000H
register
TOAB1T1
pin output
INTTAB1CC0
signal
INTTAB1OV
signal L
The transfer timing is generated when the crest interrupt occurs, the cycle of counting up and counting down
changes, and an asymmetrical triangular wave is output.
Remarks 1. This is an example of the operation when the TAB1OPT1.TAB1ICE bit = 1, TAB1OPT1.TAB1IOE
bit = 0, and TAB1OPT1.TAB1ID4 to TAB1OPT1.TAB1ID0 bits = 00001.
2. : Culled interrupt
M+1 M+1
16-bit i i i i N+1
counter k k
Transfer
timing
TAB1CCR0 N
M
register
CCR0 buffer
register 0000H M N
TAB1CCR1
i k
register
CCR1 buffer
0000H i k
register
TOAB1T1
pin output
INTTAB1CC0
signal L
INTTAB1OV
signal
The transfer timing is generated when the valley interrupt occurs, the cycle of counting up becomes same as
cycle of counting down, and a symmetrical triangular wave is output.
Remarks 1. This is an example of the operation when the TAB1OPT1.TAB1ICE bit = 0, TAB1OPT1.TAB1IOE
bit = 1, and TAB1OPT1.TAB1ID4 to TAB1OPT1.TAB1ID0 bits = 00001.
2. : Culled interrupt
16-bit i i i
counter k
Transfer
timing
TAB1CCR1
i k r
register
CCR1 buffer
i k
register
TOAB1T1
pin output
INTTAB1CC0
signal
INTTAB1OV
signal
Transfer at
crest interrupt
16-bit i i
counter k k
Transfer
timing
TAB1CCR1
i k r
register
CCR1 buffer
i k r
register
TOAB1T1
pin output
INTTAB1CC0
signal
INTTAB1OV
signal
Transfer at Transfer at
valley interrupt valley interrupt
16-bit
counter
Transfer
timing
TAB1CCR1
i k r s
register
CCR1 buffer
0000H i r s
register
Write signal of <2> <4> <5> <6>
TAB1CCR1
Transfer Clear <3> Clear
request signal
TAB1CMS bit <1>
<1> If the TAB1CCR1 register is rewritten when the TAB1CMS bit is 0, the transfer request signal is set.
If the TAB1CMS bit is set to 1 in this status, the transfer request signal is cleared.
<2> The register is not transferred because the TAB1CMS bit is set to 1 and the transfer request signal is
cleared.
<3> The transfer request signal is not set even if the TAB1CCR1 register is written when the TAB1CMS bit is 1.
<4> The transfer request signal is not set even if the TAB1CCR1 register is written when the TAB1CMS bit is 1,
so even if the TAB1CMS bit is cleared to 0, transfer does not occur at the subsequent transfer timing.
<5> The transfer request signal is set if the TAB1CCR1 register is written when the TAB1CMS bit is 0.
Transfer is performed at the subsequent transfer timing and the transfer request signal is cleared.
<6> Once transfer has been performed, the transfer request signal is cleared. Therefore, transfer is not
performed at the next transfer timing.
10.4.5 TAA4 tuning operation for A/D conversion start trigger signal output
This section explains the tuning operation of TAA4 and TAB1 in the 6-phase PWM output mode.
In the 6-phase PWM output mode, the tuning operation is performed with TAB1 serving as the master and TAA4 as a
slave. The conversion start trigger signal of the A/D converter can be set as the A/D conversion start trigger source by the
INTTAA4CC0 and INTTAA4CC1 signals of TAA4 and the INTTAB1OV and INTTAB1CC0 signals of TAB1.
(a) Setting of TAA4 register (stop the operations of TAB1 and TAA4 (by clearing the TAB1CTL0.TAB1CE bit
and TAA4CTL0.TAA4CE bit to 0)).
• Set the TAA4CTL1 register to 85H (set the tuning operation slave mode and free-running timer mode).
• Clear the TAA4OPT0 register to 00H (select the compare register).
• Set an appropriate value to the TAA4CCR0 and TAA4CCR1 registers (set the default value for comparison
for starting the operation).
(e) Set the TAA4CE bit to 1 and set the TAB1CE bit to 1 immediately after that to start the 6-phase PWM
output operation
Rewriting the TAB1CTL0, TAB1CTL1, TAB1IOC1, TAB1IOC2, TAA4CTL0, and TAA4CTL1 registers is prohibited
during operation. The operation and the PWM output waveform are not guaranteed if any of these registers is
rewritten during operation. However, rewriting the TAB1CTL0.TAB1CE bit to clear it is permitted. Manipulating
(reading/writing) the other TAB1, TAA4, and TMQ option registers is prohibited until the TAA4CTL0.TAA4CE bit
is set to 1 and then the TAB1CE bit is set to 1.
Caution Manipulating (reading/writing) the other TAB1, TAA4, and TMQ option registers is prohibited until
the TAB1CE bit is set to 1 and then the TAA4CE bit is set to 1.
M+1 M+1
k k k k
16-bit
counter j j j j
of TAB1
i i i i
INTTAA4CC0
signal
INTTAA4CC1
signal
TABTADT0 Note Note
signal
Note The TABTADT0 signal is masked by the TAB1OPT2.TAB1ATM2 and TAB1OPT2.TAB1ATM3 bits.
• TAB1AT0 bit = 1:
A/D conversion start trigger signal generated when INTTAB1OV (counter underflow) occurs.
• TAB1AT1 bit = 1:
A/D conversion start trigger signal generated when INTTAB1CC0 (cycle match) occurs.
• TAB1AT2 bit = 1:
A/D conversion start trigger signal generated when INTTAA4CC0 (match of TAA4CCR0 register of TAA4 during
tuning operation) occurs.
• TAB1AT3 bit = 1:
A/D conversion start trigger signal generated when INTTAA4CC1 (match of TAA4CCR1 register of TAA4 during
tuning operation) occurs.
The A/D conversion start trigger signals selected by the TAB1AT0 to TAB1AT3 bits are ORed and output. Therefore, two
or more trigger sources can be specified at the same time.
The INTTAB1OV and INTTAB1CC0 signals selected by the TAB1AT0 and TAB1AT1 bits are culled interrupt signals.
Therefore, these signals are output after the interrupts have been culled and, unless interrupt output is enabled (by the
TAB1OPT1.TAB1ICE and TAB1OPT1.TAB1IOE bits), the A/D conversion start trigger signal is not output.
The trigger sources (INTTAA4CC0 and INTTAA4CC1) from TAA4 have a function to mask the A/D conversion start
trigger signal depending on the count-up/count-down status of the 16-bit counter, if so set by the TAB1AT2 and TAB1AT3
bits.
• TAB1ATM2 bit: Corresponds to the TAB1AT2 bit and controls INTTAA4CC0 (match interrupt signal) of TAA4.
• TAB1ATM2 bit = 0: The A/D conversion start trigger signal is output when the 16-bit counter counts up
(TAB1OPT0.TAB1CUF bit = 0), and the A/D conversion start trigger signal is not output when
the 16-bit counter counts down (TAB1OPT0.TAB1CUF bit = 1).
• TAB1ATM2 bit = 1: The A/D conversion start trigger signal is output when the 16-bit counter counts up
(TAB1OPT0.TAB1CUF bit = 1), and the A/D conversion start trigger signal is not output when
the 16-bit counter counts down (TAB1OPT0.TAB1CUF bit = 0).
• TAB1ATM3 bit: Corresponds to the TAB1AT3 bit and controls INTTAA4CC1 (match interrupt signal) of TAA4.
• TAB1ATM3 bit = 0: The A/D conversion start trigger signal is output when the 16-bit counter counts up
(TAB1OPT0.TAB1CUF bit = 0), and the A/D conversion start trigger signal is not output when
the 16-bit counter counts down (TAB1OPT0.TAB1CUF bit = 1).
• TAB1ATM3 bit = 1: The A/D conversion start trigger signal is output when the 16-bit counter counts up
(TAB1OPT0.TAB1CUF bit = 1), and the A/D conversion start trigger signal is not output when
the 16-bit counter counts down (TAB1OPT0.TAB1CUF bit = 0).
The TAB1ATM3, TAB1ATM2, and TAB1AT3 to TAB1AT0 bits can be rewritten while the timer is operating. If the bit that
sets the A/D conversion start trigger signal is rewritten while the timer is operating, the new setting is immediately reflected
in the output status of the A/D conversion start trigger signal. These control bits do not have a transfer function and can be
used only in the anytime rewrite mode.
Cautions 1. The A/D conversion start trigger signal output that is set by the TAB1AT2 and TAB1AT3 bits can be
used only when TAA4 is performing a tuning operation as the slave timer of TAB1. If TAB1 and
TAA4 are not performing a tuning operation, or if a mode other than the 6-phase PWM output
mode is used, the output cannot be guaranteed.
2. The TAB1 signal output is internally used to identify whether the 16-bit counter is counting up or
down. Therefore, enable TOAB10 pin output by clearing the TAB1IOC0.TAB1OL0 bit to 0 and
setting the TAB1IOC0.TAB1OE0 bit to 1.
Figure 10-38. Example of A/D Conversion Start Trigger (TABTADT0) Signal Output
(TAB1OPT1.TAB1ICE Bit = 1, TAB1OPT1.TAB1IOE Bit = 1,
TAB1OPT1.TAB1ID4 to TAB1OPT1.TAB1ID0 Bits = 00000: Without Interrupt Culling)
16-bit
counter
INTTAB1CC0 signal
INTTAB1OV signal
INTTAA4CC0 signal
INTTAA4CC1 signal
TAB1CUF bit
TABTADT0 signal
TABTADT0 signal
TAB1AT3 to TAB1AT0 bits = 0100, TAB1ATM2 bit = 0 (INTTAA4CC0 signal output during counting up)
TABTADT0 signal
TAB1AT3 to TAB1AT0 bits = 0100, TAB1ATM2 bit = 1 (INTTAA4CC0 signal output during counting down)
TABTADT0 signal
TAB1AT3 to TAB1AT0 bits = 1000, TAB1ATM3 bit = 0 (INTTAA4CC1 signal output during counting up)
TABTADT0 signal
TAB1AT3 to TAB1AT0 bits = 1000, TAB1ATM3 bit = 1 (INTTAA4CC1 signal output during counting down)
TABTADT0 signal
TAB1AT3 to TAB1AT0 bits = 0011 (setting to output A/D conversion start trigger signal when both crest and valley interrupts occur)
TABTADT0 signal
TAB1AT3 to TAB1AT0 bits = 1100, TAB1ATM3 bit = 1, TAB1ATM2 bit = 0 (INTTAA4CC0 and INTTAA4CC1 signals ORed for output.
Setting to output A/D conversion start trigger signal when match interrupt of TAA4 occurs when counter is counting up or down)
TABTADT0 signal
Figure 10-39. Example of A/D Conversion Start Trigger (TABTADT0) Signal Output
(TAB1OPT1.TAB1ICE Bit = 0, TAB1OPT1.TAB1IOE Bit = 1,
TAB1OPT1.TAB1ID4 to TAB1OPT1.TAB1ID0 Bits = 00010: With Interrupt Culling) (1)
16-bit
counter
INTTAB1CC0 signal L
INTTAB1OV signal
TAB1AT3 to TAB1AT0 bits = 0011 (both INTTAB1CC0 and INTTAB1OV signals are selected but
crest interrupt (INTTAB1CC0) is not output because interrupt culling is not specified)
TABTADT0 signal
Figure 10-40. Example of A/D Conversion Start Trigger (TABTADT0) Signal Output
(TAB1OPT1.TAB1ICE Bit = 0, TAB1OPT1.TAB1IOE Bit = 1,
TAB1OPT1.TAB1ID4 to TAB1OPT1.TAB1ID0 Bits = 00010: With Interrupt Culling) (2)
16-bit
counter
INTTAB1CC0 signal L
INTTAB1OV signal
INTAA4CC0 signal
INTAA4CC1 signal
TAB1CUF bit
TABTADT0 signal
Caution The INTTAB1CC0 signal is culled but the INTTAA4CC0 signal is not.
(1) Operation under boundary condition (operation when 16-bit counter matches INTTAA4CC0 signal)
Table 10-3. Operation When TAB1CCR0 Register = M, TAB1AT2 Bit = 1, TAB1ATM2 Bit = 0
(Counting Up Period Selected)
Value of TAA4CCR0 Value of 16-Bit Value of 16-Bit Status of 16-Bit TABTADT0 Signal Output
Register Counter of TAB1 Counter of TAA4 Counter of TAB1 by INTTAA4CC0 Signal
Table 10-4. Operation When TAB1CCR0 Register = M, TAB1AT2 Bit = 1, TAB1ATM2 Bit = 1
(Counting Down Period Selected)
Value of TAA4CCR0 Value of 16-Bit Value of 16-Bit Status of 16-Bit TABTADT0 Signal Output
Register Counter of TAB1 Counter of TAA4 Counter of TAB1 by INTTAA4CC0 Signal
Caution The TAA4CCRm register enables the setting of “0” to “M” when the TAB1CCR0 register = M. Setting a
value of “M + 1” or higher is prohibited.
If a value of “M + 1” or higher is set, the 16-bit counter of TAA4 is cleared by “M”. Therefore, the
TABTADT0 signal is not output.
Remark m = 0, 1
11.1 Functions
• Counting up to 99 years using year, month, day-of-week, day, hour, minute, and second sub-counters provided
• Year, month, day-of-week, day, hour, minute, and second counter display using BCD codesNote 1
• Alarm interrupt function
• Constant-period interrupt function (period: 1 month to 0.5 second)
• Interval interrupt function (period: 1.95 ms to 125 ms)
• Pin output function Note 2 of 1 Hz
• Pin output function Note 2 of 32.768 kHz
• Pin output function Note 2 of 512 Hz or 16.384 kHz
• Watch error correction function
• Subclock operation or main clock operationNote 3 selectable
Notes 1. A BCD (binary coded decimal) code expresses each digit of a decimal number in 4-bit binary format.
2. V850ES/JE3-H only
3. Use the baud rate generator dedicated to the real-time counter to divide the main clock frequency to 32.768
kHz for use.
11.2 Configuration
Item Configuration
CLOE1
RTC1HZNote2
INTRTC1
Selector
INTRTC0
Count clock
= 32.768 kHz 1 minute 1 hour 1 month
1 day
fBRGNote1
Selector
Count enable/
disable circuit
ICT2 to ICT0
12
fXT/2
12-bit counter RINTE
Selector
fXT/211 INTRTC2
fXT/210
fXT/29
fXT/28 CKDIV
fXT/27
fXT/26
CLOE2
Selector
fXT/26
RTCDIVNote2
fXT/2
CLOE0
RTCCLNote2
Notes1. For detail of fBRG, refer to 11.3 (17) Prescaler mode register 0 (PRSM0) and 11.3 (18) Prescaler compare
register 0 (PRSCM0).
2. V850ES/JE3-H only.
(1) INTRTC0
A fixed-cycle interrupt signal is generated every 0.5 second, second, minute, hour, day, or month.
(2) INTRTC1
Alarm interrupt signal
(3) INTRTC2
An interval interrupt signal of a cycle of fXT/26, fXT/27, fXT/28, fXT/29, fXT/210, fXT/211, or fXT/212 is generated.
11.3 Registers
7 6 5 4 3 2 1 0
RC1CC0 RC1PWR RC1CKS 0 0 0 0 0 0
Cautions 1. Follow the description in 11.4.8 Initializing real-time counter when stopping (RC1PWR =
1 → 0) the real-time counter while it is operating.
2. The RC1CKS bit can be rewritten only when the real-time counter is stopped (RC1PWR
bit = 0). Furthermore, rewriting the RC1CKS bit at the same time as setting the RC1PWR
bit from 0 to 1 is prohibited.
7 6 5 4 3 2 1 0
RC1CC1 RTCE 0 CLOE1Note CLOE0Note AMPM CT2 CT1 CT0
Cautions 1. Writing 0 to the RTCE bit while the RTCE bit is 1 is prohibited. Clear the RTCE bit by
clearing the RC1PWR bit according to 11.4.8 Initializing real-time counter.
2. The RTC1HZ output operates as follows when the CLOE1 bit setting is changed.
• When changed from 0 to 1: The RTC1HZ output outputs a 1 Hz pulse after two clocks
or less (2 × 32.768 kHz).
• When changed from 1 to 0: The RTC1HZ output is stopped (fixed to low level) after
two clocks or less (2 × 32.768 kHz).
3. See 11.4.1 Initial settings and 11.4.2 Rewriting each counter during real-time counter
operation for setting or changing the AMPM bit. Furthermore, re-set the RC1HOUR
register when the AMPM bit is rewritten.
4. See 11.4.4 Changing INTRTC0 interrupt setting during real-time counter operation when
rewriting the CT2 to CT0 bits while the real-time counter operates (RC1PWR bit = 1).
7 6 5 4 3 2 1 0
RC1CC2 WALE 0 0 0 0 0 RWST RWAIT
This is a status flag indicating whether the RWAIT bit setting is valid.
Read or write counter values after confirming that the RWST bit is 1.
Cautions 1. See 11.4.5 Changing INTRTC1 interrupt setting during real-time counter operation when
rewriting the WALE bit while the real-time counter operates (RC1PWR bit = 1).
2. Confirm that the RWST bit is set to 1 when reading or writing each counter value.
3. The RWST bit does not become 0 while each counter is being written, even if the RWAIT
bit is set to 0. It becomes 0 when writing to each counter is completed.
7 6 5 4 3 2 1 0
Note Note
RC1CC3 RINTE CLOE2 CKDIV 0 0 ICT2 ICT1 ICT0
Cautions 1. See 11.4.7 Changing INTRTC2 interrupt setting during real-time counter operation when
rewriting the RINTE bit during real-time counter operation (RC1PWR bit = 1).
2. The RTCDIV output operates as follows when the CLOE2 bit setting is changed.
• When changed from 0 to 1: A pulse set by the CKDIV bit is output after two clocks or
less (2 × 32.768kHz).
• When changed from 1 to 0: Output of the RTCDIV output is stopped after two clocks
or less (fixed to low level, 2 × 32.768kHz)).
3. See 11.4.7 Changing INTRTC2 interrupt setting during real-time counter operation when
rewriting the ICT2 to ICT0 bits while the real-time counter operates (RC1PWR bit = 1).
Cautions 1 When a correction is made by using the RC1SUBU register, the value may become 8000H
or more.
2. This register is also cleared by writing to the second count register.
3. The value read from this register is not guaranteed if it is read during operation, because a
changing value is read.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RC1SUBC
Remark See 11.4.1 Initial settings, 11.4.2 Rewriting each counter during real-time counter operation, and
11.4.3 Reading each counter during real-time counter operation when reading or writing the
RC1SEC register.
RC1SEC 0
Remark See 11.4.1 Initial settings, 11.4.2 Rewriting each counter during real-time counter operation, and
11.4.3 Reading each counter during real-time counter operation when reading or writing the
RC1MIN register.
RC1MIN 0
Cautions 1. Bit 5 of the RC1HOUR register indicates a.m. (0) or p.m. (1) if AMPM = 0 (if the 12-hour
system is selected).
2. Setting a value other than 01 to 12, 21 to 32 (AMPM bit= 0), or 00 to 23 (AMPM bit = 1) to
the RC1HOUR register is prohibited.
Remark See 11.4.1 Initial settings, 11.4.2 Rewriting each counter during real-time counter operation, and
11.4.3 Reading each counter during real-time counter operation when reading or writing the
RC1HOUR register.
RC1HOUR 0 0
Table 11-3 shows the relationship among the AMPM bit setting value, RC1HOUR register value, and time.
The RC1HOUR register value is displayed in 12 hour-format if the AMPM bit is 0 and in 24-hour format when the
AMPM bit is 1.
In 12-hour display, a.m. or p.m. is indicated by the fifth bit of RCHOUR: 0 indicating before noon (a.m.) and 1
indicating noon or afternoon (p.m.).
When data is written to this register, it is written to a buffer and then to the counter up to 2 clocks (32.768 kHz) later.
Set a decimal value of 00 to 31 to this register in BCD code.
This register can be read or written in 8-bit units.
Reset sets this register to 01H.
Caution Setting a value other than 01 to 31 to the RC1DAY register is prohibited. Setting a value outside
the above-mentioned count range, such as “February 30” is also prohibited.
Remark See 11.4.1 Initial settings, 11.4.2 Rewriting each counter during real-time counter operation, and
11.4.3 Reading each counter during real-time counter operation when reading or writing the
RC1DAY register.
RC1DAY 0 0
RC1WEEK 0 0 0 0 0
Sunday 00H
Monday 01H
Tuesday 02H
Wednesday 03H
Thursday 04H
Friday 05H
Saturday 06H
Remark See 11.4.1 Initial settings, 11.4.2 Rewriting each counter during real-time counter operation, and
11.4.3 Reading each counter during real-time counter operation when reading or writing the
RC1WEEK register.
Remark See 11.4.1 Initial settings, 11.4.2 Rewriting each counter during real-time counter operation, and
11.4.3 Reading each counter during real-time counter operation when reading or writing the
RC1MONTH register.
RC1MONTH 0 0 0
Remark See 11.4.1 Initial settings, 11.4.2 Rewriting each counter during real-time counter operation, and
11.4.3 Reading each counter during real-time counter operation when reading or writing the
RC1YEAR register.
RC1YEAR
Remarks 1. The RC1SUBU register can be rewritten only when the real-time counter is set to its initial values.
Be sure to see 11.4.1 Initial settings.
2. See 11.4.9 Watch error correction example of real-time counter for details of watch error
correction.
7 6 5 4 3 2 1 0
RC1SUBU DEV F6 F5 F4 F3 F2 F1 F0
Caution Set a decimal value of 00 to 59 to this register in BCD code. If a value outside the range is set,
the alarm is not detected.
RC1ALM 0
Cautions 1. Set a decimal value of 00 to 23, 01 to 12, or 21 to 32 to this register in BCD code. If a value
outside the range is set, the alarm is not detected.
2. Bit 5 of the RC1ALH register indicates a.m. (0) or p.m. (1) if the AMPM bit = 0 (12-hour
system) is selected.
RC1ALH 0 0
Caution See 11.4.5 Changing INTRTC1 interrupt setting during clock operation when rewriting the
RC1ALW register while the real-time counter operates (RC1PWR bit = 1).
(a) Alarm interrupt setting examples (RC1ALM, RC1ALH, and RC1ALW setting examples)
Tables 11-4 and 11-5 show setting examples if Sunday is RC1WEEK = 00, Monday is RC1WEEK = 01,
Tuesday is RC1WEEK = 02, ···, and Saturday is RC1WEEK = 06.
Table 11-4. Alarm Setting Example if AMPM = 0 (RC1HOUR Register 12-Hour Display)
Table 11-5. Alarm Setting Example if AMPM = 1 (RC1HOUR Register 24-Hour Display)
< >
PRSM0 0 0 0 BGCE0 0 0 BGCS01 BGCS00
Cautions1. Do not change the values of the BGCS00 and BGCS01 bits during real time
counteroperation.
2. Set the PRSM0 register before setting the BGCE0 bit to 1.
3. Set the PRSM0 and PRSCM0 registers according to the main clock frequency that is used
so as to obtain an fBRG frequency of 32.768 kHz.
Cautions 1. Do not rewrite the PRSCM0 register during real time counter operation.
2. Set the PRSCM0 register before setting the PRSM0.BGCE0 bit to 1.
3. Set the PRSM0 and PRSCM0 registers according to the main clock frequency that is used
so as to obtain an fBRG frequency of 32.768 kHz.
fBRG = fBGCS/2N
Remark fBGCS: Watch timer source clock set by the PRSM0 register
N: Set value of the PRSCM0 register = 1 to 256
However, N = 256 when the PRSCM0 register is set to 00H.
11.4 Operation
Start
Setting AMPM and CT2 to CT0 Selects 12-hour system or 24-hour system and interrupt (INTRTC0).
No INTRTC Intrrupt
generated?
Yes
Reading counter
Start
No
RC1CC2.RWST bit = 0? Checks whether previous writing to
RC1SEC to RC1YEAR counters is completed.
Yes
No
RC1CC2.RWST bit = 1?Note Checks counter wait status.
Yes
End
Caution Complete the series of operations for setting RWAIT to 1 to clearing RWAIT to 0 within 1
second.
If RWAIT = 1 is set, the operation of RC1SEC to RC1YEAR is stopped. If a carry occurs from
RC1SUBC while RWAIT = 1, one carry can be internally retained. However, if two or more
carries occur, the number of carries cannot be retained.
Remark RC1SEC, RC1MIN, RC1HOUR, RC1WEEK, RC1DAY, RC1MONTH, and RC1YEAR may berewrite
in any sequence.
All the registers do not have to be set and only some registers may be read.
Start
No
RC1CC2.RWST bit = 0? Checks whether previous writing to RC1SEC to
RC1YEAR is completed.
Yes
No
RC1CC2.RWST bit = 1?Note Checks counter wait status.
Yes
End
Caution Complete the series of operations for setting RWAIT to 1 to clearing RWAIT to 0 within 1
second.
If RWAIT = 1 is set, the operation of RC1SEC to RC1YEAR is stopped. If a carry occurs from
RC1SUBC while RWAIT = 1, one carry can be internally retained. However, if two or more
carries occur, the number of carries cannot be retained.
Remark RC1SEC, RC1MIN, RC1HOUR, RC1WEEK, RC1DAY, RC1MONTH, and RC1YEAR may be read
in any sequence.
All the registers do not have to be set and only some registers may be read.
Figure 11-5. Changing INTRTC0 Interrupt Setting During Real-time Counter Operation
Start
Setting RC1CC1.CT2 to
Changes INTRTC0 interrupt signal setting.
RC1CC1.CT0
End
Remark See 22.3.4 Interrupt control register (xxICn) for details of the RTC0IF and RTC0MK bits.
Figure 11-6. Changing INTRTC1 Interrupt Setting During Real-time Counter Operation
Start
End
Remark See 22.3.4 Interrupt control register (xxICn) for details of the RTC1IF and RTC1MK bits.
Start
End
Caution Set <1> and <2> simultaneously or set <1> first. Unintended waveform interrupts may occur if <2>
is set first.
Figure 11-8. Changing INTRTC2 Interrupt Setting During Real-time Counter Operation
Start
End
Remark See 22.3.4 Interrupt control register (xxICn) for details of the RTC2IF and RTC2MK bits.
Start
End
Remarks 1. See 22.3.4 Interrupt control register (xxICn) for details of the RTCnIF and RTCnMK bits.
2. n = 0 to 2
RTCCLK
(32.768 kHz)
RC1SUBC 0000H 7FFFH 0000H 7FFFH 0000H 7FFFH 0000H 7FFFH 0000H 7FFFH
20 secondsNote 1
RC1SEC 00 01 19 20
Watch count
(32.7681 kHz/no error correction)
RTCCLK
(32.7681 kHz)
19.99994 secondsNote 2
RC1SEC 00 01 19 20
Watch count
(32.7681 kHz/error correction(DEV bit = 0, F6 bit = 0, F5 to F0 bit = 000010))
RTCCLK
(32.7681 kHz)
2 count numbers are added. 2 count numbers are added.
RC1SUBC 0000H 7FFFH 8000H 8001H 0000H 7FFFH 0000H 7FFFH 0000H 7FFFH 0000H 7FFFH 8000H 8001H
20 secondsNote 3
RC1SEC 00 01 19 20
Notes 1. The RC1SEC counter counts 20 seconds every 32,768 cycles (0000H to 7FFFH) of the 32.768 kHz
clock.
2. When 32,768 cycles (0000H to 7FFFH) of the 32.7681 kHz clock are input, the time counted by the
RC1SEC counter is calculated as follows: 32,768/3,268.1 ≅ 0.999997 seconds
If this counting continues 20 times, the time is calculated as follows: (32,768/32,768.1) x 20 ≅ 19.99994
seconds, which causes an error of 0.00006 seconds.
3. To precisely count 20 seconds by using a 32.7681 kHz clock, clear the DEV and F6 bits to 0 and set
the F5 to F0 bits to 2H (000010B) in the RC1SUBU register. As a result, two additional cycles are
counted every 20 seconds (when the RC1SEC counter count is 00, 20, and 40 seconds), so that the
number of cycles counted at these points is not 32,768, but 32,770 (0000H to 8001H), which is exactly
20 seconds.
As shown in Figure 12-10, the watch can be accurately counted by incrementing the RC1SUBC count value, if a
positive error faster than 32.768 kHz occurs at the resonator. Similarly, if a negative error slower than 32.768 kHz occurs
at the resonator, the watch can be accurately counted by decrementing the RC1SUBC count value.
The RC1SUBC correction value is determined by using the RC1SUBU.F6 to RC1SUBU.F0 bits.
The F6 bit is used to determine whether to increment or decrement RC1SUBC and the F5 to F0 bits to determine the
RC1SUBC value.
Expression for calculating the decrement value: (Inverted value of F5 to F0 bit value + 1) × 2
As described above, the RC1SUBC count value is corrected every 20 seconds or 60 seconds, instead of every
second, in order to match the RC1SUBC count value with the deviation width of the resonator.
The range in which the resonator frequency can be actually corrected is shown below.
The range in which the frequency can be corrected when the DEV bit is 0 is three times wider than when the DEV
bit is 1.
However, the accuracy of setting the frequency when the DEV bit is 1 is three times that when the DEV bit is 0.
Tables 11-7 and 11-8 show the setting values of the DEV, and F6 to F0 bits, and the corresponding frequencies that
can be corrected.
Table 11-7. Range of Frequencies That Can Be Corrected When DEV Bit = 0
Table 11-8. Range of Frequencies That Can Be Corrected When DEV Bit = 1
12.1 Functions
Notes 1. Watchdog timer 2 automatically starts in the reset mode following reset release.
When watchdog timer 2 is not used, either stop its operation before reset is executed via this function, or
clear watchdog timer 2 once and stop it within the next interval time.
Also, write to the WDTM2 register for verification purposes once, even if the default settings (reset mode,
interval time: fR/219) do not need to be changed.
2. For the non-maskable interrupt servicing due to a non-maskable interrupt request signal (INTWDT2), see
22.2.2 (2) From INTWDT2 signal.
12.2 Configuration
fX/216 to fX/223,
fXX/27 Clock fR/212 to fR/219 INTWDT2
16-bit Output
input Selector
counter controller WDT2RES
fR/23 controller
(internal reset signal)
2
Clear 3 3
Watchdog timer enable 0 WDM21 WDM20 WDCS24 WDCS23 WDCS22 WDCS21 WDCS20
register (WDTE) Watchdog timer mode
register 2 (WDTM2)
Internal bus
Item Configuration
12.3 Registers
Caution Accessing the WDTM2 register is prohibited in the following statuses. For details, see 3.4.9 (2)
Accessing specific on-chip peripheral I/O registers.
• When the CPU operates on the subclock and the main clock oscillation is stopped
• When the CPU operates on the internal oscillation clock
Cautions 1. For details of the WDCS20 to WDCS24 bits, see Table 12-2 Watchdog Timer 2 Clock
Selection.
2. Although watchdog timer 2 can be stopped just by stopping operation of the internal
oscillator, clear the WDTM2 register to 00H to securely stop the timer (to avoid selection of
the main clock or subclock due to an erroneous write operation).
3. If the WDTM2 register is rewritten twice after reset, an overflow signal is forcibly generated
and the counter is reset.
4. To intentionally generate an overflow signal, write data to the WDTM2 register twice, or
write a value other than “ACH” to the WDTE register once.
However, when the operation of watchdog timer 2 is set to be stopped, an overflow signal
is not generated even if data is written to the WDTM2 register twice, or a value other than
“ACH” is written to the WDTE register once.
5. To stop the operation of watchdog timer 2, set the RCM.RSTOP bit to 1 (to stop the
internal oscillator) and write 00H in the WDTM2 register. If the RCM.RSTOP bit cannot be
set to 1, set the WDCS23 bit to 1 (2n/fXX is selected and the clock can be stopped in the
IDLE1, IDLW2, sub-IDLE, and subclock operation modes).
WDCS2 WDCS2 WDCS2 WDCS2 WDCS2 Selected Clock 100 kHz (MIN.) 220 kHz (TYP.) 400 kHz (MAX.)
4 3 2 1 0
12
0 0 0 0 0 2 /fR 41.0 ms 18.6 ms 10.2 ms
13
0 0 0 0 1 2 /fR 81.9 ms 37.2 ms 20.5 ms
14
0 0 0 1 0 2 /fR 163.8 ms 74.5 ms 41.0 ms
15
0 0 0 1 1 2 /fR 327.7 ms 148.9 ms 81.9 ms
16
0 0 1 0 0 2 /fR 655.4 ms 297.9 ms 163.8 ms
17
0 0 1 0 1 2 /fR 1,310.7 ms 595.8 ms 327.7 ms
18
0 0 1 1 0 2 /fR 2,621.4 ms 1191.6 ms 655.4 ms
19
0 0 1 1 1 2 /fR (Default value) 5,242.9 ms 2383.1 ms 1,310.7 ms
×
9
1 0 0 0 2 /fXT 15.625 ms
×
10
1 0 0 1 2 /fXT 31.25 ms
×
11
1 0 1 0 2 /fXT 62.5 ms
×
12
1 0 1 1 2 /fXT 125 ms
×
13
1 1 0 0 2 /fXT 250 ms
×
14
1 1 0 1 2 /fXT 500 ms
×
15
1 1 1 0 2 /fXT 1,000 ms
×
16
1 1 1 1 2 /fXT 2,000 ms
WDTE
Cautions 1. When a value other than “ACH” is written to the WDTE register, an overflow signal is
forcibly output.
2. When a 1-bit memory manipulation instruction is executed for the WDTE register, an
overflow signal is forcibly output.
3. To intentionally generate an overflow signal, write a value other than “ACH” to the WDTE
register once, or write data to the WDTM2 register twice.
However, when the operation of watchdog timer 2 is set to be stopped, an overflow signal is
not generated even if data is written to the WDTM2 register twice, or a value other than
“ACH” is written to the WDTE register once.
4. The read value of the WDTE register is “9AH” (which differs from written value “ACH”).
12.4 Operation
Watchdog timer 2 automatically starts in the reset mode following reset release.
The WDTM2 register can be written to only once following reset using byte access. To use watchdog timer 2, write the
operation mode and the interval time to the WDTM2 register using an 8-bit memory manipulation instruction. After this, the
operation of watchdog timer 2 cannot be stopped.
The WDTM2.WDCS24 to WDTM2.WDCS20 bits are used to select the watchdog timer 2 loop detection time interval.
Writing ACH to the WDTE register clears the counter of watchdog timer 2 and starts the count operation again. After
the count operation has started, write ACH to WDTE within the loop detection time interval.
If the time interval expires without ACH being written to the WDTE register, a reset signal (WDT2RES) or a non-
maskable interrupt request signal (INTWDT2) is generated, depending on the set values of the WDTM2.WDM21 and
WDTM2.WDM20 bits.
When the WDTM2.WDM21 bit is set to 1 (reset mode), if a WDT overflow occurs during oscillation stabilization after a
reset or standby is released, no internal reset will occur and the CPU clock will switch to the internal oscillation clock.
To not use watchdog timer 2, write 00H to the WDTM2 register.
For the non-maskable interrupt servicing while the non-maskable interrupt request mode is set, see 22.2.2 (2) From
INTWDT2 signal.
13.1 Function
The real-time output function transfers the data preset to the RTBL0 and RTBH0 registers to the output latches via
hardware and outputs the data to an external device, at the same time as a timer interrupt occurs. The pins through which
the data is output to an external device constitute a port called the real-time output (RTO) port.
Because signals without jitter can be output by using RTO, it is suitable for controlling a stepper motor.
In the V850ES/JC3-H and V850ES/JE3-H, one 4-bit real-time output port channel is provided.
The real-time output port can be set to the port mode or real-time output port mode in 1-bit units.
13.2 Configuration
Real-time output 2
buffer register 0H Real-time output
RTP04,
Internal bus
(RTBH0) latch 0H
RTP05
INTTAA0CC0
INTTAA4CC0
Transfer trigger (L)
2 2
Item Configuration
Cautions 1. When writing to bits 6 and 7 of the RTBH0 register, always set 0.
2. Accessing the RTBL0 and RTBH0 registers is prohibited in the following
statuses. For details, see 3.4.9 (2) Accessing specific on-chip peripheral I/O
registers.
• When the CPU operates on the subclock and the main clock oscillation is
stopped
• When the CPU operates on the internal oscillation clock
Note After setting the real-time output port, set output data to the RTBL0 and RTBH0 registers by the time a real-time
output trigger is generated.
13.3 Registers
Cautions 1. By enabling the real-time output operation (RTPC0.RTPOE0 bit = 1), the bits
enabled for real-time output among the RTP02 to RTP05 signals perform real-
time output, and the bits set to port mode output 0.
2. If real-time output is disabled (RTPOE0 bit = 0), the real-time output pins
(RTP02 to RTP05) all output 0, regardless of the RTPM0 register setting.
3. In order to use this register for the real-time output pins (RTP02 to RTP05), set
these pins as real-time output port pins using the PMC and PFC registers.
< >
RTPC0 RTPOE0 RTPEG0 BYTE0 EXTR0 0 0 0 0
Notes 1. When the real-time output operation is disabled (RTPOE0 bit = 0), all real-time output
pins (RTP02 to RTP05) output “0”.
2. The INTTAA0CC0 signal is output for 1 clock of the count clock selected by TAA0.
Caution Set the RTPEG0, BYTE0, and EXTR0 bits only when the RTPOE0 bit = 0.
Table 13-3. Operation Modes and Output Triggers of Real-Time Output Port
BYTE0 EXTR0 Operation Mode RTBH0 (RTP04, RTP05) RTBL0 (RTP02, RTP03)
13.4 Operation
If the real-time output operation is enabled by setting the RTPC0.RTPOE0 bit to 1, the data of the RTBH0 and RTBL0
registers is transferred to the real-time output latch in synchronization with the generation of the selected transfer trigger
(set by the RTPC0.EXTR0 and RTPC0.BYTE0 bits). Of the transferred data, only the data of the bits for which real-time
output is enabled by the RTPM0 register is output from the RTP01 to RTP05 bits. The bits for which real-time output is
disabled by the RTPM0 register output 0.
If the real-time output operation is disabled by clearing the RTPOE0 bit to 0, the RTP01 to RTP05 signals output 0
regardless of the setting of the RTPM0 register.
Figure 13-2. Example of Operation Timing of RTO0 (When EXTR1 Bit = 0, BYTE0 Bit = 0)
INTTAA4CC0 (internal)
INTTAA0CC0 (internal)
CPU operation A B A B A B A B
Remark For the operation during standby, see CHAPTER 24 STANDBY FUNCTION.
13.5 Usage
(4) Set the next output value to the RTBH0 and RTBL0 registers by the time the selected transfer trigger is
generatedNote 2.
(5) Sequentially set the next real-time output value to the RTBH0 and RTBL0 registers via interrupt servicing
corresponding to the selected trigger.
Notes 1. If the RTBH0 and RTBL0 registers are written when the RTPOE0 bit = 0, that value is transferred to
real-time output latches 0H and 0L.
2. Even if the RTBH0 and RTBL0 registers are written when the RTPOE0 bit = 1, data is not transferred to
real-time output latches 0H and 0L.
13.6 Cautions
• Conflict between real-time output disable/enable switching (RTPOE0 bit) and the selected real-time output
trigger.
• Conflict between writing to the RTBH0 and RTBL0 registers in the real-time output enabled status and the
selected real-time output trigger.
(2) Before performing initialization, disable real-time output (RTPOE0 bit = 0).
(3) Once real-time output has been disabled (RTPOE0 bit = 0), be sure to initialize the RTBH0 and RTBL0 registers
before enabling real-time output again (RTPOE0 bit = 0 → 1).
14.1 Overview
The A/D converter converts analog input signals into digital values, has a resolution of 10 bits, and can handle 10
analog input signal channels (ANI0 to ANI9).
The A/D converter has the following features.
{ 10-bit resolution
{ 10 channels (JE3-H (64pin))
6 channels (JC3-H (48pin))
5 channels (JC3-H (40pin))
{ Successive approximation method
{ Operating voltage: AVREF0 = 3.0 to 3.6 V
{ Analog input voltage: 0 V to AVREF0
{ The following functions are provided as operation modes.
• Continuous select mode
• Continuous scan mode
• One-shot select mode
• One-shot scan mode
{ The following functions are provided as trigger modes.
• Software trigger mode
• External trigger mode (external, 1)
• Timer trigger mode
{ Power-fail monitor function (conversion result compare function)
14.2 Functions
14.3 Configuration
AVREF0
ANI0
Sample & hold circuit
ANI1 ADA0CE bit
ANI2
: Voltage comparator
Selector
: &
: Compare voltage
: ADA0CE bit generation DAC AVSS
:
ANI9
SAR
ADA0TMD1 bit
ADA0TMD0 bit
INTAD
INTTAA2CC0
ADA0PFE bit
Selector
Internal bus
Item Configuration
Remark n = 0 to 9
(2) A/D conversion result register n (ADA0CRn), A/D conversion result register nH (ADA0CRnH)
The ADA0CRn register is a 16-bit register that stores the A/D conversion result. ADA0ARn consist of 10 registers
and the A/D conversion result is stored in the 10 higher bits of the AD0CRn register corresponding to analog input.
(The lower 6 bits are fixed to 0.)
(9) Controller
The controller compares the result of the A/D conversion (the value of the ADA0CRnH register) with the value of
the ADA0PFT register when A/D conversion is completed or when the power-fail detection function is used, and
generates the INTAD signal only when a specified comparison condition is satisfied.
Caution Make sure that the voltages input to the ANI0 to ANI9 pins do not exceed the rated values. In
particular if a voltage of AVREF0 or higher is input to a channel, the conversion value of that
channel becomes undefined, and the conversion values of the other channels may also be
affected.
14.4 Registers
(1/2)
ADA0ETS1 ADA0ETS0 Specification of external trigger (ADTRG pin) input valid edge
0 0 No edge detection
0 1 Falling edge detection
1 0 Rising edge detection
1 1 Detection of both rising and falling edges
(2/2)
Cautions 1. Accessing the ADA0M0 register is prohibited in the following statuses. For details,
see 3.4.9 (2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates on the subclock and the main clock oscillation is stopped
• When the CPU operates on the internal oscillation clock
2. A write operation to bit 0 is ignored.
3. Changing the ADA0M1.ADA0FR2 to ADA0M1.ADA0FR0 bits is prohibited while A/D
conversion is enabled (ADA0CE bit = 1).
4. In the following modes, write data to the ADA0M0, ADA0M2, ADA0S, ADA0PFM, or
ADA0PFT registers while A/D conversion is stopped (ADA0CE bit = 0), and then enable
the A/D conversion operation (ADA0CE bit = 1).
• Normal conversion mode
• One-shot select mode/one-shot scan mode in high-speed conversion mode
If the ADA0M0, ADA0M2, ADA0S, ADA0PFM, and ADA0PFT registers are written in
other modes during A/D conversion (ADA0EF bit = 1), the following will be performed
according to the mode.
• In software trigger mode
A/D conversion is stopped and started again from the beginning.
• In hardware trigger mode
A/D conversion is stopped, and the trigger standby status is set.
5. To select the external trigger mode/timer trigger mode (ADA0TMD bit = 1), set the high-
speed conversion mode (ADA0M1.ADA0HS1 bit = 1). Do not input a trigger during
stabilization time that is inserted once after the A/D conversion operation is enabled
(ADA0CE bit = 1).
6. When not using the A/D converter, stop the operation by setting the ADA0CE bit to 0 to
reduce the power consumption.
Cautions 1. Changing the ADA0M1 register is prohibited while A/D conversion is enabled
(ADA0M0.ADA0CE bit = 1).
2. To select the external trigger mode/timer trigger mode (ADA0M0.ADA0TMD bit = 1), set
the high-speed conversion mode (ADA0HS1 bit = 1). Do not input a trigger during the
stabilization time that is inserted once after the A/D conversion operation is enabled
(ADA0CE bit = 1).
3. Be sure to clear bits 6 to 4 to “0”.
Remark For A/D conversion time setting examples, see Tables 14-2 and 14-3.
Table 14-2. Conversion Time Selection in Normal Conversion Mode (ADA0HS1 Bit = 0)
In the normal conversion mode, the conversion is started after the stabilization time elapses after the
ADA0M0.ADA0CE bit is set to 1, and A/D conversion is performed only during the conversion time (2.17 to 9.75
μs). Operation is stopped after the conversion ends and the A/D conversion end interrupt request signal
(INTAD) is generated after the wait time elapses.
Because the conversion operation is stopped during the wait time, operating current can be reduced.
Table 14-3. Conversion Time Selection in High-Speed Conversion Mode (ADA0HS1 Bit = 1)
In the high-speed conversion mode, the conversion is started after the stabilization time elapses after the
ADA0M0.ADA0CE bit is set to 1, and A/D conversion is performed only during the conversion time (2.17 to 9.75
μs). The A/D conversion end interrupt request signal (INTAD) is generated immediately after the conversion
ends.
In continuous conversion mode, the stabilization time is inserted only before the first conversion, and not
inserted after the second conversion (the A/D converter remains running).
7 6 5 4 3 2 1 0
ADA0M2 0 0 0 0 0 0 ADA0TMD1 ADA0TMD0
Cautions 1. In the following modes, write data to the ADA0M2 register while A/D conversion is
stopped (ADA0M0.ADA0CE bit = 0), and then enable the A/D conversion operation
(ADA0CE bit = 1).
• Normal conversion mode
• One-shot select mode/one-shot scan mode in high-speed conversion mode
2. Be sure to clear bits 7 to 2 to “0”.
Cautions 1. In the following modes, write data to the ADA0S register while A/D conversion is
stopped (ADA0M0.ADA0CE bit = 0), and then enable the A/D conversion operation
(ADA0CE bit = 1).
• Normal conversion mode
• One-shot select mode/one-shot scan mode in high-speed conversion mode
2. Be sure to clear bits 7 to 4 to “0”.
Caution Accessing the ADA0CRn and ADA0CRnH registers is prohibited in the following statuses.
For details, see 3.4.9 (2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates on the subclock and the main clock oscillation is stopped
• When the CPU operates on the internal oscillation clock
ADA0CRn AD9 AD8 AD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0 0 0 0 0 0 0
(n = 0 to 9)
7 6 5 4 3 2 1 0
ADA0CRnH AD9 AD8 AD7 AD6 AD5 AD4 AD3 AD2
(n = 0 to 9)
Caution A write operation to the ADA0M0 and ADA0S registers may cause the contents of the
ADA0CRn register to become undefined. After the conversion, read the conversion result
before writing to the ADA0M0 and ADA0S registers. Correct conversion results may not
be read at a timing other than the above.
The relationship between the analog voltage input to the analog input pins (ANI0 to ANI9) and the A/D conversion result
(ADA0CRn register) is as follows.
VIN
SAR = INT ( × 1,024 + 0.5)
AVREF0
ADA0CRNote = SAR × 64
Or,
AVREF0 AVREF0
(SAR − 0.5) × ≤ VIN < (SAR + 0.5) ×
1,024 1,024
The following shows the relationship between the analog input voltage and the A/D conversion results.
Figure 14-2. Relationship Between Analog Input Voltage and A/D Conversion Results
SAR ADA0CRn
1,023 FFC0H
1,022 FF80H
3 00C0H
2 0080H
1 0040H
0 0000H
1 1 3 2 5 3 2,043 1,022 2,045 1,023 2,047 1
2,048 1,024 2,048 1,024 2,048 1,024 2,048 1,024 2,048 1,024 2,048
Input voltage/AVREF0
<7> 6 5 4 3 2 1 0
ADA0PFM ADA0PFE ADA0PFC 0 0 0 0 0 0
Cautions 1. In the select mode, the 8-bit data set to the ADA0PFT register is compared with the
value of the ADA0CRnH register specified by the ADA0S register. If the result matches
the condition specified by the ADA0PFC bit, the conversion result is stored in the
ADA0CRn register and the INTAD signal is generated. If it does not match, however,
the interrupt signal is not generated.
2. In the scan mode, the 8-bit data set to the ADA0PFT register is compared with the
contents of the ADA0CR0H register. If the result matches the condition specified by
the ADA0PFC bit, the conversion result is stored in the ADA0CR0 register and the
INTAD signal is generated. If it does not match, however, the INTAD signal is not
generated. Regardless of the comparison result, the scan operation is continued and
the conversion result is stored in the ADA0CRn register until the scan operation is
completed. However, the INTAD signal is not generated after the scan operation has
been completed.
3. In the following modes, write data to the ADA0PFM register while A/D conversion is
stopped (ADA0M0.ADA0CE bit = 0), and then enable the A/D conversion operation
(ADA0CE bit = 1).
• Normal conversion mode
• One-shot select mode/one-shot scan mode in high-speed conversion mode
7 6 5 4 3 2 1 0
ADA0PFT
Caution In the following modes, write data to the ADA0PFT register while A/D conversion is
stopped (ADA0M0.ADA0CE bit = 0), and then enable the A/D conversion operation
(ADA0CE bit = 1).
• Normal conversion mode
• One-shot select mode/one-shot scan mode in high-speed conversion mode
14.5 Operation
<1> Set the operation mode, trigger mode, and conversion time for executing A/D conversion by using the ADA0M0,
ADA0M1, ADA0M2, and ADA0S registers. When the ADA0CE bit of the ADA0M0 register is set, conversion is
started in the software trigger mode and the A/D converter waits for a trigger in the external or timer trigger mode.
<2> When A/D conversion is started, the voltage input to the selected analog input channel is sampled by the sample
& hold circuit.
<3> When the sample & hold circuit samples the input channel for a specific time, it enters the hold status, and holds
the input analog voltage until A/D conversion is complete.
<4> Set bit 9 of the successive approximation register (SAR), and set the compare voltage generation DAC to (1/2)
AVREF0.
<5> The voltage difference between the voltage of the compare voltage generation DAC and the analog input voltage
is compared by the voltage comparator. If the analog input voltage is higher than (1/2) AVREF0, the MSB of the
SAR remains set. If it is lower than (1/2) AVREF0, the MSB is reset.
<6> Next, bit 8 of the SAR is automatically set and the next comparison is started. Depending on the value of bit 9, to
which a result has been already set, the compare voltage generation DAC is selected as follows.
• Bit 9 = 1: (3/4) AVREF0
• Bit 9 = 0: (1/4) AVREF0
This compare voltage and the analog input voltage are compared and, depending on the result, bit 8 is
manipulated as follows.
Analog input voltage ≥ Compare voltage: Bit 8 = 1
Analog input voltage ≤ Compare voltage: Bit 8 = 0
<8> When comparison of the 10 bits is complete, the valid digital result remains in the SAR, and is then transferred to
and stored in the ADA0CRn register. After that, an A/D conversion end interrupt request signal (INTAD) is
generated.
<9> In one-shot select mode, conversion is stoppedNote. In one-shot scan mode, conversion is stopped after scanning
Note
once . In continuous select mode, repeat steps <2> to <8> until the ADA0M0.ADA0CE bit is cleared to 0. In
continuous scan mode, repeat steps <2> to <8> for each channel.
Note In the external trigger mode, timer trigger mode 0, or timer trigger mode 1, the trigger standby status is
entered.
Remark The trigger standby status means the status after the stabilization time has elapsed.
ADA0M0.ADA0CE bit
First conversion Second conversion
INTAD signal
ADA0M0.ADA0CE bit
First conversion Second conversion
INTAD signal
Remark The above timings are applicable when a trigger is generated within the stabilization time. If a
trigger is generated after the stabilization time has elapsed, a trigger response time is inserted.
Caution To select the external trigger mode, set the high-speed conversion mode. Do not input a trigger
during the stabilization time that is inserted once after the A/D conversion operation is enabled
(ADA0M0.ADA0CE bit = 1).
Remark The trigger standby status means the status after the stabilization time has elapsed.
Caution To select the timer trigger mode, set the high-speed conversion mode. Do not input a trigger
during the stabilization time that is inserted once after the A/D conversion operation is enabled
(ADA0M0.ADA0CE bit = 1).
Remark The trigger standby status means the status after the stabilization time has elapsed.
Figure 14-4. Timing Example of Continuous Select Mode Operation (ADA0S Register = 01H)
ANI1
Data 4 Data 5
Data 1 Data 2 Data 3 Data 6 Data 7
INTAD
Figure 14-5. Timing Example of Continuous Scan Mode Operation (ADA0S Register = 03H)
ANI0
Data 1 Data 5
ANI1 Data 6
Data 2
Data 7
Data 3
ANI2
ANI3
Data 4
INTAD
Conversion start
Set ADA0CE bit = 1
ANI0 ADA0CR0
ANI1 ADA0CR1
ANI2 ADA0CR2
ANI3 A/D converter ADA0CR3
ANI4 ADA0CR4
ANI5 ADA0CR5
ANI6 ADA0CR6
ANI7 ADA0CR7
ANI8 ADA0CR8
ANI9 ADA0CR9
Figure 14-6. Timing Example of One-Shot Select Mode Operation (ADA0S Register = 01H)
ANI1
Data 4 Data 5
Data 1 Data 2 Data 3 Data 6 Data 7
Data 1 Data 6
A/D conversion
(ANI1) (ANI1)
INTAD
Figure 14-7. Timing Example of One-Shot Scan Mode Operation (ADA0S Register = 03H)
ANI0
Data 1
ANI1
Data 2
ANI2 Data 3
ANI3
Data 4
INTAD
ANI0 ADA0CR0
ANI1 ADA0CR1
ANI2 ADA0CR2
ANI3 A/D converter ADA0CR3
ANI4 ADA0CR4
ANI5 ADA0CR5
ANI6 ADA0CR6
ANI7 ADA0CR7
ANI8 ADA0CR8
ANI9 ADA0CR9
• When the ADA0PFM.ADA0PFE bit = 0, the INTAD signal is generated each time conversion is completed (normal
use of the A/D converter).
• When the ADA0PFE bit = 1 and when the ADA0PFM.ADA0PFC bit = 0, the value of the ADA0CRnH register is
compared with the value of the ADA0PFT register when conversion is completed, and the INTAD signal is generated
only if ADA0CRnH ≥ ADA0PFT.
• When the ADA0PFE bit = 1 and when the ADA0PFC bit = 1, the value of the ADA0CRnH register is compared with
the value of the ADA0PFT register when conversion is completed, and the INTAD signal is generated only if
ADA0CRnH < ADA0PFT.
Remark n = 0 to 9
In the power-fail compare mode, four modes are available as modes in which to set the ANI0 to ANI9 pins: continuous
select mode, continuous scan mode, one-shot select mode, and one-shot scan mode.
ANI1
Data 4 Data 5
Data 1 Data 2 Data 3 Data 6 Data 7
INTAD
ANI0
Data 1 Data 5
ANI1 Data 6
Data 2
Data 7
Data 3
ANI2
ANI3
Data 4
INTAD
ADA0PFT ADA0PFT
match unmatch
Conversion start
Set ADA0CE bit = 1
ANI0 ADA0CR0
ANI1 ADA0CR1
ANI2 ADA0CR2
ANI3 A/D converter ADA0CR3
ANI4 ADA0CR4
ANI5 ADA0CR5
ANI6 ADA0CR6
ANI7 ADA0CR7
ANI8 ADA0CR8
ANI9 ADA0CR9
ANI1
Data 4 Data 5
Data 1 Data 2 Data 3 Data 6 Data 7
Data 1 Data 6
A/D conversion
(ANI1) (ANI1)
INTAD
ANI0
Data 1
ANI1
Data 2
ANI2 Data 3
ANI3
Data 4
INTAD
ADA0PFT
match
Conversion start Conversion end
Set ADA0CE bit = 1
ANI0 ADA0CR0
ANI1 ADA0CR1
ANI2 ADA0CR2
ANI3 A/D converter ADA0CR3
ANI4 ADA0CR4
ANI5 ADA0CR5
ANI6 ADA0CR6
ANI7 ADA0CR7
ANI8 ADA0CR8
ANI9 ADA0CR9
14.6 Cautions
ANI0 to ANI9
AVSS
VSS
INTAD
Remark n = 0 to 9
m = 0 to 9
RIN
ANIn
CIN
RIN CIN
14 kΩ 8.4 pF
(a) The AVREF0 pin is used as the power supply pin of the A/D converter and also supplies power to the alternate-
function ports. In an application where a backup power supply is used, be sure to supply the same potential as
VDD to the AVREF0 pin as shown in Figure 14-15.
(b) The AVREF0 pin is also used as the reference voltage pin of the A/D converter. If the source supplying power to
the AVREF0 pin has a high impedance or if the power supply has a low current supply capability, the reference
voltage may fluctuate due to the current that flows during conversion (especially, immediately after the
conversion operation enable bit ADA0CE has been set to 1). As a result, the conversion accuracy may drop.
To avoid this, it is recommended to connect a capacitor across the AVREF0 and AVSS pins to suppress the
reference voltage fluctuation as shown in Figure 14-15.
(c) If the source supplying power to the AVREF0 pin has a high DC resistance (for example, because of insertion of
a diode), the voltage when conversion is enabled may be lower than the voltage when conversion is stopped,
because of a voltage drop caused by the A/D conversion current.
Note
AVREF0
AVSS
• When the same channel is used for A/D conversions, if the voltage is higher or lower than the previous A/D
conversion, then hysteresis characteristics may appear in which the conversion result is affected by the
previous value. Thus, even if the conversion is performed at the same potential, the result may vary.
• When switching the analog input channel, hysteresis characteristics may appear in which the conversion result
is affected by the previous channel value. This is because one A/D converter is used for the A/D conversions.
Thus, even if the conversion is performed at the same potential, the result may vary.
(1) Resolution
The minimum analog input voltage that can be recognized, i.e., the ratio of an analog input voltage to 1 bit of digital
output is called 1 LSB (least significant bit). The ratio of 1 LSB to the full scale is expressed as %FSR (full-scale
range). %FSR is the ratio of a range of convertible analog input voltages expressed as a percentage, and can be
expressed as follows, independently of the resolution.
1%FSR = (Maximum value of convertible analog input voltage – Minimum value of convertible analog
input voltage)/100
= (AVREF0 − 0)/100
= AVREF0/100
1......1
Ideal line
Digital output
Overall error
0......0
0 AVREF0
Analog input
1......1
Digital output
0......0
0 AVREF0
Analog input
111
Digital output (lower 3 bits)
Ideal line
100
Zero-scale error
011
010
001
000
−1 0 1 2 3 AVREF0
Analog input (LSB)
Full-scale error
Digital output (lower 3 bits)
111
100
011
010
000
0 AVREF0 − 3 AVREF0 − 2 AVREF0 − 1 AVREF0
Analog input (LSB)
1......1
Differential
linearity error
0......0
AVREF0
Analog input
1......1
Ideal line
Digital output
Integral
linearity error
0......0
0 AVREF0
Analog input
Sampling time
Conversion time
15.1 Functions
8-bit resolution
1 channels (DA0CS0)
R-2R ladder method
Settling time: 3 μs (target). (when AVREF1 is 3.0 to 3.6 V and external load is 20 pF)
Analog output voltage: AVREF1 × m/256 (m = 0 to 255; value set to DA0CS0 register)
Operation modes: Normal mode, real-time output mode
15.2 Configuration
INTTAA2CC0 signal
ANO0 pin
DA0M.DACE0 bit
AVREF1 pin Selector
AVSS pin
Item Configuration
15.3 Registers
< >
DA0M 0 0 0 DA0CE0 0 0 0 DA0MD0
Note The output trigger in the real-time output mode (DA0MD0 bit = 1) is INTTAA2CC0 signal
(see CHAPTER 6 16-BIT TIMER/EVENT COUNTER AA (TAA)).
Caution In the real-time output mode (DA0M.DA0MD0 bit = 1), set the DA0CS0 register before the
INTTAA2CC0 signals are generated. D/A conversion starts when the INTTAA2CC0 signals are
generated.
15.4 Operation
Remark For the alternate-function pin settings, see Table 4-17 Using Port Pins as Alternate-Function Pins.
Remarks 1. The output values of the ANO0 pin up to <5> above are undefined.
2. For the output values of the ANO0 pin in the HALT, IDLE1, IDLE2, and STOP modes, see CHAPTER 24
STANDBY FUNCTION.
3. For the alternate-function pin settings, see Table 4-17 Using Port Pins as Alternate-Function Pins.
15.4.3 Cautions
Observe the following cautions when using the D/A converter of the V850ES/JC3-H (48 pin) and V850ES/JE3-H.
(1) Do not change the set value of the DA0CS0 register while the trigger signal is being issued in the real-time output
mode.
(2) Before changing the operation mode, be sure to clear the DA0M.DA0CE0 bit to 0.
(3) When using one of the P10/ANO0 pin as an I/O port and the other as a D/A output pin, do so in an application
where the port I/O level does not change during D/A output.
(4) Make sure that AVREF0 = VDD = AVREF1 = 3.0 to 3.6 V. If this range is exceeded, the operation is not guaranteed.
(6) No current can be output from the ANO0 pin because the output impedance of the D/A converter is high. When
connecting a resistor of 2 MΩ or less, insert a JFET input operational amplifier between the resistor and the ANOn
pin.
−
Output
ANO0 +
JFET input
operational amplifier
AVREF0 VDD
0.1 μF 10 μ F
AVSS
AVREF1
0.1 μF 10 μ F
(7) Because the D/A converter stops operating in the STOP mode, the ANO0 pin go into a high-impedance state, and
the power consumption can be reduced.
In the IDLE1, IDLE2, or subclock operation mode, however, operation continues. To lower the power consumption,
therefore, clear the DA0M.DA0CE0 bit to 0.
16.1 Features
{ Transfer rate: 300 bps to 3 Mbps (using internal system clock of 24 MHz and dedicated baud rate generator)
{ Full-duplex communication: Internal UARTCn receive data register (UCnRX)
Internal UARTCn transmit data register (UCnTX)
{ 2-pin configuration: TXDCn: Transmit data output pin
RXDCn: Receive data input pin
{ Reception error detection function
• Parity error
• Framing error
• Overrun error
• LIN communication data consistency error detect function
• SBF reception success detect function
{ Interrupt sources: 2 types
• Reception completion interrupt (INTUCnR): This interrupt occurs upon transfer of receive data from the receive
shift register to the receive data register after serial transfer is
complete, in the reception enabled status.
• Transmission enable interrupt (INTUCnT): This interrupt occurs upon transfer of transmit data from the
transmit data register to the transmit shift register in the
transmission enabled status.
{ Character length: 7 to 9 bits
{ Parity function: Odd, even, 0, none
{ Transmission stop bit: 1, 2 bits
{ On-chip dedicated baud rate generator
{ MSB-/LSB-first transfer selectable
{ Transmit/receive data inverted input/output possible
{ SBF (Sync Break Field) transmission in the LIN (Local Interconnect Network) communication format
• 13 to 20 bits selectable for the SBF transmission
• Recognition of 11 bits or more possible for SBF reception
• SBF reception flag provided
16.2 Configuration
Internal bus
INTUCnT
INTUCnR
RXDCn
Selector
fXX to fXX/210
selector
Clock
ASCKC0Note
UCnCTL1
UCnCTL0 UCnSTR UCnOPT0
UCnCTL2
Internal bus
Item Configuration
Caution The transmit/receive operation of CSIF4 and UARTC0 is not guaranteed if these functions are
switched during transmission or reception. Be sure to disable the one that is not used.
Caution The transmit/receive operation of UARTC2 and CSIF3 is not guaranteed if these functions are
switched during transmission or reception. Be sure to disable the one that is not used.
15 14 13 12 11 10 9 8
PMC9 0 0 PMC913 PMC912 PMC911 PMC910 0 0
15 14 13 12 11 10 9 8
15 14 13 12 11 10 9 8
2
16.3.3 Mode switching between UARTC3, I C00 and CAN0
In the V850ES/JC3-H (48 pin) and V850ES/JE3-H, UARTC3, I2C00, and CAN0 (μPD70F3819, 70F3825 only) share the
same pins and therefore cannot be used simultaneously. Set UARTC3 in advance, using the PMC3, PFC3 and PFCE3
registers, before use.
Caution The transmit/receive operation of UARTC3, I2C00, and CAN0 (μPD70F3819, 70F3825 only) is not
guaranteed if these functions are switched during transmission or reception. Be sure to disable the
one that is not used.
15 14 13 12 11 10 9 8
PMC9 0 0 PMC913 PMC912 PMC911 PMC910 0 0
15 14 13 12 11 10 9 8
15 14 13 12 11 10 9 8
2
16.3.4 Mode switching between UARTC4, CSIF0, and I C01
In the V850ES/JC3-H and V850ES/JE3-H, UARTC4, CSIF0, and I2C01 share the same pin and therefore cannot be
used simultaneously. Set UARTC4 in advance, using the PMC4, PFC4, and PMCE4 registers, before use.
Caution The transmit/receive operation of UARTC4, CSIF0, and I2C01 is not guaranteed if these functions are
switched during transmission or reception. Be sure to disable the one that is not used.
16.4 Registers
(1/2)
(2/2)
UCnPS1 UCnPS0 Parity selection during transmission Parity selection during reception
0 0 No parity output Reception with no parity
0 1 0 parity output Reception with 0 parity
1 0 Odd parity output Odd parity check
1 1 Even parity output Even parity check
• This register is rewritten only when the UCnPWR bit = 0 or the UCnTXE bit = the
UCnRXE bit = 0.
• If “Reception with 0 parity” is selected during reception, a parity check is not performed.
Therefore, the UCnSTR.UCnPE bit is not set.
• When transmission and reception are performed in the LIN format, clear the
UCnPS1 and UCnPS0 bits to 00.
Remark For details of parity, see 16.6.9 Parity types and operations.
(1/2)
<7> 6 5 4 3 2 1 0
UCnOPT0 UCnSRF UCnSRT UCnSTT UCnSLS2 UCnSLS1 UCnSLS0 UCnTDL UCnRDL
(n = 0, 2 to 4)
UCnSRF SBF reception flag
0 When the UCnCTL0.UCnPWR bit = UCnCTL0.UCnRXE bit = 0 are set, or
upon normal end of SBF reception.
1 During SBF reception
Caution Do not set the UCnSRT and UCnSTT bits (to 1) during SBF reception (UCnSRF bit = 1).
(2/2)
Caution Set the UCnEBE bit while the operation of UARTC is disabled (UCnCTL0.UCnPWR = 0).
7 6 5 4 3 2 1 0
UCnOPT1 0 0 0 0 0 0 0 UCnEBE
(n = 0 , 2 to 4)
The following shows the relationship between the register setting value and the data format.
0 0 0 0 0 Data Stop − − −
0 Other than 00 Data Parity Stop − −
1 0 0 Data Data Stop − −
1 Other than 00 Data Data Parity Stop −
0 0 0 1 0 Data Stop Stop − −
0 Other than 00 Data Parity Stop Stop −
1 0 0 Data Data Stop Stop −
1 Other than 00 Data Data Parity Stop Stop
0 0 0 0 1 Data Stop − − −
0 Other than 00 Data Parity Stop − −
1 0 0 Data Data Data Stop −
1 Other than 00 Data Data Parity Stop −
0 0 0 1 1 Data Stop Stop − −
0 Other than 00 Data Parity Stop Stop −
1 0 0 Data Data Data Stop Stop
1 Other than 00 Data Data Parity Stop Stop
(7) UARTCn receive data register L (UCnRXL) and UARTCn receive data register (UCnRX)
The UCnRXL and UCnRX register are an 8- bit or 9-bit buffer register that stores parallel data converted by the
receive shift register.
The data stored in the receive shift register is transferred to the UCnRXL and UCnRX register upon completion of
reception of 1 byte of data.
During LSB-first reception when the data length has been specified as 7 bits, the receive data is transferred to bits
6 to 0 of the UCnRXL register and the MSB always becomes 0. During MSB-first reception, the receive data is
transferred to bits 7 to 1 of the UCnRXL register and the LSB always becomes 0.
When an overrun error (UCnOVE) occurs, the receive data at this time is not transferred to the UCnRXL and
UCnRX register and is discarded.
The access unit or reset value differs depending on the character length.
7 6 5 4 3 2 1 0
UCnRXL
(n = 0, 2 to 4)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
UCnRX 0 0 0 0 0 0 0
(n = 0 , 2 to 4)
(8) UARTCn transmit data register L (UCnTXL), UARTCn transmit data register (UCnTX)
The UCnTXL and UCnTX register is an 8-bit or 9-bit register used to set transmit data.
During LSB-first transmission when the data length has been specified as 7 bits, the transmit data is transferred to
bits 6 to 0 of the UCnRX register. During MSB-first transmission, the receive data is transferred to bits 7 to 1 of the
UCnRX register.
The access unit or reset value differs depending on the character length.
Cautions 1. In the transmission operation enable status (UCnPWR = 1 and UCnTXE = 1), Writing to the
UCnTXL, UCnTX register, as operate as trigger of transmission star, if writing the value of as
soon as before and save value, before the INTUCnT interrupt is occurred, the same data is
transferred at twice.
2. Data writing for consecutive transmission, after be generated the INTUCnT interrupt.
If writing the next data before the INTUCnT interrupt is occurred, transmission start
processing and source of conflict writing the UCnTXL, UCnTX register, unexpected
operations may occur.
3. If perform to write the UCnTXL, UCnTXLin the disable transmission operation register, can
not be used as transmission start trigger. Consequently, even if transmission enable
status after perform to write the UCnTXL, UCnTX register in the disable transmission
operation status, can not be started transmission.
7 6 5 4 3 2 1 0
UCnTXL
(n = 0, 2 to 4)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
UCnTX 0 0 0 0 0 0 0
(n = 0, 2 to 4)
The following two interrupt request signals are generated from UARTCn.
The default priority for these two interrupt request signals is reception completion interrupt request signal then
transmission enable interrupt request signal.
Interrupt Priority
16.6 Operation
(a) 8-bit data length, LSB first, even parity, 1 stop bit, transfer data: 55H
1 data frame
(b) 8-bit data length, MSB first, even parity, 1 stop bit, transfer data: 55H
1 data frame
(c) 8-bit data length, MSB first, even parity, 1 stop bit, transfer data: 55H, TXDCn inversion
1 data frame
(d) 7-bit data length, LSB first, odd parity, 2 stop bits, transfer data: 36H
1 data frame
(e) 8-bit data length, LSB first, no parity, 1 stop bit, transfer data: 87H
1 data frame
Start Stop
D0 D1 D2 D3 D4 D5 D6 D7
bit bit
Remark LIN stands for Local Interconnect Network and is a low-speed (1 to 20 kbps) serial communication protocol
intended to aid the cost reduction of an automotive network.
LIN communication is single-master communication, and up to 15 slaves can be connected to one master.
The LIN slaves are used to control the switches, actuators, and sensors, and these are connected to the LIN
master via the LIN network.
Normally, the LIN master is connected to a network such as CAN (Controller Area Network).
In addition, the LIN bus uses a single-wire method and is connected to the nodes via a transceiver that
complies with ISO9141.
In the LIN protocol, the master transmits a frame with baud rate information and the slave receives it and
corrects the baud rate error. Therefore, communication is possible when the baud rate error in the slave is
±15% or less.
Figures 16-8 and 16-9 outline the transmission and reception manipulations of LIN.
LIN
bus
TXDCn (output)
SBF transmissionNote 4
INTUCnT
interrupt
LIN
bus
SBF
RXDCn (input) Disable Enable
reception
Note 3
Edge detection
Note 4
Notes 1. The wakeup signal is sent by the pin edge detector, UARTCn is enabled, and the SBF reception
mode is set.
2. The receive operation is performed until detection of the stop bit. Upon detection of SBF reception
of 11 or more bits, normal SBF reception end is judged, and an interrupt signal is output. Upon
detection of SBF reception of less than 11 bits, an SBF reception error is judged, no interrupt signal
is output, and the mode returns to the SBF reception mode.
3. If SBF reception ends normally, an interrupt request signal is output. The timer is enabled by an SBF
reception completion interrupt. Moreover, error detection for the UCnSTR.UCnOVE,
UCnSTR.UCnPE, and UCnSTR.UCnFE bits is suppressed and UART communication error
detection processing and UARTCn receive shift register and data transfer of the UCnRX register are
not performed. The UARTCn receive shift register holds the initial value, FFH.
4. The RXDCn pin is connected to TI (capture input) of the timer, the transfer rate is calculated, and the
baud rate error is calculated. The value of the UCnCTL2 register obtained by correcting the baud
rate error after dropping UARTC enable is set again, causing the status to become the reception
status.
5. Check-sum field distinctions are made by software. UARTCn is initialized following CSF reception,
and the processing for setting the SBF reception mode again is performed by software.
TXDCn Stop
1 2 3 4 5 6 7 8 9 10 11 12 13
bit
INTUCnT
interrupt
(a) Normal SBF reception (detection of stop bit in more than 10.5 bits)
RXDCn 1 2 3 4 5 6 7 8 9 10 11
11.5
UCnSRF
INTUCnR
interrupt
(b) SBF reception error (detection of stop bit in 10.5 or fewer bits)
RXDCn 1 2 3 4 5 6 7 8 9 10
10.5
UCnSRF
INTUCnR
interrupt
INTUCnT
Caution When initializing transmissions during the execution of continuous transmissions, make sure that
the UCnSTR.UCnTSF bit is 0, then perform the initialization. Transmit data that is initialized when the
UCnTSF bit is 1 cannot be guaranteed.
Start
Register settings
UCnTX write
No
Occurrence of transmission
interrupt?
Yes
Required number of No
writes performed?
Yes
End
TXDCn Start Data (1) Parity Stop Start Data (2) Parity Stop Start
Transmission
Data (1) Data (2)
shift register
INTUCnT
UCnTSF
TXDCn Parity Stop Start Data (n – 1) Parity Stop Start Data (n) Parity Stop
INTUCnT
UCnTSF
INTUCnR
UCnRX
Cautions 1. Be sure to read the UCnRX register even when a reception error occurs. If the UCnRX register is
not read, an overrun error occurs during reception of the next data, and reception errors continue
occurring indefinitely.
2. The operation during reception is performed assuming that there is only one stop bit. A second
stop bit is ignored.
3. When reception is completed, read the UCnRX register after the reception completion interrupt
request signal (INTUCnR) has been generated, and clear the UCnPWR or UCnRXE bit to 0. If the
UCnPWR or UCnRXE bit is cleared to 0 before the INTUCnR signal is generated, the read value of
the UCnRX register cannot be guaranteed.
4. If receive completion processing (INTUCnR signal generation) of UARTCn and the UCnPWR bit =
0 or UCnRXE bit = 0 conflict, the INTUCnR signal may be generated in spite of these being no data
stored in the UCnRX register.
To complete reception without waiting for the INTUCnR signal to be generated, be sure to set (1)
the interrupt mask flag (UCnRMK) of the interrupt control register (UCnRIC), clear (0) the UCnPWR
bit or UCnRXE bit, and then clear the interrupt request flag (UCnRIF) of the UCnRIC register.
START
INTUCnR signal No
generated?
Yes
No
Error occurs?
Yes
Error processing
END
Caution When an INTUCnR signal is generated, the UCnSTR register must be read to check for errors.
When reception errors occur, perform the following procedures depending upon the kind of error.
• Parity error
If false data is received due to problems such as noise in the reception line, discard the received data and retransmit.
• Framing error
A baud rate error may have occurred between the reception side and transmission side or the start bit may have
been erroneously detected. Since this is a fatal error for the communication format, check the operation stop in the
transmission side, perform initialization processing each other, and then start the communication again.
• Overrun error
Since the next reception is completed before reading receive data, 1 frame of data is discarded. If this data was
needed, do a retransmission.
Caution If a receive error interrupt occurs during continuous reception, read the contents of the UCnSTR
register must be read before the next reception is completed, then perform error processing.
Caution When using the LIN function, fix the UCnCTL0.UCnPS1 and UCnCTL0.UCnPS0 bits to 00.
The parity bit is used to detect bit errors in the communication data. Normally the same parity is used on the
transmission side and the reception side.
In the case of even parity and odd parity, it is possible to detect odd-count bit errors. In the case of 0 parity and no
parity, errors cannot be detected.
(c) 0 parity
During transmission, the parity bit is always made 0, regardless of the transmit data.
During reception, parity bit check is not performed. Therefore, no parity error occurs, regardless of whether the
parity bit is 0 or 1.
(d) No parity
No parity bit is added to the transmit data.
Reception is performed assuming that there is no parity bit. No parity error occurs since there is no parity bit.
Match
detector LD_EN
Base clock
RXDCn (input)
Internal signal A
Internal signal B
Internal signal C
The dedicated baud rate generator consists of a source clock selector block and an 8-bit programmable counter, and
generates a serial clock during transmission and reception with UARTCn. Regarding the serial clock, a dedicated baud
rate generator output can be selected for each channel.
There is an 8-bit counter for transmission and another one for reception.
UCnPWR
fXX/2
fXX/4
fXX/8 UCnPWR, UCnTXEn bits
(or UCnRXE bit)
fXX/16
fXX/32
fXX/64
Selector 8-bit counter
fXX/128 fUCLK
fXX/256
fXX/512
fXX/1024
fXX/2048
Match detector 1/2 Baud rate
ASCKC0Note
UCnCTL1: UCnCTL2:
UCnCKS3 to UCnCKS0 UCnBRS7 to UCnBRS0
Caution Clear the UCnCTL0.UCnPWR bit to 0 before rewriting the UCnCTL1 register.
7 6 5 4 3 2 1 0
UCnCTL1 0 0 0 0 UCnCKS3UCnCKS2 UCnCKS1 UCnCKS0
(n = 0, 2 to 4)
Caution Clear the UCnCTL0.UCnPWR bit to 0 or clear the UCnTXE and UCnRXE bits to 00 before rewriting
the UCnCTL2 register.
7 6 5 4 3 2 1 0
UCnCTL2 UCnBRS7 UCnBRS6 UCnBRS5UCnBRS4 UCnBRS3UCnBRS2 UCnBRS1 UCnBRS0
(n = 0, 2 to 4)
UCn UCn UCn UCn UCn UCn UCn UCn Default Serial
BRS7 BRS6 BRS5 BRS4 BRS3 BRS2 BRS1 BRS0 (k) clock
Setting
0 0 0 0 0 0 × × × prohibited
0 0 0 0 0 1 0 0 4 fUCLK/4
0 0 0 0 0 1 0 1 5 fUCLK/5
0 0 0 0 0 1 1 0 6 fUCLK/6
: : : : : : : : : :
1 1 1 1 1 1 0 0 252 fUCLK/252
1 1 1 1 1 1 0 1 253 fUCLK/253
1 1 1 1 1 1 1 0 254 fUCLK/254
1 1 1 1 1 1 1 1 255 fUCLK/255
fUCLK
Baud rate = [bps]
2×k
When using the internal clock, the equation will be as follows (when using the ASCKC0 pin as clock at
UARTC0, calculate using the above equation).
fXX
Baud rate = [bps]
×k
m+1
2
Remark fUCLK = Frequency of base clock selected by the UCnCTL1.UCnCKS3 to UCnCTL1.UCnCKS0 bits
fXX: Main clock frequency
m = Value set using the UCnCTL1.UCnCKS3 to UCnCTL1.UCnCKS0 bits (m = 0 to 10)
k = Value set using the UCnCTL2.UCnBRS7 to UCnCTL2.UCnBRS0 bits (k = 4 to 255)
fUCLK
= − 1 × 100 [%]
2 × k × Target baud rate
When using the internal clock, the equation will be as follows (when using the ASCKC0 pin input as the
clock for UARTC0, calculate the baud rate error using the above equation).
fXX
Error (%) = − 1 × 100 [%]
× k × Target baud rate
m+1
2
Cautions 1. The baud rate error during transmission must be within the error tolerance on the
receiving side.
2. The baud rate error during reception must satisfy the range indicated in (5) Allowable
baud rate range during reception.
To set the baud rate, perform the following calculation for setting the UCnCTL1 and UCnCTL2 registers (when
using internal clock).
Example: When fXX = 48 MHz and target baud rate = 153,600 bps
<1> k = 480,000,000/2/(2 × 153,600) = 78.125…, m = 0
<2>, <3> k = 78.125… < 256, m = 0
<4> Set value of UCnCTL2 register: k = 78 = 4EH, set value of UCnCTL1 register: m = 0
300 08H 9CH 0.16 07H D0H 0.16 07H 9CH −2.3
600 07H 9CH 0.16 06H D0H 0.16 06H 9CH 0.16
1,200 06H 9CH 0.16 05H D0H 0.16 05H 9CH 0.16
2,400 05H 9CH 0.16 04H D0H 0.16 04H 9CH 0.16
4,800 04H 9CH 0.16 03H D0H 0.16 03H 9CH 0.16
9,600 03H 9CH 0.16 02H D0H 0.16 02H 9CH 0.16
19,200 02H 9CH 0.16 01H D0H 0.16 01H 9CH 0.16
31,250 01H C0H 0.00 01H 80H 0.00 00H C0H 0.00
38,400 01H 9CH 0.16 00H D0H 0.16 00H 9CH 0.16
76,800 00H 9CH 0.16 00H 68H 0.16 00H 4EH 0.16
153,600 00H 4EH 0.16 00H 34H 0.16 00H 27H 0.16
312,500 00H 26H 1.05 00H 1AH −1.54 00H 13H 1.05
625,000 00H 13H 1.05 00H 0DH −1.54 00H 0AH −4.00
1,000,000 00H 0CH 0.00 00H 08H 0.00 00H 06H 0.00
1,250,000 00H 0AH −4.00 Setting prohibited 00H 05H −4.00
2,000,000 00H 06H 0.00 00H 04H 0.00 Setting prohibited
2,500,000 00H 05H −4.00 Setting prohibited
3,000,000 00H 04H 0.00
Caution The baud rate error during reception must be set within the allowable error range using the
following equation.
Latch timing
UARTCn
Start bit Bit 0 Bit 1 Bit 7 Parity bit Stop bit
transfer rate
FL
1 data frame (11 × FL)
Minimum
Start bit Bit 0 Bit 1 Bit 7 Parity bit Stop bit
allowable
transfer rate
FLmin
Maximum Start bit Bit 0 Bit 1 Bit 7 Parity bit Stop bit
allowable
transfer rate
FLmax
As shown in Figure 16-20, the receive data latch timing is determined by the counter set using the UCnCTL2
register following start bit detection. The transmit data can be normally received if up to the last data (stop bit) can
be received in time for this latch timing.
When this is applied to 11-bit reception, the following is the theoretical result.
FL = (Brate)−1
k−2 21k + 2
Minimum allowable transfer rate: FLmin = 11 × FL − × FL = FL
2k 2k
Therefore, the maximum baud rate that can be received by the destination is as follows.
22k
BRmax = (FLmin/11)−1 = Brate
21k + 2
Similarly, obtaining the following maximum allowable transfer rate yields the following.
10 k+2 21k − 2
× FLmax = 11 × FL − × FL = FL
11 2×k 2×k
21k − 2
FLmax = FL × 11
20 k
Therefore, the minimum baud rate that can be received by the destination is as follows.
20k
BRmin = (FLmax/11)−1 = Brate
21k − 2
Obtaining the allowable baud rate error for UARTCn and the destination from the above-described equations for
obtaining the minimum and maximum baud rate values yields the following.
Division Ratio (k) Maximum Allowable Baud Rate Error Minimum Allowable Baud Rate Error
4 +2.32% −2.43%
8 +3.52% −3.61%
20 +4.26% −4.30%
50 +4.56% −4.58%
100 +4.66% −4.67%
255 +4.72% −4.72%
Remarks 1. The reception accuracy depends on the bit count in 1 frame, the input clock
frequency, and the division ratio (k). The higher the input clock frequency and
the larger the division ratio (k), the higher the accuracy.
2. k: Set value of UCnCTL2.UCnBRS7 to UCnCTL2.UCnBRS0 bits (n = 0 to 2, 4)
Start bit Bit 0 Bit 1 Bit 7 Parity bit Stop bit Start bit Bit 0
FL FL FL FL FL FLstp FL FL
The following equation can be obtained assuming 1 bit data length: FL; stop bit length: FLstp; and base clock
frequency: fUCLK.
FLstp = FL + 2/fUCLK
16.8 Cautions
(1) When the clock supply to UARTCn is stopped (for example, in IDLE1, IDLE2, or STOP mode), the operation stops
with each register retaining the value it had immediately before the clock supply was stopped. The TXDCn pin
output also holds and outputs the value it had immediately before the clock supply was stopped. However, the
operation is not guaranteed after the clock supply is resumed. Therefore, after the clock supply is resumed, the
circuits should be initialized by setting the UCnCTL0.UCnPWR, UCnCTL0.UCnRXEn, and UCnCTL0.UCnTXEn
bits to 000.
(4) In transmit mode (UCnCTL0.UCnPWR bit = 1 and UCnCTL0.UCnTXE bit = 1), do not overwrite the same value to
the UCnTX register by software because transmission starts by writing to this register. To transmit the same value
continuously, overwrite the same value.
(5) In continuous transmission, the communication rate from the stop bit to the next start bit is extended 2 base clocks
more than usual. However, the reception side initializes the timing by detecting the start bit, so the reception result
is not affected.
Caution The transmit/receive operation of CSIF4 and UARTC0 is not guaranteed if these functions are
switched during transmission or reception. Be sure to disable the one that is not used.
7 6 5 4 3 2 1 0
Remarks 1. n = 0, 1
2. × = don’t care
2
17.1.2 CSIF0, UARTC4, and I C01 mode switching
In the V850ES/JC3-H and V850ES/JE3-H, CSIF0, UARTC4, and I2C01 share the same pins and therefore cannot be
used simultaneously. Switching among CSIF0, UARTC4, and I2C01 must be set in advance, using the PMC4, PFC4, and
PFCE4 registers.
Caution The transmit/receive operation of CSIF0, UARTC4, and I2C01 is not guaranteed if these functions are
switched during transmission or reception. Be sure to disable the one that is not used.
7 6 5 4 3 2 1 0
Remarks 1. n = 0, 1
2. × = don’t care
Caution The transmit/receive operation of CSIF3 and UARTC2 is not guaranteed if these functions are
switched during transmission or reception. Be sure to disable the one that is not used.
15 14 13 12 11 10 9 8
PMC9 0 0 PMC913 PMC912 PMC911 PMC910 0 0
15 14 13 12 11 10 9 8
15 14 13 12 11 10 9 8
Remarks 1. n = 0, 1
2. × = don’t care
17.2 Features
{ Transfer rate: 12 Mbps max. (fXX = 48 MHz, using internal clock, CSIF3)
8 Mbps (fXX = 48 MHz, using internal clock, CSIF0, CSIF2, CSIF4)
{ Master mode and slave mode selectable
{ 8-bit to 16-bit transfer, 3-wire serial interface
{ Interrupt request signals (INTCFnT, INTCFnR) × 2
{ Serial clock and data phase switchable
{ Transfer data length selectable in 1-bit units between 8 and 16 bits
{ Transfer data MSB-first/LSB-first switchable
{ 3-wire transfer SOFn: Serial data output
SIFn: Serial data input
SCKFn: Serial clock I/O
{ Transmission mode, reception mode, and transmission/reception mode specifiable
Remark n = 0, 2 to 4
17.3 Configuration
Internal bus
CFnSTR
INTCFnT
Controller
INTCFnR
fXX/3
fXX/4
fXX/6
Selector
Note
fXX/8
fXX/32 Phase control
fXX/64 fCCLK
fBRGm
CFnTX
SCKFn Phase
SO latch SOFn
control
SIFn Shift register
CFnRX
Item Configuration
CFnRX
(n = 0, 2 to 4)
CFnTX
(n = 0, 2 to 4)
17.4 Registers
(1/3)
< > < > < > < > < >
CFnCTL0 CFnPWR CFnTXENote2 CFnRXENote2 CFnDIRNote2 0 0 CFnTMSNote2 CFnSCE
(n = 0, 2 to 4)
CFnPWR Specification of CSIFn operation disable/enable
0 Disables CSIFn operation and resets the CFnSTR register
1 Enables CSIFn operation
• The CFnPWR bit controls the CSIFn operation and resets the internal circuit.
(2/3)
Note These bits can only be rewritten when the CFnPWR bit = 0. However, the CFnPWR
can be set to 1 at the same time as these bits are rewritten.
(3/3)
Notes 1. If the CFnSCE bit is read while it is 1, the next communication operation is started.
2. The CFnSCE bit is not cleared to 0 one communication clock before the completion
of the last data reception, the next communication operation is automatically
started.
Caution The CFnCTL1 register can be rewritten only when the CFnCTL0.CFnPWR bit = 0.
SIFn capture
Communication 0 1
SCKFn (I/O)
type 2
SOFn (output) D7 D6 D5 D4 D3 D2 D1 D0
SIFn capture
SIFn capture
SIFn capture
Remark When n = 0, m = 1
When n = 2, 3, m = 2
When n = 4, m = 3
For details of fBRGm, see 17.8 Baud Rate Generator.
Caution The CFnCTL2 register can be rewritten only when the CFnCTL0.CFnPWR bit = 0 or when both the
CFnTXE and CFnRXE bits = 0.
Remarks 1. If the number of transfer bits is other than 8 or 16, prepare and
use data stuffed from the LSB of the CFnTX and CFnRX
registers.
2. ×: don’t care
SOFn
SIFn
15 10 9 0
Insertion of 0
SIFn SOFn
15 12 11 0
Insertion of 0
CSIFn can generate the following two types of interrupt request signals.
Of these two interrupt request signals, the reception completion interrupt request signal has the higher priority by
default, and the priority of the transmission enable interrupt request signal is lower.
Interrupt Priority
17.6 Operation
START
No
(6) INTCFnR interrupt
generated?
Yes
No (7)
Transmission
completed?
Yes
END
CFnTSF bit
INTCFnR signal
SCKFn pin
SOFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
(1) Write 00H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
fXX/2 or fXX/3, and master mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write C1H to the CFnCTL0 register, and select the transmission mode and MSB first at the same time
as enabling the operation of the communication clock (fCCLK).
(4) Set the CFnSTR.CFnTSF bit to 1 by writing the transmit data to the CFnTX register, and start
transmission.
(5) When transmission is started, output the serial clock to the SCKFn pin, and output the transmit data
from the SOFn pin in synchronization with the serial clock.
(6) When transmission of the transfer data length set with the CFnCTL2 register is completiond, stop the
serial clock output and transmit data output, generate the reception completion interrupt request signal
(INTCFnR) at the last edge of the serial clock, and clear the CFnTSF bit to 0.
(7) To continue transmission, start the next transmission by writing the transmit data to the CFnTX register
again after the INTCFnR signal is generated.
(8) To end transmission, write CFnCTL0.CFnPWR bit = 0 and CFnCTL0.CFnTXE bit = 0.
Remark n = 0, 2 to 4
START
CFnRX register
(4)
dummy read
No
(6) INTCFnR interrupt
generated?
Yes
No (7)
Reception completed?
CFnSCE bit = 0
(8)
(CFnCTL0)
END
CFnTSF bit
INTCFnR signal
SCKFn pin
SIFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin capture
timing
(1) (4) (5) (6) (7) (8) (10)
(2) (9)
(3)
(1) Write 00H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
fXX/2 or fXX/3, and master mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write A1H to the CFnCTL0 register, and select the reception mode and MSB first at the same time as
enabling the operation of the communication clock (fCCLK).
(4) Set the CFnSTR.CFnTSF bit to 1 by performing a dummy read of the CFnRX register, and start
reception.
(5) When reception is started, output the serial clock to the SCKFn pin, and capture the receive data of the
SIFn pin in synchronization with the serial clock.
(6) When reception of the transfer data length set with the CFnCTL2 register is completed, stop the serial
clock output and data capturing, generate the reception completion interrupt request signal (INTCFnR)
at the last edge of the serial clock, and clear the CFnTSF bit to 0.
(7) To continue reception, read the CFnRX register while keeping the CFnCTL0.CFnSCE bit = 1 after the
INTCFnR signal is generated.
(8) To read the CFnRX register without starting the next reception, write the CFnSCE bit = 0.
(9) Read the CFnRX register.
(10) To end reception, write CFnCTL0.CFnPWR bit = 0 and CFnCTL0.CFnRXE bit = 0.
Remark n = 0, 2 to 4
START
INTCFnR interrupt No
(6)
generated?
Yes
No (8)
Transmission/reception
completed?
Yes
END
CFnTSF bit
INTCFnR signal
SCKFn pin
SOFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin capture
timing
(1) (4) (5) (6) (7) (8) (9)(10)
(2)
(3)
(1) Write 00H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
fXX/2 or fXX/3, and master mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write E1H to the CFnCTL0 register, and select the transmission/reception mode and MSB first at the
same time as enabling the operation of the communication clock (fCCLK).
(4) Set the CFnSTR.CFnTSF bit to 1 by writing the transmit data to the CFnTX register, and start
transmission/reception.
(5) When transmission/reception is started, output the serial clock to the SCKFn pin, output the transmit
data to the SOFn pin in synchronization with the serial clock, and capture the receive data of the SIFn
pin.
(6) When transmission/reception of the transfer data length set by the CFnCTL2 register is completed,
stop the serial clock output, transmit data output, and data capturing, generate the reception
completion interrupt request signal (INTCFnR) at the last edge of the serial clock, and clear the
CFnTSF bit to 0.
(7) Read the CFnRX register.
(8) To continue transmission/reception, write the transmit data to the CFnTX register again.
(9) Read the CFnRX register.
(10) To end transmission/reception, write CFnCTL0.CFnPWR bit = 0, CFnCTL0.CFnTXE bit = 0, and
CFnCTL0.CFnRXE bit = 0.
Remark n = 0, 2 to 4
START
No
(4) SCKFn pin input
started?
Yes
INTCFnR interrupt No
(6)
generated?
Yes
Transmission No (7)
completed?
Yes
END
CFnTSF bit
INTCFnR signal
SCKFn pin
SOFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
(1) Write 07H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
external clock (SCKFn), and slave mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write C1H to the CFnCTL0 register, and select the transmission mode and MSB first at the same time
as enabling the operation of the communication clock (fCCLK).
(4) The CFnSTR.CFnTSF bit is set to 1 by writing the transmit data to the CFnTX register, and the device
waits for a serial clock input.
(5) When a serial clock is input, output the transmit data from the SOFn pin in synchronization with the
serial clock.
(6) When transmission of the transfer data length set with the CFnCTL2 register is completed, stop the
serial clock input and transmit data output, generate the reception completion interrupt request signal
(INTCFnR) at the last edge of the serial clock, and clear the CFnTSF bit to 0.
(7) To continue transmission, write the transmit data to the CFnTX register again after the INTCFnR signal
is generated, and wait for a serial clock input.
(8) To end transmission, write CFnCTL0.CFnPWR bit = 0 and CFnCTL0.CFnTXE bit = 0.
Remark n = 0, 2 to 4
START
CFnRX register
(4)
dummy read
Yes
INTCFnR interrupt No
(6)
generated?
Yes
No (7)
(6) Reception completed?
CFnSCE bit = 0
(8)
(CFnCTL0)
END
CFnTSF bit
INTCFnR signal
SCKFn pin
SIFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin capture
timing
(1) (4) (5) (6) (7) (8) (10)
(2) (9)
(3)
(1) Write 07H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
external clock (SCKFn), and slave mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write A1H to the CFnCTL0 register, and select the reception mode and MSB first at the same time as
enabling the operation of the communication clock (fCCLK).
(4) The CFnSTR.CFnTSF bit is set to 1 by performing a dummy read of the CFnRX register, and the
device waits for a serial clock input.
(5) When a serial clock is input, capture the receive data of the SIFn pin in synchronization with the serial
clock.
(6) When reception of the transfer data length set with the CFnCTL2 register is completed, stop the serial
clock input and data capturing, generate the reception completion interrupt request signal (INTCFnR)
at the last edge of the serial clock, and clear the CFnTSF bit to 0.
(7) To continue reception, read the CFnRX register while keeping the CFnCTL0.CFnSCE bit = 1 after the
INTCFnR signal is generated, and wait for a serial clock input.
(8) To end reception, write the CFnSCE bit = 0.
(9) Read the CFnRX register.
(10) To end reception, write CFnCTL0.CFnPWR bit = 0 and CFnCTL0.CFnRXE bit = 0.
Remark n = 0, 2 to 4
START
No
(4) SCKFn pin input
started?
Yes
No
(6) INTCFnR interrupt
generated?
Yes
No (8)
Transmission/reception
completed?
Yes
END
CFnTSF bit
INTCFnR signal
SCKFn pin
SOFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin capture
timing
(1) (4) (5) (6) (7) (8) (9)(10)
(2)
(3)
(1) Write 07H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
external clock (SCKFn), and slave mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write E1H to the CFnCTL0 register, and select the transmission/reception mode and MSB first at the
same time as enabling the operation of the communication clock (fCCLK).
(4) The CFnSTR.CFnTSF bit is set to 1 by writing the transmit data to the CFnTX register, and the device
waits for a serial clock input.
(5) When a serial clock is input, output the transmit data to the SOFn pin in synchronization with the serial
clock, and capture the receive data of the SIFn pin.
(6) When transmission/reception of the transfer data length set with the CFnCTL2 register is completed,
stop the serial clock input, transmit data output, and data capturing, generate the reception completion
interrupt request signal (INTCFnR) at the last edge of the serial clock, and clear the CFnTSF bit to 0.
(7) Read the CFnRX register.
(8) To continue transmission/reception, write the transmit data to the CFnTX register again, and wait for a
serial clock input.
(9) Read the CFnRX register.
(10) To end transmission/reception, write CFnCTL0.CFnPWR bit = 0, CFnCTL0.CFnTXE bit = 0, and
CFnCTL0.CFnRXE bit = 0.
Remark n = 0, 2 to 4
START
INTCFnT interrupt No
(6), (9)
generated?
Yes
Transmission No (7)
completed?
Yes
CFnTSF bit = 0? No
(10)
(CFnSTR register)
Yes
END
CFnTSF bit
INTCFnT signal
INTCFnR signal L
SCKFn pin
SOFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
(1) Write 00H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
fXX/2 or fXX/3, and master mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write C3H to the CFnCTL0 register, and select the transmission mode, MSB first, and continuous
transfer mode at the same time as enabling the operation of the communication clock (fCCLK).
(4) Set the CFnSTR.CFnTSF bit to 1 by writing the transmit data to the CFnTX register, and start
transmission.
(5) When transmission is started, output the serial clock to the SCKFn pin, and output the transmit data
from the SOFn pin in synchronization with the serial clock.
(6) When transfer of the transmit data from the CFnTX register to the shift register is completed and
writing to the CFnTX register is enabled, the transmission enable interrupt request signal (INTCFnT) is
generated.
(7) To continue transmission, write the transmit data to the CFnTX register again after the INTCFnT signal
is generated.
(8) When a new transmit data is written to the CFnTX register before communication completion, the next
communication is started following communication completion.
(9) The transfer of the transmit data from the CFnTX register to the shift register is completed and the
INTCFnT signal is generated. To end continuous transmission with the current transmission, do not
write to the CFnTX register.
(10) When the next transmit data is not written to the CFnTX register before transfer completion, stop the
serial clock output to the SCKFn pin after transfer completion, and clear the CFnTSF bit to 0.
(11) To release the transmission enable status, write CFnCTL0.CFnPWR bit = 0 and CFnCTL0.CFnTXE bit
= 0 after checking that the CFnTSF bit = 0.
Caution In continuous transmission mode, the reception completion interrupt request signal
(INTCFnR) is not generated.
Remark n = 0, 2 to 4
START
CFnRX register
(4)
dummy read
No INTCFnR interrupt
generated?
Yes
Yes No
Is data being received (7)
CFnSCE bit = 0 last data?
(8)
(CFnCTL0)
Yes
CFnSCE bit = 0
(9) Read CFnRX register (8)
(CFnCTL0)
(9)
CFnOVE bit = 0 Read CFnRX register
(12) (9) Read CFnRX register
(CFnSTR)
INTCFnR interrupt No
(10)
generated?
Yes
CFnTSF bit = 0? No
(13)
(CFnSTR)
Yes
END
CFnTSF bit
INTCFnR signal
CFnSCE bit
SCKFn pin
SOFn pin L
SIFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin capture
timing
(1) (3) (4) (5) (6) (7) (8) (9) (10) (11) (13)
(2)
(1) Write 00H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
fXX/2, and master mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write A3H to the CFnCTL0 register, and select the reception mode, MSB first, and continuous transfer
mode at the same time as enabling the operation of the communication clock (fCCLK).
(4) Set the CFnSTR.CFnTSF bit to 1 by performing a dummy read of the CFnRX register, and start
reception.
(5) When reception is started, output the serial clock to the SCKFn pin, and capture the receive data of the
SIFn pin in synchronization with the serial clock.
(6) When reception is completed, the reception completion interrupt request signal (INTCFnR) is
generated, and reading of the CFnRX register is enabled.
(7) When the CFnCTL0.CFnSCE bit = 1 upon communication completion, the next communication is
started following communication completion.
(8) To end continuous reception with the current reception, write the CFnSCE bit = 0.
(9) Read the CFnRX register.
(10) When reception is completed, the INTCFnR signal is generated, and reading of the CFnRX register is
enabled. When the CFnSCE bit = 0 is set before communication completion, stop the serial clock
output to the SCKFn pin, and clear the CFnTSF bit to 0, to end the receive operation.
(11) Read the CFnRX register.
(12) If an overrun error occurs, write the CFnSTR.CFnOVE bit = 0, and clear the error flag.
(13) To release the reception enable status, write CFnCTL0.CFnPWR bit = 0 and CFnCTL0.CFnRXE bit =
0 after checking that the CFnTSF bit = 0.
Remark n = 0, 2 to 4
START
No
(6), (11) INTCFnT interrupt
generated?
Yes
Yes (11)
(7) Is data being transmitted
last data?
No
Yes
No (9)
CFnOVE bit = 1?
(CFnSTR) (10)
No
(15) CFnTSF bit = 0?
(CFnSTR)
Yes
END
CFnTSF bit
INTCFnT signal
INTCFnR signal
SCKFn pin
SOFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin capture
timing
(1) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (15)
(2)
(3)
(1) Write 00H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
fXX/2 or fXX/3, and master mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write E3H to the CFnCTL0 register, and select the transmission/reception mode, MSB first, and
continuous transfer mode at the same time as enabling the operation of the communication clock
(fCCLK).
(4) Set the CFnSTR.CFnTSF bit to 1 by writing the transmit data to the CFnTX register, and start
transmission/reception.
(5) When transmission/reception is started, output the serial clock to the SCKFn pin, output the transmit
data to the SOFn pin in synchronization with the serial clock, and capture the receive data of the SIFn
pin.
(6) When transfer of the transmit data from the CFnTX register to the shift register is completed and
writing to the CFnTX register is enabled, the transmission enable interrupt request signal (INTCFnT) is
generated.
(7) To continue transmission/reception, write the transmit data to the CFnTX register again after the
INTCFnT signal is generated.
(8) When one transmission/reception is completed, the reception completion interrupt request signal
(INTCFnR) is generated, and reading of the CFnRX register is enabled.
(9) When a new transmit data is written to the CFnTX register before communication completion, the next
communication is started following communication completion.
(10) Read the CFnRX register.
Remark n = 0, 2 to 4
(2/2)
(11) The transfer of the transmit data from the CFnTX register to the shift register is completed and the
INTCFnT signal is generated. To end continuous transmission/reception with the current
transmission/reception, do not write to the CFnTX register.
(12) When the next transmit data is not written to the CFnTX register before transfer completion, stop the
serial clock output to the SCKFn pin after transfer completion, and clear the CFnTSF bit to 0.
(13) When the reception error interrupt request signal (INTCFnR) is generated, read the CFnRX register.
(14) If an overrun error occurs, write CFnSTR.CFnOVE bit = 0, and clear the error flag.
(15) To release the transmission/reception enable status, write CFnCTL0.CFnPWR bit = 0,
CFnCTL0.CFnTXE bit = 0, and CFnCTL0.CFnRXE bit = 0 after checking that the CFnTSF bit = 0.
Remark n = 0, 2 to 4
START
No
(4) SCKFn pin input
started?
Yes
INTCFnT interrupt No
(6), (9)
generated?
Yes
Transmission No (7)
(9)
completed?
Yes
CFnTSF bit = 0? No
(10)
(CFnSTR register)
Yes
END
CFnTSF bit
INTCFnT signal
SCKFn pin
SOFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
(1) Write 07H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
external clock (SCKFn), and slave mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write C3H to the CFnCTL0 register, and select the transmission mode, MSB first, and continuous
transfer mode at the same time as enabling the operation of the communication clock (fCCLK).
(4) The CFnSTR.CFnTSF bit is set to 1 by writing the transmit data to the CFnTX register, and the device
waits for a serial clock input.
(5) When a serial clock is input, output the transmit data from the SOFn pin in synchronization with the
serial clock.
(6) When transfer of the transmit data from the CFnTX register to the shift register is completed and
writing to the CFnTX register is enabled, the transmission enable interrupt request signal (INTCFnT) is
generated.
(7) To continue transmission, write the transmit data to the CFnTX register again after the INTCFnT signal
is generated.
(8) When a serial clock is input following completion of the transmission of the transfer data length set with
the CFnCTL2 register, continuous transmission is started.
(9) When transfer of the transmit data from the CFnTX register to the shift register is completed and
writing to the CFnTX register is enabled, the INTCFnT signal is generated. To end continuous
transmission with the current transmission, do not write to the CFnTX register.
(10) When the clock of the transfer data length set with the CFnCTL2 register is input without writing to the
CFnTX register, clear the CFnTSF bit to 0 to end transmission.
(11) To release the transmission enable status, write CFnCTL0.CFnPWR bit = 0 and CFnCTL0.CFnTXE bit
= 0 after checking that the CFnTSF bit = 0.
Caution In continuous transmission mode, the reception completion interrupt request signal
(INTCFnR) is not generated.
Remark n = 0, 2 to 4
START
CFnRX register
(4)
dummy read
Yes
No INTCFnR interrupt
generated?
Yes
Yes
CFnSCE bit = 0
(8) No (7)
(CFnCTL0) Is data being received
last data?
No
(10) INTCFnR interrupt
generated?
Yes
CFnTSF bit = 0? No
(13)
(CFnSTR)
Yes
END
CFnTSF bit
INTCFnR signal
CFnSCE bit
SCKFn pin
SIFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin capture
timing
(1) (3) (4) (5) (6) (7) (8) (9) (10) (11) (13)
(2)
(1) Write 07H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
external clock (SCKFn), and slave mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write A3H to the CFnCTL0 register, and select the reception mode, MSB first, and continuous transfer
mode at the same time as enabling the operation of the communication clock (fCCLK).
(4) The CFnSTR.CFnTSF bit is set to 1 by performing a dummy read of the CFnRX register, and the
device waits for a serial clock input.
(5) When a serial clock is input, capture the receive data of the SIFn pin in synchronization with the serial
clock.
(6) When reception is completed, the reception completion interrupt request signal (INTCFnR) is
generated, and reading of the CFnRX register is enabled.
(7) When a serial clock is input in the CFnCTL0.CFnSCE bit = 1 status, continuous reception is started.
(8) To end continuous reception with the current reception, write the CFnSCE bit = 0.
(9) Read the CFnRX register.
(10) When reception is completed, the INTCFnR signal is generated, and reading of the CFnRX register is
enabled. When CFnSCE bit = 0 is set before communication completion, clear the CFnTSF bit to 0 to
end the receive operation.
(11) Read the CFnRX register.
(12) If an overrun error occurs, write CFnSTR.CFnOVE bit = 0, and clear the error flag.
(13) To release the reception enable status, write CFnCTL0.CFnPWR bit = 0 and CFnCTL0.CFnRXE bit =
0 after checking that the CFnTSF bit = 0.
Remark n = 0, 2 to 4
START
No
(4) SCKFn pin input
started?
Yes
INTCFnT interrupt No
(6), (11)
generated?
Yes
Yes (11)
(7) Is data being transmitted
last data?
No
Yes
Is receive data No
CFnOVE bit = 0 last data?
(14)
(CFnSTR)
Yes (12)
No
(15) CFnTSF bit = 0?
(CFnSTR)
Yes
END
CFnTSF bit
INTCFnT signal
INTCFnR signal
SCKFn pin
SOFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
SIFn pin capture
timing
(1) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (15)
(2)
(3)
(1) Write 07H to the CFnCTL1 register, and select communication type 1, communication clock (fCCLK) =
external clock (SCKFn), and slave mode.
(2) Write 00H to the CFnCTL2 register, and set the transfer data length to 8 bits.
(3) Write E3H to the CFnCTL0 register, and select the transmission/reception mode, MSB first, and
continuous transfer mode at the same time as enabling the operation of the communication clock
(fCCLK).
(4) The CFnSTR.CFnTSF bit is set to 1 by writing the transmit data to the CFnTX register, and the device
waits for a serial clock input.
(5) When a serial clock is input, output the transmit data to the SOFn pin in synchronization with the serial
clock, and capture the receive data of the SIFn pin.
(6) When transfer of the transmit data from the CFnTX register to the shift register is completed and
writing to the CFnTX register is enabled, the transmission enable interrupt request signal (INTCFnT) is
generated.
(7) To continue transmission, write the transmit data to the CFnTX register again after the INTCFnT signal
is generated.
(8) When reception of the transfer data length set with the CFnCTL2 register is completed, the reception
completion interrupt request signal (INTCFnR) is generated, and reading of the CFnRX register is
enabled.
(9) When a serial clock is input continuously, continuous transmission/reception is started.
(10) Read the CFnRX register.
(11) When transfer of the transmit data from the CFnTX register to the shift register is completed and
writing to the CFnTX register is enabled, the INTCFnT signal is generated. To end continuous
transmission/reception with the current transmission/reception, do not write to the CFnTX register.
Remark n = 0, 2 to 4
(2/2)
(12) When the clock of the transfer data length set with the CFnCTL2 register is input without writing to the
CFnTX register, the INTCFnR signal is generated. Clear the CFnTSF bit to 0 to end
transmission/reception.
(13) When the INTCFnR signal is generated, read the CFnRX register.
(14) If an overrun error occurs, write CFnSTR.CFnOVE bit = 0, and clear the error flag.
(15) To release the transmission/reception enable status, write CFnCTL0.CFnPWR bit = 0,
CFnCTL0.CFnTXE bit = 0, and CFnCTL0.CFnRXE bit = 0 after checking that the CFnTSF bit = 0.
Remark n = 0, 2 to 4
CFnRX register
read signal
INTCFnR signal
CFnOVE bit
Shift register 01H 02H 05H 0AH 15H 2AH 55H AAH 00H 01H 02H 05H 0AH 15H 2AH 55H
SCKFn pin
SIFn pin
SIFn pin capture
timing
(1) (2) (3)(4)
Remark n = 0, 2 to 4
SCKFn pin
SIFn capture
SOFn pin D7 D6 D5 D4 D3 D2 D1 D0
Reg-R/W
INTCFnT
interruptNote 1
INTCFnR
interruptNote 2
CFnTSF bit
SCKFn pin
SIFn capture
SOFn pin D7 D6 D5 D4 D3 D2 D1 D0
Reg-R/W
INTCFnT
interruptNote 1
INTCFnR
interruptNote 2
CFnTSF bit
Notes 1. The INTCFnT interrupt is set when the data written to the CFnTX register is transferred to the data
shift register in the continuous transmission or continuous transmission/reception mode. In the
single transmission or single transmission/reception mode, the INTCFnT interrupt request signal is
not generated, but the INTCFnR interrupt request signal is generated upon end of communication.
2. The INTCFnR interrupt occurs if reception is correctly ended and receive data is ready in the CFnRX
register while reception is enabled. In the single mode, the INTCFnR interrupt request signal is
generated even in the transmission mode, upon end of communication.
Caution In single transfer mode, writing to the CFnTX register with the CFnTSF bit set to 1 is ignored.
This has no effect on the operation during transfer.
For example, if the next data is written to the CFnTX register when DMA is started by
generating the INTCFnR signal, the written data is not transferred because the CFnTSF bit is
set to 1.
Use the continuous transfer mode, not the single transfer mode, for such applications.
Remark n = 0, 2 to 4
(2/2)
SCKFn pin
SIFn capture
SOFn pin D7 D6 D5 D4 D3 D2 D1 D0
Reg-R/W
INTCFnT
interruptNote 1
INTCFnR
interruptNote 2
CFnTSF bit
SCKFn pin
SIFn capture
SOFn pin D7 D6 D5 D4 D3 D2 D1 D0
Reg-R/W
INTCFnT
interruptNote 1
INTCFnR
interruptNote 2
CFnTSF bit
Notes 1. The INTCFnT interrupt is set when the data written to the CFnTX register is transferred to the data
shift register in the continuous transmission or continuous transmission/reception modes. In the
single transmission or single transmission/reception modes, the INTCFnT interrupt request signal is
not generated, but the INTCFnR interrupt request signal is generated upon end of communication.
2. The INTCFnR interrupt occurs if reception is correctly ended and receive data is ready in the CFnRX
register while reception is enabled. In the single mode, the INTCFnR interrupt request signal is
generated even in the transmission mode, upon end of communication.
Caution In single transfer mode, writing to the CFnTX register with the CFnTSF bit set to 1 is ignored.
This has no effect on the operation during transfer.
For example, if the next data is written to the CFnTX register when DMA is started by
generating the INTCFnR signal, the written data is not transferred because the CFnTSF bit is
set to 1.
Use the continuous transfer mode, not the single transfer mode, for such applications.
Remark n = 0, 2 to 4
0 1 1 1 High impedance
Other than above Fixed to high level
1 1 1 1 High impedance
Other than above Fixed to low level
Remarks 1. The output level of the SCKFn pin changes if any of the CFnCTL1.CFnCKP or CFnCKS2 to
CFnCKS0 bits is rewritten.
2. n = 0, 2 to 4
Remarks 1. The SOFn pin output changes when any one of the
CFnCTL0.CFnTXE, CFnCTL0.CFnDIR or CFnCTL1.CFnDAP bit
is rewritten.
2. ×: Don’t care
3. n = 0, 2 to 4
The BRG1 to BRG3 baud rate generators are connected to CSIF0, CSIF2 to CSIF4 as shown in the following block
diagram.
fBRG1
fXX BRG1 CSIF0
fBRG2
fXX BRG2 CSIF2
CSIF3
fBRG3
fXX BRG3 CSIF4
< >
PRSMm 0 0 0 BGCEm 0 0 BGCSm1 BGCSm0
(m = 1 to 3)
0 0 fXX 0
0 1 fXX/2 1
1 0 fXX/4 2
1 1 fXX/8 3
fXX
fBRGm =
×N
k+1
2
Caution Set fBRGm to 8 MHz, (CSIF0, CSIF2 and CSIF4), 12 MHz (CSIF3), or lower.
17.9 Cautions
(1) When transferring transmit data and receive data using DMA transfer, error processing cannot be performed even
if an overrun error occurs during serial transfer. Check that the no overrun error has occurred by reading the
CFnSTR.CFnOVE bit after DMA transfer has been completed.
(2) If a register that is prohibited to be rewritten during operation (CFnCTL0.CFnPWR bit = 1) is rewritten by mistake
during operation, set the CFnCTL0.CFnPWR bit to 0 once, then initialize CSIFn.
Registers to which rewriting during operation is prohibited are shown below.
• CFnCTL0 register: CFnTXE, CFnRXE, CFnDIR, CFnTMS bits
• CFnCTL1 register: CFnCKP, CFnDAP, CFnCKS2 to CFnCKS0 bits
• CFnCTL2 register: CFnCL3 to CFnCL0 bits
(3) In communication type 2 or 4 (CFnCTL1.CFnDAP bit = 1), the CFnSTR.CFnTSF bit is cleared half a SCKFn clock
after the occurrence of a reception completion interrupt (INTCFnR).
In the single transfer mode, writing the next transmit data is ignored during communication (CFnTSF bit = 1), and
the next communication is not started. Also if reception-only communication (CFnCTL0.CFnTXE bit = 0,
CFnCTL0.CFnRXE bit = 1) is set, the next communication is not started even if the receive data is read during
communication (CFnTSF bit = 1).
Therefore, when using the single transfer mode with communication type 2 or 4 (CFnDAP bit = 1), pay particular
attention to the following.
• To start the next transmission, confirm that CFnTSF bit = 0 and then write the transmit data to the CFnTX
register.
• To perform the next reception continuously when reception-only communication (CFnTXE bit = 0, CFnRXE bit =
1) is set, confirm that CFnTSF bit = 0 and then read the CFnRX register.
Or, use the continuous transfer mode instead of the single transfer mode. Use of the continuous transfer mode is
recommended especially when using DMA.
Remark n = 0, 2 to 4
To use the I2C bus function, set the P36/SCL00, P37/SDA00, P40/SDA01, and P41/SCL01 pins as alternate-
function pins, and set them to N-ch open-drain output.
The V850ES/JC3-H and V850ES/JE3-H includes I2C. The number of channels differs depending on the product. Table
18-1 shows the number of channels of each product.
Part Number V850ES/JC3-H (40 pin) V850ES/JC3-H (48 pin) V850ES/JE3-H(64 pin)
Caution The transmit/receive operation of UARTC3 and I2C00 is not guaranteed if these functions are
switched during transmission or reception. Be sure to disable the one that is not used.
7 6 5 4 3 2 1 0
Remarks 1. m = 6, 7
2. × = don’t care
+
2
18.1.2 UARTC4, CSIF0, and I C01 mode switching
In the V850ES/JC3-H and V850ES/JE3-H, UARTC4, CSIF0, and I2C01 share the same pins and therefore cannot be
used simultaneously. Switching among UARTC4, CSIF0, and I2C01 must be set in advance, using the PMC4, PFC4, and
PFCE4 registers.
Caution The transmit/receive operation of UARTC4, CSIF0, and I2C01 is not guaranteed if these functions are
switched during transmission or reception. Be sure to disable the one that is not used.
Remarks 1. m = 0, 1
2. × = don’t care
18.2 Features
18.3 Configuration
Internal bus
Data
retention time
TRCn correction
circuit
N-ch open-drain
output Acknowledge
Output control
generator Wakeup controller
Acknowledge detector
Start condition
detector
Stop condition
SCL0n detector
Interrupt request
Noise INTIICn
Serial clock counter signal generator
eliminator
IICSn.MSTSn,
Serial clock EXCn, COIn
DFCn Serial clock wait controller IIC shift register n
controller (IICn) Bus status
N-ch open-drain
detector
output IICCn.STTn, SPTn
IICSn.MSTSn, EXCn, COIn
fxx
Prescaler
Prescaler
fxx to fxx/5
OCKSENn OCKSTHn OCKSn1 OCKSn0 CLDn DADn SMCn DFCn CLn1 CLn0 CLXn STCFn IICBSYn STCENn IICRSVn
IIC division clock select IIC clock select IIC function expansion IIC flag register n
register m (OCKSm) register n (IICCLn) register n (IICXn) (IICFn)
Internal bus
Remark m=1
fXX : Main clock frequency
+VDD +VDD
SCL Address 3
SDA Slave IC
SCL Address 4
SDA Slave IC
SCL Address N
2
I C0n includes the following hardware
Item Configuration
(3) SO latch
The SO latch is used to retain the output level of the SDA0n pin
(5) Prescaler
This selects the sampling clock to be used.
• The falling edge of the eighth or ninth clock of the serial clock (set by IICCn.WTIMn bit)
• Interrupt occurrence due to stop condition detection (set by IICCn.SPIEn bit)
(10) ACK generator, stop condition detector, start condition detector, and ACK detector
These circuits are used to generate and detect various statuses.
18.4 Registers
Remark For the alternate-function pin settings, see Table 4-17 Settings When Port Pins Are Used for Alternate
Functions.
(1/4)
(n = 0, 1)
IICEn Specification of I2Cn operation enable/disable
Note 1
0 Operation stopped. IICSn register reset . Internal operation stopped.
1 Operation enabled.
Be sure to set this bit to 1 when the SCL0n and SDA0n lines are high level.
Condition for clearing (IICEn bit = 0) Condition for setting (IICEn bit = 1)
Note 2
LRELn Exit from communications
0 Normal operation
1 This exits from the current communication operation and sets standby mode. This setting is
automatically cleared after being executed. Its uses include cases in which a locally irrelevant
extension code has been received.
The SCL0n and SDA0n lines are set to high impedance.
The STTn and SPTn bits and the MSTSn, EXCn, COIn, TRCn, ACKDn, and STDn bits of the IICSn
register are cleared.
The standby mode following exit from communications remains in effect until the following communication entry
conditions are met.
• After a stop condition is detected, restart is in master mode.
• An address match occurs or an extension code is received after the start condition.
Condition for clearing (LRELn bit = 0) Condition for setting (LRELn bit = 1)
Note 2
WRELn Wait state cancellation control
Condition for clearing (WRELn bit = 0) Condition for setting (WRELn bit = 1)
Notes 1. The IICSn register, IICFn.STCFn and IICFn.IICBSYn bits, and IICCLn.CLDn and IICCLn.DADn bits
are reset.
2. This flag’s signal is invalid when the IICEn bit = 0.
Caution If the I2Cn operation is enabled (IICEn bit = 1) when the SCL0n line is high level and the
SDA0n line is low level, the start condition is detected immediately. To avoid this, after
enabling the I2Cn operation, immediately set the LRELn bit to 1 with a bit manipulation
instruction.
Remark The LRELn and WRELn bits are 0 when read after the data has been set.
(2/4)
Note
SPIEn Enabling/disabling generation of interrupt request when stop condition is detected
0 Disabled
1 Enabled
Condition for clearing (SPIEn bit = 0) Condition for setting (SPIEn bit = 1)
Note
WTIMn Control of wait state and interrupt request generation
Condition for clearing (WTIMn bit = 0) Condition for setting (WTIMn bit = 1)
Note
ACKEn Acknowledgment control
0 Acknowledgment disabled.
1 Acknowledgment enabled. During the ninth clock period, the SDA0n line is set to low level.
The ACKEn bit setting is invalid for address reception by the slave device. In this case, ACK is generated when
the addresses match.
However, the ACKEn bit setting is valid for reception of the extension code. Set the ACKEn bit in the system that
receives the extension code.
Condition for clearing (ACKEn bit = 0) Condition for setting (ACKEn bit = 1)
(3/4)
Condition for clearing (STTn bit = 0) Condition for setting (STTn bit = 1)
(4/4)
Condition for clearing (SPTn bit = 0) Condition for setting (SPTn bit = 1)
Note Set the SPTn bit to 1 only in master mode. However, to perform a master operation before detecting
the first stop condition after operation has been enabled when the IICRSVn bit is 0, the SPTn bit must
be set to 1 and a stop condition must be set. For details, see 18.15 Cautions.
Caution If the WRELn bit is set to 1 during the ninth clock and the wait state is canceled when the
TRCn bit is 1, the TRCn bit is cleared to 0 and the SDA0n line is set to high impedance.
Caution Accessing the IICSn registers is prohibited in the following statuses. For details, see 3.4.8 (2)
Accessing specific on-chip peripheral I/O registers.
• When the CPU operates on the subclock and the main clock oscillation is stopped
• When the CPU operates on the internal oscillation clock
(1/3)
Note This bit is also cleared when a bit manipulation instruction is executed for another bit in the IICSn
register.
(2/3)
0 Receive status (other than transmit status). The SDA0n line is set to high impedance.
1 Transmit status. The value in the SO latch is enabled for output to the SDA0n line (valid starting at
the falling edge of the first byte’s ninth clock).
Condition for clearing (TRCn bit = 0) Condition for setting (TRCn bit = 1)
• When a stop condition is detected Master
• Cleared by LRELn bit = 1 (communication save) • When a start condition is generated
• When the IICEn bit changes from 1 to 0 (operation • When “0” is output to the first byte’s LSB (transfer
stop) direction specification bit)
• Cleared by IICCn.WRELn bit = 1
Note
Slave
• When the ALDn bit changes from 0 to 1 (arbitration • When “1” is input by the first byte’s LSB (transfer
loss) direction specification bit)
• After reset
Master
• When “1” is output to the first byte’s LSB (transfer
direction specification bit)
Slave
• When a start condition is detected
When not used for communication
Condition for clearing (ACKDn bit = 0) Condition for setting (ACKD bit = 1)
• When a stop condition is detected • After the SDA0n bit is set to low level at the rising
• At the rising edge of the next byte’s first clock edge of the SCL0n pin’s ninth clock
• Cleared by LRELn bit = 1 (communication save)
• When the IICEn bit changes from 1 to 0 (operation
stop)
• After reset
Note The TRCn bit is cleared to 0 and SDA0n line becomes high impedance when the WRELn bit is set to
1 and the wait state is canceled to 0 at the ninth clock by TRCn bit = 1.
(3/3)
1 Start condition was detected. This indicates that the address transfer period is in effect
Condition for clearing (STDn bit = 0) Condition for setting (STDn bit = 1)
1 Stop condition was detected. The master device’s communication is terminated and the bus is
released.
Condition for clearing (SPDn bit = 0) Condition for setting (SPDn bit = 1)
• At the rising edge of the address transfer byte’s first • When a stop condition is detected
clock following setting of this bit and detection of a
start condition
• When the IICEn bit changes from 1 to 0 (operation
stop)
• After reset
Note
After reset: 00H R/W Address: IICF0 FFFFFD8AH, IICF1 FFFFFD9AH
2
IICBSYn I C0n bus status
Cautions 1. Write the STCENn bit only when operation is stopped (IICEn bit = 0).
2. When the STCENn bit = 1, the bus released status (IICBSYn bit = 0) is recognized
regardless of the actual bus status immediately after the I2Cn bus operation is enabled.
Therefore, to issue the first start condition (STTn bit = 1), it is necessary to confirm
that the bus has been released, so as to not disturb other communications.
3. Write the IICRSVn bit only when operation is stopped (IICEn bit = 0).
Note
After reset: 00H R/W Address: IICCL0 FFFFFD84H, IICCL1 FFFFFD94H
7 6 <5> <4> 3 2 1 0
CLDn Detection of SCL0n pin level (valid only when IICCn.IICEn bit = 1)
Condition for clearing (CLDn bit = 0) Condition for setting (CLDn bit = 1)
• When the SCL0n pin is at low level • When the SCL0n pin is at high level
• When the IICEn bit = 0 (operation stop)
• After reset
DADn Detection of SDA0n pin level (valid only when IICEn bit = 1)
Condition for clearing (DADn bit = 0) Condition for setting (DAD0n bit = 1)
• When the SDA0n pin is at low level • When the SDA0n pin is at high level
• When the IICEn bit = 0 (operation stop)
• After reset
Remark When the IICCn.IICEn bit = 0, 0 is read when reading the CLDn and DADn bits.
< >
IICXn 0 0 0 0 0 0 0 CLXn
m = 24, 48, 72, 96, 108, 120, 144, 172, 192, 240, 264, 344, 352, 396, 440, 516, 688, 860 (see Table 18-3
Clock Settings).
T: 1/fXX
tR: SCL0n pin rise time
tF: SCL0n pin fall time
For example, the I2C0n transfer clock frequency (fSCL) when fXX = 19.2 MHz, m = 198, tR = 200 ns, and tF = 50 ns is
calculated using following expression.
m × T + tR + tF
tR m/2 × T tF m/2 × T
SCL0n
The clock to be selected can be set by combining of the SMCn, CLn1, and CLn0 bits of the IICCLn register, the
CLXn bit of the IICXn register, and the OCKSTHm, OCKSm1, and OCKSm0 bits of the OCKSm register (n = 0, 1,
m = 0, 1).
IICXn IICCLn Selection Clock Transfer Settable Main Clock Transfer Speed Operating
Clock Frequency (fXX) Range Mode
CLXn SMCn CLn1 CLn0
0 0 0 0 fxx/6 (OCKSm = 11H) fxx/264 24.00 MHz ≤ fxx ≤ 25.14 MHz 90.91 kHz to 95.23 kHz Standard
mode
fxx/8 (OCKSm= 12H) fxx/352 24.00 MHz ≤ fxx ≤ 33.52 MHz 68.18 kHz to 95.23 kHz
(SMCn = 0)
fxx/10 (OCKSm = 13H) fxx/440 30.00 MHz ≤ fxx ≤ 41.90 MHz 68.18 kHz to 95.23 kHz
0 0 0 1 fxx/4 (OCKSm = 10H) fxx/344 24.00 MHz ≤ fxx ≤ 33.52 MHz 48.72 kHz to 97.44 kHz
fxx/6 (OCKSm= 11H) fxx/516 25.14 MHz ≤ fxx ≤ 48.00 MHz 48.72 kHz to 93.02 kHz
fxx/8 (OCKSm = 12H) fxx/688 33.52 MHz ≤ fxx ≤ 48.00 MHz 48.72 kHz to 69.77 kHz
fxx/10 (OCKSm = 13H) fxx/860 41.90 MHz ≤ fxx ≤ 48.00 MHz 48.72 kHz to 55.81 kHz
0 0 1 1 fxx/4 (OCKSm = 10H) fxx/264 24.00 MHz ≤ fxx ≤ 25.60 MHz 90.91 kHz to 96.97 kHz
0 1 0 X fxx/4 (OCKSm = 10H) fxx/96 24.00 MHz ≤ fxx ≤ 33.52 MHz 250.00 kHz to 349.17 kHz High-speed
mode
fxx/6 (OCKSm = 11H) fxx/144 24.00 MHz ≤ fxx ≤ 48.00 MHz 166.67 kHz to 333.33 kHz
(SMCn = 1)
fxx/8 (OCKSm = 12H) fxx/192 32.00 MHz ≤ fxx ≤ 48.00 MHz 166.67 kHz to 250.00 kHz
fxx/10 (OCKSm = 13H) fxx/240 40.00 MHz ≤ fxx ≤ 48.00 MHz 166.67 kHz to 200.00 kHz
0 1 1 1 fxx/4 (OCKSm = 10H) fxx/72 24.00 MHz ≤ fxx ≤ 25.60 MHz 333.33 kHz to 355.56 kHz
1 1 0 X fxx/6 (OCKSm = 11H) fxx/72 24.00 MHz ≤ fxx ≤ 25.14 MHz 333.33 kHz to 349.17 kHz
fxx/8 (OCKSm = 12H) fxx/96 32.00 MHz ≤ fxx ≤ 33.52 MHz 333.33 kHz to 349.17 kHz
fxx/10 (OCKSm = 13H) fxx/120 40.00 MHz ≤ fxx ≤ 41.90 MHz 333.33 kHz to 349.17 kHz
Remarks 1. m = 0, 1
2. ×: don’t care
After reset: 00H R/W Address: IIC0 FFFFFD80H, IIC1 FFFFFD90H, IIC2 FFFFFDA0H
7 6 5 4 3 2 1 0
IICn
After reset: 00H R/W Address: SVA0 FFFFFD83H, SVA1 FFFFFD93H, SVA2 FFFFFDA3H
7 6 5 4 3 2 1 0
SVAn 0
SCL0n .................This pin is used for serial clock input and output.
This pin is an N-ch open-drain output for both master and slave devices. Input is Schmitt input.
SDA0n ................This pin is used for serial data input and output.
This pin is an N-ch open-drain output for both master and slave devices. Input is Schmitt input.
Since outputs from the serial clock line and the serial data bus line are N-ch open-drain outputs, an external pull-up
resistor is required.
Master device
SCL0n SCL0n
SDA0n SDA0n
2 2
The following section describes the I C bus’s serial data communication format and the signals used by the I C bus.
The transfer timing for the “start condition”, “address”, “transfer direction specification”, “data”, and “stop condition”
generated on the I2C bus’s serial data bus is shown below.
2
Figure 18-7. I C Bus Serial Data Transfer Timing
SCL0n 1 to 7 8 9 1 to 8 9 1 to 8 9
SDA0n
The master device generates the start condition, slave address, and stop condition.
ACK can be generated by either the master or slave device (normally, it is generated by the device that receives 8-bit
data).
The serial clock (SCL0n) is continuously output by the master device. However, in the slave device, the SCL0n pin’s
low-level period can be extended and a wait state can be inserted.
H
SCL0n
SDA0n
A start condition is output when the IICCn.STTn bit is set (1) after a stop condition has been detected (IICSn.SPDn bit
= 1). When a start condition is detected, the IICSn.STDn bit is set (1).
Caution When the IICCn.IICEn bit of the V850ES/JC3-H and V850ES/JE3-H is set to 1 while other devices are
communicating, the start condition may be detected depending on the status of the communication
line. Be sure to set the IICCn.IICEn bit to 1 when the SCL0n and SDA0n lines are high level.
18.6.2 Addresses
The 7 bits of data that follow the start condition are defined as an address.
An address is a 7-bit data segment that is output so that the master device can select one of the slave devices that are
connected to the bus lines. Therefore, each slave device connected via the bus lines must have a unique address.
The slave devices detect via hardware the start condition and check whether or not the 7-bit address data matches the
data values stored in the SVAn register. If the address data matches the values of the SVAn register, the slave device is
selected and communicates with the master device until the master device generates a start condition or stop condition.
SCL0n 1 2 3 4 5 6 7 8 9
Address
Note
INTIICn
Note The interrupt request signal (INTIICn) is generated if a local address or extension code is received
during slave device operation.
An address is output when the slave address and the transfer direction described in 18.6.3 Transfer direction
specification are written together to the IICn registers as eight bits of data. Received addresses are written to the IICn
register.
The slave address is assigned to the higher 7 bits of the IICn register.
SCL0n 1 2 3 4 5 6 7 8 9
Note The INTIICn signal is generated if a local address or extension code is received during slave device
operation.
18.6.4 ACK
ACK is used to confirm the serial data status of the transmitting and receiving devices.
The receiving device returns ACK for every 8 bits of data it receives.
The transmitting device normally receives ACK after transmitting 8 bits of data. When ACK is returned from the
receiving device, the reception is judged as normal and processing continues. The detection of ACK is confirmed using
the IICSn.ACKDn bit.
When the master device is the receiving device, after receiving the final data, it does not return ACK and generates a
stop condition. When the slave device is the receiving device and does not return ACK, the master device generates either
a stop condition or a restart condition, and then stops the current transmission. Failure to return ACK may be caused by
the following factors.
When the receiving device sets the SDA0n line to low level during the ninth clock, ACK is generated (normal reception).
When the IICCn.ACKEn bit is set to 1, automatic ACK generation is enabled. Transmission of the eighth bit following
the 7 address data bits causes the IICSn.TRCn bit to be set. Normally, set the ACKEn bit to 1 for reception (TRCn bit = 0).
When the slave device is receiving (when TRCn bit = 0), if the slave device cannot receive data or does not need the
subsequent data, clear the ACKEn bit to 0 to indicate to the master that no more data can be received.
Similarly, when the master device is receiving (when TRCn bit = 0) and the subsequent data is not needed, clear the
ACKEn bit to 0 to prevent ACK from being generated. This notifies the slave device (transmitting device) of the end of the
data transmission (transmission stopped).
SCL0n 1 2 3 4 5 6 7 8 9
SDA0n AD6 AD5 AD4 AD3 AD2 AD1 AD0 R/W ACK
When the local address is received, ACK is automatically generated regardless of the value of the ACKEn bit. No ACK
is generated if an address other than the local address is received (NACK).
When receiving the extension code, set the ACKEn bit to 1 in advance to generate ACK.
The ACK generation method during data reception is based on the wait timing setting, as described by the following.
H
SCL0n
SDA0n
A stop condition is generated when the IICCn.SPTn bit is set to 1. When the stop condition is detected, the
IICSn.SPDn bit is set to 1 and the interrupt request signal (INTIICn) is generated when the IICCn.SPIEn bit is set to 1.
(a) When master device is in a nine-clock wait state and slave device is in an eight-clock wait state
(master: transmission, slave: reception, and IICCn.ACKEn bit = 1)
Master
Master returns to high
impedance but slave Wait after output
is in wait state (low level). of ninth clock.
IICn data write (cancel wait state)
IICn
SCL0n 6 7 8 9 1 2 3
Slave
Wait after output
of eighth clock. FFH is written to IICn register or
IICCn.WRELn bit is set to 1.
IICn
SCL0n
H
ACKEn
Transfer lines
Wait state Wait state
from slave from master
SCL0n 6 7 8 9 1 2 3
SDA0n D2 D1 D0 ACK D7 D6 D5
(b) When master and slave devices are both in a nine-clock wait state
(master: transmission, slave: reception, and ACKEn bit = 1)
SCL0n 6 7 8 9 1 2 3
Slave
FFH is written to IICn register
or WRELn bit is set to 1.
IICn
SCL0n
ACKEn H
Wait state
Transfer lines Wait state
from master/
from slave
slave
SCL0n 6 7 8 9 1 2 3
SDA0n D2 D1 D0 ACK D7 D6 D5
A wait state may be automatically generated depending on the setting of the IICCn.WTIMn bit.
Normally, the receiving side cancels the wait state when the IICCn.WRELn bit is set to 1 or when FFH is written to the
IICn register and the transmitting side cancels the wait state when data is written to the IICn register.
The master device can also cancel the wait state via either of the following methods.
If any of these wait state cancellation actions is performed, I2C0n will cancel the wait state and restart communication.
When canceling the wait state and sending data (including address), write data to the IICn register.
To receive data after canceling the wait state, or to complete data transmission, set the WRELn bit to 1.
To generate a restart condition after canceling the wait state, set the STTn bit to 1.
To generate a stop condition after canceling the wait state, set the SPTn bit to 1.
Execute cancellation only once for each wait state.
For example, if data is written to the IICn register following wait state cancellation by setting the WRELn bit to 1, a
conflict between the SDA0n line change timing and IICn register write timing may result in the data output to SDA0n being
an incorrect value.
Even in other operations, if communication is stopped halfway, clearing the IICCn.IICEn bit to 0 will stop communication,
enabling the wait state to be cancelled.
If the I2C bus dead-locks due to noise, etc., setting the IICCn.LRELn bit to 1 causes the communication operation to be
exited, enabling the wait state to be cancelled.
The following shows the value of the IICSn register at the INTIICn interrupt request signal generation timing and at the
INTIICn signal timing.
IICCn.SPTn bit = 1
↓
ST AD6 to AD0 R/W ACK D7 to D0 ACK D7 to D0 ACK SP
S1 S2 S3 S4 Δ5
SPTn bit = 1
↓
ST AD6 to AD0 R/W ACK D7 to D0 ACK D7 to D0 ACK SP
S1 S2 S3 Δ4
S1: IICSn register = 1000X110B
S1 S2 S3 S4 S5 S6 Δ7
S1 S2 S3 S4 Δ5
S1: IICSn register = 1000X110B
SPTn bit = 1
↓
ST AD6 to AD0 R/W ACK D7 to D0 ACK D7 to D0 ACK SP
S1 S2 S3 S4 Δ5
SPTn bit = 1
↓
ST AD6 to AD0 R/W ACK D7 to D0 ACK D7 to D0 ACK SP
S1 S2 S3 Δ4
18.7.2 Slave device operation (when receiving slave address data (address match))
S1 S2 S3 Δ4
S1 S2 S3 Δ4
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 Δ5
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 Δ5
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 Δ5
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 S5 Δ6
<1> When WTIMn bit = 0 (after restart, address mismatch (= not extension code))
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 Δ4
<2> When WTIMn bit = 1 (after restart, address mismatch (= not extension code))
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 Δ4
S1: IICSn register = 0001X110B
S1 S2 S3 Δ4
S1 S2 S3 S4 Δ5
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 Δ5
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 S5 Δ6
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 Δ5
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 S5 S6 Δ7
<1> When WTIMn bit = 0 (after restart, address mismatch (= not extension code))
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 Δ4
<2> When WTIMn bit = 1 (after restart, address mismatch (= not extension code))
ST AD6 to AD0 R/W ACK D7 to D0 ACK ST AD6 to AD0 R/W ACK D7 to D0 ACK SP
S1 S2 S3 S4 Δ5
S1: IICSn register = 0010X010B
Δ1
(1) When arbitration loss occurs during transmission of slave address data
S1 S2 S3 Δ4
S1: IICSn register = 0101X110B (Example: When IICSn.ALDn bit is read during interrupt servicing)
S2: IICSn register = 0001X000B
S1 S2 S3 Δ4
S1: IICSn register = 0101X110B (Example: When ALDn bit is read during interrupt servicing)
S1 S2 S3 Δ4
S1: IICSn register = 0110X010B (Example: When ALDn bit is read during interrupt servicing)
S1 S2 S3 S4 Δ5
S1: IICSn register = 0110X010B (Example: When ALDn bit is read during interrupt servicing)
18.7.6 Operation when arbitration loss occurs (no communication after arbitration loss)
(1) When arbitration loss occurs during transmission of slave address data
S1 Δ2
S1: IICSn register = 01000110B (Example: When IICSn.ALDn bit is read during interrupt servicing)
S1 Δ2
S1: IICSn register = 0110X010B (Example: When ALDn bit is read during interrupt servicing)
S1 S2 Δ3
S2: IICSn register = 01000000B (Example: When ALDn bit is read during interrupt servicing)
S1 S2 Δ3
S2: IICSn register = 01000100B (Example: When ALDn bit is read during interrupt servicing)
Δ 3: IICSn register = 00000001B
(4) When arbitration loss occurs due to restart condition during data transfer
S1 S2 Δ3
S2: IICSn register = 01000110B (Example: When ALDn bit is read during interrupt servicing)
S1 S2 Δ3
S1: IICSn register = 1000X110B
S2: IICSn register = 0110X010B (Example: When ALDn bit is read during interrupt servicing)
(5) When arbitration loss occurs due to stop condition during data transfer
S1 Δ2
(6) When arbitration loss occurs due to low level of SDA0n pin when attempting to generate a restart condition
S1 S2 S3 S4 Δ5
S1 S2 S3 Δ4
S1: IICSn register = 1000X110B
S3: IICSn register = 01000100B (Example: When ALDn bit is read during interrupt servicing)
Δ 4: IICSn register = 00000001B
(7) When arbitration loss occurs due to a stop condition when attempting to generate a restart condition
S1 S2 S3 Δ4
S1 S2 Δ3
(8) When arbitration loss occurs due to low level of SDA0n pin when attempting to generate a stop condition
S1 S2 S3 S4 Δ5
S1 S2 S3 Δ4
S1: IICSn register = 1000X110B
S3: IICSn register = 01000000B (Example: When ALDn bit is read during interrupt servicing)
Δ 4: IICSn register = 00000001B
18.8 Interrupt Request Signal (INTIICn) Generation Timing and Wait Control
The setting of the IICCn.WTIMn bit determines the timing by which the INTIICn register is generated and the
corresponding wait control, as shown below.
WTIMn Bit During Slave Device Operation During Master Device Operation
Address Data Reception Data Transmission Address Data Reception Data Transmission
Notes 1, 2 Note 2 Note 2
0 9 8 8 9 8 8
Notes 1, 2 Note 2 Note 2
1 9 9 9 9 9 9
Notes 1. The slave device’s INTIICn signal and wait period occur at the falling edge of the ninth clock only when
there is a match with the address set to the SVAn register.
At this point, the ACK is generated regardless of the value set to the IICCn.ACKEn bit. For a slave device
that has received an extension code, the INTIICn signal occurs at the falling edge of the eighth clock.
When the address does not match after restart, the INTIICn signal is generated at the falling edge of the
ninth clock, but no wait occurs.
2. If the received address does not match the contents of the SVAn register and an extension code is not
received, neither the INTIICn signal nor a wait occurs.
Remarks The numbers in the table indicate the number of the serial clock’s clock signals. Interrupt requests and
wait control are both synchronized with the falling edge of these clock signals.
When an 8-clock wait has been selected (WTIMn bit = 0), whether or not ACK has been generated must be
determined prior to wait cancellation.
In I2C bus mode, the master device can select a particular slave device by transmitting the corresponding slave address.
Address match detection is performed automatically by hardware. The INTIICn signal occurs when a local address has
been set to the SVAn register and when the address set to the SVAn register matches the slave address sent by the
master device, or when an extension code has been received.
In I2C bus mode, the status of the serial data bus pin (SDA0n) during data transmission is captured by the IICn register
of the transmitting device, so the data of the IICn register prior to transmission can be compared with the transmitted IICn
data to enable detection of transmission errors. A transmission error is judged as having occurred when the compared
data values do not match.
(1) When the higher 4 bits of the receive address are either 0000 or 1111, the extension code flag (IICSn.EXCn bit) is
set for extension code reception and an interrupt request signal (INTIICn) is issued at the falling edge of the eighth
clock.
The local address stored in the SVAn register is not affected.
(2) If 11110xx0 is set to the SVAn register by a 10-bit address transfer and 11110xx0 is transferred from the master
device, the results are as follows. Note that the INTIICn signal occurs at the falling edge of the eighth clock.
(3) Since the processing after the interrupt request signal occurs differs according to the data that follows the
extension code, such processing is performed by software.
For example, when operation as a slave is not desired after the extension code is received, set the IICCn.LRELn bit
to 1 and the CPU will enter the next communication wait state.
1111 0xx 0 10-bit slave address specification (when the address is authorized)
1111 0xx 1 10-bit slave address specification (after the address match, the read
command is issued)
Remark For the expansion codes other than the above, see I2C bus specifications issued by NXP.
18.12 Arbitration
When several master devices simultaneously generate a start condition (when the IICCn.STTn bit is set to 1 before the
IICSn.STDn bit is set to 1), communication between the master devices is performed while the number of clocks is
adjusted until the data differs. This kind of operation is called arbitration.
When one of the master devices loses in arbitration, an arbitration loss flag (IICSn.ALDn bit) is set to 1 via the timing at
which the arbitration loss occurred, and the SCL0n and SDA0n lines are both set to high impedance, which releases the
bus.
Arbitration loss is detected based on the timing of the next interrupt request signal (INTIICn) (the eighth or ninth clock,
when a stop condition is detected, etc.) and the setting of the ALDn bit to 1, which is made by software.
For details of interrupt request timing, see 18.7 I2C Interrupt Request Signals (INTIICn).
Master 1
Hi-Z
SCL0n
SDA0n Hi-Z
Master 1 loses arbitration
Master 2
SCL0n
SDA0n
Transfer lines
SCL0n
SDA0n
Table 18-6. Status During Arbitration and Interrupt Request Signal Generation Timing
Transmitting data
Notes 1. When the IICCn.WTIMn bit = 1, an INTIICn signal occurs at the falling edge of the ninth clock. When the
WTIMn bit = 0 and the extension code’s slave address is received, an INTIICn signal occurs at the falling
edge of the eighth clock.
2. When there is a possibility that arbitration will occur, set the SPIEn bit to 1 for master device operation.
The makeup function is a function that generates an interrupt request signal (INTIICn) when a local address or
extension code has been received by using the slave function of the I2C bus. This function makes processing more
efficient by preventing unnecessary INTIICn signals from occurring when addresses do not match.
When a start condition is detected, wakeup standby mode is set. This wakeup standby mode is in effect while
addresses are transmitted due to the possibility that an arbitration loss may change the master device (which generated
the start condition) to a slave device.
However, when a stop condition is detected, the IICCn.SPIEn bit is set regardless of the wakeup function, and this
determines whether INTIICn signal is enabled or disabled.
If the IICCn.STTn bit is set to 1 while the bus is not being used, a start condition is automatically generated and a wait
status is set after the bus is released (after the stop condition is detected).
When the bus release is detected (when the stop condition is detected), writing to the IICn register causes master
address transfer to start. At this point, the IICCn.SPIEn bit should be set to 1.
When STTn has been set to 1, the operation mode (as start condition or as communication reservation) is determined
according to the bus status.
To detect which operation mode has been determined, set the STTn bit to 1, wait for the wait period, then check the
IICSn.MSTSn bit.
The wait periods, which should be set via software, are listed in Table 18-7. These wait periods can be set by the SMCn,
CLn1, and CLn0 bits of the IICCLn register and the IICXn.CLXn bit.
Remarks1. m = 0, 1
2. × = Don’t care
STTn Write to
Program processing
=1 IICn
SCL0n 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6
SDA0n
Communication reservations are accepted via the following timing. After the IICSn.STDn bit is set to 1, a
communication reservation can be made by setting the IICCn.STTn bit to 1 before a stop condition is detected.
SCL0n
SDA0n
STDn
SPDn
Standby mode
DI
Note
(Communication reservation)
MSTSn bit = 0? Confirmation of communication reservation
Yes
No
(Generate start condition)
Cancel communication
Clears user flag.
reservation
EI
Note The communication reservation operation executes a write to the IICn register when a stop
condition interrupt request occurs.
To confirm whether the start condition was generated or the request was rejected, check the IICFn.STCFn flag. The
time shown in Table 18-8 is required until the STCFn flag is set after setting the STTn bit to 1. Therefore, secure the time
by software.
1 0 0 0 × 20 clocks
1 0 1 0 × 30 clocks
1 1 0 0 × 40 clocks
1 1 1 0 × 50 clocks
0 0 0 1 0 10 clocks
18.15 Cautions
(3) When the IICCn.IICEn bit of the V850ES/JC3-H and V850ES/JE3-H is set to 1 while other devices are
communicating, the start condition may be detected depending on the status of the communication line. Be sure to
set the IICCn.IICEn bit to 1 when the SCL0n and SDA0n lines are high level.
(4) Determine the operation clock frequency by using the IICCLn, IICXn, and OCKSm registers before enabling the
operation (IICCn.IICEn bit = 1). To change the operation clock frequency, first clear the IICCn.IICEn bit to 0.
(5) After the IICCn.STTn and IICCn.SPTn bits have been set to 1, they must not be re-set without being cleared to 0
first.
(6) If transmission has been reserved, set the IICCN.SPIEn bit to 1 so that an interrupt request is generated by the
detection of a stop condition. After an interrupt request has been generated, the wait status will be released by
writing communication data to I2Cn, then transfer will begin. If an interrupt is not generated by the detection of a
stop condition, transmission will halt in the wait status because an interrupt request was not generated. However, it
is not necessary to set the SPIEn bit to 1 for the software to detect the IICSn.MSTSn bit.
Remark m = 0, 1
START
Refer to Table 4-17 Settings When Port Pins Are Used for Alternate Functions
Set ports
to set the I2C mode before this function is used.
IICFn ← 0XH
Initial settings
IICCn ← XXH
ACKEn = WTIMn = SPIEn = 1
IICEn = 1
Yes
STCENn = 1?
No
Communication start preparation
SPTn = 1
(stop condition generation)
INTIICn No
interrupt occurred?
Waiting for stop condition detection
Yes
INTIICn No
interrupt occurred? Waiting for ACK detection
Yes
No
ACKDn = 1?
Yes
No
TRCn = 1?
Communication processing
ACKEn = 1
Yes WTIMn = 0
INTIICn No
interrupt occurred? INTIICn No
Waiting for data transmission
interrupt occurred?
Waiting for
Yes data reception
Yes
Yes
No
Transfer completed?
No
Transfer completed?
Yes
Yes
ACKEn = 0
WTIMn = WRELn = 1
Restarted? No
INTIICn No
SPTn = 1 interrupt occurred?
Yes Waiting for ACK detection
Yes
END
Note Release the I2C0n bus (SCL0n, SDA0n pins = high level) in compliance with the specifications of the
communicating product. For example, when the EEPROMTM outputs a low level to the SDA0n pin, set the
SCL0n pin to the output port and output clock pulses from that output port until the SDA0n pin becomes
constantly high level.
Remarks 1. For the transmission and reception formats, comply with the specifications of the communicating
product.
2. m = 0, 1
START
Refer to Table 4-17 Settings When Port Pins Are Used for Alternate Functions
Set ports
to set the I2C mode before this function is used.
IICXn ← 0XH
Transfer clock selection
IICCLn ← XXH
OCKSm ← XXH
IICFn ← 0XH
Start condition setting
Set STCENn, IICRSVn
IICCn ← XXH
ACKEn = WTIMn = SPIEn = 1
IICEn = 1
Initial settings
Confirmation of bus No
status is in progress STCENn = 1?
Yes
INTIICn interrupt No
No occurred? Waiting for stop condition
SPDn = 1? detection
Yes
Yes Slave operation
No
SPDn = 1?
Yes
Slave operation
Master operation No
started? (no communication start request)
Communication waiting
Yes SPIEn = 0
(communication start
request issued)
INTIICn interrupt No
SPIEn = 1 occurred? Waiting for communication request
Yes
Yes
A B
Communication Communication
reservation enable reservation disable
Note Confirm that the bus release status (IICCLn.CLDn bit = 1, IICCLn.DADn bit = 1) has been maintained for a
certain period (1 frame, for example). When the SDA0n pin is constantly low level, determine whether to
release the I2C0n bus (SCL0n, SDA0n pins = high level) by referring to the specifications of the
communicating product.
Remark m = 0, 1
No
MSTSn = 1?
Yes INTIICn No
interrupt occurred?
Waiting for bus release
(communication being reserved)
Yes
No
EXCn = 1 or COIn =1?
Wait status after stop condition
detection and start condition generation
by communication reservation function Yes
C Slave operation
No
IICBSYn = 0?
Yes
D
No
STCFn = 0?
Yes INTIICn No
interrupt occurred? Waiting for bus release
Yes
C
Yes
EXCn = 1 or COIn =1?
D Slave operation
Communication start
Write IICn
(address, transfer direction specification)
INTIICn No
interrupt occurred? Waiting for ACK detection
Yes
No
MSTSn = 1?
Yes
2
No
ACKDn = 1?
Yes
No
TRCn = 1?
ACKEn = 1
Communication processing
Yes WTIMn = 0
WTIMn = 1
WRELn = 1 Reception start
Yes No
MSTSn = 1?
No
MSTSn = 1?
Yes
2
Yes Read IICn
2
No
ACKDn = 1?
Transfer completed? No
Yes
Yes
No WTIMn = WRELn = 1
Transfer completed?
ACKEn = 0
Yes
INTIICn
No
interrupt occurred?
No Waiting for ACK detection
Restarted?
Yes
SPTn = 1
Yes
No
MSTSn = 1?
STTn = 1 END
Yes 2
C
Communication processing
Yes
EXCn = 1 or COIn = 1?
No Slave operation
1
Not in communication
Remarks 1. For the transmission and reception formats, comply with the specifications of the communicating
product.
2. When using the V850ES/JC3-H or V850ES/JE3-H as the master in a multimaster system, read the
IICSn.MSTSn bit for each INTIICn interrupt occurrence to confirm the arbitration result.
3. When using the V850ES/JC3-H or V850ES/JE3-H as the slave in a multimaster system, confirm the
status using the IICSn and IICFn registers for each INTIICn interrupt occurrence to determine the
next processing.
Data
Setting, etc.
Therefore, the following three flags are prepared so that the data transfer processing can be performed by passing
these flags to the main processing instead of the INTIICn signal.
The following shows the operation of the main processing block during slave operation.
I2C0n starts and waits for the communication enable status. When communication is enabled, I2C0n performs transfer
using the communication mode flag and ready flag (the processing of the stop condition and start condition is performed
by interrupts, conditions are confirmed by flags).
For transmission, the transmission operation is repeated until the master device stops returning ACK. When the master
device stops returning ACK, transfer is complete.
For reception, the required number of data is received and ACK is not returned for the next data immediately after
transfer is complete. After that, the master device generates the stop condition or restart condition. This causes exit from
communications.
START
Refer to Table 4-17 Settings When Port Pins Are Used for
Set ports Alternate Functions to set the I2C mode before this function is used.
IICXn ← 0XH
IICCLn ← XXH Transfer clock selection
Initial settings
OCKSm ← XXH
IICFn ← 0XH
Start condition setting
Set IICRSVn
IICCn ← XXH
ACKEn = WTIMn = 1
SPIEn = 0, IICEn = 1
No
Communication mode
flag = 1?
Yes
No
Communication direction
flag = 1?
Yes
Reception
WRELn = 1
start
Transmission
Write IICn
start
No
Communication mode
Communication processing
No flag = 1?
Communication mode
flag = 1? Yes
Yes No
Communication direction
No flag = 0?
Communication direction
flag = 1? Yes
Yes No
Ready flag = 1?
No
Ready flag = 1?
Yes
Yes
Read IICn
Clear ready flag
No
Remark m = 0, 1
The following shows an example of the processing of the slave device by an INTIICn interrupt (it is assumed that no
extension codes are used here). During INTIICn interrupt servicing, the status is confirmed and the following steps are
executed.
Remark <1> to <3> above correspond to <1> to <3> in Figure 18-22 Slave Operation Flowchart (2).
INTIICn occurred
Yes <1>
SPDn = 1?
No
Yes <2>
STDn = 1?
No No
COIn = 1?
<3>
Yes
Set ready flag
When using I2C bus mode, the master device outputs an address via the serial bus to select one of several slave
devices as its communication partner.
After outputting the slave address, the master device transmits the IICSn.TRCn bit, which specifies the data transfer
direction, and then starts serial communication with the slave device.
The shift operation of the IICn register is synchronized with the falling edge of the serial clock pin (SCL0n). The
transmit data is transferred to the SO latch and is output (MSB first) via the SDA0n pin.
Data input via the SDA0n pin is captured by the IICn register at the rising edge of the SCL0n pin.
The data communication timing is shown below.
ACKDn
STDn
SPDn
WTIMn H
ACKEn H
MSTSn
STTn
SPTn L
WRELn L
INTIICn
TRCn Transmit
Transfer lines
SCL0n 1 2 3 4 5 6 7 8 9 1 2 3 4
ACKDn
STDn
SPDn
WTIMn H
ACKEn H
MSTSn L
STTn L
SPTn L
WRELn Note 2
INTIICn
TRCn L Receive
Notes 1. Cancel the wait during a master transmission by writing data to IICn, not by setting WRELn.
2. To cancel the slave wait state, write FFH to IICn or set WRELn.
(b) Data
ACKDn
STDn L
SPDn L
WTIMn H
ACKEn H
MSTSn H
STTn L
SPTn L
WRELn L
INTIICn
TRCn H Transmit
Transfer lines
SCL0n 8 9 1 2 3 4 5 6 7 8 9 1 2 3
ACKDn
STDn L
SPDn L
WTIMn H
ACKEn H
MSTSn L
STTn L
SPTn L
INTIICn
TRCn L Receive
Notes 1. Cancel the wait during a master transmission by writing data to IICn, not by setting WRELn.
2. To cancel the slave wait state, write FFH to IICn or set WRELn.
ACKDn
STDn
SPDn
WTIMn H
ACKEn H
MSTSn
STTn
SPTn
WRELn L
INTIICn
(when SPIEn = 1)
TRCn Transmit
Transfer lines
SCL0n 1 2 3 4 5 6 7 8 9 1 2
ACKDn
STDn
SPDn
WTIMn H
ACKEn H
MSTSn L
STTn L
SPTn L
INTIICn
(when SPIEn = 1)
TRCn L Receive
Notes 1. Cancel the wait during a master transmission by writing data to IICn, not by setting WRELn.
2. To cancel the slave wait state, write FFH to IICn or set WRELn.
ACKDn
STDn
SPDn
WTIMn L
ACKEn H
MSTSn
STTn
SPTn L
WRELn Note 1
INTIICn
Transfer lines
SCL0n 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6
ACKDn
STDn
SPDn
WTIMn H
ACKEn H
MSTSn L
STTn L
SPTn L
WRELn L
INTIICn
Notes 1. To cancel the master wait state, write FFH to IICn or set WRELn.
2. Cancel the wait during a slave transmission by writing to IICn, not by setting WRELn.
(b) Data
ACKDn
STDn L
SPDn L
WTIMn L
ACKEn H
MSTSn H
STTn L
SPTn L
INTIICn
TRCn L Receive
Transfer lines
SCL0n 8 9 1 2 3 4 5 6 7 8 9 1 2 3
ACKDn
STDn L
SPDn L
WTIMn H
ACKEn H
MSTSn L
STTn L
SPTn L
WRELn L
INTIICn
TRCn H Transmit
Notes 1. To cancel the master wait state, write FFH to IICn or set WRELn.
2. Cancel the wait during a slave transmission by writing to IICn, not by setting WRELn.
ACKDn
STDn
SPDn
WTIMn
ACKEn
MSTSn
STTn
SPTn
WRELn Note 1
INTIICn
(when SPIEn = 1)
TRCn Receive
Transfer lines
SCL0n 1 2 3 4 5 6 7 8 9 1
ACKDn
STDn
SPDn
WTIMn H
ACKEn H
MSTSn L
STTn L
SPTn L
WRELn Note 1, 3
INTIICn
(When SPIEn = 1)
TRCn Transmit Note 3 Receive
Notes 1. To cancel the wait state, write FFH to IICn or set WRELn.
2. Cancel the wait during a slave transmission by writing to IICn, not by setting WRELn.
3. When the wait during a slave transmission is canceled by setting WRELn, TRCn is cleared.
Caution 1. The CAN controller is allocated in the programmable peripheral I/O area.
Before using the CAN controller, enable use of the programmable peripheral I/O area by using the
BPC register.
For details, refer to 3.4.7 Programmable peripheral I/O registers.
2. When using the CAN controller, make sure that fXX = 32 to 48 MHz.
19.1 Overview
The V850ES/JC3-H and V850ES/JE3-H feature an on-chip 1-channel CAN (Controller Area Network) controller that
complies with the CAN protocol as standardized in ISO 11898.
The V850ES/JC3-H and V850ES/JE3-H products with an on-chip CAN controller are as follows.
• μ PD70F3819, 70F3825
19.1.1 Features
• Compliant with ISO 11898 and tested according to ISO/DIS 16845 (CAN conformance test)
• Standard frame and extended frame transmission/reception enabled
• Transfer rate: 1 Mbps max. (CAN clock input ≥ 8 MHz)
• 32 message buffers/channels
• Receive/transmit history list function
• Automatic block transmission function
• Multi-buffer receive block function
• Mask setting of four patterns is possible for each channel
Function Details
Protocol CAN protocol ISO 11898 (standard and extended frame transmission/reception)
Baud rate Maximum 1 Mbps (CAN clock input ≥ 8 MHz)
Data storage Storing messages in the CAN RAM
Number of messages • 32 message buffers/channels
• Each message buffer can be set to be either a transmit message buffer or a receive
message buffer.
Message reception • Unique ID can be set to each message buffer.
• Mask setting of four patterns is possible for each channel.
• A receive completion interrupt is generated each time a message is received and stored in
a message buffer.
• Two or more receive message buffers can be used as a FIFO receive buffer (multi-buffer
receive block function).
• Receive history list function
Message transmission • Unique ID can be set to each message buffer.
• Transmit completion interrupt for each message buffer
• Message buffer numbers 0 to 7 specified as transmit message buffers can be used for
automatic block transfer. Message transmission interval is programmable (automatic
block transmission function (hereafter referred to as “ABT”)).
• Transmission history list function
Remote frame processing Remote frame processing by transmit message buffer
Time stamp function • The time stamp function can be set for a receive message when a 16-bit timer is used in
combination.
• The time stamp capture trigger can be selected (SOF or EOF in a CAN message frame
can be detected).
Diagnostic function • Readable error counters
• “Valid protocol operation flag” for verification of bus connections
• Receive-only mode
• Single-shot mode
• CAN protocol error type decoding
• Self-test mode
Release from bus-off state • Can be forcibly released from bus-off by software (timing restrictions are ignored).
• Cannot be automatically released from bus-off (release request by software is required).
Power save mode • CAN sleep mode (can be woken up by CAN bus)
• CAN stop mode (cannot be woken up by CAN bus)
19.1.3 Configuration
The CAN controller is composed of the following four blocks.
CPU
Interrupt request
INTC0TRX Internal bus
INTC0REC
INTC0ERR
INTC0WUP CAN module CAN bus
CAN RAM
Message C0MASK1
buffer 0 C0MASK2
Message
buffer 1 C0MASK3
Message C0MASK4
buffer 2
Message
buffer 3
TSOUT
...
Message
buffer 31
CAN (Controller Area Network) is a high-speed multiplex communication protocol for real-time communication in
automotive applications (class C). CAN is prescribed by ISO 11898. For details, refer to the ISO 11898 specifications.
The CAN specification is generally divided into two layers: a physical layer and a data link layer. In turn, the data link
layer includes logical link and medium access control. The composition of these layers is illustrated below.
Data frame
R
D
<1> <2> <3> <4> <5> <6> <7> <8>
Interframe space
End of frame (EOF)
ACK field
CRC field
Data field
Control field
Arbitration field
Start of frame (SOF)
Remark D: Dominant = 0
R: Recessive = 1
Remote frame
R
D
<1> <2> <3> <5> <6> <7> <8>
Interframe space
End of frame (EOF)
ACK field
CRC field
Control field
Arbitration field
Start of frame (SOF)
Remarks 1. The data field is not transferred even if the control field’s data length code is not “0000B”.
2. D: Dominant = 0
R: Recessive = 1
R
D
1 bit
Remark D: Dominant = 0
R: Recessive = 1
• If a dominant level is detected in the bus idle state, a hardware synchronization is performed (the current
TQ is assigned to be the SYNC segment).
• If a dominant level is sampled at the sample point following such a hardware synchronization, the bit is
assigned to be a SOF. If a recessive level is detected, the protocol layer returns to the bus idle state and
regards the preceding dominant pulse as a noise only. In this case an error frame is not generated.
Remark D: Dominant = 0
R: Recessive = 1
Remark D: Dominant = 0
R: Recessive = 1
Table 19-4. Frame Format Setting (IDE Bit) and Number of Identifier (ID) Bits
Remark D: Dominant = 0
R: Recessive = 1
In a standard format frame, the control field’s IDE bit is the same as the r1 bit.
0 0 0 0 0 bytes
0 0 0 1 1 byte
0 0 1 0 2 bytes
0 0 1 1 3 bytes
0 1 0 0 4 bytes
0 1 0 1 5 bytes
0 1 1 0 6 bytes
0 1 1 1 7 bytes
1 0 0 0 8 bytes
Other than above 8 bytes regardless of the
value of DLC3 to DLC0
Caution In the remote frame, there is no data field even if the data length code is
not 0000B.
Remark D: Dominant = 0
R: Recessive = 1
CRC delimiter
(15 bits) (1 bit)
Remark D: Dominant = 0
R: Recessive = 1
• The polynomial P(X) used to generate the 15-bit CRC sequence is expressed as follows.
P(X) = X15 + X14 + X10 + X8 + X7 + X4 + X3 + 1
• Transmitting node: Transmits the CRC sequence calculated from the data (before bit stuffing) in the
start of frame, arbitration field, control field, and data field.
• Receiving node: Compares the CRC sequence calculated using data bits that exclude the
stuffing bits in the receive data with the CRC sequence in the CRC field. If the
two CRC sequences do not match, the node issues an error frame.
Remark D: Dominant = 0
R: Recessive = 1
• If no CRC error is detected, the receiving node sets the ACK slot to the dominant level.
• The transmitting node outputs two recessive-level bits.
R
D
(7 bits)
Remark D: Dominant = 0
R: Recessive = 1
R
D
Intermission Bus idle
(3 bits) (0 to ∞ bits)
Remarks 1. Bus idle: State in which the bus is not used by any node.
2. D: Dominant = 0
R: Recessive = 1
R
D Intermission Suspend transmission Bus idle
(3 bits) (8 bits) (0 to ∞ bits)
Remarks 1. Bus idle: State in which the bus is not used by any node.
Suspend transmission: Sequence of 8 recessive-level bits transmitted from the
node in the error passive status.
2. D: Dominant = 0
R: Recessive = 1
Usually, the intermission field is 3 bits. If the transmitting node detects a dominant level at the third bit of
the intermission field, however, it executes transmission.
Error active A node in this status can transmit immediately after a 3-bit intermission.
Error passive A node in this status can transmit 8 bits after the intermission.
Error frame
R
D
(<4>) <1> <2> <3> (<5>)
6 bits 0 to 6 bits 8 bits
Remark D: Dominant = 0
R: Recessive = 1
<1> Error flag 1 6 Error active node: Outputs 6 dominant-level bits consecutively.
Error passive node: Outputs 6 recessive-level bits consecutively.
If another node outputs a dominant level while one node is outputting a
passive error flag, the passive error flag is not cleared until the same level
is detected 6 bits in a row.
<2> Error flag 2 0 to 6 Nodes receiving error flag 1 detect bit stuff errors and issues this error flag.
<3> Error delimiter 8 Outputs 8 recessive-level bits consecutively.
If a dominant level is detected at the 8th bit, an overload frame is
transmitted from the next bit.
<4> Error bit – The bit at which the error was detected.
The error flag is output from the bit next to the error bit.
In the case of a CRC error, this bit is output following the ACK delimiter.
<5> Interframe space/overload – An interframe space or overload frame starts from here.
frame
• When the receiving node has not completed the reception operationNote
• If a dominant level is detected at the first two bits during intermission
• If a dominant level is detected at the last bit (7th bit) of the end of frame or at the last bit (8th bit) of the error
delimiter/overload delimiter
Note In this CAN controller, all reception frames can be loaded without outputting an overload frame because of the
enough high-speed internal processing.
Overload frame
R
D
(<4>) <1> <2> <3> (<5>)
6 bits 0 to 6 bits 8 bits
Remark D: Dominant = 0
R: Recessive = 1
Node n ≠ node m
19.3 Functions
Remark If the extended-format data frame and the standard-format remote frame conflict on the bus (if ID28 to ID18
of both of them are the same), the standard-format remote frame takes priority.
Transmission During the transmission of a data frame or remote frame, when the same level continues for 5 bits in the data
between the start of frame and the ACK field, 1 inverted-level bit of data is inserted before the following bit.
Reception During the reception of a data frame or remote frame, when the same level continues for 5 bits in the data
between the start of frame and the ACK field, reception is continued after deleting the next bit.
Bit error Comparison of the output level Mismatch of levels Transmitting/ Bit that is outputting data on the bus
and level on the bus receiving node at the start of frame to end of frame,
error frame and overload frame.
Stuff error Check of the receive data at 6 consecutive bits of Receiving node Start of frame to CRC sequence
the stuff bit the same output level
CRC error Comparison of the CRC Mismatch of CRC Receiving node CRC field
sequence generated from the
receive data and the received
CRC sequence
Form error Field/frame check of the fixed Detection of fixed Receiving node CRC delimiter
format format violation ACK field
End of frame
Error frame
Overload frame
ACK error Check of the ACK slot by the Detection of recessive Transmitting node ACK slot
transmitting node level in ACK slot
Bit error, stuff error, form Error frame output is started at the timing of the bit following the detected error.
error, ACK error
CRC error Error frame output is started at the timing of the bit following the ACK delimiter.
• If the value of the transmission error counter is greater than or equal to 256 (actually, the transmission error
counter does not indicate a value greater than or equal to 256), the bus-off state is reached and the
C0INFO.BOFF bit is set to 1.
• If only one node is active on the bus at startup (i.e., when the bus is connected only to the local station),
ACK is not returned even if data is transmitted. Consequently, re-transmission of the error frame and data
is repeated. In the error passive state, however, the transmission error counter is not incremented and the
bus-off state is not reached.
Type Operation Value of Error Indication of C0INFO Operation Specific to Error State
Counter Register
Error active Transmission 0 to 95 TECS1, TECS0 = 00 • Outputs an active error flag (6 consecutive dominant-
Reception 0 to 95 RECS1, RECS0 = 00 level bits) on detection of the error.
Note The value of the transmit error counter (TEC) does not carry any meaning if BOFF has been set. If an error that
increments the value of the transmission error counter by 8 while the counter value is in a range of 248 to 255
occurs, the counter is not incremented and the bus-off state is assumed.
Receiving node detects an error (except bit error in the active error No change +1 (REPS bit = 0)
flag or overload flag).
Receiving node detects dominant level following error flag of error No change +8 (REPS bit = 0)
frame.
Transmitting node transmits an error flag. +8 No change
[As exceptions, the error counter does not change in the following
cases.]
<1> ACK error is detected in error passive state and dominant level
is not detected while the passive error flag is being output.
<2> A stuff error is detected in an arbitration field that transmitted a
recessive level as a stuff bit, but a dominant level is detected.
Bit error detection while active error flag or overload flag is being +8 No change
output (error-active transmitting node)
Bit error detection while active error flag or overload flag is being No change +8 (REPS bit = 0)
output (error-active receiving node)
When the node detects 14 consecutive dominant-level bits from the +8 (transmitting) +8 (receiving, REPS bit = 0)
beginning of the active error flag or overload flag, and then
subsequently detects 8 consecutive dominant-level bits.
When the node detects 8 consecutive dominant levels after a
passive error flag
When the transmitting node has completed transmission without –1 No change
error (±0 if error counter = 0)
When the receiving node has completed reception without error No change • –1 (1 ≤ REC6 to REC0 ≤
127, REPS bit = 0)
• ±0 (REC6 to REC0 = 0,
REPS bit = 0)
• Any value of 119 to 127
is set (REPS bit = 1)
Caution If an error occurs, it is controlled according to the contents of the transmission error counter
and reception error counter before the error occurred. The value of the error counter is
incremented after the error flag has been output.
Cautions 1. If a request to change the mode from the initialization mode to any operation mode to
execute the bus-off recovery sequence again during a bus-off recovery sequence, the
bus-off recovery sequence starts from the beginning and 11 contiguous recessive bits
are counted 128 times again on the bus.
2. In the bus-off recovery sequence, the REC0 to REC6 bits counts up (+1) each time 11
consecutive recessive-level bits have been detected. Even during the bus-off period, the
CAN module can enter the CAN sleep mode or CAN stop mode. To be released from the
bus-off state, the module must enter the initialization mode once. If the module is in the
CAN sleep mode or CAN stop mode, however, it cannot directly enter the initialization
mode. In this case, the bus off recovery sequence is started at the same time as the CAN
sleep mode is released even without shifting to the initialization mode. In addition to
clearing the C0CTRL.PSMODE1 and C0CTRL.PSMODE0 bits by software, the bus off
recovery sequence is also started due to wakeup by dominant edge detection on the CAN
bus (While the CAN clock is supplied, the C0CTRL.PSMODE0 bit must be cleared by
software after a dominant edge is detected.) .
Figure 19-17. Recovery from Bus-off State Through Normal Recovery Sequence
BOFF bit
in C0INFO
register
<1> <2>
OPMODE[2:0]
in C0CTRL ≠ 00H
register
00H ≠ 00H
(written by user)
OPMODE[2:0] <3>
in C0CTRL
≠ 00H 00H ≠ 00H
register
(read by user)
TEC[7:0]
in C0ERC 80H ≤ TEC[7:0] ≤ FFH FFH < TEC [7:0] 00H 00H ≤ TEC[7:0] < 80H
register
REC[7:0]
00H ≤ REC[7:0] ≤ 80H Undefined 00H ≤ REC[7:0] < 80H
in C0ERC
register
Caution This function is not defined by the CAN protocol ISO 11898. When using this function,
thoroughly evaluate its effect on the network system.
(6) Initializing CAN module error counter register (C0ERC) in initialization mode
If it is necessary to initialize the C0ERC and C0INFO registers for debugging or evaluating a program, they can be
initialized to the default value by setting the C0CTRL.CCERC bit in the initialization mode. When initialization has
been completed, the CCERC bit is automatically cleared to 0.
Cautions 1. This function is enabled only in the initialization mode. Even if the CCERC bit is set to 1 in a
CAN operation mode, the C0ERC and C0INFO registers are not initialized.
2. The CCERC bit can be set at the same time as the request to enter a CAN operation mode.
(1) Prescaler
The CAN controller has a prescaler that divides the clock (fCAN) supplied to CAN. This prescaler generates a CAN
protocol layer base clock (fTQ) that is the CAN module system clock (fCANMOD) divided by 1 to 256 (see 19.6 (12)
CAN0 module bit rate prescaler register (C0BRP)).
The CAN controller sets the data bit time by replacing it with the bit timing parameters such as time segment 1,
time segment 2, and reSynchronization Jump Width (SJW), as shown in Figure 19-18. Time segment 1 is
equivalent to the total of the propagation (prop) segment and phase segment 1 that are defined by the CAN
protocol specification. Time segment 2 is equivalent to phase segment 2.
Time segment 2 (TSEG2) 1TQ to 8TQ IPT of the CAN controller is 0TQ. To conform to the CAN
protocol specification, therefore, a length equal or less to
phase segment 1 must be set here. This means that the
length of time segment 1 minus 1TQ is the settable upper
limit of time segment 2.
reSynchronization Jump Width 1TQ to 4TQ The length of time segment 1 minus 1TQ or 4TQ,
(SJW) whichever smaller.
Remark The CAN protocol specification defines the segments constituting the data bit time as shown in Figure 19-19.
SJW
Sync segment 1 This segment starts at the edge where the level changes
(Synchronization segment) from recessive to dominant when hardware synchronization
is established.
Prop segment Programmable to 1 to 8, This segment absorbs the delay of the output buffer, CAN
(Propagation segment) or greater bus, and input buffer.
The length of this segment is set so that ACK is returned
before the start of phase segment 1.
Time of prop segment ≥ (Delay of output buffer) + 2 ×
(Delay of CAN bus) + (Delay of input buffer)
Phase segment 1 Programmable to 1 to 8 This segment compensates for an error in the data bit time.
(Phase buffer segment 1) The longer this segment, the wider the permissible range
Phase segment 2 Phase segment 1 or IPT, but the slower the communication speed.
(Phase buffer segment 2) whichever greater
SJW Programmable from 1TQ This width sets the upper limit of expansion or contraction
(reSynchronization Jump to segment 1TQ to 4TQ, of the phase segment during resynchronization.
Width) whichever is smaller
• When a falling edge is detected on the bus, that TQ means the sync segment and the next segment is the
prop segment. In this case, synchronization is established regardless of SJW.
Figure 19-20. Hardware Synchronization Due to Dominant Level Detection During Bus Idle
CAN bus
(b) Resynchronization
Synchronization is established again if a level change is detected on the bus during reception (only if a
recessive level was sampled previously).
• The phase error of the edge is given by the relative position of the detected edge and sync segment.
<Sign of phase error>
0: If the edge is within the sync segment
Positive: If the edge is before the sample point (phase error)
Negative: If the edge is after the sample point (phase error)
If phase error is positive: Phase segment 1 is longer by specified SJW.
If phase error is negative: Phase segment 2 is shorter by specified SJW.
• The sample point of the data of the receiving node moves relatively due to the “discrepancy” in the baud
rate between the transmitting node and receiving node.
CAN bus
Sample point
If phase error is negative
CAN bus
Sample point
The microcontroller with on-chip CAN controller has to be connected to the CAN bus using an external transceiver.
Microcontroller CTXD0
CANL
with on-chip CRXD0 Transceiver
CAN controller CANH
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Register Name Symbol R/W Bit Manipulation Units After Reset
1 Bit 8 Bits 16 Bits
Address Symbol Bit 7/15 Bit 6/14 Bit 5/13 Bit 4/12 Bit 3/11 Bit 2/10 Bit 1/9 Bit 0/8
Address Symbol Bit 7/15 Bit 6/14 Bit 5/13 Bit 4/12 Bit 3/11 Bit 2/10 Bit 1/9 Bit 0/8
03FEC040H C0MASK1L CMID7 to CMID0
03FEC041H CMID15 to CMID8
03FEC042H C0MASK1H CMID23 to CMID16
03FEC043H 0 0 0 CMID28 to CMID24
03FEC044H C0MASK2L CMID7 to CMID0
03FEC045H CMID15 to CMID8
03FEC046H C0MASK2H CMID23 to CMID16
03FEC047H 0 0 0 CMID28 to CMID24
03FEC048H C0MASK3L CMID7 to CMID0
03FEC049H CMID15 to CMID8
03FEC04AH C0MASK3H CMID23 to CMID16
03FEC04BH 0 0 0 CMID28 to CMID24
03FEC04CH C0MASK4L CMID7 to CMID0
03FEC04DH CMID15 to CMID8
03FEC04EH C0MASK4H CMID23 to CMID16
03FEC04FH 0 0 0 CMID28 to CMID24
03FEC050H C0CTRL (W) 0 Clear AL Clear Clear Clear Clear Clear Clear
VALID PSMODE PSMODE OPMODE OPMODE OPMODE
1 0 2 1 0
03FEC051H Set Set 0 Set Set Set Set Set
CCERC AL PSMODE PSMODE OPMODE OPMODE OPMODE
1 0 2 1 0
03FEC050H C0CTRL (R) CCERC AL VALID PS PS OP OP OP
MODE1 MODE0 MODE2 MODE1 MODE0
03FEC051H 0 0 0 0 0 0 RSTAT TSTAT
03FEC052H C0LEC (W) 0 0 0 0 0 0 0 0
03FEC052H C0LEC (R) 0 0 0 0 0 LEC2 LEC1 LEC0
03FEC053H C0INFO 0 0 0 BOFF TECS1 TECS0 RECS1 RECS0
03FEC054H C0ERC TEC7 to TEC0
03FEC055H REC7 to REC0
03FEC056H C0IE (W) 0 0 Clear Clear Clear Clear Clear Clear
CIE5 CIE4 CIE3 CIE2 CIE1 CIE0
03FEC057H 0 0 Set CIE5 Set CIE4 Set CIE3 Set CIE2 Set CIE1 Set CIE0
03FEC056H C0IE (R) 0 0 CIE5 CIE4 CIE3 CIE2 CIE1 CIE0
03FEC057H 0 0 0 0 0 0 0 0
03FEC058H C0INTS (W) 0 0 Clear Clear Clear Clear Clear Clear
CINTS5 CINTS4 CINTS3 CINTS2 CINTS1 CINTS0
03FEC059H 0 0 0 0 0 0 0 0
03FEC058H C0INTS (R) 0 0 CINTS5 CINTS4 CINTS3 CINTS2 CINTS1 CINTS0
03FEC059H 0 0 0 0 0 0 0 0
Address Symbol Bit 7/15 Bit 6/14 Bit 5/13 Bit 4/12 Bit 3/11 Bit 2/10 Bit 1/9 Bit 0/8
03FEC05AH C0BRP TQPRS7 to TQPRS0
03FEC05CH C0BTR 0 0 0 0 TSEG13 to TSEG10
03FEC05DH 0 0 SJW1, SJW0 0 TSEG22 to TSEG20
03FEC05EH C0LIPT LIPT7 to LIPT0
03FEC060H C0RGPT (W) 0 0 0 0 0 0 0 Clear
ROVF
03FEC061H 0 0 0 0 0 0 0 0
03FEC060H C0RGPT (R) 0 0 0 0 0 0 RHPM ROVF
03FEC061H RGPT7 to RGPT0
03FEC062H C0LOPT LOPT7 to LOPT0
03FEC064H C0TGPT (W) 0 0 0 0 0 0 0 Clear
TOVF
03FEC065H 0 0 0 0 0 0 0 0
03FEC064H C0TGPT (R) 0 0 0 0 0 0 THPM TOVF
03FEC065H TGPT7 to TGPT0
03FEC066H C0TS (W) 0 0 0 0 0 Clear Clear Clear
TSLOCK TSSEL TSEN
03FEC067H 0 0 0 0 0 Set Set Set
TSLOCK TSSEL TSEN
03FEC066H C0TS (R) 0 0 0 0 0 TSLOCK TSSEL TSEN
03FEC067H 0 0 0 0 0 0 0 0
03FEC068H − Access prohibited (reserved for future use)
to
03FEC0FFH
Address Symbol Bit 7/15 Bit 6/14 Bit 5/13 Bit 4/12 Bit 3/11 Bit 2/10 Bit 1/9 Bit 0/8
03FECxx0H C0MDATA01m Message data (byte 0)
03FECxx1H Message data (byte 1)
03FECxx0H C0MDATA0m Message data (byte 0)
03FECxx1H C0MDATA1m Message data (byte 1)
03FECxx2H C0MDATA23m Message data (byte 2)
03FECxx3H Message data (byte 3)
03FECxx2H C0MDATA2m Message data (byte 2)
03FECxx3H C0MDATA3m Message data (byte 3)
03FECxx4H C0MDATA45m Message data (byte 4)
03FECxx5H Message data (byte 5)
03FECxx4H C0MDATA4m Message data (byte 4)
03FECxx5H C0MDATA5m Message data (byte 5)
03FECxx6H C0MDATA67m Message data (byte 6)
03FECxx7H Message data (byte 7)
03FECxx6H C0MDATA6m Message data (byte 6)
03FECxx7H C0MDATA7m Message data (byte 7)
03FECxx8H C0MDLCm 0 MDLC3 MDLC2 MDLC1 MDLC0
03FECxx9H C0MCONFm OWS RTR MT2 MT1 MT0 0 0 MA0
03FECxxAH C0MIDLm ID7 ID6 ID5 ID4 ID3 ID2 ID1 ID0
03FECxxBH ID15 ID14 ID13 ID12 ID11 ID10 ID9 ID8
03FECxxCH C0MIDHm ID23 ID22 ID21 ID20 ID19 ID18 ID17 ID16
03FECxxDH IDE 0 0 ID28 ID27 ID26 ID25 ID24
03FECxxEH C0MCTRLm (W) 0 0 0 Clear Clear Clear Clear Clear
MOW IE DN TRQ RDY
03FECxxFH 0 0 0 0 Set IE 0 Set TRQ Set RDY
03FECxxEH C0MCTRLm (R) 0 0 0 MOW IE DN TRQ RDY
03FECxxFH 0 0 MUC 0 0 0 0 0
03FECxx0 − Access prohibited (reserved for future use)
to
03FECxxFH
Remark m = 00 to 31
xx = 10, 12, 14, 16, 18, 1A, 1C, 1E, 20, 22, 24, 26, 28, 2A, 2C, 2E, 30, 32, 34, 36, 38, 3A, 3C, 3E, 40, 42, 44,
46, 48, 4A, 4C, 4E
19.6 Registers
Caution Accessing the CAN controller registers is prohibited in the following statuses. For details, refer to
3.4.9 (2) Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
Remark m = 00 to 31
(a) Read
15 14 13 12 11 10 9 8
C0GMCTRL MBON 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 EFSD GOM
(b) Write
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 Clear
GOM
(a) Read
MBON Bit enabling access to message buffer register, transmit/receive history registers
0 Write access and read access to the message buffer register and the transmit/receive history list registers is
disabled.
1 Write access and read access to the message buffer register and the transmit/receive history list registers is
enabled.
Cautions 1. While the MBON bit is cleared (to 0), software access to the message buffers
(C0MDATA0m, C0MDATA1m, C0MDATA01m, C0MDATA2m, C0MDATA3m, C0MDATA23m,
C0MDATA4m, C0MDATA5m, C0MDATA45m, C0MDATA6m, C0MDATA7m, C0MDATA67m,
C0MDLCm, C0MCONFm, C0MIDLm, C0MIDHm, and C0MCTRLm), or registers related to
transmit history or receive history (C0LOPT, C0TGPT, C0LIPT, and C0RGPT) is disabled.
2. This bit is read-only. Even if 1 is written to the MBON bit while it is 0, the value of the
MBON bit does not change, and access to the message buffer registers, or registers
related to transmit history or receive history remains disabled.
Remark When the CAN sleep mode/CAN stop mode is entered, or when the GOM bit is cleared to 0, the MBON
bit is cleared to 0. When the CAN sleep mode/CAN stop mode is released, or when the GOM bit is set
to 1, the MBON bit is set to 1.
(2/2)
Caution To request forced shut down, clear the GOM bit to 0 immediately after the EFSD bit has been
set to 1. If access to another register (including reading the C0GMCTRL register) is executed
without clearing the GOM bit immediately after the EFSD bit has been set to 1, the EFSD bit is
forcibly cleared to 0, and the forced shut down request is invalid.
Caution The GOM bit is cleared to 0 only in the initialization mode or immediately after the EFSD bit is
set to 1.
(b) Write
Caution Be sure to set the GOM bit and EFSD bit separately.
7 6 5 4 3 2 1 0
(a) Read
15 14 13 12 11 10 9 8
C0GMABT 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 ABTCLR ABTTRG
(b) Write
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 Clear
ABTTRG
Caution Before changing the normal operation mode with ABT to the initialization mode, be sure to set
the C0GMABT register to the default value (0000H). After setting, confirm that the C0GMABT
register is initialized to 0000H.
(a) Read
Remarks 1. Set the ABTCLR bit to 1 while the ABTTRG bit is cleared to 0.
The operation is not guaranteed if the ABTCLR bit is set to 1 while the ABTTRG bit is set to 1.
2. When the automatic block transmission engine is cleared by setting the ABTCLR bit to 1, the
ABTCLR bit is automatically cleared to 0 as soon as the requested clearing processing is complete.
Cautions 1. Do not set the ABTTRG bit to 1 in the initialization mode. If the ABTTRG bit is set to 1 in
the initialization mode, the operation is not guaranteed after the CAN module has entered
the normal operation mode with ABT.
2. Do not set the ABTTRG bit to 1 while the C0CTRL.TSTAT bit is set to 1. Directly confirm
that the TSTAT bit = 0 before setting the ABTTRG bit to 1.
(2/2)
(b) Write
Caution Even if the ABTTRG bit is set (1), transmission is not immediately executed, depending on the
situation such as when a message is received from another node or when a message other
than the ABT message (message buffers 8 to 31) is transmitted.
Even if the ABTTRG bit is cleared (0), transmission is not terminated midway. If transmission
is under execution, it is continued until completed (regardless of whether transmission is
successful or fails).
7 6 5 4 3 2 1 0
Cautions 1. Do not change the contents of the C0GMABTD register while the ABTTRG bit is set to 1.
2. The timing at which the ABT message is actually transmitted onto the CAN bus differs
depending on the status of transmission from the other station or how a request to
transmit a message other than an ABT message (message buffers 8 to 31) is made.
3. Be sure to set bits 4 to 7 to “0”.
(1/2)
15 14 13 12 11 10 9 8
15 14 13 12 11 10 9 8
C0MASK1H 0 0 0 CMID28 CMID27 CMID26 CMID25 CMID24
7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
(2/2)
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
CMID7 CMID6 CMID5 CMID4 CMID3 CMID2 CMID1 CMID0
15 14 13 12 11 10 9 8
15 14 13 12 11 10 9 8
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
0 The ID bits of the message buffer set by the CMID28 to CMID0 bits are compared with the ID
bits of the received message frame.
1 The ID bits of the message buffer set by the CMID28 to CMID0 bits are not compared with the
ID bits of the received message frame (they are masked).
Remark Masking is always defined by an ID length of 29 bits. If a mask is assigned to a message with a
standard ID, the CMID17 to CMID0 bits are ignored. Therefore, only the CMID28 to CMID18 bits of the
received ID are masked. The same mask can be used for both the standard and extended IDs.
(a) Read
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
(b) Write
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
(a) Read
0 Reception is stopped.
1 Reception is in progress.
Remark • The RSTAT bit is set to 1 under the following conditions (timing)
• The SOF bit of a receive frame is detected
• On occurrence of arbitration loss during a transmit frame
• The RSTAT bit is cleared to 0 under the following conditions (timing)
• When a recessive level is detected at the second bit of the interframe space
• On transition to the initialization mode at the first bit of the interframe space
0 Transmission is stopped.
1 Transmission is in progress.
Remark • The TSTAT bit is set to 1 under the following conditions (timing)
• The SOF bit of a transmit frame is detected
• The TSTAT bit is cleared to 0 under the following conditions (timing)
• During transition to bus-off status
• On occurrence of arbitration loss in transmit frame
• On detection of recessive level at the second bit of the interframe space
• On transition to the initialization mode at the first bit of the interframe space
(2/4)
0 The C0ERC and C0INFO registers are not cleared in the initialization mode.
1 The C0ERC and C0INFO registers are cleared in the initialization mode.
Remarks 1. The CCERC bit is used to clear the C0ERC and C0INFO registers for re-initialization or forced
recovery from the bus-off status. This bit can be set to 1 only in the initialization mode.
2. When the C0ERC and C0INFO registers have been cleared, the CCERC bit is also cleared to 0
automatically.
3. The CCERC bit can be set to 1 at the same time as a request to change the initialization mode to
an operation mode is made.
4. If the CCERC bit is set to 1 immediately after the INIT mode is entered in the self test mode, the
receive data may be corrupted.
0 A valid message frame has not been received since the VALID bit was last cleared to 0.
1 A valid message frame has been received since the VALID bit was last cleared to 0.
Remarks 1. Detection of a valid receive message frame is not dependent upon the existence or non-existence
of the storage in the receive message buffer (data frame) or transmit message buffer (remote
frame).
2. Clear the VALID bit (0) before changing the initialization mode to an operation mode.
3. If only two CAN nodes are connected to the CAN bus with one transmitting a message frame in the
normal mode and the other in the receive-only mode, since no ACK is generated in the receive-
only mode, the VALID bit is not set to 1 before the transmitting node enters the error passive status.
4. To clear the VALID bit, set the Clear VALID bit to 1 first and confirm that the VALID bit is cleared. If
it is not cleared, perform clearing processing again.
(3/4)
Cautions 1. Transition to and from the CAN stop mode must be made via CAN sleep mode. A request
for direct transition to and from the CAN stop mode is ignored.
2. After releasing the power save mode, the C0GMCTRL.MBON flag must be checked before
accessing the message buffer again.
3. A request for transition to the CAN sleep mode is held pending until it is canceled by
software or until the CAN bus enters the bus idle state. The software can check transition
to the CAN sleep mode by reading the PSMODE0 and PSMODE1 bits.
Caution It may take time to change the mode to the initialization mode or power save mode. Therefore,
be sure to check if the mode has been successfully changed, by reading the register value
before executing the processing.
Remark The OPMODE0 to OPMODE2 bits are read-only in the CAN sleep mode or CAN stop mode.
(b) Write
0 1 AL bit is cleared to 0.
1 0 AL bit is set to 1.
Other than above AL bit is not changed.
(4/4)
7 6 5 4 3 2 1 0
Remarks 1. The contents of the C0LEC register are not cleared when the CAN module changes from an
operation mode to the initialization mode.
2. If an attempt is made to write a value other than 00H to the C0LEC register by software, the access
is ignored.
7 6 5 4 3 2 1 0
0 0 The value of the transmission error counter is less than that of the warning level (< 96).
0 1 The value of the transmission error counter is in the range of the warning level (96 to 127).
1 0 Undefined
1 1 The value of the transmission error counter is in the range of the error passive or bus-off status
(≥ 128).
0 0 The value of the reception error counter is less than that of the warning level (< 96).
0 1 The value of the reception error counter is in the range of the warning level (96 to 127).
1 0 Undefined
1 1 The value of the reception error counter is in the error passive range (≥ 128).
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
TEC7 TEC6 TEC5 TEC4 TEC3 TEC2 TEC1 TEC0
0 The value of the reception error counter is not error passive (< 128)
1 The value of the reception error counter is in the error passive range (≥ 128)
Remark The REC6 to REC0 bits of the reception error counter are invalid in the reception error passive status
(C0INFO.RECS1, C0INFO.RECS0 bit = 11B).
0 to 255 Number of transmission errors. These bits reflect the status of the transmission error counter.
The number of errors is defined by the CAN protocol.
Remark The TEC7 to TEC0 bits of the transmission error counter are invalid in the bus-off status (C0INFO.BOFF
bit = 1).
(a) Read
15 14 13 12 11 10 9 8
C0IE 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
(b) Write
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
(a) Read
(2/2)
(b) Write
(a) Read
15 14 13 12 11 10 9 8
C0INTS 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
(b) Write
15 14 13 12 11 10 9 8
C0INTS 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
(a) Read
Note The CINTS5 bit is set (1) only when the CAN module is woken up from the CAN sleep mode by a CAN bus
operation. The CINTS5 bit is not set (1) when the CAN sleep mode has been released by software.
(b) Write
Caution The status bit of this register is not automatically cleared. Clear it (0) by software if each
status must be checked in the interrupt servicing.
7 6 5 4 3 2 1 0
0 fCANMOD/1
1 fCANMOD/2
n fCANMOD/(n + 1)
: :
255 fCANMOD/256 (default value)
Caution The C0BRP register can be write-accessed only in the initialization mode.
15 14 13 12 11 10 9 8
0 0 0 1TQ
0 0 1 2TQ
0 1 0 3TQ
0 1 1 4TQ
1 0 0 5TQ
1 0 1 6TQ
1 1 0 7TQ
1 1 1 8TQ (default value)
0 0 0 0 Setting prohibited
Note
0 0 0 1 2TQ
Note
0 0 1 0 3TQ
0 0 1 1 4TQ
0 1 0 0 5TQ
0 1 0 1 6TQ
0 1 1 0 7TQ
0 1 1 1 8TQ
1 0 0 0 9TQ
1 0 0 1 10TQ
1 0 1 0 11TQ
1 0 1 1 12TQ
1 1 0 0 13TQ
1 1 0 1 14TQ
1 1 1 0 15TQ
1 1 1 1 16TQ (default value)
Note This setting must not be made when the C0BRP register = 00H.
7 6 5 4 3 2 1 0
0 to 31 When the C0LIPT register is read, the contents of the element indexed by the last in-pointer
(LIPT) of the receive history list are read. These contents indicate the number of the message
buffer in which a data frame or a remote frame was last stored.
Remark The read value of the C0LIPT register is undefined if a data frame or a remote frame has never been
stored in the message buffer. If the C0RGPT.RHPM bit is set to 1 after the CAN module has changed
from the initialization mode to an operation mode, therefore, the read value of the C0LIPT register is
undefined.
(a) Read
15 14 13 12 11 10 9 8
0 0 0 0 0 0 RHPM ROVF
(b) Write
15 14 13 12 11 10 9 8
C0RGPT 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 Clear
ROVF
(a) Read
0 to 31 When the C0RGPT register is read, the contents of the element indexed by the receive history
list get pointer (RGPT) of the receive history list are read. These contents indicate the number of
the message buffer in which a data frame or a remote frame has been stored.
Note 1
RHPM Receive history list pointer match
0 The receive history list has at least one message buffer number that has not been read.
1 The receive history list has no message buffer numbers that have not been read.
Note 2
ROVF Receive history list overflow bit
0 All the message buffer numbers that have not been read are preserved. All the numbers of the message
buffers in which a new data frame or remote frame has been received and stored are recorded to the
receive history list (the receive history list has a vacant element).
1 At least 23 entries have been stored since the host processor serviced the RHL last time (i.e. read
C0RGPT). The first 22 entries are sequentially stored whereas the last entry might have been
overwritten by newly received messages a number of times because all buffer numbers are stored at
position LIPT-1 when the ROVF bit is set to 1. As a consequence receptions cannot be completely
recovered in the order that they were received.
Notes 1. The read value of the RGPT0 to RGPT7 bits is invalid when the RHPM bit = 1.
2. If all the receive history is read by the C0RGPT register while the ROVF bit is set (1), the RHPM bit
is not cleared (0) but kept set (1) even if newly received data is stored.
(2/2)
(b) Write
7 6 5 4 3 2 1 0
0 to 31 When the C0LOPT register is read, the contents of the element indexed by the last out-pointer
(LOPT) of the receive history list are read. These contents indicate the number of the message
buffer to which a data frame or a remote frame was transmitted last.
Remark The value read from the C0LOPT register is undefined if a data frame or remote frame has never been
transmitted from a message buffer. If the C0TGPT.THPM bit is set to 1 after the CAN module has
changed from the initialization mode to an operation mode, therefore, the read value of the C0LOPT
register is undefined.
(a) Read
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
0 0 0 0 0 0 THPM TOVF
(b) Write
15 14 13 12 11 10 9 8
C0TGPT 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 Clear
TOVF
(a) Read
0 to 31 When the C0TGPT register is read, the contents of the element indexed by the read pointer
(TGPT) of the transmit history list are read. These contents indicate the number of the message
buffer to which a data frame or a remote frame was transmitted last.
Note 1
THPM Transmit history pointer match
0 The transmit history list has at least one message buffer number that has not been read.
1 The transmit history list has no message buffer numbers that have not been read.
Note 2
TOVF Transmit history list overflow bit
0 All the message buffer numbers that have not been read are preserved. All the numbers of the
message buffers to which a new data frame or remote frame has been transmitted are recorded to
the transmit history list (the transmit history list has a vacant element).
1 At least 7 entries have been stored since the host processor serviced the THL last time (i.e. read
C0TGPT). The first 6 entries are sequentially stored whereas the last entry might have been
overwritten by newly transmitted messages a number of times because all buffer numbers are
stored at position LOPT-1 when TOVF bit is set to 1. As a consequence receptions cannot be
completely recovered in the order that they were received.
Notes 1. The read value of the TGPT0 to TGPT7 bits is invalid when the THPM bit = 1.
2. If all the transmit history is read by the C0TGPT register while the TOVF bit is set (1), the THPM bit
is not cleared (0) but kept set (1), even if transmission of new data has been completed.
Remark Transmission from message buffers 0 to 7 is not recorded to the transmit history list in the normal
operation mode with ABT.
(2/2)
(b) Write
(a) Read
15 14 13 12 11 10 9 8
C0TS 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
(b) Write
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
Remark The lock function of the time stamp functions must not be used when the CAN module is in the normal
operation mode with ABT.
(2/2)
(a) Read
Remark The TSOUT signal is output from the CAN controller to a timer. For details, refer to CHAPTER 7
16-BIT TIMER/EVENT COUNTER A (TAA).
(b) Write
(19) CAN0 message data byte register (C0MDATAxm, C0MDATAym) (x = 0 to 7, y = 01, 23, 45, 67)
The C0MDATAxm register is used to store the data of a transmit/receive message, and can be accessed in 8-bit
unit.
The C0MDATAxm register can be accessed in 16-bit units by the C0MDATAym register.
(1/2)
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
MDATA01 MDATA01 MDATA01 MDATA01 MDATA01 MDATA01 MDATA01 MDATA01
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
MDATA23 MDATA23 MDATA23 MDATA23 MDATA23 MDATA23 MDATA23 MDATA23
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
(2/2)
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
MDATA45 MDATA45 MDATA45 MDATA45 MDATA45 MDATA45 MDATA45 MDATA45
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
MDATA67 MDATA67 MDATA67 MDATA67 MDATA67 MDATA67 MDATA67 MDATA67
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
Note The data and DLC value actually transmitted to CAN bus are as follows.
7 6 5 4 3 2 1 0
Note The “message buffer that has already received a data frame” is a receive message buffer whose the
C0MCTRLm.DN bit has been set to 1.
Remark A remote frame is received and stored, regardless of the setting of the OWS and DN bits. A remote
frame that satisfies the other conditions (ID matches, the RTR bit = 0, the C0MCTRLm.TRQ bit = 0) is
always received and stored in the corresponding message buffer (interrupt generated, DN flag set, the
C0MDLCm.MDLC0 to C0MDLCm.MDLC3 bits updated, and recorded to the receive history list).
Note
RTR Remote frame request bit
Note The RTR bit specifies the type of message frame that is transmitted from a message buffer defined as a
transmit message buffer. Even if a valid remote frame has been received, the RTR bit of the transmit
message buffer that has received the frame remains cleared to 0. Even if a remote frame whose ID
matches has been received from the CAN bus with the RTR bit of the transmit message buffer set to 1 to
transmit a remote frame, that remote frame is not received or stored (interrupt generated, DN flag set, the
MDLC0 to MDLC3 bits updated, and recorded to the receive history list).
(2/2)
15 14 13 12 11 10 9 8
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
(a) Read
15 14 13 12 11 10 9 8
C0MCTRLm 0 0 MUC 0 0 0 0 0
7 6 5 4 3 2 1 0
(b) Write
15 14 13 12 11 10 9 8
7 6 5 4 3 2 1 0
(a) Read
Note
MUC Bit indicating that message buffer data is being updated
0 The CAN module is not updating the message buffer (reception and storage).
1 The CAN module is updating the message buffer (reception and storage).
Note The MUC bit is undefined until the first reception and storage is performed.
Remark The MOW bit is not set to 1 even if a remote frame is received and stored in the transmit message buffer
with the DN bit = 1.
(2/3)
0 No message frame transmitting request that is pending or being transmitted is in the message buffer.
1 The message buffer is holding transmission of a message frame pending or is transmitting a message
frame.
Caution Do not set the TRQ bit and RDY bit to 1 at the same time. Be sure to set the RDY bit to 1
before setting the TRQ bit to 1.
Cautions 1. Do not clear the RDY bit (0) during message transmission. Follow transmission abort
procedures in order to clear the RDY bit for redefinition.
2. If the RDY bit is not cleared (0) even when the processing to clear it is executed, execute
the clearing processing again.
3. Confirm, by reading the RDY bit again, that the RDY bit has been cleared (0) before writing
data to the message buffer.
However, it is unnecessary to confirm that the TRQ or RDY bit has been set (1) or that the
DN or MOW bit has been cleared (0).
(b) Write
0 1 IE bit is cleared to 0.
1 0 IE bit is set to 1.
Other than above IE bit is not changed.
1 DN bit is cleared to 0.
0 DN bit is not changed.
Caution Do not set the DN bit to 1 by software. Be sure to write 0 to bit 10.
(3/3)
Caution Even if the TRQ bit is set (1), transmission may not be immediately executed depending on
the situation such as when a message is received from another node or when a message is
transmitted from the message buffer.
Transmission under execution is not terminated midway even if the TRQ bit is cleared.
Transmission is continued until it is completed (regardless of whether it is executed
successfully or fails).
The CAN control registers include registers whose bits can be set or cleared via the CPU and via the CAN interface.
An operation error occurs if the following registers are written directly. Do not write any values directly via bit manipulation,
read/modify/write, or direct writing of target values.
Remark m = 00 to 31
All the 16 bits in the above registers can be read via the usual method. Use the procedure described in Figure 19-25
below to set or clear the lower 8 bits in these registers.
Setting or clearing of lower 8 bits in the above registers is performed in combination with the higher 8 bits (refer to the
bit status after set/clear operation is specified in Figure 19-26). Figure 19-25 shows how the values of set bits or clear bits
relate to set/clear/no change operations in the corresponding register.
Write value 0 0 0 0 1 0 1 1 1 1 0 1 1 0 0 0
set 0 0 0 0 1 0 1 1
clear 1 1 0 1 1 0 0 0
No change
No change
No change
Bit status
Clear
Clear
Clear
Set
Set
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Set 7 Set 6 Set 5 Set 4 Set 3 Set 2 Set 1 Set 0 Clear 7 Clear 6 Clear 5 Clear 4 Clear 3 Clear 2 Clear 1 Clear 0
0 0 No change
0 1 0
1 0 1
1 1 No change
Remark n = 0 to 7
Remark m = 00 to 31
Figure 19-27. Setting Transmission Request (TRQ) to Transmit Message Buffer After Redefinition
Redefinition completed
Execute No
transmission?
Yes
END
Cautions 1. When a message is received, reception filtering is performed in accordance with the ID and mask
set to each receive message buffer. If the procedure in Figure 19-39 is not observed, the contents
of the message buffer after it has been redefined may contradict the result of reception (result of
reception filtering). If this happens, check that the ID and IDE received first and stored in the
message buffer following redefinition are those stored after the message buffer has been
redefined. If no ID and IDE are stored after redefinition, redefine the message buffer again.
2. When a message is transmitted, the transmission priority is checked in accordance with the ID,
IDE, and RTR bits set to each transmit message buffer to which a transmission request was set.
The transmit message buffer having the highest priority is selected for transmission. If the
procedure in Figure 19-27 is not observed, a message with an ID not having the highest priority
may be transmitted after redefinition.
OPMODE[2:0] = 00H
and CAN bus is busy.
[Receive-only mode]
OPMODE[2:0]=03H
OPMODE[2:0] = 00H
and CAN bus is busy. OPMODE[2:0] = 00H
and CAN bus is busy.
[Normal operation
mode with ABT] OPMODE[2:0] = 03H [Single-shot mode]
OPMODE[2:0]=02H OPMODE[2:0]=04H
OPMODE[2:0] = 00H
and interframe space
OPMODE[2:0] = 00H
and interframe space
OPMODE[2:0] = 04H
GOM = 1
All CAN modules are
in INIT mode and GOM = 0
EFSD = 1
and GOM = 0
CAN module
channel invalid
RESET released
RESET
The transition from the initialization mode to an operation mode is controlled by the C0CTRL.OPMODE2 to
C0CTRL.OPMODE0 bits.
Changing from one operation mode into another requires shifting to the initialization mode in between. Do not change
one operation mode to another directly; otherwise the operation will not be guaranteed.
Requests for transition from an operation mode to the initialization mode are held pending when the CAN bus is not in
the interframe space (i.e., frame reception or transmission is in progress), and the CAN module enters the initialization
mode at the first bit in the interframe space (the values of the OPMODE2 to OPMODE0 bits are changed to 000B). After
issuing a request to change the mode to the initialization mode, read the OPMODE2 to OPMODE0 bits until their values
become 000B to confirm that the module has entered the initialization mode (see Figure 19-37).
Remark m = 00 to 31
When two or more message buffers of the CAN module receive a message, the message is stored according to the
priority explained below. The message is always stored in the message buffer with the highest priority, not in a message
buffer with a low priority. For example, when an unmasked receive message buffer and a receive message buffer linked to
mask 1 have the same ID, the received message is not stored in the message buffer linked to mask 1 that has not received
a message, even if a message has already been received in the unmasked receive message buffer. In other words, when
a condition has been set to store a message in two or more message buffers with different priorities, the message buffer
with the highest priority always stores the message; the message is not stored in message buffers with a lower priority.
This also applies when the message buffer with the highest priority is unable to receive and store a message (i.e., when
the DN bit = 1 indicating that a message has already been received, but rewriting is disabled because the OWS bit = 0). In
this case, the message is not actually received and stored in the candidate message buffer with the highest priority, but
neither is it stored in a message buffer with a lower priority.
Remark m = 0 to 31
Figure 19-29. DN and MUC Bit Setting Period (in Standard ID Format)
Recessive
CAN standard
SOF
RTR
IDE
R0
Message stored
DATA, DLC, ID → Message buffer
DN bit
MUC bit
C0INTS.CINTS1
bit
INTC0REC
signal
Operation of CAN controller The DN and MUC bits are The DN bit is set (1) and the
set (1) at the same time. MUC bit is cleared (0) at the
same time.
Caution Even if the receive history list overflows (C0RGPT.ROVF bit = 1), the receive history can be read until
no more history is left unread and the C0RGPT.RHPM bit is set (1). However, the ROVF bit is kept set
(1) (= overflow occurs) until cleared (0) by software. In this status, the RHPM bit is not cleared (0),
unless the ROVF bit is cleared (0), even if a new receive history is stored and written to the list. If
ROVF bit = 1 and RHPM bit = 1 and the receive history list overflows, therefore, the RHPM bit
indicates that no more history is left unread even if new history is received and stored.
As long as the RHL contains 23 or less entries the sequence of occurrence is maintained. If more receptions occur
without the RHL being read by the host processor, a complete sequence of receptions can not be recovered.
ROVF bit = 1 denotes that LIPT equals RGPT − 1 while message buffer number stored to element indicated by LIPT − 1.
ID28 ID27 ID26 ID25 ID24 ID23 ID22 ID21 ID20 ID19 ID18
x 0 0 0 1 x 1 x x x x
ID28 ID27 ID26 ID25 ID24 ID23 ID22 ID21 ID20 ID19 ID18
x 0 0 0 1 x 1 x x x x
ID17 ID16 ID15 ID14 ID13 ID12 ID11 ID10 ID9 ID8 ID7
x x x x x x x x x x x
x x x x x x x
ID with the ID27 to ID25 bits cleared to 0 and the ID24 and ID22 bits set to 1 is registered (initialized) to
message buffer 14.
Remark Message buffer 14 is set as a standard format identifier that is linked to mask 1 (C0MCONF14.MT2 to
C0MCONF14.MT0 bits are set to 010B).
CMID28 CMID27 CMID26 CMID25 CMID24 CMID23 CMID22 CMID21 CMID20 CMID19 CMID18
1 0 0 0 0 1 0 1 1 1 1
CMID17 CMID16 CMID15 CMID14 CMID13 CMID12 CMID11 CMID10 CMID9 CMID8 CMID7
1 1 1 1 1 1 1 1 1 1 1
The CMID27 to CMID24 and CMID22 bits are cleared to 0, and the CMID28, CMID23, and CMID21 to
CMID0 bits are set to 1.
Cautions 1. MBRB can be configured for each of the same message buffer types. Therefore, even if a
message buffer of another MBRB whose ID matches but whose message buffer type is different
has a vacancy, the received message is not stored in that message buffer, but instead discarded.
2. MBRB does not have a ring buffer structure. Therefore, after a message is stored in the message
buffer having the highest number in the MBRB configuration, a newly received message will no
longer be stored in the message buffer in the order from the lowest message buffer number.
3. MBRB operates based on the reception and storage conditions; there are no settings dedicated to
MBRB, such as function enable bits. By setting the same message buffer type and ID to two or
more message buffers, MBRB is automatically configured.
4. With MBRB, “matching ID” means “matching ID after mask”. Even if the ID set to each message
buffer is not the same, if the ID that is masked by the mask register matches, it is considered a
matching ID and the buffer that has this ID is treated as the storage destination of a message.
5. Priority among each MBRB conforms to the priority shown in 19.9.1 Message reception.
Remark m = 00 to 31
Upon acceptance of a remote frame, the following actions are executed if the ID of the received remote frame matches
the ID of a message buffer that satisfies the above conditions.
Caution When a message buffer is searched for receiving and storing a remote frame, overwrite control by
the C0MCONFm.OWS bit of the message buffer and the DN bit are not affected. The setting of the
OWS bit is ignored and the DN bit is set to 1 in every case.
If more than one transmit message buffer has the same ID and the ID of the received remote frame
matches that ID, the remote frame is stored in the transmit message buffer with the lowest message
buffer number.
Remark m = 00 to 31
Remark m = 00 to 31
The CAN system is a multi-master communication system. In a system like this, the priority of message transmission is
determined based on message identifiers (IDs). To facilitate transmission processing by software when there are several
messages awaiting transmission, the CAN module uses hardware to check the ID of the message with the highest priority
and automatically identifies that message. This eliminates the need for software-based priority control.
Transmission priority is controlled by the identifier (ID).
After the transmit message search, the transmit message with the highest priority of the transmit message buffers that
have a pending transmission request (message buffers with the TRQ bit set to 1 in advance) is transmitted.
If a new transmission request is set, the transmit message buffer with the new transmission request is compared with
the transmit message buffer with a pending transmission request. If the new transmission request has a higher priority, it is
transmitted, unless transmission of a message with a low priority has already started. To solve this reversal of priorities,
software can request that transmission of a message of low priority be stopped. The highest priority is determined
according to the following rules.
1 (high) Value of first 11 bits of ID The message frame with the lowest value represented by the first 11 bits of the ID
[ID28 to ID18]: is transmitted first. If the value of an 11-bit standard ID is equal to or smaller than
the first 11 bits of a 29-bit extended ID, the 11-bit standard ID has a higher priority
than a message frame with a 29-bit extended ID.
2 Frame type A data frame with an 11-bit standard ID (C0MCONFm.RTR bit is cleared to 0) has
a higher priority than a remote frame with a standard ID and a message frame
with an extended ID.
3 ID type A message frame with a standard ID (C0MIDHm.IDE bit is cleared to 0) has a
higher priority than a message frame with an extended ID.
4 Value of lower 18 bits of ID If one or more transmission-pending extended ID message frame has equal
[ID17 to ID0]: values in the first 11 bits of the ID and the same frame type (equal RTR bit
values), the message frame with the lowest value in the lower 18 bits of its
extended ID is transmitted first.
5 (low) Message buffer number If two or more message buffers request transmission of message frames with the
same ID, the message from the message buffer with the lowest message buffer
number is transmitted first.
Remarks 1. If the automatic block transmission request bit C0GMABT.ABTTRG bit is set to 1 in the normal operation
mode with ABT, the TRQ bit is set to 1 only for one message buffer in the ABT message buffer group.
If the ABT mode was triggered by the ABTTRG bit (1), one TRQ bit is set to 1 in the ABT area (buffers 0
to 7). In addition to this TRQ bit, the application can request transmissions (set TRQ bit to 1) for other TX-
message buffers that do not belong to the ABT area. In that case an internal arbitration process (TX-
search) evaluates all of the TX-message buffers with the TRQ bit set to 1 and chooses the message
buffer that contains the highest prioritized identifier for the next transmission. If there are 2 or more
identifiers that have the highest priority (i.e. identical identifiers), the message located at the lowest
message buffer number is transmitted first.
Upon successful transmission of a message frame, the following operations are performed.
- The TRQ bit of the corresponding transmit message buffer is automatically cleared to 0.
- The transmission completion status bit CINTS0 of the C0INTS register is set to 1 (if the interrupt
enable bit (IE) of the corresponding transmit message buffer is set to 1).
- An interrupt request signal INTC0TRX is output (if the C0IE.CIE0 bit is set to 1 and if the interrupt
enable bit (IE) of the corresponding transmit message buffer is set to 1).
2. Before changing the contents of the transmit message buffer, the RDY flag of this buffer must be cleared.
Since the RDY flag may be temporarily locked while the internal processing is changed, it is necessary to
check the status of the RDY flag by software after changing the buffer contents.
3. m = 00 to 31
Caution Even if the transmit history list overflows (C0TGPT.TOVF bit = 1), the transmit history can be read
until no more history is left unread and the C0TGPT.THPM bit is set (1). However, the TOVF bit is kept
set (1) (= overflow occurs) until cleared (0) by software. In this status, the THPM bit is not cleared (0),
unless the TOVF bit is cleared (0), even if a new transmit history is stored and written to the list. If the
TOVF bit = 1 and the THPM bit = 1 and the receive history list overflows, therefore, the THPM bit
indicates that no more history is left unread even if new history is received and stored.
TOVF bit = 1 denotes that LOPT equals TGPT − 1 while message buffer number stored to element indicated by LOPT − 1.
Cautions 1. To resume the normal operation mode with ABT from the message buffer 0, set the ABTCLR bit to
1 while the ABTTRG bit is cleared to 0. If the ABTCLR bit is set to 1 while the ABTTRG bit is set to
1, the subsequent operation is not guaranteed.
2. Whether the automatic block transmission engine is cleared by setting the ABTCLR bit to 1 can
be confirmed if the ABTCLR bit is automatically cleared to 0 immediately after the processing of
the clearing request is completed.
3. Do not set the ABTTRG bit in the initialization mode. If the ABTTRG bit is set in the initialization
mode, the proper operation is not guaranteed after the mode is changed from the initialization
mode to the ABT mode.
4. Do not set the TRQ bit of the ABT message buffers to 1 by software in the normal operation mode
with ABT. Otherwise, the operation is not guaranteed.
5. The C0GMABTD register is used to set the delay time that is inserted in the period from
completion of the preceding ABT message to setting of the TRQ bit for the next ABT message
when the transmission requests are set in the order of message numbers for each message for
ABT that is successively transmitted in the ABT mode. The timing at which the messages are
actually transmitted onto the CAN bus varies depending on the status of transmission from other
stations and the status of the setting of the transmission request for messages other than the
ABT messages (message buffers 8 to 31).
6. If a transmission request is made for a message other than an ABT message and if no delay time
is inserted in the interval in which transmission requests for ABT are automatically set
(C0GMABTD register = 00H), messages other than ABT messages may be transmitted regardless
of their priority in regards to the ABT message.
7. Do not clear the RDY bit to 0 when the ABTTRG bit = 1.
8. If a message is received from another node in the normal operation mode with ABT, the message
may be transmitted after the time of one frame has elapsed even when C0GMABTD register = 00H.
Remark m = 00 to 31
Remark m = 00 to 31
(1) Transmission abort process other than in normal operation mode with automatic block transmission (ABT)
The user can clear the C0MCTRLm.TRQ bit to 0 to abort a transmission request. The TRQ bit will be cleared
immediately if the abort was successful. Whether the transmission was successfully aborted or not can be checked
using the C0CTRL.TSTAT bit and the C0TGPT register, which indicate the transmission status on the CAN bus (for
details, refer to the processing in Figure 19-46).
(2) Transmission abort process except for ABT transmission in normal operation mode with automatic block
transmission (ABT)
The user can clear the C0GMABT.ABTTRG bit to 0 to abort a transmission request. After checking the ABTTRG bit
of the C0GMABT register = 0, clear the C0MCTRLm.TRQ bit to 0. The TRQ bit will be cleared immediately if the
abort was successful. Whether the transmission was successfully aborted or not can be checked by using the
C0CTRL.TSTAT bit and the C0TGPT register, which indicate the transmission status on the CAN bus (for details,
refer to the process in Figure 19-47).
(3) Transmission abort in normal operation mode with automatic block transmission (ABT)
To abort ABT that is already started, clear the C0GMABT.ABTTRG bit to 0. In this case, the ABTTRG bit remains 1
if an ABT message is currently being transmitted and until the transmission is completed (successfully or not), and
is cleared to 0 as soon as transmission is finished. This aborts ABT.
If the last transmission (before ABT) was successful, the normal operation mode with ABT is left with the internal
ABT pointer pointing to the next message buffer to be transmitted.
In the case of an erroneous transmission, the position of the internal ABT pointer depends on the status of the
TRQ bit in the last transmitted message buffer. If the TRQ bit is set to 1 when clearing the ABTTRG bit is
requested, the internal ABT pointer points to the last transmitted message buffer (for details, refer to the process in
Figure 19-48 (a)). If the TRQ bit is cleared to 0 when clearing the ABTTRG bit is requested, the internal ABT
pointer is increased in increments of 1 and indicates the next message buffer in the ABT area (for details, refer to
the process in Figure 19-48 (b)).
Caution Be sure to abort ABT by clearing the ABTTRG bit to 0. The operation is not guaranteed if
aborting transmission is requested by clearing RDY.
When the normal operation mode with ABT is resumed after ABT has been aborted and the ABTTRG bit is set to 1,
the next ABT message buffer to be transmitted can be determined from the following table.
Status of TRQ of ABT Message Buffer Abort After Successful Transmission Abort After Erroneous Transmission
Note
Set (1) Next message buffer in the ABT area Same message buffer in the ABT area
Note Note
Cleared (0) Next message buffer in the ABT area Next message buffer in the ABT area
Note The above resumption operation can be performed only if a message buffer ready for ABT exists in the ABT
area. For example, an abort request that is issued while ABT of message buffer 7 is in progress is regarded as
completion of ABT, rather than abort, if transmission of message buffer 7 has been successfully completed, even
if the ABTTRG bit is cleared to 0. If the C0MCTRLm.RDY bit in the next message buffer in the ABT area is
cleared to 0, the internal ABT pointer is retained, but the resumption operation is not performed even if the
ABTTRG bit is set to 1, and ABT ends immediately.
Remark m = 00 to 31
Remark m = 00 to 31
(i) The CAN module is already in one of the following operation modes
• Normal operation mode
• Normal operation mode with ABT
• Receive-only mode
• Single-shot mode
• Self-test mode
• CAN stop mode in all the above operation modes
Note
(ii) The CAN bus state is bus idle (the 4th bit in the interframe space is recessive)
Note If the CAN bus is fixed to dominant, the request for transition to the CAN sleep mode is held pending.
Also the transition from CAN stop mode to CAN sleep mode is independent of the CAN bus state.
If any one of the conditions mentioned above is not met, the CAN module will operate as follows.
• If the CAN sleep mode is requested from the initialization mode, the CAN sleep mode transition request is
ignored and the CAN module remains in the initialization mode.
• If the CAN bus state is not bus idle (i.e., the CAN bus state is either transmitting or receiving) when the CAN
sleep mode is requested in one of the operation modes, immediate transition to the CAN sleep mode is not
possible. In this case, the CAN sleep mode transition request has to be held pending until the CAN bus
state becomes bus idle (the 4th bit in the interframe space is recessive). In the time from the CAN sleep
mode request to successful transition, the PSMODE1 and PSMODE0 bits remain 00B. When the module
has entered the CAN sleep mode, the PSMODE1 and PSMODE0 bits are set to 01B.
• If a request for transition to the initialization mode and a request for transition to the CAN sleep mode are
made at the same time while the CAN module is in one of the operation modes, the request for the
initialization mode is enabled. The CAN module enters the initialization mode at a predetermined timing. At
this time, the CAN sleep mode request is not held pending and is ignored.
• Even when the initialization mode and sleep mode are not requested simultaneously (i.e the first request
was not granted when a second request was made), the request for initialization has priority over the CAN
sleep mode request. The CAN sleep mode request is cancelled when the initialization mode is requested.
When a pending request for the initialization mode is present, a subsequent request for the CAN sleep mode
request is cancelled right at the point in time when it was submitted.
• The internal operating clock is stopped and the power consumption is minimized.
• The function to detect the falling edge of the CAN reception pin (CRXD0) remains in effect to wake up the CAN
module from the CAN bus.
• To wake up the CAN module from the CPU, data can be written to the PSMODE1 and PSMODE0 bits, but
nothing can be written to other CANn module registers or bits.
• The CAN0 module registers can be read, except for the C0LIPT, C0RGPT, C0LOPT, and C0TGPT registers.
• The CAN0 message buffer registers cannot be written or read.
• C0GMCTRL.MBON bit is cleared to 0.
• A request for transition to the initialization mode is not acknowledged and is ignored.
• When the CPU writes 00B to the PSMODE1 and PSMODE0 bits
• A falling edge at the CAN reception pin (CRXD0) (i.e. the CAN bus level shifts from recessive to dominant)
Cautions1. Even if the falling edge belongs to the SOF of a receive message, this message will not be
received and stored. If the CPU has turned off the clock to the CAN while the CAN was in sleep
mode, later on the CAN sleep mode will not be released and PSMODE[1:0] bits will continue to
be 01B unless the clock for the CAN is provided again. In addition to this, the receive message
will not be received afterwards.
Caution2. If a falling edge is detected at the CAN reception pin (CRXD0) while the CAN clock is supplied,
the PSMODE0 bit must be cleared by software. (For details, refer to the processing in Figure 19-
53.)
After releasing the sleep mode, the CAN module returns to the operation mode from which the CAN sleep mode was
requested and the PSMODE1 and PSMODE0 bits are reset to 00B. If the CAN sleep mode is released by a change in the
CAN bus state, the C0INTS.CINTS5 bit is set to 1, regardless of the C0IE.CIE bit. After the CAN module is released from
the CAN sleep mode, it participates in the CAN bus again by automatically detecting 11 consecutive recessive-level bits on
the CAN bus. After releasing the sleep mode and before accessing the message buffer by application again, confirm that
C0GMCTRL.MBON bit = 1.
When a request for transition to the initialization mode is made while the CAN module is in the CAN sleep mode, that
request is ignored; the CPU has to be released from sleep mode by software first before entering the initialization mode.
Caution When the CAN sleep mode is released by an event of the CAN bus, a wakeup interrupt occurs
even if the event of the CAN bus occurs immediately after the mode has been changed to the
sleep mode. Note that the interrupt can occur at any time.
Caution To set the CAN module to the CAN stop mode, the module must be in the CAN sleep mode. To
confirm that the module is in the sleep mode, check that the PSMODE1 and PSMODE0 bits = 01B,
and then request the CAN stop mode. If a bus change occurs at the CAN reception pin (CRXD0)
while this process is being performed, the CAN sleep mode is automatically released. In this
case, the CAN stop mode transition request cannot be acknowledged (while the CAN clock is
supplied, however, the PSMODE0 must be cleared by software after the bus level of the CAN
reception pin (CRXD0) is changed).
• The internal operating clock is stopped and the power consumption is minimized.
• To wake up the CAN module from the CPU, data can be written to the PSMODE1 and PSMODE0 bits, but
nothing can be written to other CAN0 module registers or bits.
• The CAN0 module registers can be read, except for the C0LIPT, C0RGPT, C0LOPT, and C0TGPT registers.
• The CAN0 message buffer registers cannot be written or read.
• The C0GMCTRL.MBON bit is cleared to 0.
• An initialization mode transition request is not acknowledged and is ignored.
No. Interrupt Status Bit Interrupt Enable Bit Interrupt Interrupt Source Description
Name Register Name Register Request Signal
Note 1 Note 1
1 CINTS0 C0INTS CIE0 C0IE INTC0TRX Message frame successfully transmitted from
message buffer m
Note 1 Note 1
2 CINTS1 C0INTS CIE1 C0IE INTC0REC Valid message frame reception in message buffer m
Note 2
3 CINTS2 C0INTS CIE2 C0IE INTC0ERR CAN module error state interrupt
Note 3
4 CINTS3 C0INTS CIE3 C0IE CAN module protocol error interrupt
5 CINTS4 C0INTS CIE4 C0IE CAN module arbitration loss interrupt
6 CINTS5 C0INTS CIE5 C0IE INTC0WUP CAN module wakeup interrupt from CAN sleep
Note 4
mode
Notes 1. The C0MCTRL.IE bit (message buffer interrupt enable bit) of the corresponding message buffer has to be
set to 1 for that message buffer to participate in the interrupt generation process.
2. This interrupt is generated when the transmission/reception error counter is at the warning level, or in the
error passive or bus-off state.
3. This interrupt is generated when a stuff error, form error, ACK error, bit error, or CRC error occurs.
4. This interrupt is generated when the CAN module is woken up from the CAN sleep mode because a falling
edge is detected at the CAN reception pin (CAN bus transition from recessive to dominant).
Remark m = 00 to 31
The CAN module provides a receive-only mode, single-shot mode, and self-test mode to support CAN bus diagnosis
functions or the operation of special CAN communication methods.
CAN macro
Tx
Rx
Fixed to the
recessive level
CTXD0 CRXD0
In the receive-only mode, no message frames can be transmitted from the CAN module to the CAN bus. Transmit
requests issued for message buffers defined as transmit message buffers are held pending.
In the receive-only mode, the CAN transmission pin (CTXD0) in the CAN module is fixed to the recessive level.
Therefore, no active error flag can be transmitted from the CAN module to the CAN bus even when a CAN bus error is
detected while receiving a message frame. Since no transmission can be issued from the CAN module, the transmission
error counter the C0ERC.TEC7 to C0ERC.TEC0 bits are never updated. Therefore, a CAN module in the receive-only
mode does not enter the bus-off state.
Furthermore, ACK is not returned to the CAN bus in this mode upon the valid reception of a message frame. Internally,
the local node recognizes that it has transmitted ACK. An overload frame cannot be transmitted to the CAN bus.
Caution If only two CAN nodes are connected to the CAN bus and one of them is operating in the receive-only
mode, there is no ACK on the CAN bus. Due to the missing ACK, the transmitting node will transmit
an active error flag, and repeat transmitting a message frame. The transmitting node becomes error
passive after transmitting the message frame 16 times (assuming that the error counter was 0 in the
beginning and no other errors have occurred). When the message frame is transmitted for the 17th
time, the transmitting node generates a passive error flag. The receiving node in the receive-only
mode detects the first valid message frame at this point, and the VALID bit is set to 1 for the first time.
The events arbitration loss and error occurrence can be distinguished by checking the C0INTS.CINTS4 and
C0INTS.CINTS3 bits, and the type of the error can be identified by reading the C0LEC.LEC2 to C0LEC.LEC0 bits of the
register.
Upon successful transmission of the message frame, the transmit completion interrupt the CINTS0 bit of the C0INTS
register is set to 1. If the C0IE.CIE0 bit is set to 1 at this time, an interrupt request signal is output.
The single-shot mode can be used when emulating time-triggered communication methods (e.g., TTCAN level 1).
Caution The AL bit is only valid in single-shot mode. It does not affect the operation of re-transmission upon
arbitration loss in other operation modes.
CAN macro
Tx
Rx
Fixed to the
recessive level
CTXD0 CRXD0
Operation Mode Data Frame/ ACK Error Frame/ Retransmission Automatic Block Setting of VALID Storing Data in
Remote Frame Transmission Overload Frame Transmission Bit Message Buffer
Transmission Transmission (ABT)
Initialization Mode − − − − − − −
Normal operation mode √ √ √ √ − √ √
Normal operation mode √ √ √ √ √ √ √
with ABT
Receive-only mode − − − − − √ √
√ √ √ − − √ √
Note 1
Single-shot mode
√ √ √ √ − √ √
Note 2 Note 2 Note 2 Note 2 Note 2 Note 2
Self test mode
CAN is an asynchronous, serial protocol. All nodes connected to the CAN bus have a local, autonomous clock. As a
consequence, the clocks of the nodes have no relation (i.e., the clocks are asynchronous and may even have different
frequencies).
In some applications, however, a common time base over the network (= global time base) is needed. In order to build
up a global time base, a time stamp function is used. The essential mechanism of a time stamp function is the capture of
timer values triggered by signals on the CAN bus.
TSOUT
The TSOUT signal toggles its level upon occurrence of the selected event during data frame reception (in Figure 19-34,
the SOF is used as the trigger event source). To capture a timer value by using the TSOUT signal, the capture timer unit
must detect the capture signal at both the rising edge and falling edge.
This time stamp function is controlled by the C0TS.TSLOCK bit. When the TSLOCK bit is cleared to 0, the TSOUT
signal toggles upon occurrence of the selected event. If the TSLOCK bit is set to 1, the TSOUT signal toggles upon
occurrence of the selected event, but the toggle is stopped as the TSEN bit is automatically cleared to 0 when a data
frame starts to be received and stored in message buffer 0. This suppresses the subsequent toggle occurrence by the
TSOUT signal, so that the time stamp value toggled last (= captured last) can be saved as the time stamp value of the time
at which the data frame was received in message buffer 0.
Caution The time stamp function using the TSLOCK bit stops toggle of the TSOUT signal by receiving a data
frame in message buffer 0. Therefore, message buffer 0 must be set as a receive message buffer.
Since a receive message buffer cannot receive a remote frame, toggle of the TSOUT signal cannot be
stopped by reception of a remote frame. Toggle of the TSOUT signal does not stop when a data
frame is received in a message buffer other than message buffer 0.
For these reasons, a data frame cannot be received in message buffer 0 when the CAN module is in
the normal operation mode with ABT, because message buffer 0 must be set as a transmit message
buffer. In this operation mode, therefore, the function to stop toggle of the TSOUT signal by the
TSLOCK bit cannot be used.
Table 19-22 shows the combinations of bit rates that satisfy the above conditions.
Valid Bit Rate Setting C0BTR Register Setting Value Sampling Point
DBT Length SYNC PROP PHASE PHASE TSEG13 to TSEG22 to (Unit: %)
SEGMENT SEGMENT SEGMENT1 SEGMENT2 TSEG10 TSEG20
Valid Bit Rate Setting C0BTR Register Setting Value Sampling Point
DBT Length SYNC PROP PHASE PHASE TSEG13 to TSEG22 to (Unit: %)
SEGMENT SEGMENT SEGMENT1 SEGMENT2 TSEG10 TSEG20
Valid Bit Rate Setting C0BTR Register Setting Value Sampling Point
DBT Length SYNC PROP PHASE PHASE TSEG13 to TSEG22 to (Unit: %)
SEGMENT SEGMENT SEGMENT1 SEGMENT2 TSEG10 TSEG20
Note Setting with a DBT value of 7 or less is valid only when the value of the C0BRP register is other than 00H.
Caution The values in Table 19-22 do not guarantee the operation of the network system. Thoroughly check
the effect on the network system, taking into consideration oscillation errors and delays of the CAN
bus and CAN transceiver.
Table 19-23. Representative Examples of Baud Rate Settings (fCANMOD = 8 MHz) (1/2)
Set Baud Division C0BRP Valid Bit Rate Setting (Unit: kbps) C0BTR Register Setting Sampling
Rate Value Ratio of Register Set Value Point
(Unit: kbps) C0BRP Value Length of SYNC PROP PHASE PHASE TSEG13 to TSEG22 to (Unit: %)
Register DBT SEGMENT SEGMENT SEGMENT1 SEGMENT2 TSEG10 TSEG20
Caution The values in Table 19-23 do not guarantee the operation of the network system. Thoroughly check
the effect on the network system, taking into consideration oscillation errors and delays of the CAN
bus and CAN transceiver.
Table 19-23. Representative Examples of Baud Rate Settings (fCANMOD = 8 MHz) (2/2)
Set Baud Division C0BRP Valid Bit Rate Setting (Unit: kbps) C0BTR Register Setting Sampling
Rate Value Ratio of Register Set Value Point
(Unit: kbps) C0BRP Value Length of SYNC PROP PHASE PHASE TSEG13 to TSEG22 to (Unit: %)
Register DBT SEGMENT SEGMENT SEGMENT1 SEGMENT2 TSEG10 TSEG20
Caution The values in Table 19-23 do not guarantee the operation of the network system. Thoroughly check
the effect on the network system, taking into consideration oscillation errors and delays of the CAN
bus and CAN transceiver.
Table 19-24. Representative Examples of Baud Rate Settings (fCANMOD = 16 MHz) (1/2)
Set Baud Division C0BRP Valid Bit Rate Setting (Unit: kbps) C0BTR Register Setting Sampling
Rate Value Ratio of Register Set Value Point
(Unit: kbps) C0BRP Value Length of SYNC PROP PHASE PHASE TSEG13 to TSEG22 to (Unit: %)
Register DBT SEGMENT SEGMENT SEGMENT1 SEGMENT2 TSEG10 TSEG20
Caution The values in Table 19-24 do not guarantee the operation of the network system. Thoroughly check
the effect on the network system, taking into consideration oscillation errors and delays of the CAN
bus and CAN transceiver.
Table 19-24. Representative Examples of Baud Rate Settings (fCANMOD = 16 MHz) (2/2)
Set Baud Division C0BRP Valid Bit Rate Setting (Unit: kbps) C0BTR Register Setting Sampling
Rate Value Ratio of Register Set Value Point
(Unit: kbps) C0BRP Value Length of SYNC PROP PHASE PHASE TSEG13 to TSEG22 to (Unit: %)
Register DBT SEGMENT SEGMENT SEGMENT1 SEGMENT2 TSEG10 TSEG20
Caution The values in Table 19-24 do not guarantee the operation of the network system. Thoroughly check
the effect on the network system, taking into consideration oscillation errors and delays of the CAN
bus and CAN transceiver.
The processing procedure shown below is recommended to operate the CAN controller. Develop your program by
referring to this recommended processing procedure.
Remark m = 00 to 31
START
Set
C0GMCS register.
Set
C0GMCTRL register
(set GOM bit = 1)
Set
C0BRP register,
C0BTR register.
Set
C0IE register.
Set
C0MASK register.
Initialize
message buffers.
Set C0CTRL
register (set OPMODE bit).
END
Remark OPMODE: Normal operation mode, normal operation mode with ABT, receive-only mode, single-
shot mode, self-test mode
START
Clear
OPMODE.
INIT mode?
No
Yes
Set
C0BRP register, Initialize message
C0BTR register. buffers.
Set
C0IE register. C0ERC and No
C0INFO
register clear?
Yes
Set
C0MASK register.
Set CCERC bit.
Set CCERC bit = 1
END
Caution After setting the CAN module to the initialization mode, avoid setting the module to another
operation mode immediately after. If it is necessary to immediately set the module to another
operation mode, be sure to access registers other than the C0CTRL and C0GMCTRL registers
(e.g., set a message buffer).
Remark OPMODE: Normal operation mode, normal operation mode with ABT, receive-only mode, single-
shot mode, self-test mode
START
No
RDY bit = 1?
Yes
No
RDY bit = 0?
Yes
Set
C0MCONFm register.
Set
C0MIDHm register,
C0MIDLm register.
Transmit message No
buffer?
Yes
Set
C0MDLCm register.
Clear
C0MDATAm register.
Set
C0MCTRLm register.
END
Cautions 1. Before a message buffer is initialized, the RDY bit must be cleared.
2. Make the following settings for message buffers not used by the application.
• Clear the C0MCTRLm.RDY, C0MCTRLm.TRQ, and C0MCTRLm.DN bits to 0.
• Clear the C0MCONFm.MA0 bit to 0.
Figure 19-39 shows the processing for a receive message buffer (C0MCONFm.MT2 to C0MCONFm.MT0 bits = 001B
to 101B).
START
No
RDY = 1?
Yes
Clear RDY bit.
C0MCTRLm.SET_RDY = 0
C0MCTRLm.CLEAR_RDY = 1
No
RDY = 0?
Yes
RSTAT = 0 or No
Note 1
VALID = 1?
Yes
Set
message buffers.
END
Notes 1. If redefinition is performed during a message reception, confirm that a message is being received
because the RDY bit must be set after a message is completely received.
2. This 4-bit period may redefine the message buffer while a message is received and stored.
Figure 19-40 shows the processing for a transmit message buffer during transmission (MT2 to MT0 bits of C0MCONFm
register = 000B).
START
RDY No
RDYbit= =0?0?
Yes
Set C0MDATAxm,
Set C0MDLCm register.
C0MDLCm registers.
Set RTR bit of C0MCONFm
Clear RTR bit of C0MCONFm
register.
register.
Set C0MIDLm and C0MIDHm
Set C0MIDLm and C0MIDHm
registers.
registers.
No
Transmit?
Yes
Wait for
Waita 1-bit perioddata
for 1CAN of CAN
bits data.
END
Figure 19-41 shows the processing for a transmit message buffer (C0MCONFm.MT2 to C0MCONFm.MT0 bits = 000B).
START
No
TRQ bit = 0?
Yes
No
RDY bit = 0?
Yes
END
Cautions 1. The TRQ bit should be set after the RDY bit is set.
2. The RDY bit and TRQ bit should not be set at the same time.
Figure 19-42 shows the processing for a transmit message buffer (C0MCONFm.MT2 to C0MCONFm.MT0 bits = 000B).
START
No
ABTTRG
ABTTRGbit= =0?0?
Yes
No
RDY
RDYbit
== 0?0?
Yes
Set C0MDATAxm register.
Set C0MDLCm register.
Clear RTR bit of C0MCONFm
register.
Set C0MIDLm and C0MIDHm
registers.
SetRDY
Set RDYbit.
bit
SET_RDY bit = 1
CLEAR_RDY bit = 0
No
Set all ABT transmit messages?
Yes
No
TSTAT
TSTATbit= =0?0?
Yes
Set ABTTRG bit.
bit
SET_ABTTRG = 1
CLEAR_ABTTRG = 0
END
Caution The ABTTRG bit should be set to 1 after the TSTAT bit is cleared to 0. The checking of the
TSTAT bit and the setting for the ABTTRG bit to 1 must be continuous.
Remark This processing (message transmit processing with ABS) can only be applied to message buffers 0
to 7. For message buffers other than the ABT message buffers, refer to Figure 19-41.
Start
Transmit completion
interrupt servicing
No
RDY bit = 0?
Yes
END
Cautions 1. The TRQ bit should be set after the RDY bit is set.
2. The RDY bit and TRQ bit should not be set at the same time.
Remark Check the MBON bit at the start and end of the interrupt routine to see if the message buffer and
transmit history register can be accessed, because a CAN sleep mode transition request which has
been held pending may be under execution. If the MBON bit is cleared (0), stop the processing
under execution. Re-execute the processing after the MBON bit is set (1) again. It is therefore
recommended to cancel the CAN sleep mode transition request before executing transmission
interrupt servicing.
START
Transmit completion
interrupt servicing
No
TOVF bit = 1?
Yes
No
RDY bit = 0?
Set RDY bit.
Set RDY bit = 1
Yes Clear RDY bit = 0
Cautions 1. The TRQ bit should be set after the RDY bit is set.
2. The RDY bit and TRQ bit should not be set at the same time.
Remarks 1. Check the MBON bit at the start and end of the interrupt routine to see if the message buffer and
transmit history register can be accessed, because a CAN sleep mode transition request which
has been held pending may be under execution. If the MBON bit is cleared (0), stop the
processing under execution. Re-execute the processing after the MBON bit is set (1) again. It is
therefore recommended to cancel the CAN sleep mode transition request before executing
transmission interrupt servicing.
2. If the TOVF bit is set (1) again, the transmit history list contradicts. Therefore, scan all the
transmit message buffers that have completed transmission.
START
No
CINTS0 bit = 1?
Yes
No
TOVF bit = 1?
Yes
No
RDY bit = 0?
Set RDY bit.
Yes Set RDY bit = 1
Clear RDY bit = 0
END
Cautions 1. The TRQ bit should be set after the RDY bit is set.
2. The RDY bit and TRQ bit should not be set at the same time.
Remarks 1. Check the MBON bit at the start and end of the polling routine to see if the message buffer and
transmit history register can be accessed, because a CAN sleep mode transition request which
has been held pending may be under execution. If the MBON bit is cleared (0), stop the
processing under execution. Re-execute the processing after the MBON bit is set (1) again.
2. If the TOVF bit is set (1) again, the transmit history list contradicts. Therefore, scan all the
transmit message buffers that have completed transmission.
Figure 19-46. Transmission Abort Processing (Other Than in Normal Operation Mode with ABT)
START
No
TSTAT bit = 0?
Yes
Message buffer to No
be aborted matches
C0LOPT register?
Yes
Transmit abort request
was successful.
Transmission successful
END
Note During a period of a total of 11 bits, 3 bits of interframe space and 8 bits of suspend transmission, the
transmission request may have already been acknowledged by the protocol layer. Consequently,
transmission may not be aborted but started even if the TRQ bit is cleared.
Cautions 1. Execute transmission abort processing by clearing the TRQ bit, not the RDY bit.
2. Before making a sleep mode transition request, confirm that there is no transmission
request left using this processing.
3. The TSTAT bit can be periodically checked by a user application or can be checked after
the transmit completion interrupt.
4. Do not execute a new transmission request that includes other message buffers while
transmission abort processing is in progress.
5. If data of the same message buffer are successively transmitted or if only one message
buffer is used, judgments whether transmission has been successfully executed or failed
may contradict. In such a case, make a judgment by using the history information of the
C0TGPT register.
START
No
ABTTRG bit = 0?
Yes
Clear TRQ bit.
SET_TRQ bit = 0
CLEAR_TRQ bit = 1
No
TSTAT bit = 0?
Yes
Message buffer to No
be aborted matches C0LOPT
register?
Yes
Transmit abort request
Transmission successful was successful.
END
Note During a period of a total of 11 bits, 3 bits of interframe space and 8 bits of suspend transmission, the
transmission request may have already been acknowledged by the protocol layer. Consequently,
transmission may not be aborted but started even if the TRQ bit is cleared.
Cautions 1. Execute transmission abort processing by clearing the TRQ bit, not the RDY bit.
2. Before making a sleep mode transition request, confirm that there is no transmission
request left using this processing.
3. The TSTAT bit can be periodically checked by a user application or can be checked after
the transmit completion interrupt.
4. Do not execute a new transmission request including in the other message buffers while
transmission abort processing is in progress.
5. If data of the same message buffer are successively transmitted or if only one message
buffer is used, judgments whether transmission has been successfully executed or failed
may contradict. In such a case, make a judgment by using the history information of the
C0TGPT register.
Figure 19-48 (a) shows processing that does not skip resuming the transmission of a message that was interrupted
when the transmission of an ABT message buffer was aborted.
Figure 19-48 (a). ABT Transmission Abort Processing (Normal Operation Mode with ABT)
START
No
TSTAT bit = 0?
Yes
No
ABTTRG bit = 0?
Yes
Transmit abort
Transmission start No
pointer clear?
Yes
END
Cautions 1. Do not set any transmission requests while ABT transmission abort processing is in
progress.
2. Make a CAN sleep mode/CAN stop mode transition request after the ABTTRG bit is
cleared (after ABT mode is stopped) following the procedure shown in Figure 19-48 (a) or
(b). When clearing a transmission request in an area other than the ABT area, follow the
procedure shown in Figure 19-46.
Figure 19-48 (b) shows the processing that does not skip resuming the transmission of a message that was interrupted
when the transmission of an ABT message buffer was aborted.
Figure 19-48 (b). ABT Transmission Abort Processing (Normal Operation Mode with ABT)
START
No
ABTTRG bit = 0?
Yes
Transmit abort
Transmission start No
pointer clear?
Yes
END
Cautions 1. Do not set any transmission requests while ABT transmission abort processing is in
progress.
2. Make a CAN sleep mode/CAN stop mode request after the ABTTRG bit is cleared (after
ABT mode is stopped) following the procedure shown in Figure 19-48 (a) or (b). When
clearing a transmission request in an area other than the ABT area, follow the procedure
shown in Figure 19-46.
START
Receive completion
interrupt
Clear DN bit.
Clear DN bit = 1
Read C0MDATAxm,
C0MDLCm, C0MIDLm, and
C0MIDHm registers.
DN bit = 0 No
and
MUC bit = 0Note
Yes
END
Note Check the MUC and DN bits using one read access.
Remark Check the MBON bit at the start and end of the interrupt routine to see if the message buffer and
receive history register can be accessed, because a CAN sleep mode transition request which has
been held pending may be under execution. If the MBON bit is cleared (0), stop the processing
under execution. Re-execute the processing after the MBON bit is set (1) again. It is therefore
recommended to cancel the CAN sleep mode transition request before executing reception interrupt
servicing.
START
Receive completion
interrupt
No
ROVF bit = 1?
Yes
Yes
RHPM bit = 1?
No
Clear DN bit.
Clear DN bit = 1
Read C0MDATAxm,
C0MDLCm, C0MIDLm,
and C0MIDHm registers.
DN bit = 0 No
AND
MUC bit = 0Note
Yes
END
Note Check the MUC and DN bits using one read access.
Remarks 1. Check the MBON bit at the start and end of the interrupt routine to see if the message buffer and
receive history register can be accessed, because a CAN sleep mode transition request which
has been held pending may be under execution. If the MBON bit is cleared (0), stop the
processing under execution. Re-execute the processing after the MBON bit is set (1) again. It is
therefore recommended to cancel the CAN sleep mode transition request before executing
reception interrupt servicing.
2. If the ROVF bit has been once set (1), the receive history list contradicts. Therefore, scan all the
receive message buffers that have completed reception.
START
No
CINTS1 bit = 1?
Yes
No
ROVF bit = 1?
Yes
Yes
RHPM bit = 1?
No
Clear DN bit.
Clear DN bit = 1
Read C0MDATAxm,
C0MDLCm, C0MIDLm,
and C0MIDHm registers.
DN bit = 0
No
AND
MUC bit = 0Note
Yes
END
Note Check the MUC and DN bits using one read access.
Remarks 1. Check the MBON bit at the start and end of the polling routine to see if the message buffer and
receive history register can be accessed, because a CAN sleep mode transition request which
has been held pending may be under execution. If the MBON bit is cleared (0), stop the
processing under execution. Re-execute the processing after the MBON bit is set (1) again.
2. If the ROVF bit has been once set (1), the receive history list contradicts. Therefore, scan all the
receive message buffers that have completed reception.
No
PSMODE0 = 1?
Yes
PSMODE1 = 1?
No
Yes
END
Clear OPMODE.
No
INIT mode?
Yes
Access to registers other than
the C0CTRL and C0GMCTRL
registers.
Caution To abort transmission before making a request for the CAN sleep mode, perform processing
according to Figures 19-46 to 19-48.
START
END
Note The state in which the CAN clock is supplied means the state in which the CAN sleep mode is set
without setting any of the following CPU standby modes.
• STOP mode
• IDLE1 and IDLE2 modes
• The main clock has been stopped in subclock operation mode or sub-IDLE mode
Figure 19-54. Bus-off Recovery (Other Than in Normal Operation Mode with ABT)
START
No
BOFF bit = 1?
Yes
No
Forced recovery
from bus off?
Yes
END
Note To initialize the message buffer by clearing the RDY bit before starting the bus-off recovery sequence,
clear all the TRQ bits.
Caution If a request to change the mode from the initialization mode to any operation mode is made to
execute the bus-off recovery sequence again during a bus-off recovery sequence, the receive
error counter (C0ERC.REC0 to REC6 bits) is cleared. It is therefore necessary to detect 11
contiguous recessive bits 128 times on the bus again.
Remark OPMODE: Normal operation mode, normal operation mode with ABT, receive-only mode, single-
shot mode, self-test mode
START
No
BOFF bit = 1?
Yes
Clear ABTTRG bit.
Set ABTTRG bit = 0
Clear ABTTRG bit = 1
No
Forced recovery
from bus off?
Yes
END
Note To initialize the message buffer by clearing the RDY bit before starting the bus-off recovery sequence,
clear all the TRQ bits.
Caution If a request to change the mode from the initialization mode to any operation mode is made to
execute the bus-off recovery sequence again during a bus-off recovery sequence, the receive
error counter (C0ERC.REC0 to REC6 bits) is cleared. It is therefore necessary to detect 11
contiguous recessive bits 128 times on the bus again.
Remark OPMODE: Normal operation mode, normal operation mode with ABT, receive-only mode, single-
shot mode, self-test mode
START
INIT mode
Shutdown successful
GOM bit = 0,
EFSD bit = 0
END
START
No
GOM bit = 0?
Yes
Shutdown successful
GOM bit = 0,
EFSD bit = 0
End
Caution Do not read- or write-access any registers by software between setting the EFSD bit and
clearing the GOM bit.
START
Error interrupt
No
CINTS2 bit = 1?
Yes
No
CINTS3 bit = 1? No
CINTS4 bit = 1?
Yes
Yes
START
No
PSMODE0 bit = 1?
Yes
No
MBON bit = 0?
Yes No
CINTS5 bit 1?
Note Check if the CPU is in the CAN sleep mode before setting it to the standby mode. The CAN sleep mode
may be released by wakeup after it is checked if the CPU is in the CAN sleep mode and before the CPU
is set in the standby mode.
START
No
PSMODE0 bit = 1?
Yes
No
PSMODE1 bit = 1?
Yes
END
Caution The CAN stop mode can only be released by writing 01 to the C0CTRL.PSMODE1 and
C0CTRL.PSMODE0 bits. The CAN stop mode cannot be released by changing the CAN bus.
The V850ES/JC3-H and V850ES/JE3-H have an internal USB function controller (USBF) conforming to the Universal
Serial Bus Specification. Data communication using the polling method is performed between the USB function controller
and external host device by using a token-based protocol.
20.1 Overview
• Bulk transfer (IN/OUT) can be executed as DMA transfer (2-cycle single-transfer mode)
• Clock: Internal clock (6 MHz external clock × internal clock multiplied by 8 = 48 MHz internal clock) or external clock
(external clock input to UCLK pin (fUSB = 48 MHz)) selectable
Caution The registers listed in 20.6.2 USB function controller register list must be accessed after specifying
that the internal clock or the external clock is to be used as the USB clock and supplying clock to the
USB function controller.
20.2 Configuration
USBF interrupt
(INTUSBF0) SIE I/O
buffer
UDMF
UDPF
USB resume
interrupt
(INTUSBF1)
USB clock
Remark Area enclosed with dashed line: These functions are included in the USB function controller.
The USB function controller seen from the CPU is assigned to the CS1 space in the microcontroller. The memory
space is divided for use as follows.
Address Area
20.3.1 Outline
In USB transmission, when communication is performed with the host controller and function controller facing each
other, pull-up/pull-down resistors must be connected to the USB signal (D+/D−) to identify the communication partner.
Moreover in the V850ES/JC3-H and V850ES/JE3-H, series resistors must also be connected.
Because the V850ES/JC3-H and V850ES/JE3-H do not include these pull-up/pull-down resistors and series resistors,
be sure to connect them externally.
The following shows the outline configuration of the USB transmission line. For details of the external configuration, see
the description provided in each section.
Figure 20-2. Outline Configuration of Pull-up, Pull-down, Series Resistors in USB Transmission Line
VDD VDD
D+
D-
P42/INTP10
UVDD
IC1
P41
IC2
Connect a pull-up
Schmitt buffer resistor to D+.
recommended 1.5 kΩ ±5%.
R1
VBUS
UDPF D+
30 Ω ±5%
UDMF D−
30 Ω ±5%
Insert a series resistor adjacent to USB connector
R2
the V850ES/JC3-H or V850ES/JE3-H. 50 kΩ or more
Make the length of the wiring between (floating protection)
resistors and D+/D− of the USB connector
the same. VBUS is resistance-
divided at a ratio of R1:R2.
20.4 Cautions
20.5 Requests
The USB standard has a request command that reports requests from the host device to the function device to execute
response processing.
The requests are received in the SETUP stage of control transfer, and most can be automatically processed via the
hardware of the USB function controller (USBF).
(1) Decode
The following tables show the request format and the correspondence between requests and decoded values.
Request 0 1 3 2 5 4 7 6
GET_INTERFACE 81H 0AH 00H 00H 00H 0nH 00H 01H STALL STALL ACK √
NAK
GET_CONFIGURATION 80H 08H 00H 00H 00H 00H 00H 01H ACK ACK ACK √
NAK NAK NAK
GET_DESCRIPTOR 80H 06H 01H 00H 00H 00H XXH XXHNote 1 ACK ACK ACK √
Device NAK NAK NAK
GET_DESCRIPTOR 80H 06H 02H 00H 00H 00H XXH XXHNote 1 ACK ACK ACK √
Configuration NAK NAK NAK
GET_STATUS 80H 00H 00H 00H 00H 00H 00H 02H ACK ACK ACK √
Device NAK NAK NAK
GET_STATUS 82H 00H 00H 00H 00H 00H 00H 02H ACK ACK ACK √
Endpoint 0 80H NAK NAK NAK
GET_STATUS 82H 00H 00H 00H 00H $$H 00H 02H STALL STALL ACK √
Endpoint X NAK
CLEAR_FEATURE 00H 01H 00H 01H 00H 00H 00H 00H ACK ACK ACK ×
DeviceNote 2 NAK NAK NAK
CLEAR_FEATURE 02H 01H 00H 00H 00H 00H 00H 00H ACK ACK ACK ×
Endpoint 0Note 2 80H NAK NAK NAK
CLEAR_FEATURE 02H 01H 00H 00H 00H $$H 00H 00H STALL STALL ACK ×
Endpoint XNote 2 NAK
SET_FEATURE 00H 03H 00H 01H 00H 00H 00H 00H ACK ACK ACK ×
DeviceNote 3 NAK NAK NAK
SET_FEATURE 02H 03H 00H 00H 00H 00H 00H 00H ACK ACK ACK ×
Endpoint 0Note 3 80H NAK NAK NAK
SET_FEATURE 02H 03H 00H 00H 00H $$H 00H 00H STALL STALL ACK ×
Endpoint XNote 3 NAK
SET_INTERFACE 01H 0BH 00H 0#H 00H 0?H 00H 00H STALL STALL ACK ×
NAK
SET_CONFIGURATIONNote 4 00H 09H 00H 00H 00H 00H 00H 00H ACK ACK ACK ×
01H NAK NAK NAK
SET_ADDRESS 00H 05H XXH XXH 00H 00H 00H 00H ACK ACK ACK ×
NAK NAK NAK
Notes 1. If the wLength value is lower than the prepared value, the wLength value is returned; if the wLength value is
the prepared value or higher, the prepared value is returned.
2. The CLEAR_FEATURE request clears UF0 device status register L (UF0DSTL) and UF0 EPn status register
L (UF0EnSL) (n = 0 to 4, 7) when ACK is received in the status stage.
Notes 3. The SET_FEATURE request sets the UF0 device status register L (UF0DSTL) and UF0 EPn status register
L (UF0EnSL) (n = 0 to 4, 7) when ACK is received in the status stage. If the E0HALT bit of the UF0E0SL
register is set, a STALL response is made in the status stage or data stage of control transfer for a request
other than the GET_STATUS Endpoint0 request, SET_FEATURE Endpoint0 request, and a request
generated by the CPUDEC interrupt request, until the CLEAR_FEATURE Endpoint0 request is received. A
STALL response to an unsupported request does not set the E0HALT bit of the UF0E0SL register to 1, and
the STALL response is cleared as soon as the next SETUP token has been received.
4. If the wValue is not the default value, an automatic STALL response is made.
Cautions 1. The sequence of control transfer defined by the Universal Serial Bus Specification is not satisfied
under the following conditions. The operation is not guaranteed under these conditions.
2. An ACK response is made even when the host transmits data other than a Null packet in the
status stage.
3. If the wLength value is 00H during control transfer (read) of FW processing, a Null packet is
automatically transmitted for control transfer (without data). The FW request does not
automatically transmit a Null packet.
Remarks 1. Df: Default state, Ad: Addressed state, Cf: Configured state
2. n = 0 to 4
It is determined by the setting of the UF0 active interface number register (UF0AIFN) whether a request
with Interface number 1 to 4 is correctly responded to, depending on whether the Interface number of the
target is valid or not.
3. $$: Valid endpoint number including transfer direction
The valid endpoint is determined by the currently set Alternate Setting number (see 20.6.3 (36) UF0
active alternative setting register (UF0AAS), (38) UF0 endpoint 1 interface mapping register
(UF0E1IM) to (42) UF0 endpoint 7 interface mapping register (UF0E7IM)).
4. ? and #: Value transmitted from host (information on Interface numbers 0 to 4)
It is determined by the UF0 active interface number register (UF0AIFN) and UF0 active alternative setting
register (UF0AAS) whether an Alternate Setting request corresponding to each Interface number is
correctly responded to or not, depending on whether the Interface number and Alternate Setting of the
target are valid or not.
(2) Processing
The processing of an automatic request in the Default state, Addressed state, and Configured state is described
below.
Remark Default state: State in which an operation is performed with the Default address
Addressed state: State after an address has been allocated
Configured state: State after SET_CONFIGURATION wValue = 1 has been correctly received
• Default state: The correct response is made when the CLEAR_FEATURE() request has been received
only if the target is a device or a request for Endpoint0; otherwise a STALL response is
made in the status stage.
• Addressed state: The correct response is made when the CLEAR_FEATURE() request has been received
only if the target is a device or a request for Endpoint0; otherwise a STALL response is
made in the status stage.
• Configured state: The correct response is made when the CLEAR_FEATURE() request has been received
only if the target is a device or a request for an endpoint that exists; otherwise a STALL
response is made in the status stage.
When the CLEAR_FEATURE() request has been correctly processed, the corresponding bit of the UF0 CLR
request register (UF0CLR) is set to 1, the EnHALT bit of the UF0 EPn status register L (UF0EnSL) is cleared to
0, and an interrupt is issued (n = 0 to 4, 7). If the CLEAR_FEATURE() request is received when the subject is
an endpoint, the toggle bit (that controls switching between DATA0 and DATA1) of the corresponding endpoint
is always re-set to DATA0.
• Default state: The value stored in the UF0 configuration register (UF0CNF) is returned when the
GET_CONFIGURATION() request has been received.
• Addressed state: The value stored in the UF0CNF register is returned when the GET_CONFIGURATION()
request has been received.
• Configured state: The value stored in the UF0CNF register is returned when the GET_CONFIGURATION()
request has been received.
• Default state: The value stored in UF0 device descriptor register n (UF0DDn) and UF0
configuration/interface/endpoint descriptor register m (UF0CIEm) is returned (n = 0 to 17,
m = 0 to 255) when the GET_DESCRIPTOR() request has been received.
• Addressed state: The value stored in the UF0DDn register and UF0CIEm register is returned when the
GET_DESCRIPTOR() request has been received.
• Configured state: The value stored in the UF0DDn register and UF0CIEm register is returned when the
GET_DESCRIPTOR() request has been received.
A descriptor of up to 256 bytes can be stored in the UF0CIEm register. To return a descriptor of more than 256
bytes, set the CDCGDST bit of the UF0MODC register to 1 and process the GET_DESCRIPTOR() request by
FW.
Store the value of the total number of bytes of the descriptor set by the UF0CIEm register – 1 in the UF0
descriptor length register (UF0DSCL). The transfer data is controlled by the value of this data + 1 and wLength.
• Default state: A STALL response is made in the data stage when the GET_INTERFACE() request has
been received.
• Addressed state: A STALL response is made in the data stage when the GET_INTERFACE() request has
been received.
• Configured state: The value stored in the UF0 interface n register (UF0IFn) corresponding to the wIndex
value is returned (n = 0 to 4) when the GET_INTERFACE() request has been received.
• Default state: The value stored in the target status registerNote is returned only when the GET_STATUS()
request has been received and when the request is for a device or Endpoint0; otherwise a
STALL response is made in the data stage.
• Addressed state: The value stored in the target status registerNote is returned only when the GET_STATUS()
request has been received and when the request is for a device or Endpoint0; otherwise a
STALL response is made in the data stage.
• Configured state: The value stored in the target status registerNote is returned only when the GET_STATUS()
request has been received and when the request is for a device or an endpoint that exists;
otherwise a STALL response is made in the data stage.
• Default state: The device enters the Addressed state and changes the USB Address value to be input to
SIE into a specified address value if the specified address is other than 0 when the
SET_ADDRESS() request has been received. If the specified address is 0, the device
remains in the Default state.
• Addressed state: The device enters the Default state and returns the USB Address value to be input to SIE
to the default address if the specified address is 0 when the SET_ADDRESS() request
has been received. If the specified address is other than 0, the device remains in the
Addressed state, and changes the USB Address value to be input to SIE into a specified
new address value.
• Configured state: The device remains in the Configured state and returns the USB Address value to be input
to SIE to the default address if the specified address is 0 when the SET_ADDRESS()
request has been received. In this case, the endpoints other than endpoint 0 remain valid,
and control transfer (IN), control transfer (OUT), bulk transfer and interrupt transfer for an
endpoint other than endpoint 0 are also acknowledged. If the specified address is other
than 0, the device remains in the Configured state and changes the USB Address value to
be input to SIE into a specified new address value.
• Default state: The CONF bit of the UF0 mode status register (UF0MODS) and the UF0 configuration
register (UF0CNF) are set to 1 if the specified configuration value is 1 when the
SET_CONFIGURATION() request has been received. If the specified configuration value
is 0, the CONF bit of the UF0MODS register and UF0CNF register are cleared to 0. In
other words, the device skips the Addressed state and moves to the Configured state in
which it responds to the Default address.
• Addressed state: The CONF bit of the UF0MODS register and UF0CNF register are set to 1 and the device
enters the Configured state if the specified configuration value is 1 when the
SET_CONFIGURATION() request has been received. If the specified configuration value
is 0, the device remains in the Addressed state.
• Configured state: The CONF bit of the UF0MODS register and UF0CNF register are set to 1 and the device
returns to the Addressed state if the specified configuration value is 0 when the
SET_CONFIGURATION() request has been received. If the specified configuration value
is 1, the device remains in the Configured state.
If the SET_CONFIGURATION() request has been correctly processed, the target bit of the UF0 SET request
register (UF0SET) is set to 1, and an interrupt is issued. All Halt Features are cleared after the
SET_CONFIGURATION() request has been completed even if the specified configuration value is the same as
the current configuration value. If the SET_CONFIGURATION() request has been correctly processed, the
data toggle of all endpoints is always initialized to DATA0 again (it is defined that the default status, Alternative
Setting 0, is set from when the SET_CONFIGURATION request is received to when the SET_INTERFACE
request is received).
• Default state: The correct response is made when the SET_FEATURE() request has been received, only
if the request is for a device or Endpoint0; otherwise a STALL response is made in the
status stage.
• Addressed state: The correct response is made when the SET_FEATURE() request has been received, only
if the request is for a device or Endpoint0; otherwise a STALL response is made in the
status stage.
• Configured state: The correct response is made when the SET_FEATURE() request has been received, only
if the request is for a device or an endpoint that exists; otherwise a STALL response is
made in the status stage.
When the SET_FEATURE() request has been correctly processed, the target bit of the UF0 SET request
register (UF0SET) and the EnHALT bit of the UF0 EPn status register L (UF0EnSL) are set to 1, and an
interrupt is issued (n = 0 to 4, 7).
• Default state: A STALL response is made in the status stage when the SET_INTERFACE() request
has been received.
• Addressed state: A STALL response is made in the status stage when the SET_INTERFACE() request
has been received.
• Configured state: Null packet is transmitted in the status stage when the SET_INTERFACE() request
has been received.
When the SET_INTERFACE() request has been correctly processed, an interrupt is issued. All the Halt
Features of the endpoint linked to the target Interface are cleared after the SET_INTERFACE() request has
been cleared. The data toggle of all the endpoints related to the target Interface number is always
initialized again to DATA0. When the currently selected Alternative Setting is to be changed by correctly
processing the SET_INTERFACE() request, the FIFO of the endpoint that is affected is completely cleared,
and all the related interrupt sources are also initialized.
When the SET_INTERFACE() request has been completed, the FIFO of all the endpoints linked to the
target Interface are cleared. At the same time, Halt Feature and Data PID are initialized, and the related
UF0 INT status n register (UF0ISn) is cleared to 0 (n = 0 to 4). (Only Halt Feature and Data PID are
cleared when the SET_CONFIGURATION request has been completed.)
If the target Endpoint is not supported by the SET_INTERFACE() request during DMA transfer, the DMA
request signal is immediately deasserted, and the FIFO of the Endpoint that has been linked when the
SET_INTERFACE() request has been completed is completely cleared. As a result of this clearing of the
FIFO, data transferred by DMA is not correctly processed.
7 6 5 4 3 2 1 0
UCKSEL 0 0 0 0 0 0 UUSEL1 0
7 6 5 4 3 2 1 0
UFCKMSK 0 0 0 0 0 0 UFBUFMSK UFMSK
7 6 5 4 3 2 1 0
EPRMK 0 RDRMK EP7MK EP4MK EP3MK EP2MK EP1MK EP0MK
1 Mask (stop)
Cautions 1. The internal ROM and internal RAM areas are not subject to programmable wait, and are
always accessed without a wait state. The on-chip peripheral I/O area is also not subject to
programmable wait, and only wait control from each peripheral function is performed.
2. Write to the DWC0 register after reset, and then do not change the set values. Also, do not
access an external memory area until the initial settings of the DWC0 register are complete.
DWC0 0 1 1 1 0 1 1 1
7 6 5 4 3 2 1 0
Note Note Note
0 DW12 DW11 DW10 0 1 1 1
Note The DW12 to DW10 bits set wait of access to the USB function area.
It is recommended to set the DW12 to DW10 bits to 001B (1 wait).
Cautions 1. Address-setup wait and address-hold wait cycles are not inserted when the internal ROM area,
internal RAM area, and on-chip peripheral I/O areas are accessed.
2. Write to the AWC register after reset, and then do not change the set values. Also, do not
access an external memory area until the initial settings of the AWC register are complete.
AWC 1 1 1 1 1 1 1 1
7 6 5 4 3 2 1 0
Note Note
1 1 1 1 AHW1 ASW1 1 1
Note It is recommended to clear the AHW1 bit and the ASW1 bit to 0.
Cautions 1. The internal ROM, internal RAM, and on-chip peripheral I/O areas are not subject to idle state
insertion.
2. Write to the BCC register after reset, and then do not change the set values. Also, do not
access an external memory area until the initial settings of the BCC register are complete.
BCC 1 0 1 0 1 0 1 0
7 6 5 4 3 2 1 0
Note
1 0 1 0 BC11 0 1 0
Caution Be sure to set bits 15, 13, 11, 9, 7, 5 and 1 to “1”, and clear bits 14, 12, 10, 8, 6, 4, 2, and
0 to “0”.
(2/2)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(2/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(3/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(4/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(5/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(6/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(7/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(8/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(9/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(10/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(11/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(12/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
(13/13)
Address Function Register Name Symbol R/W Manipulatable Bits Default Value
1 8 16
1 EP0NKR This bit controls NAK to the OUT token to Endpoint0 (except an automatically executed
request). It is automatically set to 1 by hardware when Endpoint0 has correctly received
data. It is also cleared to 0 by hardware when the data of the UF0E0R register has been
read by FW (counter value = 0).
1: Transmit NAK.
0: Do not transmit NAK (default value).
Set this bit to 1 by FW when data should not be received from the USB bus for some
reason even when USBF is ready for receiving data. In this case, USBF continues
transmitting NAK until this bit is cleared to 0 by FW. This bit is also cleared to 0 as soon
as the UF0E0R register has been cleared.
0 EP0NKW This bit indicates how NAK to the IN token to Endpoint0 is controlled (except an
automatically executed request). This bit is automatically cleared to 0 by hardware when
the data of Endpoint0 is transmitted and the host correctly receives the transmitted data.
The data of the UF0E0W register is retained until this bit is cleared. Therefore, it is not
necessary to rewrite this bit even in the case of a retransmission request that is made if
the host could not receive data correctly. To send a short packet, be sure to set the
E0DED bit of the UF0DEND register to 1. This bit is automatically set to 1 when the FIFO
is full. As soon as the E0DED bit of the UF0DEND register is set to 1, the EP0NKW bit is
automatically set to 1 at the same time.
1: Do not transmit NAK.
0: Transmit NAK (default value).
If control transfer enters the status stage while ACK cannot be correctly received in the
data stage, this bit is cleared to 0 as soon as the UF0E0W register is cleared. This bit is
also cleared to 0 when UF0E0W is cleared by FW.
Next, the procedure of a SETUP transaction that uses IN/OUT tokens is explained below.
(b) When OUT token is used (except a request automatically executed by hardware)
FW should be used to clear the PROT bit of the UF0IS1 register after receiving the CPUDEC interrupt and
before reading data from the UF0E0ST register. Confirm that the PROT bit of the UF0IS1 register is 0 before
reading data from the UF0E0R register. If the PROT bit is 1, it means that invalid data is retained. Clear the
FIFO by FW (the EP0NKR bit is automatically cleared to 0). If the PROT bit of the UF0IS1 register is 0, read
the data of the UF0E0L register and read as many data from the UF0E0R register as set. When reading data
from the UF0E0R register has been completed (when the counter of the UF0E0R register has been cleared to
0), the hardware automatically clears the EP0NKR bit to 0.
0 EP0NKA This bit controls NAK to a transaction other than a SETUP transaction to Endpoint0
(including an automatically executed request). This bit is manipulated by FW.
1: Transmit NAK.
0: Do not transmit NAK (default value).
This register is used to prevent a conflict between a write access by FW and a read
access from SIE when the data used for an automatically executed request is to be
changed. It postpones reflecting a write access on this bit from FW while an access from
SIE is being made. Before rewriting the request data register from FW, confirm that this
bit has been correctly set to 1.
Setting this bit to 1 is reflected only in the following cases.
• Immediately after USBF has been reset and a SETUP token has never been
received
• Immediately after reception of Bus Reset and a SETUP token has never been
received
• PID of a SETUP token has been detected
• The stage has been changed to the status stage
Clearing this bit to 0 is reflected immediately, except while an IN token is being received
and a NAK response is being made.
Setting the EP0NKA bit to 1 is reflected in the above four cases during Endpoint0 transfer,
but it is reflected immediately after data has been written to the bit while Endpoint0 is
transferring no data.
(1/4)
(2/4)
Cautions 1. If DMA is enabled while data is being read from the UF0BO2 register in the PIO mode, a
DMA request is immediately issued.
2. If the last data of the FIFO on the CPU side is read in the DMA transfer mode, the DMA
request signal becomes inactive.
3. If the TC signal is received in the DMA transfer mode, the DMA request signal becomes
inactive.
(3/4)
Cautions 1. If DMA is enabled while data is being written to the UF0BI2 register in the PIO mode, a DMA
request is immediately issued.
2. If 64-byte data is written in the DMA transfer mode, the DMA request signal becomes
inactive. If the BKI2NK bit is then set to 1, data is transmitted in synchronization with an IN
token. The DMA request signal becomes active again as long as the DMA request is not
masked as soon as the FIFO is toggled. If the BKI2NK bit is not set, data is not transmitted
even if an IN token has been received. In this case, set the BKI2DED bit of the UF0DEND
register to 1.
3. If the TC signal is received in the DMA transfer mode, the DMA request signal becomes
inactive. At the same time, the DMA request is masked. If the BKI2NK bit is not set to 1,
data is not transmitted even if an IN token is received. When the BKI2DED bit of the
UF0DEND register is set to 1 by FW, data is transmitted in synchronization with the IN
token. To execute DMA transfer again, unmask the DMA request.
(4/4)
Cautions 1. If DMA is enabled while data is being written to the UF0BI1 register in the PIO mode, a DMA
request is immediately issued.
2. If 64-byte data is written in the DMA transfer mode, the DMA request signal becomes
inactive. If the BKI1NK bit is then set to 1, data is transmitted in synchronization with an IN
token. The DMA request signal becomes active again as long as the DMA request is not
masked as soon as the FIFO is toggled. If the BKI1NK bit is not set, data is not transmitted
even if an IN token has been received. In this case, set the BKI1DED bit of the UF0DEND
register to 1.
3. If the TC signal is received in the DMA transfer mode, the DMA request signal becomes
inactive. At the same time, the DMA request is masked. If the BKI1NK bit is not set to 1,
data is not transmitted even if an IN token is received. When the BKI1DED bit of the
UF0DEND register is set to 1 by FW, data is transmitted in synchronization with the IN
token. To execute DMA transfer again, unmask the DMA request.
Remark n = 0 to 4, 7
7 SETCON This bit indicates that a SET_CONFIGURATION request is received and automatically
processed.
1: Automatically processed
0: Not automatically processed (default value)
2 SETEP This bit indicates that a SET_FEATURE Endpoint n request (n = 0 to 4, 7) is received and
automatically processed.
1: Automatically processed
0: Not automatically processed (default value)
0 SETDEV This bit indicates that a SET_FEATURE Device request is received and automatically
processed.
1: Automatically processed
0: Not automatically processed (default value)
(1/2)
6 IT1 These bits indicate that data is in the UF0INT1 register (FIFO). By setting the IT1DEND
bit of the UF0DEND register to 1, the status in which data is in the UF0INT1 register can
be created even if data is not written to the register (Null data transmission). As soon as
the IT1DEND bit of the UF0DEND register is set to 1 even when the counter of the
UF0INT1 register is 0, this bit is set to 1 by hardware. It is cleared to 0 after correct
transmission.
1: Data is in the register.
0: No data is in the register (default value).
5, 4 BKOUTn These bits indicate that data is in the UF0BOn register (FIFO) connected to the CPU side.
When the FIFO configuring the UF0BOn register is toggled, this bit is automatically set to
1 by hardware. It is automatically cleared to 0 by hardware when reading the UF0BOn
register (FIFO) connected to the CPU side has been completed (counter value = 0). It is
not set to 1 when Null data is received (toggling the FIFO does not take place either).
1: Data is in the register.
0: No data is in the register (default value).
3, 2 BKINn These bits indicate that data is in the UF0BIn register (FIFO) connected to the CPU side.
By setting the BKInDED bit of the UF0DEND register to 1, the status in which data is in
the UF0BIn register can be created even if data is not written to the register (Null data
transmission). As soon as the BKInDED bit of the UF0DEND register has been set to 1
while the counter of the UF0BIn register is 0, this bit is set to 1 by hardware. It is cleared
to 0 when a toggle operation is performed.
1: Data is in the register.
0: No data is in the register (default value).
Remark n = 1, 2
(2/2)
1 EP0W This bit indicates that data is in the UF0E0W register (FIFO). By setting the E0DED bit of
the UF0DEND register to 1, the status in which data is in the UF0E0W register can be
created even if data is not written to the register (Null data transmission). As soon as the
E0DED bit of the UF0DEND register is set to 1 even when the counter of the UF0E0W
register is 0, this bit is set to 1 by hardware. It is cleared to 0 after correct transmission.
1: Data is in the register.
0: No data is in the register (default value).
0 EP0R This bit indicates that data is in the UF0E0R register (FIFO). It is automatically cleared to
0 by hardware when reading the UF0E0R register (FIFO) has been completed (counter
value = 0). It is not set to 1 if Null data is received.
1: Data is in the register.
0: No data is in the register (default value).
7 RSUM This bit indicates that the USB bus is in the Resume status. This bit is meaningful only
when an interrupt request is generated.
1: Suspend status
0: Resume status (default value)
Because sampling is internally performed with the clock, the operation is guaranteed only
when CLK is supplied. Care must be exercised when CLK of the system is stopped. The
INTUSBF1 signal of SIE operates even when CLK is stopped. It can therefore be
supported by making the interrupt control register (UFIC1) valid or lowering the frequency
of CLK to the USBF.
This bit is automatically cleared to 0 when it is read.
5 to 0 HALTn These bits indicate that Endpoint n is currently stalled. They are set to 1 when a stall
condition, such as occurrence of an overrun and reception of an undefined request, is
satisfied. These bits are automatically set to 1 by hardware.
1: Endpoint is stalled.
0: Endpoint is not stalled (default value).
The SNDSTL bit is set to 1 as soon as the HALT0 bit has been set to 1 as a result of
occurrence of an overrun or reception of an undefined request. If the next SETUP token
is received in this status, the SNDSTL bit is cleared to 0 and, therefore, the HALT0 bit is
also cleared to 0. If Endpoint0 is stalled by the SET_FEATURE Endpoint0 request, this
bit is not cleared to 0 until the CLEAR_FEATURE Endpoint0 request is received or Halt
Feature is cleared by FW. If the GET_STATUS Endpoint0, CLEAR_FEATURE Endpoint0,
or SET_FEATURE Endpoint0 request is received, or if a request to be processed by FW
is received due to the CPUDEC interrupt request, the HALT0 bit is masked and cleared to
0, until the next SETUP token is received.
The HALTn bit is not cleared to 0 until Endpoint n receives the CLEAR_FEATURE
Endpoint request, Halt Feature is cleared by the SET_INTERFACE or
SET_CONFIGURATION request to the interface to which the endpoint is linked, or Halt
Feature is cleared by FW. When the SET_INTERFACE or SET_CONFIGURATION
request is correctly processed, the Halt Feature of all the target endpoints, except
Endpoint0, is cleared after the request has been processed, even if the wValue is the
same as the currently set value, and these bits are also cleared to 0. Halt Feature of
Endpoint0 cannot be cleared if it is set because the STALL response is made in response
to the SET_INTERFACE and SET_CONFIGURATION requests.
Remark n = 0 to 4, 7, 8
Caution In the USBF, multiple interrupt sources, such as Bus Reset, Resume, and Short, are ORed
internally and are issued as a single interrupt request (INTUSBF0). Therefore, in the case of the
occurrence of multiple interrupt sources, they are ORed and issued as an INTUSBF0 interrupt
request.
For example, if a Bus Reset interrupt source and Resume interrupt source occur, the two
sources are ORed and an INTUSBF0 interrupt request is issued.
Under these conditions, if the Bus Reset interrupt source is cleared to 0 (UF0IC0.BUSRSTC = 0),
the V850ES/JC3-H or V850ES/JE3-H internal INTUSBF0 interrupt request may remain set to 1
since the Resume interrupt source will still remain. The new interrupt request flag
(US0BIC.US0BIF), therefore, might not be set to 1.
In this case, after performing clear processing for each interrupt request with the INTUSBF0
interrupt servicing routine, confirm the flag status for the UF0IS0 and UF0IS1 registers again,
and if there are any interrupt sources with flags set to 1, perform flag clearing (only the
applicable bits need to be cleared (do not perform a batch clearing)).
(1/2)
(2/2)
3 DMAED This bit indicates that the DMA end (TC) signal for Endpoint n (n = 1 to 4, 7) is active.
1: DMA end signal for Endpoint n has been input (interrupt request is generated).
0: DMA end signal for Endpoint n has not been input (default value).
When this bit is set to 1, the DMA request signal for Endpoint n becomes inactive. The
DMA request signal for Endpoint n does not become active unless FW enables DMA
transfer.
Use the UF0DMS0 register to confirm on which endpoint the operation is actually
performed. However, this bit is not automatically cleared to 0 even if the UF0DMS0
register is read by FW.
2 SETRQ This bit indicates that the SET_XXXX request to be automatically processed has been
received and automatically processed (XXXX = CONFIGURATION or FEATURE).
1: SET_XXXX request to be automatically processed has been received (interrupt
request is generated).
0: SET_XXXX request to be automatically processed has not been received (default
value).
This bit is set to 1 after completion of the status stage. Reference the UF0SET register to
identify what is the target of the request. This bit is not automatically cleared to 0 even if
the UF0SET register is read by FW.
The EPHALT bit is also set to 1 when the SET_FEATURE Endpoint request has been
received.
1 CLRRQ This bit indicates that the CLEAR_FEATURE request has been received and
automatically processed.
1: CLEAR_FEATURE request has been received (interrupt request is generated).
0: CLEAR_FEATURE request has not been received (default value).
This bit is set to 1 after completion of the status stage. Reference the UF0CLR register to
identify what is the target of the request. This bit is not automatically cleared to 0 even if
the UF0CLR register is read by FW.
0 EPHALT This bit indicates that an endpoint has stalled.
1: Endpoint has stalled (interrupt request is generated).
0: Endpoint has not stalled (default value).
This bit is also set to 1 when an endpoint has stalled by setting FW.
Identify the endpoint that has stalled, by referencing the UF0EPS2 register. This bit is not
automatically cleared to 0 even when the CLEAR_FEATURE Endpoint,
SET_INTERFACE, or SET_CONFIGURATION request is received. It is not automatically
cleared to 0, either, if the next SETUP token is received in case of overrun of Endpoint0.
Caution Even if Halt Feature of Endpoint0 is set and this interrupt request is
generated, bit 0 of the UF0EPS2 register is masked and cleared to 0
between when a SET_FEATURE Endpoint0, CLEAR_FEATURE Endpoint0,
or GET_STATUS Endpoint0 request, or FW-processed request is received
and when a SETUP token other than the above is received.
Caution In the USBF, multiple interrupt sources, such as Bus Reset, Resume, and Short, are ORed
internally and are issued as a single interrupt request (INTUSBF0). Therefore, in the case of the
occurrence of multiple interrupt sources, they are ORed and issued as an INTUSBF0 interrupt
request.
For example, if a Bus Reset interrupt source and Resume interrupt source occur, the two
sources are ORed and an INTUSBF0 interrupt request is issued.
Under these conditions, if the Bus Reset interrupt source is cleared to 0 (UF0IC0.BUSRSTC = 0),
the V850ES/JC3-H or V850ES/JE3-H internal INTUSBF0 interrupt request may remain set to 1
since the Resume interrupt source will still be remaining. The new interrupt request flag
(US0BIC.US0BIF), therefore, might not be set to 1.
In this case, after performing clear processing for each interrupt request with the INTUSBF0
interrupt servicing routine, confirm the flag status for the UF0IS0 and UF0IS1 registers again,
and if there are any interrupt sources with flags set to 1, perform flag clearing (only the
applicable bits need to be cleared (do not perform a batch clearing)).
(1/2)
6 E0IN This bit indicates that an IN token for Endpoint0 has been received and that the hardware
has automatically transmitted NAK.
1: IN token is received and NAK is transmitted (interrupt request is generated).
0: IN token is not received (default value).
5 E0INDT This bit indicates that data has been correctly transmitted from the UF0E0W register.
1: Transmission from UF0E0W register is completed (interrupt request is generated).
0: Transmission from UF0E0W register is not completed (default value).
Data is transmitted in synchronization with the IN token next to the one that set the
EP0NKW bit of the UF0E0N register to 1. This bit is automatically set to 1 by hardware
when the host correctly receives that data. It is also set to 1 even if the data is a Null
packet. This bit is automatically cleared to 0 by hardware when the first write access is
made to the UF0E0W register.
(2/2)
4 E0ODT This bit indicates that data has been correctly received in the UF0E0R register.
1: Data is in UF0E0R register (interrupt request is generated).
0: Data is not in UF0E0R register (default value).
This bit is automatically set to 1 by hardware when data has been correctly received. At
the same time, the EP0R bit of the UF0EPS0 register is also set to 1. If a Null packet has
been received, this bit is not set to 1. It is automatically cleared to 0 by hardware when
the FW reads the UF0E0R register and the value of the UF0E0L register becomes 0.
3 SUCES This bit indicates that either an FW-processed or hardware-processed request has been
received and that the status stage has been correctly completed.
1: Control transfer has been correctly processed (interrupt request is generated).
0: Control transfer has not been processed correctly (default value).
This bit is set to 1 upon completion of the status stage. It is automatically cleared to 0 by
hardware when the next SETUP token is received.
This bit is also set to 1 when data with Data PID of 0 (Null data) is received in the status
stage of control transfer.
2 STG This bit is set to 1 when the stage of control transfer has changed to the status stage. It is
valid for both FW-processed and hardware-processed requests. This bit is also set to 1
when the stage of control transfer (without data) has changed to the status stage.
1: Status stage (interrupt request is generated)
0: Not status stage (default value)
This bit is automatically cleared to 0 by hardware when the next SETUP token is received.
It is also set to 1 when the stage of control transfer has changed to the status stage while
ACK cannot be correctly received in the data stage. In this case, the EP0NKW bit of the
UF0E0N register is also cleared to 0 as soon as the UF0E0W register has been cleared,
if the FW is processing control transfer (read).
1 PROT This bit indicates that a SETUP token has been received. It is valid for both FW-
processed and hardware-processed requests.
1: SETUP token is correctly received (interrupt request is generated).
0: SETUP token is not received (default value).
This bit is set to 1 when data has been correctly received in the UF0E0ST register. Clear
this bit to 0 by FW when the first read access is made to the UF0E0ST register. If it is not
cleared to 0 by FW, reception of the next SETUP token cannot be correctly recognized.
This bit is used to accurately recognize that a SETUP transaction has been executed
again during control transfer. If the SETUP transaction is re-executed during control
transfer and if a second request is executed by hardware, the CPUDEC bit is not set to 1,
but the PROT bit can be used for recognition of the re-execution.
0 CPUDEC This bit indicates that the UF0E0ST register has a request that is to be decoded by FW.
1: Data is in UF0E0ST register (interrupt request is generated).
0: Data is not in UF0E0ST register (default value).
This bit is automatically cleared to 0 by hardware when all the data of the UF0E0ST
register is read.
7, 5 BKInIN These bits indicate that an IN token has been received in the UF0BIn register (Endpoint
m) and that NAK has been returned.
1: IN token is received and NAK is transmitted (interrupt request is generated).
0: IN token is not received (default value).
6, 4 BKInDT These bits indicate that the FIFO of the UF0BIn register (Endpoint m) has been toggled.
This means that data can be written to Endpoint m.
1: FIFO has been toggled (interrupt request is generated).
0: FIFO has not been toggled (default value).
The data written to Endpoint m is transmitted in synchronization with the IN token next to
the one that set the BKInNK bit of the UF0EN register to 1. When the FIFO has been
toggled and then data can be written from the CPU, this bit is automatically set to 1 by
hardware. It is also set to 1 when the FIFO has been toggled, even if the data is a Null
packet. This bit is automatically cleared to 0 by hardware when the first write access is
made to the UF0BIn register.
0 IT1DT These bits indicate that data has been correctly received from the UF0INT1 register
(Endpoint x).
1: Transmission is completed (interrupt request is generated).
0: Transmission is not completed (default value).
Data is transmitted in synchronization with the IN token next to the one that set the ITnNK
bit of the UF0EN register to 1. This bit is automatically set to 1 by hardware when the
host has correctly received that data. It is automatically cleared to 0 by hardware when
the first write access is made to the UF0INT1 register. This bit is also set to 1 even when
the data is a Null packet.
Remark n = 1, 2
m = 1 and x = 7 where n = 1
m = 3 where n = 2
(1/2)
7, 3 BKOnFL These bits indicate that data has been correctly received in the UF0BOn register
(Endpoint m) and that both the FIFOs of the CPU and SIE hold the data.
1: Received data is in both the FIFOs of the UF0BOn register (interrupt request is
generated).
0: Received data is not in the FIFO on the SIE side of the UF0BOn register (default
value).
If data is held in both the FIFOs of the CPU and SIE, these bits are automatically set to 1
by hardware. They are automatically cleared to 0 by hardware when the FIFO is toggled.
6, 2 BKOnNL These bits indicate that a Null packet (packet with a length of 0) has been received in the
UF0BOn register (Endpoint m).
1: Null packet is received (interrupt request is generated).
0: Null packet is not received (default value).
These bits are set to 1 immediately after reception of a Null packet when the FIFO is
empty. They are set to 1 when the FIFO on the CPU side has been completely read if
data is in that FIFO.
5, 1 BKOnNAK These bits indicate that an OUT token has been received to the UF0BOn register
(Endpoint m) and that NAK has been returned.
1: OUT token is received and NAK is transmitted (interrupt request is generated).
0: OUT token is not received (default value).
Remark n = 1, 2
m = 2 where n = 1
m = 4 where n = 2
(2/2)
4, 0 BKOnDT These bits indicate that data has been correctly received in the UF0BOn register
(Endpoint m).
1: Reception has been completed correctly (interrupt request is generated).
0: Reception has not been completed (default value).
These bits are automatically set to 1 by hardware when data has been correctly received
and the FIFO has been toggled. At the same time, the corresponding bits of the
UF0EPS0 register are also set to 1. They are not set to 1 when the data is a Null packet.
These bits are automatically cleared to 0 by hardware when the value of the UF0BOnL
register becomes 0 as a result of reading the UF0BOn register by FW.
These bits are automatically cleared to 0 when all the contents of the FIFO on the CPU
side have been read. However, the interrupt request is not cleared if data is in the FIFO
on the SIE side at this time, and the INTUSBF1 signal does not become inactive. The
signal is kept active if data is successively received.
Remark n = 1, 2
m = 2 where n = 1
m = 4 where n = 2
5 SETINT This bit indicates that the SET_INTERFACE request has been received and automatically
processed.
1: The request has been automatically processed (interrupt request is generated).
0: The request has not been automatically processed (default value).
The current setting of this bit can be identified by reading the UF0ASS or UF0IFn register
(n = 0 to 4).
Remark n = 1, 2
Remark n = 1, 2
Remark n = 1, 2
Remark n = 1, 2
Caution If the target endpoint is not supported by the SET_INTERFACE request under DMA transfer, the
DMA request signal becomes inactive immediately, and the corresponding bit is automatically
cleared to 0 by hardware.
(1/2)
7, 6 DQBInMS These bits enable (mask) a write DMA transfer request (DMA request signal for Endpoint
m) to the UF0BIn register. When these bits are set to 1, the DMA request signal for
Endpoint m becomes active while writing data can be acknowledged. If the DMA end
signal for Endpoint m is input (if the DMA controller issues TC), these bits are
automatically cleared to 0 by hardware. To continue DMA transfer, re-set these bits to 1
by FW.
1: Enables active DMA request signal for Endpoint m (masks BKInDT interrupt).
0: Disables active DMA request signal for Endpoint m (default value).
5, 4 DQBOnMS These bits enable (mask) a read DMA transfer request (DMA request signal for Endpoint
x) to the UF0BOn register. When these bits are set to 1, the DMA request signal for
Endpoint x becomes active if the data to be read is prepared in the UF0BOn register. If
the DMA end signal for Endpoint x is input (if the DMA controller issues TC), these bits
are automatically cleared to 0 by hardware. They are also cleared to 0 when the
USBSPxB signal is active. To continue DMA transfer, re-set these bits to 1 by FW.
1: Enables active DMA request signal for Endpoint x (masks BKOnDT interrupt).
0: Disables active DMA request signal for Endpoint x (default value).
Remark n = 1, 2
m = 1 and x = 2 where n = 1
m = 3 and x = 4 where n = 2
(2/2)
5 DQE4 This bit indicates that a DMA read request is being issued from Endpoint4 to memory.
1: DMA read request from Endpoint4 is being issued.
0: DMA read request from Endpoint4 is not being issued (default value).
4 DQE3 This bit indicates that a DMA write request is being issued from memory to Endpoint3.
Note that, even if data is in Endpoint3 (when the FIFO is not full and after the BKI2DED
bit has been set to 1), the DMA request signal becomes active immediately and DMA
transfer is started when the DQBI2MS bit of the UF0IDR register is set to 1.
1: DMA write request for Endpoint3 is being issued.
0: DMA write request for Endpoint3 is not being issued (default value).
3 DQE2 This bit indicates that a DMA read request is being issued from Endpoint2 to memory.
1: DMA read request from Endpoint2 is being issued.
0: DMA read request from Endpoint2 is not being issued (default value).
2 DQE1 This bit indicates that a DMA write request is being issued from memory to Endpoint1.
Note that, even if data is in Endpoint1 (when the FIFO is not full and after the BKI1DED
bit has been set to 1), the DMA request signal becomes active immediately and DMA
transfer is started when the DQBI1MS bit of the UF0IDR register is set to 1.
1: DMA write request for Endpoint1 is being issued.
0: DMA write request for Endpoint1 is not being issued (default value).
7, 5, 4, 2 DEDEn These bits indicate that the DMA end (TC) signal for Endpoint n becomes active and DMA
is stopped while a DMA read request is being issued from Endpoint n to memory.
1: DMA end signal for Endpoint n is active.
0: DMA end signal for Endpoint n is inactive (default value).
6, 3 DSPEm These bits indicate that, although a DMA read request was being issued from Endpoint m
to memory, DMA has been stopped because the received data is a short packet and there
is no more data to be transferred.
1: DMASTOP_EPm signal is active.
0: DMASTOP_EPm signal is inactive (default value).
Remark n = 1 to 4
m = 2, 4
Remark n = 1, 2
m = 1 where n = 1
m = 3 where n = 2
Remark n = 1, 2
(1/2)
7, 6 BKInT These bits specify whether toggling the FIFO is automatically executed if the FIFO on the
CPU side of the UF0BIn register becomes full as a result of DMA.
1: Automatically execute a toggle operation of the FIFO as soon as the FIFO has
become full.
0: Do not automatically execute a toggle operation of the FIFO even if the FIFO
becomes full (default value).
3 IT1DEND Set these bits to 1 to transmit the data of the UF0INT1 register. When these bits are set
to 1, the IT1NK bit is set to 1 and data transfer is executed.
1: Transmit a short packet.
0: Do not transmit a short packet (default value).
If the ITR1C bit of the UF0FIC0 register is set to 1 and then these bits are set to 1
(counter of UF0INT1 register = 0 and the corresponding bit of the UF0EPS1 register = 1),
a Null packet (with a data length of 0) is transmitted.
If data exists in the UF0INT1 register and if these bits are set to 1 (counter of UF0INT1
register ≠ 0 and the corresponding bit of the UF0EPS0 register = 1), a short packet is
transmitted.
These bits are automatically controlled by hardware when the FIFO is full.
Remark n = 1, 2
(2/2)
2, 1 BKInDED Set these bits to 1 when writing transmit data to the UF0BIn register has been completed.
When these bits are set to 1, the FIFO is toggled as soon as possible, the BKInNK bit is
set to 1, and data is transferred.
1: Transmit a short packet.
0: Do not transmit a short packet (default value).
These bits control the FIFO on the CPU side.
If the BKInCC bit of the UF0FIC0 register is set to 1 and then these bits are set to 1
(counter of UF0BIn register = 0), a Null packet (with a data length of 0) is transmitted.
If data exists in the UF0BIn register and if these bits are set to 1 (counter of UF0BIn
register ≠ 0), and if the FIFO is not full, a short packet is transmitted.
If the FIFO on the CPU side of the UF0BIn register becomes full as a result of DMA, with
the PIO or BKInT bit set to 1, the hardware starts data transmission even if these bits are
not set to 1.
If the FIFO on the CPU side of the UF0BIn register becomes full as a result of DMA, with
the BKInT bit cleared to 0, be sure to set these bits to 1 (see 20.6.3 (3) UF0 EPNAK
register (UF0EN)).
0 E0DED Set this bit to 1 to transmit data of the UF0E0W register. When this bit is set to 1, the
EP0NKW bit is set to 1 and data is transferred.
1: Transmit a short packet.
0: Do not transmit a short packet (default value).
If the EP0WC bit of the UF0FIC0 register is set to 1 and if this bit is set to 1 (counter of
UF0E0W register = 0 and bit 1 of UF0EPS0 register = 1), a Null packet (with a data length
of 0) is transmitted.
If data exists in the UF0E0W register and if this bit is set to 1 (counter of UF0E0W register
≠ 0 and bit 1 of the UF0EPS0 register = 1), and if the FIFO is not full, a short packet is
transmitted.
Remark n = 1, 2
Caution This register is provided for debugging purposes. Usually, do not set this register except for
verifying the operation or when a special mode is used.
6 CDCGDST Set this bit to 1 to switch the GET_DESCRIPTOR Configuration request to CPUDEC
processing. By setting this bit to 1, the CDCGD bit of the UF0MODS register can be
forcibly set to 1.
1: Forcibly change the GET_DESCRIPTOR Configuration request to CPUDEC
processing (sets the CDCGD bit of the UF0MODS register to 1).
0: Automatically process the GET_DESCRIPTOR Configuration request (default
value).
6 CDCGD This bit specifies whether CPUDEC processing is performed for the GET_DESCRIPTOR
Configuration request.
1: Forcibly change the GET_DESCRIPTOR Configuration request to CPUDEC
processing.
0: Automatically process the GET_DESCRIPTOR Configuration request (default
value).
4 MPACK This bit indicates the transmit packet size of Endpoint0.
1: Transmit a packet of other than 8 bytes.
0: Transmit a packet of 8 bytes (default value).
This bit is automatically set to 1 by hardware after the GET_DESCRIPTOR Device
request has been processed (on normal completion of the status stage). It is not cleared
to 0 until the USBF has been reset (it is not cleared to 0 by Bus Reset).
If this bit is not set to 1, the hardware transfers only the automatically-executed request in
8-byte units. Therefore, even if data of more than 8 bytes is sent by the OUT token to be
processed by FW before completion of the GET_DESCRIPTOR Device request, the data
is correctly received.
This bit is ignored if the size of Endpoint0 is 8 bytes.
3 DFLT This bit indicates the default status (DFLT bit = 1).
1: Enables response.
0: Disables response (always no response) (default value).
This bit is automatically set to 1 by Bus Reset. The transaction for all the endpoints is not
responded to until this bit is set to 1.
2 CONF This bit indicates whether the SET_CONFIGURATION request has been completed.
1: SET_CONFIGURATION request has been completed.
0: SET_CONFIGURATION request has not been completed (default value).
This bit is set to 1 when Configuration value = 1 is received by the
SET_CONFIGURATION request.
Unless this bit is set to 1, access to an endpoint other than Endpoint0 is ignored.
This bit is cleared to 0 when Configuration value = 0 is received by the
SET_CONFIGURATION request. It is also cleared to 0 when Bus Reset is detected.
1 1 0, 1, 2, 3, 4
1 0 0, 1, 2, 3
0 1 0, 1, 2
0 0 0, 1
7, 3 ALTn These bits specify whether an n-series Alternative Setting is linked with Interface 0. When
these bits are set to 1, the setting of the IFALn1 and IFALn0 bits is invalid.
1: Link n-series Alternative Setting with Interface 0.
0: Do not link n-series Alternative Setting with Interface 0 (default value).
6, 5, IFALn1, IFALn0 These bits specify the Interface number to be linked with the n-series Alternative Setting.
2, 1 If the linked Interface number is outside the range specified by the UF0AIFN register, the
n-series Alternative Setting is invalid (ALTnEN bit = 0).
1 1 Links Interface 4.
1 0 Links Interface 3.
0 1 Links Interface 2.
0 0 Links Interface 1.
Do not link a five-series Alternative Setting and a two-series Alternative Setting with the
same Interface number.
4, 0 ALTnEN These bits validate the n-series Alternative Setting. Unless these bits are set to 1, the
setting of the ALTn, IFALn1, and IFALn0 bits is invalid.
1: Validate the n-series Alternative Setting.
0: Do not validate the n-series Alternative Setting (default value).
Remark n = 2, 5
For example, when the UF0AIFN register is set to 82H and the UF0AAS register is set to 15H, Interfaces 0, 1, 2,
and 3 are valid. Interfaces 0 and 2 support only Alternative Setting 0. Interface 1 supports Alternative Setting 0
and 1, and Interface 3 supports Alternative Setting 0, 1, 2, 3, and 4. With this setting, requests GET_INTERFACE
wIndex = 0/1/2/3, SET_INTERFACE wValue = 0 & wIndex = 0/2, SET_INTERFACE wValue = 0/1 & wIndex = 1,
and SET_INTERFACE wValue = 0/1/2/3/4 & wIndex = 3 are automatically responded to, and a STALL response is
made to the other GET/SET_INTERFACE requests.
3 to 1 AL5ST3 to These bits indicate the current status of the five-series Alternative Setting.
AL5ST1
AL5ST3 AL5ST2 AL5ST1 Selected Alternative Setting number
1 0 0 Alternative Setting 4
0 1 1 Alternative Setting 3
0 1 0 Alternative Setting 2
0 0 1 Alternative Setting 1
0 0 0 Alternative Setting 0
0 AL2ST This bit indicates the current status of the two-series Alternative Setting (selected
Alternative Setting number).
1: Alternative Setting 1
0: Alternative Setting 0
When these bits are set to 110 or 111, they are invalid even if the E12AL1 bit is cleared to
0.
If the endpoint is linked, setting of the CONF bit of the UF0MODS register to 1 indicates
that Endpoint1 is valid.
4 E12AL1 This bit validates Endpoint1 when the two-series Alternative Setting and the Alternative
Setting of the linked Interface are set to 1.
1: Validate the endpoint when Alternative Setting 1 is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting 1 is set with CONF bit =
1 (default value).
This bit is valid when the E15AL4 to E15AL1 bits are 0000.
3 to 0 E15ALn These bits validate Endpoint1 when the five-series Alternative Setting and the Alternative
Setting of the linked Interface are set to n.
1: Validate the endpoint when Alternative Setting n is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting n is set with CONF bit =
1 (default value).
Remark n = 1 to 4
When these bits are set to 110 or 111, they are invalid even if the E22AL1 bit is cleared to
0.
If the endpoint is linked, setting of the CONF bit of the UF0MODS register to 1 indicates
that Endpoint2 is valid.
4 E22AL1 This bit validates Endpoint2 when the two-series Alternative Setting and the Alternative
Setting of the linked Interface are set to 1.
1: Validate the endpoint when Alternative Setting 1 is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting 1 is set with CONF bit =
1 (default value).
This bit is valid when the E25AL4 to E25AL1 bits are 0000.
3 to 0 E25ALn These bits validate Endpoint2 when the five-series Alternative Setting and the Alternative
Setting of the linked Interface are set to n.
1: Validate the endpoint when Alternative Setting n is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting n is set with CONF bit =
1 (default value).
Remark n = 1 to 4
When these bits are set to 110 or 111, they are invalid even if the E32AL1 bit is cleared to
0.
If the endpoint is linked, setting of the CONF bit of the UF0MODS register to 1 indicates
that Endpoint3 is valid.
4 E32AL1 This bit validates Endpoint3 when the two-series Alternative Setting and the Alternative
Setting of the linked Interface are set to 1.
1: Validate the endpoint when Alternative Setting 1 is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting 1 is set with CONF bit =
1 (default value).
This bit is valid when the E35AL4 to E35AL1 bits are 0000.
3 to 0 E35ALn These bits validate Endpoint3 when the five-series Alternative Setting and the Alternative
Setting of the linked Interface are set to n.
1: Validate the endpoint when Alternative Setting n is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting n is set with CONF bit =
1 (default value).
Remark n = 1 to 4
When these bits are set to 110 or 111, they are invalid even if the E42AL1 bit is cleared to
0.
If the endpoint is linked, setting of the CONF bit of the UF0MODS register to 1 indicates
that Endpoint4 is valid.
4 E42AL1 This bit validates Endpoint4 when the two-series Alternative Setting and the Alternative
Setting of the linked Interface are set to 1.
1: Validate the endpoint when Alternative Setting 1 is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting 1 is set with CONF bit =
1 (default value).
This bit is valid when the E45AL4 to E45AL1 bits are 0000.
3 to 0 E45ALn These bits validate Endpoint4 when the five-series Alternative Setting and the Alternative
Setting of the linked Interface are set to n.
1: Validate the endpoint when Alternative Setting n is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting n is set with CONF bit =
1 (default value).
Remark n = 1 to 4
When these bits are set to 110 or 111, they are invalid even if the E72AL1 bit is cleared to
0.
If the endpoint is linked, setting of the CONF bit of the UF0MODS register to 1 indicates
that Endpoint7 is valid.
4 E72AL1 This bit validates Endpoint7 when the two-series Alternative Setting and the Alternative
Setting of the linked Interface are set to 1.
1: Validate the endpoint when Alternative Setting 1 is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting 1 is set with CONF bit =
1 (default value).
This bit is valid when the E75AL4 to E75AL1 bits are 0000.
3 to 0 E75ALn These bits validate Endpoint7 when the five-series Alternative Setting and the Alternative
Setting of the linked Interface are set to n.
1: Validate the endpoint when Alternative Setting n is set with CONF bit = 1.
0: Do not validate the endpoint even when Alternative Setting n is set with CONF bit =
1 (default value).
Remark n = 1 to 4
Caution Read all the data stored. Clear the FIFO to discard some data.
7 to 0 E0R7 to E0R0 These bits store the OUT data sent from the host in the data stage of control transfer
to/from Endpoint0.
FIFO
Normal hard- Normal
completion Abnormal ware completion
of reception reception clear of reception
Status of UF0E0R
register
Reading Reading
FIFO FIFO
starts completed
7 to 0 E0L7 to E0L0 These bits store the data length held by the UF0E0R register.
<1> If a request is decoded by FW and the UF0E0R register is read or the UF0E0W register is written
<2> When preparing for a STALL response for the request to which the decode result does not correspond
Caution Be sure to read all the stored data. The UF0E0ST register is always updated by the request in the
SETUP transaction.
7 to 0 E0S7 to E0S0 These bits hold the SETUP data sent from the host.
(a) Normal
Completion of Completion of
normal reception of normal reception of
SETUP token SETUP token
Status of
UF0E0ST register
Completion
Start of of normal
Completion of reception reception
normal reception of of second of second
SETUP token SETUP token SETUP token
Status of
UF0E0ST register
Hardware clear
on completion of
reading 8 bytes
CPUDEC bit of Hardware
UF0IS1 register clear
INT clear INT clear
(FW clear) (FW clear)
PROT bit of
UF0IS1 register
7 to 0 E0W7 to E0W0 These bits store the IN data sent to the host in the data stage to Endpoint0.
Re-
Trans- Trans- trans-
mission mission mission
completed completed
Trans- Trans- ACK starts
mission ACK mission cannot be ACK
starts reception starts received reception
Status of
UF0E0W register
Trans- Trans-
mission mission
Transmission completed ACK Transmission
completed ACK
starts reception starts reception
Status of
UF0E0W register
Reception Reception
completed FIFO toggle completed FIFO toggle
ACK Reception ACK
Status of transmission starts transmission
UF0BO1 register
SIE side
CPU side
BKO1FL bit of
UF0IS3 register
Hardware
BKOUT1 bit of clear
UF0EPS0 register
SIE side
CPU side
Reading Reading
FIFO FIFO
starts
completed
BKOUT1 bit of
UF0EPS0 register
7 to 0 BKO1L7 to These bits store the length of the data held by the UF0BO1 register.
BKO1L0
Reception Reception
completed FIFO toggle completed FIFO toggle
ACK Reception ACK
Status of
transmission starts transmission
UF0BO2 register
SIE side
CPU side
BKO2NK bit of
UF0EN register
BKO2FL bit of
UF0IS3 register
Hardware
BKOUT2 bit of clear
UF0EPS0 register
Null Null
reception reception
completed completed
Reception FIFO toggle Reception FIFO toggle
Status of completed completed
Reception ACK Reception ACK
UF0BO2 register starts transmission starts transmission
SIE side
CPU side
Reading
Reading
FIFO FIFO
starts completed
BKOUT2 bit of
UF0EPS0 register
7 to 0 BKO2L7 to These bits store the length of the data held by the UF0BO2 register.
BKO2L0
Transmission Transmission
completed FIFO toggle completed FIFO toggle
ACK Transmission ACK
Status of
reception starts reception
UF0BI1 register
SIE side
CPU side
INT clear
(FW clear)
ACK
reception ACK cannot ACK
FIFO toggle be received reception
Re-
Transmission Transmission Transmission transmission
Status of
completed starts completed starts
UF0BI1 register
SIE side
FIFO_0 FIFO_1
FIFO_1 FIFO_0
CPU side
BKI1NK bit of
UF0EN register
INT clear
(FW clear)
Transmission Transmission
completed FIFO toggle completed
FIFO toggle
Status of ACK Transmission ACK
UF0BI1 register reception starts reception
SIE side
CPU side
INT clear
(FW clear)
Transmission Transmission
completed FIFO toggle completed
FIFO toggle
ACK Transmission ACK
Status of
reception starts reception
UF0BI2 register
SIE side
CPU side
INT clear
(FW clear)
ACK cannot
be received ACK
Transmission FIFO toggle
completed Re- reception
ACK Transmission Transmission transmission
Status of
reception starts completed starts
UF0BI2 register
SIE side
FIFO_0 FIFO_1
FIFO_1 FIFO_0
CPU side
BKI2NK bit of
UF0EN register
INT clear
(FW clear)
Transmission Transmission
completed FIFO toggle completed FIFO toggle
ACK Transmission ACK
Status of
reception starts reception
UF0BI2 register
SIE side
CPU side
INT clear
(FW clear)
Status of
UF0INT1 register
IT1 bit of
UF0EPS0 register
INT clear
(FW clear)
IT1DT bit of Hardware clear
UF0IS2 register
Writing Writing Writing Writing Counter
FIFO FIFO FIFO FIFO reloaded
starts completed starts completed
Transmission Transmission
completed completed
Transmission ACK Transmission ACK
starts reception starts reception
Status of
UF0INT1 register
Caution To rewrite this register, set the EP0NKA bit to 1 before reading the register contents, and rewrite
the register contents after confirming that the bit has been set, in order to prevent conflict
between a read access and a write access.
1 RMWK This bit specifies whether the remote wakeup function of the device is used.
1: Enabled
0: Disabled
If the device supports a remote wakeup function, this bit is set to 1 by hardware when the
SET_FEATURE Device request has been received, and is cleared to 0 by hardware when
the CLEAR_FEATURE Device request has been received. If the device does not support
a remote wakeup function, make sure that the SET_FEATURE Device request is not
issued from the host.
0 SFPW This bit indicates whether the device is self-powered or bus-powered.
1: Self-powered
0: Bus-powered
Caution To rewrite this register, set the EP0NKA bit to 1 before reading the register contents, and rewrite
the register contents after confirming that the bit has been set, in order to prevent conflict
between a read access and a write access.
Caution To rewrite this register, set the EP0NKA bit to 1 before reading the register contents, and rewrite
the register contents after confirming that the bit has been set, in order to prevent conflict
between a read access and a write access.
Caution To rewrite this register, set the EP0NKA bit to 1 before reading the register contents, and rewrite
the register contents after confirming that the bit has been set, in order to prevent conflict
between a read access and a write access.
Caution To rewrite this register, set the EP0NKA bit to 1 before reading the register contents, and rewrite
the register contents after confirming that the bit has been set, in order to prevent conflict
between a read access and a write access.
Caution To rewrite this register, set the EP0NKA bit to 1 before reading the register contents, and rewrite
the register contents after confirming that the bit has been set, in order to prevent conflict
between a read access and a write access.
Caution To rewrite this register, set the EP0NKA bit to 1 before reading the register contents, and rewrite
the register contents after confirming that the bit has been set, in order to prevent conflict
between a read access and a write access.
Caution Do not execute a write access to this register. If written, the operation is not guaranteed.
Caution Do not execute a write access to this register. If written, the operation is not guaranteed.
Caution Do not execute a write access to this register. If written, the operation is not guaranteed.
2 to 0 IF02 to IF00 These bits hold the data to be returned in response to GET_INTERFACE wIndex = 0
request.
Caution Do not execute a write access to this register. If written, the operation is not guaranteed.
2 to 0 IFn2 to IFn0 These bits hold the data to be returned in response to GET_INTERFACE wIndex = n
request.
Remark n = 1 to 4
Caution To rewrite this register, set the EP0NKA bit to 1 before reading the register contents, and rewrite
the register contents after confirming that the bit has been set, in order to prevent conflict
between a read access and a write access.
7 to 0 DPL7 to DPL0 These bits set the value of the number of bytes of all the descriptors to be returned in
response to the GET_DESCRIPTOR Configuration request minus 1.
Cautions 1. To rewrite these registers, set the EP0NKA bit to 1 before reading the register contents, and
rewrite the register contents after confirming that the bit has been set, in order to prevent
conflict between a read access and a write access.
2. Use the value defined by USB Specification Ver. 2.0 and the latest Class Specification as the
set value.
The range of the valid data that can be set to these registers varies according to the setting of the UF0DSCL
register. In addition to the descriptors listed in Table 20-7, descriptors peculiar to classes and vendors can also be
stored.
If all the values are fixed, they can be stored in ROM.
Cautions 1. To rewrite these registers, set the EP0NKA bit to 1 before reading the register contents, and
rewrite the register contents after confirming that the bit has been set, in order to prevent
conflict between a read access and a write access.
2. Use the value defined by USB Specification Ver. 2.0 and the latest Class Specification as the
set value.
7 6 5 4 3 2 1 0
11 EP4INT In EP4, when the DMA transfer is normal terminate, or the error finished in the DMA
transferring, this bit is setting. Clearing to “0” by writing “1”.
0: DMA transfer not completion
1: DMA transfer completion
10 EP3NT In EP3, when the DMA transfer is normal terminate, or the error finished in the DMA
transferring, this bit is setting. Clearing to “0” by writing “1”.
0: DMA transfer not completion
1: DMA transfer completion
9 EP2NT In EP2, when the DMA transfer is normal terminate, or the error finished in the DMA
transferring, this bit is setting. Clearing to “0” by writing “1”.
0: DMA transfer not completion
1: DMA transfer completion
8 EP1NT In EP1, when the DMA transfer is normal terminate, or the error finished in the DMA
transferring, this bit is setting. Clearing to “0” by writing “1”.
0: DMA transfer not completion
1: DMA transfer completion
2 EPCINT2B Showing the status of the interrupt signal “EPC_INT2B” from EPC.
Clear controlling from the request of EPC register
0: Interrupt not issued
1: Interrupt issued
1 EPCINT1B Showing the status of the interrupt signal “EPC_INT1B” from EPC.
Clear controlling from the request of EPC register
0: Interrupt not issued
1: Interrupt issued
0 EPCINT0B Showing the status of the interrupt signal ”EPC_INT0B” from EPC.
Clear controlling from the request of EPC register
0: Interrupt not issued
1: Interrupt issued
7 6 5 4 3 2 1 0
11 EP4INTN Setting the interrupt occur enable or disable when EP4INT bit is setting.
0: Interrupt disabled
1: Interrupt enabled
10 EP3NTN Setting the interrupt occur enable or disable when EP3INT bit is setting.
0: Interrupt disabled
1: Interrupt enabled
9 EP2NTN Setting the interrupt occur enable or disable when EP2INT bit is setting.
0: Interrupt disabled
1: Interrupt enabled
8 EP1NTN Setting the interrupt occur enable or disable when EP1INT bit is setting.
0: Interrupt disabled
1: Interrupt enabled
2 EPCINT2BEN Setting the interrupt occur enable or disable when EPCINT2BEN bit is setting.
0: Interrupt disabled
1: Interrupt enabled
1 EPCINT1BEN Setting the interrupt occur enable or disable when EPCINT1BEN bit is setting.
0: Interrupt disabled
1: Interrupt enabled
0 EPCINT0BEN Setting the interrupt occur enable or disable when EPCINT0BEN bit is setting.
0: Interrupt disabled
1: Interrupt enabled
EPCCLT 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 EPCRST
CPUBCTL 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
2 BULKWAIT Forcibly inserting the 1 wait (bulk wait) when the bulk register is accessed.
Note
0: No forcibly insert the bulk wait (default value)
1: Forcibly insert the bulk wait
Note The setting is invalid in write accessing, the bulk wait is forcibly inserted.
1 DATAWAIT Forcibly inserting the 1 wait (data wait) after the CPU bus cycle.
0: No forcibly insert the data wait (default value)
1: Forcibly insert the data wait
UF0E1DC1 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
UF0E2DC1 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
UF0E3DC1 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
UF0E4DC1 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
(2/2)
5 to 3 EPnBULK2, Shown the status the state machine “BIN_STATE” for bulk transfer of the internal bridge
EPnBULK1,
EPnBULK0 EPnBULK2 EPnBULK1 EPnBULK0 ”BIN_STATE” status
0 0 0 BIN_IDLE
0 0 1 BIN_CPU
0 1 0 BIN_EPC
0 1 1 BIN_CMP
1 0 0 BIN_END
2 EPnSTOP Showing the status (end factor of DMA transfer) of DMA transfer end from EPC
0: End of DMA transfer by EPn_TCNT value “0”
1: End of DMA transfer by negate of “EPC_DMARQ_EPnB”
Automatically clear (0) by setting next EP1_DMAEN to “1”.
1 EPnREQ Showing the status of “EPC_DMARQ_EPnB” signal from EPC
0: No DMA request signal
1: DMA request signal
0 EPnDMAEN Setting the control of DMA request from EPC
0: Masks DMA request
1: Enables DMA request
Automatically clear (0) by complete number of packet transfer setting in EPn_TCNT, or
complete the DMA transfer by the negate of DMARQ_EPnB.
Remark n = 1 to 4
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
(2/2)
Remark n = 1 to 4
UF0EP1BI 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
UF0EP3BI 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
UF0EP2BO 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
Caution If either of the following operations is performed, the data stored in this register is read out and
the next bulk-out transfer data is stored into this register.
• The UF0EP2BO register is read during program execution.
• The UF0EP2BO register is monitored on the memory window while the debugger is being used.
UF0EP4BO 0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
Caution If either of the following operations is performed, the data stored in this register is read out and
the next bulk-out transfer data is stored into this register.
• The UF0EP4BO register is read during program execution.
• The UF0EP4BO register is monitored on the memory window while the debugger is being used.
7 6 5 4 3 2 1 0
15, 11, 7, 3 RQ3UR3E, Specify the endpoint n (EPn) to be transferred by DMA channel 3.
RQ3UR2E, (n = 1 to 4)
RQ3UR1E, RQ3UR3E RQ3UR2E RQ3UR1E RQ3UR0E EP transferred by DMA3
RQ3UR0E
1 0 0 0 EP4
0 1 0 0 EP3
0 0 1 0 EP2
0 0 0 1 EP1
Other than above DMA3 does not transfer EPn
(DMA3 not used)
14, 10, 6, 2 RQ2UR3E, Specify the endpoint n (EPn) to be transferred by DMA channel 2.
RQ2UR2E, (n = 1 to 4)
RQ2UR1E, RQ2UR3E RQ2UR2E RQ2UR1E RQ2UR0E EP transferred by DMA2
RQ2UR0E
1 0 0 0 EP4
0 1 0 0 EP3
0 0 1 0 EP2
0 0 0 1 EP1
Other than above DMA2 does not transfer EPn
(DMA2 not used)
(2/2)
Cautions 1. Setting the same DMA transfer target to multiple DMA channels, and setting multiple DMA
transfer targets to the same DMA channel are prohibited.
2. If using the function of this register, set the DMA trigger factor register (DTFRn (n = 0 to 3)) to
disable DMA requests by interrupt (00H).
The following flowcharts illustrate the program execution when the host is disconnected and then reconnected, and the
program execution when power is supplied.
Figure 20-12. Flowchart of Program When Host Is Disconnected and Then Reconnected
START
No
Host disconnected?
Yes
No
Host connected?
Yes
Unmasks USB-related
interrupts and
discards interrupts
Initialization processing
of register area
END
START
No
Host connected?
Yes
Unmasks USB-related
interrupts and discards
interrupts
END
Cautions 1. It is judged by the Alternative Setting number currently set whether the target Endpoint is valid or
invalid.
2. For the response to the request included in control transfer to/from Endpoint0, see 20.5 Requests.
Notes 1. This register can be cleared to 0 by the RESET signal because its write pointer, counter, and read pointer
are cleared to 0 when the RESET signal becomes active, in the same manner as clearing by the UF0FICn
register, as the register is controlled by FIFO.
2. This register cannot be cleared to 0. Because data can be written to it by FW, however, any value can be
written to the register (before doing so, however, be sure to set the EP0NKA bit of the UF0E0NA register to
1).
20.9 FW Processing
• Setting processing on device side for the SET_CONFIGURATION, SET_INTERFACE, SET_FEATURE, and
CLEAR_FEATURE requests during enumeration processing
• Analysis and processing of XXXXStandard, XXXXClass, and XXXXVendor requests not subject to automatic
processing
• Reading data following bulk-transferred OUT token from receive buffer
• Writing data to be returned in response to bulk-transferred IN token
• Writing data to be returned in response to interrupt-transferred token
CLEAR_FEATURE Interface Automatic STALL It is considered that this request does not come to Interface
response because there is no function selector value, though it is reserved
for bmRequestType.
When this request is received, the hardware makes an automatic
STALL response.
SET_FEATURE Interface Automatic STALL It is considered that this request does not come to Interface
response because there is no function selector value, though it is reserved
for bmRequestType.
When this request is received, the hardware makes an automatic
STALL response.
GET_DESCRIPTOR String FW Returns the string descriptor.
When this request is received by the SETUP token, the hardware
generates the CPUDEC interrupt request for FW. FW decodes the
contents of the request from the CPUDEC interrupt request, and
writes the data to be returned to the host, to the UF0E0W register.
SET_DESCRIPTOR Device FW Rewrites the device descriptor.
When this request is received by the SETUP token, the hardware
generates the CPUDEC interrupt request for FW. FW decodes the
contents of the request from the CPUDEC interrupt request, and
the writes the data for the next control transfer (OUT) to the
UF0DDn register (n = 0 to 17).
SET_DESCRIPTOR Configuration FW Rewrites the configuration descriptor.
When this request is received by the SETUP token, the hardware
generates the CPUDEC interrupt request for FW. FW decodes the
contents of the request from the CPUDEC interrupt request, and
the writes the data for the next control transfer (OUT) to the
UF0CIEn register (n = 0 to 255).
SET_DESCRIPTOR String FW Rewrites the string descriptor.
When this request is received by the SETUP token, the hardware
generates the CPUDEC interrupt request for FW. FW decodes the
contents of the request from the CPUDEC interrupt request, and
loads the data for the next control transfer (OUT).
Other NA FW When this request is received by the SETUP token, the hardware
generates the CPUDEC interrupt request for FW. FW decodes the
contents of the request from the CPUDEC interrupt request, and
performs the necessary processing.
When a request data register is initialized, data for the GET_XXXX request to which a value is to be automatically
returned is written and an endpoint is allocated to an interface. In the interrupt settings, the interrupt sources that do not
have to be checked can be masked by using the UF0IMn register (n = 0 to 4).
The following flowcharts illustrate the above processing.
START
EP0NKA = 1? No
(UF0E0NA)
Yes
Initialization of request
: See Figure 21-15 Initialization of Request Data Register.
data register
UF0MODC register = If the total number of bytes of the UF0CIEn register exceeds 256,
40H or 00H set the UF0MODC register to 40H. No data has to be written to
the UF0CIEn register.
Setting of interface
: See Figure21-16 Setting of Interface and Endpoint.
and endpoint
END
Remark n = 0 to 255
Setting of UF0DSCL register Input the total number of bytes of the UF0CIEa register.
Remark m = 0 to 17
a = 0 to 255
Set a link between the target Interface of endpoint n and Alternative Setting.
Setting of UF0EnIM register
Set 00H if the target endpoint is not used.
Remark n = 1 to 4, 7
START
END
Remark n = 0 to 4
START
INTUSBF0 active
(n = 0 to 4)
Servicing interrupt
END
The following bits of the UF0ISn register are automatically cleared by hardware when a given condition is satisfied (n =
0 to 4).
Because clearing an interrupt source by the UF0ICn register is given a lower priority than setting an interrupt source by
hardware, the interrupt source may not be cleared depending on the timing (n = 0 to 4).
Processing for endpoint n involves writing or reading for data transfer. The flowchart shown below is for PIO.
START
Decoding request
Yes
CLEAR_FEATURE?
No CLEAR_FEATURE processing
No SET_FEATURE processing
No SET_CONFIGURATION processing
No SET_INTERFACE processing
END END
INTUSBF0 active
(n = 0, 1)
Yes No
Illegal processing
SETRQ = 1? No
FW processing for (UF0IS0)
SET_INTERFACE
Yes
Illegal processing
SETINTC = 0
(UF0IC4)
Reading UF0SET register Reading UF0CLR register
END
END END
CLRRQ = 1
(UF0IS0)
HALTn = 0
(UF0EPS2)
Remarks 1. n = 0 to 4, 7
2. ♦: Processing by hardware
SETRQ = 1
(UF0IS0)
HALTn = 1
(UF0EPS2)
EPHALT = 1
(UF0IS0)
Remarks 1. n = 0 to 4, 7
2. ♦: Processing by hardware
SETCON = 1
(UF0SET)
SETRQ = 1
(UF0IS0)
CONF = 1
(UF0MODS)
SETINT = 1
(UF0IS4)
Remarks 1. n = 0 to 4
2. ♦: Processing by hardware
START
INTUSBF0 active
CPUDEC = 1? No
(UF0IS1)
PROTC = 0
(UF0IC1)
STGM = 0 (UF0IM1)
CPUDECM = 1 (UF0IM1)
Reading UF0E0ST
register × 8 times
CPUDEC = 0
(UF0IS1)
Decoding FW request
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
No
SETUP token received?
Yes
SNDSTL = 0
(UF0SDS)
END
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
CPUDEC = 1? No
(UF0IS1)
Yes
Transmitting NAK
E0IN = 1
(UF0IS1)
INTUSBF0 active
E0IN = 1? No
(UF0IS1)
I
If return data greater than the FIFO size exists,
FW request decode it is divided into FIFO size units and sequentially
written, starting from the lowest data byte.
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
No
FIFO full?
Yes E0DED = 1
(UF0DEND)
EP0NKW = 1
(UF0E0N)
PROT = 1? Yes
(UF0IS1)
No EP0WC = 1
(UF0FIC0)
No
IN token received?
Yes
Transmitting data of
UF0E0W register
No
ACK received?
Yes
E0INDT = 1 (UF0IS1)
EP0NKW = 0 (UF0E0N)
INTUSBF0 active
E0INDT = 1? No
(UF0IS1)
No
No transmit data?
Yes I
E0INDTC = 0
(UF0IC1)
No
Data of Null packet received?
Yes
STG = 1
(UF0IS1)
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
INTUSBF0 active
STG = 1? No
(UF0IS1)
Transmitting ACK
SUCES = 1
(UF0IS1)
INTUSBF0 active
SUCES = 1? No
(UF0IS1)
CPUDECM = 0 (UF0IM1)
E0INM = 0 (UF0IM1)
END
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
No
OUT token received?
Yes
No
Normal reception?
INTUSBF0 active
PROT = 1? Yes
(UF0IS1)
No EP0RC = 1
(UF0FIC0)
K G
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
E0ODT = 1? No
(UF0IS1)
Yes
Data length other than 0?
No C
No
Data length other than 0?
Yes
STG = 1 (UF0IS1)
E0IN = 1 (UF0IS1)
INTUSBF0 active
PROT = 1? Yes
(UF0IS1)
G
STG = 1? Yes
(UF0IS1)
No Illegal processing
Request processing
EP0WC = 1
(UF0FIC0)
E0DED = 1
(UF0DEND)
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
STGM = 1 (UF0IM1)
E0INM = 1 (UF0IM1)
No
IN token received?
Yes
Transmitting data
of Null packet
No
ACK received?
Yes
SUCES = 1 (UF0IS1)
E0INDT = 1 (UF0IS1)
INTUSBF0 active
SUCES = 1? No
(UF0IS1)
CPUDECM = 0 (UF0IM1)
E0INM = 0 (UF0IM1)
END
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
No
IN token of status phase IN token received?
Yes
E0IN = 1 (UF0IS1)
STG = 1 (UF0IS1)
INTUSBF0 active
PROT = 1? Yes
(UF0IS1)
STG = 1? No
(UF0IS1)
EP0WC = 1
(UF0FIC0)
E0DED = 1
(UF0DEND)
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
E0INM = 1 (UF0IM1)
STGM = 1 (UF0IM1)
No
IN token received?
Yes
No
ACK received?
Yes
SUCES = 1 (UF0IS1)
E0INDT = 1 (UF0IS1)
INTUSBF0 active
SUCES = 1? No
(UF0IS1)
Request processing
E0INM = 0 (UF0IM1)
CPUDECM = 0 (UF0IM1)
END
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
START
No
IN token received?
Yes
BKI1IN = 1
(UF0IS2)
Returning NAK
INTUSBF0 active
BKI1IN = 1? No
(UF0IS2)
BKI1INM = 1
(UF0IM2)
Yes
FIFO full?
No
Yes BKI1CC = 1
Data error? (UF0FIC0)
No
BKI1DED = 1
(UF0DEND)
BKI1DT = 1? No
(UF0IS2)
No
No transmit data?
Yes
BKI1INC = 0 (UF0IC2)
BKI1DTC = 0 (UF0IC2)
BKI1INM = 0 (UF0IM2)
END
Remarks 1. n = 2, 3
2. ♦: Processing by hardware
No
IN token received?
Yes
Transmitting data of
UF0BI1 register
No
ACK received?
Yes
BKI1NK = 0
(UF0EN)
No
No transmit data?
Yes
START
No
OUT token received?
Yes
No
Normal reception?
BKO1DT = 1 (UF0IS3)
BKOUT1 = 1 (UF0EPS0)
INTUSBF0 active
BKO1DT = 1? No
(UF0IS3)
BKO1DT = 0 (UF0IS3)
BKOUT1 = 0 (UF0EPS0)
No
Data length = 0?
Yes
OUT token received?
No
END
Remarks 1. n = 2, 3
2. ♦: Processing by hardware
During bulk transfer (OUT), more data may be transmitted from the host than expected by the system. Endpoint2
and Endpoint4 for bulk transfer (OUT) of the V850ES/JC3-H and V850ES/JE3-H consist of two 64-byte buffers so
that NAK responses are suppressed as much as possible and data can be read from the CPU side even while the
bus side is being accessed as the transfer rate of the USB bus increases. Consequently, if the host sends more
data than expected by the system, up to 128 bytes of extra data may be automatically received in the worst case.
In this case, change the control flow from that of the normal processing of Endpoint2 and Endpoint4 to the flow
illustrated below when the quantity of data expected by the system has decreased to two packets. This flowchart
illustrates how Endpoint2 is controlled. Endpoint4 can also be controlled in the same sequence. To use this
flowchart as the control flow of Endpoint4, therefore, read the bit names of Endpoint2 in the flowchart as those of
Endpoint4.
Figure 20-28. Processing If More Data Than Expected by System Is Transmitted (Endpoint2) (1/2)
START
No
OUT token received?
Yes
No
Normal reception?
BKO1DT = 1 (UF0IS3)
BKOUT1 = 1 (UF0EPS0)
INTUSBF0 active
No
OUT token received?
Yes
No
Normal reception?
BKO1FL = 1 (UF0IS3)
BKO1NK = 1 (UF0EN)
BKO1FL = 1? No
(UF0IS3)
BKO1NKM = 1 (UF0ENM)
BKO1NK = 1 (UF0EN)
Remarks 1. n = 2, 3
2. ♦: Processing by hardware
Figure 20-28. Processing If More Data Than Expected by System Is Transmitted (Endpoint2) (2/2)
BKO1FL = 0 (UF0IS3)
BKO1DT= 0 (UF0IS3)
BKOUT1 = 0 (UF0EPS0)
No
OUT token received?
Yes No
Next system sequence?
BKO1NAK = 1
(UF0IS3)
Yes
BKO1NKM = 0
NAK response (UF0ENM)
BKO1NK = 0
INTUSBF0 active (UF0EN)
Expected system
sequence processing
BKO1NAK = 1? No
(UF0IS3)
END
Yes Illegal processing
Expected processing
such as Endpoint STALL
BKO1NKM = 0
(UF0ENM)
BKO1NK = 0
(UF0EN)
BKO1NAKC = 0
(UF0IC3)
END
START
IT1 = 0? No
(UF0EPS0)
Yes
No
FIFO full?
Yes Yes
Data error?
No
IT1DEND = 1 ITR1C = 1
(UF0DEND) (UF0FIC0)
IT1NK = 1
(UF0EN)
No
IN token received?
Yes
Transmitting data of
UF0INT1 register
No
ACK received?
Yes
IT1DT = 1 (UF0IS2)
IT1 = 0 (UF0EPS0)
IT1NK = 0 (UF0EN)
INTUSBF0 active
IT1DT = 1? No
(UF0IS2)
No
No transmit data?
Yes
IT1DTC = 0
(UF0IC2)
END
Remarks 1. n = 2, 3
2. ♦: Processing by hardware
START
No
Suspend detected?
Yes
RSUSPD = 1 (UF0IS0)
RSUM = 1 (UF0EPS1)
INTUSBF0 active
RSUSPD = 1? No
(UF0IS0)
RSUM = 1? No
(UF0EPS1)
FW Suspend processing
RSUSPDC = 0
(UF0IC0)
END
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
START
No
Resume detected?
Yes
RSUSPD = 1 (UF0IS0)
RSUM = 0 (UF0EPS1)
INTUSBF0 active
RSUSPD = 1? No
(UF0IS0)
RSUM = 0? No
(UF0EPS1)
FW Resume processing
RSUSPDC = 0
(UF0IC0)
END
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
(c) Example of Resume processing (when supply of USB clock to USBF is stopped)
START
No
Resume detected?
Yes
INTUSBF1 active
FW Resume processing
END
START START
Controlling portNote 2
Pull-up processing
of D+ activeNote 1
Connection
No
Resume detected?
Yes
BUSRST = 1 (UF0IS0)
DFLT = 1 (UF0MODS)
(a)
Notes 1. Use one general-purpose port pin for the signal that controls switching of the pull-up resistor of the
USB bus.
2. The input mode or control mode of the general-purpose port pin allocated in Note 1 may be selected
as the default value. Note the active level of pull-up processing of D+ on power application.
(a)
Receiving GET_DESCRIPTOR
Device request
MPACK = 1
(UF0MODS)
Receiving SET_ADDRESS
request
Receiving SET_CONFIGURATION 1
request
SETCON = 1 (UF0SET)
SETRQ = 1 (UF0IS0)
CONF = 1 (UF0MODS)
UF0CNF register = 01H
Valid endpoint = DATA0
Receiving SET_INTERFACE
request
SETINT = 1 (UF0IS4)
Setting of UF0ASS register
Setting of UF0IFm register
Valid endpoint = DATA0
Processing continues
Remarks 1. m = 0 to 4
2. ♦: Processing by hardware
START
Power failure
No
INTPxx activeNote?
Yes
Interrupt servicing
Processing such as
clearing FIFO or
MRST = 1 (UF0GPR)
END
Note INTPxx indicates the external interrupt pins of the V850ES/JC3-H and V850ES/JE3-H (INTP00 to
INTP18), and also indicates interrupts input by the external trigger pins (TIAA00, TAA01, TIAA10,
TIAA11, TIAA20, TIAA21, TIAB10, TRGAB1, TIT00) of the timer.
Allocate one external interrupt pin to the following applications.
• Detecting disconnection of the connector in the case of self-powered mode (SFPW bit of UF0DSTL
register = 1). In this case, monitor the VDD line of the USB connector, and input the result to the
external interrupt pin at the edge. Note that the noise elimination time is that of the interrupt input pin,
and that of each timer.
• Detecting turning off power from the HUB when the device is mounted on the same board as a HUB
chip.
Cautions 1. The DMA request signal for Endpoint n (n = 2, 4) becomes active in the demand mode (MODE1
and MODE0 bits of the UF0IDR register = 10), as long as there is data to be transferred.
2. For a DMA transfer for which the data for a bulk transfer (OUT) is a Short packet (63 bytes or less),
after the transfer finishes, clear the UF0IC0.SHORTC and UF0IS0.SHORT bits.
If the SHORT bits are not cleared, the DMASTOP_EPnB signal is asserted and the next DMA
transfer operation is not performed.
START
E33 = 1 (DCHC3)
DTFR3 register = 00H
The use of an interrupt
request signal as the DMA
start trigger is disabled.
DQBI1MS = 1 (UF0IDR)
UF0E1DC1 = 0001H
(4)
(3)
No
Transfer of DMA channel 3
is completed?
Yes (2)
(1)
Remarks 1. The above flowchart shows the case where the transfer by DMA channel 2 is from Endpoint2 to
internal data RAM, and the transfer by DMA channel 3 is from internal data RAM to Endpoint1.
2. ♦: Processing by hardware
(1)
Moving to INTDMA3
interrupt vector
The number of No
DMA channel 3 transfers has
been changed?
Yes (3)
(3)
Remarks 1. The above flowchart shows the case where the transfer by DMA channel 2 is from Endpoint2 to
internal data RAM, and the transfer by DMA channel 3 is from internal data RAM to Endpoint1.
2. n = 0, 1
3. ♦: Processing by hardware
(2)
DMA channel 2 No
transfer completed?
Yes
Starting transfer of
DMA channel 2
(4)
Remarks 1. The above flowchart shows the case where the transfer by DMA channel 2 is from Endpoint2 to
internal data RAM, and the transfer by DMA channel 3 is from internal data RAM to Endpoint1.
2. n = 0, 1
m = 2, 3
3. ♦: Processing by hardware
Caution The DMA request signal for Endpoint n (n = 1, 3) becomes active in the demand mode (MODE1 and
MODE0 bits of the UF0IDR register = 10), as long as data can be transferred.
START
(5)
(3)
Yes
FIFO on CPU side full?
No
DQE1 = 1
(UF0DMS0)
Yes
TC signal received?
No (1)
No
FIFO full?
Yes
BKI1T = 1? No
(UF0DEND)
Yes
(2)
(2)
BKI1NK = 1 (UF0EN)Note
BKI1DT = 1 (UF0IS2)Note
DQE1 = 0 (UF0DMS0)
(3)
END
Note The timing of the bit value changes depending on the status on the SIE side.
(1)
No
FIFO full?
Yes
BKI1T = 1? No
(UF0DEND)
Yes
INTUSBF0 active
DMA request for Endpoint1 inactive
DMAED = 1? No
(UF0IS0)
DEDE1 = 1? No
(UF0DMS1)
(4)
Note The timing of the bit value changes depending on the status on the SIE side.
Remarks 1. n = 0, 1
2. ♦: Processing by hardware
(4)
No
FIFO full?
Yes
BKI1T = 1? No
(UF0DEND)
Yes Yes
Data error?
No
DMAEDC = 0
(UF0IC0)
BKI1DED = 1
BKI1CC = 1 (UF0FIC0)
(5) (UF0DEND)
END
(5)
Note The timing of the bit value changes depending on the status on the SIE side.
The V850ES/JC3-H and V850ES/JE3-H include a direct memory access (DMA) controller (DMAC) that executes and
controls DMA transfer.
The DMAC controls data transfer between memory and I/O, between memories, or between I/Os based on DMA
requests issued by the on-chip peripheral I/O (serial interface, timer/counter, and A/D converter), interrupts from external
input pins, or software triggers (memory refers to internal RAM or external memory).
21.1 Features
21.2 Configuration
On-chip
Internal RAM
peripheral I/O
Internal bus
DMAC
Bus interface
V850ES/JC3-H, V850ES/JE3-H
Remark n = 0 to 3
21.3 Registers
DSAnH
IR 0 0 0 0 0 SA25 SA24 SA23 SA22 SA21 SA20 SA19 SA18 SA17 SA16
(n = 0 to 3)
DSAnL
SA15 SA14 SA13 SA12 SA11 SA10 SA9 SA8 SA7 SA6 SA5 SA4 SA3 SA2 SA1 SA0
(n = 0 to 3)
SA25 to SA16 Set the address (A25 to A16) of the DMA transfer source
(default value is undefined).
During DMA transfer, the next DMA transfer source address is held.
When DMA transfer is completed, the DMA address set first is held.
SA15 to SA0 Set the address (A15 to A0) of the DMA transfer source
(default value is undefined).
During DMA transfer, the next DMA transfer source address is held.
When DMA transfer is completed, the DMA address set first is held.
DDAnH
IR 0 0 0 0 0 DA25 DA24 DA23 DA22 DA21 DA20 DA19 DA18 DA17 DA16
(n = 0 to 3)
DDAnL
DA15 DA14 DA13 DA12 DA11 DA10 DA9 DA8 DA7 DA6 DA5 DA4 DA3 DA2 DA1 DA0
(n = 0 to 3)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DBCn
BC15 BC14 BC13 BC12 BC11 BC10 BC9 BC8 BC7 BC6 BC5 BC4 BC3 BC2 BC1 BC0
(n = 0 to 3)
BC15 to Transfer count setting or remaining transfer count during DMA transfer
BC0
0000H Transfer count of 1st transfer or remaining transfer count
0001H Transfer count of 2nd transfer or remaining transfer count
: :
FFFFH Transfer count of 65,536 (216)th transfer or remaining transfer count
The number of transfer data set first is held when DMA transfer is complete.
Cautions 1. Set the DBCn register at the following timing when DMA transfer is disabled (DCHCn.Enn
bit = 0).
• Period from after reset to start of first DMA transfer
• Period from after channel initialization by DCHCn.INITn bit to start of DMA transfer
• Period from after completion of DMA transfer (DCHCn.TCn bit = 1) to start of the next
DMA transfer
2. Following reset, set the DSAnH, DSAnL, DDAnH, DDAnL, and DBCn registers before
starting DMA transfer. If these registers are not set, the operation when DMA transfer is
started is not guaranteed.
15 14 13 12 11 10 9 8
DADCn 0 DS0 0 0 0 0 0 0
(n = 0 to 3)
7 6 5 4 3 2 1 0
SAD1 SAD0 DAD1 DAD0 0 0 0 0
(n = 0 to 3)
INITnNote 2 If the INITn bit is set to 1 with DMA transfer disabled (Enn bit = 0), the
DMA transfer status can be initialized.
When re-setting the DMA transfer status (re-setting the DDAnH, DDAnL,
DSAnH, DSAnL, DBCn, and DADCn registers) before DMA transfer is
completed (before the TCn bit is set to 1), be sure to initialize the DMA
channel.
When initializing the DMA controller, however, be sure to observe the
procedure described in 21.13 Cautions.
(1/2)
<7> 6 5 4 3 2 1 0
DTFRn DFn 0 IFCn5 IFCn4 IFCn3 IFCn2 IFCn1 IFCn0
(n = 0 to 3)
Note Do not set the DFn bit to 1 by software. Write 0 to this bit to clear a DMA transfer request if an interrupt
that is specified as the DMA transfer start factor occurs while DMA transfer is disabled.
Cautions 1. Set the IFCn5 to IFCn0 bits at the following timing when DMA transfer is disabled
(DCHCn.Enn bit = 0).
• Period from after reset to start of first DMA transfer
• Period from after channel initialization by DCHCn.INITn bit to start of DMA transfer
• Period from after completion of DMA transfer (DCHCn.TCn bit = 1) to start of the next
DMA transfer
2. Be sure to follow the steps below when changing the DTFRn register settings.
• When the values to be set to bits IFCn5 to IFCn0 are not set to bits IFCm5 to IFCm0 of
another channel.
<1> Stop the DMAn operation of the channel to be rewritten (DCHCn.Enn bit = 0).
<2> Change the DTFRn register settings. (Be sure to set DFn bit = 0 and change the
settings in the 8-bit manipulation.)
<3> Confirm that DFn bit = 0. (Stop the interrupt generation source operation
beforehand.)
<4> Enable the DMAn operation (Enn bit = 1).
• When the values to be set to bits IFCn5 to IFCn0 are set to bits IFCm5 to IFCm0 of
another channel.
<1> Stop the DMAn operation of the channel to be rewritten (DCHCn.Enn bit = 0).
<2> Stop the DMAm operation of the channel where the same values are set to bits
IFCm5 to IFCm0 as the values to be used to rewrite bits IFCn5 to IFCn0
(DCHCm.Emm bit = 0).
<3> Change the DTFRn register settings. (Be sure to set DFn bit = 0 and change the
settings in the 8-bit manipulation.)
<4> Confirm that bits DFn and DFm = 0. (Stop the interrupt generation source operation
beforehand.)
<5> Enable the DMAn operation (bits Enn and Emm = 1).
(2/2)
Cautions 3. An interrupt request that is generated in the standby mode (IDEL1, IDLE2, STOP, or sub-
IDLE mode) does not start the DMA transfer cycle (nor is the DFn bit set to 1).
4. If a DMA start factor is selected by the IFCn5 to IFCn0 bits, the DFn bit is set to 1 when an
interrupt occurs from the selected on-chip peripheral I/O, regardless of whether the DMA
transfer is enabled or disabled. If DMA is enabled in this status, DMA transfer is
immediately started.
Remark For the IFCn5 to IFCn0 bits, see Table 21-1 DMA Start Factors.
Note INTTAB1OV_BASE is the interrupt signal from before the overflow interrupt of TAB1 (INTTAB1OV) was culled by
TMQOP.
Remark n = 0 to 3
Table 21-2 shows the relationship between the transfer targets (√: Transfer enabled, ×: Transfer disabled).
Transfer Destination
Internal ROM On-Chip Internal RAM
Peripheral I/O
Internal RAM × √ ×
Internal ROM × × ×
Caution The operation is not guaranteed for combinations of transfer destination and source marked with “×”
in Table 21-2.
For DMA transfer executed to an on-chip peripheral I/O register (transfer source/destination), be sure to specify the
same transfer size as the register size. For example, for DMA transfer to an 8-bit register, be sure to specify byte (8-bit)
transfer.
Remark The bus width of each transfer target (transfer source/destination) is as follows.
• On-chip peripheral I/O: 16-bit bus width
• Internal RAM: 32-bit bus width
DMA channel 0 > DMA channel 1 > DMA channel 2 > DMA channel 3
The time required to respond to a DMA request, and the minimum number of clocks required for DMA transfer are
shown below.
Single transfer: DMA response time (<1>) + Transfer source memory access (<2>) + 1Note 1 + Transfer destination
memory access (<2>)
Notes 1. One clock is always inserted between a read cycle and a write cycle in DMA transfer.
2. If an external interrupt (INTPn) is specified as the trigger to start DMA transfer, noise elimination time is
added (n = 00 to 18).
3. Two clocks are required for a DMA cycle.
4. More wait cycles are necessary for accessing a specific peripheral I/O register (for details, see 3.4.9 (2)).
5. This is the number of clocks required when the following wait specifications have been made: 1 data wait (set
by the DWC0 register), 0 address waits (set by the AWC register), and 0 idle waits (set by the BCC register).
There are two types of DMA transfer start factors, as shown below.
Cautions 1. Two start factors (software trigger and hardware trigger) cannot be used for one DMA channel.
If two start factors are simultaneously generated for one DMA channel, only one of them is
valid. The start factor that is valid cannot be identified.
2. A new transfer request that is generated after the preceding DMA transfer request was
generated or in the preceding DMA transfer cycle is ignored (cleared).
3. The transfer request interval of the same DMA channel varies depending on the setting of bus
wait in the DMA transfer cycle, the start status of the other channels, or the external bus hold
request. In particular, as described in Caution 2, a new transfer request that is generated for
the same channel before the DMA transfer cycle or during the DMA transfer cycle is ignored.
Therefore, the transfer request intervals for the same DMA channel must be sufficiently
separated by the system. When the software trigger is used, completion of the DMA transfer
cycle that was generated before can be checked by updating the DBCn register.
When DMA transfer has been completed the number of times set to the DBCn register and when the DCHCn.Enn bit is
cleared to 0 and TCn bit is set to 1, a DMA transfer end interrupt request signal (INTDMAn) is generated for the interrupt
controller (INTC) (n = 0 to 3).
The V850ES/JC3-H and V850ES/JE3-H do not output a terminal count signal to external devices. Therefore, confirm
completion of DMA transfer by using the DMA transfer end interrupt or polling the TCn bit.
21.12 Cautions
(a) When waiting for completion of DMA transfer by polling TCn bit
Confirm that the TCn bit has been set to 1 (after TCn bit = 1 is read), and then read the TCn bit three more
times.
(b) When reading TCn bit in interrupt servicing routine
Execute reading the TCn bit three times.
Example: Execute instructions in the following order if channels 0, 1, and 2 are used (if the target of
transfer is not the internal RAM).
• Clear DCHC0.E00 bit to 0.
• Clear DCHC1.E11 bit to 0.
• Clear DCHC2.E22 bit to 0.
• Clear DCHC2.E22 bit to 0 again.
Caution Be sure to execute step <5> above to prevent illegal setting of the Enn bit of the channels
whose DMA transfer has been normally completed between <2> and <3>.
(b) Repeatedly execute setting INITn bit until transfer is forcibly terminated correctly
<1> Suppress a request from the DMA request source of the channel to be forcibly terminated (stop operation
of the on-chip peripheral I/O).
<2> Check that the DMA transfer request of the channel to be forcibly terminated is not held pending, by using
the DTFRn.DFn bit. If a DMA transfer request is held pending, wait until execution of the pending request
is completed.
<3> When it has been confirmed that the DMA request of the channel to be forcibly terminated is not held
pending, clear the Enn bit to 0.
<4> Again, clear the Enn bit of the channel to be forcibly terminated.
If the target of transfer for the channel to be forcibly terminated (transfer source/destination) is the internal
RAM, execute this operation once more.
<5> Copy the initial number of transfers of the channel to be forcibly terminated to a general-purpose register.
<6> Set the INITn bit of the channel to be forcibly terminated to 1.
<7> Read the value of the DBCn register of the channel to be forcibly terminated, and compare it with the
value copied in <5>. If the two values do not match, repeat operations <6> and <7>.
Remarks 1. When the value of the DBCn register is read in <7>, the initial number of transfers is read if
forced termination has been correctly completed. If not, the remaining number of transfers is
read.
2. Note that method (b) may take a long time if the application frequently uses DMA transfer for a
channel other than the DMA channel to be forcibly terminated.
<1> Suppress a transfer request from the DMA request source (stop the operation of the on-chip peripheral I/O).
<2> Check the DMA transfer request is not held pending, by using the DFn bit (check if the DFn bit = 0).
If a request is pending, wait until execution of the pending DMA transfer request is completed.
<3> If it has been confirmed that no DMA transfer request is held pending, clear the Enn bit to 0 (this operation
stops DMA transfer).
<4> Set the Enn bit to 1 to resume DMA transfer.
<5> Resume the operation of the DMA request source that has been stopped (start the operation of the on-chip
peripheral I/O).
• The CPU can access the internal ROM and internal RAM when DMA transfer is being executed between the
external memory and on-chip peripheral I/O.
• The CPU can access the internal ROM, and internal peripheral I/O when DMA transfer is being executed
between external memories.
(a) If DMA transfer does not occur while DSAn register is read
<1> Read value of DSAnH register: DSAnH = 0000H
<2> Read value of DSAnL register: DSAnL = FFFFH
The V850ES/JC3-H and V850ES/JE3-H are provided with a dedicated interrupt controller (INTC) for interrupt servicing
and can process a total of 86 to 93 interrupt requests.
An interrupt is an event that occurs independently of program execution, and an exception is an event whose
occurrence is dependent on program execution.
The V850ES/JC3-H and V850ES/JE3-H can process interrupt request signals from the on-chip peripheral hardware
and external sources. Moreover, exception processing can be started by the TRAP instruction (software exception) or by
generation of an exception event (i.e. fetching of an illegal opcode) (exception trap).
22.1 Features
Interrupts
Internal External
Non-maskable Maskable Total Non-maskable Maskable Total
V850ES/JC3-H μ PD70F3809 1 51 52 − 10 10
(40 pin) μ PD70F3810 1 51 52 − 10 10
μ PD70F3811 1 51 52 − 10 10
μ PD70F3812 1 51 52 − 10 10
μ PD70F3813 1 51 52 − 10 10
V850ES/JC3-H μ PD70F3814 1 52 53 − 10 10
(48 pin) μ PD70F3815 1 52 53 − 10 10
μ PD70F3816 1 52 53 − 10 10
μ PD70F3817 1 52 53 − 10 10
μ PD70F3818 1 52 53 − 10 10
μ PD70F3819 1 56 57 − 10 10
V850ES/JE3-H μ PD70F3820 1 52 53 1 10 11
μ PD70F3821 1 52 53 1 10 11
μ PD70F3822 1 52 53 1 10 11
μ PD70F3823 1 52 53 1 10 11
μ PD70F3824 1 52 53 1 10 11
μ PD70F3825 1 56 57 1 10 11
Interrupt/exception sources of the V850ES/JC3-H and V850ES/JE3-H are listed in Tables 22-2 and 22-3, respectively.
Type Classification Default Name Trigger Generating Exception Handler Restored Interrupt Control
Priority Unit Code Address PC Register
Reset Interrupt − RESET RESET pin input/reset RESET 0000H 00000000H Undefined −
input by internal source
Non- Interrupt − NMI Note 1 NMI pin valid edge Pin 0010H 00000010H nextPC −
maskable input
− − −
Note 3 Note 3
Software Exception TRAP0n TRAP instruction 004nH 00000040H nextPC
exception
− − −
Note 3 Note 3
TRAP1n TRAP instruction 005nH 00000050H nextPC
Maskable Interrupt 0 INTLVI Low voltage detection POCLVI 0080H 00000080H nextPC LVIIC
Type Classification Default Name Trigger Generating Exception Handler Restored Interrupt
Priority Unit Code Address PC Control
Register
Maskable Interrupt 25 INTTAB1OVNote 1 TAB1 overflow TAB1 0210H 00000210H nextPC TAB1OVIC
Note 2
26 INTTAB1CC0 TAB1 capture 0/ TAB1 0220H 00000220H nextPC TAB1CCIC0
compare 0 match
Notes 1. When using TAB1 in the 6-phase PWM output mode, functions as the zero match interrupt (TAB1TIOD) request
from TMQOP.
2. When using TAB1 in the 6-phase PWM output mode, functions as the compare match interrupt (TAB1TICD0)
request from TMQOP.
Type Classification Default Name Trigger Generating Exception Handler Restored Interrupt
Priority Unit Code Address PC Control
Register
Maskable Interrupt 58 INTCF1R CSIF1 reception completion/ CSIF1 0420H 00000420H nextPC CF1RIC
CSIF1 reception error
73 INTUC3T Note UARTC3 consecutive transmission UARTC3 0510H 00000510H nextPC UC3TIC
enable
82 INTRTC0 RTC constant cycle signal RTC 05A0H 000005A0H nextPC RTC0IC
Type Classification Default Name Trigger Generating Exception Handler Restored Interrupt
Priority Unit Code Address PC Control
Register
Maskable Interrupt 85 INTC0ERRNote1 CAN0 error CAN0 05D0H 000005D0H nextPC ERRIC0
Note
86 INTC0WUP1 CAN0 wake up CAN0 05E0H 000005E0H nextPC WUPIC0
Note
87 INTC0REC CAN0 reception CAN0 05F0H 000005F0H nextPC RECIC0
Note
88 INTC0TRX CAN0 transmission CAN0 0600H 00000600H nextPC TRXIC0
A non-maskable interrupt request signal is acknowledged unconditionally, even when interrupts are in the interrupt
disabled (DI) status. An NMI is not subject to priority control and takes precedence over all the other interrupt request
signals.
This product has the following two non-maskable interrupt request signals.
The valid edge of the NMI pin can be selected from four types: “rising edge”, “falling edge”, “both edges”, and “no
edge detection”.
The non-maskable interrupt request signal generated by overflow of watchdog timer 2 (INTWDT2) functions when the
WDTM2.WDM21 and WDTM2.WDM20 bits are set to “01”.
If two or more non-maskable interrupt request signals occur at the same time, the interrupt with the higher priority is
serviced, as follows (the interrupt request signal with the lower priority is ignored).
If a new NMI or INTWDT2 request signal is issued while an NMI is being serviced, it is serviced as follows.
(1) If new NMI request signal is issued while NMI is being serviced
The new NMI request signal is held pending, regardless of the value of the PSW.NP bit. The pending NMI request
signal is acknowledged after the NMI currently under execution has been serviced (after the RETI instruction has
been executed).
Caution For the non-maskable interrupt servicing executed by the non-maskable interrupt request signal
(INTWDT2), see 22.2.2 (2) From INTWDT2 signal.
(a) NMI and INTWDT2 request signals generated at the same time
Main routine
INTWDT2 servicing
(b) Non-maskable interrupt request signal generated during non-maskable interrupt servicing
Non-maskable Non-maskable interrupt request signal generated during non-maskable interrupt servicing
interrupt being
serviced NMI INTWDT2
NMI • NMI request generated during NMI servicing • INTWDT2 request generated during NMI servicing
(NP bit = 1 retained before INTWDT2 request)
Main routine
NMI servicing Main routine
NMI servicing
NMI (Held pending)
NMI request
request INTWDT2 (Held pending)
Servicing of NMI request
pending NMI request
INTWDT2
servicing
System reset
Main routine
NMI INTWDT2
servicing servicing
NP = 0
NMI INTWDT2
request request
System reset
Main routine
NMI INTWDT2
servicing servicing
INTWDT2 (Held pending)
request
NMI NP = 0
request
System reset
INTWDT2 • NMI request generated during INTWDT2 servicing • INTWDT2 request generated during INTWDT2 servicing
22.2.1 Operation
If a non-maskable interrupt request signal is generated, the CPU performs the following processing, and transfers
control to the handler routine.
NMI input
INTC
acknowledged
CPU processing
1
PSW.NP
Interrupt servicing
22.2.2 Restore
<1> Loads the restored PC and PSW from FEPC and FEPSW, respectively, because the PSW.EP bit is 0 and the
PSW.NP bit is 1.
<2> Transfers control back to the address of the restored PC and PSW.
RETI instruction
1
PSW.EP
1
PSW.NP
PC EIPC PC FEPC
PSW EIPSW PSW FEPSW
Caution When the EP and NP bits are changed by the LDSR instruction during non-maskable interrupt
servicing, in order to restore the PC and PSW correctly during recovery by the RETI
instruction, it is necessary to set the EP bit back to 0 and the NP bit back to 1 using the LDSR
instruction immediately before the RETI instruction.
INTWDT2 occurs.
22.2.3 NP flag
The NP flag is a status flag that indicates that non-maskable interrupt servicing is under execution.
This flag is set when a non-maskable interrupt request signal has been acknowledged, and masks non-maskable
interrupt requests to prohibit multiple interrupts from being acknowledged.
PSW 0 NP EP ID SAT CY OV S Z
Maskable interrupt request signals can be masked by interrupt control registers. The V850ES/JC3-H and V850ES/JE3-
H have 61 to 71 maskable interrupt sources.
If two or more maskable interrupt request signals are generated at the same time, they are acknowledged according to
the default priority. In addition to the default priority, eight levels of priorities can be specified by using the interrupt control
registers (programmable priority control).
When an interrupt request signal has been acknowledged, the acknowledgment of other maskable interrupt request
signals is disabled and the interrupt disabled (DI) status is set.
When the EI instruction is executed in an interrupt service routine, the interrupt enabled (EI) status is set, which
enables servicing of interrupts having a higher priority than the interrupt request signal in progress (specified by the
interrupt control register). Note that only interrupts with a higher priority will have this capability; interrupts with the same
priority level cannot be nested.
To enable multiple interrupts, however, save EIPC and EIPSW to memory or general-purpose registers before executing
the EI instruction, and execute the DI instruction before the RETI instruction to restore the original values of EIPC and
EIPSW.
22.3.1 Operation
If a maskable interrupt occurs, the CPU performs the following processing, and transfers control to a handler routine.
The maskable interrupt request signal masked by INTC and the maskable interrupt request signal generated while
another interrupt is being serviced (while the PSW.NP bit = 1 or the PSW.ID bit = 1) are held pending inside INTC. In this
case, servicing a new maskable interrupt is started in accordance with the priority of the pending maskable interrupt
request signal if either the maskable interrupt is unmasked or the NP and ID bits are set to 0 by using the RETI or LDSR
instruction.
How maskable interrupts are serviced is illustrated below.
INT input
INTC acknowledged
No
xxIF = 1
Interrupt requested?
Yes
No
xxMK = 0
Is the interrupt
mask released?
Yes
Yes
Priority higher No
than that of other interrupt
request?
Yes
Highest default
priority of interrupt requests No
with the same priority?
Yes
CPU processing
1
PSW.NP
0
1
PSW.ID
Interrupt servicing
Note For the ISPR register, see 22.3.6 In-service priority register (ISPR).
22.3.2 Restore
Recovery from maskable interrupt servicing is carried out by the RETI instruction.
When the RETI instruction is executed, the CPU performs the following processing, and transfers control to the address
of the restored PC.
<1> Loads the restored PC and PSW from EIPC and EIPSW because the PSW.EP bit is 0 and the PSW.NP bit is 0.
<2> Transfers control back to the address of the restored PC and PSW.
RETI instruction
1
PSW.EP
1
PSW.NP
PC EIPC PC FEPC
PSW EIPSW PSW FEPSW
Corresponding 0
bit of ISPRNote
Note For the ISPR register, see 22.3.6 In-service priority register (ISPR).
Caution When the EP and NP bits are changed by the LDSR instruction during maskable interrupt
servicing, in order to restore the PC and PSW correctly during recovery by the RETI
instruction, it is necessary to set the EP bit back to 0 and the NP bit back to 0 using the LDSR
instruction immediately before the RETI instruction.
Remark xx: Identification name of each peripheral unit (see Table 22-4 Interrupt Control Register (xxICn))
n: Peripheral unit number (see Table 22-4 Interrupt Control Register (xxICn)).
Figure 22-7. Example of Processing in Which Another Interrupt Request Signal Is Issued
While an Interrupt Is Being Serviced (1/2)
Main routine
Servicing of a Servicing of b
EI
EI
Servicing of c
Servicing of e
EI
Servicing of f
Servicing of g
EI
Servicing of h
Caution To perform multiple interrupt servicing, the values of the EIPC and EIPSW registers must be
saved before executing the EI instruction. When returning from multiple interrupt servicing,
restore the values of EIPC and EIPSW after executing the DI instruction.
Remarks 1. a to u in the figure are the temporary names of interrupt request signals shown for the sake of
explanation.
2. The default priority in the figure indicates the relative priority between two interrupt request
signals.
Figure 22-7. Example of Processing in Which Another Interrupt Request Signal Is Issued
While an Interrupt Is Being Serviced (2/2)
Main routine
Servicing of i
EI EI Servicing of k
Interrupt
Interrupt request i request j
(level 2) (level 3)
Interrupt request j is held pending because its
Interrupt request k
priority is lower than that of i.
(level 1)
k that occurs after j is acknowledged because it
has the higher priority.
Servicing of j
Servicing of l
Servicing of m
Servicing of o
EI Servicing of p
Interrupt request o Servicing of q
Interrupt EI Servicing of r
(level 3) Interrupt EI
request p
(level 2) request q Interrupt
(level 1) request r
(level 0)
Servicing of u
Caution To perform multiple interrupt servicing, the values of the EIPC and EIPSW registers must be
saved before executing the EI instruction. When returning from multiple interrupt servicing,
restore the values of EIPC and EIPSW after executing the DI instruction.
Main routine
EI
Interrupt request a (level 2)
Interrupt request b (level 1)
Interrupt request c (level 1)
Servicing of interrupt request b . Interrupt request b and c are
acknowledged first according to
. their priorities.
Because the priorities of b and c are
the same, b is acknowledged first
Default priority Servicing of interrupt request c according to the default priority.
a>b>c
Caution To perform multiple interrupt servicing, the values of the EIPC and EIPSW registers must be
saved before executing the EI instruction. When returning from multiple interrupt servicing,
restore the values of EIPC and EIPSW after executing the DI instruction.
Remarks 1. a to c in the figure are the temporary names of interrupt request signals shown for the sake of
explanation.
2. The default priority in the figure indicates the relative priority between two interrupt request
signals.
Caution Disable interrupts (DI) or mask the interrupt to read the xxICn.xxIFn bit. If the xxIFn bit is read while
interrupts are enabled (EI) or while the interrupt is unmasked, the correct value may not be read
when acknowledging an interrupt and reading the bit conflict.
<7> <6>
xxICn xxIFn xxMKn 0 0 0 xxPRn2 xxPRn1 xxPRn0
Note The flag xxlFn is reset automatically by the hardware if an interrupt request signal is acknowledged.
Remark xx: Identification name of each peripheral unit (see Table 22-4 Interrupt Control Register (xxICn))
n: Peripheral unit number (see Table 22-4 Interrupt Control Register (xxICn)).
The addresses and bits of the interrupt control registers are as follows.
<7> <6> 5 4 3 2 1 0
<7> <6> 5 4 3 2 1 0
Caution The device file defines the xxICn.xxMKn bit as a reserved word. If a bit is manipulated using the
name of xxMKn, the contents of the xxICn register, instead of the IMRm register, are rewritten (as a
result, the contents of the IMRm register are also rewritten).
(1/2)
7 6 5 4 3 2 1 0
IMR5L RECMK0Note 2 WUPMK0Note 2 ERRMK0Note 2 RTC2MK RTC1MK RTC0MK KRMK DMAMK3
IMR4 (IMR4HNote 1) DMAMK2 DMAMK1 DMAMK0 ADMK UC4TMK UC4RMK UC3TMK UC3RMK/
IICMK0
7 6 5 4 3 2 1 0
IMR4L UC2TMK UC2RMK 1 1 UC0TMK UC0RMK CF3TMK CF3RMK
7 6 5 4 3 2 1 0
IMR3L TM3EQMK0 TM2EQMK0 TM1EQMK0 TM0EQMK0 1 1 1 TAA4CCMK1
Notes 1. To read bits 8 to 15 of the IMR3 to IMR5 registers in 8-bit or 1-bit units, specify them as bits 0 to 7 of
IMR3H to IMR5H registers.
2. μPD70F3819, 70F3815 only
Caution Set bits 9 to 11, 14, 15 of the IMR5 register to 1. If the setting of these bits is changed, the
operation is not guaranteed.
Remark xx: Identification name of each peripheral unit (see Table 22-4 Interrupt Control Register
(xxICn)).
n: Peripheral unit number (see Table 22-4 Interrupt Control Register (xxICn))
(2/2)
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
IMR1L 1 1 1 1 1 1 PMK16 PMK15
7 6 5 4 3 2 1 0
IMR0L 1 PMK05 1 1 PMK02 1 1 LVIMK
Note To read bits 8 to 15 of the IMR0 to IMR2 registers in 8-bit or 1-bit units, specify them as bits 0 to 7 of
IMR0H to IMR2H registers.
Remark xx: Identification name of each peripheral unit (see Table 22-4 Interrupt Control Register
(xxICn)).
n: Peripheral unit number (see Table 22-4 Interrupt Control Register (xxICn))
Caution If an interrupt is acknowledged while the ISPR register is being read in the interrupt enabled (EI)
status, the value of the ISPR register after the bits of the register have been set by acknowledging the
interrupt may be read. To accurately read the value of the ISPR register before an interrupt is
acknowledged, read the register while interrupts are disabled (DI).
22.3.7 ID flag
This flag controls the maskable interrupt’s operating state, and stores control information regarding enabling or disabling of
interrupt request signals. An interrupt disable flag (ID) is assigned to the PSW.
Reset sets this flag to 00000020H.
PSW 0 NP EP ID SAT CY OV S Z
A software exception is generated when the CPU executes the TRAP instruction, and can always be acknowledged.
22.4.1 Operation
If a software exception occurs, the CPU performs the following processing, and transfers control to the handler routine.
TRAP instructionNote
CPU processing
EIPC Restored PC
EIPSW PSW
ECR.EICC Exception code
PSW.EP 1
PSW.ID 1
PC Handler address
Exception processing
Note TRAP instruction format: TRAP vector (the vector is a value from 00H to 1FH.)
The handler address is determined by the TRAP instruction’s operand (vector). If the vector is 00H to 0FH, it becomes
00000040H, and if the vector is 10H to 1FH, it becomes 00000050H.
22.4.2 Restore
Restoration from software exception processing is carried out by the RETI instruction.
By executing the RETI instruction, the CPU carries out the following processing and shifts control to the restored PC’s
address.
<1> Loads the restored PC and PSW from EIPC and EIPSW because the PSW.EP bit is 1.
<2> Transfers control to the address of the restored PC and PSW.
RETI instruction
1
PSW.EP
1
PSW.NP
PC EIPC PC FEPC
PSW EIPSW PSW FEPSW
Caution When the EP and NP bits are changed by the LDSR instruction during the software exception
processing, in order to restore the PC and PSW correctly during recovery by the RETI
instruction, it is necessary to set the EP bit back to 1 and the NP bit back to 0 using the LDSR
instruction immediately before the RETI instruction.
22.4.3 EP flag
The EP flag is a status flag used to indicate that exception processing is in progress. It is set when an exception occurs.
PSW 0 NP EP ID SAT CY OV S Z
An exception trap is an interrupt that is requested when the illegal execution of an instruction takes place. In the
V850ES/JC3-H and V850ES/JE3-H, an illegal opcode exception (ILGOP: Illegal Opcode Trap) is considered as an
exception trap.
15 11 10 5 4 0 31 27 26 23 22 16
0 1 1 1
× × × × × 1 1 1 1 1 1 × × × × × × × × × × to × × × × × × 0
1 1 1 1
×: Arbitrary
Caution It is recommended not to use an illegal opcode because instructions may newly be assigned in the
future.
(1) Operation
If an exception trap occurs, the CPU performs the following processing, and transfers control to the handler routine.
CPU processing
DBPC Restored PC
DBPSW PSW
PSW.NP 1
PSW.EP 1
PSW.ID 1
PC 00000060H
Exception processing
(2) Restoration
Restoration from an exception trap is carried out by the DBRET instruction. By executing the DBRET instruction,
the CPU carries out the following processing and controls the address of the restored PC.
<1> Loads the restored PC and PSW from DBPC and DBPSW.
<2> Transfers control to the address indicated by the restored PC and PSW.
Caution DBPC and DBPSW can be accessed only during the interval between the execution of an illegal
opcode and DBRET instruction.
DBRET instruction
PC DBPC
PSW DBPSW
(1) Operation
Upon occurrence of a debug trap, the CPU performs the following processing.
DBTRAP instruction
DBPC Restored PC
DBPSW PSW
PSW.NP 1
CPU processing PSW.EP 1
PSW.ID 1
PC 00000060H
Exception processing
(2) Restoration
Restoration from a debug trap is executed with the DBRET instruction.
With the DBRET instruction, the CPU performs the following steps and transfers control to the address of the
restored PC.
<1> The restored PC and PSW are read from DBPC and DBPSW.
<2> Control is transferred to the fetched address of the restored PC and PSW.
Caution DBPC and DBPSW can be accessed only during the interval between the execution of the
DBTRAP instruction and DBRET instruction.
The processing format for restoration from a debug trap is shown below.
DBRET instruction
PC DBPC
PSW DBPSW
22.6 External Interrupt Request Input Pins (NMI and INTP02, INTP05, INTP07 to INTP11, INTP14 to
INTP18)
(2) Eliminating noise on INTP02, INTP05, INTP07 to INTP11, INTP14 to INTP18 pins
The INTP00, INTP01, and INTP03 to INTP18 pins have an internal noise elimination circuit that uses analog delay.
Therefore, the input level of the NMI pin is not detected as an edge unless it is maintained for a specific time or
longer. Therefore, an edge is detected after specific time.
• Rising edge
• Falling edge
• Both rising and falling edges
• No edge detected
The edge of the NMI pin is not detected after reset. Therefore, the interrupt request signal is not acknowledged unless
a valid edge is enabled by using the INTF0 and INTR0 register (the NMI pin functions as a normal port pin).
(1) External interrupt falling, rising edge specification register 0 (INTF0, INTR0)
The INTF0 and INTR0 registers are 8-bit registers that specify detection of the falling and rising edges of the NMI
pin via bit 2 and the external interrupt pin (INTP02) via bits 0, 1, 3 to 5.
These registers can be read or written in 8-bit or 1-bit units.
Reset sets these registers to 00H.
Caution When the function is changed from the external interrupt function (alternate function) to the port
function, an edge may be detected. Therefore, set the INTF0n and INTR0n bits to 00, and then set
the port mode.
7 6 5 4 3 2 1 0
INTF0 0 0 0 0 INTF03 INTF02Note 0 0
INTP02 NMI
7 6 5 4 3 2 1 0
INTR0 0 0 0 0 INTR03 INTR02Note 0 0
INTP02 NMI
0 0 No edge detected
0 1 Rising edge
1 0 Falling edge
1 1 Both rising and falling edges
Caution Be sure to set the INTF0n and INTR0n bits to 00 when these registers are not used as the NMI or
INTP02 pins.
(2) External interrupt falling, rising edge specification register 3 (INTF3, INTR3)
The INTF3 and INTR3 registers are 8-bit registers that specify detection of the falling and rising edges of the
external interrupt pin (INTP07 to INTP09).
These registers can be read or written in 8-bit or 1-bit units.
Reset sets these registers to 00H.
Caution When the function is changed from the external interrupt function (alternate function) to the port
function, an edge may be detected. Therefore, set the INTF3n and INTR3n bits to 00, and then set
the port mode.
7 6 5 4 3 2 1 0
INTF3 0 0 0 INTF34 0 0 INTF31 INTF30
7 6 5 4 3 2 1 0
INTR3 0 0 0 INTR34 0 0 INTR31 INTR30
0 0 No edge detected
0 1 Rising edge
1 0 Falling edge
1 1 Both rising and falling edges
Caution Be sure to set the INTF3n and INTR3n bits to 00 when these registers are not used as the
INTP07 to INTP09 pin.
(3) External interrupt falling, rising edge specification registers 4 (INTF4, INTR4)
The INTF4 and INTR4 registers are 8-bit registers that specify detection of the falling and rising edges of the
external interrupt pin (INTP10).
These registers can be read or written in 8-bit or 1-bit units.
Reset sets these registers to 00H.
Caution When the function is changed from the external interrupt function (alternate function) to the port
function, an edge may be detected. Therefore, set the INTF42 and INTR42 bits to 00, and then set
the port mode.
7 6 5 4 3 2 1 0
INTF4 0 0 0 0 0 INTF42 0 0
INTP10
7 6 5 4 3 2 1 0
INTR4 0 0 0 0 0 INTR42 0 0
INTP10
Remark For the valid edge specification combinations, see Table 22-8.
0 0 No edge detected
0 1 Rising edge
1 0 Falling edge
1 1 Both rising and falling edges
Caution Be sure to set the INTF42 and INTR42 bits to 00 if the corresponding pin is not used as the
INTP10 pin.
(4) External interrupt falling, rising edge specification registers 5 (INTF5, INTR5)
The INTF5 and INTR5 registers are 8-bit registers that specify detection of the falling and rising edges of the
external interrupt pin (INTP05).
These registers can be read or written in 8-bit or 1-bit units.
Reset sets these registers to 00H.
Caution When the function is changed from the external interrupt function (alternate function) to the port
function, an edge may be detected. Therefore, set the INTF56 and INTR56 bits to 00, and then set
the port mode.
7 6 5 4 3 2 1 0
INTF5 0 INTF56 0 0 0 0 0 0
INTP05
7 6 5 4 3 2 1 0
INTR5 0 INTR56 0 0 0 0 0 0
INTP05
Remark For the valid edge specification combinations, see Table 22-9.
0 0 No edge detected
0 1 Rising edge
1 0 Falling edge
1 1 Both rising and falling edges
Caution Be sure to set the INTF56 and INTR56 bits to 00 if the corresponding pin is not used as the
INTP05 pin.
(5) External interrupt falling, rising edge specification register 9H (INTF9H, INTR9H)
The INTF9H and INTR9H registers are 16-bit or 8-bit registers that specify detection of the falling and rising edges
of the external interrupt pins (INTP11, INTP14 to INTP16).
These registers can be read or written in 8-bit or 1-bit units.
Reset sets these registers to 0000H/00H.
Caution When the function is changed from the external interrupt function (alternate function) to the port
function, an edge may be detected. Therefore, clear the INTF9n and INTR9n bits to 0, and then
set the port mode.
15 14 13 12 11 10 9 8
INTF9 (INTF9HNote) 0 0 INTF913 0 INTF911 INTF910 0 0
INTP11
After reset: 0000H R/W Address: INTR9 FFFFFC32H,
INTR9H FFFFFC32H, INTR9L FFFFFC33H
15 14 13 12 11 10 9 8
INTR9 (INTR9HNote) 0 0 INTF913 0 INTR911 INTR910 0 0
INTP11
Note To read bits 8 to 15 of the INTF9 and INTR9 registers in 8-bit or 1-bit units, specify them as bits 0 to 7 of
the INTF9H and INTR9H registers.
0 0 No edge detected
0 1 Rising edge
1 0 Falling edge
1 1 Both rising and falling edges
Caution Be sure to clear the INTF9n and INTR9n bits to 00 when these registers are not used as the
INTP11, INTP14 to INTP16 pins.
Caution After the sampling clock has been changed, it takes 3 sampling clocks to initialize the digital
noise eliminator. Therefore, if an INTP02 valid edge is input within these 3 sampling clocks after
the sampling clock has been changed, an interrupt request signal may be generated. Therefore,
be careful about the following points when using the interrupt and DMA functions.
• When using the interrupt function, after the 3 sampling clocks have elapsed, enable interrupts
after the interrupt request flag (PIC2.PIF2 bit) has been cleared.
• When using the DMA function (started by INTP02), enable DMA after 3 sampling clocks have
elapsed.
Remarks 1. Since sampling is performed 3 times, the reliably eliminated noise width is 2 sampling clocks.
2. In the case of noise with a width smaller than 2 sampling clocks, an interrupt request signal is
generated if noise synchronized with the sampling clock is input.
Except the following cases, the interrupt acknowledge time of the CPU is 4 clocks minimum. To input interrupt request
signals successively, input the next interrupt request signal at least 5 clocks after the preceding interrupt.
• In IDLE1/IDLE2/STOP mode
• When the external bus is accessed
• When interrupt request non-sampling instructions are successively executed (see 22.8 Periods in Which Interrupts
Are Not Acknowledged by CPU.)
• When the interrupt control register is accessed
Internal clock
Interrupt request
Instruction 1 IF ID EX MEM WB
Instruction 2 IFX IDX
Interrupt acknowledgment operation INT1 INT2 INT3 INT4
Instruction (first instruction of interrupt servicing routine) IF ID EX
Internal clock
Interrupt request
An interrupt is acknowledged by the CPU while an instruction is being executed. However, no interrupt will be
acknowledged between an interrupt request non-sample instruction and the next instruction (interrupt is held pending).
The interrupt request non-sample instructions are as follows.
• EI instruction
• DI instruction
• LDSR reg2, 0x5 instruction (for PSW)
• The store instruction for the PRCMD register
• The store, SET1, NOT1, or CLR1 instructions for the following registers.
• Interrupt-related registers:
Interrupt control register (xxICn), interrupt mask registers 0 to 5 (IMR0 to IMR5)
• Power save control register (PSC)
• On-chip debug mode register (OCDM)
Remark xx: Identification name of each peripheral unit (see Table 22-4 Interrupt Control Register (xxICn))
n: Peripheral unit number (see Table 22-4 Interrupt Control Register (xxICn)).
22.9 Cautions
The NMI pin alternately functions as the P02 pin, and functions as a normal port pin after being reset. To enable the
NMI pin, validate the NMI pin with the PMC0 register. The initial setting of the NMI pin is “No edge detected”. Select the
NMI pin valid edge using the INTF0 and INTR0 registers.
23.1 Function
A key interrupt request signal (INTKR) can be generated by inputting a falling edge to the six key input pins (KR2 to
KR5) by setting the KRM register.
KR5
INTKR
KR4
KR3
KR2
23.2 Register
Caution Rewrite the KRM register after once setting the KRM register to 00H.
Remark For the alternate-function pin settings, see Table 4-17 Settings When Port Pins Are
Used for Alternate Functions.
23.3 Cautions
(1) If a low level is input to any of the KR2 to KR5 pins, the INTKR signal is not generated even if the falling edge of
another pin is input.
(2) If the KRM register is changed, an interrupt request signal (INTKR) may be generated. To prevent this, change the
KRM register after disabling interrupts (DI) or masking, then clear the interrupt request flag (KRIC.KRIF bit) to 0,
and enable interrupts (EI) or clear the mask.
(3) To use the key interrupt function, be sure to set the port pin to the key return pin and then enable the operation with
the KRM register. To switch from the key return pin to the port pin, disable the operation with the KRM register and
then set the port pin.
24.1 Overview
The power consumption of the system can be effectively reduced by using the standby modes in combination and
selecting the appropriate mode for the application. The available standby modes are listed in Table 24-1.
HALT mode Mode in which only the operating clock of the CPU is stopped
Note
IDLE1 mode Mode in which all the operations of the internal circuits except the oscillator, PLL , and flash
memory are stopped
IDLE2 mode Mode in which all the operations of internal circuits except the oscillator are stopped
STOP mode Mode in which all the operations of internal circuits except the subclock oscillator are stopped
Subclock operation mode Mode in which the subclock is used as the internal system clock
Sub-IDLE mode Mode in which all the operations of internal circuits except the oscillator are stopped, in the subclock
operation mode
Reset
Internal oscillation
clock operation
Sub-IDLE mode
(fx operates, PLL operates) WDT overflow
Oscillation
stabilization wait
PLL lockup
HALT mode
time wait
(fx operates, PLL operates)
PLL mode Clock through mode
Oscillation (PLL operates) (PLL stops)
stabilization waitNote
IDLE1 mode
(fx operates, PLL operates) HALT mode
(fx operates, PLL stops)
Oscillation Oscillation
Subclock operation mode stabilization waitNote stabilization waitNote
IDLE1 mode
(fx stops, PLL stops)
(fx operates, PLL stops)
Note If a WDT overflow occurs during an oscillation stabilization time, the CPU operates on the internal
oscillation clock.
24.2 Registers
Note Standby mode set by STP bit: IDLE1, IDLE2, STOP, or sub-IDLE mode
Cautions 1. Before setting the IDLE1, IDLE2, STOP, or sub-IDLE mode, set the PSMR.PSM1
and PSMR.PSM0 bits and then set the STP bit.
2. Settings of the NMI1M, NMI0M, and INTM bits are invalid when HALT mode is
released.
3. If the NMI1M, NMI0M, or INTM bit is set to 1 at the same time the STP bit is set
to 1, the setting of NMI1M, NMI0M, or INTM bit becomes invalid. If there is an
unmasked interrupt request signal being held pending when the
IDLE1/IDLE2/STOP mode is set, set the bit corresponding to the interrupt
request signal (NMI1M, NMI0M, or INTM) to 1, and then set the STP bit to 1.
Remark IDLE1: In this mode, all operations except the oscillator operation and some other circuits (flash
memory and PLL) are stopped.
After the IDLE1 mode is released, the normal operation mode is restored without needing
to secure the oscillation stabilization time, like the HALT mode.
IDLE2: In this mode, all operations except the oscillator operation are stopped.
After the IDLE2 mode is released, the normal operation mode is restored following the
lapse of the setup time specified by the OSTS register (flash memory and PLL).
STOP: In this mode, all operations except the subclock oscillator operation are stopped.
After the STOP mode is released, the normal operation mode is restored following the
lapse of the oscillation stabilization time specified by the OSTS register.
Sub-IDLE: In this mode, all other operations are halted except for the oscillator. After the IDLE mode
has been released by the interrupt request signal, the subclock operation mode will be
restored after 12 cycles of the subclock have been secured.
Note The oscillation stabilization time and setup time are required when the STOP mode and
IDLE2 mode are released, respectively.
Cautions 1. The wait time following release of the STOP mode does not include the time
until the clock oscillation starts ("a" in the figure below) following release of
the STOP mode, regardless of whether the STOP mode is released by reset or
the occurrence of an interrupt request signal.
a
VSS
Cautions 1. Insert five or more NOP instructions after the HALT instruction.
2. If the HALT instruction is executed while an unmasked interrupt request signal is being held
pending, the status shifts to HALT mode, but the HALT mode is then released immediately by the
pending interrupt request.
(1) Releasing HALT mode by non-maskable interrupt request signal or unmasked maskable interrupt request
signal
The HALT mode is released by a non-maskable interrupt request signal or an unmasked maskable interrupt
request signal, regardless of the priority of the interrupt request signal. If the HALT mode is set in an interrupt
servicing routine, however, an interrupt request signal that is issued later is serviced as follows.
(a) If an interrupt request signal with a priority lower than that of the interrupt request currently being serviced is
issued, the HALT mode is released, but that interrupt request signal is not acknowledged. The interrupt
request signal itself is retained.
(b) If an interrupt request signal with a priority higher than that of the interrupt request currently being serviced is
issued (including a non-maskable interrupt request signal), the HALT mode is released and that interrupt
request signal is acknowledged.
Table 24-2. Operation After Releasing HALT Mode by Interrupt Request Signal
Release Source Interrupt Enabled (EI) Status Interrupt Disabled (DI) Status
Cautions 1. Insert five or more NOP instructions after the instruction that stores data in the PSC register to
set the IDLE1 mode.
2. If the IDLE1 mode is set while an unmasked interrupt request signal is being held pending, the
IDLE1 mode is released immediately by the pending interrupt request.
(1) Releasing IDLE1 mode by non-maskable interrupt request signal or unmasked maskable interrupt request
signal
The IDLE1 mode is released by a non-maskable interrupt request signal or an unmasked maskable interrupt
request signal, regardless of the priority of the interrupt request signal. If the IDLE1 mode is set in an interrupt
servicing routine, however, an interrupt request signal that is issued later is processed as follows.
(a) If an interrupt request signal with a priority lower than that of the interrupt request currently being serviced is
issued, the IDLE1 mode is released, but that interrupt request signal is not acknowledged. The interrupt
request signal itself is retained.
(b) If an interrupt request signal with a priority higher than that of the interrupt request currently being serviced is
issued (including a non-maskable interrupt request signal), the IDLE1 mode is released and that interrupt
request signal is acknowledged.
Caution An interrupt request signal that is disabled by setting the PSC.NMI1M, PSC.NMI0M, and
PSC.INTM bits to 1 becomes invalid and IDLE1 mode is not released.
Table 24-4. Operation After Releasing IDLE1 Mode by Interrupt Request Signal
Release Source Interrupt Enabled (EI) Status Interrupt Disabled (DI) Status
Non-maskable interrupt request Execution branches to the handler address after securing the prescribed setup time.
signal
Maskable interrupt request signal Execution branches to the handler address The next instruction is executed after
or the next instruction is executed after securing the prescribed setup time.
securing the prescribed setup time.
Cautions 1. Insert five or more NOP instructions after the instruction that stores data in the PSC register to
set the IDLE2 mode.
2. If the IDLE2 mode is set while an unmasked interrupt request signal is being held pending, the
IDLE2 mode is released immediately by the pending interrupt request.
(1) Releasing IDLE2 mode by non-maskable interrupt request signal or unmasked maskable interrupt request
signal
The IDLE2 mode is released by a non-maskable interrupt request signal or an unmasked maskable interrupt
request signal, regardless of the priority of the interrupt request signal. If the IDLE2 mode is set in an interrupt
servicing routine, however, an interrupt request signal that is issued later is processed as follows.
(a) If an interrupt request signal with a priority lower than that of the interrupt request currently being serviced is
issued, the IDLE2 mode is released, but that interrupt request signal is not acknowledged. The interrupt
request signal itself is retained.
(b) If an interrupt request signal with a priority higher than that of the interrupt request currently being serviced is
issued (including a non-maskable interrupt request signal), the IDLE2 mode is released and that interrupt
request signal is acknowledged.
Caution The interrupt request signal that is disabled by setting the PSC.NMI1M, PSC.NMI0M, and
PSC.INTM bits to 1 becomes invalid and IDLE2 mode is not released.
Table 24-6. Operation After Releasing IDLE2 Mode by Interrupt Request Signal
Release Source Interrupt Enabled (EI) Status Interrupt Disabled (DI) Status
Non-maskable interrupt request Execution branches to the handler address after securing the prescribed setup time.
signal
Maskable interrupt request signal Execution branches to the handler address The next instruction is executed after
or the next instruction is executed after securing the prescribed setup time.
securing the prescribed setup time.
(1) Releasing IDLE2 mode by non-maskable interrupt request signal or unmasked maskable interrupt request
signal
Secure the specified setup time by setting the OSTS register.
When the releasing source is generated, the dedicated internal timer starts counting according to the OSTS
register setting. When it overflows, the normal operation mode is restored.
Oscillated waveform
Main clock
Interrupt request
Cautions 1. Insert five or more NOP instructions after the instruction that stores data in the PSC register to
set the STOP mode.
2. If the STOP mode is set while an unmasked interrupt request signal is being held pending, the
STOP mode is released immediately by the pending interrupt request.
(1) Releasing STOP mode by non-maskable interrupt request signal or unmasked maskable interrupt request
signal
The STOP mode is released by a non-maskable interrupt request signal or an unmasked maskable interrupt
request signal, regardless of the priority of the interrupt request signal. If the STOP mode is set in an interrupt
servicing routine, however, an interrupt request signal that is issued later is serviced as follows.
(a) If an interrupt request signal with a priority lower than that of the interrupt request currently being serviced is
issued, the STOP mode is released, but that interrupt request signal is not acknowledged. The interrupt
request signal itself is retained.
(b) If an interrupt request signal with a priority higher than that of the interrupt request currently being serviced is
issued (including a non-maskable interrupt request signal), the STOP mode is released and that interrupt
request signal is acknowledged.
Caution The interrupt request that is disabled by setting the PSC.NMI1M, PSC.NMI0M, and PSC.INTM bits
to 1 becomes invalid and STOP mode is not released.
Table 24-8. Operation After Releasing STOP Mode by Interrupt Request Signal
Release Source Interrupt Enabled (EI) Status Interrupt Disabled (DI) Status
Non-maskable interrupt request Execution branches to the handler address after securing the oscillation stabilization time.
signal
Maskable interrupt request signal Execution branches to the handler address The next instruction is executed after
or the next instruction is executed after securing the oscillation stabilization time.
securing the oscillation stabilization time.
(1) Releasing STOP mode by non-maskable interrupt request signal or unmasked maskable interrupt request
signal
Secure the oscillation stabilization time by setting the OSTS register.
When the releasing source is generated, the dedicated internal timer starts counting according to the OSTS
register setting. When it overflows, the normal operation mode is restored.
Oscillated waveform
Main clock
STOP status
Interrupt request
Cautions 1. When manipulating the CK3 bit, do not change the set values of the PCC.CK2 to PCC.CK0 bits
(using a bit manipulation instruction to manipulate the bit is recommended). For details of the
PCC register, see 6.3 (1) Processor clock control register (PCC).
2. If the following conditions are not satisfied, change the CK2 to CK0 bits so that the conditions are
satisfied and set the subclock operation mode.
Internal system clock (fCLK) > Subclock (fXT = 32.768 kHz) × 4
Remark Internal system clock (fCLK): Clock generated from main clock (fXX) in accordance with the settings of the
CK2 to CK0 bits
Caution When manipulating the CK3 bit, do not change the set values of the CK2 to CK0 bits (using a bit
manipulation instruction to manipulate the bit is recommended).
For details of the PCC register, see 5.3 (1) Processor clock control register (PCC).
Notes 1. Be sure to stop the PLL (PLLCTL.PLLON bit = 0) before stopping the main clock.
2. V850ES/JE3-H only.
3. V850ES/JC3-H (48 pin), V850ES/JE3-H only.
4. μ PD70F3819, 70F3825 only
Caution When the CPU is operating on the subclock and main clock oscillation is stopped, accessing a
register in which a wait occurs is disabled. If a wait is generated, it can be released only by reset
(see 3.4.9 (2)).
Cautions 1. Following the store instruction to the PSC register for setting the sub-IDLE mode, insert the five
or more NOP instructions.
2. If the sub-IDLE mode is set while an unmasked interrupt request signal is being held pending, the
sub-IDLE mode is then released immediately by the pending interrupt request.
(1) Releasing sub-IDLE mode by non-maskable interrupt request signal or unmasked maskable interrupt
request signal
The sub-IDLE mode is released by a non-maskable interrupt request signal or an unmasked maskable interrupt
request signal, regardless of the priority of the interrupt request signal.
If the sub-IDLE mode is set in an interrupt servicing routine, however, an interrupt request signal that is issued later
is serviced as follows.
(a) If an interrupt request signal with a priority lower than that of the interrupt request currently being serviced is
issued, the sub-IDLE mode is released, but that interrupt request signal is not acknowledged. The interrupt
request signal itself is retained.
(b) If an interrupt request signal with a priority higher than that of the interrupt request currently being serviced is
issued (including a non-maskable interrupt request signal), the sub-IDLE mode is released and that interrupt
request signal is acknowledged.
Cautions 1. The interrupt request signal that is disabled by setting the PSC.NMI1M, PSC.NMI0M, and
PSC.INTM bits to 1 becomes invalid and sub-IDLE mode is not released.
2. When the sub-IDLE mode is released, 12 cycles of the subclock (about 366 μs) elapse from
when the interrupt request signal that releases the sub-IDLE mode is generated to when the
mode is released.
Table 24-11. Operation After Releasing Sub-IDLE Mode by Interrupt Request Signal
Release Source Interrupt Enabled (EI) Status Interrupt Disabled (DI) Status
Non-maskable interrupt request Execution branches to the handler address.
signal
Maskable interrupt request signal Execution branches to the handler address The next instruction is executed.
or the next instruction is executed.
25.1 Overview
After a reset is released, the source of the reset can be confirmed with the reset source flag register (RESF).
Caution In emergency operation mode, do not access on-chip peripheral I/O registers other than registers
used for interrupts, port function, WDT2, or timer M, each of which can operate with the internal
oscillation clock. In addition, operation of CSIF0, CSIF2 to CSIF4 and UARTC0 using the
externally input clock is also prohibited in this mode.
Internal bus
Reset signal
RESET
Reset signal to
LVIM/LVIS register
Reset signal
LVI reset signal
Caution An LVI circuit internal reset does not reset the LVI circuit.
The V850ES/JC3-H and V850ES/JE3-H have four kinds of reset sources. After a reset has been released, the source
of the reset that occurred can be checked with the reset source flag register (RESF).
Note The value of the RESF register is set to 00H when a reset is executed via the RESET pin. When a reset
is executed by the watchdog timer 2 (WDT2), low-voltage detector (LVI), or clock monitor (CLM), the
reset flags of this register (WDT2RF bit, CLMRF bit, and LVIRF bit) are set. However, other sources are
retained.
Caution Only "0" can be written to each bit of this register. If writing "0" conflicts with setting the flag
(occurrence of reset), setting the flag takes precedence.
25.3 Operation
Note When the power is turned on, the following pin may output an undefined level temporarily, even during reset.
• P10/ANO0 pin
• DDO pin
• P53/SIF2/KR3/RTP03/DDO pin
Caution The OCDM register is initialized by the RESET pin input. Therefore, note with caution that, if a high
level is input to the P56/INTP05/DRST pin after a reset release before the OCDM.OCDM0 bit is cleared,
the on-chip debug mode is entered. For details, see CHAPTER 4 PORT FUNCTIONS.
fX
fCLK
Initialized to fXX/8 operation
RESET
Internal system
reset signal
Counting of oscillation
stabilization time
VDD
fX
fCLK
Initialized to fXX/8 operation
RESET
Analog delay
Internal system
reset signal
Oscillation stabilization
time count
Must be on-chip
regulator stabilization
time (1 ms (max.)) Overflow of timer for oscillation stabilization
or longer.
fX
fCLK
Initialized to fXX/8 operation
WDT2RES
Analog delay
Internal system
reset signal
Counting of oscillation
stabilization time
Remark For the reset timing of the low-voltage detector, see CHAPTER 27 LOW-VOLTAGE DETECTOR (LVI).
Main clock
Internal oscillation
clock
Reset Counting of oscillation stabilization time Normal operation (fCPU = Main clock)
V850ES/JC3-H,
V850ES/JE3-H
Operation
stops Operation in progress
WDT2
Main clock
Internal oscillation
clock
Emergency mode
Reset Counting of oscillation stabilization time (fCPU = internal oscillation clock)
V850ES/JC3-H,
V850ES/JE3-H
Operation
stops Operation in progress Operation in progress (re-count)
WDT2
Operation stops
Clock monitor
WDT overflows
The CPU operation clock states can be checked with the CPU operation clock status register (CCLS).
Reset occurs →
reset release
Main clock No
oscillation stabilization
time secured?
fCPU = fRNote 2
fCPU = fX CCLS.CCLSF bit ← 1
WDT2 restart
Firmware operation
Software processing
No
CCLS.CCLSF bit = 1?
Yes
No
No
(in emergent operation mode)
(in normal operation mode)
Reset source generated?
Yes
26.1 Functions
The clock monitor samples the main clock by using the internal oscillation clock and generates a reset request signal
when oscillation of the main clock is stopped.
Once the operation of the clock monitor has been enabled by an operation enable flag, it cannot be cleared to 0 by any
means other than reset.
When a reset by the clock monitor occurs, the RESF.CLMRF bit is set. For details on the RESF register, see 25.2
Registers to Check Reset Source.
The clock monitor automatically stops under the following conditions.
26.2 Configuration
Item Configuration
Main clock
Internal oscillation
clock
Enable/disable
CLME
26.3 Register
The clock monitor is controlled by the clock monitor mode register (CLM).
CLM 0 0 0 0 0 0 0 CLME
Cautions 1. Once the CLME bit has been set to 1, it cannot be cleared to 0 by any means other
than reset.
2. When a reset by the clock monitor occurs, the CLME bit is cleared to 0 and the
RESF.CLMRF bit is set to 1.
3. Be sure to set bits 7 to 1 to “0”.
26.4 Operation
This section explains the functions of the clock monitor. The start and stop conditions are as follows.
<Start condition>
Enabling operation by setting the CLM.CLME bit to 1
<Stop conditions>
• While oscillation stabilization time is being counted after STOP mode is released
• When the main clock is stopped (from when PCC.MCK bit = 1 during subclock operation to when PCC.CLS bit =
0 during main clock operation)
• When the sampling clock (internal oscillation clock) is stopped
• When the CPU operates using the internal oscillation clock
CPU Operating Clock Operation Mode Status of Main Clock Status of Internal Status of Clock Monitor
Oscillation Clock
Note 1 Note 2
Main clock HALT mode Oscillates Oscillates Operates
Note 1 Note 2
IDLE1, IDLE2 modes Oscillates Oscillates Operates
Note 1
STOP mode Stops Oscillates Stops
Note 1 Note 2
Subclock Sub-IDLE mode Oscillates Oscillates Operates
(PCC.MCK = 0)
Note 1
Subclock Sub-IDLE mode Stops Oscillates Stops
(PCC.MCK = 1)
Note 3
Internal oscillation clock – Stops Oscillates Stops
During reset – Stops Stops Stops
Notes 1. The internal oscillator can be stopped by setting the RCM.RSTOP bit to 1.
2. The clock monitor is stopped while the internal oscillator is stopped.
3. The internal oscillator cannot be stopped by software.
Figure 26-2. Reset Period Due to That Oscillation of Main Clock Is Stopped
Main clock
Internal oscillation
clock
Internal reset
signal
CLM.CLME bit
RESF.CLMRF bit
Main clock
Oscillation
stabilization time
Internal oscillation
clock
RESET
Set to 1 by software
CLME
CPU Normal
operation operation STOP Oscillation stabilization time Normal operation
Main clock
CLME
Clock monitor
status During Monitor stops During monitor
monitor
Main clock
CLME
Clock monitor
status During Monitor stops Monitor stops During monitor
monitor
(5) Operation while CPU is operating on internal oscillation clock (CCLS.CCLSF bit = 1)
The monitor operation is not stopped when the CCLSF bit is 1, even if the CLME bit is set to 1.
27.1 Functions
• If the interrupt occurrence at low voltage detection is selected, the low-voltage detector continuously compares the
supply voltage (VDD) and the detected voltage (VLVI), and generates an internal interrupt signal when the supply
voltage drops or rises across the detected voltage.
• If the reset occurrence at low voltage detection is selected, the low-voltage detector generates an interrupt reset
signal when the supply voltage (VDD) drops across the detected voltage (VLVI).
• Interrupt or reset signal can be selected by software.
• Can operate in STOP mode.
If the low-voltage detector is used to generate a reset signal, the RESF.LVIRF bit is set to 1 when the reset signal is
generated. For details of RESF register, see 25.2 Registers to Check Reset Source.
27.2 Configuration
VDD VDD
Low- N-ch
voltage
Internal reset signal
detection
level
Selector
+
selector
−
INTLVI
Detected voltage
source (VLVI)
Low-voltage detection
register (LVIM)
Internal bus
27.3 Registers
Note 1
After reset: 00H R/W Address: FFFFF890H
<7> 6 5 4 3 2 <1> <0>
0 Disable operation.
1 Enable operation.
0 Generates interrupt signal INTLVI when the supply voltage drops or rises across
the detection voltage value.
1 Generates internal reset signal LVIRES when the supply voltage drops across the
detected voltage value.
Note 2
LVIF Low-voltage detection flag
Cautions 1. When the LVION and LVIMD bits to 1, the low-voltage detector cannot be stopped
until the reset request due to other than the low-voltage detection is generated.
2. When the LVION bit is set to 1, the comparator in the LVI circuit starts operating.
Wait 0.2 ms or longer by software before checking the voltage at the LVIF bit after
the LVION bit is set.
3. Be sure to set bits 6 to 2 to “0”.
Note
After reset: 01H R/W Address: FFFFF892H
7 6 5 4 3 2 1 <0>
RAMS 0 0 0 0 0 0 0 RAMF
Note This register is reset only when a voltage drop below the RAM retention voltage is detected.
27.4 Operation
Depending on the setting of the LVIM.VIMD bit, an interrupt signal (INTLVI) or an internal reset signal is generated.
How to specify each operation is described below, together with timing charts.
Caution If the LVIMD bit is set to 1, the contents of the LVIM register cannot be changed until a reset request
other than LVI is generated.
Time
LVION bit
Clear
Delay Delay
External RESET IC
detected voltage
Time
LVION bit
Clear
Delay Delay
Note
INTLVI signal
Delay
RESET pin
Note Since the LVION bit is the initial value (operation disabled) due to the external reset input, no INTLVI
interrupts occur.
Caution When the INTLVI signal is generated, confirm, using the LVIM.LVIF bit, whether the INTLVI
signal is generated due to a supply voltage drop or rise across the detected voltage.
The supply voltage and detected voltage are compared. When the supply voltage drops below the detected voltage
(including on power application), the RAMS.RAMF bit is set to 1.
2.0 V
(minimum RAM
retention voltage)
RESET pin
RAM data
RAMS.RAMF bit is not retained RAM data is
not retained
Remarks 1. The RAMF bit is set to 1 if the supply voltage drops under the minimum RAM retention voltage
(2.0 V (TYP.)).
2. The RAMF bit operates regardless of the RESET pin status.
28.1 Functions
28.2 Configuration
Item Configuration
Control registers CRC input register (CRCIN)
CRC data register (CRCD)
Internal bus
Internal bus
28.3 Registers
7 6 5 4 3 2 1 0
CRCIN
Caution Accessing the CRCD register is prohibited in the following statuses. For details, see 3.4.9 (2)
Accessing specific on-chip peripheral I/O registers.
• When the CPU operates with the subclock and the main clock oscillation is stopped
• When the CPU operates with the internal oscillation clock
CRCD
28.4 Operation
b7 b0
b15 b0
(2) CRCD register read 1189H
The code when 01H is sent LSB first is (1000 0000). Therefore, the CRC code from generation polynomial X16 + X12 +
X + 1 becomes the remainder when (1000 0000) X16 is divided by (1 0001 0000 0010 0001) using the modulo-2 operation
5
formula.
The modulo-2 operation is performed based on the following formula.
0+0=0
0+1=1
1+0=1
1+1=0
−1 = 1
LSB
1000 1000 MSB
1 0001 0000 0010 0001 1000 0000 0000 0000 0000 0000
1000 1000 0001 0000 1
1000 0001 0000 1000 0
1000 1000 0001 0000 1
1001 0001 1000 1000
LSB MSB
9 8 1 1
Therefore, the CRC code becomes 1001 0001 1000 1000
. Since LSB first is used, this corresponds to 1189H in
hexadecimal notation.
Start
Yes
Input data exists?
No
End
Communication errors can easily be detected if the CRC code is transmitted/received along with transmit/receive data
when transmitting/receiving data consisting of several bytes.
The following is an illustration using the transmission of 12345678H (0001 0010 0011 0100 0101 0110 0111 1000B)
LSB-first as an example.
78 56 34 12 F6 08
CHAPTER 29 REGULATOR
29.1 Overview
The V850ES/JC3-H and V850ES/JE3-H include a regulator to reduce power consumption and noise.
This regulator supplies a stepped-down VDD power supply voltage to the oscillator block and internal logic circuits
(except the A/D converter, D/A converter, and output buffers).
REGC
USB
I/O buffer
EVDD
Bidirectional level shifter
29.2 Operation
The regulators of the V850ES/JC3-H and V850ES/JE3-H always operate in any mode (normal operation mode, HALT
mode, IDLE1 mode, IDLE2 mode, STOP mode, subclock operation mode, sub IDLE mode, or during reset).
Be sure to connect a capacitor (4.7 μF (Recommend value)) to the REGC pin to stabilize the regulator output.
A diagram of the regulator pin connection method is shown below.
VDD
Input voltage REG
2.85 to 3.6 V
4.7 μF
(Recommend value)
VSS
Flash memory versions offer the following advantages for development environments and mass production applications.
{ For altering software after the V850ES/JC3-H and V850ES/JE3-H are soldered onto the target system.
{ For data adjustment when starting mass production.
{ For differentiating software according to the specification in small scale production of various models.
{ For facilitating inventory management.
{ For updating software after shipment.
30.1 Features
The internal flash memory area of the V850ES/JC3-H and V850ES/JE3-H is divided into 4, 8, 16, 32 or 64 blocks and
can be programmed/erased in block units. All the blocks can also be erased at once.
When the boot swap function is used, the physical memory located at the addresses of blocks 0 to 15 is replaced by the
physical memory located at the addresses of blocks 16 to 31. For details of the boot swap function, see 30.5 Rewriting
by Self Programming.
00010000H
0000FFFFH
Block 15 (4 KB)
0000F000H
0000EFFFH
Block 14 (4 KB)
0000E000H
0000DFFFH
:
00008000H
00007FFFH
Block 7 (4 KB) Block 7 (4 KB)
00006000H
00005FFFH
Block 6 (4 KB) Block 6 (4 KB)
00005000H
00004FFFH
Block 5 (4 KB) Block 5 (4 KB)
00004000H
00003FFFH
Block 3 (4 KB) Block 3 (4 KB) Block 3 (4 KB)
00003000H
00002FFFH
Block 2 (4 KB) Block 2 (4 KB) Block 2 (4 KB)
00002000H
00001FFFH
Block 1 (4 KB) Block 1 (4 KB) Block 1 (4 KB)
00001000H
00000FFFH
Block 0 (4 KB) Block 0 (4 KB) Block 0 (4 KB)
00000000H
00040000H
0003FFFFH
Block 63 (4 KB)
0003F000H
0003EFFFH
Block 62 (4 KB)
0003E000H
0003DFFFH
00020000H
0001FFFFH
Block 31 (4 KB) Block 31 (4 KB)
0001F000H
0001EFFFH
Block 30 (4 KB) Block 30 (4 KB)
0001E000H
Note 1 0001DFFFH
00008000H
Note 2 00007FFFH
Block 7 (4 KB) Block 7 (4 KB)
00007000H
00006FFFH
Block 6 (4 KB) Block 6 (4 KB)
00006000H
00005FFFH
00003000H
00002FFFH
Block 2 (4 KB) Block 2 (4 KB)
00002000H
00001FFFH
Block 1 (4 KB) Block 1 (4 KB)
00001000H
00000FFFH
Block 0 (4 KB) Block 0 (4 KB)
00000000H
μ PD70F3812, 70F3817, μ PD70F3813, 70F3818,
70F3823 70F3819, 70F3824,
(128 KB) 70F3825
(256 KB)
Notes 1. Area to be replaced with the boot area by the boot swap function
2. Boot area
The internal flash memory of the V850ES/JC3-H and V850ES/JE3-H can be rewritten by using the rewrite function of
the dedicated flash programmer, regardless of whether the V850ES/JC3-H and V850ES/JE3-H have already been
mounted on the target system or not (off-board/on-board programming).
In addition, a security function that prohibits rewriting the user program written to the internal flash memory is also
supported, so that the program cannot be changed by an unauthorized person.
The rewrite function using the user program (self programming) is ideal for an application where it is assumed that the
program is changed after production/shipment of the target system. A boot swap function that rewrites the entire flash
memory area safely is also supported. In addition, interrupt servicing is supported during self programming, so that the
flash memory can be rewritten under various conditions, such as while communicating with an external device.
Remark The FA series is a product of Naito Densei Machida Mfg. Co., Ltd.
The following table lists the security functions. The block erase command prohibit, chip erase command prohibit, and
program command prohibit functions are enabled by default after shipment, and security can be set by rewriting via on-
board/off-board programming. Each security function can be used in combination with the others at the same time.
Block erase command prohibit Execution of a block erase command on all blocks is prohibited. Setting of prohibition can be
initialized by execution of a chip erase command.
Chip erase command prohibit Execution of block erase and chip erase commands on all the blocks is prohibited. Once
prohibition is set, setting of prohibition cannot be initialized because the chip erase command
cannot be executed.
Program command prohibit Execution of program and block erase commands on all the blocks is prohibited. Setting of
prohibition can be initialized by execution of the chip erase command.
Read command prohibit Execution of a read command on all of the blocks is prohibited. Setting of the prohibition can be
initialized by execution of a chip erase command.
Boot area rewrite prohibit Execution of write, block erase, and chip erase commands on the boot area is prohibited. Setting
of the prohibition of rewriting the boot area cannot be initialized after it is once set.
Function Erase, Write, Read Operations When Each Security Is Set Notes on Security Setting
(√: Executable, ×: Not Executable, −: Not Supported)
On-Board/ Self Programming On-Board/ Self Programming
Off-Board Programming Off-Board
Programming
Block erase Block erase command: × Block erasure (FlashBlockErase): √ Setting of Supported only
command Chip erase command: √ Chip erasure: − prohibition can be when setting is
prohibit Program command: √ Write (FlashWordWrite): √ initialized by chip changed from
Read command: √ Read (FlashWordRead): √ erase command. enable to prohibit
Chip erase Block erase command: × Block erasure (FlashBlockErase): √ Setting of
command Chip erase command: × Chip erasure: − prohibition cannot
Program command: √ Write (FlashWordWrite): √
Note 1
prohibit be initialized.
Read command: √ Read (FlashWordRead): √
Program Block erase command: × Block erasure (FlashBlockErase): √ Setting of
command Chip erase command: √ Chip erasure: − prohibition can be
prohibit Program command: × Write (FlashWordWrite): √ initialized by chip
Read command: √ Read (FlashWordRead): √ erase command.
Read Block erase command: √ Block erasure (FlashBlockErase): √ Setting of
command Chip erase command: √ Chip erasure: − prohibition can be
prohibit Program command: √ Write (FlashWordWrite): √ initialized by chip
Read command: × Read (FlashWordRead): √ erase command.
Block erase command: × Block erasure (FlashBlockErase): ×
Note 2 Note 2
Boot area Setting of Supported only
rewrite Chip erase command: × Chip erasure: − prohibition cannot when setting is
Program command: × Write (FlashWordWrite): ×
Note 2 Note 2
prohibit be initialized. changed from
Read command: √ Read (FlashWordRead): √ enable to
Note 3
prohibit
Notes 1. In this case, since the erase command is invalid, data different from the data already written in the flash
memory cannot be written.
2. Executable except in boot area.
3. The boot area rewrite prohibit function becomes effective after the reset input.
The flash memory can be rewritten by using a dedicated flash programmer after the V850ES/JC3-H and V850ES/JE3-H
are mounted on the target system (on-board programming). The flash memory can also be rewritten before the device is
mounted on the target system (off-board programming) by using a dedicated program adapter (FA series).
FLMD0
FLMD1Note
RS-232C
VDD
USB
VSS
Dedicated flash RESET
programmer V850ES/JC3-H,
UARTC0/CSIF0/CSIF3
Host machine V850ES/JE3-H
Note Connect the FLMD1 pin to the flash programmer or connect to GND via a pull-down resistor on the board.
Remark The FA series is a product of Naito Densei Machida Mfg. Co., Ltd.
(1) UARTC0
Transfer rate: 9,600 to 153,600 bps
FLMD0 FLMD0
FLMD1 FLMD1Note
VDD VDD
GND VSS
RESET RESET
Dedicated flash
programmer RxD TXDC0 V850ES/JC3-H,
V850ES/JE3-H
TxD RXDC0
Note Connect the FLMD1 pin to the flash programmer or connect to GND via a pull-down resistor on the board.
FLMD0 FLMD0
FLMD1 FLMD1Note
VDD VDD
GND VSS
RESET RESET
Note Connect the FLMD1 pin to the flash programmer or connect to GND via a pull-down resistor on the board.
Figure 30-5. Communication with Dedicated Flash Programmer (CSIF0 + HS, CSIF3 + HS)
FLMD0 FLMD0
FLMD1 FLMD1Note
VDD VDD
GND VSS
RESET RESET
SI SOF0, SOF3
Dedicated flash
SO SIF0, SIF3 V850ES/JC3-H,
programmer
V850ES/JE3-H
SCK SCKF0, SCKF3
HS P913
Note Connect the FLMD1 pin to the flash programmer or connect to GND via a pull-down resistor on the board.
The dedicated flash programmer outputs the transfer clock, and the V850ES/JC3-H and V850ES/JE3-H operate as a
slave.
When the PG-FP5 is used as the dedicated flash programmer, it generates the following signals to the V850ES/JC3-H
and V850ES/JE3-H. For details, refer to the PG-FP5 User’s Manual (U18865E).
Notes 1. Wire these pins as shown in Figures 30-6 and 31-7, or connect then to GND via pull-down resistor on board.
2. Clock cannot be supplied via the CLK pin of the flash programmer. Create an oscillator on board and supply
the clock.
Table 30-6. Wiring of V850ES/JC3-H (40 pin) Flash Writing Adapters (1/2)
Table 30-6. Wiring of V850ES/JC3-H (40 pin) Flash Writing Adapters (2/2)
Figure 30-6. Wiring Example of V850ES/JC3-H (40 pin) Flash Writing Adapter (In CSIF0 + HS Mode) (1/2)
VD D
VD D
D
G
N
N
G
30 25 21
31 Note 2 20
Note 1 Note 4
35
V850ES/JC3-H
40 pin 15
40 11
Note 3
1 5 10
4.7 μ F
D
G
N
N
G
D
D
VD
VD
D
Figure 30-6. Wiring Example of V850ES/JC3-H (40 pin) Flash Writing Adapter (In CSIF0 + HS Mode) (2/2)
Example:
X1 X2
Remarks 1. Process the pins not shown in accordance with the handling of unused pins (see 2.3 Pin I/O
Circuit Types, I/O Buffer Power Supplies, and Connection of Unused Pins).
2. This adapter is for the 100-pin plastic LQFP package.
Table 30-7. Wiring of V850ES/JC3-H (48 pin) Flash Writing Adapters (1/2)
Table 30-7. Wiring of V850ES/JC3-H (48 pin) Flash Writing Adapters (2/2)
Figure 30-7. Wiring Example of V850ES/JC3-H (48 pin) Flash Writing Adapter (In CSIF0 + HS Mode) (1/2)
VD
VD D
D
G
N
ND
G
36 35 30 25
37 Note 2 24
Note 4
40
Note 1
20
V850ES/JC3-H
48 pin
45
48 Note 3 13
1 5 10 12
4.7 μ F
D
G
N
N
G
D
D
VD
VD
D
Figure 30-7. Wiring Example of V850ES/JC3-H (48 pin) Flash Writing Adapter (In CSIF0 + HS Mode) (2/2)
Example:
X1 X2
Remarks 1. Process the pins not shown in accordance with the handling of unused pins (see 2.3 Pin I/O
Circuit Types, I/O Buffer Power Supplies, and Connection of Unused Pins).
2. This adapter is for the 100-pin plastic LQFP package.
Figure 30-8. Wiring Example of V850ES/JE3-H Flash Writing Adapter (In CSIF0 + HS Mode) (1/2)
VD D
VD D
D
G
N
N
G
48 45 40 35 33
49 Note 2 32
50
30
Note 4
Note 1
55
V850ES/JE3-H
25
60
64 Note 3 17
1 5 10 15 16
4.7 μ F
D
G
N
N
G
D
D
VD
VD
D
Figure 30-8. Wiring Example of V850ES/JE3-H Flash Writing Adapter (In CSIF0 + HS Mode) (2/2)
Example:
X1 X2
Remarks 1. Process the pins not shown in accordance with the handling of unused pins (see 2.3 Pin I/O
Circuit Types, I/O Buffer Power Supplies, and Connection of Unused Pins).
2. This adapter is for the 128-pin plastic LQFP package.
Start
No
End?
Yes
End
VDD
VDD
VSS
VDD
RESET (input)
VSS
VDD
FLMD1 (input)
VSS
VDD
FLMD0 (input)
VSS
(Note)
VDD
RXDC0 (input)
VSS
VDD
TXDC0 (output)
VSS Oscillation Communication
stabilized mode selected
Caution When UARTC0 is selected, the receive clock is calculated based on the reset command sent
from the dedicated flash programmer after receiving the FLMD0 pulse.
Command
Response command
The following shows the commands for flash memory control in the V850ES/JC3-H and V850ES/JE3-H. All of these
commands are issued from the dedicated flash programmer, and the V850ES/JC3-H and V850ES/JE3-H perform the
processing corresponding to the commands.
Blank check Block blank check √ √ √ Checks if the contents of the memory in the
command specified block have been correctly erased.
Erase Chip erase command √ √ √ Erases the contents of the entire memory.
Block erase command √ √ √ Erases the contents of the memory of the
specified block.
Write Program command √ √ √ Writes the specified address range, and
executes a contents verify check.
Verify Verify command √ √ √ Compares the contents of memory in the
specified address range with data
transferred from the flash programmer.
Checksum command √ √ √ Reads the checksum in the specified
address range.
System setting, Silicon signature √ √ √ Reads silicon signature information.
control command
Security setting √ √ √ Prohibits the chip erase command, block
command erase command, program command, read
command, and boot area rewrite.
V850ES/JC3-H and
V850ES/JE3-H
V850ES/JC3-H and
V850ES/JE3-H
Caution If the VDD signal is input to the FLMD1 pin from another device during on-board writing and
immediately after reset, isolate this signal.
Table 30-10. Relationship Between FLMD0 and FLMD1 Pins and Operation Mode When Reset Is Released
When connecting a dedicated flash programmer to a serial interface pin that is connected to another device on-
board, care should be taken to avoid conflict of signals and malfunction of the other device.
V850ES/JC3-H and
V850ES/JE3-H
Output pin
In the flash memory programming mode, the signal that the dedicated flash
programmer sends out conflicts with signals another device outputs.
Therefore, isolate the signals on the other device side.
V850ES/JC3-H and
V850ES/JE3-H
Input pin
In the flash memory programming mode, if the signal that the V850ES/JC3-H
and V850ES/JE3-H output affects the other device, isolate the signal on the
other device side.
V850ES/JC3-H and
V850ES/JE3-H
Input pin
In the flash memory programming mode, if the signal that the dedicated flash
programmer outputs affects the other device, isolate the signal on the other
device side.
V850ES/JC3-H and
V850ES/JE3-H
Output pin
In the flash memory programming mode, the signal that the reset signal generator
outputs conflicts with the signal that the dedicated flash programmer outputs.
Therefore, isolate the signals on the reset signal generator side.
30.5.1 Overview
The V850ES/JC3-H and V850ES/JE3-H support a flash macro service that allows the user program to rewrite the
internal flash memory by itself. By using this interface and a self programming library that is used to rewrite the flash
memory with a user application program, the flash memory can be rewritten by a user application transferred in advance to
the internal RAM or external memory. Consequently, the user program can be upgraded and constant dataNote can be
rewritten in the field.
Note Be sure not to allocate the program code to the block where the constant data of rewriting target is allocated.
See 30.2 Memory Configuration for the block configuration.
Application program
Erase, write
Flash memory
30.5.2 Features
: : :
: : :
: : :
Write processing
End of processing
VDD
RESET signal
0V
Self programming mode
VDD
FLMD0 pin
0V
Normal Normal
operation mode operation mode
Caution Make sure that the FLMD0 pin is at 0 V when reset is released.
Stack area An extension of the stack used by the user is used by the library (can be used in both the
internal RAM and external RAM).
Note
Library code Program entity of library (can be used anywhere other than the flash memory block to be
manipulated).
Application program Executed as user application.
Calls flash functions.
Maskable interrupt Can be used in the user application execution status or self-programming status. To use
this interrupt in the self-programming status, since the processing transits to the address
of the internal RAM start address + 4 addresses, allocate the jump instruction that transits
the processing to the user interrupt servicing at the address of the internal RAM start
address + 4 addresses in advance.
NMI interrupt Can be used in the user application execution status or self-programming status. To use
this interrupt in the self-programming status, since the processing transits to the address
of the internal RAM start address, allocate the jump instruction that transits the
processing to the user interrupt servicing at the internal RAM start address in advance.
Note About resources used, refer to the Flash Memory Self-Programming Library User’s Manual.
30.6 Creating ROM code to place order for previously written product
Before placing an order with Renesas Electronics for a previously written product, the ROM code for the order must be
created.
To create the ROM code, use the Hex Consolidation Utility (hereafter abbreviated to HCU) on the finished programs
(hex files) and optional data (such as security settings for flash memory programs).
The HCU is a software tool that includes functions required for creating ROM code.
The HCU can be downloaded at the Renesas Electronics website.
(1) Website
http://www2.renesas.com/micro/en/ods/ → Click Version-up Service.
Remark For details about how to install and use the HCU, see the materials (the user’s manual) that comes with the
HCU at the above website.
The on-chip debug function of the V850ES/JC3-H and V850ES/JE3-H can be implemented by the following two
methods.
The following table shows the features of the two on-chip debug functions.
Debug interface pins DRST, DCK, DMS, DDI, DDO • When UARTC0 is used
RXDC0, TXDC0
• When CSIF0 is used
SIF0, SOF0, SCKF0, HS (P913)
• When CSIF3 is used
SIF3, SOF3, SCKF3, HS (P913)
Securement of user resources Not required Required
Hardware break function 2 points 2 points
Software break Internal ROM area 4 points 4 points
function Internal RAM area 2000 points 2000 points
Note 1
Real-time RAM monitor function Available Available
Dynamic memory modification (DMM) Available Available
Note 2
function
Mask function Reset, NMI, INTWDT2, HLDRQ, RESET pin
WAIT
ROM security function 10-byte ID code authentication 10-byte ID code authentication
Hardware used MINICUBE, etc. MINICUBE2, etc.
Trace function Not supported. Not supported.
Debug interrupt interface function Not supported. Not supported.
(DBINT)
Notes 1. This is a function which reads out memory contents during program execution.
2. This is a function which rewrites RAM contents during program execution.
Programs can be debugged using the debug interface pins (DRST, DCK, DMS, DDI, and DDO) to connect the on-chip
debug emulator (MINICUBE).
Figure 31-1. Circuit Connection Example When Debug Interface Pins Are Used for Communication Interface
VDD EVDD
Note 1
DCK DCK
DMS DMS
STATUS
TARGET
POWER
DDI DDI
DDO DDO
DRST DRSTNote 2
RESET RESET
FLMD0 FLMD0Note 3
FLMD1/PDL5
GND VSS
MINICUBE V850ES/JC3-H,
V850ES/JE3-H
(1) DRST
This is a reset input signal for the on-chip debug unit. It is a negative-logic signal that asynchronously initializes the
debug control unit.
MINICUBE raises the DRST signal when it detects VDD of the target system after the integrated debugger is started,
and starts the on-chip debug unit of the device.
When the DRST signal goes high, a reset signal is also generated in the CPU.
When starting debugging by starting the integrated debugger, a CPU reset is always generated.
(2) DCK
This is a clock input signal. It supplies a 20 MHz or 10 MHz clock from MINICUBE. In the on-chip debug unit, the
DMS and DDI signals are sampled at the rising edge of the DCK signal, and the data DDO is output at its falling
edge.
(3) DMS
This is a transfer mode select signal. The transfer status in the debug unit changes depending on the level of the
DMS signal.
(4) DDI
This is a data input signal. It is sampled in the on-chip debug unit at the rising edge of DCK.
(5) DDO
This is a data output signal. It is output from the on-chip debug unit at the falling edge of the DCK signal.
(6) EVDD
This signal is used to detect VDD of the target system. If VDD from the target system is not detected, the signals
output from MINICUBE (DRST, DCK, DMS, DDI, FLMD0, and RESET) go into a high-impedance state.
(7) FLMD0
The flash self programming function is used for the function to download data to the flash memory via the
integrated debugger. During flash self programming, the FLMD0 pin must be kept high. In addition, connect a pull-
down resistor to the FLMD0 pin.
The FLMD0 pin can be controlled in either of the following two ways.
(8) RESET
This is a system reset input pin. If the DRST pin is made invalid by the value of the OCDM0 bit of the OCDM
register set by the user program, on-chip debugging cannot be executed. Therefore, reset is effected by MINICUBE,
using the RESET pin, to make the DRST pin valid (initialization).
31.1.4 Register
< >
OCDM 0 0 0 0 0 0 0 OCDM0
Note RESET input sets this register to 01H. After reset by the WDT2RES signal, clock monitor (CLM), or low-
voltage detector (LVI), however, the value of the OCDM register is retained.
Cautions 1. When using the DDI, DDO, DCK, and DMS pins not as on-chip debug pins but as port pins
after external reset, any of the following actions must be taken.
2. The DRST pin has an on-chip pull-down resistor. This resistor is disconnected when the
OCDM0 flag is set to 0.
DRST
OCDM0 flag
(1: Pull-down ON, 0: Pull-down OFF)
10 to 100 kΩ
(30 kΩ (TYP.))
31.1.5 Operation
The on-chip debug function is made invalid under the conditions shown in the table below.
When this function is not used, keep the DRST pin low until the OCDM.OCDM0 flag is cleared to 0.
OCDM0 Flag 0 1
DRST Pin
L Invalid Invalid
H Invalid Valid
Releasing reset
RESET
OCDM0
P56/INTP05/DRST
31.1.6 Cautions
(1) If a reset signal is input (from the target system or a reset signal from an internal reset source) during RUN
(program execution), the break function may malfunction.
(2) Even if the reset signal is masked by the mask function, the I/O buffer (port pin) may be reset if a reset signal is
input from a pin.
(3) Pin reset during a break is masked and the CPU and peripheral I/O are not reset. If pin reset or internal reset is
generated as soon as the flash memory is rewritten by DMM or read by the RAM monitor function while the user
program is being executed, the CPU and peripheral I/O may not be correctly reset.
(4) In the on-chip debug mode, the DDO pin is forcibly set to the high-level output.
The following describes how to implement an on-chip debug function using MINICUBE2 with pins for UARTC0 (RXDC0
and TXDC0), pins for CSIF0 (SIF0, SOF0, SCKF0, and HS (P913)), or pins for CSIF3 (SIF3, SOF3, SCKF3, and HS
(P913)) as debug interfaces, without using the DCU.
Figure 31-3. Circuit Connection Example When UARTC0/CSIF0/CSIF3 Is Used for Communication Interface
1 to 10 kΩ 3 to 10 kΩ
GND VSS
RESET_OUT RESET
RXD/SINote 1 TXDC0/SOF0/SOF3
VDD VDD
TXD/SONote 1 RXDC0/SIF0/SIF3
SCK SCKF0/SCKF3
HS HS (P913)
M
IN
IC
CLKNote 2
U
B
E
2
1 to 10 kΩ 1 to 10 kΩ
FLMD1Note 3 FLMD1
FLMD0Note 3 FLMD0
1 to 10 kΩ 10 kΩ 100 Ω Note 5
RESET_INNote 4 Port X
VDD
QB-MINI2 V850ES/JC3-H, V850ES/JE3-H
10 kΩ 1 kΩ
RESET signal
Reset circuit
Remark Refer to Table 31-3 for pins used when UARTC0, CSIF0, or CSIF3 is used for communication interface.
Pin Configuration of MINICUBE2 (QB-MINI2) With CSIF0-HS With CSIF3-HS With UARTC0
Signal Name I/O Pin Function Pin Name Pin Pin Name Pin Pin Name Pin
No. No. No.
SI/RxD Input Pin to receive commands and data from P41/SOF0 21 P911/SOF3 33 P30/TXDC0 17
V850ES/JC3-H
SO/TxD Output Pin to transmit commands and data to P40/SIF0 20 P910/SIF3 32 P31/RXDC0 18
V850ES/JC3-H
SCK Output Clock output pin for 3-wire serial P42/SCKF0 22 P912/SCKF3 34 Not needed −
communication
− − −
Note
CLK Output Clock output pin to V850ES/JC3-H Not Not Not
Note Note Note
needed needed needed
RESET_OUT Output Reset output pin to V850ES/JC3-H RESET 8 RESET 8 RESET 8
FLMD0 Output Output pin to set V850ES/JC3-H to FLMD0 28 FLMD0 28 FLMD0 28
debug mode or programming mode
FLMD1 Output Output pin to set programming mode PDL5/FLMD1 31 PDL5/FLMD1 31 PDL5/FLMD1 31
HS Input Handshake signal for CSI0 + HS P913 35 P913 35 Not needed −
communication
GND − Ground VSS 5 VSS 5 VSS 5
AVSS 2 AVSS 2 AVSS 2
RESET_IN Input Reset input pin on the target system
Note It is used as the clock output of the flash programmer for MINICUBE2. For details, refer to CHAPTER 30 FLASH
MEMORY.
Pin Configuration of MINICUBE2 (QB-MINI2) With CSIF0-HS With CSIF3-HS With UARTC0
Signal Name I/O Pin Function Pin Name Pin Pin Name Pin Pin Name Pin
No. No. No.
SI/RxD Input Pin to receive commands and data from P41/SOF0 25 P911/SOF3 40 P30/TXDC0 21
V850ES/JC3-H
SO/TxD Output Pin to transmit commands and data to P40/SIF0 24 P910/SIF3 39 P31/RXDC0 22
V850ES/JC3-H
SCK Output Clock output pin for 3-wire serial P42/SCKF0 26 P912/SCKF3 41 Not needed −
communication
− − −
Note
CLK Output Clock output pin to V850ES/JC3-H Not Not Not
Note Note Note
needed needed needed
RESET_OUT Output Reset output pin to V850ES/JC3-H RESET 10 RESET 10 RESET 10
FLMD0 Output Output pin to set V850ES/JC3-H to FLMD0 32 FLMD0 32 FLMD0 32
debug mode or programming mode
FLMD1 Output Output pin to set programming mode PDL5/FLMD1 37 PDL5/FLMD1 37 PDL5/FLMD1 37
HS Input Handshake signal for CSI0 + HS P913 42 P913 42 Not needed −
communication
GND − Ground VSS 7 VSS 7 VSS 7
AVSS 2 AVSS 2 AVSS 2
RESET_IN Input Reset input pin on the target system
Note It is used as the clock output of the flash programmer for MINICUBE2. For details, refer to CHAPTER 30 FLASH
MEMORY.
Pin Configuration of MINICUBE2 (QB-MINI2) With CSIF0-HS With CSIF3-HS With UARTC0
Signal Name I/O Pin Function Pin Name Pin Pin Name Pin Pin Name Pin
No. No. No.
SI/RXD Input Pin to receive commands and data from P41/SOF0 33 P911/SOF3 52 P30/TXDC0 29
V850ES/JE3-H
SO/TXD Output Pin to transmit commands and data to P40/SIF0 32 P910/SIF3 51 P31/RXDC0 30
V850ES/JE3-H
SCK Output Clock output pin for 3-wire serial P42/SCKF0 34 P912/SCKF3 53 Not needed −
communication
− − −
Note
CLK Output Clock output pin to V850ES/JE3-H Not Not Not
Note Note Note
needed needed needed
RESET_OUT Output Reset output pin to V850ES/JE3-H RESET 10 RESET 10 RESET 10
FLMD0 Output Output pin to set V850ES/JE3-H to FLMD0 42 FLMD0 42 FLMD0 42
debug mode or programming mode
FLMD1 Output Output pin to set programming mode PDL5/FLMD1 49 PDL5/FLMD1 49 PDL5/FLMD1 49
HS Input Handshake signal for CSI0 + HS P913 54 P913 54 Not needed −
communication
GND − Ground VSS 7 VSS 7 VSS 7
AVSS 2 AVSS 2 AVSS 2
RESET_IN Input Reset input pin on the target system
Note It is used as the clock output of the flash programmer for MINICUBE2. For details, refer to CHAPTER 30 FLASH
MEMORY.
NMI −
STOP −
HOLD −
RESET Reset signal generation by RESET pin input
WAIT −
Figure 31-4. Memory Spaces Where Debug Monitor Programs Are Allocated
3FFEFFFH
(16 bytes)
3FFEFF0H
Note 1 (2 KB)
Internal RAM
area
Note 3
Security ID area
(10 bytes)
0000070H
2. This is the address when CSIF0 is used. It starts at 0000406H when CSIF3 is used, and at
00004A0H when UARTC0 is used.
3. Address values vary depending on the product.
(a) When two nop instructions are placed in succession from address 0
Before rewriting After rewriting
0x0 nop → Jumps to debug monitor program at 0x0
0x2 nop 0x4 xxxx
0x4 xxxx
(b) When two 0xFFFF are successively placed from address 0 (already erased device)
Before rewriting After rewriting
0x0 0xFFFF → Jumps to debug monitor program at 0x0
0x2 0xFFFF 0x4 xxxx
0x4 xxxx
(d) mov32 and jmp are placed in succession from address 0 (when using IAR compiler ICCV850)
Before rewriting After rewriting
0x0 mov imm32,reg1 → Jumps to debug monitor program at 0x0
0x6 jmp [reg1] 0x4 mov imm32,reg1
0xa jmp [reg1]
(e) The jump instruction for the debug monitor program is placed at address 0
Before rewriting After rewriting
Jumps to debug monitor program at 0x0 → No change
• Link directive (Add the following code to the link directive file.)
The following shows an example when the internal ROM has 512 KB (end address is 007FFFFH) and internal
RAM has 56 KB (end address is 3FFEFFFH).
7 6 5 4 3 2 1 0
PFC3 × × × × × × 0 0
7 6 5 4 3 2 1 0
PFCE3 × × × × × × 0 0
7 6 5 4 3 2 1 0
PMC3 × × × × × × 1 1
7 6 5 4 3 2 1 0
PFC4 × × × × × 0 0 0
7 6 5 4 3 2 1 0
PFCE4 × × × × × × 0 0
15 14 13 12 11 10 9 8
P9H × × Note × × × × ×
15 14 13 12 11 10 9 8
PFC9H × × × 0 Note1
0 0 × ×
15 14 13 12 11 10 9 8
PFCE9H × × × × 0 0 × ×
15 14 13 12 11 10 9 8
P9H × × Note2 × × × × ×
31.2.4 Cautions
(3) When pseudo real-time RAM monitor (RRM) function and DMM function do not operate
The pseudo RRM function and DMM function do not operate if one of the following conditions is satisfied.
• Interrupts are disabled (DI)
• Interrupts issued for the serial interface, which is used for communication between MINICUBE2 and the target
device, are masked
• Standby mode is entered while standby release by a maskable interrupt is prohibited
• Mode for communication between MINICUBE2 and the target device is UARTC0, and the main clock has been
stopped
• Mode for communication between MINICUBE2 and the target device is UARTC0, and a clock different from the
one specified in the debugger is used for communication
(4) Standby release with pseudo RRM and DMM functions enabled
The standby mode is released by the pseudo RRM function and DMM function if one of the following conditions is
satisfied.
• Mode for communication between MINICUBE2 and the target device is CSIF0 or CSIF3
• Mode for communication between MINICUBE2 and the target device is UARTC0, and the main clock has been
supplied.
(5) Rewriting to peripheral I/O registers that requires a specific sequence, using DMM function
Peripheral I/O registers that requires a specific sequence cannot be rewritten with the DMM function.
31.3.1 Security ID
The flash memory versions of the V850ES/JC3-H and V850ES/JE3-H perform authentication using a 10-byte ID code to
prevent the contents of the flash memory from being read by an unauthorized person during on-chip debugging by the on-
chip debug emulator.
Set the ID code in the 10-byte on-chip flash memory area from 0000070H to 0000079H to allow the debugger perform
ID authentication.
If the IDs match, the security is released and reading flash memory and using the on-chip debug emulator are enabled.
0000079H
Security ID
(10 bytes)
0000070H
0000000H
Caution After the flash memory is erased, 1 is written to the entire area.
31.3.2 Setting
The following shows how to set the ID code as shown in Table 31-6.
When the ID code is set as shown in Table 31-6, the ID code input in the configuration dialog box of the ID850QB is
“123456789ABCDEF123D4” (the ID code is case-insensitive).
Address Value
0x70 0x12
0x71 0x34
0x72 0x56
0x73 0x78
0x74 0x9A
0x75 0xBC
0x76 0xDE
0x77 0XF1
0x78 0x23
0x79 0xD4
The ID code can be specified for the device file that supports CA850 Ver. 3.10 or later and the security ID using the
PM+ compiler common option setting.
#--------------------------------------
# SECURITYID
#--------------------------------------
.section "SECURITY_ID" --Interrupt handler address 0x70
.word 0x78563412 --0-3 byte code
.word 0xF1DEBC9A --4-7 byte code
.hword 0xD423 --8-9 byte code
Supply voltage VDD VDD = EVDD = UVDD = AVREF0 = AVREF1 −0.5 to +4.6 V
EVDD VDD = EVDD = UVDD = AVREF0 = AVREF1 −0.5 to +4.6 V
UVDD VDD = EVDD = UVDD = AVREF0 = AVREF1 −0.5 to +4.6 V
AVREF0 VDD = EVDD = UVDD = AVREF0 = AVREF1 −0.5 to +4.6 V
AVREF1 VDD = EVDD = UVDD = AVREF0 = AVREF1 −0.5 to +4.6 V
VSS VSS = AVSS −0.5 to +0.5 V
AVSS VSS = AVSS −0.5 to +0.5 V
−0.5 to EVDD + 0.5
Note 1
Input voltage VI1 P60 to P65, P92 to P94, P96, P97, P910 to P913, PDL5, V
RESET, FLMD0
−0.5 to UVDD + 0.5
Note 1
VI2 UDMF, UDPF V
−0.5 to AVREF1 + 0.5
Note 1
VI3 P10 V
−0.5 to VRO
Note 2 Note
VI4 X1, X2, XT1, XT2 + 0.5 V
1
VI5 P02, P03, P30 to P37, P40 to P42, P52 to P56 −0.5 to +6.0 V
−0.5 to AVREF0 + 0.5
Note 1
Analog input voltage VIAN P70 to P79 V
Cautions 1. Do not directly connect the output (or I/O) pins of IC products to each other, or to VDD, VCC, and GND.
Open-drain pins or open-collector pins, however, can be directly connected to each other. Direct
connection of the output pins between an IC product and an external circuit is possible, if the output
pins can be set to the high-impedance state and the output timing of the external circuit is designed
to avoid output conflict.
2. Product quality may suffer if the absolute maximum rating is exceeded even momentarily for any
parameter. That is, the absolute maximum ratings are rated values at which the product is on the
verge of suffering physical damage. Therefore the product must be used under conditions that
ensure that the absolute maximum ratings are not exceeded.
The ratings and conditions indicated for DC characteristics and AC characteristics represent the
quality assurance range during normal operation.
Notes 1. Be sure not to exceed the absolute maximum ratings (MAX. value) of each supply voltage.
2. On-chip regulator output voltage (2.5 V (TYP.))
Remark Unless specified otherwise, the characteristics of alternate-function pins are the same as those of port pins.
Cautions 1. Do not directly connect the output (or I/O) pins of IC products to each other, or to VDD, VCC, and GND.
Open-drain pins or open-collector pins, however, can be directly connected to each other. Direct
connection of the output pins between an IC product and an external circuit is possible, if the output
pins can be set to the high-impedance state and the output timing of the external circuit is designed
to avoid output conflict.
2. Product quality may suffer if the absolute maximum rating is exceeded even momentarily for any
parameter. That is, the absolute maximum ratings are rated values at which the product is on the
verge of suffering physical damage. Therefore the product must be used under conditions that
ensure that the absolute maximum ratings are not exceeded.
The ratings and conditions indicated for DC characteristics and AC characteristics represent the
quality assurance range during normal operation.
Remark Unless specified otherwise, the characteristics of alternate-function pins are the same as those of port pins.
32.2 Capacitance
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Internal System Clock Frequency Conditions Supply voltage Unit
VDD EVDD UVDD AVREF0,
AVREF1
fXX = 3 to 6 MHz (during clock- C = 4.7 μF, 2.85 to 3.6 2.85 to 3.6 2.85 to 3.6 2.85 to 3.6 V
through operation) A/D converter stopped,
fXX = 24 to 48 MHz (during PLL D/A converter stopped,
operation) USB stopped
C = 4.7 μF, 3.0 to 3.6 3.0 to 3.6 3.0 to 3.6 3.0 to 3.6 V
A/D converter operating,
D/A converter operating,
USB operating
fXT = 32.768 kHz C = 4.7 μF, 2.85 to 3.6 2.85 to 3.6 2.85 to 3.6 2.85 to 3.6 V
Note
Note When the system is operating on the subclock (fXT = 32.768 kHz), the A/D converter, D/A converter, and USB
controller do not operate.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Resonator Circuit Example Parameter Conditions MIN. TYP. MAX. Unit
Ceramic X1 X2 Oscillation frequency 3 6 MHz
Note 1
resonator/ (fX)
crystal Oscillation After reset is released
16
2 /fX s
resonator stabilization time
Note 2
After STOP mode is Note 3 ms
released
After IDLE2 mode is Note 3 μs
released
Notes 1. The oscillation frequency shown above indicates only oscillator characteristics. Use the V850ES/JC3-H and
V850ES/JE3-H so that the internal operation conditions do not exceed the ratings shown in AC
Characteristics and DC Characteristics.
2. Time required from start of oscillation until the resonator stabilizes.
3. The value varies depending on the setting of the OSTS register.
Cautions 1. When using the USB controller, be sure to use a ceramic resonator or crystal resonator with an
accuracy of 6 MHz ±500 ppm or less when using the internal clock as the USB clock.
When using the external clock input by the UCLK pin, be sure to supply a clock with an accuracy of
48 MHz ±500 ppm or less.
If the USB clock accuracy drops, the transmission/reception data cannot satisfy the USB
specification.
2. When using the main clock oscillator, wire as follows in the area enclosed by the broken lines in the
above figure to avoid an adverse effect from wiring capacitance.
3. When the main clock is stopped and the device is operating on the subclock, wait until the
oscillation stabilization time has been secured by the program before switching back to the main
clock.
C1 C2
CX49GFWB05000D0PPTZ1 5.000 10 10 1000 2.85 3.6 13.98
CX49GFWB06000D0PPTZ1 6.000 10 10 1000 2.85 3.6 12.8
Caution This oscillator constant is a reference value based on evaluation under a specific environment by the
resonator manufacturer.
If optimization of oscillator characteristics is necessary in the actual application, apply to the
resonator manufacturer for evaluation on the implementation circuit.
The oscillation voltage and oscillation frequency indicate only oscillator characteristics. Use the
V850ES/Jx3-H so that the internal operating conditions are within the specifications of the DC and
AC characteristics.
Caution This oscillator constant is a reference value based on evaluation under a specific environment by the
resonator manufacturer.
If optimization of oscillator characteristics is necessary in the actual application, apply to the
resonator manufacturer for evaluation on the implementation circuit.
The oscillation voltage and oscillation frequency indicate only oscillator characteristics. Use the
V850ES/Jx3-H so that the internal operating conditions are within the specifications of the DC and
AC characteristics.
C1 C2
CSTCR5M00GH5L99 5.000 (39) (39) 1000 2.85 3.6 0.01
CSTCR6M00GH5L99 6.000 (39) (39) 680 2.85 3.6 0.01
Caution This oscillator constant is a reference value based on evaluation under a specific environment by the
resonator manufacturer.
If optimization of oscillator characteristics is necessary in the actual application, apply to the
resonator manufacturer for evaluation on the implementation circuit.
The oscillation voltage and oscillation frequency indicate only oscillator characteristics. Use the
V850ES/Jx3-H so that the internal operating conditions are within the specifications of the DC and
AC characteristics.
Remark Figures in parentheses in columns C1 and C2 indicate the capacitance incorporated in the resonator.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Resonator Circuit Example Parameter Conditions MIN. TYP. MAX. Unit
Oscillation 10 s
Note 2
stabilization time
Notes 1. The oscillation frequency shown above indicates only oscillator characteristics. Use the V850ES/JC3-H and
V850ES/JE3-H so that the internal operation conditions do not exceed the ratings shown in AC
Characteristics and DC Characteristics.
2. Time required from when VDD reaches the oscillation voltage range (2.85 V (MIN.)) to when the crystal
resonator stabilizes.
Cautions 1. When using the subclock oscillator, wire as follows in the area enclosed by the broken lines in the
above figure to avoid an adverse effect from wiring capacitance.
2. The subclock oscillator is designed as a low-amplitude circuit for reducing power consumption, and
is more prone to malfunction due to noise than the main clock oscillator. Particular care is therefore
required with the wiring method when the subclock is used.
3. For the resonator selection and oscillator constant, customers are requested to either evaluate the
oscillation themselves or apply to the resonator manufacturer for evaluation.
Rd
C1 C2
Caution This oscillator constant is a reference value based on evaluation under a specific environment by the
resonator manufacturer.
If optimization of oscillator characteristics is necessary in the actual application, apply to the
resonator manufacturer for evaluation on the implementation circuit.
The oscillation voltage and oscillation frequency indicate only oscillator characteristics. Use the
V850ES/Jx3-H so that the internal operating conditions are within the specifications of the DC and
AC characteristics.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Input frequency fX 3 6 MHz
Output frequency fXX Clock-through mode 3 6 MHz
PLL mode (×8) 24 48 MHz
Lock time tPLL 800 μs
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Output frequency fR 100 220 400 kHz
32.5 DC Characteristics
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Input voltage, high VIH1 RESET, FLMD0, P60 to P65, P92 to P94, 0.8EVDD EVDD V
P96, P97, P910 to P913
VIH2 P02, P03, P30 to P35, P42, P52 to P56 0.8EVDD 5.5 V
VIH3 P36, P37, P40, P41 0.7EVDD 5.5 V
VIH4 PDL5 0.7EVDD EVDD V
VIH5 UDPF, UDMF 2.0 UVDD V
VIH6 P70 to P79 0.7AVREF0 AVREF0 V
VIH7 P10 0.7AVREF1 AVREF1 V
Input voltage, low VIL1 RESET, FLMD0, P60 to P65, P92 to P94, VSS 0.2EVDD V
P96, P97, P910 to P913
VIL2 P02, P03, P30 to P35, P42, P52 to P56 VSS 0.2EVDD V
VIL3 P36, P37, P40, P41 VSS 0.3EVDD V
VIL4 PDL5 VSS 0.3EVDD V
VIL5 UDPF, UDMF VSS 0.8 V
VIL6 P70 to P79 AVSS 0.3AVREF0 V
VIL7 P10 AVSS 0.3AVREF1 V
Input leakage current, high ILIH VI = VDD = EVDD = UVDD = AVREF0 = AVREF1 5 μA
Input leakage current, low ILIL VI = 0 V −5 μA
Output leakage current, high ILOH VO = VDD = EVDD = UVDD = AVREF0 = 5 μA
AVREF1
Output leakage current, low ILOL VO = 0 V −5 μA
Remark Unless specified otherwise, the characteristics of alternate-function pins are the same as those of port pins.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Output voltage, high VOH1 Note 1 Per pin EVDD − 1.0 EVDD V
IOH = −1.0 mA
Per pin EVDD − 0.5 EVDD V
IOH = −100 μA
VOH2 P70 to P79 Per pin AVREF0 − 1.0 AVREF0 V
IOH = −0.4 mA
Per pin AVREF0 − 0.5 AVREF0 V
IOH = −100 μA
VOH3 P10 Per pin AVREF1 − 1.0 AVREF1 V
IOH = −0.4 mA
Per pin AVREF1 − 0.5 AVREF1 V
IOH = −100 μA
VOH4 UDPF, UDMF RL = 15 kΩ 2.8 V
(Connect to UVDD)
Output voltage, low VOL1 Note 2 Per pin 0 0.4 V
IOL = 0.4 mA
VOL2 P36, P37, P40, Per pin 0 0.4 V
P41 IOL = 3.0 mA
VOL3 P70 to P79 Per pin 0 0.4 V
IOL = 0.4 mA
VOL4 P10 Per pin 0 0.4 V
IOL = 0.4 mA
VOL5 UDPF, UDMF RL = 1.5 kΩ 0 0.3 V
(Connect to VSS)
Software pull-down resistor R1 P56 VI = VDD 10 30 100 kΩ
Notes 1. P02, P03, P30 to P37, P40 to P42, P52 to P56, P60 to P65, P92 to P94, P96, P97, P910 to P913, PDL5
2. P02, P03, P30 to P35, P42, P52 to P56, P60 to P65, P92 to P94, P96, P97, P910 to P913, PDL5
Remarks 1. Unless specified otherwise, the characteristics of alternate-function pins are the same as those of port pins.
2. When the IOH and IOL conditions are not satisfied for one pin but the total value of all pins is satisfied, only
that pin is deemed to not satisfy the DC characteristics.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Notes 1, 2
Supply current IDD1 Normal fXX = 48 MHz (fX = 6 MHz) 60 mA
operation Peripheral function operating
<R> fXX = 48 MHz (fX = 6 MHz) 42 mA
USBF operating
Subclock operating, 13 95 μA
internal oscillator stopped
Notes 1. Total of VDD, EVDD, and UVDD currents. Currents flowing through the output buffers, A/D converter, D/A
converter, and on-chip pull-down resistor are not included.
2. The VDD of the TYP. value is 3.3 V.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Data retention voltage VDDDR STOP mode (all functions 1.9 3.6 V
stopped)
Data retention current IDDDR STOP mode (all functions 10 90 μA
stopped), VDDDR = 2.0 V
Supply voltage rise time tRVD 200 μs
Supply voltage fall time tFVD 200 μs
Supply voltage retention time tHVD After STOP mode setting 0 ms
STOP release signal input time tDREL After VDD reaches 2.85 V (MIN.) 0 ms
Data retention input voltage, high VIHDR VDD = EVDD = UVDD = VDDDR 0.9VDDDR VDDDR V
Data retention input voltage, low VILDR VDD = EVDD = UVDD = VDDDR 0 0.1VDDDR V
Caution Shifting to STOP mode and restoring from STOP mode must be performed within the rated operating
range.
VIHDR
RESET (input)
32.7 AC Characteristics
VDD
VIH VIH
Measurement points
VIL VIL
0V
VOH VOH
Measurement points
VOL VOL
DUT
(Device under
measurement) CL = 50 pF
Caution If the load capacitance exceeds 50 pF due to the circuit configuration, bring the load
capacitance of the device to 50 pF or less by inserting a buffer or by some other means.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
VDD
<1> <6>
EVDD, UVDD
<2> <7>
AVREF0, AVREF1
<3> <4> <5>
RESET (input)
VI VI VI VI
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
Remark TSMP: Set by the noise elimination control register (INTNFC). Selectable from fXX/64, fXX/128, fXX/256, fXX/512,
and fXX/1024.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
Remark n = 2 to 5
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
TI high-level width tTIH TAB10 to TAB13, EVTAB1, TRGAB1 12T + 20 ns
TIAA00, TIAA01, TIAA10, TIAA11, 3TSMP1 + 20 ns
TIAA20, TIAA21
TI low-level width tTIL TAB10 to TAB13, EVTAB1, TRGAB1 12T + 20 ns
TIAA00, TIAA01, TIAA10, TIAA11, 3TSMP1 + 20 ns
TIAA20, TIAA21
TENCn high-level width tWENCHn n = 0, 1 3TSMP2 + 20 ns
TENCn low-level width tWENCLn n = 0, 1 3TSMP2 + 20 ns
TECR0 high-level width tWCRH0 3TSMP2 + 20 ns
TECR0 low-level width tWCRL0 3TSMP2 + 20 ns
TITn high-level width tWTITHn n = 0, 1 3TSMP2 + 20 ns
TITn low-level width tWTITLn n = 0, 1 3TSMP2 + 20 ns
EVTT0 high-level width tWTITH0 3TSMP2 + 20 ns
EVTT0 low-level width tWTITL0 3TSMP2 + 20 ns
TENCn input time difference tPHUD n = 0, 1 3TSMP2 + 20 ns
Remarks 1. T = 1/fXX
2. TSMP1: Set by the noise elimination control register (TANFC). Selectable from fXX and fXX/4.
3. TSMP2: Set by the noise elimination control register (TTNFC). Selectable from fXX/4, fXX/8, fXX/16, fXX/32, and
fXX/64.
4. The specifications above show the pulse widths that can be accurately detected as valid edges. Therefore,
even if a pulse width less than the above specifications is input, it may be detected as a valid edge.
<tWTIHn>/<tWTITHn> <tWTILn>/<tWTITLn>
TIn (input)
<tWUDH00> <tWUDL00>
TENC00 (input)
<tPHUD>
<tWUDH01> <tWUDL01>
TENC01 (input)
<tWTCH0> <tWTCL0>
TECR0 (input)
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
Transmit rate 3.0 Mbps
ASCK0 cycle time 10 MHz
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
SCKFn cycle time tKCY1 <8> 125 ns
SCKFn high-level width tKH1 <9> tKCY1/2 − 8 ns
SCKFn low-level width tKL1 tKCY1/2 − 8 ns
SIFn setup time (to SCKFn↑) tSIK1 <10> 27 ns
SIFn setup time (to SCKFn↓) 27 ns
SIFn hold time (from SCKFn↑) tKSI1 <11> 27 ns
SIFn hold time (from SCKFn↓) 27 ns
SOFn output delay time (from SCKFn↑) tKSO1 <12> 27 ns
SOFn output delay time (from SCKFn↓) 27 ns
SOFn output hold time (from SCKFn↑) tHSO1 <13> tKCY1/2 − 10 ns
SOFn output hold time (from SCKFn↓) tKCY1/2 − 10 ns
Remark n = 0, 2, 4
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
SCKF3 cycle time tKCYM <8> 83.3 ns
SCKF3 high-level width tKHM <9> tKCYM/2 − 8 ns
SCKF3 low-level width tKCYM/2 − 8 ns
SIF3 setup time (to SCKF3↑) tSIKM <10> 16 ns
SIF3 setup time (to SCKF3↓) 16 ns
SIF3 hold time (from SCKF3↑) tKSIM <11> 16 ns
SIF3 hold time (from SCKF3↓) 16 ns
SOF3 output delay time (from SCKF3↑) tKSOM <12> 16 ns
SOF3 output delay time (from SCKF3↓) 16 ns
SOF3 output hold time (from SCKF3↑) tHSOM <13> tKCYM/2 − 10 ns
SOF3 output hold time (from SCKF3↓) tKCYM/2 − 10 ns
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
SCKFn cycle time tKCY2 <8> 125 ns
SCKFn high-level width tKH2 <9> tKCYn/2 − 8 ns
SCKFn low-level width tKL2 tKCYn/2 − 8 ns
SIFn setup time (to SCKFn↑) tSIK2 <10> 27 ns
SIFn setup time (from SCKFn↓) 27 ns
SIFn hold time (to SCKFn↑) tKSI2 <11> 27 ns
SIFn hold time (from SCKFn↓) 27 ns
SOFn output delay time (to SCKFn↑) tKSO2 <12> 27 ns
SOFn output delay time (from SCKFn↓) 27 ns
SOFn output delay time (to SCKFn↑) tHSO2 <13> tKCYn/2 − 10 ns
SOFn output delay time (from SCKFn↓) tKCYn/2 − 10 ns
Remark1. n = 0, 2 to 4
<8>
<9> <9>
SCKFn (I/O)
<13>
<10> <11>
<12>
<8>
<9> <9>
SCKFn (I/O)
<13>
<10> <11>
<12>
Remark n = 0, 2 to 4
2
(7) I C bus mode
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V)
Parameter Symbol Normal Mode High-Speed Mode Unit
MIN. MAX. MIN. MAX.
Notes 1. When the start condition is satisfied, the first clock pulse is generated after the hold time.
2. The system requires a minimum of 300 ns hold time internally for the SDA0n signal (at VIHmin. of the SCL0n
signal) in order to occupy the undefined area at the falling edge of SCL0n.
3. If the system does not extend the SCL0n signal low hold time (tLOW), only the maximum data hold time (tHD:DAT)
needs to be satisfied.
4. The high-speed mode I2C bus can be used in a normal-mode I2C bus system. In this case, set the high-speed
mode I2C bus so that it meets the following conditions.
• If the system does not extend the SCL0n signal low hold time:
tSU:DAT ≥ 250 ns
• If the system extends the SCL0n signal low hold time:
Output the next data bit to the SDA0n line before the SCL0n line is released (tRmax. + tSU:DAT = 1,000
+ 250 = 1,250 ns: Normal mode I2C bus specification).
5. Cb: Total capacitance of one bus line (unit: pF)
Remark n = 0, 1
<16> <17>
SCL0n (I/O)
<18>
<22> <21> <19> <20> <23>
<15> <24>
<15>
SDA0n (I/O)
<14>
<21> <22>
Remark n = 0, 1
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
Transmit rate 1 Mbps
CTXD0 pin
(transmit data)
tINTPUT
CRXD0 pin
(receive data)
Internal delay time (tNODE) = Internal transmission delay time (tOUTPUT) + Internal reception delay time (tINPUT)
V850ES/JC3-H, V850ES/JE3-H
Internal transmission
CTXD0 pin
delay time
(tOUTPUT)
CAN controller
Internal reception
delay time
(tINPUT) CRXD0 pin
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. MAX. Unit
Time from oscillator stop to timer output high impedance tCLM Clock monitor 65 μs
operating
Time from TOAB1OFF input → timer output high impedance tHTQn 300 ns
Time from TOAA1OFF input → timer output high impedance tHTP2 300 ns
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, 3.0 V ≤ AVREF0 ≤ 3.6 V, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Resolution 10 bit
3.0 ≤ AVREF0 ≤ 3.6 V ±0.6
Note
Overall error %FSR
Conversion time tCONV 2.17 24 μs
Zero scale error ±0.5 %FSR
Full scale error ±0.5 %FSR
Non-linearity error ±4.0 LSB
Differential linearity error ±4.0 LSB
Analog input voltage VIAN AVSS AVREF0 V
Reference voltage AVREF0 3.0 3.6 V
AVREF0 current AIREF0 Normal conversion mode 3 6.5 mA
High-speed conversion mode 4 10 mA
When A/D converter unused 5 μA
Caution Do not set (read/write) alternate-function ports during A/D conversion; otherwise the conversion
resolution may be degraded.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, 3.0 V ≤ AVREF1 ≤ 3.6 V, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Resolution 8 bit
±1.2
Note 1
Overall error R = 2 MΩ %FSR
Settling time C = 20 pF 3 μs
Output resistor RO Output data 55H 6.42 kΩ
Reference voltage AVREF1 3.0 3.6 V
Note 2
AVREF1 current AIREF1 D/A conversion operating 1 2.5 mA
D/A conversion stopped 5 μA
Notes 1. Excluding quantization error (±0.5 %LSB).
2. Value of 1 channel of D/A converter
Remark R is the output pin load resistance and C is the output pin load capacitance.
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Detection voltage VLVI0 2.85 2.95 3.05 V
Note
Response time tLD After VDD reaches VLVI0 (MAX.), or after 0.2 2.0 ms
VDD has dropped to VLVI0 (MAX.)
Minimum pulse width tLW 0.2 ms
Reference voltage tLWAIT After VDD reaches 2.85 V(MIN.) 0.1 0.2 ms
stabilization wait time
Note Time required to detect the detection voltage and output an interrupt or reset signal.
Supply voltage
(VDD)
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
Parameter Symbol Conditions MIN. TYP. MAX. Unit
Detection voltage VRAMH 1.9 2.0 2.1 V
Supply voltage rise time tRAMHTH VDD = 0 to 2.85 V 0.002 ms
Note
Response time tRAMHD After VDD reaches 2.1 V 0.2 3.0 ms
Minimum pulse width tRAMHW 0.2 ms
Note Time required to detect the detection voltage and set the RAMS.RAMF bit.
Supply voltage
(VDD)
Time
RAMS.RAMF bit
Cleared by instruction
(TA = −40 to +85°C, VDD = EVDD = UVDD = AVREF0 = AVREF1, VSS = AVSS = 0 V, CL = 50 pF)
VDD
RESET (input)
0V tCH
VDD
FLMD0
0V tMDSET tRFCF
tF tR
tCL
VDD
FLMD1
0V
±
±
D
detail of lead end
36 A3
25
c
37 24
θ L
Lp
E HE L1
(UNIT:mm)
ITEM DIMENSIONS
D 7.00±0.20
13 E 7.00±0.20
48
HD 9.00±0.20
1 12 HE 9.00±0.20
A 1.60 MAX.
ZE A1 0.10±0.05
A2 1.40±0.05
A3 0.25
ZD e +0.07
A b 0.20 −0.03
b x M S A2 c 0.125 +0.075
−0.025
L 0.50
Lp 0.60±0.15
L1 1.00±0.20
S θ 3° +5°
−3°
e 0.50
x 0.08
y S A1
y 0.08
ZD 0.75
ZE 0.75
NOTE
P48GA-50-GAM
Each lead centerline is located within 0.08 mm of
its true position at maximum material condition.
DETAIL OF A PART
E
A
S
A1 c
y S
D2
A
1 12 (UNIT:mm )
13 ITEM DIMENSIONS
48
D 7.00 ± 0.05
E 7.00 ± 0.05
B D2 5.50
E2 5.50
E2
A 0.75 ± 0.05
A1 0.00 to 0.02
+
b 0.25 0.05
0.07
37 24 c 0.20 ± 0.05
e 0.50
36 25
Lp 0.40 ± 0.10
Lp e x 0.05
y 0.05
b x M S AB
P48K8-50-5B4
HD
48 A3
33
c
49 32
θ L
Lp
E HE L1
(UNIT:mm)
ITEM DIMENSIONS
D 10.00±0.20
17 E 10.00±0.20
64
HD 12.00±0.20
1 16 HE 12.00±0.20
A 1.60 MAX.
ZE A1 0.10±0.05
A2 1.40±0.05
ZD e A3 0.25
b +0.07
b x M S 0.20 −0.03
A c 0.125 +0.075
−0.025
A2 L 0.50
Lp 0.60±0.15
L1 1.00±0.20
S θ 3° +5°
−3°
e 0.50
x 0.08
y S A1
y 0.08
ZD 1.25
ZE 1.25
NOTE
P64GB-50-GAH
Each lead centerline is located within 0.08 mm of
its true position at maximum material condition.
T.B.D
T.B.D
The following development tools are available for the development of systems that employ the V850ES/JC3-H or
V850ES/JE3-H.
Figure A-1 shows the development tool configuration.
• WindowsTM
Unless otherwise specified, “Windows” means the following OSs.
• Windows 98, 2000
• Windows Me
• Windows XP
• Windows NTTM Ver. 4.0
Software package
Control software
• Project manager Embedded software
(Windows only)Note 1 • Real-time OS
• Network library
• File system
Interface adapterNote 2
Flash programmer
On-chip debug emulator
(QB-V850MINI)Note 3 In-circuit emulator
Flash memory (QB-MINI2)Note 4 (QB-V850ESJX3H)Notes 5
write adapter
Flash memory
Conversion socket or
conversion adapter
Target system
SP850 Development tools (software) commonly used with V850 microcontrollers are included
Software package for V850 this package.
microcontrollers Part number: μS××××SP850
Remark ×××× in the part number differs depending on the host machine and OS used.
μS××××SP850
CA850 This compiler converts programs written in C into object codes executable with a
C compiler package microcontroller. This compiler is started from project manager PM+.
Part number: μS××××CA703000
DF703771 This file contains information peculiar to the device.
Device file This device file should be used in combination with a tool (CA850 or ID850QB).
The corresponding OS and host machine differ depending on the tool to be used.
Remark ×××× in the part number differs depending on the host machine and OS used.
μS××××CA703000
PM+ This is control software designed to enable efficient user program development in the
Project manager Windows environment. All operations used in development of a user program, such as
starting the editor, building, and starting the debugger, can be performed from PM+.
<Caution>
PM+ is included in C compiler package CA850.
It can only be used in Windows.
System configuration
Accessories <1>
<5> IECUBE <3> USB cable
Required
Optional
Notes 1. Download the device file from the Renesas Electronics website.
http://www2.renesas.com/micro/en/ods/
2. Supplied with the device depending on the ordering number.
• When QB-V850ESJX3H-ZZZ is ordered
The exchange adapter and the target connector are not supplied.
• When QB-V850ESJX3H-S100GC is ordered
The QB-100GC-EA-04S and QB-100GC-TC-01S are supplied.
• When QB-V850ESJX3H-S128GF is ordered
The QB-128GF-EA-01S and QB-128GF-TC-01S are supplied.
• When QB-V850ESJX3H-T100GC is ordered
The QB-100GC-EA-05T, QB-100GC-YQ-01T, and QB-100GC-NQ-01T are supplied.
• When QB-V850ESJX3H-T128GF is ordered
The QB-1028GF-EA-02T, QB-128GF-YQ-01T, and QB-128GF-NQ-01T are supplied.
3. When using both <9> and <10>, the order between <9> and <10> is not cared.
Note
<5> QB-V850ESJX3H The in-circuit emulator serves to debug hardware and software when developing
In-circuit emulator application systems using the V850ES/JC3-H or V850ES/JE3-H. It supports the
integrated debugger ID850QB. This emulator should be used in combination with a
power supply unit and emulation probe. Use the USB interface cable to connect this
emulator to the host machine.
<3> USB interface cable Cable to connect the host machine and the QB-V850ESJX3H.
<4> AC adapter 100 to 240 V can be supported by replacing the AC plug.
<9> Exchange adapter Adapter to perform pin conversion.
<10> Check pin adapter Adapter used in waveform monitoring using the oscilloscope, etc
<11> Space adapter Adapter to adjust the height.
<12> YQ connector Conversion adapter to connect target connector and exchange adapter .
<13> Mount adapter Adapter to mount the V850ES/JC3-H or V850ES/JE3-H on a socket.
<14> Target connector Connector to solder on the target system.
Note The QB-V850ESJX3H is supplied with a power supply unit, USB interface cable, and flash memory programmer
(MINICUBE2). It is also supplied with integrated debugger ID850QB as control software.
Remark The numbers in the angle brackets correspond to the numbers in Figure A-2.
<1>
<3> <4>
<2>
STATUS
TARGET
POWER
<5>
V850ES/JC3-H, V850ES/JE3-H
<6>
<7>
Target system
Notes 1. Download the device file from the Renesas Electronics website.
http://www2.renesas.com/micro/en/ods/
2. Product of KEL Corporation
Remark The numbers in the angular brackets correspond to the numbers in Figure A-3.
<5>
V850ES/JC3-H,
V850ES/JE3-H
M
IN
IC
U
BE
2
<6>
<2> Software
Target system
Remark The numbers in the angular brackets correspond to the numbers in Figure A-4.
ID850QB This debugger supports the in-circuit emulators for V850 microcontrollers. The
Integrated debugger ID850QB is Windows-based software.
It has improved C-compatible debugging functions and can display the results of
tracing with the source program using a window integration function that associates
the source program, disassemble display, and memory display with the trace result.
It should be used in combination with the device file.
Remark ×××× in the part number differs depending on the host machine and OS used.
μS××××ID703000-QB
RX850, RX850 Pro The RX850 and RX850 Pro are real-time OSs conforming to μITRON 3.0 specifications.
Real-time OS A tool (configurator) for generating multiple information tables is supplied.
RX850 Pro has more functions than the RX850.
Part number: μS××××RX703000-ΔΔΔΔ (RX850)
μS××××RX703100-ΔΔΔΔ (RX850 Pro)
RX-FS850 This is a FAT file system function.
(File system) It is a file system that supports the CD-ROM file system function.
This file system is used with the real-time OS RX850 Pro.
Caution To purchase the RX850 or RX850 Pro, first fill in the purchase application form and sign the license
agreement.
Remark ×××× and ΔΔΔΔ in the part number differ depending on the host machine and OS used.
μS××××RX703000-ΔΔΔΔ
μS××××RX703100-ΔΔΔΔ
Flashpro V (part number: PG-FP5) Flash programmer dedicated to microcontrollers with internal flash memory.
Flash programmer
QB-MINI2 (MINICUBE2) On-chip debug emulator with programming function.
FA-100GC-UEU-B Flash memory writing adapter (not wired) used by connecting to the Flashpro V,
FA-128GF-GAT-B etc.
Flash memory writing adapter • FA-100GC-UEU-B: 100-pin plastic LQFP (GC-UEU type)
• FA-128GF-GAT-B: 100-pin plastic LQFP (GF-GAT type)
Remark FA-100GC-UEU-B and FA-128GF-GAT-B are products of Naito Densei Machida Mfg. Co., Ltd.
TEL: +81-42-750-4172
(1/34)
Symbol Name Unit Page
ADA0CR0 A/D conversion result register 0 ADC 642
ADA0CR0H A/D conversion result register 0H ADC 642
ADA0CR1 A/D conversion result register 1 ADC 642
ADA0CR1H A/D conversion result register 1H ADC 642
ADA0CR2 A/D conversion result register 2 ADC 642
ADA0CR2H A/D conversion result register 2H ADC 642
ADA0CR3 A/D conversion result register 3 ADC 642
ADA0CR3H A/D conversion result register 3H ADC 642
ADA0CR4 A/D conversion result register 4 ADC 642
ADA0CR4H A/D conversion result register 4H ADC 642
ADA0CR5 A/D conversion result register 5 ADC 642
ADA0CR5H A/D conversion result register 5H ADC 642
ADA0CR6 A/D conversion result register 6 ADC 642
ADA0CR6H A/D conversion result register 6H ADC 642
ADA0CR7 A/D conversion result register 7 ADC 642
ADA0CR7H A/D conversion result register 7H ADC 642
ADA0CR8 A/D conversion result register 8 ADC 642
ADA0CR8H A/D conversion result register 8H ADC 642
ADA0CR9 A/D conversion result register 9 ADC 642
ADA0CR9H A/D conversion result register 9H ADC 642
ADA0M0 A/D converter mode register 0 ADC 635
ADA0M1 A/D converter mode register 1 ADC 637
ADA0M2 A/D converter mode register 2 ADC 640
ADA0PFM Power-fail compare mode register ADC 644
ADA0PFT Power-fail compare threshold value register ADC 645
ADA0S A/D converter channel specification register ADC 641
ADIC Interrupt control register INTC 1222
AWC Address wait control register USBF 1012
BCC Bus cycle control register USBF 1013
BPC Peripheral I/O area select control register USBF 90
BRGINTE Bridge interrupt enable register USBF 1121
BRGINTT Bridge interrupt control register USBF 1120
C0BRP CAN0 module bit rate prescaler register CAN 911
C0BTR CAN0 module bit rate register CAN 912
C0CTRL CAN0 module control register CAN 901
C0ERC CAN0 module error counter register CAN 907
(2/34)
Symbol Name Unit Page
C0GMABT CAN0 global automatic block transmission control register CAN 896
C0GMABTD CAN0 global automatic block transmission delay setting register CAN 898
C0GMCS CAN0 global clock selection register CAN 895
C0GMCTRL CAN0 global control register CAN 893
C0IE CAN0 module interrupt enable register CAN 908
C0INFO CAN0 module information register CAN 904
C0INTS CAN0 module interrupt status register CAN 910
C0LEC CAN0 module last error information register CAN 905
C0LIPT CAN0 module last in-pointer register CAN 914
C0LOPT CAN0 module last out-pointer register CAN 916
C0MASK1H CAN0 module mask 1 register H CAN 899
C0MASK1L CAN0 module mask 1 register L CAN 899
C0MASK2H CAN0 module mask 2 register H CAN 899
C0MASK2L CAN0 module mask 2 register L CAN 899
C0MASK3H CAN0 module mask 3 register H CAN 899
C0MASK3L CAN0 module mask 3 register L CAN 899
C0MASK4H CAN0 module mask 4 register H CAN 899
C0MASK4L CAN0 module mask 4 register L CAN 899
C0MCONF00 CAN0 message configuration register 00 CAN 923
C0MCONF01 CAN0 message configuration register 01 CAN 923
C0MCONF02 CAN0 message configuration register 02 CAN 923
C0MCONF03 CAN0 message configuration register 03 CAN 923
C0MCONF04 CAN0 message configuration register 04 CAN 923
C0MCONF05 CAN0 message configuration register 05 CAN 923
C0MCONF06 CAN0 message configuration register 06 CAN 923
C0MCONF07 CAN0 message configuration register 07 CAN 923
C0MCONF08 CAN0 message configuration register 08 CAN 923
C0MCONF09 CAN0 message configuration register 09 CAN 923
C0MCONF10 CAN0 message configuration register 10 CAN 923
C0MCONF11 CAN0 message configuration register 11 CAN 923
C0MCONF12 CAN0 message configuration register 12 CAN 923
C0MCONF13 CAN0 message configuration register 13 CAN 923
C0MCONF14 CAN0 message configuration register 14 CAN 923
C0MCONF15 CAN0 message configuration register 15 CAN 923
C0MCONF16 CAN0 message configuration register 16 CAN 923
C0MCONF17 CAN0 message configuration register 17 CAN 923
C0MCONF18 CAN0 message configuration register 18 CAN 923
C0MCONF19 CAN0 message configuration register 19 CAN 923
C0MCONF20 CAN0 message configuration register 20 CAN 923
C0MCONF21 CAN0 message configuration register 21 CAN 923
(3/34)
Symbol Name Unit Page
C0MCONF22 CAN0 message configuration register 22 CAN 923
C0MCONF23 CAN0 message configuration register 23 CAN 923
C0MCONF24 CAN0 message configuration register 24 CAN 923
C0MCONF25 CAN0 message configuration register 25 CAN 923
C0MCONF26 CAN0 message configuration register 26 CAN 923
C0MCONF27 CAN0 message configuration register 27 CAN 923
C0MCONF28 CAN0 message configuration register 28 CAN 923
C0MCONF29 CAN0 message configuration register 29 CAN 923
C0MCONF30 CAN0 message configuration register 30 CAN 923
C0MCONF31 CAN0 message configuration register 31 CAN 923
C0MCTRL00 CAN0 message control register 00 CAN 925
C0MCTRL01 CAN0 message control register 01 CAN 925
C0MCTRL02 CAN0 message control register 02 CAN 925
C0MCTRL03 CAN0 message control register 03 CAN 925
C0MCTRL04 CAN0 message control register 04 CAN 925
C0MCTRL05 CAN0 message control register 05 CAN 925
C0MCTRL06 CAN0 message control register 06 CAN 925
C0MCTRL07 CAN0 message control register 07 CAN 925
C0MCTRL08 CAN0 message control register 08 CAN 925
C0MCTRL09 CAN0 message control register 09 CAN 925
C0MCTRL10 CAN0 message control register 10 CAN 925
C0MCTRL11 CAN0 message control register 11 CAN 925
C0MCTRL12 CAN0 message control register 12 CAN 925
C0MCTRL13 CAN0 message control register 13 CAN 925
C0MCTRL14 CAN0 message control register 14 CAN 925
C0MCTRL15 CAN0 message control register 15 CAN 925
C0MCTRL16 CAN0 message control register 16 CAN 925
C0MCTRL17 CAN0 message control register 17 CAN 925
C0MCTRL18 CAN0 message control register 18 CAN 925
C0MCTRL19 CAN0 message control register 19 CAN 925
C0MCTRL20 CAN0 message control register 20 CAN 925
C0MCTRL21 CAN0 message control register 21 CAN 925
C0MCTRL22 CAN0 message control register 22 CAN 925
C0MCTRL23 CAN0 message control register 23 CAN 925
C0MCTRL24 CAN0 message control register 24 CAN 925
C0MCTRL25 CAN0 message control register 25 CAN 925
C0MCTRL26 CAN0 message control register 26 CAN 925
C0MCTRL27 CAN0 message control register 27 CAN 925
C0MCTRL28 CAN0 message control register 28 CAN 925
C0MCTRL29 CAN0 message control register 29 CAN 925
C0MCTRL30 CAN0 message control register 30 CAN 925
(4/34)
Symbol Name Unit Page
C0MCTRL31 CAN0 message control register 31 CAN 925
C0MDATA000 CAN0 message data byte 0 register 00 CAN 920
C0MDATA001 CAN0 message data byte 0 register 01 CAN 920
C0MDATA002 CAN0 message data byte 0 register 02 CAN 920
C0MDATA003 CAN0 message data byte 0 register 03 CAN 920
C0MDATA004 CAN0 message data byte 0 register 04 CAN 920
C0MDATA005 CAN0 message data byte 0 register 05 CAN 920
C0MDATA006 CAN0 message data byte 0 register 06 CAN 920
C0MDATA007 CAN0 message data byte 0 register 07 CAN 920
C0MDATA008 CAN0 message data byte 0 register 08 CAN 920
C0MDATA009 CAN0 message data byte 0 register 09 CAN 920
C0MDATA010 CAN0 message data byte 0 register 10 CAN 920
C0MDATA0100 CAN0 message data byte 01 register 00 CAN 920
C0MDATA0101 CAN0 message data byte 01 register 01 CAN 920
C0MDATA0102 CAN0 message data byte 01 register 02 CAN 920
C0MDATA0103 CAN0 message data byte 01 register 03 CAN 920
C0MDATA0104 CAN0 message data byte 01 register 04 CAN 920
C0MDATA0105 CAN0 message data byte 01 register 05 CAN 920
C0MDATA0106 CAN0 message data byte 01 register 06 CAN 920
C0MDATA0107 CAN0 message data byte 01 register 07 CAN 920
C0MDATA0108 CAN0 message data byte 01 register 08 CAN 920
C0MDATA0109 CAN0 message data byte 01 register 09 CAN 920
C0MDATA011 CAN0 message data byte 0 register 11 CAN 920
C0MDATA0110 CAN0 message data byte 01 register 10 CAN 920
C0MDATA0111 CAN0 message data byte 01 register 11 CAN 920
C0MDATA0112 CAN0 message data byte 01 register 12 CAN 920
C0MDATA0113 CAN0 message data byte 01 register 13 CAN 920
C0MDATA0114 CAN0 message data byte 01 register 14 CAN 920
C0MDATA0115 CAN0 message data byte 01 register 15 CAN 920
C0MDATA0116 CAN0 message data byte 01 register 16 CAN 920
C0MDATA0117 CAN0 message data byte 01 register 17 CAN 920
C0MDATA0118 CAN0 message data byte 01 register 18 CAN 920
C0MDATA0119 CAN0 message data byte 01 register 19 CAN 920
C0MDATA012 CAN0 message data byte 0 register 12 CAN 920
C0MDATA0120 CAN0 message data byte 01 register 20 CAN 920
C0MDATA0121 CAN0 message data byte 01 register 21 CAN 920
C0MDATA0122 CAN0 message data byte 01 register 22 CAN 920
C0MDATA0123 CAN0 message data byte 01 register 23 CAN 920
C0MDATA0124 CAN0 message data byte 01 register 24 CAN 920
C0MDATA0125 CAN0 message data byte 01 register 25 CAN 920
(5/34)
Symbol Name Unit Page
C0MDATA0126 CAN0 message data byte 01 register 26 CAN 920
C0MDATA0127 CAN0 message data byte 01 register 27 CAN 920
C0MDATA0128 CAN0 message data byte 01 register 28 CAN 920
C0MDATA0129 CAN0 message data byte 01 register 29 CAN 920
C0MDATA013 CAN0 message data byte 0 register 13 CAN 920
C0MDATA0130 CAN0 message data byte 01 register 30 CAN 920
C0MDATA0131 CAN0 message data byte 01 register 31 CAN 920
C0MDATA014 CAN0 message data byte 0 register 14 CAN 920
C0MDATA015 CAN0 message data byte 0 register 15 CAN 920
C0MDATA016 CAN0 message data byte 0 register 16 CAN 920
C0MDATA017 CAN0 message data byte 0 register 17 CAN 920
C0MDATA018 CAN0 message data byte 0 register 18 CAN 920
C0MDATA019 CAN0 message data byte 0 register 19 CAN 920
C0MDATA020 CAN0 message data byte 0 register 20 CAN 920
C0MDATA021 CAN0 message data byte 0 register 21 CAN 920
C0MDATA022 CAN0 message data byte 0 register 22 CAN 920
C0MDATA023 CAN0 message data byte 0 register 23 CAN 920
C0MDATA024 CAN0 message data byte 0 register 24 CAN 920
C0MDATA025 CAN0 message data byte 0 register 25 CAN 920
C0MDATA026 CAN0 message data byte 0 register 26 CAN 920
C0MDATA027 CAN0 message data byte 0 register 27 CAN 920
C0MDATA028 CAN0 message data byte 0 register 28 CAN 920
C0MDATA029 CAN0 message data byte 0 register 29 CAN 920
C0MDATA030 CAN0 message data byte 0 register 30 CAN 920
C0MDATA031 CAN0 message data byte 0 register 31 CAN 920
C0MDATA100 CAN0 message data byte 1 register 00 CAN 920
C0MDATA101 CAN0 message data byte 1 register 01 CAN 920
C0MDATA102 CAN0 message data byte 1 register 02 CAN 920
C0MDATA103 CAN0 message data byte 1 register 03 CAN 920
C0MDATA104 CAN0 message data byte 1 register 04 CAN 920
C0MDATA105 CAN0 message data byte 1 register 05 CAN 920
C0MDATA106 CAN0 message data byte 1 register 06 CAN 920
C0MDATA107 CAN0 message data byte 1 register 07 CAN 920
C0MDATA108 CAN0 message data byte 1 register 08 CAN 920
C0MDATA109 CAN0 message data byte 1 register 09 CAN 920
C0MDATA110 CAN0 message data byte 1 register 10 CAN 920
C0MDATA111 CAN0 message data byte 1 register 11 CAN 920
C0MDATA112 CAN0 message data byte 1 register 12 CAN 920
C0MDATA113 CAN0 message data byte 1 register 13 CAN 920
C0MDATA114 CAN0 message data byte 1 register 14 CAN 920
(6/34)
Symbol Name Unit Page
C0MDATA115 CAN0 message data byte 1 register 15 CAN 920
C0MDATA116 CAN0 message data byte 1 register 16 CAN 920
C0MDATA117 CAN0 message data byte 1 register 17 CAN 920
C0MDATA118 CAN0 message data byte 1 register 18 CAN 920
C0MDATA119 CAN0 message data byte 1 register 19 CAN 920
C0MDATA120 CAN0 message data byte 1 register 20 CAN 920
C0MDATA121 CAN0 message data byte 1 register 21 CAN 920
C0MDATA122 CAN0 message data byte 1 register 22 CAN 920
C0MDATA123 CAN0 message data byte 1 register 23 CAN 920
C0MDATA124 CAN0 message data byte 1 register 24 CAN 920
C0MDATA125 CAN0 message data byte 1 register 25 CAN 920
C0MDATA126 CAN0 message data byte 1 register 26 CAN 920
C0MDATA127 CAN0 message data byte 1 register 27 CAN 920
C0MDATA128 CAN0 message data byte 1 register 28 CAN 920
C0MDATA129 CAN0 message data byte 1 register 29 CAN 920
C0MDATA130 CAN0 message data byte 1 register 30 CAN 920
C0MDATA131 CAN0 message data byte 1 register 31 CAN 920
C0MDATA200 CAN0 message data byte 2 register 00 CAN 920
C0MDATA201 CAN0 message data byte 2 register 01 CAN 920
C0MDATA202 CAN0 message data byte 2 register 02 CAN 920
C0MDATA203 CAN0 message data byte 2 register 03 CAN 920
C0MDATA204 CAN0 message data byte 2 register 04 CAN 920
C0MDATA205 CAN0 message data byte 2 register 05 CAN 920
C0MDATA206 CAN0 message data byte 2 register 06 CAN 920
C0MDATA207 CAN0 message data byte 2 register 07 CAN 920
C0MDATA208 CAN0 message data byte 2 register 08 CAN 920
C0MDATA209 CAN0 message data byte 2 register 09 CAN 920
C0MDATA210 CAN0 message data byte 2 register 10 CAN 920
C0MDATA211 CAN0 message data byte 2 register 11 CAN 920
C0MDATA212 CAN0 message data byte 2 register 12 CAN 920
C0MDATA213 CAN0 message data byte 2 register 13 CAN 920
C0MDATA214 CAN0 message data byte 2 register 14 CAN 920
C0MDATA215 CAN0 message data byte 2 register 15 CAN 920
C0MDATA216 CAN0 message data byte 2 register 16 CAN 920
C0MDATA217 CAN0 message data byte 2 register 17 CAN 920
C0MDATA218 CAN0 message data byte 2 register 18 CAN 920
C0MDATA219 CAN0 message data byte 2 register 19 CAN 920
C0MDATA220 CAN0 message data byte 2 register 20 CAN 920
C0MDATA221 CAN0 message data byte 2 register 21 CAN 920
(7/34)
Symbol Name Unit Page
C0MDATA222 CAN0 message data byte 2 register 22 CAN 920
C0MDATA223 CAN0 message data byte 2 register 23 CAN 920
C0MDATA224 CAN0 message data byte 2 register 24 CAN 920
C0MDATA225 CAN0 message data byte 2 register 25 CAN 920
C0MDATA226 CAN0 message data byte 2 register 26 CAN 920
C0MDATA227 CAN0 message data byte 2 register 27 CAN 920
C0MDATA228 CAN0 message data byte 2 register 28 CAN 920
C0MDATA229 CAN0 message data byte 2 register 29 CAN 920
C0MDATA230 CAN0 message data byte 2 register 30 CAN 920
C0MDATA2300 CAN0 message data byte 23 register 00 CAN 920
C0MDATA2301 CAN0 message data byte 23 register 01 CAN 920
C0MDATA2302 CAN0 message data byte 23 register 02 CAN 920
C0MDATA2303 CAN0 message data byte 23 register 03 CAN 920
C0MDATA2304 CAN0 message data byte 23 register 04 CAN 920
C0MDATA2305 CAN0 message data byte 23 register 05 CAN 920
C0MDATA2306 CAN0 message data byte 23 register 06 CAN 920
C0MDATA2307 CAN0 message data byte 23 register 07 CAN 920
C0MDATA2308 CAN0 message data byte 23 register 08 CAN 920
C0MDATA2309 CAN0 message data byte 23 register 09 CAN 920
C0MDATA231 CAN0 message data byte 2 register 31 CAN 920
C0MDATA2310 CAN0 message data byte 23 register 10 CAN 920
C0MDATA2311 CAN0 message data byte 23 register 11 CAN 920
C0MDATA2312 CAN0 message data byte 23 register 12 CAN 920
C0MDATA2313 CAN0 message data byte 23 register 13 CAN 920
C0MDATA2314 CAN0 message data byte 23 register 14 CAN 920
C0MDATA2315 CAN0 message data byte 23 register 15 CAN 920
C0MDATA2316 CAN0 message data byte 23 register 16 CAN 920
C0MDATA2317 CAN0 message data byte 23 register 17 CAN 920
C0MDATA2318 CAN0 message data byte 23 register 18 CAN 920
C0MDATA2319 CAN0 message data byte 23 register 19 CAN 920
C0MDATA2320 CAN0 message data byte 23 register 20 CAN 920
C0MDATA2321 CAN0 message data byte 23 register 21 CAN 920
C0MDATA2322 CAN0 message data byte 23 register 22 CAN 920
C0MDATA2323 CAN0 message data byte 23 register 23 CAN 920
C0MDATA2324 CAN0 message data byte 23 register 24 CAN 920
C0MDATA2325 CAN0 message data byte 23 register 25 CAN 920
C0MDATA2326 CAN0 message data byte 23 register 26 CAN 920
C0MDATA2327 CAN0 message data byte 23 register 27 CAN 920
C0MDATA2328 CAN0 message data byte 23 register 28 CAN 920
C0MDATA2329 CAN0 message data byte 23 register 29 CAN 920
(8/34)
Symbol Name Unit Page
C0MDATA2330 CAN0 message data byte 23 register 30 CAN 920
C0MDATA2331 CAN0 message data byte 23 register 31 CAN 920
C0MDATA300 CAN0 message data byte 3 register 00 CAN 920
C0MDATA301 CAN0 message data byte 3 register 01 CAN 920
C0MDATA302 CAN0 message data byte 3 register 02 CAN 920
C0MDATA303 CAN0 message data byte 3 register 03 CAN 920
C0MDATA304 CAN0 message data byte 3 register 04 CAN 920
C0MDATA305 CAN0 message data byte 3 register 05 CAN 920
C0MDATA306 CAN0 message data byte 3 register 06 CAN 920
C0MDATA307 CAN0 message data byte 3 register 07 CAN 920
C0MDATA308 CAN0 message data byte 3 register 08 CAN 920
C0MDATA309 CAN0 message data byte 3 register 09 CAN 920
C0MDATA310 CAN0 message data byte 3 register 10 CAN 920
C0MDATA311 CAN0 message data byte 3 register 11 CAN 920
C0MDATA312 CAN0 message data byte 3 register 12 CAN 920
C0MDATA313 CAN0 message data byte 3 register 13 CAN 920
C0MDATA314 CAN0 message data byte 3 register 14 CAN 920
C0MDATA315 CAN0 message data byte 3 register 15 CAN 920
C0MDATA316 CAN0 message data byte 3 register 16 CAN 920
C0MDATA317 CAN0 message data byte 3 register 17 CAN 920
C0MDATA318 CAN0 message data byte 3 register 18 CAN 920
C0MDATA319 CAN0 message data byte 3 register 19 CAN 920
C0MDATA320 CAN0 message data byte 3 register 20 CAN 920
C0MDATA321 CAN0 message data byte 3 register 21 CAN 920
C0MDATA322 CAN0 message data byte 3 register 22 CAN 920
C0MDATA323 CAN0 message data byte 3 register 23 CAN 920
C0MDATA324 CAN0 message data byte 3 register 24 CAN 920
C0MDATA325 CAN0 message data byte 3 register 25 CAN 920
C0MDATA326 CAN0 message data byte 3 register 26 CAN 920
C0MDATA327 CAN0 message data byte 3 register 27 CAN 920
C0MDATA328 CAN0 message data byte 3 register 28 CAN 920
C0MDATA329 CAN0 message data byte 3 register 29 CAN 920
C0MDATA330 CAN0 message data byte 3 register 30 CAN 920
C0MDATA331 CAN0 message data byte 3 register 31 CAN 920
C0MDATA400 CAN0 message data byte 4 register 00 CAN 920
C0MDATA401 CAN0 message data byte 4 register 01 CAN 920
C0MDATA402 CAN0 message data byte 4 register 02 CAN 920
C0MDATA403 CAN0 message data byte 4 register 03 CAN 920
C0MDATA404 CAN0 message data byte 4 register 04 CAN 920
C0MDATA405 CAN0 message data byte 4 register 05 CAN 920
(9/34)
Symbol Name Unit Page
C0MDATA406 CAN0 message data byte 4 register 06 CAN 920
C0MDATA407 CAN0 message data byte 4 register 07 CAN 920
C0MDATA408 CAN0 message data byte 4 register 08 CAN 920
C0MDATA409 CAN0 message data byte 4 register 09 CAN 920
C0MDATA410 CAN0 message data byte 4 register 10 CAN 920
C0MDATA411 CAN0 message data byte 4 register 11 CAN 920
C0MDATA412 CAN0 message data byte 4 register 12 CAN 920
C0MDATA413 CAN0 message data byte 4 register 13 CAN 920
C0MDATA414 CAN0 message data byte 4 register 14 CAN 920
C0MDATA415 CAN0 message data byte 4 register 15 CAN 920
C0MDATA416 CAN0 message data byte 4 register 16 CAN 920
C0MDATA417 CAN0 message data byte 4 register 17 CAN 920
C0MDATA418 CAN0 message data byte 4 register 18 CAN 920
C0MDATA419 CAN0 message data byte 4 register 19 CAN 920
C0MDATA420 CAN0 message data byte 4 register 20 CAN 920
C0MDATA421 CAN0 message data byte 4 register 21 CAN 920
C0MDATA422 CAN0 message data byte 4 register 22 CAN 920
C0MDATA423 CAN0 message data byte 4 register 23 CAN 920
C0MDATA424 CAN0 message data byte 4 register 24 CAN 920
C0MDATA425 CAN0 message data byte 4 register 25 CAN 920
C0MDATA426 CAN0 message data byte 4 register 26 CAN 920
C0MDATA427 CAN0 message data byte 4 register 27 CAN 920
C0MDATA428 CAN0 message data byte 4 register 28 CAN 920
C0MDATA429 CAN0 message data byte 4 register 29 CAN 920
C0MDATA430 CAN0 message data byte 4 register 30 CAN 920
C0MDATA431 CAN0 message data byte 4 register 31 CAN 920
C0MDATA4500 CAN0 message data byte 45 register 00 CAN 920
C0MDATA4501 CAN0 message data byte 45 register 01 CAN 920
C0MDATA4502 CAN0 message data byte 45 register 02 CAN 920
C0MDATA4503 CAN0 message data byte 45 register 03 CAN 920
C0MDATA4504 CAN0 message data byte 45 register 04 CAN 920
C0MDATA4505 CAN0 message data byte 45 register 05 CAN 920
C0MDATA4506 CAN0 message data byte 45 register 06 CAN 920
C0MDATA4507 CAN0 message data byte 45 register 07 CAN 920
C0MDATA4508 CAN0 message data byte 45 register 08 CAN 920
C0MDATA4509 CAN0 message data byte 45 register 09 CAN 920
C0MDATA4510 CAN0 message data byte 45 register 10 CAN 920
C0MDATA4511 CAN0 message data byte 45 register 11 CAN 920
C0MDATA4512 CAN0 message data byte 45 register 12 CAN 920
C0MDATA4513 CAN0 message data byte 45 register 13 CAN 920
(10/34)
Symbol Name Unit Page
C0MDATA4514 CAN0 message data byte 45 register 14 CAN 920
C0MDATA4515 CAN0 message data byte 45 register 15 CAN 920
C0MDATA4516 CAN0 message data byte 45 register 16 CAN 920
C0MDATA4517 CAN0 message data byte 45 register 17 CAN 920
C0MDATA4518 CAN0 message data byte 45 register 18 CAN 920
C0MDATA4519 CAN0 message data byte 45 register 19 CAN 920
C0MDATA4520 CAN0 message data byte 45 register 20 CAN 920
C0MDATA4521 CAN0 message data byte 45 register 21 CAN 920
C0MDATA4522 CAN0 message data byte 45 register 22 CAN 920
C0MDATA4523 CAN0 message data byte 45 register 23 CAN 920
C0MDATA4524 CAN0 message data byte 45 register 24 CAN 920
C0MDATA4525 CAN0 message data byte 45 register 25 CAN 920
C0MDATA4526 CAN0 message data byte 45 register 26 CAN 920
C0MDATA4527 CAN0 message data byte 45 register 27 CAN 920
C0MDATA4528 CAN0 message data byte 45 register 28 CAN 920
C0MDATA4529 CAN0 message data byte 45 register 29 CAN 920
C0MDATA4530 CAN0 message data byte 45 register 30 CAN 920
C0MDATA4531 CAN0 message data byte 45 register 31 CAN 920
C0MDATA500 CAN0 message data byte 5 register 00 CAN 920
C0MDATA501 CAN0 message data byte 5 register 01 CAN 920
C0MDATA502 CAN0 message data byte 5 register 02 CAN 920
C0MDATA503 CAN0 message data byte 5 register 03 CAN 920
C0MDATA504 CAN0 message data byte 5 register 04 CAN 920
C0MDATA505 CAN0 message data byte 5 register 05 CAN 920
C0MDATA506 CAN0 message data byte 5 register 06 CAN 920
C0MDATA507 CAN0 message data byte 5 register 07 CAN 920
C0MDATA508 CAN0 message data byte 5 register 08 CAN 920
C0MDATA509 CAN0 message data byte 5 register 09 CAN 920
C0MDATA510 CAN0 message data byte 5 register 10 CAN 920
C0MDATA511 CAN0 message data byte 5 register 11 CAN 920
C0MDATA512 CAN0 message data byte 5 register 12 CAN 920
C0MDATA513 CAN0 message data byte 5 register 13 CAN 920
C0MDATA514 CAN0 message data byte 5 register 14 CAN 920
C0MDATA515 CAN0 message data byte 5 register 15 CAN 920
C0MDATA516 CAN0 message data byte 5 register 16 CAN 920
C0MDATA517 CAN0 message data byte 5 register 17 CAN 920
C0MDATA518 CAN0 message data byte 5 register 18 CAN 920
C0MDATA519 CAN0 message data byte 5 register 19 CAN 920
C0MDATA520 CAN0 message data byte 5 register 20 CAN 920
C0MDATA521 CAN0 message data byte 5 register 21 CAN 920
(11/34)
Symbol Name Unit Page
C0MDATA522 CAN0 message data byte 5 register 22 CAN 920
C0MDATA523 CAN0 message data byte 5 register 23 CAN 920
C0MDATA524 CAN0 message data byte 5 register 24 CAN 920
C0MDATA525 CAN0 message data byte 5 register 25 CAN 920
C0MDATA526 CAN0 message data byte 5 register 26 CAN 920
C0MDATA527 CAN0 message data byte 5 register 27 CAN 920
C0MDATA528 CAN0 message data byte 5 register 28 CAN 920
C0MDATA529 CAN0 message data byte 5 register 29 CAN 920
C0MDATA530 CAN0 message data byte 5 register 30 CAN 920
C0MDATA531 CAN0 message data byte 5 register 31 CAN 920
C0MDATA600 CAN0 message data byte 6 register 00 CAN 920
C0MDATA601 CAN0 message data byte 6 register 01 CAN 920
C0MDATA602 CAN0 message data byte 6 register 02 CAN 920
C0MDATA603 CAN0 message data byte 6 register 03 CAN 920
C0MDATA604 CAN0 message data byte 6 register 04 CAN 920
C0MDATA605 CAN0 message data byte 6 register 05 CAN 920
C0MDATA606 CAN0 message data byte 6 register 06 CAN 920
C0MDATA607 CAN0 message data byte 6 register 07 CAN 920
C0MDATA608 CAN0 message data byte 6 register 08 CAN 920
C0MDATA609 CAN0 message data byte 6 register 09 CAN 920
C0MDATA610 CAN0 message data byte 6 register 10 CAN 920
C0MDATA611 CAN0 message data byte 6 register 11 CAN 920
C0MDATA612 CAN0 message data byte 6 register 12 CAN 920
C0MDATA613 CAN0 message data byte 6 register 13 CAN 920
C0MDATA614 CAN0 message data byte 6 register 14 CAN 920
C0MDATA615 CAN0 message data byte 6 register 15 CAN 920
C0MDATA616 CAN0 message data byte 6 register 16 CAN 920
C0MDATA617 CAN0 message data byte 6 register 17 CAN 920
C0MDATA618 CAN0 message data byte 6 register 18 CAN 920
C0MDATA619 CAN0 message data byte 6 register 19 CAN 920
C0MDATA620 CAN0 message data byte 6 register 20 CAN 920
C0MDATA621 CAN0 message data byte 6 register 21 CAN 920
C0MDATA622 CAN0 message data byte 6 register 22 CAN 920
C0MDATA623 CAN0 message data byte 6 register 23 CAN 920
C0MDATA624 CAN0 message data byte 6 register 24 CAN 920
C0MDATA625 CAN0 message data byte 6 register 25 CAN 920
C0MDATA626 CAN0 message data byte 6 register 26 CAN 920
C0MDATA627 CAN0 message data byte 6 register 27 CAN 920
C0MDATA628 CAN0 message data byte 6 register 28 CAN 920
C0MDATA629 CAN0 message data byte 6 register 29 CAN 920
C0MDATA630 CAN0 message data byte 6 register 30 CAN 920
(12/34)
Symbol Name Unit Page
C0MDATA631 CAN0 message data byte 6 register 31 CAN 920
C0MDATA6700 CAN0 message data byte 67 register 00 CAN 920
C0MDATA6701 CAN0 message data byte 67 register 01 CAN 920
C0MDATA6702 CAN0 message data byte 67 register 02 CAN 920
C0MDATA6703 CAN0 message data byte 67 register 03 CAN 920
C0MDATA6704 CAN0 message data byte 67 register 04 CAN 920
C0MDATA6705 CAN0 message data byte 67 register 05 CAN 920
C0MDATA6706 CAN0 message data byte 67 register 06 CAN 920
C0MDATA6707 CAN0 message data byte 67 register 07 CAN 920
C0MDATA6708 CAN0 message data byte 67 register 08 CAN 920
C0MDATA6709 CAN0 message data byte 67 register 09 CAN 920
C0MDATA6710 CAN0 message data byte 67 register 10 CAN 920
C0MDATA6711 CAN0 message data byte 67 register 11 CAN 920
C0MDATA6712 CAN0 message data byte 67 register 12 CAN 920
C0MDATA6713 CAN0 message data byte 67 register 13 CAN 920
C0MDATA6714 CAN0 message data byte 67 register 14 CAN 920
C0MDATA6715 CAN0 message data byte 67 register 15 CAN 920
C0MDATA6716 CAN0 message data byte 67 register 16 CAN 920
C0MDATA6717 CAN0 message data byte 67 register 17 CAN 920
C0MDATA6718 CAN0 message data byte 67 register 18 CAN 920
C0MDATA6719 CAN0 message data byte 67 register 19 CAN 920
C0MDATA6720 CAN0 message data byte 67 register 20 CAN 920
C0MDATA6721 CAN0 message data byte 67 register 21 CAN 920
C0MDATA6722 CAN0 message data byte 67 register 22 CAN 920
C0MDATA6723 CAN0 message data byte 67 register 23 CAN 920
C0MDATA6724 CAN0 message data byte 67 register 24 CAN 920
C0MDATA6725 CAN0 message data byte 67 register 25 CAN 920
C0MDATA6726 CAN0 message data byte 67 register 26 CAN 920
C0MDATA6727 CAN0 message data byte 67 register 27 CAN 920
C0MDATA6728 CAN0 message data byte 67 register 28 CAN 920
C0MDATA6729 CAN0 message data byte 67 register 29 CAN 920
C0MDATA6730 CAN0 message data byte 67 register 30 CAN 920
C0MDATA6731 CAN0 message data byte 67 register 31 CAN 920
C0MDATA700 CAN0 message data byte 7 register 00 CAN 920
C0MDATA701 CAN0 message data byte 7 register 01 CAN 920
C0MDATA702 CAN0 message data byte 7 register 02 CAN 920
C0MDATA703 CAN0 message data byte 7 register 03 CAN 920
C0MDATA704 CAN0 message data byte 7 register 04 CAN 920
C0MDATA705 CAN0 message data byte 7 register 05 CAN 920
C0MDATA706 CAN0 message data byte 7 register 06 CAN 920
(13/34)
Symbol Name Unit Page
C0MDATA707 CAN0 message data byte 7 register 07 CAN 920
C0MDATA708 CAN0 message data byte 7 register 08 CAN 920
C0MDATA709 CAN0 message data byte 7 register 09 CAN 920
C0MDATA710 CAN0 message data byte 7 register 10 CAN 920
C0MDATA711 CAN0 message data byte 7 register 11 CAN 920
C0MDATA712 CAN0 message data byte 7 register 12 CAN 920
C0MDATA713 CAN0 message data byte 7 register 13 CAN 920
C0MDATA714 CAN0 message data byte 7 register 14 CAN 920
C0MDATA715 CAN0 message data byte 7 register 15 CAN 920
C0MDATA716 CAN0 message data byte 7 register 16 CAN 920
C0MDATA717 CAN0 message data byte 7 register 17 CAN 920
C0MDATA718 CAN0 message data byte 7 register 18 CAN 920
C0MDATA719 CAN0 message data byte 7 register 19 CAN 920
C0MDATA720 CAN0 message data byte 7 register 20 CAN 920
C0MDATA721 CAN0 message data byte 7 register 21 CAN 920
C0MDATA722 CAN0 message data byte 7 register 22 CAN 920
C0MDATA723 CAN0 message data byte 7 register 23 CAN 920
C0MDATA724 CAN0 message data byte 7 register 24 CAN 920
C0MDATA725 CAN0 message data byte 7 register 25 CAN 920
C0MDATA726 CAN0 message data byte 7 register 26 CAN 920
C0MDATA727 CAN0 message data byte 7 register 27 CAN 920
C0MDATA728 CAN0 message data byte 7 register 28 CAN 920
C0MDATA729 CAN0 message data byte 7 register 29 CAN 920
C0MDATA730 CAN0 message data byte 7 register 30 CAN 920
C0MDATA731 CAN0 message data byte 7 register 31 CAN 920
C0MDLC00 CAN0 message data length register 00 CAN 922
C0MDLC01 CAN0 message data length register 01 CAN 922
C0MDLC02 CAN0 message data length register 02 CAN 922
C0MDLC03 CAN0 message data length register 03 CAN 922
C0MDLC04 CAN0 message data length register 04 CAN 922
C0MDLC05 CAN0 message data length register 05 CAN 922
C0MDLC06 CAN0 message data length register 06 CAN 922
C0MDLC07 CAN0 message data length register 07 CAN 922
C0MDLC08 CAN0 message data length register 08 CAN 922
C0MDLC09 CAN0 message data length register 09 CAN 922
C0MDLC10 CAN0 message data length register 10 CAN 922
C0MDLC11 CAN0 message data length register 11 CAN 922
C0MDLC12 CAN0 message data length register 12 CAN 922
C0MDLC13 CAN0 message data length register 13 CAN 922
C0MDLC14 CAN0 message data length register 14 CAN 922
(14/34)
Symbol Name Unit Page
C0MDLC15 CAN0 message data length register 15 CAN 922
C0MDLC16 CAN0 message data length register 16 CAN 922
C0MDLC17 CAN0 message data length register 17 CAN 922
C0MDLC18 CAN0 message data length register 18 CAN 922
C0MDLC19 CAN0 message data length register 19 CAN 922
C0MDLC20 CAN0 message data length register 20 CAN 922
C0MDLC21 CAN0 message data length register 21 CAN 922
C0MDLC22 CAN0 message data length register 22 CAN 922
C0MDLC23 CAN0 message data length register 23 CAN 922
C0MDLC24 CAN0 message data length register 24 CAN 922
C0MDLC25 CAN0 message data length register 25 CAN 922
C0MDLC26 CAN0 message data length register 26 CAN 922
C0MDLC27 CAN0 message data length register 27 CAN 922
C0MDLC28 CAN0 message data length register 28 CAN 922
C0MDLC29 CAN0 message data length register 29 CAN 922
C0MDLC30 CAN0 message data length register 30 CAN 922
C0MDLC31 CAN0 message data length register 31 CAN 922
C0MIDH00 CAN0 message identifier register 00H CAN 924
C0MIDH01 CAN0 message identifier register 01H CAN 924
C0MIDH02 CAN0 message identifier register 02H CAN 924
C0MIDH03 CAN0 message identifier register 03H CAN 924
C0MIDH04 CAN0 message identifier register 04H CAN 924
C0MIDH05 CAN0 message identifier register 05H CAN 924
C0MIDH06 CAN0 message identifier register 06H CAN 924
C0MIDH07 CAN0 message identifier register 07H CAN 924
C0MIDH08 CAN0 message identifier register 08H CAN 924
C0MIDH09 CAN0 message identifier register 09H CAN 924
C0MIDH10 CAN0 message identifier register 10H CAN 924
C0MIDH11 CAN0 message identifier register 11H CAN 924
C0MIDH12 CAN0 message identifier register 12H CAN 924
C0MIDH13 CAN0 message identifier register 13H CAN 924
C0MIDH14 CAN0 message identifier register 14H CAN 924
C0MIDH15 CAN0 message identifier register 15H CAN 924
C0MIDH16 CAN0 message identifier register 16H CAN 924
C0MIDH17 CAN0 message identifier register 17H CAN 924
C0MIDH18 CAN0 message identifier register 18H CAN 924
C0MIDH19 CAN0 message identifier register 19H CAN 924
C0MIDH20 CAN0 message identifier register 20H CAN 924
C0MIDH21 CAN0 message identifier register 21H CAN 924
C0MIDH22 CAN0 message identifier register 22H CAN 924
(15/34)
Symbol Name Unit Page
C0MIDH23 CAN0 message identifier register 23H CAN 924
C0MIDH24 CAN0 message identifier register 24H CAN 924
C0MIDH25 CAN0 message identifier register 25H CAN 924
C0MIDH26 CAN0 message identifier register 26H CAN 924
C0MIDH27 CAN0 message identifier register 27H CAN 924
C0MIDH28 CAN0 message identifier register 28H CAN 924
C0MIDH29 CAN0 message identifier register 29H CAN 924
C0MIDH30 CAN0 message identifier register 30H CAN 924
C0MIDH31 CAN0 message identifier register 31H CAN 924
C0MIDL00 CAN0 message identifier register 00L CAN 924
C0MIDL01 CAN0 message identifier register 01L CAN 924
C0MIDL02 CAN0 message identifier register 02L CAN 924
C0MIDL03 CAN0 message identifier register 03L CAN 924
C0MIDL04 CAN0 message identifier register 04L CAN 924
C0MIDL05 CAN0 message identifier register 05L CAN 924
C0MIDL06 CAN0 message identifier register 06L CAN 924
C0MIDL07 CAN0 message identifier register 07L CAN 924
C0MIDL08 CAN0 message identifier register 08L CAN 924
C0MIDL09 CAN0 message identifier register 09L CAN 924
C0MIDL10 CAN0 message identifier register 10L CAN 924
C0MIDL11 CAN0 message identifier register 11L CAN 924
C0MIDL12 CAN0 message identifier register 12L CAN 924
C0MIDL13 CAN0 message identifier register 13L CAN 924
C0MIDL14 CAN0 message identifier register 14L CAN 924
C0MIDL15 CAN0 message identifier register 15L CAN 924
C0MIDL16 CAN0 message identifier register 16L CAN 924
C0MIDL17 CAN0 message identifier register 17L CAN 924
C0MIDL18 CAN0 message identifier register 18L CAN 924
C0MIDL19 CAN0 message identifier register 19L CAN 924
C0MIDL20 CAN0 message identifier register 20L CAN 924
C0MIDL21 CAN0 message identifier register 21L CAN 924
C0MIDL22 CAN0 message identifier register 22L CAN 924
C0MIDL23 CAN0 message identifier register 23L CAN 924
C0MIDL24 CAN0 message identifier register 24L CAN 924
C0MIDL25 CAN0 message identifier register 25L CAN 924
C0MIDL26 CAN0 message identifier register 26L CAN 924
C0MIDL27 CAN0 message identifier register 27L CAN 924
C0MIDL28 CAN0 message identifier register 28L CAN 924
C0MIDL29 CAN0 message identifier register 29L CAN 924
C0MIDL30 CAN0 message identifier register 30L CAN 924
(16/34)
Symbol Name Unit Page
C0MIDL31 CAN0 message identifier register 31L CAN 924
C0RGPT CAN0 module receive history list register CAN 915
C0TGPT CAN0 module transmit history list register CAN 917
C0TS CAN0 module time stamp register CAN 918
CCLS CPU operation clock status register CG 160
CF0CTL0 CSIF0 control register 0 CSIF 720
CF0CTL1 CSIF0 control register 1 CSIF 723
CF0CTL2 CSIF0 control register 2 CSIF 724
CF0RIC Interrupt control register INTC 1222
CF0RX CSIF0 receive data register CSIF 718
CF0RXL CSIF0 receive data register L CSIF 718
CF0STR CSIF0 status register CSIF 726
CF0TIC Interrupt control register INTC 1222
CF0TX CSIF0 transmit data register CSIF 719
CF0TXL CSIF0 transmit data register L CSIF 719
CF2CTL0 CSIF2 control register 0 CSIF 720
CF2CTL1 CSIF2 control register 1 CSIF 723
CF2CTL2 CSIF2 control register 2 CSIF 724
CF2RIC Interrupt control register INTC 1222
CF2RX CSIF2 receive data register CSIF 718
CF2RXL CSIF2 receive data register L CSIF 718
CF2STR CSIF2 status register CSIF 726
CF2TIC Interrupt control register INTC 1222
CF2TX CSIF2 transmit data register CSIF 719
CF2TXL CSIF2 transmit data register L CSIF 719
CF3CTL0 CSIF3 control register 0 CSIF 720
CF3CTL1 CSIF3 control register 1 CSIF 723
CF3CTL2 CSIF3 control register 2 CSIF 724
CF3RIC Interrupt control register INTC 1222
CF3RX CSIF3 receive data register CSIF 718
CF3RXL CSIF3 receive data register L CSIF 718
CF3STR CSIF3 status register CSIF 726
CF3TIC Interrupt control register INTC 1222
CF3TX CSIF3 transmit data register CSIF 719
CF3TXL CSIF3 transmit data register L CSIF 719
CF4CTL0 CSIF4 control register 0 CSIF 720
CF4CTL1 CSIF4 control register 1 CSIF 723
CF4CTL2 CSIF4 control register 2 CSIF 724
CF4RIC Interrupt control register INTC 1222
CF4RX CSIF4 receive data register CSIF 718
CF4RXL CSIF4 receive data register L CSIF 718
CF4STR CSIF4 status register CSIF 726
(17/34)
Symbol Name Unit Page
CF4TIC Interrupt control register INTC 1222
CF4TX CSIF4 transmit data register CSIF 719
CF4TXL CSIF4 transmit data register L CSIF 719
CKC Clock control register CG 163
CLM Clock monitor mode register CLM 1279
CPUBCTL CPU I/F bus control register USBF 1123
CRCD CRC data register CRC 1290
CRCIN CRC input register CRC 1290
CTBP CALLT base pointer CPU 64
CTPC CALLT execution status saving register CPU 63
CTPSW CALLT execution status saving register CPU 63
DA0CS0 D/A conversion value setting register 0 DAC 669
DA0M D/A converter mode register DAC 668
DADC0 DMA addressing control register 0 DMAC 1191
DADC1 DMA addressing control register 1 DMAC 1191
DADC2 DMA addressing control register 2 DMAC 1191
DADC3 DMA addressing control register 3 DMAC 1191
DBC0 DMA transfer count register 0 DMAC 1190
DBC1 DMA transfer count register 1 DMAC 1190
DBC2 DMA transfer count register 2 DMAC 1190
DBC3 DMA transfer count register 3 DMAC 1190
DBPC Exception/debug trap status saving register CPU 64
DBPSW Exception/debug trap status saving register CPU 64
DCHC0 DMA channel control register 0 DMAC 1192
DCHC1 DMA channel control register 1 DMAC 1192
DCHC2 DMA channel control register 2 DMAC 1192
DCHC3 DMA channel control register 3 DMAC 1192
DDA0H DMA destination address register 0H DMAC 1189
DDA0L DMA destination address register 0L DMAC 1189
DDA1H DMA destination address register 1H DMAC 1189
DDA1L DMA destination address register 1L DMAC 1189
DDA2H DMA destination address register 2H DMAC 1189
DDA2L DMA destination address register 2L DMAC 1189
DDA3H DMA destination address register 3H DMAC 1189
DDA3L DMA destination address register 3L DMAC 1189
DMAIC0 Interrupt control register INTC 1222
DMAIC1 Interrupt control register INTC 1222
DMAIC2 Interrupt control register INTC 1222
DMAIC3 Interrupt control register INTC 1222
DSA0H DMA source address register 0H DMAC 1188
DSA0L DMA source address register 0L DMAC 1188
(18/34)
Symbol Name Unit Page
DSA1H DMA source address register 1H DMAC 1188
DSA1L DMA source address register 1L DMAC 1188
DSA2H DMA source address register 2H DMAC 1188
DSA2L DMA source address register 2L DMAC 1188
DSA3H DMA source address register 3H DMAC 1188
DSA3L DMA source address register 3L DMAC 1188
DTFR0 DMA trigger factor register 0 DMAC 1193
DTFR1 DMA trigger factor register 1 DMAC 1193
DTFR2 DMA trigger factor register 2 DMAC 1193
DTFR3 DMA trigger factor register 3 DMAC 1193
DWC0 Data wait control register 0 BCU 1011
ECR Interrupt source register CPU 61
EIPC Interrupt status saving register CPU 60
EIPSW Interrupt status saving register CPU 60
EPCCLT EPC macro control register USBF 1122
EPRMK EPRAM mask register USBF 1010
ERRIC0 Interrupt control register INTC 12225
FEPC NMI status saving register CPU 61
FEPSW NMI status saving register CPU 61
HZA0CTL0 High-impedance output control register 0 Motor 538
HZA0CTL1 High-impedance output control register 1 Motor 538
2
IIC0 IIC shift register 0 IC 786
2
IIC1 IIC shift register 1 IC 786
2
IICC0 IIC control register 0 IC 773
2
IICC1 IIC control register 1 IC 773
2
IICCL0 IIC clock select register 0 IC 783
2
IICCL1 IIC clock select register 1 IC 783
2
IICF0 IIC flag register 0 IC 781
2
IICF1 IIC flag register 1 IC 781
IICIC0 Interrupt control register INTC 1222
IICIC1 Interrupt control register INTC 1222
2
IICS0 IIC status register 0 IC 778
2
IICS1 IIC status register 1 IC 778
2
IICX0 IIC function expansion register 0 IC 784
2
IICX1 IIC function expansion register 1 IC 784
IMR0 Interrupt mask register 0 INTC 1225
IMR0H Interrupt mask register 0H INTC 1225
IMR0L Interrupt mask register 0L INTC 1225
IMR1 Interrupt mask register 1 INTC 1225
IMR1H Interrupt mask register 1H INTC 1225
IMR1L Interrupt mask register 1L INTC 1225
IMR2 Interrupt mask register 2 INTC 1225
(19/34)
Symbol Name Unit Page
IMR2H Interrupt mask register 2H INTC 1225
IMR2L Interrupt mask register 2L INTC 1225
IMR3 Interrupt mask register 3 INTC 1225
IMR3H Interrupt mask register 3H INTC 1225
IMR3L Interrupt mask register 3L INTC 1225
IMR4 Interrupt mask register 4 INTC 1225
IMR4H Interrupt mask register 4H INTC 1225
IMR4L Interrupt mask register 4L INTC 1225
IMR5 Interrupt mask register 5 INTC 1225
IMR5H Interrupt mask register 5H INTC 1225
IMR5L Interrupt mask register 5L INTC 1225
INTF0 External falling edge specification register 0 INTC 1237
INTF3 External falling edge specification register 3 INTC 1238
INTF4 External falling edge specification register 4 INTC 1239
INTF5 External falling edge specification register 5 INTC 1240
INTF9 External falling edge specification register 9 INTC 1241
INTF9H External falling edge specification register 9H INTC 1241
INTF9L External falling edge specification register 9L INTC 1241
INTNFC Noise elimination control register INTC 1242
INTR0 External rising edge specification register 0 INTC 1237
INTR3 External rising edge specification register 3 INTC 1238
INTR4 External rising edge specification register 4 INTC 1239
INTR5 External rising edge specification register 5 INTC 1240
INTR9 External rising edge specification register 9 INTC 1241
INTR9H External rising edge specification register 9H INTC 1241
INTR9L External rising edge specification register 9L INTC 1241
ISPR In-service priority register INTC 1222
KRIC Interrupt control register INTC 1222
KRM Key return mode register KR 1246
LOCKR Lock register CG 164
LVIIC Interrupt control register INTC 1222
LVIM Low-voltage detection register LVI 1284
OCDM On-chip debug mode register DCU 1335
2
OCKS0 IIC division clock select register 0 IC 786
2
OCKS1 IIC division clock select register 1 IC 786
OSTS Oscillation stabilization time select register Standby 1251
P0 Port 0 register Port 108
P1 Port 1 register Port 113
P3 Port 3 register Port 115
P4 Port 4 register Port 121
P5 Port 5 register Port 125
P6 Port 6 register Port 130
P7H Port 7 register H Port 133
P7L Port 7 register L Port 133
(20/34)
Symbol Name Unit Page
P9 Port 9 register Port 136
P9H Port 9 register H Port 136
P9L Port 9 register L Port 136
PDL Port DL register Port 143
PDLH Port DL register H Port 143
PDLL Port DL register L Port 143
PF0 Port 0 function register Port 112
PF3 Port 3 function register Port 120
PF4 Port 4 function register Port 123
PF5 Port 5 function register Port 129
PFC0 Port 0 function control register Port 111
PFC3 Port 3 function control register Port 117
PFC4 Port 4 function control register Port 122
PFC5 Port 5 function control register Port 127
PFC6 Port 6 function control register Port 132
PFC9 Port 9 function control register Port 138
PFC9H Port 9 function control register H Port 138
PFC9L Port 9 function control register L Port 138
PFCE0 Port 0 function control expansion register Port 111
PFCE3 Port 3 function control expansion register Port 117
PFCE4 Port 4 function control expansion register Port 122
PFCE5 Port 5 function control expansion register Port 127
PFCE6 Port 6 function control expansion register Port 132
PFCE9 Port 9 function control expansion register Port 139
PFCE9H Port 9 function control expansion register H Port 139
PFCE9L Port 9 function control expansion register L Port 139
PIC02 Interrupt control register INTC 1222
PIC05 Interrupt control register INTC 1222
PIC07 Interrupt control register INTC 1222
PIC08 Interrupt control register INTC 1222
PIC09 Interrupt control register INTC 1222
PIC10 Interrupt control register INTC 1222
PIC11 Interrupt control register INTC 1222
PIC14 Interrupt control register INTC 1222
PIC15 Interrupt control register INTC 1222
PIC16 Interrupt control register INTC 1222
PLLCTL PLL control register CG 162
PLLS PLL lockup time specification register CG 165
PM0 Port 0 mode register Port 109
PM1 Port 1 mode register Port 113
PM3 Port 3 mode register Port 115
PM4 Port 4 mode register Port 121
PM5 Port 5 mode register Port 125
PM6 Port 6 mode register Port 131
(21/34)
Symbol Name Unit Page
PM7H Port 7 mode register H Port 134
PM7L Port 7 mode register L Port 134
PM9 Port 9 mode register Port 137
PM9H Port 9 mode register H Port 137
PM9L Port 9 mode register L Port 137
PMC0 Port 0 mode control register Port 110
PMC3 Port 3 mode control register Port 116
PMC4 Port 4 mode control register Port 122
PMC5 Port 5 mode control register Port 126
PMC6 Port 6 mode control register Port 131
PMC9 Port 9 mode control register Port 137
PMC9H Port 9 mode control register H Port 137
PMC9L Port 9 mode control register L Port 137
PMDL Port DL mode register Port 143
PMDLH Port DL mode register H Port 143
PMDLL Port DL mode register L Port 143
PRCMD Command register CPU 93
PRSCM0 Prescaler compare register 0 BRG 606
PRSCM1 Prescaler compare register 1 BRG 763
PRSCM2 Prescaler compare register 2 BRG 763
PRSCM3 Prescaler compare register 3 BRG 763
PRSM0 Prescaler mode register 0 BRG 605
PRSM1 Prescaler mode register 1 BRG 762
PRSM2 Prescaler mode register 2 BRG 762
PRSM3 Prescaler mode register 3 BRG 762
PSC Power save control register CG 1249
PSMR Power save mode register CG 1250
PSW Program status word CPU 62
r0-r31 General-purpose registers CPU 58
RAMS Internal RAM data status register LVI 1285
RC1ALH Alarm hour setting register RTC 603
RC1ALM Alarm minute setting register RTC 603
RC1ALW Alarm day-of week setting register RTC 604
RC1CC0 Real-time counter control register 0 RTC 592
RC1CC1 Real-time counter control register 1 RTC 592
RC1CC2 Real-time counter control register 2 RTC 594
RC1CC3 Real-time counter control register 3 RTC 595
RC1DAY Day count register RTC 599
RC1HOUR Hour count register RTC 597
RC1MIN Minute count register RTC 597
RC1MONTH Month count register RTC 601
RC1SEC Second count register RTC 596
RC1SUBC Sub-count register RTC 596
RC1SUBU Watch error correction register RTC 602
(22/34)
Symbol Name Unit Page
(23/34)
Symbol Name Unit Page
TAA2CCIC0 Interrupt control register INTC 1222
TAA2CCIC1 Interrupt control register INTC 1222
TAA2CCR0 TAA2 capture/compare register 0 Timer 181
TAA2CCR1 TAA2 capture/compare register 1 Timer 183
TAA2CNT TAA2 counter read buffer register Timer 185
TAA2CTL0 TAA2 control register 0 Timer 172
TAA2CTL1 TAA2 control register 1 Timer 173
TAA2IOC0 TAA2 I/O control register 0 Timer 175
TAA2IOC1 TAA2 I/O control register 1 Timer 176
TAA2IOC2 TAA2 I/O control register 2 Timer 177
TAA2IOC4 TAA2 I/O control register 4 Timer 178
TAA2OPT0 TAA2 option register 0 Timer 179
TAA2OPT1 TAA2 option register 1 Timer 180
TAA2OVIC Interrupt control register INTC 1222
TAA4CCIC0 Interrupt control register INTC 1222
TAA4CCIC1 Interrupt control register INTC 1222
TAA4CCR0 TAA4 capture/compare register 0 Timer 181
TAA4CCR1 TAA4 capture/compare register 1 Timer 183
TAA4CNT TAA4 counter read buffer register Timer 185
TAA4CTL0 TAA4 control register 0 Timer 172
TAA4CTL1 TAA4 control register 1 Timer 173
TAA4OVIC Interrupt control register INTC 1222
TAB1CCIC0 Interrupt control register INTC 1222
TAB1CCIC1 Interrupt control register INTC 1222
TAB1CCIC2 Interrupt control register INTC 1222
TAB1CCIC3 Interrupt control register INTC 1222
TAB1CCR0 TAB1 capture/compare register 0 Timer 294
TAB1CCR1 TAB1 capture/compare register 1 Timer 296
TAB1CCR2 TAB1 capture/compare register 2 Timer 298
TAB1CCR3 TAB1 capture/compare register 3 Timer 300
TAB1CNT TAB1 counter read buffer register Timer 302
TAB1CTL0 TAB1 control register 0 Timer 287
TAB1CTL1 TAB1 control register 1 Timer 288
TAB1DTC TAB1 dead time compare register 1 Timer 532
TAB1IOC0 TAB1 I/O control register 0 Timer 289
TAB1IOC1 TAB1 I/O control register 1 Timer 290
TAB1IOC2 TAB1 I/O control register 2 Timer 291
TAB1IOC3 TAB1 I/O control register 3 Timer 536
TAB1IOC4 TAB1 I/O control register 4 Timer 292
TAB1OPT0 TAB1 option register 0 Timer 293
TAB1OPT1 TAB1 option register 1 Timer 533
TAB1OPT2 TAB1 option register 2 Timer 534
TAB1OVIC Interrupt control register INTC 1222
TANFC Noise elimination control register Timer 186
(24/34)
Symbol Name Unit Page
TM0CMP0 TMM0 compare register 0 Timer 520
TM0CTL0 TMM0 control register 0 Timer 521
TM0EQIC0 Interrupt control register INTC 1222
TM1CMP0 TMM1 compare register 0 Timer 520
TM1CTL0 TMM1 control register 0 Timer 521
TM1EQIC0 Interrupt control register INTC 1222
TM2CMP0 TMM2 compare register 0 Timer 520
TM2CTL0 TMM2 control register 0 Timer 521
TM2EQIC0 Interrupt control register INTC 1222
TM3CMP0 TMM3 compare register 0 Timer 520
TM3CTL0 TMM3 control register 0 Timer 521
TM3EQIC0 Interrupt control register INTC 1222
TTNFC Noise elimination control register Timer 410
TRXIC0 Interrupt control register INTC 1222
TT0CCIC0 Interrupt control register INTC 1222
TT0CCIC1 Interrupt control register INTC 1222
TT0CCR0 TMT0 capture/compare register 0 Timer 405
TT0CCR1 TMT0 capture/compare register 1 Timer 407
TT0CNT TMT0 counter read buffer register Timer 409
TT0CTL0 TMT0 control register 0 Timer 391
TT0CTL1 TMT0 control register 1 Timer 392
TT0CTL2 TMT0 control register 2 Timer 394
TT0IECIC Interrupt control register INTC 1222
TT0IOC0 TMT0 I/O control register 0 Timer 396
TT0IOC1 TMT0 I/O control register 1 Timer 398
TT0IOC2 TMT0 I/O control register 2 Timer 399
TT0IOC3 TMT0 I/O control register 3 Timer 400
TT0OPT0 TMT0 option register 0 Timer 402
TT0OPT1 TMT0 option register 1 Timer 403
TT0OVIC Interrupt control register INTC 1222
TT0TCW TMT0 count write register Timer 409
UC0CTL0 UARTC0 control register 0 UARTC 679
UC0CTL1 UARTC0 control register 1 UARTC 707
UC0CTL2 UARTC0 control register 2 UARTC 708
UC0OPT0 UARTC0 option control register 0 UARTC 681
UC0OPT1 UARTC0 option control register 1 UARTC 683
UC0RIC Interrupt control register INTC 1222
UC0RX UARTC0 receive data register UARTC 687
UC0RXL UARTC0 receive data register L UARTC 687
UC0STR UARTC0 status register UARTC 685
UC0TIC Interrupt control register INTC 1222
UC0TX UARTC0 transmit data register UARTC 688
UC0TX UARTC0 transmit data register L UARTC 688
(25/34)
Symbol Name Unit Page
UC2CTL0 UARTC2 control register 0 UARTC 679
UC2CTL1 UARTC2 control register 1 UARTC 707
UC2CTL2 UARTC2 control register 2 UARTC 708
UC2OPT0 UARTC2 option control register 0 UARTC 681
UC2OPT1 UARTC2 option control register 1 UARTC 683
UC2RIC Interrupt control register INTC 1222
UC2RX UARTC2 receive data register UARTC 687
UC2RXL UARTC2 receive data register L UARTC 687
UC2STR UARTC2 status register UARTC 685
UC2TIC Interrupt control register INTC 1222
UC2TX UARTC2 transmit data register UARTC 688
UC2TXL UARTC2 transmit data register L UARTC 688
UC4CTL0 UARTC4 control register 0 UARTC 679
UC4CTL1 UARTC4 control register 1 UARTC 707
UC4CTL2 UARTC4 control register 2 UARTC 708
UC4OPT0 UARTC4 option control register 0 UARTC 681
UC4OPT1 UARTC4 option control register 1 UARTC 683
UC4RIC Interrupt control register INTC 1222
UC4RX UARTC4 receive data register UARTC 687
UC4RXL UARTC4 receive data register L UARTC 687
UC4STR UARTC4 status register UARTC 685
UC4TIC Interrupt control register INTC 1222
UC4TX UARTC4 transmit data register UARTC 688
UC4TXL UARTC4 transmit data register L UARTC 688
UCKSEL USB clock select register USBF 1009
UF0AAS UF0 active alternative setting register USBF 1075
UF0ADRS UF0 address register USBF 1112
UF0AIFN UF0 active interface number register USBF 1074
UF0ASS UF0 alternative setting status register USBF 1076
UF0BI1 UF0 bulk-in 1 register USBF 1095
UF0BI2 UF0 bulk-in 2 register USBF 1099
UF0BO1 UF0 bulk-out 1 register USBF 1088
UF0BO1L UF0 bulk-out 1 length register USBF 1091
UF0BO2 UF0 bulk-out 2 register USBF 1092
UF0BO2L UF0 bulk-out 2 length register USBF 1095
UF0CIE0 UF0 configuration/interface/endpoint descriptor register 0 USBF 1118
UF0CIE1 UF0 configuration/interface/endpoint descriptor register 1 USBF 1118
UF0CIE2 UF0 configuration/interface/endpoint descriptor register 2 USBF 1118
UF0CIE3 UF0 configuration/interface/endpoint descriptor register 3 USBF 1118
UF0CIE4 UF0 configuration/interface/endpoint descriptor register 4 USBF 1118
UF0CIE5 UF0 configuration/interface/endpoint descriptor register 5 USBF 1118
UF0CIE6 UF0 configuration/interface/endpoint descriptor register 6 USBF 1118
(26/34)
Symbol Name Unit Page
UF0CIE8 UF0 configuration/interface/endpoint descriptor register 8 USBF 1118
UF0CIE9 UF0 configuration/interface/endpoint descriptor register 9 USBF 1118
UF0CIE10 UF0 configuration/interface/endpoint descriptor register 10 USBF 1118
UF0CIE11 UF0 configuration/interface/endpoint descriptor register 11 USBF 1118
UF0CIE12 UF0 configuration/interface/endpoint descriptor register 12 USBF 1118
UF0CIE13 UF0 configuration/interface/endpoint descriptor register 13 USBF 1118
UF0CIE14 UF0 configuration/interface/endpoint descriptor register 14 USBF 1118
UF0CIE15 UF0 configuration/interface/endpoint descriptor register 15 USBF 1118
UF0CIE16 UF0 configuration/interface/endpoint descriptor register 16 USBF 1118
UF0CIE17 UF0 configuration/interface/endpoint descriptor register 17 USBF 1118
UF0CIE18 UF0 configuration/interface/endpoint descriptor register 18 USBF 1118
UF0CIE19 UF0 configuration/interface/endpoint descriptor register 19 USBF 1118
UF0CIE20 UF0 configuration/interface/endpoint descriptor register 20 USBF 1118
UF0CIE21 UF0 configuration/interface/endpoint descriptor register 21 USBF 1118
UF0CIE22 UF0 configuration/interface/endpoint descriptor register 22 USBF 1118
UF0CIE23 UF0 configuration/interface/endpoint descriptor register 23 USBF 1118
UF0CIE24 UF0 configuration/interface/endpoint descriptor register 24 USBF 1118
UF0CIE25 UF0 configuration/interface/endpoint descriptor register 25 USBF 1118
UF0CIE26 UF0 configuration/interface/endpoint descriptor register 26 USBF 1118
UF0CIE27 UF0 configuration/interface/endpoint descriptor register 27 USBF 1118
UF0CIE28 UF0 configuration/interface/endpoint descriptor register 28 USBF 1118
UF0CIE29 UF0 configuration/interface/endpoint descriptor register 29 USBF 1118
UF0CIE30 UF0 configuration/interface/endpoint descriptor register 30 USBF 1118
UF0CIE31 UF0 configuration/interface/endpoint descriptor register 31 USBF 1118
UF0CIE32 UF0 configuration/interface/endpoint descriptor register 32 USBF 1118
UF0CIE33 UF0 configuration/interface/endpoint descriptor register 33 USBF 1118
UF0CIE34 UF0 configuration/interface/endpoint descriptor register 34 USBF 1118
UF0CIE35 UF0 configuration/interface/endpoint descriptor register 35 USBF 1118
UF0CIE36 UF0 configuration/interface/endpoint descriptor register 36 USBF 1118
UF0CIE37 UF0 configuration/interface/endpoint descriptor register 37 USBF 1118
UF0CIE38 UF0 configuration/interface/endpoint descriptor register 38 USBF 1118
UF0CIE39 UF0 configuration/interface/endpoint descriptor register 39 USBF 1118
UF0CIE40 UF0 configuration/interface/endpoint descriptor register 40 USBF 1118
UF0CIE41 UF0 configuration/interface/endpoint descriptor register 41 USBF 1118
UF0CIE42 UF0 configuration/interface/endpoint descriptor register 42 USBF 1118
UF0CIE43 UF0 configuration/interface/endpoint descriptor register 43 USBF 1118
UF0CIE44 UF0 configuration/interface/endpoint descriptor register 44 USBF 1118
UF0CIE45 UF0 configuration/interface/endpoint descriptor register 45 USBF 1118
UF0CIE46 UF0 configuration/interface/endpoint descriptor register 46 USBF 1118
UF0CIE47 UF0 configuration/interface/endpoint descriptor register 47 USBF 1118
UF0CIE48 UF0 configuration/interface/endpoint descriptor register 48 USBF 1118
(27/34)
Symbol Name Unit Page
UF0CIE49 UF0 configuration/interface/endpoint descriptor register 49 USBF 1118
UF0CIE50 UF0 configuration/interface/endpoint descriptor register 50 USBF 1118
UF0CIE51 UF0 configuration/interface/endpoint descriptor register 51 USBF 1118
UF0CIE52 UF0 configuration/interface/endpoint descriptor register 52 USBF 1118
UF0CIE53 UF0 configuration/interface/endpoint descriptor register 53 USBF 1118
UF0CIE54 UF0 configuration/interface/endpoint descriptor register 54 USBF 1118
UF0CIE55 UF0 configuration/interface/endpoint descriptor register 55 USBF 1118
UF0CIE56 UF0 configuration/interface/endpoint descriptor register 56 USBF 1118
UF0CIE57 UF0 configuration/interface/endpoint descriptor register 57 USBF 1118
UF0CIE58 UF0 configuration/interface/endpoint descriptor register 58 USBF 1118
UF0CIE59 UF0 configuration/interface/endpoint descriptor register 59 USBF 1118
UF0CIE60 UF0 configuration/interface/endpoint descriptor register 60 USBF 1118
UF0CIE61 UF0 configuration/interface/endpoint descriptor register 61 USBF 1118
UF0CIE62 UF0 configuration/interface/endpoint descriptor register 62 USBF 1118
UF0CIE63 UF0 configuration/interface/endpoint descriptor register 63 USBF 1118
UF0CIE64 UF0 configuration/interface/endpoint descriptor register 64 USBF 1118
UF0CIE65 UF0 configuration/interface/endpoint descriptor register 65 USBF 1118
UF0CIE66 UF0 configuration/interface/endpoint descriptor register 66 USBF 1118
UF0CIE67 UF0 configuration/interface/endpoint descriptor register 67 USBF 1118
UF0CIE68 UF0 configuration/interface/endpoint descriptor register 68 USBF 1118
UF0CIE69 UF0 configuration/interface/endpoint descriptor register 69 USBF 1118
UF0CIE70 UF0 configuration/interface/endpoint descriptor register 70 USBF 1118
UF0CIE71 UF0 configuration/interface/endpoint descriptor register 71 USBF 1118
UF0CIE72 UF0 configuration/interface/endpoint descriptor register 72 USBF 1118
UF0CIE73 UF0 configuration/interface/endpoint descriptor register 73 USBF 1118
UF0CIE74 UF0 configuration/interface/endpoint descriptor register 74 USBF 1118
UF0CIE75 UF0 configuration/interface/endpoint descriptor register 75 USBF 1118
UF0CIE76 UF0 configuration/interface/endpoint descriptor register 76 USBF 1118
UF0CIE77 UF0 configuration/interface/endpoint descriptor register 77 USBF 1118
UF0CIE78 UF0 configuration/interface/endpoint descriptor register 78 USBF 1118
UF0CIE79 UF0 configuration/interface/endpoint descriptor register 79 USBF 1118
UF0CIE80 UF0 configuration/interface/endpoint descriptor register 80 USBF 1118
UF0CIE81 UF0 configuration/interface/endpoint descriptor register 81 USBF 1118
UF0CIE82 UF0 configuration/interface/endpoint descriptor register 82 USBF 1118
UF0CIE83 UF0 configuration/interface/endpoint descriptor register 83 USBF 1118
UF0CIE84 UF0 configuration/interface/endpoint descriptor register 84 USBF 1118
UF0CIE85 UF0 configuration/interface/endpoint descriptor register 85 USBF 1118
UF0CIE86 UF0 configuration/interface/endpoint descriptor register 86 USBF 1118
UF0CIE87 UF0 configuration/interface/endpoint descriptor register 87 USBF 1118
UF0CIE88 UF0 configuration/interface/endpoint descriptor register 88 USBF 1118
UF0CIE89 UF0 configuration/interface/endpoint descriptor register 89 USBF 1118
(28/34)
Symbol Name Unit Page
UF0CIE90 UF0 configuration/interface/endpoint descriptor register 90 USBF 1118
UF0CIE91 UF0 configuration/interface/endpoint descriptor register 91 USBF 1118
UF0CIE92 UF0 configuration/interface/endpoint descriptor register 92 USBF 1118
UF0CIE93 UF0 configuration/interface/endpoint descriptor register 93 USBF 1118
UF0CIE94 UF0 configuration/interface/endpoint descriptor register 94 USBF 1118
UF0CIE95 UF0 configuration/interface/endpoint descriptor register 95 USBF 1118
UF0CIE96 UF0 configuration/interface/endpoint descriptor register 96 USBF 1118
UF0CIE97 UF0 configuration/interface/endpoint descriptor register 97 USBF 1118
UF0CIE98 UF0 configuration/interface/endpoint descriptor register 98 USBF 1118
UF0CIE99 UF0 configuration/interface/endpoint descriptor register 99 USBF 1118
UF0CIE100 UF0 configuration/interface/endpoint descriptor register 100 USBF 1118
UF0CIE101 UF0 configuration/interface/endpoint descriptor register 101 USBF 1118
UF0CIE102 UF0 configuration/interface/endpoint descriptor register 102 USBF 1118
UF0CIE103 UF0 configuration/interface/endpoint descriptor register 103 USBF 1118
UF0CIE104 UF0 configuration/interface/endpoint descriptor register 104 USBF 1118
UF0CIE105 UF0 configuration/interface/endpoint descriptor register 105 USBF 1118
UF0CIE106 UF0 configuration/interface/endpoint descriptor register 106 USBF 1118
UF0CIE107 UF0 configuration/interface/endpoint descriptor register 107 USBF 1118
UF0CIE108 UF0 configuration/interface/endpoint descriptor register 108 USBF 1118
UF0CIE109 UF0 configuration/interface/endpoint descriptor register 109 USBF 1118
UF0CIE110 UF0 configuration/interface/endpoint descriptor register 110 USBF 1118
UF0CIE111 UF0 configuration/interface/endpoint descriptor register 111 USBF 1118
UF0CIE112 UF0 configuration/interface/endpoint descriptor register 112 USBF 1118
UF0CIE113 UF0 configuration/interface/endpoint descriptor register 113 USBF 1118
UF0CIE114 UF0 configuration/interface/endpoint descriptor register 114 USBF 1118
UF0CIE115 UF0 configuration/interface/endpoint descriptor register 115 USBF 1118
UF0CIE116 UF0 configuration/interface/endpoint descriptor register 116 USBF 1118
UF0CIE117 UF0 configuration/interface/endpoint descriptor register 117 USBF 1118
UF0CIE118 UF0 configuration/interface/endpoint descriptor register 118 USBF 1118
UF0CIE119 UF0 configuration/interface/endpoint descriptor register 119 USBF 1118
UF0CIE120 UF0 configuration/interface/endpoint descriptor register 120 USBF 1118
UF0CIE121 UF0 configuration/interface/endpoint descriptor register 121 USBF 1118
UF0CIE122 UF0 configuration/interface/endpoint descriptor register 122 USBF 1118
UF0CIE123 UF0 configuration/interface/endpoint descriptor register 123 USBF 1118
UF0CIE124 UF0 configuration/interface/endpoint descriptor register 124 USBF 1118
UF0CIE125 UF0 configuration/interface/endpoint descriptor register 125 USBF 1118
UF0CIE126 UF0 configuration/interface/endpoint descriptor register 126 USBF 1118
UF0CIE127 UF0 configuration/interface/endpoint descriptor register 127 USBF 1118
UF0CIE128 UF0 configuration/interface/endpoint descriptor register 128 USBF 1118
UF0CIE129 UF0 configuration/interface/endpoint descriptor register 129 USBF 1118
UF0CIE130 UF0 configuration/interface/endpoint descriptor register 130 USBF 1118
(29/34)
Symbol Name Unit Page
UF0CIE131 UF0 configuration/interface/endpoint descriptor register 131 USBF 1118
UF0CIE132 UF0 configuration/interface/endpoint descriptor register 132 USBF 1118
UF0CIE133 UF0 configuration/interface/endpoint descriptor register 133 USBF 1118
UF0CIE134 UF0 configuration/interface/endpoint descriptor register 134 USBF 1118
UF0CIE135 UF0 configuration/interface/endpoint descriptor register 135 USBF 1118
UF0CIE136 UF0 configuration/interface/endpoint descriptor register 136 USBF 1118
UF0CIE137 UF0 configuration/interface/endpoint descriptor register 137 USBF 1118
UF0CIE138 UF0 configuration/interface/endpoint descriptor register 138 USBF 1118
UF0CIE139 UF0 configuration/interface/endpoint descriptor register 139 USBF 1118
UF0CIE140 UF0 configuration/interface/endpoint descriptor register 140 USBF 1118
UF0CIE141 UF0 configuration/interface/endpoint descriptor register 141 USBF 1118
UF0CIE142 UF0 configuration/interface/endpoint descriptor register 142 USBF 1118
UF0CIE143 UF0 configuration/interface/endpoint descriptor register 143 USBF 1118
UF0CIE144 UF0 configuration/interface/endpoint descriptor register 144 USBF 1118
UF0CIE145 UF0 configuration/interface/endpoint descriptor register 145 USBF 1118
UF0CIE146 UF0 configuration/interface/endpoint descriptor register 146 USBF 1118
UF0CIE147 UF0 configuration/interface/endpoint descriptor register 147 USBF 1118
UF0CIE148 UF0 configuration/interface/endpoint descriptor register 148 USBF 1118
UF0CIE149 UF0 configuration/interface/endpoint descriptor register 149 USBF 1118
UF0CIE150 UF0 configuration/interface/endpoint descriptor register 150 USBF 1118
UF0CIE151 UF0 configuration/interface/endpoint descriptor register 151 USBF 1118
UF0CIE152 UF0 configuration/interface/endpoint descriptor register 152 USBF 1118
UF0CIE153 UF0 configuration/interface/endpoint descriptor register 153 USBF 1118
UF0CIE154 UF0 configuration/interface/endpoint descriptor register 154 USBF 1118
UF0CIE155 UF0 configuration/interface/endpoint descriptor register 155 USBF 1118
UF0CIE156 UF0 configuration/interface/endpoint descriptor register 156 USBF 1118
UF0CIE157 UF0 configuration/interface/endpoint descriptor register 157 USBF 1118
UF0CIE158 UF0 configuration/interface/endpoint descriptor register 158 USBF 1118
UF0CIE159 UF0 configuration/interface/endpoint descriptor register 159 USBF 1118
UF0CIE160 UF0 configuration/interface/endpoint descriptor register 160 USBF 1118
UF0CIE161 UF0 configuration/interface/endpoint descriptor register 161 USBF 1118
UF0CIE162 UF0 configuration/interface/endpoint descriptor register 162 USBF 1118
UF0CIE163 UF0 configuration/interface/endpoint descriptor register 163 USBF 1118
UF0CIE164 UF0 configuration/interface/endpoint descriptor register 164 USBF 1118
UF0CIE165 UF0 configuration/interface/endpoint descriptor register 165 USBF 1118
UF0CIE166 UF0 configuration/interface/endpoint descriptor register 166 USBF 1118
UF0CIE167 UF0 configuration/interface/endpoint descriptor register 167 USBF 1118
UF0CIE168 UF0 configuration/interface/endpoint descriptor register 168 USBF 1118
UF0CIE169 UF0 configuration/interface/endpoint descriptor register 169 USBF 1118
UF0CIE170 UF0 configuration/interface/endpoint descriptor register 170 USBF 1118
(30/34)
Symbol Name Unit Page
UF0CIE171 UF0 configuration/interface/endpoint descriptor register 171 USBF 1118
UF0CIE172 UF0 configuration/interface/endpoint descriptor register 172 USBF 1118
UF0CIE173 UF0 configuration/interface/endpoint descriptor register 173 USBF 1118
UF0CIE174 UF0 configuration/interface/endpoint descriptor register 174 USBF 1118
UF0CIE175 UF0 configuration/interface/endpoint descriptor register 175 USBF 1118
UF0CIE176 UF0 configuration/interface/endpoint descriptor register 176 USBF 1118
UF0CIE177 UF0 configuration/interface/endpoint descriptor register 177 USBF 1118
UF0CIE178 UF0 configuration/interface/endpoint descriptor register 178 USBF 1118
UF0CIE179 UF0 configuration/interface/endpoint descriptor register 179 USBF 1118
UF0CIE180 UF0 configuration/interface/endpoint descriptor register 180 USBF 1118
UF0CIE181 UF0 configuration/interface/endpoint descriptor register 181 USBF 1118
UF0CIE182 UF0 configuration/interface/endpoint descriptor register 182 USBF 1118
UF0CIE183 UF0 configuration/interface/endpoint descriptor register 183 USBF 1118
UF0CIE184 UF0 configuration/interface/endpoint descriptor register 184 USBF 1118
UF0CIE185 UF0 configuration/interface/endpoint descriptor register 185 USBF 1118
UF0CIE186 UF0 configuration/interface/endpoint descriptor register 186 USBF 1118
UF0CIE187 UF0 configuration/interface/endpoint descriptor register 187 USBF 1118
UF0CIE188 UF0 configuration/interface/endpoint descriptor register 188 USBF 1118
UF0CIE189 UF0 configuration/interface/endpoint descriptor register 189 USBF 1118
UF0CIE190 UF0 configuration/interface/endpoint descriptor register 190 USBF 1118
UF0CIE191 UF0 configuration/interface/endpoint descriptor register 191 USBF 1118
UF0CIE192 UF0 configuration/interface/endpoint descriptor register 192 USBF 1118
UF0CIE193 UF0 configuration/interface/endpoint descriptor register 193 USBF 1118
UF0CIE194 UF0 configuration/interface/endpoint descriptor register 194 USBF 1118
UF0CIE195 UF0 configuration/interface/endpoint descriptor register 195 USBF 1118
UF0CIE196 UF0 configuration/interface/endpoint descriptor register 196 USBF 1118
UF0CIE197 UF0 configuration/interface/endpoint descriptor register 197 USBF 1118
UF0CIE198 UF0 configuration/interface/endpoint descriptor register 198 USBF 1118
UF0CIE199 UF0 configuration/interface/endpoint descriptor register 199 USBF 1118
UF0CIE200 UF0 configuration/interface/endpoint descriptor register 200 USBF 1118
UF0CIE201 UF0 configuration/interface/endpoint descriptor register 201 USBF 1118
UF0CIE202 UF0 configuration/interface/endpoint descriptor register 202 USBF 1118
UF0CIE203 UF0 configuration/interface/endpoint descriptor register 203 USBF 1118
UF0CIE204 UF0 configuration/interface/endpoint descriptor register 204 USBF 1118
UF0CIE205 UF0 configuration/interface/endpoint descriptor register 205 USBF 1118
UF0CIE206 UF0 configuration/interface/endpoint descriptor register 206 USBF 1118
UF0CIE207 UF0 configuration/interface/endpoint descriptor register 207 USBF 1118
UF0CIE208 UF0 configuration/interface/endpoint descriptor register 208 USBF 1118
UF0CIE209 UF0 configuration/interface/endpoint descriptor register 209 USBF 1118
UF0CIE210 UF0 configuration/interface/endpoint descriptor register 210 USBF 1118
UF0CIE211 UF0 configuration/interface/endpoint descriptor register 211 USBF 1118
(31/34)
Symbol Name Unit Page
UF0CIE212 UF0 configuration/interface/endpoint descriptor register 212 USBF 1118
UF0CIE213 UF0 configuration/interface/endpoint descriptor register 213 USBF 1118
UF0CIE214 UF0 configuration/interface/endpoint descriptor register 214 USBF 1118
UF0CIE215 UF0 configuration/interface/endpoint descriptor register 215 USBF 1118
UF0CIE216 UF0 configuration/interface/endpoint descriptor register 216 USBF 1118
UF0CIE217 UF0 configuration/interface/endpoint descriptor register 217 USBF 1118
UF0CIE218 UF0 configuration/interface/endpoint descriptor register 218 USBF 1118
UF0CIE219 UF0 configuration/interface/endpoint descriptor register 219 USBF 1118
UF0CIE220 UF0 configuration/interface/endpoint descriptor register 220 USBF 1118
UF0CIE221 UF0 configuration/interface/endpoint descriptor register 221 USBF 1118
UF0CIE222 UF0 configuration/interface/endpoint descriptor register 222 USBF 1118
UF0CIE223 UF0 configuration/interface/endpoint descriptor register 223 USBF 1118
UF0CIE224 UF0 configuration/interface/endpoint descriptor register 224 USBF 1118
UF0CIE225 UF0 configuration/interface/endpoint descriptor register 225 USBF 1118
UF0CIE226 UF0 configuration/interface/endpoint descriptor register 226 USBF 1118
UF0CIE227 UF0 configuration/interface/endpoint descriptor register 227 USBF 1118
UF0CIE228 UF0 configuration/interface/endpoint descriptor register 228 USBF 1118
UF0CIE229 UF0 configuration/interface/endpoint descriptor register 229 USBF 1118
UF0CIE230 UF0 configuration/interface/endpoint descriptor register 230 USBF 1118
UF0CIE231 UF0 configuration/interface/endpoint descriptor register 231 USBF 1118
UF0CIE232 UF0 configuration/interface/endpoint descriptor register 232 USBF 1118
UF0CIE233 UF0 configuration/interface/endpoint descriptor register 233 USBF 1118
UF0CIE234 UF0 configuration/interface/endpoint descriptor register 234 USBF 1118
UF0CIE235 UF0 configuration/interface/endpoint descriptor register 235 USBF 1118
UF0CIE236 UF0 configuration/interface/endpoint descriptor register 236 USBF 1118
UF0CIE237 UF0 configuration/interface/endpoint descriptor register 237 USBF 1118
UF0CIE238 UF0 configuration/interface/endpoint descriptor register 238 USBF 1118
UF0CIE239 UF0 configuration/interface/endpoint descriptor register 239 USBF 1118
UF0CIE240 UF0 configuration/interface/endpoint descriptor register 240 USBF 1118
UF0CIE241 UF0 configuration/interface/endpoint descriptor register 241 USBF 1118
UF0CIE242 UF0 configuration/interface/endpoint descriptor register 242 USBF 1118
UF0CIE243 UF0 configuration/interface/endpoint descriptor register 243 USBF 1118
UF0CIE244 UF0 configuration/interface/endpoint descriptor register 244 USBF 1118
UF0CIE245 UF0 configuration/interface/endpoint descriptor register 245 USBF 1118
UF0CIE246 UF0 configuration/interface/endpoint descriptor register 246 USBF 1118
UF0CIE247 UF0 configuration/interface/endpoint descriptor register 247 USBF 1118
UF0CIE248 UF0 configuration/interface/endpoint descriptor register 248 USBF 1118
UF0CIE249 UF0 configuration/interface/endpoint descriptor register 249 USBF 1118
UF0CIE250 UF0 configuration/interface/endpoint descriptor register 250 USBF 1118
UF0CIE251 UF0 configuration/interface/endpoint descriptor register 251 USBF 1118
UF0CIE252 UF0 configuration/interface/endpoint descriptor register 252 USBF 1118
(32/34)
Symbol Name Unit Page
UF0CIE253 UF0 configuration/interface/endpoint descriptor register 253 USBF 1118
UF0CIE254 UF0 configuration/interface/endpoint descriptor register 254 USBF 1118
UF0CIE255 UF0 configuration/interface/endpoint descriptor register 255 USBF 1118
UF0CLR UF0 CLR request register USBF 1039
UF0CNF UF0 configuration register USBF 1113
UF0DD0 UF0 device descriptor register 0 USBF 1117
UF0DD1 UF0 device descriptor register 1 USBF 1117
UF0DD2 UF0 device descriptor register 2 USBF 1117
UF0DD3 UF0 device descriptor register 3 USBF 1117
UF0DD4 UF0 device descriptor register 4 USBF 1117
UF0DD5 UF0 device descriptor register 5 USBF 1117
UF0DD6 UF0 device descriptor register 6 USBF 1117
UF0DD7 UF0 device descriptor register 7 USBF 1117
UF0DD8 UF0 device descriptor register 8 USBF 1117
UF0DD9 UF0 device descriptor register 9 USBF 1117
UF0DD10 UF0 device descriptor register 10 USBF 1117
UF0DD11 UF0 device descriptor register 11 USBF 1117
UF0DD12 UF0 device descriptor register 12 USBF 1117
UF0DD13 UF0 device descriptor register 13 USBF 1117
UF0DD14 UF0 device descriptor register 14 USBF 1117
UF0DD15 UF0 device descriptor register 15 USBF 1117
UF0DD16 UF0 device descriptor register 16 USBF 1117
UF0DD17 UF0 device descriptor register 17 USBF 1117
UF0DEND UF0 data end register USBF 1069
UF0DMS0 UF0 DMA status 0 register USBF 1065
UF0DMS1 UF0 DMA status 1 register USBF 1066
UF0DSCL UF0 descriptor length register USBF 1116
UF0DSTL UF0 device status register L USBF 1105
UF0E0L UF0 EP0 length register USBF 1083
UF0E0N UF0 EP0NAK register USBF 1030
UF0E0NA UF0 EP0NAKALL register USBF 1032
UF0E0R UF0 EP0 read register USBF 1082
UF0E0SL UF0 EP0 status register L USBF 1106
UF0E0ST UF0 EP0 setup register USBF 1084
UF0E0W UF0 EP0 write register USBF 1096
UF0E1DC1 EP1 DMA control register 1 USBF 1124
UF0E1DC2 EP1 DMA control register 2 USBF 1126
UF0E1IM UF0 endpoint 1 interface mapping register USBF 1078
UF0E1SL UF0 EP1 status register L USBF 1108
UF0E2DC1 EP2 DMA control register 1 USBF 1124
UF0E2DC2 EP2 DMA control register 2 USBF 1126
(33/34)
Symbol Name Unit Page
UF0E2IM UF0 endpoint 2 interface mapping register USBF 1079
UF0E2SL UF0 EP2 status register L USBF 1109
UF0E3DC1 EP3 DMA control register 1 USBF 1124
UF0E3DC2 EP3 DMA control register 2 USBF 1126
UF0E3IM UF0 endpoint 3 interface mapping register USBF 1079
UF0E3SL UF0 EP3 status register L USBF 1109
UF0E4DC1 EP4 DMA control register 1 USBF 1124
UF0E4DC2 EP4 DMA control register 2 USBF 1126
UF0E4IM UF0 endpoint 4 interface mapping register USBF 1080
UF0E4SL UF0 EP4 status register L USBF 1100
UF0E7IM UF0 endpoint 7 interface mapping register USBF 1081
UF0E7SL UF0 EP7 status register L USBF 1111
UF0EN UF0 EPNAK register USBF 1033
UF0ENM UF0 EPNAK mask register USBF 1037
UF0EP1BI UF0 EP1 bulk-in transfer data register USBF 1128
UF0EP2BO UF0 EP2 bulk-out transfer data register USBF 1129
UF0EP3BI UF0 EP3 bulk-in transfer data register USBF 1128
UF0EP4BO UF0 EP4 bulk-out transfer data register USBF 1130
UF0EPS0 UF0 EP status 0 register USBF 1041
UF0EPS1 UF0 EP status 1 register USBF 1043
UF0EPS2 UF0 EP status 2 register USBF 1044
UF0FIC0 UF0 FIFO clear 0 register USBF 1067
UF0FIC1 UF0 FIFO clear 1 register USBF 1068
UF0GPR UF0 GPR register USBF 1071
UF0IC0 UF0 INT clear 0 register USBF 1058
UF0IC1 UF0 INT clear 1 register USBF 1059
UF0IC2 UF0 INT clear 2 register USBF 1060
UF0IC3 UF0 INT clear 3 register USBF 1061
UF0IC4 UF0 INT clear 4 register USBF 1062
UF0IDR UF0 INT & DMARQ register USBF 1063
UF0IF0 UF0 interface 0 register USBF 1114
UF0IF1 UF0 interface 1 register USBF 1115
UF0IF2 UF0 interface 2 register USBF 1115
UF0IF3 UF0 interface 3 register USBF 1115
UF0IF4 UF0 interface 4 register USBF 1115
UF0IM0 UF0 INT mask 0 register USBF 1053
UF0IM1 UF0 INT mask 1 register USBF 1054
UF0IM2 UF0 INT mask 2 register USBF 1055
UF0IM3 UF0 INT mask 3 register USBF 1056
UF0IM4 UF0 INT mask 4 register USBF 1057
(34/34)
Symbol Name Unit Page
UF0INT1 UF0 interrupt 1 register USBF 1103
UF0IS0 UF0 INT status 0 register USBF 1045
UF0IS1 UF0 INT status 1 register USBF 1047
UF0IS2 UF0 INT status 2 register USBF 1049
UF0IS3 UF0 INT status 3 register USBF 1050
UF0IS4 UF0 INT status 4 register USBF 1052
UF0MODC UF0 mode control register USBF 1072
UF0MODS UF0 mode status register USBF 1073
UF0SDS UF0 SNDSIE register USBF 1038
UF0SET UF0 SET request register USBF 1040
UFCKMSK USB function control register USBF 1009
UFDRQEN USBF DMA request enable register USBF 1131
UFIC0 Interrupt control register INTC 1222
UFIC1 Interrupt control register INTC 1222
VSWC System wait control register CPU 95
WDTE Watchdog timer enable register WDT 623
WDTM2 Watchdog timer mode register 2 WDT 1233
WUPIC0 Interrupt control register INTC 1222
C.1 Conventions
← Input for
GR [ ] General-purpose register
SR [ ] System register
zero-extend (n) Expand n with zeros until word length.
sign-extend (n) Expand n with signs until word length.
load-memory (a, b) Read size b data from address a.
store-memory (a, b, c) Write data b into address a in size c.
load-memory-bit (a, b) Read bit b of address a.
store-memory-bit (a, b, c) Write c to bit b of address a.
saturated (n) Execute saturated processing of n (n is a 2’s complement).
If, as a result of calculations,
n ≥ 7FFFFFFFH, let it be 7FFFFFFFH.
n ≤ 80000000H, let it be 80000000H.
result Reflects the results in a flag.
Byte Byte (8 bits)
Halfword Half word (16 bits)
Word Word (32 bits)
+ Addition
– Subtraction
ll Bit concatenation
× Multiplication
÷ Division
% Remainder from division results
AND Logical product
OR Logical sum
XOR Exclusive OR
NOT Logical negation
logically shift left by Logical shift left
logically shift right by Logical shift right
arithmetically shift right by Arithmetic shift right
i If executing another instruction immediately after executing the first instruction (issue).
r If repeating execution of the same instruction immediately after executing the first instruction (repeat).
l If using the results of instruction execution in the instruction immediately after the execution (latency).
Identifier Explanation
(Blank) No change
0 Clear to 0
X Set or cleared in accordance with the results.
R Previously saved values are restored.
0 0 0 0 OV = 1 Overflow
1 0 0 0 OV = 0 No overflow
0 0 0 1 CY = 1 Carry
Lower (Less than)
1 0 0 1 CY = 0 No carry
Not lower (Greater than or equal)
0 0 1 0 Z=1 Zero
1 0 1 0 Z=0 Not zero
0 0 1 1 (CY or Z) = 1 Not higher (Less than or equal)
1 0 1 1 (CY or Z) = 0 Higher (Greater than)
0 1 0 0 S=1 Negative
1 1 0 0 S=0 Positive
0 1 0 1 − Always (Unconditional)
1 1 0 1 SAT = 1 Saturated
0 1 1 0 (S xor OV) = 1 Less than signed
1 1 1 0 (S xor OV) = 0 Greater than or equal signed
0 1 1 1 ((S xor OV) or Z) = 1 Less than or equal signed
1 1 1 1 ((S xor OV) or Z) = 0 Greater than signed
(1/6)
Mnemonic Operand Opcode Operation Execution Flags
Clock
i r l CY OV S Z SAT
When conditions 1 1 1
are not satisfied
Store-memory-bit(adr,bit#3,0)
Store-memory-bit(adr,reg2,0)
(2/6)
Mnemonic Operand Opcode Operation Execution Flags
Clock
i r l CY OV S Z SAT
DI 0000011111100000 PSW.ID←1 1 1 1
0000000101100000
DISPOSE imm5,list12 0000011001iiiiiL sp←sp+zero-extend(imm5 logically shift left by 2) n+1 n+1 n+1
LLLLLLLLLLL00000 GR[reg in list12]←Load-memory(sp,Word) Note 4 Note 4 Note 4
sp←sp+4
repeat 2 steps above until all regs in list12 is loaded
Note 5 sp←sp+4
repeat 2 steps above until all regs in list12 is loaded
PC←GR[reg1]
× × ×
Note 6
reg1,reg2,reg3 r r rr r1 11 11 1 R RRRR GR[reg2]←GR[reg2]÷GR[reg1] 35 35 35
wwwww01010000000 GR[reg3]←GR[reg2]%GR[reg1]
EI 1000011111100000 PSW.ID←0 1 1 1
0000000101100000
Note 7
Note 7
dddddddddddddddd GR[reg2]←sign-extend(Load-memory(adr,Byte)) 11
dddddddddddddd1 GR[reg2]←zero-extend(Load-memory(adr,Byte)) 11
Notes 8, 10
(3/6)
Mnemonic Operand Opcode Operation Execution Flags
Clock
i r l CY OV S Z SAT
ddddddddddddddd0 GR[reg2]←sign-extend(Load-memory(adr,Halfword)) 11
Note 8
ddddddddddddddd1 GR[reg2]←zero-extend(Load-memory(adr,Halfword) 11
Note 8
ddddddddddddddd1 GR[reg2]←Load-memory(adr,Word) 11
Note 8
Note 13
Note 13
Store-memory-bit(adr,reg2,Z flag)
(4/6)
Mnemonic Operand Opcode Operation Execution Flags
Clock
i r l CY OV S Z SAT
(5/6)
Mnemonic Operand Opcode Operation Execution Flags
Clock
i r l CY OV S Z SAT
Store-memory-bit(adr,bit#3,1)
Store-memory-bit(adr,reg2,1)
GR[reg2]←sign-extend(Load-memory(adr,Byte))
Note 18 GR[reg2]←zero-extend(Load-memory(adr,Byte))
Note 19 GR[reg2]←sign-extend(Load-memory(adr,Halfword))
Note 21 GR[reg2]←Load-memory(adr,Word)
Note 19 Store-memory(adr,GR[reg2],Halfword)
Note 21 Store-memory(adr,GR[reg2],Word)
Note 8
Note 8
(6/6)
Mnemonic Operand Opcode Operation Execution Flags
Clock
i r l CY OV S Z SAT
Notes 12. In this instruction, for convenience of mnemonic description, the source register is made reg2, but the reg1
field is used in the opcode. Therefore, the meaning of register specification in the mnemonic description and
in the opcode differs from other instructions.
rrrrr = regID specification
RRRRR = reg2 specification
13. i i i i i : Lower 5 bits of imm9.
IIII: Higher 4 bits of imm9.
14. Do not specify the same register for general-purpose registers reg1 and reg3.
15. sp/imm: Specified by bits 19 and 20 of the sub-opcode.
16. ff = 00: Load sp in ep.
01: Load sign-expanded 16-bit immediate data (bits 47 to 32) in ep.
10: Load 16-bit logically-left-shifted 16-bit immediate data (bits 47 to 32) in ep.
11: Load 32-bit immediate data (bits 63 to 32) in ep.
17. If imm = imm32, n + 3 clocks.
18. r r r r r : Other than 00000.
19. ddddddd: Higher 7 bits of disp8.
20. dddd: Higher 4 bits of disp5.
21. dddddd: Higher 6 bits of disp8.
C-1
V850ES/JC3-H, V850ES/JE3-H User’s Manual: Hardware
R01UH0288EJ0100