Id 002946
Id 002946
S1C17M30/M31/M32/M33/M34
Technical Manual
Rev. 1.3
NOTICE: PLEASE READ THE FOLLOWING NOTICE CAREFULLY BEFORE USING THIS DOCUMENT
The contents of this document are subject to change without notice.
1. This document may not be copied, reproduced, or used for any other purpose, in whole or in part, without the consent of the Seiko
Epson Corporation (“Epson”).
2. Before purchasing or using Epson products, please contact our sales representative for the latest information and always be sure to
check the latest information published on Epson’s official web sites and other sources.
3. Information provided in this document such as application circuits, programs, usage, etc., are for reference purposes only. Using the
application circuits, programs, usage, etc. in the design of your equipment or systems is your own responsibility. Epson makes no
guarantees against any infringements or damages to any third parties’ intellectual property rights or any other rights resulting from
the information. This document does not grant you any licenses, intellectual property rights or any other rights with respect to Epson
products owned by Epson or any third parties.
4. Epson is committed to constantly improving quality and reliability, but semiconductor products in general are subject to malfunction
and failure. By using Epson products, you shall be responsible for your hardware. Software and systems must be designed well
enough to prevent death or injury as well as any property damage even if any of the malfunctions or failures might be caused by
Epson products. When designing your products using Epson products, please be sure to check and comply with the latest information
regarding Epson products (this document, specifications, data sheets, manuals, Epson’s web site, etc.). When using the information
included above materials such as product data, charts, technical contents, programs, algorithms and application circuit examples, you
shall evaluate your products both on a stand-alone basis as well as within your overall systems. You shall be solely responsible for
deciding whether or not to adopt and use Epson products.
5. Epson has prepared this document and programs provided in this document carefully to be accurate and dependable, but Epson does
not guarantee that the information and the programs are always accurate and complete. Epson assumes no responsibility for any
damages which you incur due to misinformation in this document and the programs.
6. No dismantling, analysis, reverse engineering, modification, alteration, adaptation, reproduction, etc., of Epson products is allowed.
7. Epson products have been designed, developed and manufactured to be used in general electronic applications (office equipment,
communications equipment, measuring instruments, home electronics, etc.) (“General Purpose”) and applications which is
individually listed in this document or designated by Epson (“Designated Purpose”). Epson products are NOT intended for any use
beyond the General Purpose and Designated Purpose uses that requires particular/higher quality or reliability in order to refrain from
causing any malfunction or failure leading to death, injury, serious property damage or severe impact on society, including, but not
limited to those listed below (“Particular Purpose”). Therefore, you are advised to use Epson products only for General Purpose
and Designated Purpose uses. Should you desire to buy and use Epson products for a Particular Purpose, Epson makes no warranty
and disclaims with respect to Epson products, whether express or implied, including without limitation any implied warranty of
merchantability or fitness for any Particular Purpose. Please be sure to contact our sales representative and obtain approval in
advance.
[Examples of Particular Purpose]
Space equipment (artificial satellites, rockets, etc.) /
Transportation vehicles and their control equipment (automobiles, aircraft, trains, ships, etc.) /
Medical equipment / Relay equipment to be placed on ocean floor /
Power station control equipment / Disaster or crime prevention equipment / Traffic control equipment / Financial equipment
Other applications requiring similar levels of reliability as those listed above. Please be sure to contact our sales representative for
details of the other applications.
8. Epson products listed in this document and our associated technologies shall not be used in any equipment or systems that laws and
regulations in Japan or any other countries prohibit to manufacture, use or sell. Furthermore, Epson products and our associated
technologies shall not be used for developing weapons of mass destruction, or any other military purposes or applications. If
exporting Epson products or our associated technologies, you shall comply with the Foreign Exchange and Foreign Trade Control
Act in Japan, Export Administration Regulations in the U.S.A. (EAR) and other export-related laws and regulations in Japan and any
other countries and follow the required procedures as provided by the relevant laws and regulations.
9. Epson assumes no responsibility for any damages (whether direct or indirect) caused by or in relation with your non-compliance with
the terms and conditions in this document.
10. Epson assumes no responsibility for any damages (whether direct or indirect) incurred by any third party that you assign, transfer,
loan, etc., Epson products to.
11. For more details or other concerns about this document, please contact our sales representative.
12. Company names and product names listed in this document are trademarks or registered trademarks of their respective companies.
Preface
This is a technical manual for designers and programmers who develop a product using the S1C17M30/M31/
M32/M33/M34. This document describes the functions of the IC, embedded peripheral circuit operations, and
their control methods.
For the CPU functions and instructions, refer to the “S1C17 Family S1C17 Core Manual.” For the functions
and operations of the debugging tools, refer to the respective tool manuals. (Our “Products: Document Down-
loads” website provides the downloadable manuals.)
– Contents –
Preface ......................................................................................................................................i
Notational conventions and symbols in this manual ................................................................i
1 Overview........................................................................................................................1-1
1.1 Features .......................................................................................................................... 1-1
1.2 Block Diagram................................................................................................................. 1-3
1.3 Pins ................................................................................................................................. 1-4
1.3.1 S1C17M30 Pin Configuration Diagram (TQFP12-48PIN) ................................. 1-4
1.3.2 S1C17M31 Pin Configuration Diagram (TQFP12-48PIN) ................................. 1-5
1.3.3 S1C17M32 Pin Configuration Diagram (TQFP13-64PIN) ................................. 1-6
1.3.4 S1C17M33 Pin Configuration Diagram (TQFP14-80PIN) ................................. 1-7
1.3.5 S1C17M33 Pad Configuration Diagram (Chip) ................................................. 1-8
1.3.6 S1C17M34 Pin Configuration Diagram (TQFP13-64PIN) ................................ 1-10
1.3.7 Pin Descriptions............................................................................................... 1-11
2 Power Supply, Reset, and Clocks ...............................................................................2-1
2.1 Power Generator (PWG).................................................................................................. 2-1
2.1.1 Overview ........................................................................................................... 2-1
2.1.2 Pins ................................................................................................................... 2-1
2.1.3 VD1 Regulator Operation Mode ......................................................................... 2-1
2.2 System Reset Controller (SRC) ....................................................................................... 2-2
2.2.1 Overview ........................................................................................................... 2-2
2.2.2 Input Pin............................................................................................................ 2-2
2.2.3 Reset Sources .................................................................................................. 2-3
2.2.4 Initialization Conditions (Reset Groups) ............................................................ 2-3
2.3 Clock Generator (CLG).................................................................................................... 2-4
2.3.1 Overview ........................................................................................................... 2-4
2.3.2 Input/Output Pins ............................................................................................. 2-5
2.3.3 Clock Sources .................................................................................................. 2-5
2.3.4 Operations ........................................................................................................ 2-8
2.4 Operating Mode ............................................................................................................. 2-12
2.4.1 Initial Boot Sequence....................................................................................... 2-12
2.4.2 Transition between Operating Modes .............................................................. 2-12
2.5 Interrupts ........................................................................................................................ 2-14
2.6 Control Registers ........................................................................................................... 2-14
PWG VD1 Regulator Control Register ....................................................................................... 2-14
CLG System Clock Control Register ........................................................................................ 2-15
CLG Oscillation Control Register ............................................................................................. 2-16
CLG OSC1 Control Register .................................................................................................... 2-17
CLG OSC3 Control Register .................................................................................................... 2-18
CLG Interrupt Flag Register ..................................................................................................... 2-19
CLG Interrupt Enable Register ................................................................................................. 2-20
CLG FOUT Control Register..................................................................................................... 2-21
CLG Oscillation Frequency Trimming Register 1 ..................................................................... 2-21
CLG Oscillation Frequency Trimming Register 2 ..................................................................... 2-22
3.2.4 I/O Area Reserved for the S1C17 Core ............................................................ 3-2
3.3 Debugger ........................................................................................................................ 3-2
3.3.1 Debugging Functions........................................................................................ 3-2
3.3.2 Resource Requirements and Debugging Tools ................................................ 3-3
3.3.3 List of Debugger Input/Output Pins .................................................................. 3-3
3.3.4 External Connection ......................................................................................... 3-3
3.3.5 Flash Security Function .................................................................................... 3-4
3.4 Control Register .............................................................................................................. 3-4
MISC PSR Register ................................................................................................................... 3-4
Debug RAM Base Register ....................................................................................................... 3-5
14 I2C (I2C).......................................................................................................................14-1
14.1 Overview ...................................................................................................................... 14-1
14.2 Input/Output Pins and External Connections .............................................................. 14-2
14.2.1 List of Input/Output Pins................................................................................ 14-2
14.2.2 External Connections .................................................................................... 14-2
14.3 Clock Settings .............................................................................................................. 14-3
14.3.1 I2C Operating Clock ...................................................................................... 14-3
14.3.2 Clock Supply in DEBUG Mode ...................................................................... 14-3
14.3.3 Baud Rate Generator ..................................................................................... 14-3
14.4 Operations ................................................................................................................... 14-4
14.4.1 Initialization .................................................................................................... 14-4
14.4.2 Data Transmission in Master Mode ............................................................... 14-5
14.4.3 Data Reception in Master Mode .................................................................... 14-7
14.4.4 10-bit Addressing in Master Mode ................................................................ 14-9
14.4.5 Data Transmission in Slave Mode................................................................. 14-10
14.4.6 Data Reception in Slave Mode ..................................................................... 14-12
14.4.7 Slave Operations in 10-bit Address Mode.................................................... 14-14
14.4.8 Automatic Bus Clearing Operation ............................................................... 14-14
14.4.9 Error Detection.............................................................................................. 14-15
14.5 Interrupts ..................................................................................................................... 14-16
14.6 Control Registers ........................................................................................................ 14-17
I2C Ch.n Clock Control Register ............................................................................................. 14-17
I2C Ch.n Mode Register .......................................................................................................... 14-18
I2C Ch.n Baud-Rate Register .................................................................................................. 14-18
I2C Ch.n Own Address Register ............................................................................................. 14-18
I2C Ch.n Control Register ....................................................................................................... 14-19
I2C Ch.n Transmit Data Register ............................................................................................. 14-20
I2C Ch.n Receive Data Register .............................................................................................. 14-20
I2C Ch.n Status and Interrupt Flag Register ........................................................................... 14-20
I2C Ch.n Interrupt Enable Register ......................................................................................... 14-21
1 Overview
The S1C17M30/M31/M32/M33/M34 is a 16-bit embedded Flash MCU that features low power consumption. It
includes various serial interfaces, an LCD driver, a temperature sensor, an A/D converter, and various timers as well
as a high-performance 16-bit CPU. It is suitable for battery-driven applications that require an LCD display and a
temperature measurement function. The S1C17M30/M31/M32/M33/M34 allows use of a part of the Flash area or
a dedicated area as an EEPROM by implementing a specific library. For more information, refer to “Appendix F
EEPROM Function.”
1.1 Features
Table 1.1.1 Features
Model S1C17M30 S1C17M31 S1C17M32 S1C17M33 S1C17M34
CPU
CPU core Seiko Epson original 16-bit RISC CPU core S1C17
Other On-chip debugger
Embedded Flash memory
Capacity (for both instructions and data) 48K bytes 64K bytes 96K bytes 64K bytes
Erase/program count 1,000 times (min.) * Programming by the debugging tool ICDmini
Other Security function to protect from reading/programming by ICDmini
On-board programming function using ICDmini
Flash programming voltage can be generated internally.
Embedded RAM
Capacity 4K bytes
Embedded display RAM
Capacity 104 bytes
Clock generator (CLG)
System clock source 4 sources (IOSC/OSC1/OSC3/EXOSC)
System clock frequency 17.12 MHz (max.)
(operating frequency)
IOSC oscillator circuit (boot clock source) 700 kHz (typ.) embedded oscillator
23 µs (max.) starting time (time from cancelation of SLEEP state to vector table read by
the CPU)
OSC1 oscillator circuit 32.768 kHz (typ.) – 32.768 kHz (typ.) crystal oscillator
crystal oscillator
32 kHz (typ.) embedded oscillator
Oscillation stop detection circuit included
OSC3 oscillator circuit 16.8 MHz (max.) crystal/ceramic oscillator
12 and 16 MHz-switchable embedded oscillator
Auto-trimming function for the embedded oscillator
EXOSC clock input 16.8 MHz (max.) square or sine wave input
Other Configurable system clock division ratio
Configurable system clock used at wake up from SLEEP state
Operating clock frequency for the CPU and all peripheral circuits is selectable.
I/O port (PPORT)
Number of general- Input/output port 37 bits (max.) 53 bits (max.) 65 bits (max.) 51 bits (max.)
purpose ports Output port 1 bit (max.)
Other Pins are shared with the peripheral I/O.
Number of input interrupt ports 33 bits (max.) 49 bits (max.) 61 bits (max.) 47 bits (max.)
Number of ports that support universal 21 bits 32 bits 29 bits
port multiplexer (UPMUX) A peripheral circuit I/O function selected via software can be assigned to each port.
Timers
Watchdog timer (WDT2) Generates NMI or watchdog timer reset.
Programmable NMI/reset generation cycle
Real-time clock (RTCA) 128–1 Hz counter, second/minute/hour/day/day of the week/month/year counters
Theoretical regulation function for 1-second correction
Alarm and stopwatch functions
16-bit timer (T16) 4 channels
Generates the SPIA master clocks and the ADC12A trigger signal.
16-bit PWM timer (T16B) 3 channels
Event counter/capture function
PWM waveform generation function
Number of PWM output or capture input ports: 2 ports/channel
* The pin configuration and peripheral circuit function depends on the model. For detailed information, refer to Section 1.3, “Pins.”
Figure 1.2.1 S1C17M30/M31/M32/M33/M34 Block Diagram
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 1-3
TECHNICAL MANUAL (Rev. 1.3)
1 OVERVIEW
1.3 Pins
1.3.1 S1C17M30 Pin Configuration Diagram (TQFP12-48PIN)
P31/RFCLKO1/UPMUX/SEG39
P30/#ADTRG0/UPMUX/SEG40
P34/#BZOUT/UPMUX/SEG36
P33/BZOUT/UPMUX/SEG37
P32/RTC1S/UPMUX/SEG38
DCLK/PD2
DST2/PD0
DSIO/PD1
#RESET
OSC1
OSC2
VDD
#RESET
OSC1
OSC2
PD2
PD1
PD0
P34
P33
P32
P31
P30
VDD
Port function
or signal
assignment Pin name
36
35
34
33
32
31
30
29
28
27
26
25
P00/SENB0/UPMUX/SEG24 P00 37 24 VSS VSS
P01/SENA0/UPMUX/SEG23 P01 38 23 VD1 VD1
P02/REF0/UPMUX/SEG22 P02 39 22 PD4 PD4/OSC4
P03/RFIN0/UPMUX/SEG21 P03 40 21 PD3 PD3/OSC3
P04/EXCL00/UPMUX/SEG20 P04 41 20 P23 P23/RFIN1/UPMUX/SEG45
P05/EXCL01/UPMUX/SEG19 P05 42 19 P22 P22/REF1/UPMUX/SEG46
P06/CLPLS/UPMUX/SEG18 P06 43 S1C17M30 18 P21 P21/SENA1/UPMUX/SEG47
P07/REMO/UPMUX/SEG17 P07 44 17 P20 P20/SENB1/UPMUX/SEG48
P10/FOUT/UPMUX/SEG16 P10 45 16 P73 P73/EXOSC/ADIN01
P11/UPMUX/SEG15 P11 46 15 P72 P72/RFCKO0/ADIN00
P12/UPMUX/SEG14 P12 47 14 P71 P71/LFRO/VREFA0
P13/UPMUX/SEG13 P13 48 13 P45 P45/EXSVD0/SEG49
10
11
12
1
2
3
4
5
6
7
8
9
VC1
VC2
VC3
VPP
P60
P61
P62
P63
P64
P65
P66
P67
VC1
VC2
VC3
VPP
P60/EXCL10/COM7/SEG3
P61/EXCL11/COM6/SEG2
P62/EXCL20/COM5/SEG1
P63/EXCL21/COM4/SEG0
P64/COM3
P65/COM2
P66/COM1
P67/COM0
P31/RFCLKO1/UPMUX/SEG39
P30/#ADTRG0/UPMUX/SEG40
P34/#BZOUT/UPMUX/SEG36
P33/BZOUT/UPMUX/SEG37
P32/RTC1S/UPMUX/SEG38
P36/UPMUX/SEG34
P35/UPMUX/SEG35
DCLK/PD2
DST2/PD0
DSIO/PD1
#RESET
VDD
#RESET
PD2
PD1
PD0
P36
P35
P34
P33
P32
P31
P30
VDD
Port function
or signal
assignment Pin name
36
35
34
33
32
31
30
29
28
27
26
25
P00/SENB0/UPMUX/SEG24 P00 37 24 VSS VSS
P01/SENA0/UPMUX/SEG23 P01 38 23 VD1 VD1
P02/REF0/UPMUX/SEG22 P02 39 22 PD4 PD4/OSC4
P03/RFIN0/UPMUX/SEG21 P03 40 21 PD3 PD3/OSC3
P04/EXCL00/UPMUX/SEG20 P04 41 20 P23 P23/RFIN1/UPMUX/SEG45
P05/EXCL01/UPMUX/SEG19 P05 42 19 P22 P22/REF1/UPMUX/SEG46
P06/CLPLS/UPMUX/SEG18 P06 43 S1C17M31 18 P21 P21/SENA1/UPMUX/SEG47
P07/REMO/UPMUX/SEG17 P07 44 17 P20 P20/SENB1/UPMUX/SEG48
P10/FOUT/UPMUX/SEG16 P10 45 16 P73 P73/EXOSC/ADIN01
P11/UPMUX/SEG15 P11 46 15 P72 P72/RFCKO0/ADIN00
CP1 CP1 47 14 P71 P71/LFRO/VREFA0
CP2 CP2 48 13 P45 P45/EXSVD0/SEG49
10
11
12
1
2
3
4
5
6
7
8
9
VC1
VC2
VC3
VPP
P60
P61
P62
P63
P64
P65
P66
P67
VC1
VC2
VC3
VPP
P60/EXCL10/COM7/SEG3
P61/EXCL11/COM6/SEG2
P62/EXCL20/COM5/SEG1
P63/EXCL21/COM4/SEG0
P64/COM3
P65/COM2
P66/COM1
P67/COM0
P31/RFCLKO1/UPMUX/SEG39
P30/#ADTRG0/UPMUX/SEG40
P34/#BZOUT/UPMUX/SEG36
P33/BZOUT/UPMUX/SEG37
P32/RTC1S/UPMUX/SEG38
P37/UPMUX/SEG33
P36/UPMUX/SEG34
P35/UPMUX/SEG35
P46/SEG32
DCLK/PD2
DST2/PD0
DSIO/PD1
#RESET
OSC1
OSC2
VDD
#RESET
OSC1
OSC2
PD2
PD1
PD0
P46
P37
P36
P35
P34
P33
P32
P31
P30
VDD
Port function
or signal
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
assignment Pin name
P54/SEG26 P54 49 32 VSS VSS
P55/SEG25 P55 50 31 VD1 VD1
P00/SENB0/UPMUX/SEG24 P00 51 30 PD4 PD4/OSC4
P01/SENA0/UPMUX/SEG23 P01 52 29 PD3 PD3/OSC3
P02/REF0/UPMUX/SEG22 P02 53 28 P27 P27/UPMUX/SEG41
P03/RFIN0/UPMUX/SEG21 P03 54 27 P26 P26/UPMUX/SEG42
P04/EXCL00/UPMUX/SEG20 P04 55 26 P25 P25/UPMUX/SEG43
P05/EXCL01/UPMUX/SEG19 P05 56 25 P24 P24/UPMUX/SEG44
P06/CLPLS/UPMUX/SEG18 P06 57 S1C17M32 24 P23 P23/RFIN1/UPMUX/SEG45
P07/REMO/UPMUX/SEG17 P07 58 23 P22 P22/REF1/UPMUX/SEG46
P10/FOUT/UPMUX/SEG16 P10 59 22 P21 P21/SENA1/UPMUX/SEG47
P11/UPMUX/SEG15 P11 60 21 P20 P20/SENB1/UPMUX/SEG48
P12/UPMUX/SEG14 P12 61 20 P73 P73/EXOSC/ADIN01
P13/UPMUX/SEG13 P13 62 19 P72 P72/RFCKO0/ADIN00
P14/UPMUX/SEG12 P14 63 18 P71 P71/LFRO/VREFA0
P15/UPMUX/SEG11 P15 64 17 P45 P45/EXSVD0/SEG49
10
11
12
13
14
15
16
1
2
3
4
5
6
7
8
9
VC1
VC2
VC3
P16
P17
P40
P41
VPP
P60
P61
P62
P63
P64
P65
P66
P67
VC1
VC2
VC3
P16/UPMUX/SEG10
P17/UPMUX/SEG9
P40/SEG8
P41/SEG7
VPP
P60/EXCL10/COM7/SEG3
P61/EXCL11/COM6/SEG2
P62/EXCL20/COM5/SEG1
P63/EXCL21/COM4/SEG0
P64/COM3
P65/COM2
P66/COM1
P67/COM0
P31/RFCLKO1/UPMUX/SEG39
P30/#ADTRG0/UPMUX/SEG40
P34/#BZOUT/UPMUX/SEG36
P33/BZOUT/UPMUX/SEG37
P32/RTC1S/UPMUX/SEG38
P37/UPMUX/SEG33
P36/UPMUX/SEG34
P35/UPMUX/SEG35
P52/SEG28
P51/SEG29
P50/SEG30
P47/SEG31
P46/SEG32
DCLK/PD2
DST2/PD0
DSIO/PD1
#RESET
OSC1
OSC2
VDD
#RESET
OSC1
OSC2
PD2
PD1
PD0
P52
P51
P50
P47
P46
P37
P36
P35
P34
P33
P32
P31
P30
VDD
Port function
or signal
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
assignment Pin name
P53/SEG27 P53 61 40 VSS VSS
P54/SEG26 P54 62 39 VD1 VD1
P55/SEG25 P55 63 38 PD4 PD4/OSC4
P00/SENB0/UPMUX/SEG24 P00 64 37 PD3 PD3/OSC3
P01/SENA0/UPMUX/SEG23 P01 65 36 P27 P27/UPMUX/SEG41
P02/REF0/UPMUX/SEG22 P02 66 35 P26 P26/UPMUX/SEG42
P03/RFIN0/UPMUX/SEG21 P03 67 34 P25 P25/UPMUX/SEG43
P04/EXCL00/UPMUX/SEG20 P04 68 33 P24 P24/UPMUX/SEG44
P05/EXCL01/UPMUX/SEG19 P05 69 32 P23 P23/RFIN1/UPMUX/SEG45
P06/CLPLS/UPMUX/SEG18 P06 70 31 P22 P22/REF1/UPMUX/SEG46
P07/REMO/UPMUX/SEG17 P07 71 S1C17M33 30 P21 P21/SENA1/UPMUX/SEG47
P10/FOUT/UPMUX/SEG16 P10 72 29 P20 P20/SENB1/UPMUX/SEG48
P11/UPMUX/SEG15 P11 73 28 P76 P76/ADIN04
P12/UPMUX/SEG14 P12 74 27 P75 P75/ADIN03
P13/UPMUX/SEG13 P13 75 26 P74 P74/ADIN02
P14/UPMUX/SEG12 P14 76 25 P73 P73/EXOSC/ADIN01
P15/UPMUX/SEG11 P15 77 24 P72 P72/RFCKO0/ADIN00
VDD VDD 78 23 P71 P71/LFRO/VREFA0
CP1 CP1 79 22 P70 P70
CP2 CP2 80 21 P45 P45/EXSVD0/SEG49
10
11
12
13
14
15
16
17
18
19
20
1
2
3
4
5
6
7
8
9
VC1
VC2
VC3
VSS
P16
P17
P40
P41
P42
P43
P44
VPP
P60
P61
P62
P63
P64
P65
P66
P67
VC1
VC2
VC3
VSS
P16/UPMUX/SEG10
P17/UPMUX/SEG9
P40/SEG8
P41/SEG7
P42/SEG6
P43/SEG5
P44/SEG4
VPP
P60/EXCL10/COM7/SEG3
P61/EXCL11/COM6/SEG2
P62/EXCL20/COM5/SEG1
P63/EXCL21/COM4/SEG0
P64/COM3
P65/COM2
P66/COM1
P67/COM0
P05/EXCL01/UPMUX/SEG19
P04/EXCL00/UPMUX/SEG20
P01/SENA0/UPMUX/SEG23
P00/SENB0/UPMUX/SEG24
P06/CLPLS/UPMUX/SEG18
P07/REMO/UPMUX/SEG17
P03/RFIN0/UPMUX/SEG21
P10/FOUT/UPMUX/SEG16
P02/REF0/UPMUX/SEG22
P15/UPMUX/SEG11
P14/UPMUX/SEG12
P13/UPMUX/SEG13
P12/UPMUX/SEG14
P11/UPMUX/SEG15
P55/SEG25
P54/SEG26
P53/SEG27
VDD
CP2
CP1
P15
P14
P13
P12
P11
P10
P07
P06
P05
P04
P03
P02
P01
P00
P55
P54
P53
VDD
CP2
CP1
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
Port function
or signal Pad
assignment name Die No. CJxxxxxxx
VC1 VC1 1 60 P52 P52/SEG28
VC2 VC2 2 59 P51 P51/SEG29
VC3 VC3 3 58 P50 P50/SEG30
57 P47 P47/SEG31
VSS VSS 4
56 P46 P46/SEG32
P16/UPMUX/SEG10 P16 5 55 P37 P37/UPMUX/SEG33
P17/UPMUX/SEG9 P17 6 54 P36 P36/UPMUX/SEG34
P40/SEG8 P40 7 53 P35 P35/UPMUX/SEG35
P41/SEG7 P41 8 52 P34 P34/#BZOUT/UPMUX/SEG36
Y
P42/SEG6 P42 9 51 P33 P33/BZOUT/UPMUX/SEG37
P43/SEG5 P43 10 50 P32 P32/RTC1S/UPMUX/SEG38
3.002 mm
P44/SEG4 P44 11 49 P31 P31/RFCLKO1/UPMUX/SEG39
VPP VPP 12 48 P30 P30/#ADTRG0/UPMUX/SEG40
P60/EXCL10/COM7/SEG3 P60 13
X
47 PD2 DCLK/PD2
P61/EXCL11/COM6/SEG2 P61 14 (0, 0) 46 PD1 DSIO/PD1
P62/EXCL20/COM5/SEG1 P62 15 45 PD0 DST2/PD0
P63/EXCL21/COM4/SEG0 P63 16
P64/COM3 P64 17
44 OSC1 OSC1
P65/COM2 P65 18 43 OSC2 OSC2
P66/COM1 P66 19 42 VDD VDD
P67/COM0 P67 20 41 #RESET #RESET
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
P45
P70
P71
P72
P73
P74
P75
P76
P20
P21
P22
P23
P24
P25
P26
P27
PD3
PD4
VD1
VSS
P45/EXSVD0/SEG49
P70
P71/LFRO/VREFA0
P72/RFCKO0/ADIN00
P73/EXOSC/ADIN01
P74/ADIN02
P75/ADIN03
P76/ADIN04
P20/SENB1/UPMUX/SEG48
P21/SENA1/UPMUX/SEG47
P22/REF1/UPMUX/SEG46
P23/RFIN1/UPMUX/SEG45
P24/UPMUX/SEG44
P25/UPMUX/SEG43
P26/UPMUX/SEG42
P27/UPMUX/SEG41
PD3/OSC3
PD4/OSC4
VD1
VSS
2.922 mm
Figure 1.3.5.1 S1C17M33 Pad Configuration Diagram (Chip)
P31/RFCLKO1/UPMUX/SEG39
P30/#ADTRG0/UPMUX/SEG40
P34/#BZOUT/UPMUX/SEG36
P33/BZOUT/UPMUX/SEG37
P32/RTC1S/UPMUX/SEG38
P37/UPMUX/SEG33
P36/UPMUX/SEG34
P35/UPMUX/SEG35
P46/SEG32
DCLK/PD2
DST2/PD0
DSIO/PD1
#RESET
OSC1
OSC2
VDD
#RESET
OSC1
OSC2
PD2
PD1
PD0
P46
P37
P36
P35
P34
P33
P32
P31
P30
VDD
Port function
or signal
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
assignment Pin name
P00/SENB0/UPMUX/SEG24 P00 49 32 VSS VSS
P01/SENA0/UPMUX/SEG23 P01 50 31 VD1 VD1
P02/REF0/UPMUX/SEG22 P02 51 30 PD4 PD4/OSC4
P03/RFIN0/UPMUX/SEG21 P03 52 29 PD3 PD3/OSC3
P04/EXCL00/UPMUX/SEG20 P04 53 28 P24 P24/UPMUX/SEG44
P05/EXCL01/UPMUX/SEG19 P05 54 27 P23 P23/RFIN1/UPMUX/SEG45
P06/CLPLS/UPMUX/SEG18 P06 55 26 P22 P22/REF1/UPMUX/SEG46
P07/REMO/UPMUX/SEG17 P07 56 25 P21 P21/SENA1/UPMUX/SEG47
P10/FOUT/UPMUX/SEG16 P10 57 S1C17M34 24 P20 P20/SENB1/UPMUX/SEG48
P11/UPMUX/SEG15 P11 58 23 P76 P76/ADIN04
P12/UPMUX/SEG14 P12 59 22 P75 P75/ADIN03
P13/UPMUX/SEG13 P13 60 21 P74 P74/ADIN02
P14/UPMUX/SEG12 P14 61 20 P73 P73/EXOSC/ADIN01
P15/UPMUX/SEG11 P15 62 19 P72 P72/RFCKO0/ADIN00
CP1 CP1 63 18 P71 P71/LFRO/VREFA0
CP2 CP2 64 17 P45 P45/EXSVD0/SEG49
10
11
12
13
14
15
16
1
2
3
4
5
6
7
8
9
VC1
VC2
VC3
P16
P17
P40
P41
VPP
P60
P61
P62
P63
P64
P65
P66
P67
VC1
VC2
VC3
P16/UPMUX/SEG10
P17/UPMUX/SEG9
P40/SEG8
P41/SEG7
VPP
P60/EXCL10/COM7/SEG3
P61/EXCL11/COM6/SEG2
P62/EXCL20/COM5/SEG1
P63/EXCL21/COM4/SEG0
P64/COM3
P65/COM2
P66/COM1
P67/COM0
S1C17M30
S1C17M31
S1C17M32
S1C17M33
S1C17M34
Tolerant
Pin/pad Assigned
I/O Initial state fail-safe Function
name signal
structure
S1C17M30
S1C17M31
S1C17M32
S1C17M33
S1C17M34
Tolerant
Pin/pad Assigned
I/O Initial state fail-safe Function
name signal
structure
S1C17M30
S1C17M31
S1C17M32
S1C17M33
S1C17M34
Tolerant
Pin/pad Assigned
I/O Initial state fail-safe Function
name signal
structure
S1C17M30
S1C17M31
S1C17M32
S1C17M33
S1C17M34
Tolerant
Pin/pad Assigned
I/O Initial state fail-safe Function
name signal
structure
Note: In the peripheral circuit descriptions, the assigned signal name is used as the pin name.
PWG
REGMODE[1:0]
VDD VD1
VD1
CPW1 regulator
Internal circuits
+
CPW2 VD1
VSS
2.1.2 Pins
Table 2.1.2.1 lists the PWG pins.
Table 2.1.2.1 List of PWG Pins
Pin name I/O Initial status Function
VDD P – Power supply (+)
VSS P – GND
VD1 A – Embedded regulator output pin
For the VDD operating voltage range and recommended external parts, refer to “Recommended Operating Condi-
tions, Power supply voltage VDD” in the “Electrical Characteristics” chapter and the “Basic External Connection
Diagram” chapter, respectively.
The VD1 regulator also supports automatic mode in which the hardware detects a light load condition and automati-
cally switches between normal mode and economy mode. Use the VD1 regulator in automatic mode when no spe-
cial control is required.
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 2-1
TECHNICAL MANUAL (Rev. 1.3)
2 POWER SUPPLY, RESET, AND CLOCKS
Clock generator
Key-entry reset
Watchdog timer reset
Supply voltage detector reset
SYSRST_S0_0
Software reset 0 To peripheral circuit 0
Reset
decoder SYSRST_S0_n
Software reset n To peripheral circuit n
The #RESET pin is connected to the noise filter that removes pulses not conforming to the requirements. An inter-
nal pull-up resistor is connected to the #RESET pin, so the pin can be left open. For the #RESET pin characteris-
tics, refer to “#RESET pin characteristics” in the “Electrical Characteristics” chapter.
#RESET pin
Inputting a reset signal with a certain low level period to the #RESET pin issues a reset request.
VSS
VRST-: Reset detection voltage VRST+: Reset canceling voltage X Indefinite (operating limit) RST RESET state RUN CPU RUN state
For the POR and BOR electrical specifications, refer to “POR/BOR characteristics” in the “Electrical Charac-
teristics” chapter.
Key-entry reset
Inputting a low level signal of a certain period to the I/O port pins configured to a reset input issues a reset re-
quest. This function must be enabled using an I/O port register. For more information, refer to the “I/O Ports”
chapter.
CLG
IOSCEN
OSC1 WUPDIV[1:0]
OSC1CLK
) (
OSC2 System
Clock SYSCLK
OSC3EN clock To CPU and bus
selector
X’tal3/Ceramic3 OSC3 controller
OSC3
OSC3CLK
oscillator Divider SLEEP, WAKE-UP
circuit
OSC4
EXOSCEN
EXOSC EXOSC
EXOSCCLK
clock input
circuit
FOUTEN
Peripheral circuit 1
FOUT FOUT
Clock
output CLKSRC[x:0]
selector
circuit CLKDIV[x:0]
FOUTDIV[2:0]
Peripheral circuit n
Clock
CLKSRC[x:0]
selector
CLKDIV[x:0]
IOSCSTAIE IOSCSTAIF
Interrupt
control circuit Interrupt
controller
The IOSC oscillator circuit output clock IOSCCLK is used as SYSCLK at booting. For the oscillation charac-
teristics, refer to “IOSC oscillator circuit characteristics” in the “Electrical Characteristics” chapter.
OSC1SELCR
OSC1 oscillator circuit
Selector
voltage regulator
OSC1EN
Crystal oscillator
OSC1BUP INV1N[1:0] INV1B[1:0] OSDRB OSDEN
Restart
Oscillation startup signal Oscillation
control circuit stop detector
External gate Gain-controlled OSC1WT[1:0]
capacitor CG1 Internal variable oscillation
OSC1 gate capacitor CGI1 inverter
)
Interrupt
)
OSC1STPIE OSC1STPIF
Feedback Drain control circuit
(
Internal oscillator
Clock
oscillator
For the recommended parts and the oscillation characteristics, refer to the “Basic External Connection Dia-
gram” chapter and “OSC1 oscillator circuit characteristics” in the “Electrical Characteristics” chapter, respec-
tively.
2-6 Seiko Epson Corporation S1C17M30/M31/M32/M33/M34
TECHNICAL MANUAL (Rev. 1.3)
2 POWER SUPPLY, RESET, AND CLOCKS
Crystal/ceramic oscillator
Oscillation
Peripheral filter
(
Clock
OSC3FQ
oscillator
OSC1 Auto-
OSC1CLK
oscillator trimming
circuit circuit
OSC3STM
For the recommended parts and the oscillation characteristics, refer to the “Basic External Connection Diagram”
chapter and “OSC3 oscillator circuit characteristics” in the “Electrical Characteristics” chapter, respectively.
input circuit
EXOSCEN
EXOSC
Input control
EXOSCCLK
circuit
EXOSC has no oscillation stabilization waiting circuit included, therefore, it must be enabled when a stabilized
clock is being supplied. For the input clock characteristics, refer to “EXOSC external clock input characteris-
tics” in the “Electrical Characteristics” chapter.
2.3.4 Operations
Oscillation start time and oscillation stabilization waiting time
The oscillation start time refers to the time after the oscillator circuit is enabled until the oscillation signal is ac-
tually sent to the internal circuits. The oscillation stabilization waiting time refers to the time it takes the clock
to stabilize after the oscillation starts. To avoid malfunctions of the internal circuits due to an unstable clock
during this period, the oscillator circuit includes an oscillation stabilization waiting circuit that can disable sup-
plying the clock to the system until the designated time has elapsed. Figure 2.3.4.1 shows the relationship be-
tween the oscillation start time and the oscillation stabilization waiting time.
System supply waiting time
Oscillation start time
Oscillator circuit enable
(∗OSC∗EN)
Oscillation waveform
The oscillation stabilization waiting times for the OSC1 and OSC3 oscillator circuits can be set using the
CLGOSC1.OSC1WT[1:0] bits and CLGOSC3.OSC3WT[2:0] bits, respectively. To check whether the oscilla-
tion stabilization waiting time is set properly and the clock is stabilized immediately after the oscillation starts
or not, monitor the oscillation clock using the FOUT output function. The oscillation stabilization waiting time
for the IOSC oscillator circuit is fixed at 16 IOSCCLK clocks. The oscillation stabilization waiting time for the
OSC1 oscillator circuit should be set to 16,384 OSC1CLK clocks or more when crystal oscillator is selected, or
4,096 OSC1CLK clocks or more when internal oscillator is selected. The oscillation stabilization waiting time
for the OSC3 oscillator circuit should be set to 1,024 OSC3CLK clocks or more when crystal/ceramic oscillator
is selected, or four OSC3CLK clocks or more when internal oscillator is selected.
When the oscillation stabilization waiting operation has completed, the oscillator circuit sets the oscillation sta-
bilization waiting completion flag and starts clock supply to the internal circuits.
Note: The oscillation stabilization waiting time is always expended at start of oscillation even if the os-
cillation stabilization waiting completion flag has not be cleared to 0.
When the oscillation startup control circuit in the OSC1 crystal oscillator circuit is enabled by setting the
CLGOSC1.OSC1BUP bit to 1, it uses the high-gain oscillation inverter for a set period of time (startup boosting
operation) after the oscillator circuit is enabled (by setting the CLGOSC.OSC1EN bit to 1) to reduce oscillation
start time. Note, however, that the oscillation operation may become unstable if there is a large gain differential
between normal operation and startup boosting operation. Furthermore, the oscillation start time being actually
reduced depends on the characteristics of the resonator used. Figure 2.3.4.2 shows an operation example when the
oscillation startup control circuit is used.
(1) CLGOSC1.OSC1BUP bit = 0 (startup boosting operation disabled)
Oscillator circuit enable
(CLGOSC.OSC1EN)
Oscillation inverter INV1N[1:0] setting gain
Oscillation waveform
Normal operation
Oscillation waveform
5. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
6. When using the crystal/ceramic oscillator, assign the OSC3 oscillator input/output functions to the ports.
(Refer to the “I/O Ports” chapter.)
7. Write 1 to the CLGOSC.OSC3EN bit. (Start oscillation)
8. OSC3CLK can be used if the CLGINTF.OSC3STAIF bit = 1 after an interrupt occurs.
The setting values of the CLGOSC3.OSC3INV[1:0] and CLGOSC3.OSC3WT[2:0] bits should be determined
after performing evaluation using the populated circuit board.
Note: Make sure the CLGOSC.OSC3EN bit is set to 0 (while the OSC3 oscillation is halted) when
switching the oscillator within two types.
The SYSCLK condition (clock source and division ratio) at wake-up from SLEEP mode to RUN mode can also
be configured. This allows flexible clock control according to the wake-up process. Configure the clock using
the CLGSCLK.WUPSRC[1:0] and CLGSCLK.WUPDIV[1:0] bits, and write 1 to the CLGSCLK.WUPMD bit
to enable this function.
(2) When the CLGSCLK.WUPMD bit = 1 and the CLGSCLK.WUPSRC[1:0] bits = 0x0
SYSCLK SLEEP mode IOSCCLK
OSC1CLK IOSCCLK
(CPU operating clock) (CPU stop, CLK stop) (Unstable)
VDD
IOSCCLK
(Initial SYSCLK)
Internal reset signal
Undefined Cancel reset request
SYSRST, H0, H1
Reset hold time tRSTR
S1C17 core
∗1 ∗2
program counter (PC)
∗1: Reset vector (reset handler start address)
∗2: Address (reset vector + 2)
Note: The reset cancelation time at power-on varies according to the power rise time and reset request
cancelation time.
For the reset hold time tRSTR, refer to “Reset hold circuit characteristics” in the “Electrical Characteristics” chapter.
RUN mode
RUN mode refers to the state in which the CPU is executing the program. A transition to this mode takes place
when the system reset request from the system reset controller is canceled. RUN mode is classified into “IOSC
RUN,” “OSC1 RUN,” “OSC3 RUN,” and “EXOSC RUN” by the SYSCLK clock source.
HALT mode
When the CPU executes the halt instruction, it suspends program execution and stops operating. This state is
HALT mode. In this mode, the clock sources and peripheral circuits keep operating. This mode can be set while
no software processing is required and it reduces power consumption as compared with RUN mode. HALT
mode is classified into “IOSC HALT,” “OSC1 HALT,” “OSC3 HALT,” and “EXOSC HALT” by the SYSCLK
clock source.
2-12 Seiko Epson Corporation S1C17M30/M31/M32/M33/M34
TECHNICAL MANUAL (Rev. 1.3)
2 POWER SUPPLY, RESET, AND CLOCKS
SLEEP mode
When the CPU executes the slp instruction, it suspends program execution and stops operating. This state is
SLEEP mode. In this mode, the clock sources stop operating as well. However, the clock source in which the
CLGOSC.IOSCSLPC/OSC1SLPC/OSC3SLPC/EXOSCSLPC bit is set to 0 keeps operating, so the peripheral
circuits with the clock being supplied can also operate. By setting this mode when no software processing and
peripheral circuit operations are required, power consumption can be less than HALT mode.
The RAM retains data even in SLEEP mode.
Note: The current consumption when a clock source is active in SLEEP mode by setting the CLGOSC.
IOSCSLPC/OSC1SLPC/OSC3SLPC/EXOSCSLPC bit to 0 is equivalent to the value in HALT
mode with the same clock source condition (refer to “Current Consumption, Current consump-
tion in HALT mode IHALT1, IHALT2, and IHALT3” in the “Electrical Characteristics” chapter).
DEBUG mode
When a debug interrupt occurs, the CPU enters DEBUG mode. DEBUG mode is canceled when the retd in-
struction is executed. For more information on DEBUG mode, refer to “Debugger” in the “CPU and Debugger”
chapter.
RESET
(Initial state)
slp instruction
IOSC
al ion P
HALT
si cela SL
cancelation signal
H
(wake-up)
io
ct
ru
st
in
lt
IOSC
HALT/ DEBUG
RUN SLEEP retd instruction
1
0x
]=
CLGSCLK.CLKSRC[1:0] = 0x2
C
:0
LG
[1
C
SC
SR
LK
C
LK
LG
.C
.C
LK
SC
LK
SR
0x
LK
SC
OSC1
C
.C
]=
LG
[1
LK
:0
HALT
:0
C
[1
SR
]=
C
ha
SR
C
0x
[1
lt
3
LK
:0
in
H cela
]=
st
ca
.C
AL t
ru
n
LK
0x
ct
T/ ion
SC
0
io
SL s
LG
EE ign
CLGSCLK.CLKSRC[1:0] = 0x1
C
P al
OSC1 EXOSC
H an ign
RUN RUN
AL ce a
CLGSCLK.CLKSRC[1:0] = 0x3
c s
T/ la l
2
SL tio
0x
CLGSCLK.CLKSRC[1:0] = 0x0
EE n
ha
=
P
]
lt
C
:0
LG
in
[1
st
C
SC
ru
SR
ct
LK
LK
io
LG
EXOSC
.C
n
.C
LK
SC
LK
HALT
SR
0x
LK
SC
C
]=
.C
LG
[1
LK
:0
:0
[1
SR
]=
C
SR
C
0x
[1
2
LK
:0
]=
.C
LK
0x
SC
1
LG
C
OSC3
RUN
n
io
ct
ru
si P
al
st
io EE
gn
in
at L
lt
el /S
ha
n
nc LT
ca HA
OSC3
∗ In RUN and HALT modes, the clock sources not used
HALT as SYSCLK can be all disabled.
2.5 Interrupts
CLG has a function to generate the interrupts shown in Table 2.5.1.
Table 2.5.1 CLG Interrupt Functions
Interrupt Interrupt flag Set condition Clear condition
IOSC oscillation stabiliza- CLGINTF.IOSCSTAIF When the IOSC oscillation stabilization waiting Writing 1
tion waiting completion operation has completed after the oscillation starts
OSC1 oscillation stabili- CLGINTF.OSC1STAIF When the OSC1 oscillation stabilization waiting Writing 1
zation waiting completion operation has completed after the oscillation starts
OSC3 oscillation stabili- CLGINTF.OSC3STAIF When the OSC3 oscillation stabilization waiting Writing 1
zation waiting completion operation has completed after the oscillation starts
OSC1 oscillation stop CLGINTF.OSC1STPIF When OSC1CLK is stopped, or when the CLGOSC. Writing 1
OSC1EN or CLGOSC1.OSDEN bit setting is al-
tered from 1 to 0.
OSC3 oscillation auto- CLGINTF.OSC3TEDIF When the OSC3 oscillation auto-trimming opera- Writing 1
trimming completion tion has completed
CLG provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the interrupt
controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set. For
more information on interrupt control, refer to the “Interrupt Controller” chapter.
Bit 15 WUPMD
This bit enables the SYSCLK switching function at wake-up.
1 (R/WP): Enable
0 (R/WP): Disable
When the CLGSCLK.WUPMD bit = 1, setting values of the CLGSCLK.WUPSRC[1:0] bits and the
CLGSCLK.WUPDIV[1:0] bits are loaded to the CLGSCLK.CLKSRC[1:0] bits and the CLGSCLK.
CLKDIV[1:0] bits, respectively, at wake-up from SLEEP mode to switch SYSCLK. When the CLG-
SCLK.WUPMD bit = 0, the CLGSCLK.CLKSRC[1:0] and CLGSCLK.CLKDIV[1:0] bits are not
altered at wake-up.
Note: When the CLGSCLK.WUPMD bit = 1, the clock source enable bits (CLGOSC.EXOSCEN,
CLGOSC.OSC1EN, CLGOSC.OSC3EN, CLGOSC.IOSCEN) except for the SYSCLK source
selected by the CLGSCLK.CLKSRC[1:0] bits will be cleared to 0 to stop the clocks after a
system wake-up. However, the enable bit of the clock source being operated during SLEEP
mode by setting the CLGOSC.****SLPC bit retains 1 after a wake-up.
Bit 14 Reserved
Bits 13–12 WUPDIV[1:0]
These bits select the SYSCLK division ratio for resetting the CLGSCLK.CLKDIV[1:0] bits at wake-up.
This setting is ineffective when the CLGSCLK.WUPMD bit = 0.
Bits 11–10 Reserved
Bits 9–8 WUPSRC[1:0]
These bits select the SYSCLK clock source for resetting the CLGSCLK.CLKSRC[1:0] bits at wake-up.
When a currently stopped clock source is selected, it will automatically start oscillating or clock input
at wake-up. However, this setting is ineffective when the CLGSCLK.WUPMD bit = 0.
Table 2.6.2 SYSCLK Clock Source and Division Ratio Settings at Wake-up
CLGSCLK.WUPSRC[1:0] bits
CLGSCLK.
0x0 0x1 0x2 0x3
WUPDIV[1:0] bits
IOSCCLK OSC1CLK OSC3CLK EXOSCCLK
0x3 1/8 Reserved 1/8 Reserved
0x2 1/4 Reserved 1/4 Reserved
0x1 1/2 1/2 1/2 Reserved
0x0 1/1 1/1 1/1 1/1
Bit 15 Reserved
Bit 14 OSDRB
This bit enables the OSC1 oscillator circuit restart function by the oscillation stop detector when
OSC1 crystal oscillation stop is detected.
1 (R/WP): Enable (Restart the OSC1 oscillator circuit when oscillation stop is detected.)
0 (R/WP): Disable
Bit 13 OSDEN
This bit controls the oscillation stop detector in the OSC1 oscillator circuit.
1 (R/WP): OSC1 oscillation stop detector on
0 (R/WP): OSC1 oscillation stop detector off
Note: Do not write 1 to the CLGOSC1.OSDEN bit before stabilized OSC1CLK is supplied.
Furthermore, the CLGOSC1.OSDEN bit should be set to 0 when the CLGOSC.OSC1EN bit
is set to 0.
Bit 12 OSC1BUP
This bit enables the oscillation startup control circuit in the OSC1 crystal oscillator circuit.
1 (R/WP): Enable (Activate booster operation at startup.)
0 (R/WP): Disable
Bit 11 OSC1SELCR
This bit selects an oscillator type of the OSC1 oscillator circuit.
1 (R/WP): Internal oscillator
0 (R/WP): Crystal oscillator
Bits 10–8 CGI1[2:0]
These bits set the internal gate capacitance in the OSC1 crystal oscillator circuit.
Table 2.6.4 OSC1 Internal Gate Capacitance Setting
CLGOSC1.CGI1[2:0] bits Capacitance
0x7 Max.
0x6 ↑
0x5
0x4
0x3
0x2
0x1 ↓
0x0 Min.
For more information, refer to “OSC1 oscillator circuit characteristics, Crystal oscillator internal gate
capacitance CGI1C” in the “Electrical Characteristics” chapter.
Bits 7–6 INV1B[1:0]
These bits set the oscillation inverter gain that will be applied at boost startup of the OSC1 crystal os-
cillator circuit.
Note: The CLGOSC1.INV1B[1:0] bits must be set to a value equal to or larger than the CLGOSC1.
INV1N[1:0] bits.
Bits 5–4 INV1N[1:0]
These bits set the oscillation inverter gain applied at normal operation of the OSC1 crystal oscillator
circuit.
Table 2.6.6 Setting Oscillation Inverter Gain at OSC1 Normal Operation
CLGOSC1.INV1N[1:0] bits Inverter gain
0x3 Max.
0x2 ↑
0x1 ↓
0x0 Min.
Bit 3 OSC3STM
This bit controls the OSC3 internal oscillator auto-trimming function.
1 (WP): Start trimming
0 (WP): Stop trimming
1 (R): Trimming is executing.
0 (R): Trimming has finished. (Trimming operation inactivated.)
This bit is automatically cleared to 0 when trimming has finished.
Notes: • Do not use OSC3CLK as the system clock or peripheral circuit clocks while the CLGOSC3.
OSC3STM bit = 1.
• The auto-trimming function does not work if the OSC1 oscillator circuit is stopped. Make
sure the CLGINTF.OSC1STAIF bit is set to 1 before starting the trimming operation.
• Do not alter the CLGOSC3.OSC3FQ bit while auto-trimming is being executed.
• Select the 32.768 kHz crystal oscillator for the OSC1 oscillator circuit when using the auto-
trimming function. The clock cannot be adjusted properly by the internal oscillator.
Bits 2–0 OSC3WT[2:0]
These bits set the oscillation stabilization waiting time for the OSC3 oscillator circuit.
Table 2.6.9 OSC3 Oscillation Stabilization Waiting Time Setting
CLGOSC3.OSC3WT[2:0] bits Oscillation stabilization waiting time
0x7 65,536 clocks
0x6 16,384 clocks
0x5 4,096 clocks
0x4 1,024 clocks
0x3 256 clocks
0x2 64 clocks
0x1 16 clocks
0x0 4 clocks
Bit 5 OSC1STPIF
Bit 4 OSC3TEDIF
Bit 2 OSC3STAIF
Bit 1 OSC1STAIF
Bit 0 IOSCSTAIF
These bits indicate the CLG interrupt cause occurrence statuses.
1 (R): Cause of interrupt occurred
0 (R): No cause of interrupt occurred
1 (W): Clear flag
0 (W): Ineffective
Each bit corresponds to the interrupt as follows:
CLGINTF.OSC1STPIF bit: OSC1 oscillation stop interrupt
CLGINTF.OSC3TEDIF bit: OSC3 oscillation auto-trimming completion interrupt
CLGINTF.OSC3STAIF bit: OSC3 oscillation stabilization waiting completion interrupt
CLGINTF.OSC1STAIF bit: OSC1 oscillation stabilization waiting completion interrupt
CLGINTF.IOSCSTAIF bit: IOSC oscillation stabilization waiting completion interrupt
Note: The CLGINTF.IOSCSTAIF bit is 0 after system reset is canceled, but IOSCCLK has already
been stabilized.
Note: When the CLGFOUT.FOUTSRC[1:0] bits are set to 0x3, the FOUT output will be stopped in
SLEEP/HALT mode as SYSCLK is stopped.
Bit 1 Reserved
Bit 0 FOUTEN
This bit controls the FOUT clock external output.
1 (R/W): Enable external output
0 (R/W): Disable external output
Note: Since the FOUT signal generated is out of sync with writings to the CLGFOUT.FOUTEN bit, a
glitch may occur when the FOUT output is enabled or disabled.
Bit 15 Reserved
Bits 14–8 OSC3AJ[6:0]
These bits set the frequency trimming value for the OSC3 internal oscillator circuit.
This setting does not affect the OSC3 crystal/ceramic oscillation frequency.
Table 2.6.11 Oscillation Frequency Trimming Setting of OSC3 Internal Oscillator Circuit
CLGTRIM1.OSC3AJ[6:0] bits OSC3 internal oscillator frequency
0x7f High
: :
0x00 Low
Note: The initial values of the CLGTRIM1.OSC3AJ[6:0] and CLGTRIM1.IOSCAJ[5:0] bits were adjusted
so that the OSC3 and IOSC oscillator circuit characteristics described in the “Electrical Char-
acteristics” chapter can be guaranteed. Be aware that the frequency characteristics may not be
satisfied when these settings are altered. When altering these settings, always make sure that
the corresponding oscillator circuit is inactive.
Note: The initial value of the CLGTRIM2.OSC1AJ[5:0] bits was adjusted so that the OSC1 oscillator cir-
cuit characteristics described in the “Electrical Characteristics” chapter can be guaranteed. Be
aware that the frequency characteristic may not be satisfied when this setting is altered. When
altering this setting, always make sure that the OSC1 oscillator circuit is inactive.
RAM bus
RAM Bus controller
DCLK
Debugger DSIO
DST2
Internal bus
For details on the CPU registers, refer to the “S1C17 Family S1C17 Core Manual.” For more information on the
reset vector, refer to the “Interrupt Controller” chapter.
3.3 Debugger
3.3.1 Debugging Functions
The debugger provides the following functions:
• Instruction break: A debug interrupt is generated immediately before the set instruction address is executed. An
instruction break can be set at up to four addresses.
• Single step: A debug interrupt is generated after each instruction has been executed.
• Forcible break: A debug interrupt is generated using an external input signal.
• Software break: A debug interrupt is generated when the brk instruction is executed.
When a debug interrupt occurs, the CPU enters DEBUG mode. The peripheral circuit operations in DEBUG mode
depend on the setting of the DBRUN bit provided in the clock control register of each peripheral circuit. For more
information on the DBRUN bit, refer to “Clock Supply in DEBUG Mode” in each peripheral circuit chapter. DE-
BUG mode continues until a cancel command is sent from the personal computer or the CPU executes the retd in-
struction. Neither hardware interrupts nor NMI are accepted during DEBUG mode.
Debugging tools
To perform debugging, connect ICDmini (S5U1C17001H) to the input/output pin for the debugger embedded
in this IC and control it from the personal computer. This requires the tools shown below.
• S1C17 Family In-Circuit Debugger ICDmini (S5U1C17001H)
• S1C17 Family C Compiler Package (e.g., S5U1C17001C)
The debugger input/output pins are shared with general-purpose I/O ports and are initially set as the debug pins. If
the debugging function is not used, these pins can be switched to general-purpose I/O port pins. For details, refer to
the “I/O Ports” chapter.
Notes: • Do not drive the DCLK pin with a high level from outside (e.g. pulling up with a resistor). Also,
do not connect (short-circuit) between the DCLK pin and another GPIO port. In the both cas-
es, the IC may not start up normally due to unstable pin input/output status at power on.
• Do not drive the DSIO pin with a low level from outside, as it generates a debug interrupt that
puts the CPU into DEBUG mode.
DCLK DCLK
VDD ICDmini
S1C17
RDBG (S5U1C17001H)
DSIO DSIO
DST2 DST2
For the recommended pull-up resistor value, refer to “Recommended Operating Conditions, DSIO pull-up resis-
tor RDBG” in the “Electrical Characteristics” chapter. RDBG is not required when using the DSIO pin as a general-
purpose I/O port pin.
Figure 3.3.5.1 Shipment of IC with ROM Data Programmed and Flash Security Function Setting Flow
Note: When data is transferred to a memory in 32-bit access, the eight high-order bits are written to
the memory as 0x00 since the bit width of the S1C17 core general-purpose registers is 24 bits.
Conversely when sending from a memory to a register, the eight high-order bits are ignored.
The CPU performs 32-bit access for stack operations in an interrupt handling. In this case, the
CPU read/write 32-bit data that consists of the PSR value as the eight high-order bits and the
return address as the 24 low-order bits. For more information, refer to the “S1C17 Family S1C17
Core Manual.”
The CPU adopts Harvard architecture that allows simultaneous processing of an instruction fetch and a data ac-
cess. However, they are not performed simultaneously under one of the conditions listed below. This prolongs the
instruction fetch cycle for the number of data area bus cycles.
• When the CPU executes an instruction stored in the Flash area and accesses data in the Flash area
• When the CPU executes an instruction stored in the Flash area and accesses data in the display data RAM area
• When the CPU executes an instruction stored in the internal RAM/display data RAM area and accesses data in
the internal RAM/display data RAM area
For the VPP voltage, refer to “Recommended Operating Conditions, Flash programming voltage VPP” in the “Elec-
trical Characteristics” chapter.
Note: Always leave the VPP pin open except when programming the Flash memory.
(1) When VPP is supplied externally (2) When VPP is generated internally
Figure 4.3.3.1 External Connection
The VPP pin must be left open except when programming the Flash memory. However, it is not necessary to discon-
nect the wire when using ICDmini to supply the VPP voltage, as ICDmini controls the power supply so that it will
be supplied during Flash programming only. The VPP voltage can also be generated by the internal power supply
for generating the Flash programming voltage. Be sure to connect CVPP for stabilizing the voltage when the VPP
voltage is supplied externally or for generating the voltage when the internal power supply is used.
For detailed information on ROM data programming method, refer to the “(S1C17 Family C Compiler Package)
S5U1C17001C Manual.” The IC can also be shipped after being programmed in the factory with the ROM data
developed. Should you desire to ship the IC with ROM data programmed from the factory, please contact our cus-
tomer support.
Notes: • The Flash programming requires a 2.4 V or higher VDD voltage.
• Be sure to avoid using the VPP pin output for driving external circuits when the VPP voltage is
generated internally.
4.4 RAM
The RAM can be used to execute the instruction codes copied from another memory as well as storing variables or
other data. This allows higher speed processing and lower power consumption than Flash memory.
Note: The 64 bytes at the end of the RAM is reserved as the debug RAM area. When using the debug
functions under application development, do not access this area from the application program.
This area can be used for applications of mass-produced devices that do not need debugging.
The RAM size used by the application can be configured to equal or less than the implemented size using the
MSCIRAMSZ.IRAMSZ[2:0] bits. For example, this function can be used to prevent creating programs that seek
to access areas outside the RAM area of the target model when developing an application for a model in which the
RAM size is smaller than this IC. After the limitation is applied, accessing an address outside the RAM area results
in the same operation (undefined value is read out) as when a reserved area is accessed.
Note: Be sure to set the FLASHCWAIT.RDWAIT[1:0] bits before the system clock is configured.
• • •
Interrupt level
CPU core control
• • •
NMI
Watchdog timer
Vector number/
Software interrupt Vector address Hardware interrupt name Hardware interrupt flag Priority
number
4 (0x04) TTBR + 0x10 Supply voltage detector Low power supply voltage detection High *1
interrupt ↑
5 (0x05) TTBR + 0x14 Port interrupt Port input
6 (0x06) TTBR + 0x18 reserved –
7 (0x07) TTBR + 0x1c Clock generator interrupt • IOSC oscillation stabilization waiting completion
• OSC1 oscillation stabilization waiting completion
• OSC3 oscillation stabilization waiting completion
• OSC1 oscillation stop
• IOSC oscillation auto-trimming completion
8 (0x08) TTBR + 0x20 Real-time clock interrupt • 1-day, 1-hour, 1-minute, and 1-second
• 1/32-second, 1/8-second, 1/4-second, and 1/2-second
• Stopwatch 1 Hz, 10 Hz, and 100 Hz
• Alarm
• Theoretical regulation completion
9 (0x09) TTBR + 0x24 16-bit timer Ch.0 interrupt Underflow
10 (0x0a) TTBR + 0x28 UART Ch.0 interrupt • End of transmission
• Framing error
• Parity error
• Overrun error
• Receive buffer two bytes full
• Receive buffer one byte full
• Transmit buffer empty
11 (0x0b) TTBR + 0x2c 16-bit timer Ch.1 interrupt Underflow
12 (0x0c) TTBR + 0x30 Synchronous serial interface • End of transmission
Ch.0 interrupt • Receive buffer full
• Transmit buffer empty
• Overrun error
13 (0x0d) TTBR + 0x34 I2C interrupt • End of data transfer
• General call address reception
• NACK reception
• STOP condition
• START condition
• Error detection
• Receive buffer full
• Transmit buffer empty
14 (0x0e) TTBR + 0x38 16-bit PWM timer Ch.0 • Capture overwrite
interrupt • Compare/capture
• Counter MAX
• Counter zero
15 (0x0f) TTBR + 0x3c 16-bit PWM timer Ch.1 • Capture overwrite
interrupt • Compare/capture
• Counter MAX
• Counter zero
16 (0x10) TTBR + 0x40 UART Ch.1 interrupt • End of transmission
• Framing error
• Parity error
• Overrun error
• Receive buffer two bytes full
• Receive buffer one byte full
• Transmit buffer empty
17 (0x11) TTBR + 0x44 Sound generator interrupt • Sound buffer empty
• Sound output completion
18 (0x12) TTBR + 0x48 IR remote controller interrupt • Compare AP
• Compare DB
19 (0x13) TTBR + 0x4c LCD driver interrupt Frame
20 (0x14) TTBR + 0x50 R/F converter Ch.0 interrupt • Reference oscillation completion
• Sensor A oscillation completion
• Sensor B oscillation completion
• Measurement counter overflow error
• Time base counter overflow error
21 (0x15) TTBR + 0x54 R/F converter Ch.1 interrupt • Reference oscillation completion
• Sensor A oscillation completion
• Sensor B oscillation completion
• Measurement counter overflow error
• Time base counter overflow error
22 (0x16) TTBR + 0x58 16-bit timer Ch.2 interrupt Underflow
Vector number/
Software interrupt Vector address Hardware interrupt name Hardware interrupt flag Priority
number
23 (0x17) TTBR + 0x5c Synchronous serial interface • End of transmission
Ch.1 interrupt • Receive buffer full
• Transmit buffer empty
• Overrun error
24 (0x18) TTBR + 0x60 16-bit timer Ch.3 interrupt Underflow
25 (0x19) TTBR + 0x64 12-bit A/D converter interrupt • Analog input signal m A/D conversion completion
• Analog input signal m A/D conversion result overwrite
error
26 (0x1a) TTBR + 0x68 16-bit PWM timer Ch.2 • Capture overwrite
interrupt • Compare/capture
• Counter MAX
• Counter zero
27 (0x1b) TTBR + 0x6c reserved –
: : : : ↓
31 (0x1f) TTBR + 0x7c reserved – Low *1
*1 When the same interrupt level is set
*2 Either reset or NMI can be selected as the watchdog timer interrupt with software.
5.3 Initialization
The following shows an example of the initial setting procedure related to interrupts:
1. Execute the di instruction to set the CPU into interrupt disabled state.
2. If the vector table start address is different from the default address, set it to the MSCTTBRL and MSCTTBRH
registers after removing system protection by writing 0x0096 to the MSCPROT.PROT[15:0] bits. Then, write a
value other than 0x0096 to the MSCPROT.PROT[15:0] bits to set system protection.
3. Set the interrupt enable bit of the peripheral circuit to 0 (interrupt disabled).
4. Set the interrupt level for the peripheral circuit using the ITCLVx.ILVx[2:0] bits in the ITC.
5. Configure the peripheral circuit and start its operation.
6. Clear the interrupt factor flag of the peripheral circuit.
7. Set the interrupt enable bit of the peripheral circuit to 1 (interrupt enabled).
8. Execute the ei instruction to set the CPU into interrupt enabled state.
Note: To prevent occurrence of unnecessary interrupts, the corresponding interrupt flag should be
cleared before setting the interrupt enable bit to 1 (interrupt enabled) and before terminating the
interrupt handler routine.
5.5 NMI
The watchdog timer embedded in this IC can generate a non-maskable interrupt (NMI). This interrupt takes prece-
dence over other interrupts and is unconditionally accepted by the CPU.
For detailed information on generating NMI, refer to the “Watchdog Timer” chapter.
Note: When HALT or SLEEP mode is canceled, the CPU jumps to the interrupt handler routine after
executing one instruction. To execute the interrupt handler routine immediately after HALT or
SLEEP mode is canceled, place the nop instruction at just behind the halt/slp instruction.
PPORT
Pxy
Pxy
Pxy
PxSELy
PxyMUX[1:0]
Peripheral I/O function 0 I/O control
Peripheral I/O function 1 I/O control
Peripheral I/O function 2 I/O control I/O cell
Peripheral I/O function 3 I/O control GPIO/ control signal
peripheral I/O
PxOUTy GPIO function function
Output signal
Internal data bus
switching
PxOENy General-purpose circuit
I/O control
PxIENy
PxPDPUy I/O cell Pxy
PxRENy
PxCHATENy
CLKSRC[1:0]
Clock CLKDIV[3:0] PxINy Chattering Input signal
generator filter
DBRUN
CLK_PPORT
Key-entry Interrupt
reset signal Key-entry
System reset PxEDGEy control circuit
reset control
controller
circuit PxINT
PxIFy
KRSTCFG[1:0]
PxIEy
Interrupt
controller
VDD VDD
Pull-up/down Pull-up/down Pull-up/down Pull-up/down
Control signal control Control signal control
Refer to “Pin Descriptions” in the “Overview” chapter for the cell type, either the over voltage tolerant fail-safe
type I/O cell or the standard I/O cell, included in each port.
6.2.3 Pull-Up/Pull-Down
The GPIO port has a pull-up/pull-down function. Either pull-up or pull-down may be selected for each port indi-
vidually. This function may also be disabled for the port that does not require pulling up/down.
When the port level is switched from low to high through the pull-up resistor included in the I/O cell or from high
to low through the pull-down resistor, a delay will occur in the waveform rising/falling edge depending on the time
constant by the pull-up/pull-down resistance and the pin load capacitance. The rising/falling time is commonly de-
termined by the following equation:
tPR = -RINU × (CIN + CBOARD) × ln(1 - VT+/VDD) (Eq. 6.1)
tPF = -RIND × (CIN + CBOARD) × ln(1 - VT-/VDD)
Where
tPR: Rising time (port level = low → high) [second]
tPF: Falling time (port level = high → low) [second]
VT+: High level Schmitt input threshold voltage [V]
VT-: Low level Schmitt input threshold voltage [V]
RINU/RIND: Pull-up/pull-down resistance [W]
CIN: Pin capacitance [F]
CBOARD: Parasitic capacitance on the board [F]
6.4 Operations
6.4.1 Initialization
After a reset, the ports except for the debugging function are configured as shown below.
• Port input: Disabled
• Port output: Disabled
• Pull-up: Off
• Pull-down: Off
• Port pins: High impedance state
• Port function: Configured to GPIO
This status continues until the ports are configured via software. The debugging function ports are configured for
debug signal input/output.
Table 6.4.1.1 lists the port status according to the combination of data input/output control and pull-up/down
control.
Table 6.4.1.1 GPIO Port Control List
PxIOEN. PxIOEN. PxRCTL. PxRCTL. Pull-up/pull-down
Input Output
PxIENy bit PxOENy bit PxRENy bit PxPDPUy bit condition
0 0 0 × Disabled Off (Hi-Z) *1
0 0 1 0 Disabled Pulled down
0 0 1 1 Disabled Pulled up
1 0 0 × Enabled Disabled Off (Hi-Z) *2
1 0 1 0 Enabled Disabled Pulled down
1 0 1 1 Enabled Disabled Pulled up
0 1 0 × Disabled Enabled Off
0 1 1 0 Disabled Enabled Off
0 1 1 1 Disabled Enabled Off
1 1 1 0 Enabled Enabled Off
1 1 1 1 Enabled Enabled Off
*1: Initial status. Current does not flow if the pin is placed into floating status.
*2: Use of the pull-up or pull-down function is recommended, as undesired current will flow if the port input is set to floating status.
Note: If the PxMODSEL.PxSELy bit for the port without a GPIO function is set to 0, the port goes into
initial status (refer to “Initial Settings”). The GPIO control bits are configured to a read-only bit al-
ways read out as 0.
6.5 Interrupts
When the GPIO function is selected for the port with an interrupt function, the port input interrupt function can be
used.
Table 6.5.1 Port Input Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
Port input interrupt PxINTF.PxIFy Rising or falling edge of the input signal Writing 1
PINTFGRP.PxINT Setting an interrupt flag in the port group Clearing PxINTF.PxIFy
Interrupt enable
PPORT provides interrupt enable bits (PxINTCTL.PxIEy bit) corresponding to each interrupt flag. An inter-
rupt request is sent to the interrupt controller only when the interrupt flag, of which interrupt has been enabled
by the interrupt enable bit, is set. For more information on interrupt control, refer to the “Interrupt Controller”
chapter.
When both data output and data input are enabled, the pin output status controlled by this IC can be
read.
These bits do not affect the input control when the port is used as a peripheral I/O function.
Bits 7–0 PxOEN[7:0]
These bits enable/disable the GPIO port output.
1 (R/W): Enable (Data is output from the port pin.)
0 (R/W): Disable (The port is placed into Hi-Z.)
These bits do not affect the output control when the port is used as a peripheral I/O function.
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P0RCTL 15 P0PDPU7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P0 Port Pull-up/down 14 P0PDPU6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Control Register) 13 P0PDPU5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P0PDPU4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P0PDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P0PDPU2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P0PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P0PDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P0REN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
6 P0REN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P0REN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0REN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0REN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0REN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0REN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P0INTF 15–8 – 0x00 – R – – – – – –
(P0 Port Interrupt 7 P0IF7 0 H0 R/W Cleared by writing ✓ ✓ ✓ ✓ ✓
Flag Register) 6 P0IF6 0 H0 R/W 1. ✓ ✓ ✓ ✓ ✓
5 P0IF5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0IF4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P0INTCTL 15 P0EDGE7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P0 Port Interrupt 14 P0EDGE6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Control Register) 13 P0EDGE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P0EDGE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P0EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P0EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P0EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P0EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P0IE7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
6 P0IE6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P0IE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0IE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P0CHATEN 15–8 – 0x00 – R – – – – – –
(P0 Port Chattering 7 P0CHATEN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Filter Enable Register) 6 P0CHATEN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P0CHATEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0CHATEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P0MODSEL 15–8 – 0x00 – R – – – – – –
(P0 Port Mode Select 7 P0SEL7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Register) 6 P0SEL6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P0SEL5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0SEL4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P0FNCSEL 15–14 P07MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P0 Port Function 13–12 P06MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Select Register) 11–10 P05MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
9–8 P04MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–6 P03MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P02MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P01MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P00MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P1IOEN 15 P1IEN7 0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Enable 14 P1IEN6 0 H0 R/W – – ✓ ✓ ✓
Register) 13 P1IEN5 0 H0 R/W – – ✓ ✓ ✓
12 P1IEN4 0 H0 R/W – – ✓ ✓ ✓
11 P1IEN3 0 H0 R/W ✓ – ✓ ✓ ✓
10 P1IEN2 0 H0 R/W ✓ – ✓ ✓ ✓
9 P1IEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P1IEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P1OEN7 0 H0 R/W – – – ✓ ✓ ✓
6 P1OEN6 0 H0 R/W – – ✓ ✓ ✓
5 P1OEN5 0 H0 R/W – – ✓ ✓ ✓
4 P1OEN4 0 H0 R/W – – ✓ ✓ ✓
3 P1OEN3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1OEN2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1OEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1OEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P1RCTL 15 P1PDPU7 0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Pull-up/down 14 P1PDPU6 0 H0 R/W – – ✓ ✓ ✓
Control Register) 13 P1PDPU5 0 H0 R/W – – ✓ ✓ ✓
12 P1PDPU4 0 H0 R/W – – ✓ ✓ ✓
11 P1PDPU3 0 H0 R/W ✓ – ✓ ✓ ✓
10 P1PDPU2 0 H0 R/W ✓ – ✓ ✓ ✓
9 P1PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P1PDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P1REN7 0 H0 R/W – – – ✓ ✓ ✓
6 P1REN6 0 H0 R/W – – ✓ ✓ ✓
5 P1REN5 0 H0 R/W – – ✓ ✓ ✓
4 P1REN4 0 H0 R/W – – ✓ ✓ ✓
3 P1REN3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1REN2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1REN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P1INTF 15–8 – 0x00 – R – – – – – –
(P1 Port Interrupt 7 P1IF7 0 H0 R/W Cleared by writing – – ✓ ✓ ✓
Flag Register) 6 P1IF6 0 H0 R/W 1. – – ✓ ✓ ✓
5 P1IF5 0 H0 R/W – – ✓ ✓ ✓
4 P1IF4 0 H0 R/W – – ✓ ✓ ✓
3 P1IF3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1IF2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P1INTCTL 15 P1EDGE7 0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Interrupt 14 P1EDGE6 0 H0 R/W – – ✓ ✓ ✓
Control Register) 13 P1EDGE5 0 H0 R/W – – ✓ ✓ ✓
12 P1EDGE4 0 H0 R/W – – ✓ ✓ ✓
11 P1EDGE3 0 H0 R/W ✓ – ✓ ✓ ✓
10 P1EDGE2 0 H0 R/W ✓ – ✓ ✓ ✓
9 P1EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P1EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P1IE7 0 H0 R/W – – – ✓ ✓ ✓
6 P1IE6 0 H0 R/W – – ✓ ✓ ✓
5 P1IE5 0 H0 R/W – – ✓ ✓ ✓
4 P1IE4 0 H0 R/W – – ✓ ✓ ✓
3 P1IE3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1IE2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P1CHATEN 15–8 – 0x00 – R – – – – – –
(P1 Port Chattering 7 P1CHATEN7 0 H0 R/W – – – ✓ ✓ ✓
Filter Enable Register) 6 P1CHATEN6 0 H0 R/W – – ✓ ✓ ✓
5 P1CHATEN5 0 H0 R/W – – ✓ ✓ ✓
4 P1CHATEN4 0 H0 R/W – – ✓ ✓ ✓
3 P1CHATEN3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1CHATEN2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P1MODSEL 15–8 – 0x00 – R – – – – – –
(P1 Port Mode Select 7 P1SEL7 0 H0 R/W – – – ✓ ✓ ✓
Register) 6 P1SEL6 0 H0 R/W – – ✓ ✓ ✓
5 P1SEL5 0 H0 R/W – – ✓ ✓ ✓
4 P1SEL4 0 H0 R/W – – ✓ ✓ ✓
3 P1SEL3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1SEL2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P1FNCSEL 15–14 P17MUX[1:0] 0x0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Function 13–12 P16MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
Select Register) 11–10 P15MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
9–8 P14MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
7–6 P13MUX[1:0] 0x0 H0 R/W ✓ – ✓ ✓ ✓
5–4 P12MUX[1:0] 0x0 H0 R/W ✓ – ✓ ✓ ✓
3–2 P11MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P10MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P2INTF 15–8 – 0x00 – R – – – – – –
(P2 Port Interrupt 7 P2IF7 0 H0 R/W Cleared by writing – – ✓ ✓ –
Flag Register) 6 P2IF6 0 H0 R/W 1. – – ✓ ✓ –
5 P2IF5 0 H0 R/W – – ✓ ✓ –
4 P2IF4 0 H0 R/W – – ✓ ✓ ✓
3 P2IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P2INTCTL 15 P2EDGE7 0 H0 R/W – – – ✓ ✓ –
(P2 Port Interrupt 14 P2EDGE6 0 H0 R/W – – ✓ ✓ –
Control Register) 13 P2EDGE5 0 H0 R/W – – ✓ ✓ –
12 P2EDGE4 0 H0 R/W – – ✓ ✓ ✓
11 P2EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P2EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P2EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P2EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P2IE7 0 H0 R/W – – – ✓ ✓ –
6 P2IE6 0 H0 R/W – – ✓ ✓ –
5 P2IE5 0 H0 R/W – – ✓ ✓ –
4 P2IE4 0 H0 R/W – – ✓ ✓ ✓
3 P2IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P2CHATEN 15–8 – 0x00 – R – – – – – –
(P2 Port Chattering 7 P2CHATEN7 0 H0 R/W – – – ✓ ✓ –
Filter Enable Register) 6 P2CHATEN6 0 H0 R/W – – ✓ ✓ –
5 P2CHATEN5 0 H0 R/W – – ✓ ✓ –
4 P2CHATEN4 0 H0 R/W – – ✓ ✓ ✓
3 P2CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P2MODSEL 15–8 – 0x00 – R – – – – – –
(P2 Port Mode Select 7 P2SEL7 0 H0 R/W – – – ✓ ✓ –
Register) 6 P2SEL6 0 H0 R/W – – ✓ ✓ –
5 P2SEL5 0 H0 R/W – – ✓ ✓ –
4 P2SEL4 0 H0 R/W – – ✓ ✓ ✓
3 P2SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P2FNCSEL 15–14 P27MUX[1:0] 0x0 H0 R/W – – – ✓ ✓ –
(P2 Port Function 13–12 P26MUX[1:0] 0x0 H0 R/W – – ✓ ✓ –
Select Register) 11–10 P25MUX[1:0] 0x0 H0 R/W – – ✓ ✓ –
9–8 P24MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
7–6 P23MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P22MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P21MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P20MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P3RCTL 15 P3PDPU7 0 H0 R/W – – – ✓ ✓ ✓
(P3 Port Pull-up/down 14 P3PDPU6 0 H0 R/W – ✓ ✓ ✓ ✓
Control Register) 13 P3PDPU5 0 H0 R/W – ✓ ✓ ✓ ✓
12 P3PDPU4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P3PDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P3PDPU2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P3PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P3PDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P3REN7 0 H0 R/W – – – ✓ ✓ ✓
6 P3REN6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3REN5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3REN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3REN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3REN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3REN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P3INTF 15–8 – 0x00 – R – – – – – –
(P3 Port Interrupt 7 P3IF7 0 H0 R/W Cleared by writing – – ✓ ✓ ✓
Flag Register) 6 P3IF6 0 H0 R/W 1. – ✓ ✓ ✓ ✓
5 P3IF5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3IF4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P3INTCTL 15 P3EDGE7 0 H0 R/W – – – ✓ ✓ ✓
(P3 Port Interrupt 14 P3EDGE6 0 H0 R/W – ✓ ✓ ✓ ✓
Control Register) 13 P3EDGE5 0 H0 R/W – ✓ ✓ ✓ ✓
12 P3EDGE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P3EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P3EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P3EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P3EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P3IE7 0 H0 R/W – – – ✓ ✓ ✓
6 P3IE6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3IE5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3IE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P3CHATEN 15–8 – 0x00 – R – – – – – –
(P3 Port Chattering 7 P3CHATEN7 0 H0 R/W – – – ✓ ✓ ✓
Filter Enable Register) 6 P3CHATEN6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3CHATEN5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3CHATEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P3MODSEL 15–8 – 0x00 – R – – – – – –
(P3 Port Mode Select 7 P3SEL7 0 H0 R/W – – – ✓ ✓ ✓
Register) 6 P3SEL6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3SEL5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3SEL4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P3FNCSEL 15–14 P37MUX[1:0] 0x0 H0 R/W – – – ✓ ✓ ✓
(P3 Port Function 13–12 P36MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
Select Register) 11–10 P35MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
9–8 P34MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–6 P33MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P32MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P31MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P30MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P4IOEN 15 P4IEN7 0 H0 R/W – – – – ✓ –
(P4 Port Enable 14 P4IEN6 0 H0 R/W – – ✓ ✓ ✓
Register) 13 P4IEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P4IEN4 0 H0 R/W – – – ✓ –
11 P4IEN3 0 H0 R/W – – – ✓ –
10 P4IEN2 0 H0 R/W – – – ✓ –
9 P4IEN1 0 H0 R/W – – ✓ ✓ ✓
8 P4IEN0 0 H0 R/W – – ✓ ✓ ✓
7 P4OEN7 0 H0 R/W – – – – ✓ –
6 P4OEN6 0 H0 R/W – – ✓ ✓ ✓
5 P4OEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4OEN4 0 H0 R/W – – – ✓ –
3 P4OEN3 0 H0 R/W – – – ✓ –
2 P4OEN2 0 H0 R/W – – – ✓ –
1 P4OEN1 0 H0 R/W – – ✓ ✓ ✓
0 P4OEN0 0 H0 R/W – – ✓ ✓ ✓
P4RCTL 15 P4PDPU7 0 H0 R/W – – – – ✓ –
(P4 Port Pull-up/down 14 P4PDPU6 0 H0 R/W – – ✓ ✓ ✓
Control Register) 13 P4PDPU5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P4PDPU4 0 H0 R/W – – – ✓ –
11 P4PDPU3 0 H0 R/W – – – ✓ –
10 P4PDPU2 0 H0 R/W – – – ✓ –
9 P4PDPU1 0 H0 R/W – – ✓ ✓ ✓
8 P4PDPU0 0 H0 R/W – – ✓ ✓ ✓
7 P4REN7 0 H0 R/W – – – – ✓ –
6 P4REN6 0 H0 R/W – – ✓ ✓ ✓
5 P4REN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4REN4 0 H0 R/W – – – ✓ –
3 P4REN3 0 H0 R/W – – – ✓ –
2 P4REN2 0 H0 R/W – – – ✓ –
1 P4REN1 0 H0 R/W – – ✓ ✓ ✓
0 P4REN0 0 H0 R/W – – ✓ ✓ ✓
P4INTF 15–8 – 0x00 – R – – – – – –
(P4 Port Interrupt 7 P4IF7 0 H0 R/W Cleared by writing – – – ✓ –
Flag Register) 6 P4IF6 0 H0 R/W 1. – – ✓ ✓ ✓
5 P4IF5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4IF4 0 H0 R/W – – – ✓ –
3 P4IF3 0 H0 R/W – – – ✓ –
2 P4IF2 0 H0 R/W – – – ✓ –
1 P4IF1 0 H0 R/W – – ✓ ✓ ✓
0 P4IF0 0 H0 R/W – – ✓ ✓ ✓
P4INTCTL 15 P4EDGE7 0 H0 R/W – – – – ✓ –
(P4 Port Interrupt 14 P4EDGE6 0 H0 R/W – – ✓ ✓ ✓
Control Register) 13 P4EDGE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P4EDGE4 0 H0 R/W – – – ✓ –
11 P4EDGE3 0 H0 R/W – – – ✓ –
10 P4EDGE2 0 H0 R/W – – – ✓ –
9 P4EDGE1 0 H0 R/W – – ✓ ✓ ✓
8 P4EDGE0 0 H0 R/W – – ✓ ✓ ✓
7 P4IE7 0 H0 R/W – – – – ✓ –
6 P4IE6 0 H0 R/W – – ✓ ✓ ✓
5 P4IE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4IE4 0 H0 R/W – – – ✓ –
3 P4IE3 0 H0 R/W – – – ✓ –
2 P4IE2 0 H0 R/W – – – ✓ –
1 P4IE1 0 H0 R/W – – ✓ ✓ ✓
0 P4IE0 0 H0 R/W – – ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P4CHATEN 15–8 – 0x00 – R – – – – – –
(P4 Port Chattering 7 P4CHATEN7 0 H0 R/W – – – – ✓ –
Filter Enable Register) 6 P4CHATEN6 0 H0 R/W – – ✓ ✓ ✓
5 P4CHATEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4CHATEN4 0 H0 R/W – – – ✓ –
3 P4CHATEN3 0 H0 R/W – – – ✓ –
2 P4CHATEN2 0 H0 R/W – – – ✓ –
1 P4CHATEN1 0 H0 R/W – – ✓ ✓ ✓
0 P4CHATEN0 0 H0 R/W – – ✓ ✓ ✓
P4MODSEL 15–8 – 0x00 – R – – – – – –
(P4 Port Mode Select 7 P4SEL7 0 H0 R/W – – – – ✓ –
Register) 6 P4SEL6 0 H0 R/W – – ✓ ✓ ✓
5 P4SEL5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4SEL4 0 H0 R/W – – – ✓ –
3 P4SEL3 0 H0 R/W – – – ✓ –
2 P4SEL2 0 H0 R/W – – – ✓ –
1 P4SEL1 0 H0 R/W – – ✓ ✓ ✓
0 P4SEL0 0 H0 R/W – – ✓ ✓ ✓
P4FNCSEL 15–14 P47MUX[1:0] 0x0 H0 R/W – – – – ✓ –
(P4 Port Function 13–12 P46MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
Select Register) 11–10 P45MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
9–8 P44MUX[1:0] 0x0 H0 R/W – – – ✓ –
7–6 P43MUX[1:0] 0x0 H0 R/W – – – ✓ –
5–4 P42MUX[1:0] 0x0 H0 R/W – – – ✓ –
3–2 P41MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
1–0 P40MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P5INTF 15–8 – 0x00 – R – – – – – –
(P5 Port Interrupt 7–6 – 0x0 – R – – – – – –
Flag Register) 5 P5IF5 0 H0 R/W Cleared by writing – – ✓ ✓ –
4 P5IF4 0 H0 R/W 1. – – ✓ ✓ –
3 P5IF3 0 H0 R/W – – – ✓ –
2 P5IF2 0 H0 R/W – – – ✓ –
1 P5IF1 0 H0 R/W – – – ✓ –
0 P5IF0 0 H0 R/W – – – ✓ –
P5INTCTL 15–14 – 0x0 – R – – – – – –
(P5 Port Interrupt 13 P5EDGE5 0 H0 R/W – – – ✓ ✓ –
Control Register) 12 P5EDGE4 0 H0 R/W – – ✓ ✓ –
11 P5EDGE3 0 H0 R/W – – – ✓ –
10 P5EDGE2 0 H0 R/W – – – ✓ –
9 P5EDGE1 0 H0 R/W – – – ✓ –
8 P5EDGE0 0 H0 R/W – – – ✓ –
7–6 – 0x0 – R – – – – – –
5 P5IE5 0 H0 R/W – – – ✓ ✓ –
4 P5IE4 0 H0 R/W – – ✓ ✓ –
3 P5IE3 0 H0 R/W – – – ✓ –
2 P5IE2 0 H0 R/W – – – ✓ –
1 P5IE1 0 H0 R/W – – – ✓ –
0 P5IE0 0 H0 R/W – – – ✓ –
P5CHATEN 15–8 – 0x00 – R – – – – – –
(P5 Port Chattering 7–6 – 0x0 – R – – – – – –
Filter Enable Register) 5 P5CHATEN5 0 H0 R/W – – – ✓ ✓ –
4 P5CHATEN4 0 H0 R/W – – ✓ ✓ –
3 P5CHATEN3 0 H0 R/W – – – ✓ –
2 P5CHATEN2 0 H0 R/W – – – ✓ –
1 P5CHATEN1 0 H0 R/W – – – ✓ –
0 P5CHATEN0 0 H0 R/W – – – ✓ –
P5MODSEL 15–8 – 0x00 – R – – – – – –
(P5 Port Mode Select 7–6 – 0x0 – R – – – – – –
Register) 5 P5SEL5 0 H0 R/W – – – ✓ ✓ –
4 P5SEL4 0 H0 R/W – – ✓ ✓ –
3 P5SEL3 0 H0 R/W – – – ✓ –
2 P5SEL2 0 H0 R/W – – – ✓ –
1 P5SEL1 0 H0 R/W – – – ✓ –
0 P5SEL0 0 H0 R/W – – – ✓ –
P5FNCSEL 15–12 – 0x00 – R – – – – – –
(P5 Port Function 11–10 P55MUX[1:0] 0x0 H0 R/W – – – ✓ ✓ –
Select Register) 9–8 P54MUX[1:0] 0x0 H0 R/W – – ✓ ✓ –
7–6 P53MUX[1:0] 0x0 H0 R/W – – – ✓ –
5–4 P52MUX[1:0] 0x0 H0 R/W – – – ✓ –
3–2 P51MUX[1:0] 0x0 H0 R/W – – – ✓ –
1–0 P50MUX[1:0] 0x0 H0 R/W – – – ✓ –
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P6INTF 15–8 – 0x00 – R – – – – – –
(P6 Port Interrupt 7 P6IF7 0 H0 R/W Cleared by writing ✓ ✓ ✓ ✓ ✓
Flag Register) 6 P6IF6 0 H0 R/W 1. ✓ ✓ ✓ ✓ ✓
5 P6IF5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6IF4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P6INTCTL 15 P6EDGE7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P6 Port Interrupt 14 P6EDGE6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Control Register) 13 P6EDGE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P6EDGE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P6EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P6EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P6EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P6EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P6IE7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
6 P6IE6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P6IE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6IE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P6CHATEN 15–8 – 0x00 – R – – – – – –
(P6 Port Chattering 7 P6CHATEN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Filter Enable Register) 6 P6CHATEN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P6CHATEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6CHATEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P6MODSEL 15–8 – 0x00 – R – – – – – –
(P6 Port Mode Select 7 P6SEL7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Register) 6 P6SEL6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P6SEL5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6SEL4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
P6FNCSEL 15–14 P67MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P6 Port Function 13–12 P66MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Select Register) 11–10 P65MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
9–8 P64MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–6 P63MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P62MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P61MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P60MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P7RCTL 15 – 0 – R – – – – – –
(P7 Port Pull-up/down 14 P7PDPU6 0 H0 R/W – – – – ✓ ✓
Control Register) 13 P7PDPU5 0 H0 R/W – – – ✓ ✓
12 P7PDPU4 0 H0 R/W – – – ✓ ✓
11 P7PDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P7PDPU2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P7PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P7PDPU0 0 H0 R/W – – – ✓ –
7 – 0 – R – – – – – –
6 P7REN6 0 H0 R/W – – – – ✓ ✓
5 P7REN5 0 H0 R/W – – – ✓ ✓
4 P7REN4 0 H0 R/W – – – ✓ ✓
3 P7REN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7REN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7REN0 0 H0 R/W – – – ✓ –
P7INTF 15–8 – 0x00 – R – – – – – –
(P7 Port Interrupt 7 – 0 – R – – – – – –
Flag Register) 6 P7IF6 0 H0 R/W Cleared by writing – – – ✓ ✓
5 P7IF5 0 H0 R/W 1. – – – ✓ ✓
4 P7IF4 0 H0 R/W – – – ✓ ✓
3 P7IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7IF0 0 H0 R/W – – – ✓ –
P7INTCTL 15 – 0 – R – – – – – –
(P7 Port Interrupt 14 P7EDGE6 0 H0 R/W – – – – ✓ ✓
Control Register) 13 P7EDGE5 0 H0 R/W – – – ✓ ✓
12 P7EDGE4 0 H0 R/W – – – ✓ ✓
11 P7EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P7EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P7EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P7EDGE0 0 H0 R/W – – – ✓ –
7 – 0 – R – – – – – –
6 P7IE6 0 H0 R/W – – – – ✓ ✓
5 P7IE5 0 H0 R/W – – – ✓ ✓
4 P7IE4 0 H0 R/W – – – ✓ ✓
3 P7IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7IE0 0 H0 R/W – – – ✓ –
P7CHATEN 15–8 – 0x00 – R – – – – – –
(P7 Port Chattering 7 – 0 – R – – – – – –
Filter Enable Register) 6 P7CHATEN6 0 H0 R/W – – – – ✓ ✓
5 P7CHATEN5 0 H0 R/W – – – ✓ ✓
4 P7CHATEN4 0 H0 R/W – – – ✓ ✓
3 P7CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7CHATEN0 0 H0 R/W – – – ✓ –
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
P7MODSEL 15–8 – 0x00 – R – – – – – –
(P7 Port Mode Select 7 – 0 – R – – – – – –
Register) 6 P7SEL6 0 H0 R/W – – – – ✓ ✓
5 P7SEL5 0 H0 R/W – – – ✓ ✓
4 P7SEL4 0 H0 R/W – – – ✓ ✓
3 P7SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 – 0 – R – – – – – –
P7FNCSEL 15–14 – 0x0 – R – – – – – –
(P7 Port Function 13–12 P76MUX[1:0] 0x0 H0 R/W – – – – ✓ ✓
Select Register) 11–10 P75MUX[1:0] 0x0 H0 R/W – – – ✓ ✓
9–8 P74MUX[1:0] 0x0 H0 R/W – – – ✓ ✓
7–6 P73MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P72MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P71MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 – 0x0 – R – – – – – –
Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
PDIOEN 15–13 – 0x0 – R – – – – – –
(Pd Port Enable 12 PDIEN4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Register) 11 PDIEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 (reserved) 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 PDIEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 PDIEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–5 – 0 – R – – – – – –
4 PDOEN4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
3 PDOEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 PDOEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 PDOEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 PDOEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
PDRCTL 15–13 – 0x0 – R – – – – – –
(Pd Port Pull-up/down 12 PDPDPU4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Control Register) 11 PDPDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 (reserved) 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 PDPDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 PDPDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–5 – 0 – R – – – – – –
4 PDREN4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
3 PDREN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 (reserved) 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 PDREN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 PDREN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
PDINTF 15–0 – 0x0000 – R – – – – – –
PDINTCTL
PDCHATEN
PDMODSEL 15–8 – 0x00 – R – – – – – –
(Pd Port Mode Select 7–5 – 0 – R – – – – – –
Register) 4 PDSEL4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
3 PDSEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 PDSEL2 1 H0 R/W ✓ ✓ ✓ ✓ ✓
1 PDSEL1 1 H0 R/W ✓ ✓ ✓ ✓ ✓
0 PDSEL0 1 H0 R/W ✓ ✓ ✓ ✓ ✓
PDFNCSEL 15–10 – 0x00 – R – – – – – –
(Pd Port Function 9–8 PD4MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Select Register) 7–6 PD3MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 PD2MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 PD1MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 PD0MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
PxyPPFNC[2:0]
PxyPERICH[1:0]
Input data
PxyPERISEL[2:0] Peripheral circuit
selector
Output data
selector I/O port
Data, I/O control Pxy
Function 1 selection
Note: Do not assign a peripheral input function to two or more I/O ports. Although the I/O ports output
the same waveforms when an output function is assigned to two or more I/O port, a skew oc-
curs due to the internal delay.
8.3 Operations
8.3.1 WDT2 Control
Activating WDT2
WDT2 should be initialized and started up with the procedure listed below.
1. Write 0x0096 to the MSCPROT.PROT[15:0] bits. (Remove system protection)
2. Configure the WDT2 operating clock.
3. Set the WDTCTL.MOD[1:0] bits. (Select WDT2 operating mode)
4. Set the WDTCMP.CMP[9:0] bits. (Set NMI/reset generation cycle)
5. Write 1 to the WDTCTL.WDTCNTRST bit. (Reset WDT2 counter)
6. Write a value other than 0xa to the WDTCTL.WDTRUN[3:0] bits. (Start up WDT2)
7. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
tWDT = ——CMP +1
—————— (Eq. 8.1)
CLK_WDT2
Where
tWDT: NMI/reset generation cycle [second]
CLK_WDT2: WDT2 operating clock frequency [Hz]
CMP: Setting value of the WDTCMP.CMP[9:0] bits
Example) tWDT = 2.5 seconds when CLK_WDT2 = 256 Hz and the WDTCMP.CMP[9:0] bits = 639
Deactivating WDT2
WDT2 should be stopped with the procedure listed below.
1. Write 0x0096 to the MSCPROT.PROT[15:0] bits. (Remove system protection)
2. Write 0xa to the WDTCTL.WDTRUN[3:0] bits. (Stop WDT2)
3. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
Bit 8 STATNMI
This bit indicates that a counter compare match and NMI have occurred.
1 (R): NMI (counter compare match) occurred
0 (R): NMI not occurred
When the NMI generation function of WDT2 is used, read this bit in the NMI handler routine to con-
firm that WDT2 was the source of the NMI.
The WDTCTL.STATNMI bit set to 1 is cleared to 0 by writing 1 to the WDTCTL.WDTCNTRST bit.
Bits 7–5 Reserved
Bit 4 WDTCNTRST
This bit resets the 10-bit counter and the WDTCTL.STATNMI bit.
1 (WP): Reset
0 (WP): Ignored
0 (R): Always 0 when being read
Bits 3–0 WDTRUN[3:0]
These bits control WDT2 to run and stop.
0xa (WP): Stop
Values other than 0xa (WP): Run
0xa (R): Idle
0x0 (R): Running
Always 0x0 is read if a value other than 0xa is written.
Since an NMI or reset may be generated immediately after running depending on the counter value,
WDT2 should also be reset concurrently when running WDT2.
P.M.
Stopwatch counter
RTCHHA[1:0] RTCHH[1:0]
Hour
SW1IE SW1IF /RTCHLA[3:0] /RTCHL[3:0]
Comparator
SW10IE SW10IF RTCMIHA[2:0] RTCMIH[2:0]
Minute
SW100IE SW100IF /RTCMILA[3:0] /RTCMIL[3:0]
ALARMIE ALARMIF RTCSHA[2:0] RTCSH[2:0]
Second
1DAYIE 1DAYIF /RTCSLA[3:0] /RTCSL[3:0]
1HURIE 1HURIF
1MINIE 1MINIF
1SECIE 1SECIF
Interrupt
1_2SECIE 1_2SECIF
control
1_4SECIE 1_4SECIF
circuit
1_8SECIE 1_8SECIF
1_32SECIE 1_32SECIF
1 Hz counter interrupt
Interrupt controller
Alarm interrupt
If the port is shared with the RTCA output function and other functions, the RTCA function must be assigned to the
port. For more information, refer to the “I/O Ports” chapter.
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 9-1
TECHNICAL MANUAL (Rev. 1.3)
9 REAL-TIME CLOCK (RTCA)
RTCCTL.RTCTRMBSY
Table 9.3.2.1 lists the frequency tolerance correction rates when the theoretical regulation execution cycle time n is
4,096 seconds as an example.
Table 9.3.2.1 Correction Rates when Theoretical Regulation Execution Cycle Time n = 4,096 Seconds
RTCCTL.RTCTRM[6:0] Correction Correction rate RTCCTL.RTCTRM[6:0] Correction Correction rate
bits (two’s-complement) value (decimal) [ppm] bits (two’s-complement) value (decimal) [ppm]
0x00 0 0.0 0x40 -64 -61.0
0x01 1 1.0 0x41 -63 -60.1
0x02 2 1.9 0x42 -62 -59.1
0x03 3 2.9 0x43 -61 -58.2
··· ··· ··· ··· ··· ···
0x3e 62 59.1 0x7e -2 -1.9
0x3f 63 60.1 0x7f -1 -1.0
Minimum resolution: 1 ppm, Correction rate range: -61.0 to 60.1 ppm
9-2 Seiko Epson Corporation S1C17M30/M31/M32/M33/M34
TECHNICAL MANUAL (Rev. 1.3)
9 REAL-TIME CLOCK (RTCA)
Notes: • The theoretical regulation affects only the real-time clock counter and 1 Hz counter. It does
not affect the stopwatch counter.
• After a value is written to the RTCCTL.RTCTRM[6:0] bits, the theoretical regulation correction
takes effect on the 1 Hz counter value at the same timing as when the 1 Hz counter changes
to 0x7f. Also an interrupt occurs depending on the counter value at this time.
9.4 Operations
9.4.1 RTCA Control
Follow the sequences shown below to set time to RTCA, to read the current time and to set alarm.
Time setting
1. Set RTCA to 12H or 24H mode using the RTCCTL.RTC24H bit.
2. Write 1 to the RTCCTL.RTCRUN bit to enable for the real-time clock counter to start counting up.
3. Check to see if the RTCCTL.RTCBSY bit = 0 that indicates the counter is ready to rewrite. If the RTCCTL.
RTCBSY bit = 1, wait until it is set to 0.
4. Write the current date and time in BCD code to the control bits listed below.
RTCSEC.RTCSH[2:0]/RTCSL[3:0] bits (second)
RTCHUR.RTCMIH[2:0]/RTCMIL[3:0] bits (minute)
RTCHUR.RTCHH[1:0]/RTCHL[3:0] bits (hour)
RTCHUR.RTCAP bit (AM/PM) (effective when RTCCTL.RTC24H bit = 0)
RTCMON.RTCDH[1:0]/RTCDL[3:0] bits (day)
RTCMON.RTCMOH/RTCMOL[3:0] bits (month)
RTCYAR.RTCYH[3:0]/RTCYL[3:0] bits (year)
RTCYAR.RTCWK[2:0] bits (day of the week)
5 Write 1 to the RTCCTL.RTCADJ bit (execute 30-second correction) using a time signal to adjust the time.
(For more information on the 30-second correction, refer to “Real-Time Clock Counter Operations.”)
6. Write 1 to the real-time clock counter interrupt flags in the RTCINTF register to clear them.
7. Write 1 to the interrupt enable bits in the RTCINTE register to enable real-time clock counter interrupts.
Time read
1. Check to see if the RTCCTL.RTCBSY bit = 0. If the RTCCTL.RTCBSY bit = 1, wait until it is set to 0.
2. Write 1 to the RTCCTL.RTCHLD bit to suspend count-up operation of the real-time clock counter.
3. Read the date and time from the control bits listed in “Time setting, Step 4” above.
4. Write 0 to the RTCCTL.RTCHLD bit to resume count-up operation of the real-time clock counter. If a
second count-up timing has occurred in the count hold state, the hardware corrects the second counter for
+1 second (for more information on the +1 second correction, refer to “Real-Time Clock Counter Opera-
tions”).
Alarm setting
1. Write 0 to the RTCINTE.ALARMIE bit to disable alarm interrupts.
2. Write the alarm time in BCD code to the control bits listed below (a time within 24 hours from the current
time can be specified).
RTCALM1.RTCSHA[2:0]/RTCSLA[3:0] bits (second)
RTCALM2.RTCMIHA[2:0]/RTCMILA[3:0] bits (minute)
RTCALM2.RTCHHA[1:0]/RTCHLA[3:0] bits (hour)
RTCALM2.RTCAPA bit (AM/PM) (effective when RTCCTL.RTC24H bit = 0)
3. Write 1 to the RTCINTF.ALARMIF bit to clear the alarm interrupt flag.
4. Write 1 to the RTCINTE.ALARMIE bit to enable alarm interrupts.
When the real-time clock counter reaches the alarm time set in Step 2, an alarm interrupt occurs.
30-second correction
This function is provided to set the time-of-day clock by the time signal. Writing 1 to the RTCCTL.RTCADJ
bit clears the second counter and adds 1 to the minute counter if the second counter represents 30 to 59 seconds,
or clears the second counter with the minute counter left unchanged if the second counter represents 0 to 29
seconds.
+1 second correction
If a second count-up timing occurred while the RTCCTL.RTCHLD bit = 1 (count hold state), the real-time
clock counter counts up by +1 second (performs +1 second correction) after the counting has resumed by writ-
ing 0 to the RTCCTL.RTCHLD bit.
Note: If two or more second count-up timings occurred while the RTCCTL.RTCHLD bit = 1, the coun-
ter is always corrected for +1 second only.
Count start
1. Write 1 to the RTCSWCTL.SWRST bit to reset the stopwatch counter.
2. Write 1 to the stopwatch interrupt flags in the RTCINTF register to clear them.
3. Write 1 to the interrupt enable bits in the RTCINTE register to enable stopwatch interrupts.
4. Write 1 to the RTCSWCTL.SWRUN bit to start stopwatch count up operation.
Counter read
1. Read the count value from the RTCSWCTL.BCD10[3:0] and BCD100[3:0] bits.
2. Read again.
i. If the two read values are the same, assume that the count values are read correctly.
ii. If different values are read, perform reading once more and compare the read value with the previous one.
1/100-second 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
counter 3/256 2/256 3/256 2/256 3/256 2/256 3/256 2/256 3/256 2/256 3/256 3/256 3/256 2/256 3/256 2/256 3/256 2/256 3/256 2/256
s s s s s s s s s s s s s s s s s s s s
1/10-second 0 1 2 3 4 5 6 7 8 9
counter 26/256 s 26/256 s 25/256 s 25/256 s 26/256 s 26/256 s 25/256 s 25/256 s 26/256 s 26/256 s
9.5 Interrupts
RTCA has a function to generate the interrupts shown in Table 9.5.1.
Table 9.5.1 RTCA Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
Alarm RTCINTF.ALARMIF
Matching between the RTCALM1–2 register contents Writing 1
and the real-time clock counter contents
1-day RTCINTF.1DAYIF Day counter count up Writing 1
1-hour RTCINTF.1HURIF Hour counter count up Writing 1
1-minute RTCINTF.1MINIF Minute counter count up Writing 1
1-second RTCINTF.1SECIF Second counter count up Writing 1
1/2-second RTCINTF.1_2SECIF See Figure 9.5.1. Writing 1
1/4-second RTCINTF.1_4SECIF See Figure 9.5.1. Writing 1
1/8-second RTCINTF.1_8SECIF See Figure 9.5.1. Writing 1
1/32-second RTCINTF.1_32SECIF See Figure 9.5.1. Writing 1
Stopwatch 1 Hz RTCINTF.SW1IF 1/10-second counter overflow Writing 1
Stopwatch 10 Hz RTCINTF.SW10IF 1/10-second counter count up Writing 1
Stopwatch 100 Hz RTCINTF.SW100IF 1/100-second counter count up Writing 1
Theoretical regulation RTCINTF.RTCTRMIF At the end of theoretical regulation operation Writing 1
completion
1 Hz counter
256 Hz
128 Hz
64 Hz
32 Hz
16 Hz
8 Hz
4 Hz
2 Hz
1 Hz
Interrupt flags
1/32-second interrupt
1/8-second interrupt
1/4-second interrupt
1/2-second interrupt
1-second interrupt
1-minute interrupt
1-day interrupt
Notes: • 1-second to 1/32-second interrupts occur after a lapse of 1/256 second from change of the
1 Hz counter value.
• An alarm interrupt occurs after a lapse of 1/256 second from matching between the AM/PM (in
12H mode), hour, minute, and second counter value and the alarm setting value.
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 9-5
TECHNICAL MANUAL (Rev. 1.3)
9 REAL-TIME CLOCK (RTCA)
RTCA provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the inter-
rupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set.
For more information on interrupt control, refer to the “Interrupt Controller” chapter.
Bit 15 RTCTRMBSY
This bit indicates whether the theoretical regulation is currently executed or not.
1 (R): Theoretical regulation is executing.
0 (R): Theoretical regulation has finished (or not executed).
This bit goes 1 when a value is written to the RTCCTL.RTCTRM[6:0] bits. The theoretical regulation
takes up to 1 second for execution. This bit reverts to 0 automatically after the theoretical regulation
has finished execution.
Bits 14–8 RTCTRM[6:0]
Write the correction value for adjusting the 1 Hz frequency to these bits to execute theoretical regula-
tion. For a calculation method of correction value, refer to “Theoretical Regulation Function.”
Notes: • When the RTCCTL.RTCTRMBSY bit = 1, the RTCCTL.RTCTRM[6:0] bits cannot be
rewritten.
• Writing 0x00 to the RTCCTL.RTCTRM[6:0] bits sets the RTCCTL.RTCTRMBSY bit to 1 as
well. However, no correcting operation is performed.
Bit 7 Reserved
Bit 6 RTCBSY
This bit indicates whether the counter is performing count-up operation or not.
1 (R): In count-up operation
0 (R): Idle (ready to rewrite real-time clock counter)
This bit goes 1 when performing 1-second count-up, +1 second correction, or 30-second correction. It
retains 1 for 1/256 second and then reverts to 0.
Bit 5 RTCHLD
This bit halts the count-up operation of the real-time clock counter.
1 (R/W): Halt real-time clock counter count-up operation
0 (R/W): Normal operation
Writing 1 to this bit halts the count-up operation of the real-time clock counter, this makes it possible
to read the counter value correctly without changing the counter. Write 0 to this bit to resume count-
up operation immediately after the counter has been read. Depending on these operation timings, the
+1 second correction may be executed after the count-up operation resumes. For more information on
the +1 second correction, refer to “Real-Time Clock Counter Operations.”
Note: When the RTCCTL.RTCTRMBSY bit = 1, the RTCCTL.RTCHLD bit cannot be rewritten to 1 (as
fixed at 0).
Bit 4 RTC24H
This bit sets the hour counter to 24H mode or 12H mode.
1 (R/W): 24H mode
0 (R/W): 12H mode
This selection changes the count range of the hour counter. Note, however, that the counter value is
not updated automatically, therefore, it must be programmed again.
Note: Be sure to avoid writing to this bit when the RTCCTL.RTCRUN bit = 1.
Bit 3 Reserved
Bit 2 RTCADJ
This bit executes the 30-second correction time adjustment function.
1 (W): Execute 30-second correction
0 (W): Ineffective
1 (R): 30-second correction is executing.
0 (R): 30-second correction has finished. (Normal operation)
Writing 1 to this bit executes 30-second correction and an enabled interrupt occurs even if the RT-
CCTL.RTCRUN bit = 0. The correction takes up to 2/256 seconds. The RTCCTL.RTCADJ bit is
automatically cleared to 0 when the correction has finished. For more information on the 30-second
correction, refer to “Real-Time Clock Counter Operations.”
Notes: • Be sure to avoid writing to this bit when the RTCCTL.RTCBSY bit = 1.
• Do not write 1 to this bit again while the RTCCTL.RTCADJ bit = 1.
Bit 1 RTCRST
This bit resets the 1 Hz counter, the RTCCTL.RTCADJ bit, and the RTCCTL.RTCHLD bit.
1 (W): Reset
0 (W): Ineffective
1 (R): Reset is being executed.
0 (R): Reset has finished. (Normal operation)
This bit is automatically cleared to 0 after reset has finished.
Bit 0 RTCRUN
This bit starts/stops the real-time clock counter.
1 (R/W): Running/start control
0 (R/W): Idle/stop control
When the real-time clock counter stops counting by writing 0 to this bit, the counter retains the value
when it stopped. Writing 1 to this bit again resumes counting from the value retained.
Bit 15 Reserved
Bits 14–12 RTCSHA[2:0]
Bits 11–8 RTCSLA[3:0]
The RTCALM1.RTCSHA[2:0] bits and the RTCALM1.RTCSLA[3:0] bits set the 10-second digit and
1-second digit of the alarm time, respectively. A value within 0 to 59 seconds can be set in BCD code
as shown in Table 9.6.1.
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 9-7
TECHNICAL MANUAL (Rev. 1.3)
9 REAL-TIME CLOCK (RTCA)
Bit 15 Reserved
Bit 14 RTCAPA
This bit sets A.M. or P.M. of the alarm time in 12H mode (RTCCTL.RTC24H bit = 0).
1 (R/W): P.M.
0 (R/W): A.M.
This setting is ineffective in 24H mode (RTCCTL.RTC24H bit = 1).
Bits 13–12 RTCHHA[1:0]
Bits 11–8 RTCHLA[3:0]
The RTCALM2.RTCHHA[1:0] bits and the RTCALM2.RTCHLA[3:0] bits set the 10-hour digit and
1-hour digit of the alarm time, respectively. A value within 1 to 12 o’clock in 12H mode or 0 to 23 in
24H mode can be set in BCD code.
Bit 7 Reserved
Bits 6–4 RTCMIHA[2:0]
Bits 3–0 RTCMILA[3:0]
The RTCALM2.RTCMIHA[2:0] bits and the RTCALM2.RTCMILA[3:0] bits set the 10-minute digit
and 1-minute digit of the alarm time, respectively. A value within 0 to 59 minutes can be set in BCD
code.
Note: The counter value may not be read correctly while the stopwatch counter is running. The
RTCSWCTL.BCD10[3:0]/BCD100[3:0] bits must be read twice and assume the counter value
was read successfully if the two read results are the same.
Bits 7–5 Reserved
Bit 4 SWRST
This bit resets the stopwatch counter to 0x00.
1 (W): Reset
0 (W): Ineffective
0 (R): Always 0 when being read
When the stopwatch counter in running status is reset, it continues counting from count 0x00. The
stopwatch counter retains 0x00 if it is reset in idle status.
Bits 3–1 Reserved
Bit 0 SWRUN
This bit starts/stops the stopwatch counter.
1 (R/W): Running/start control
0 (R/W): Idle/stop control
When the stopwatch counter stops counting by writing 0 to this bit, the counter retains the value when
it stopped. Writing 1 to this bit again resumes counting from the value retained.
Note: The stopwatch counter stops in sync with the stopwatch clock after 0 is written to the
RTCSWCTL.SWRUN bit. Therefore, the counter value may be incremented (+1) from the
value at writing 0.
Bit 15 Reserved
Bits 14–12 RTCSH[2:0]
Bits 11–8 RTCSL[3:0]
The RTCSEC.RTCSH[2:0] bits and the RTCSEC.RTCSL[3:0] bits are used to set and read the 10-sec-
ond digit and the 1-second digit of the second counter, respectively. The setting/read values are a BCD
code within the range from 0 to 59.
Note: Be sure to avoid writing to the RTCSEC.RTCSH[2:0]/RTCSL[3:0] bits while the RTCCTL.
RTCBSY bit = 1.
Bit 7 RTC1HZ
Bit 6 RTC2HZ
Bit 5 RTC4HZ
Bit 4 RTC8HZ
Bit 3 RTC16HZ
Bit 2 RTC32HZ
Bit 1 RTC64HZ
Bit 0 RTC128HZ
1 Hz counter data can be read from these bits.
The following shows the correspondence between the bit and frequency:
RTCSEC.RTC1HZ bit: 1 Hz
RTCSEC.RTC2HZ bit: 2 Hz
RTCSEC.RTC4HZ bit: 4 Hz
RTCSEC.RTC8HZ bit: 8 Hz
RTCSEC.RTC16HZ bit: 16 Hz
RTCSEC.RTC32HZ bit: 32 Hz
RTCSEC.RTC64HZ bit: 64 Hz
RTCSEC.RTC128HZ bit: 128 Hz
Note: The counter value may not be read correctly while the 1 Hz counter is running. These bits
must be read twice and assume the counter value was read successfully if the two read
results are the same.
Bit 15 Reserved
Bit 14 RTCAP
This bit is used to set and read A.M. or P.M. data in 12H mode (RTCCTL.RTC24H bit = 0).
1 (R/W): P.M.
0 (R/W): A.M.
In 24H mode (RTCCTL.RTC24H bit = 1), this bit is fixed at 0 and writing 1 is ignored. However, if
the RTCHUR.RTCAP bit = 1 when changed to 24H mode, it goes 0 at the next count-up timing of the
hour counter.
Bits 13–12 RTCHH[1:0]
Bits 11–8 RTCHL[3:0]
The RTCHUR.RTCHH[1:0] bits and the RTCHUR.RTCHL[3:0] bits are used to set and read the 10-
hour digit and the 1-hour digit of the hour counter, respectively. The setting/read values are a BCD
code within the range from 1 to 12 in 12H mode or 0 to 23 in 24H mode.
Note: Be sure to avoid writing to the RTCHUR.RTCHH[1:0]/RTCHL[3:0] bits while the RTCCTL.
RTCBSY bit = 1.
Bit 7 Reserved
Table 9.6.2 Correspondence between the count value and day of the week
RTCYAR.RTCWK[2:0] bits Day of the week
0x6 Saturday
0x5 Friday
0x4 Thursday
0x3 Wednesday
0x2 Tuesday
0x1 Monday
0x0 Sunday
Note: Be sure to avoid writing to the RTCYAR.RTCWK[2:0] bits while the RTCCTL.RTCBSY bit = 1.
Bits 7–4 RTCYH[3:0]
Bits 3–0 RTCYL[3:0]
The RTCYAR.RTCYH[3:0] bits and the RTCYAR.RTCYL[3:0] bits are used to set and read the 10-
year digit and the 1-year digit of the year counter, respectively. The setting/read values are a BCD
code within the range from 0 to 99.
Note: Be sure to avoid writing to the RTCYAR.RTCYH[3:0]/RTCYL[3:0] bits while the RTCCTL.
RTCBSY bit = 1.
Bit 15 RTCTRMIF
Bit 14 SW1IF
Bit 13 SW10IF
Bit 12 SW100IF
These bits indicate the real-time clock interrupt cause occurrence status.
1 (R): Cause of interrupt occurred
0 (R): No cause of interrupt occurred
1 (W): Clear flag
0 (W): Ineffective
The following shows the correspondence between the bit and interrupt:
RTCINTF.RTCTRMIF bit: Theoretical regulation completion interrupt
RTCINTF.SW1IF bit: Stopwatch 1 Hz interrupt
RTCINTF.SW10IF bit: Stopwatch 10 Hz interrupt
RTCINTF.SW100IF bit: Stopwatch 100 Hz interrupt
Bits 11–9 Reserved
Bit 8 ALARMIF
Bit 7 1DAYIF
Bit 6 1HURIF
Bit 5 1MINIF
Bit 4 1SECIF
Bit 3 1_2SECIF
Bit 2 1_4SECIF
Bit 1 1_8SECIF
Bit 0 1_32SECIF
These bits indicate the real-time clock interrupt cause occurrence status.
1 (R): Cause of interrupt occurred
0 (R): No cause of interrupt occurred
1 (W): Clear flag
0 (W): Ineffective
The following shows the correspondence between the bit and interrupt:
RTCINTF. ALARMIF bit: Alarm interrupt
RTCINTF.1DAYIF bit: 1-day interrupt
RTCINTF.1HURIF bit: 1-hour interrupt
RTCINTF.1MINIF bit: 1-minute interrupt
RTCINTF.1SECIF bit: 1-second interrupt
RTCINTF.1_2SECIF bit: 1/2-second interrupt
RTCINTF.1_4SECIF bit: 1/4-second interrupt
RTCINTF.1_8SECIF bit: 1/8-second interrupt
RTCINTF.1_32SECIF bit: 1/32-second interrupt
Bit 15 RTCTRMIE
Bit 14 SW1IE
Bit 13 SW10IE
Bit 12 SW100IE
These bits enable real-time clock interrupts.
1 (R/W): Enable interrupts
0 (R/W): Disable interrupts
The following shows the correspondence between the bit and interrupt:
RTCINTE.RTCTRMIE bit: Theoretical regulation completion interrupt
RTCINTE.SW1IE bit: Stopwatch 1 Hz interrupt
RTCINTE.SW10IE bit: Stopwatch 10 Hz interrupt
RTCINTE.SW100IE bit: Stopwatch 100 Hz interrupt
SVD3
MODEN
SVDMD[1:0]
CLK_SVD3 Sampling timing
CLKSRC[1:0] generator
Clock generator
CLKDIV[2:0]
DBRUN
SVDC[4:0]
( EXSVD1 )
EXSEL EXSVD0/1
selector Voltage
EXSVD0 comparator SVDDT
circuit
VDSEL
Internal data bus
VDD
Detection
SVDSC[1:0] SVDIF
result counter
SVDIE
SVDRE[3:0]
Interrupt/reset
To system reset circuit control circuit
To interrupt controller
VSS
Figure 10.2.2.1 Connection between EXSVD0/1 Pin and External Power Supply
REXT resistance value must be determined so that it will be sufficiently smaller than the EXSVD input impedance
REXSVD. For the EXSVD0/1 pin input voltage range and the EXSVD input impedance, refer to “Supply Voltage De-
tector Characteristics” in the “Electrical Characteristics” chapter.
10.4 Operations
10.4.1 SVD3 Control
Starting detection
SVD3 should be initialized and activated with the procedure listed below.
1. Write 0x0096 to the MSCPROT.PROT[15:0] bits. (Remove system protection)
2. Configure the operating clock using the SVDCLK.CLKSRC[1:0] and SVDCLK.CLKDIV[2:0] bits.
3. Set the following SVDCTL register bits:
- SVDCTL.VDSEL and SVDCTL.EXSEL bits (Select detection voltage (VDD, EXSVD0, or EXSVD1))
- SVDCTL.SVDSC[1:0] bits (Set low power supply voltage detection counter)
- SVDCTL.SVDC[4:0] bits (Set SVD detection voltage VSVD/EXSVD detection
voltage VSVD_EXT)
- SVDCTL.SVDRE[3:0] bits (Select reset/interrupt mode)
- SVDCTL.SVDMD[1:0] bits (Set intermittent operation mode)
4. Set the following bits when using the interrupt:
- Write 1 to the SVDINTF.SVDIF bit. (Clear interrupt flag)
- Set the SVDINTE.SVDIE bit to 1. (Enable SVD3 interrupt)
5. Set the SVDCTL.MODEN bit to 1. (Enable SVD3 detection)
6. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
Terminating detection
Follow the procedure shown below to stop SVD3 operation.
1. Write 0x0096 to the MSCPROT.PROT[15:0] bits. (Remove system protection)
2. Write 0 to the SVDCTL.MODEN bit. (Disable SVD3 detection)
3. Write a value other than 0x0096 to the MSCPROT.PROT[15:0] bits. (Set system protection)
SVDCTL.MODEN
SVD3 operating status DET
SVDINTF.SVDDT
Low power supply voltage
detection interrupt
SVDCTL.MODEN
SVD3 operating status DET DET
SVDINTF.SVDDT
Low power supply voltage
detection interrupt
VSVD : Level set using the SVDCTL.SVDC[4:0] bits
: Voltage detection masking time
DET : Voltage detection operation
Figure 10.4.2.1 SVD3 Operations
SVD3 provides the interrupt enable bit (SVDINTE.SVDIE bit) corresponding to the interrupt flag (SVDINTF.
SVDIF bit). An interrupt request is sent to the interrupt controller only when the SVDINTF.SVDIF bit is set while
the interrupt is enabled by the SVDINTE.SVDIE bit. For more information on interrupt control, refer to the “Interrupt
Controller” chapter.
10-4 Seiko Epson Corporation S1C17M30/M31/M32/M33/M34
TECHNICAL MANUAL (Rev. 1.3)
10 SUPPLY VOLTAGE DETECTOR (SVD3)
Once the SVDINTF.SVDIF bit is set, it will not be cleared even if the power supply voltage subsequently returns
to a value exceeding the SVD detection voltage VSVD/EXSVD detection voltage VSVD_EXT. An interrupt may occur
due to a temporary power supply voltage drop, check the power supply voltage status by reading the SVDINTF.
SVDDT bit in the interrupt handler routine.
Bit 15 VDSEL
This bit selects the power supply voltage to be detected by SVD3.
1 (R/WP): Voltage applied to the EXSVD0/1 pin
0 (R/WP): VDD
Bits 14–13 SVDSC[1:0]
These bits set the condition to generate an interrupt/reset (number of successive low voltage detec-
tions) in intermittent operation mode (SVDCTL.SVDMD[1:0] bits = 0x1 to 0x3).
Table 10.6.2 Interrupt/Reset Generating Condition in Intermittent Operation Mode
SVDCTL.SVDSC[1:0] bits Interrupt/reset generating condition
0x3 Low power supply voltage is successively detected eight times.
0x2 Low power supply voltage is successively detected four times.
0x1 Low power supply voltage is successively detected twice.
0x0 Low power supply voltage is successively detected once.
For the configurable range and voltage values, refer to “Supply Voltage Detector Characteristics, SVD
detection voltage VSVD/EXSVD detection voltage VSVD_EXT” in the “Electrical Characteristics” chapter.
For more information on intermittent and continuous operation modes, refer to “SVD3 Operations.”
Bit 0 MODEN
This bit enables/disables for the SVD3 circuit to operate.
1 (R/WP): Enable (Start detection operations)
0 (R/WP): Disable (Stop detection operations)
After this bit has been altered, wait until the value written is read out from this bit without subsequent
operations being performed.
Notes: • Writing 0 to the SVDCTL.MODEN bit resets the SVD3 hardware. However, the register values
set and the interrupt flag are not cleared. The SVDCTL.MODEN bit is actually set to 0 after
this processing has finished. If 1 is written to the SVDCTL.MODEN bit continuously without
waiting for the bit being read as 0 at this time, writing 0 may be ignored and a malfunction
may occur as the hardware restarts without resetting.
• The SVD3 internal circuit is initialized if the SVDCTL.SVDSC[1:0] bits, SVDCTL.SVDRE[3:0]
bits, or SVDCTL.SVDMD[1:0] bits are altered while SVD3 is in operation after 1 is written to
the SVDCTL.MODEN bit.
T16 Ch.n
Underflow
CLKSRC[1:0]
Clock generator CLKDIV[3:0]
DBRUN
MODEN UFIE
Interrupt control
To interrupt controller
circuit
UFIF
(To peripheral circuit)
Note that the EXOSC clock is selected for the channel that does not support the event counter function.
11.4 Operations
11.4.1 Initialization
T16 Ch.n should be initialized and started counting with the procedure shown below.
1. Configure the T16 Ch.n operating clock (see “T16 Operating Clock”).
2. Set the T16_nCTL.MODEN bit to 1. (Enable count operation clock)
3. Set the T16_nMOD.TRMD bit. (Select operation mode (Repeat mode or One-shot mode))
4. Set the T16_nTR register. (Set reload data (counter preset data))
5. Set the following bits when using the interrupt:
- Write 1 to the T16_nINTF.UFIF bit. (Clear interrupt flag)
- Set the T16_nINTE.UFIE bit to 1. (Enable underflow interrupt)
Underflow cycle
T16_nTR
Counter
register setting
0x0000 Time
Software control PRESET = 1 PRUN = 0
PRUN = 1 PRUN = 1
Underflow interrupt
Figure 11.4.3.1 Count Operations in Repeat Mode
0xffff
Underflow cycle
T16_nTR
Counter register setting
0x0000 Time
Software control PRESET = 1 PRUN = 1 PRUN = 1 PRUN = 1
PRUN = 1 PRUN = 0
Underflow interrupt
Figure 11.4.4.1 Count Operations in One-shot Mode
11.5 Interrupt
Each T16 channel has a function to generate the interrupt shown in Table 11.5.1.
Table 11.5.1 T16 Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
Underflow T16_nINTF.UFIF When the counter underflows Writing 1
T16 provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the interrupt
controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set. For
more information on interrupt control, refer to the “Interrupt Controller” chapter.
By writing 1 to this bit, the timer starts count operations. However, the T16_nCTL.MODEN bit must
be set to 1 in conjunction with this bit or it must be set in advance. While the timer is running, writing
0 to this bit stops count operations. When the counter stops due to a counter underflow in one-shot
mode, this bit is automatically cleared to 0.
Bits 7–2 Reserved
Bit 1 PRESET
This bit presets the reload data stored in the T16_nTR register to the counter.
1 (W): Preset
0 (W): Ineffective
1 (R): Presetting in progress
0 (R): Presetting finished or normal operation
By writing 1 to this bit, the timer presets the T16_nTR register value to the counter. However, the
T16_nCTL.MODEN bit must be set to 1 in conjunction with this bit or it must be set in advance. This
bit retains 1 during presetting and is automatically cleared to 0 after presetting has finished.
Bit 0 MODEN
This bit enables the T16 Ch.n operations.
1 (R/W): Enable (Start supplying operating clock)
0 (R/W): Disable (Stop supplying operating clock)
12 UART (UART3)
12.1 Overview
The UART3 is an asynchronous serial interface. The features of the UART3 are listed below.
• Includes a baud rate generator for generating the transfer clock.
• Supports 7- and 8-bit data length (LSB first).
• Odd parity, even parity, or non-parity mode is selectable.
• The start bit length is fixed at 1 bit.
• The stop bit length is selectable from 1 bit and 2 bits.
• Supports full-duplex communications.
• Includes a 2-byte receive data buffer and a 1-byte transmit data buffer.
• Includes an RZI modulator/demodulator circuit to support IrDA 1.0-compatible infrared communications.
• Can detect parity error, framing error, and overrun error.
• Can generate receive buffer full (1 byte/2 bytes), transmit buffer empty, end of transmission, parity error, framing
error, and overrun error interrupts.
• Input pin can be pulled up with an internal resistor.
• The output pin is configurable as an open-drain output.
• Provides the carrier modulation output function.
Figure 12.1.1 shows the UART3 configuration.
Table 12.1.1 UART3 Channel Configuration of S1C17M30/M31/M32/M33/M34
Item S1C17M30 S1C17M31 S1C17M32 S1C17M33 S1C17M34
Number of channels 2 channels (Ch.0 and Ch.1)
UART3 Ch.n
BRDIV
CLK_UART3_n Baud rate
BRT[7:0]
generator
CLKSRC[1:0] FMD[3:0]
Clock generator CLKDIV[1:0]
DBRUN CHLN
MODEN PREN
PRMD
Transmit/receive
STPB
control circuit
RBSY
TBSY
SFTRST
Internal data bus
PUEN
INVRX
IRMD
RZI modulator
Carrier modulator
PECAR
CAREN
CRPER[7:0]
Interrupt
OUTMD
controller
TENDIE TENDIF
FEIE Interrupt FEIF
PEIE control circuit PEIF
OEIE OEIF
RB2FIE RB2FIF
RB1FIE RB1FIF
TBEIE TBEIF
If the port is shared with the UART3 pin and other functions, the UART3 input/output function must be assigned to
the port before activating the UART3. For more information, refer to the “I/O Ports” chapter.
USINn OUT
USOUTn IN
Data length
With the UAnMOD.CHLN bit, the data length can be set to seven bits (UAnMOD.CHLN bit = 0) or eight bits
(UAnMOD.CHLN bit = 1).
Parity function
The parity function is configured using the UAnMOD.PREN and UAnMOD.PRMD bits.
Table 12.4.1 Parity Function Setting
UAnMOD.PREN bit UAnMOD.PRMD bit Parity function
1 1 Odd parity
1 0 Even parity
0 * Non parity
UAnMOD register
CHLN bit STPB bit PREN bit
0 0 0 st D0 D1 D2 D3 D4 D5 D6 sp
0 0 1 st D0 D1 D2 D3 D4 D5 D6 p sp
0 1 0 st D0 D1 D2 D3 D4 D5 D6 sp sp
0 1 1 st D0 D1 D2 D3 D4 D5 D6 p sp sp
1 0 0 st D0 D1 D2 D3 D4 D5 D6 D7 sp
1 0 1 st D0 D1 D2 D3 D4 D5 D6 D7 p sp
1 1 0 st D0 D1 D2 D3 D4 D5 D6 D7 sp sp
1 1 1 st D0 D1 D2 D3 D4 D5 D6 D7 p sp sp
12.5 Operations
12.5.1 Initialization
The UART3 Ch.n should be initialized with the procedure shown below.
1. Assign the UART3 Ch.n input/output function to the ports. (Refer to the “I/O Ports” chapter.)
2. Set the UAnCLK.CLKSRC[1:0] and UAnCLK.CLKDIV[1:0] bits. (Configure operating clock)
3. Configure the following UAnMOD register bits:
- UAnMOD.BRDIV bit (Select baud rate division ratio (1/16 or 1/4))
- UAnMOD.INVRX bit (Enable/disable USINn input signal inversion)
- UAnMOD.INVTX bit (Enable/disable USOUTn output signal inversion)
- UAnMOD.PUEN bit (Enable/disable USINn pin pull-up)
- UAnMOD.OUTMD bit (Enable/disable USOUTn pin open-drain output)
- UAnMOD.IRMD bit (Enable/disable IrDA interface)
- UAnMOD.CHLN bit (Set data length (7 or 8 bits))
- UAnMOD.PREN bit (Enable/disable parity function)
- UAnMOD.PRMD bit (Select parity mode (even or odd))
- UAnMOD.STPB bit (Set stop bit length (1 or 2 bits))
- UAnMOD.CAREN bit (Enable/disable carrier modulation function)
- UAnMOD.PECAR bit (Select carrier modulation period (H data period/L data period))
4. Set the UAnBR.BRT[7:0] and UAnBR.FMD[3:0] bits. (Set transfer rate)
5. Set the UAnCAWF.CRPER[7:0] bits. (Set carrier cycle)
6. Set the following UAnCTL register bits:
- Set the UAnCTL.SFTRST bit to 1. (Execute software reset)
- Set the UAnCTL.MODEN bit to 1. (Enable UART3 Ch.n operations)
7. Set the following bits when using the interrupt:
- Write 1 to the interrupt flags in the UAnINTF register. (Clear interrupt flags)
- Set the interrupt enable bits in the UAnINTE register to 1. * (Enable interrupts)
* The initial value of the UAnINTF.TBEIF bit is 1, therefore, an interrupt will occur immediately after the UA-
nINTE.TBEIE bit is set to 1.
USOUTn st D0 D1 D2 D3 D4 D5 D6 D7 p sp st D0 D1 D7 p sp st D0 D1 D7 p sp
UAnINTF.TBEIF
UAnINTF.TBSY
UAnINTF.TENDIF
Data transmission
NO
UAnINTF.TBEIF = 1 ?
YES
Write transmit data to
the UAnTXD register
YES
Transmit data remained?
NO
Wait for an interrupt request
(UAnINTF.TBEIF = 1)
End
Figure 12.5.2.2 Data Transmission Flowchart
UAnINTF.RB1FIF
UAnINTF.RB2FIF
UAnINTF.RBSY
Read receive data (1 byte) from Read receive data (1 byte) from
the UAnRXD register the UAnRXD register
NO
YES
End Receive data remained?
NO
End
Figure 12.5.3.2 Data Reception Flowcharts
VCC
RXD
USINn AMP
VCC
VDD
GND GND
VSS
TXD
USOUTn
LEDA
The transmit data output from the UART3 Ch.n transmit shift register is output from the USOUTn pin after the low
pulse width is converted into 3/16 by the RZI modulator in SIR method.
T1
Modulator input (shift register output)
The received IrDA signal is input to the RZI demodulator and the low pulse width is converted into the normal
width before input to the receive shift register.
T2
Demodulator input (USINn)
Notes: • Set the baud rate division ratio to 1/16 when using the IrDA interface function.
• The low pulse width (T2) of the IrDA signal input must be CLK_UART3 × 3 cycles or longer.
CAREN = 0
CAREN = 1
USOUTn
PECAR = 0
(INVTX = 0)
CAREN = 1
PECAR = 1
CAREN = 0
CAREN = 1
USOUTn
PECAR = 0
(INVTX = 1)
CAREN = 1
PECAR = 1
Figure 12.5.5.1 Carrier Modulation Waveform (UAnMOD.CHLN = 1, UAnMOD.STPB = 0, UAnMOD.PREN = 1
The carrier modulation output frequency is determined by the UAnCAWF.CRPER[7:0] bit settings. Use the follow-
ing equations to calculate the setting values for obtaining the desired frequency.
CLK_UART3
Carrier modulation output frequency = ——————————— [Hz] (Eq. 12.2)
(CRPER + 1) × 2
Where
CLK_UART3: UART3 operating clock frequency [Hz]
CRPER: UAnCAWF.CRPER[7:0] setting value (0 to 255)
12.7 Interrupts
The UART3 has a function to generate the interrupts shown in Table 12.7.1.
Table 12.7.1 UART3 Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
End of transmission UAnINTF.TENDIF When the UAnINTF.TBEIF bit = 1 after Writing 1 or software reset
the stop bit has been sent
Framing error UAnINTF.FEIF Refer to the “Receive Errors.” Writing 1, reading received
data that encountered an
error, or software reset
Parity error UAnINTF.PEIF Refer to the “Receive Errors.” Writing 1, reading received
data that encountered an
error, or software reset
Overrun error UAnINTF.OEIF Refer to the “Receive Errors.” Writing 1 or software reset
Receive buffer two bytes full UAnINTF.RB2FIF When the second received data byte is Reading received data or
loaded to the receive data buffer in which software reset
the first byte is already received
Receive buffer one byte full UAnINTF.RB1FIF When the first received data byte is load- Reading data to empty
ed to the emptied receive data buffer the receive data buffer or
software reset
Transmit buffer empty UAnINTF.TBEIF When transmit data written to the trans- Writing transmit data
mit data buffer is transferred to the shift
register
The UART3 provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the
interrupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is
set. For more information on interrupt control, refer to the “Interrupt Controller” chapter.
Bit 6 PUEN
This bit enables pull-up of the USINn pin.
1 (R/W): Enable pull-up
0 (R/W): Disable pull-up
Bit 5 OUTMD
This bit sets the USOUTn pin output mode.
1 (R/W): Open-drain output
0 (R/W): Push-pull output
Bit 4 IRMD
This bit enables the IrDA interface function.
1 (R/W): Enable IrDA interface function
0 (R/W): Disable IrDA interface function
Bit 3 CHLN
This bit sets the data length.
1 (R/W): 8 bits
0 (R/W): 7 bits
Bit 2 PREN
This bit enables the parity function.
1 (R/W): Enable parity function
0 (R/W): Disable parity function
Bit 1 PRMD
This bit selects either odd parity or even parity when using the parity function.
1 (R/W): Odd parity
0 (R/W): Even parity
Bit 0 STPB
This bit sets the stop bit length.
1 (R/W): 2 bits
0 (R/W): 1 bit
Notes: • The UAnMOD register settings can be altered only when the UAnCTL.MODEN bit = 0.
• Do not set both the UAnMOD.IRMD and UAnMOD.CAREN bits simultaneously.
Pull-up/down control
PUEN circuit
VSS
(Used only in slave mode)
Interrupt #SPISSn
controller Interrupt
TENDIE TENDIF
control circuit
RBFIE RBFIF
TBEIE TBEIF
#SPISS
SDO
SDI
Px1
SPICLK
Px2
Px3 #SPISS
S1C17 SPIA (master mode)
SDIn SDO
External SPI slave devices
SDOn SDI
SPICLKn SPICLK
#SPISS
SDO
SDI
SPICLK
Figure 13.2.2.1 Connections between SPIA in Master Mode and External SPI Slave Devices
#SPISSn
SDOn
S1C17 SPIA (slave mode)
SDIn
#SPISS0
SPICLKn
#SPISS1
#SPISS #SPISS2
External SPI master device
SDO SDI
External SPI slave devices
SDI SDO
SPICLK SPICLK
#SPISS
SDO
SDI
SPICLK
Figure 13.2.2.2 Connections between SPIA in Slave Mode and External SPI Master Device
fCLK_SPIA fCLK_SPIA
fSPICLK = —
———————— RLD = ——————— - 1 (Eq. 13.1)
2 × (RLD + 1) fSPICLK × 2
Where
fSPICLK: SPICLKn frequency [Hz] (= baud rate [bps])
fCLK_SPIA: SPIA operating clock frequency [Hz]
RLD: 16-bit timer reload data value
For controlling the 16-bit timer, refer to the “16-bit Timers” chapter.
1 0 SPICLKn
0 1 SPICLKn
0 0 SPICLKn
Figure 13.3.3.1 SPI Clock Phase and Polarity (SPInMOD.LSBFST bit = 0, SPInMOD.CHLN[3:0] bits = 0x7)
SPInMOD. SPICLKn
LSBFST bit
SDOn Dw7 Dw6 Dw5 Dw4 Dw3 Dw2 Dw1 Dw0
0
SDIn Dr7 Dr6 Dr5 Dr4 Dr3 Dr2 Dr1 Dr0
Writing Dw[7:0] to the SPInTXD register Loading Dr[7:0] to the SPInRXD register
13.5 Operations
13.5.1 Initialization
SPIA Ch.n should be initialized with the procedure shown below.
1. <Master mode only> Generate a clock by controlling the 16-bit timer and supply it to SPIA Ch.n.
2. Configure the following SPInMOD register bits:
- SPInMOD.PUEN bit (Enable input pin pull-up/down)
- SPInMOD.NOCLKDIV bit (Select master mode operating clock)
- SPInMOD.LSBFST bit (Select MSB first/LSB first)
- SPInMOD.CPHA bit (Select clock phase)
- SPInMOD.CPOL bit (Select clock polarity)
- SPInMOD.MST bit (Select master/slave mode)
3. Assign the SPIA Ch.n input/output function to the ports. (Refer to the “I/O Ports” chapter.)
4. Set the following SPInCTL register bits:
- Set the SPInCTL.SFTRST bit to 1. (Execute software reset)
- Set the SPInCTL.MODEN bit to 1. (Enable SPIA Ch.n operations)
5. Set the following bits when using the interrupt:
- Write 1 to the interrupt flags in the SPInINTF register. (Clear interrupt flags)
- Set the interrupt enable bits in the SPInINTE register to 1. * (Enable interrupts)
* The initial value of the SPInINTF.TBEIF bit is 1, therefore, an interrupt will occur immediately after the
SPInINTE.TBEIE bit is set to 1.
SDOn
SPInINTF.TBEIF
SPInINTF.TENDIF
Figure 13.5.2.1 Example of Data Sending Operations in Master Mode (SPInMOD.CHLN[3:0] bits = 0x7)
Data transmission
NO
SPInINTF.TBEIF = 1 ?
YES
Write transmit data to
the SPInTXD register
YES
Transmit data remained?
SDOn
SDIn
SPInINTF.TBEIF
SPInINTF.RBFIF
SPInINTF.TENDIF
Figure 13.5.3.1 Example of Data Receiving Operations in Master Mode (SPInMOD.CHLN[3:0] bits = 0x7)
NO NO
SPInINTF.TBEIF = 1 ? SPInINTF.TBEIF = 1 ?
YES YES
Write dummy data (or transmit data) to Write dummy data (or transmit data) to
the SPInTXD register the SPInTXD register
Read receive data from Write dummy data (or transmit data) to
the SPInRXD register the SPInTXD register
YES
End Receive data remained?
NO
Notes: • If data of the number of bits specified by the SPInMOD.CHLN[3:0] bits is received when the
SPInINTF.RBFIF bit is set to 1, the SPInRXD register is overwritten with the newly received
data and the previously received data is lost. In this case, the SPInINTF.OEIF bit is set.
• When the clock for the first bit is input from the SPICLKn pin, SPIA starts sending the data
currently stored in the shift register even if the SPInINTF.TBEIF bit is set to 1.
#SPISSn
1 2 3 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
SPICLKn
SDOn
SDIn
SPInINTF.TBEIF
SPInINTF.RBFIF
Figure 13.5.5.1 Example of Data Transfer Operations in Slave Mode (SPInMOD.CHLN[3:0] bits = 0x7)
YES
YES
Write transmit data to Receive data remained?
the SPInTXD register
NO
End
YES
Transmit data remained?
NO
Wait for an interrupt request
(SPInINTF.TBEIF = 1)
End
Figure 13.5.5.2 Data Transfer Flowcharts in Slave Mode
13.6 Interrupts
SPIA has a function to generate the interrupts shown in Table 13.6.1.
Table 13.6.1 SPIA Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
End of transmission SPInINTF.TENDIF When the SPInINTF.TBEIF bit = 1 after data of Writing 1
the specified bit length (defined by the SPInMOD.
CHLN[3:0] bits) has been sent
Receive buffer full SPInINTF.RBFIF When data of the specified bit length is received and Reading the SPIn-
the received data is transferred from the shift register RXD register
to the received data buffer
Transmit buffer empty SPInINTF.TBEIF When transmit data written to the transmit data buf- Writing to the
fer is transferred to the shift register SPInTXD register
Overrun error SPInINTF.OEIF When the receive data buffer is full (when the re- Writing 1
ceived data has not been read) at the point that re-
ceiving data to the shift register has completed
SPIA provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the interrupt
controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set. For
more information on interrupt control, refer to the “Interrupt Controller” chapter.
The SPInINTF register also contains the BSY bit that indicates the SPIA operating status.
Figure 13.6.1 shows the SPInINTF.BSY and SPInINTF.TENDIF bit set timings.
Master mode
SPInMOD register
CPOL bit CPHA bit 1 2 3 7 8
1 1
SPICLKn
0 0
SDOn
SPInINTF.BSY
SPInINTF.TENDIF
Slave mode
#SPISSn
SPInINTF.BSY
SPInMOD register 1 2 3 7 8
CPOL bit CPHA bit SPICLKn
1 1
SDOn
SPICLKn
0 0
SDOn
SPInINTF.TENDIF
Bit 1 SFTRST
This bit issues software reset to SPIA.
1 (W): Issue software reset
0 (W): Ineffective
1 (R): Software reset is executing.
0 (R): Software reset has finished. (During normal operation)
Setting this bit resets the SPIA shift register and transfer bit counter. This bit is automatically cleared
after the reset processing has finished.
Bit 0 MODEN
This bit enables the SPIA operations.
1 (R/W): Enable SPIA operations (In master mode, the operating clock is supplied.)
0 (R/W): Disable SPIA operations (In master mode, the operating clock is stopped.)
Note: If the SPInCTL.MODEN bit is altered from 1 to 0 while sending/receiving data, the data being
sent/received cannot be guaranteed. When setting the SPInCTL.MODEN bit to 1 again after that,
be sure to write 1 to the SPInCTL.SFTRST bit as well.
14 I2C (I2C)
14.1 Overview
The I2C is a subset of the I2C bus interface. The features of the I2C are listed below.
• Functions as an I2C bus master (single master) or a slave device.
• Supports standard mode (up to 100 kbit/s) and fast mode (up to 400 kbit/s).
• Supports 7-bit and 10-bit address modes.
• Supports clock stretching.
• Includes a baud rate generator for generating the clock in master mode.
• No clock source is required to run the I2C in slave mode, as it can run with the I2C bus signals only.
• Slave mode is capable of being operated in SLEEP mode allowing wake-up by an interrupt when an address
match is detected.
• Master mode supports automatic bus clear sending function.
• Can generate receive buffer full, transmit buffer empty, and other interrupts.
• The input filter for the SDA and SCL inputs does not comply with the standard for removing noise spikes less
than 50 ns.
Figure 14.1.1 shows the I2C configuration.
Table 14.1.1 I2C Channel Configuration of S1C17M30/M31/M32/M33/M34
Item S1C17M30 S1C17M31 S1C17M32 S1C17M33 S1C17M34
Number of channels 1 channel (Ch.0)
I2C Ch.n
Receive data buffer
Shift register SDAn
RXD[7:0]
Interrupt controller
Transmit data buffer
Shift register
TXD[7:0]
Interrupt VSS
BYTEENDIE control circuit BYTEENDIF
GCIE GCIF
NACKIE NACKIF
STOPIE STOPIF
STARTIE STARTIF
ERRIE ERRIF
RBFIE RBFIF
TBEIE TBEIF
Internal data bus
Transmit/receive
SFTRST control circuit
OADR10
OADR[9:0] Slave mode
GCEN controller
SDALOW
SCLLOW
MST
BSY
TXNACK
TR
TXSTART Master mode
TXSTOP controller
SCLn
CLKSRC[1:0]
CLKDIV[1:0]
Clock generator DBRUN Baud rate
SCLO
MODEN BRT[6:0] generator
VSS
CLK_I2Cn
S1C17
VDD
SDAn SCLn
I2C bus
Serial data (SDA)
Serial clock (SCL)
External External
I2C device I2C device
Notes: • The SDA and SCL lines must be pulled up to a VDD of this IC or lower voltage. However, if the
I2C input/output ports are configured with the over voltage tolerant fail-safe type I/O, these
lines can be pulled up to a voltage exceeding the VDD of this IC but within the recommended
operating voltage range of this IC.
• The internal pull-up resistors for the I/O ports cannot be used for pulling up SDA and SCL.
• When the I2C is set into master mode, no other master device can be connected to the I2C
bus.
Note: The I2C bus transfer rate is limited to 100 kbit/s in standard mode or 400 kbit/s in fast mode. Do
not set a transfer rate exceeding the limit.
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 14-3
TECHNICAL MANUAL (Rev. 1.3)
14 I2C (I2C)
Baud rate generator clock output and operations for supporting clock stretching
Figure 14.3.3.1 shows the clock generated by the baud rate generator and the clock waveform on the I2C bus.
Period in which the internal and external statuses are not matched
Figure 14.3.3.1 Baud Rate Generator Output Clock and SCLn Output Waveform
The baud rate generator output clock SCLO is compared with the SCLn pin status and the results are returned
to the baud rate generator. If a mismatch has occurred between SCLO and SCLn pin levels, the baud rate gen-
erator suspends counting. This extends the clock to control data transfer during the SCL signal rising/falling
period and clock stretching period in which SCL is fixed at low by a slave device.
14.4 Operations
14.4.1 Initialization
The I2C Ch.n should be initialized with the procedure shown below.
TXSTART = 1 Saddr/W → TXD[7:0] Data 1 → TXD[7:0] Data 2 → TXD[7:0] Data N → TXD[7:0] TXSTOP = 1
TXSTOP = 1 TXSTART = 1
A P A Sr
NACKIF = 1 TXSTART = 0 A P S
STARTIF = 1
TBEIF = 1 TBEIF = 1 TXSTART = 0
STARTIF = 1
TXSTOP = 0
TXSTART = 1 TBEIF = 1
STOPIF = 1
TXSTOP = 1
NACKIF = 1 TXSTART = 0 Operations by I2C (master mode) Operations by the external slave
STARTIF = 1
TXSTOP = 0 S: START condition, Sr: Repeated START condition, P: STOP condition,
TBEIF = 1
STOPIF = 1 A: ACK, A: NACK, Saddr/W: Slave address + W(0), Data n: 8-bit data
Data transmission
NO
I2CnINTF.NACKIF = 1 ?
YES NO
Last data sent?
YES
Retry? YES
No
End
Figure 14.4.2.2 Master Mode Data Transmission Flowchart
Receiving data
After the slave address has been sent, the slave device sends an ACK and the first data. The I2C Ch.n sets
the I2CnINTF.RBFIF bit to 1 after the data reception has completed. Furthermore, the I2C Ch.n returns an
ACK. To return a NACK, such as for a response after the last data has been received, write 1 to the I2C-
nCTL.TXNACK bit before the I2CnINTF.RBFIF bit is set to 1.
The received data can be read out from the I2CnRXD register after a receive buffer full interrupt has oc-
curred. The I2C Ch.n pulls down SCL to low and enters standby state until data is read out from the I2C-
nRXD register.
This reading triggers the I2C Ch.n to start subsequent data reception.
A Sr TXSTART = 1
TXSTOP = 1
NACKIF = 1 TXSTART = 0 RXD[7:0] → Data N
STARTIF = 1
TBEIF = 1 A P S
NACKIF = 1 TXSTART = 0
STARTIF = 1 Software bit operations Hardware bit operations
TXSTOP = 0
TBEIF = 1
STOPIF = 1
Operations by I2C (master mode) Operations by the external slave
S: START condition, Sr: Repeated START condition, P: STOP condition,
A: ACK, A: NACK, Saddr/R: Slave address + R(1), Data n: 8-bit data
NO
One-byte reception?
YES
NO
I2CnINTF.RBFIF = 1?
YES YES
Retry?
YES
Receive last data next? No
NO
Last data received?
YES
Read receive data from the I2CnRXD register Read receive data from the I2CnRXD register
End
The following shows a procedure to start data transfer in 10-bit address mode when the I2C Ch.n is placed into
master mode (see the 7-bit mode descriptions above for control procedures when a NACK is received or sending/
receiving data). Figure 14.4.4.2 shows an operation example.
TXSTART = 1 1stAddr/W → TXD[7:0] 2ndAddr → TXD[7:0] TXSTART = 1 1stAddr/R → TXD[7:0] RXD[7:0] → Data 1
Figure 14.4.4.2 Example of Data Transfer Starting Operations in 10-bit Address Mode (Master Mode)
BSY = 1
STARTIF = 1
TBEIF = 1
Software bit operations Hardware bit operations
Sr Saddr/W Data reception starts
Operations by the external master Operations by I2C (slave mode)
TR = 0
S: START condition, Sr: Repeated START condition, P: STOP condition, BSY = 1
A: ACK, A: NACK, Saddr/R: Slave address + R(1), Saddr/W: Slave address + W(0), STARTIF = 1
Data n: 8-bit data
Data transmission
NO
I2CnINTF.NACKIF = 1 ?
YES
Write data to the I2CnTXD register
End
Figure 14.4.5.2 Slave Mode Data Transmission Flowchart
Sr
TXNACK = 1
RXD[7:0] → Data (N -1) RXD[7:0] → Data N
A Data N A P
Data reception
NO
One-byte reception?
YES
NO
Last data received next?
YES
NO
Last data received?
YES
End
BSY = 1 TR = 0 RBFIF = 1
STARTIF = 1 BYTEENDIF = 1
Figure 14.4.7.1 Example of Data Transfer Starting Operations in 10-bit Address Mode (Slave Mode)
SCL
SDA check
START
When SDA = LOW is detected condition
SDA
SCL 1 2 n
SDA check (n ≤ 9)
STARTIF = 1
Bus clearing operation
SDA
SCL 1 2 10
STARTIF = 1
ERRIF = 1
14.5 Interrupts
The I2C has a function to generate the interrupts shown in Table 14.5.1.
Table 14.5.1 I2C Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
End of data I2CnINTF.BYTEENDIF When eight-bit data transfer and the following ACK/ Writing 1,
transfer NACK transfer are completed software reset
General call I2CnINTF.GCIF Slave mode only: When the general call address is Writing 1,
address reception received software reset
NACK reception I2CnINTF.NACKIF When a NACK is received Writing 1,
software reset
STOP condition I2CnINTF. STOPIF Master mode: When a STOP condition is gener- Writing 1,
ated and the bus free time (tBUF) between STOP and software reset
START conditions has elapsed
Slave mode: When a STOP condition is detected
while the I2C Ch.n is selected as the slave currently
accessed
START condition I2CnINTF. STARTIF Master mode: When a START condition is issued Writing 1,
software reset
Slave mode: When an address match is detected
(including general call)
Error detection I2CnINTF. ERRIF Refer to “Error Detection.” Writing 1,
software reset
Receive buffer full I2CnINTF. RBFIF When received data is loaded to the receive data Reading received
buffer data (to empty the
receive data buffer),
software reset
Transmit buffer I2CnINTF. TBEIF Master mode: When a START condition is issued or Writing transmit data
empty when an ACK is received from the slave
Slave mode: When transmit data written to the
transmit data buffer is transferred to the shift regis-
ter or when an address match is detected with R/W
bit set to 1
The I2C provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the inter-
rupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set.
For more information on interrupt control, refer to the “Interrupt Controller” chapter.
(1) START condition interrupt
Master mode
BRT + 3
fCLK_I2Cn
SDA
SCL
TXSTART = 1 TXSTART = 0
STARTIF = 1
Slave mode
Address matching the I2CnOADR register
SCL 1 2 7 8 9
SCL
TXSTOP = 1 TXSTOP = 0
RXD[7:0] read (during reception) STOPIF = 1
Slave mode
SDA
SCL
BSY = 0
STOPIF = 1
(fCLK_I2Cn: I2C operating clock frequency [Hz], BRT: I2CnBR.BRT[6:0] bits setting value (1 to 127))
Figure 14.5.1 START/STOP Condition Interrupt Timings
Note: If the I2CnCTL.MODEN bit is altered from 1 to 0 while sending/receiving data, the data being
sent/received cannot be guaranteed. When setting the I2CnCTL.MODEN bit to 1 again after
that, be sure to write 1 to the I2CnCTL.SFTRST bit as well.
Bit 10 BSY
This bit indicates that the I2C bus is placed into busy status.
1 (R): I2C bus busy
0 (R): I2C bus free
Bit 9 TR
This bit indicates whether the I2C is set in transmission mode or not.
1 (R): Transmission mode
0 (R): Reception mode
Bit 8 Reserved
Bit 7 BYTEENDIF
Bit 6 GCIF
Bit 5 NACKIF
Bit 4 STOPIF
Bit 3 STARTIF
Bit 2 ERRIF
Bit 1 RBFIF
Bit 0 TBEIF
These bits indicate the I2C interrupt cause occurrence status.
1 (R): Cause of interrupt occurred
0 (R): No cause of interrupt occurred
1 (W): Clear flag
0 (W): Ineffective
The following shows the correspondence between the bit and interrupt:
I2CnINTF.BYTEENDIF bit: End of transfer interrupt
I2CnINTF.GCIF bit: General call address reception interrupt
I2CnINTF.NACKIF bit: NACK reception interrupt
I2CnINTF.STOPIF bit: STOP condition interrupt
I2CnINTF.STARTIF bit: START condition interrupt
I2CnINTF.ERRIF bit: Error detection interrupt
I2CnINTF.RBFIF bit: Receive buffer full interrupt
I2CnINTF.TBEIF bit: Transmit buffer empty interrupt
Bit 7 BYTEENDIE
Bit 6 GCIE
Bit 5 NACKIE
Bit 4 STOPIE
Bit 3 STARTIE
Bit 2 ERRIE
Bit 1 RBFIE
Bit 0 TBEIE
These bits enable I2C interrupts.
1 (R/W): Enable interrupts
0 (R/W): Disable interrupts
The following shows the correspondence between the bit and interrupt:
I2CnINTE.BYTEENDIE bit: End of transfer interrupt
I2CnINTE.GCIE bit: General call address reception interrupt
I2CnINTE.NACKIE bit: NACK reception interrupt
I2CnINTE.STOPIE bit: STOP condition interrupt
I2CnINTE.STARTIE bit: START condition interrupt
I2CnINTE.ERRIE bit: Error detection interrupt
I2CnINTE.RBFIE bit: Receive buffer full interrupt
I2CnINTE.TBEIE bit: Transmit buffer empty interrupt
Note: In this chapter, ‘n’ refers to a channel number, and ‘m’ refers to an input/output pin number or a
comparator/capture circuit number in a channel.
SCS TOUTMT
Compare/Capture 0
CAPIS[1:0] TOUTO
data register CC[15:0]
CAPTRG[1:0] TOUTMD[2:0]
TOUTINV
CNTMD[1:0] Compare Capture CAP00
ONEST buffer 0 circuit 0
UP_DOWN RUN CAPI0 TOUT control
TOUT00
BSY PRESET Comparator circuit 0
MATCH signal
circuit 0
CLK_T16B0 Counter ZERO/MAX signal
EXCL00
TC[15:0]
EXCL01
Comparator TOUT control
MATCH signal TOUT01
circuit 1 circuit 1
MAX counter data
CAPI1
register MC[15:0]
Compare Capture CAP01
buffer 1 circuit 1
MAXBSY
TOUTMT
SCS TOUTO TOUT02/03
MODEN Compare/Capture 1
CAPIS[1:0] TOUTMD[2:0] CAP02/03
DBRUN data register CC[15:0]
CAPTRG[1:0] TOUTINV
CLKDIV[3:0] TOUT04/05
CLKSRC[2:0] CBUFMD[2:0] CCMD CAP04/05
Clock To interrupt
generator controller
CAPOWmIE CAPOWmIF
CMPCAPmIE CMPCAPmIF
: Interrupt :
CAPOW0IE control circuit CAPOW0IF
CMPCAP0IE CMPCAP0IF
CNTMAXIE CNTMAXIF
CNTZEROIE CNTZEROIF
...
...
Counter block Ch.n Comparator/capture block Ch.n CAPn0/1
EXCLn0 CLK_T16Bn TOUTn0/1
EXCLn1
CAPn2/3
TOUTn2/3
CAPn4/5
TOUTn4/5
To interrupt
controller
Note: When running the counter using the event counter clock, two dummy clocks must be input be-
fore the first counting up/down can be performed.
15.4 Operations
15.4.1 Initialization
T16B Ch.n should be initialized and started counting with the procedure shown below. Perform initial settings for
comparator mode when using T16B as an interval timer, PWM waveform generator, or external event counter. Per-
form initial settings for capture mode when using T16B to measure external event periods/cycles.
Count mode
The T16BnCTL.CNTMD[1:0] bits allow selection of up, down, and up/down mode. The T16BnCTL.ONEST
bit allows selection of repeat and one-shot mode. The counter operates in six counter modes specified with a
combination of these modes.
Repeat mode enables the counter to continue counting until stopped via software. Select this mode to generate
periodic interrupts at desired intervals or to generate timer output waveforms.
One-shot mode enables the counter to stop automatically. Select this mode to stop the counter after an interrupt
has occurred once, such as for measuring pulse width or external event intervals and checking a specific lapse
of time.
Up, down, and up/down mode configures the counter as an up counter, down counter and up/down counter, re-
spectively.
Counter reset
Setting the T16BnCTL.PRESET bit to 1 resets the counter. This clears the counter to 0x0000 in up or up/down
mode, or presets the MAX value to the counter in down mode.
The counter is also cleared to 0x0000 when the counter value exceeds the MAX value during count up operation.
Counting start
To start counting, set the T16BnCTL.RUN bit to 1. The counting stop control depends on the count mode set.
In one-shot up count mode, the counter returns to 0x0000 if it exceeds the MAX value and stops automatically
at that point.
(1) Repeat up count mode
Data (W) → MC[15:0]
MODEN = 1 PRESET = 1 RUN = 1 Data (W) → MC[15:0] Software operation
RUN = 1 RUN = 0 Data (W) → MC[15:0] Hardware operation
0xffff
Count cycle
0x0000 Time
MAX value
Counter
0x0000 Time
RUN = 0 RUN = 0
Figure 15.4.2.1 Operations in Repeat Up Count and One-shot Up Count Modes
MAX value
Counter
0x0000 Time
MAX value
Counter
0x0000 Time
RUN = 0 RUN = 0
Figure 15.4.2.2 Operations in Repeat Down Count and One-shot Down Count Modes
MAX value
Counter
0x0000 Time
MAX value
Counter
0x0000 Time
RUN = 0
Figure 15.4.2.3 Operations in Repeat Up/Down Count and One-shot Up/Down Count Modes
0x0000 Time
CNTMAXIF = 1 CNTMAXIF = 1 CNTMAXIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
Counter
Comparison value
(T16BnCCRm register)
Compare
period
0x0000 Time
CNTZEROIF = 1 CNTZEROIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTZEROIF = 1 CNTMAXIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
(Note that the T16BnINTF.CMPCAPmIF/CNTMAXIF/CNTZEROIF bit clearing operations via software are omitted from the figure.)
Figure 15.4.3.1 Operation Examples in Comparator Mode
The time from counter = 0x0000 or MAX value to occurrence of a compare interrupt (compare period) and the
time to occurrence of a counter MAX or counter zero interrupt (count cycle) can be calculated as follows:
During counting up
(CC + 1) (MAX + 1)
Compare period = ——————— [s] Count cycle = ———————— [s] (Eq. 15.1)
fCLK_T16B fCLK_T16B
Compare buffer
The comparator loads the comparison value, which has been written to the T16BnCCRm register, to the
compare buffer before comparing it with the counter value. For example, when generating a PWM wave-
form, the waveform with the desired duty ratio may not be generated if the comparison value is altered
asynchronous to the count operation. To avoid this problem, the timing to load the comparison value to the
compare buffer can be configured using the T16BnCCCTLm.CBUFMD[2:0] bits for synchronization with
the count operation.
(1) Repeat up count mode
(1.1) T16BnCCCTLm.CBUFMD[2:0] bits = 0x0
Data (W) → CC[15:0]
Data (W) → MC[15:0]
MODEN = 1 PRESET = 1 Software operation
RUN = 1 Data (W) → CC[15:0] Data (W) → CC[15:0] Hardware operation
0xffff
Count cycle
MAX value
(T16BnMC register)
Compare period
Compare buffer
Counter value
0x0000 Time
CNTMAXIF = 1 CNTMAXIF = 1 CNTMAXIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTMAXIF = 1 CNTMAXIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTMAXIF = 1 CNTMAXIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTMAXIF = 1 CNTMAXIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTMAXIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
Counter
Compare buffer
value
Compare
period
0x0000 Time
CNTZEROIF = 1 CNTZEROIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
Counter
Compare buffer
value
Compare
period
0x0000 Time
CNTZEROIF = 1 CNTZEROIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
Counter
Compare buffer
value
Compare
period
0x0000 Time
CNTZEROIF = 1 CNTZEROIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
CMPCAPmIF = 1
Counter
Compare buffer
value
Compare
period
0x0000 Time
CNTZEROIF = 1 CNTZEROIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
Counter
Compare buffer
value
Compare
period
0x0000 Time
CNTZEROIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTZEROIF = 1 CNTMAXIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTZEROIF = 1 CNTMAXIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTZEROIF = 1 CNTMAXIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTZEROIF = 1 CNTMAXIF = 1 CNTZEROIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
0x0000 Time
CNTMAXIF = 1 CNTZEROIF = 1 CNTMAXIF = 1
CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1 CMPCAPmIF = 1
(Note that the T16BnINTF.CMPCAPmIF/CNTMAXIF/CNTZEROIF bit clearing operations via software are omitted from the figure.)
Figure 15.4.3.2 Compare Buffer Operations
PRESET = 1
T16BnCCCTLm.CAPTRG[1:0] bits = 0x3 (Trigger: falling and rising edges)
RUN = 1 CC[15:0] → Data (R) CC[15:0] → Data (R) Software operation
MODEN = 1 CMPCAPmIF = 1 Hardware operation
Trigger signal
0xffff
Captured value
(T16BnCCRm register)
Counter
0x0000 Time
CMPCAPmIF = 0
CMPCAPmIF = 1 CMPCAPmIF = 1 CAPOWmIF = 1
Counter value → CC[15:0] Counter value → CC[15:0] Counter value → CC[15:0]
An overwrite error occurs as the T16BnINTF.CMPCAPmIF bit has not been cleared.
Figure 15.4.3.3 Operations in Capture Mode (Example in One-shot Up Count Mode)
T16BnTC.TC[15:0] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
T16BnCCRm.CC[15:0] 1 5
Capturing operation
T16BnTC.TC[15:0] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
T16BnCCRm.CC[15:0] 1 5 10 11
Capturing operation
Figure 15.4.3.4 Synchronous Capture Mode/Asynchronous Capture Mode
T16BnCCCTL1 register
Figure 15.4.4.1 TOUT Output Circuits (Circuits 0 and 1)
Each timer channel includes two (four, or six) TOUT output circuits and their signal generation and output can be
controlled individually.
Furthermore, when the T16BnCCCTLm.TOUTMT bit is set to 1, the TOUT circuit uses the MATCH signal out-
put from another system in the circuit pair (0 and 1, 2 and 3, 4 and 5). This makes it possible to change the signal
twice within a counter cycle.
(1) Repeat up count mode (MAX value = 5, Compare buffer value = 2, T16BnCCCTLm.TOUTINV bit = 0)
RUN
PRESET
Count clock
T16BnTC.TC[15:0] 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3
MATCH signal
MAX signal
T16BnCCCTLm.TOUTO
Toggle mode(0x4)
(2) Repeat down count mode (MAX value = 5, Compare buffer value = 2, T16BnCCCTLm.TOUTINV bit = 0)
RUN
PRESET
Count clock
T16BnTC.TC[15:0] 5 4 3 2 1 0 5 4 3 2 1 0 5 4 3 2
MATCH signal
ZERO signal
T16BnCCCTLm.TOUTO
Toggle mode(0x4)
(3) Repeat up/down count mode (MAX value = 5, Compare buffer value = 2, T16BnCCCTLm.TOUTINV bit = 0)
RUN
PRESET
Count clock
T16BnTC.TC[15:0] 0 1 2 3 4 5 4 3 2 1 0 1 2 3 4 5
MATCH signal
MAX signal
T16BnCCCTLm.TOUTO
Toggle mode(0x4)
(1) Repeat up count mode (MAX value = 5, Compare buffer (0) value = 2, Compare buffer (1) value = 3, T16BnCCCTLm.TOUTINV bit = 0)
RUN
PRESET
Count clock
T16BnTC.TC[15:0] 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3
MATCH(0) signal
MATCH(1) signal
T16BnCCCTLm.TOUTO
TOUT output (*)
Software control mode (0x0)
TOUTn0
TOUTn1
Set mode (0x1)
TOUTn0
TOUTn1
Toggle/reset mode (0x2)
TOUTn0
TOUTn1
Set/reset mode (0x3)
TOUTn0
TOUTn1
Toggle mode(0x4)
TOUTn0
TOUTn1
Reset mode (0x5)
TOUTn0
TOUTn1
Toggle/set mode (0x6)
TOUTn0
TOUTn1
Reset/set mode (0x7)
TOUTn0
TOUTn1
(2) Repeat down count mode (MAX value = 5, Compare buffer (0) value = 2, Compare buffer (1) value = 3, T16BnCCCTLm.TOUTINV bit = 0)
RUN
PRESET
Count clock
T16BnTC.TC[15:0] 5 4 3 2 1 0 5 4 3 2 1 0 5 4 3 2
MATCH(0) signal
MATCH(1) signal
T16BnCCCTLm.TOUTO
TOUT output (*)
Software control mode (0x0)
TOUTn0
TOUTn1
Set mode (0x1)
TOUTn0
TOUTn1
Toggle/reset mode (0x2)
TOUTn0
TOUTn1
Set/reset mode (0x3)
TOUTn0
TOUTn1
Toggle mode(0x4)
TOUTn0
TOUTn1
Reset mode (0x5)
TOUTn0
TOUTn1
Toggle/set mode (0x6)
TOUTn0
TOUTn1
Reset/set mode (0x7)
TOUTn0
TOUTn1
(3) Repeat up/down count mode (MAX value = 5, Compare buffer (0) value = 2, Compare buffer (1) value = 3, T16BnCCCTLm.TOUTINV bit = 0)
RUN
PRESET
Count clock
T16BnTC.TC[15:0] 0 1 2 3 4 5 4 3 2 1 0 1 2 3 4 5
MATCH(0) signal
MATCH(1) signal
T16BnCCCTLm.TOUTO
TOUT output (*)
Software control mode (0x0)
TOUTn0
TOUTn1
Set mode (0x1)
TOUTn0
TOUTn1
Toggle/reset mode (0x2)
TOUTn0
TOUTn1
Set/reset mode (0x3)
TOUTn0
TOUTn1
Toggle mode(0x4)
TOUTn0
TOUTn1
Reset mode (0x5)
TOUTn0
TOUTn1
Toggle/set mode (0x6)
TOUTn0
TOUTn1
Reset/set mode (0x7)
TOUTn0
TOUTn1
15.5 Interrupt
Each T16B channel has a function to generate the interrupt shown in Table 15.5.1.
Table 15.5.1 T16B Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
Capture T16BnINTF.CAPOWmIF
When the T16BnINTF.CMPCAPmIF bit =1 and the T16Bn Writing 1
overwrite CCRm register is overwritten with new captured data in
capture mode
Compare/ T16BnINTF.CMPCAPmIF When the counter value becomes equal to the compare buf- Writing 1
capture fer value in comparator mode
When the counter value is loaded to the T16BnCCRm regis-
ter by a capture trigger input in capture mode
Counter MAX T16BnINTF.CNTMAXIF When the counter reaches the MAX value Writing 1
Counter zero T16BnINTF.CNTZEROIF When the counter reaches 0x0000 Writing 1
T16B provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the interrupt
controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set. For
more information on interrupt control, refer to the “Interrupt Controller” chapter.
Bit 2 RUN
This bit starts/stops counting.
1 (W): Start counting
0 (W): Stop counting
1 (R): Counting
0 (R): Idle
By writing 1 to this bit, the counter block starts count operations. However, the T16BnCTL.MODEN
bit must be set to 1 in conjunction with this bit or it must be set in advance. While the timer is run-
ning, writing 0 to the T16BnCTL.RUN bit stops count operations. When the counter stops by the
counter MAX/ZERO signal in one-shot mode, this bit is automatically cleared to 0.
Bit 1 PRESET
This bit resets the counter.
1 (W): Reset
0 (W): Ineffective
1 (R): Resetting in progress
0 (R): Resetting finished or normal operation
In up mode or up/down mode, the counter is cleared to 0x0000 by writing 1 to this bit. In down mode,
the MAX value, which has been set to the T16BnMC register, is preset to the counter. However, the
T16BnCTL.MODEN bit must be set to 1 in conjunction with this bit or it must be set in advance.
Bit 0 MODEN
This bit enables the T16B Ch.n operations.
1 (R/W): Enable (Start supplying operating clock)
0 (R/W): Disable (Stop supplying operating clock)
Note: The counter reset operation using the T16BnCTL.PRESET bit and the counting start operation
using the T16BnCTL.RUN bit take effect only when the T16BnCTL.MODEN bit = 1.
Bit 15 SCS
This bit selects either synchronous capture mode or asynchronous capture mode.
1 (R/W): Synchronous capture mode
0 (R/W): Asynchronous capture mode
For more information, refer to “Comparator/Capture Block Operations - Synchronous capture mode/
asynchronous capture mode.” The T16BnCCCTLm.SCS bit is control bit for capture mode and is in-
effective in comparator mode.
Bits 14–12 CBUFMD[2:0]
These bits select the timing to load the comparison value written in the T16BnCCRm register to the
compare buffer. The T16BnCCCTLm.CBUFMD[2:0] bits are control bits for comparator mode and
are ineffective in capture mode.
Table 15.6.3 Timings to Load Comparison Value to Compare Buffer
T16BnCCCTLm.
Count mode Comparison Value load timing
CBUFMD[2:0] bits
0x7–0x5 Reserved
0x4 Up mode When the counter becomes equal to the comparison value set previously
Also the counter is reset to 0x0000 simultaneously.
Down mode When the counter becomes equal to the comparison value set previously
Also the counter is reset to the MAX value simultaneously.
Up/down mode When the counter becomes equal to the comparison value set previously
Also the counter is reset to 0x0000 simultaneously.
0x3 Up mode When the counter reverts to 0x0000
Down mode When the counter reverts to the MAX value
Up/down mode When the counter becomes equal to the comparison value set previously or
when the counter reverts to 0x0000
0x2 Up mode When the counter becomes equal to the comparison value set previously
Down mode
Up/down mode
0x1 Up mode When the counter reaches the MAX value
Down mode When the counter reaches 0x0000
Up/down mode When the counter reaches 0x0000 or the MAX value
0x0 Up mode At the CLK_T16Bn rising edge after writing to the T16BnCCRm register
Down mode
Up/down mode
Bit 7 Reserved
Bit 6 TOUTMT
This bit selects whether the comparator MATCH signal of another system is used for generating the
TOUTnm signal or not.
1 (R/W): Generate TOUT using two comparator MATCH signals of the comparator circuit pair (0
and 1, 2 and 3, 4 and 5)
0 (R/W): Generate TOUT using one comparator MATCH signal of comparator m and the counter
MAX or ZERO signals
The T16BnCCCTLm.TOUTMT bit is control bit for comparator mode and is ineffective in capture
mode.
Bit 5 TOUTO
This bit sets the TOUTnm signal output level when software control mode (T16BnCCCTLm.TOUT-
MD[2:0] = 0x0) is selected for the TOUTnm output.
1 (R/W): High level output
0 (R/W): Low level output
The T16BnCCCTLm.TOUTO bit is control bit for comparator mode and is ineffective in capture
mode.
Bits 4–2 TOUTMD[2:0]
These bits configure how the TOUTnm signal waveform is changed by the comparator MATCH and
counter MAX/ZERO signals.
The T16BnCCCTLm.TOUTMD[2:0] bits are control bits for comparator mode and are ineffective in
capture mode.
Table 15.6.5 TOUT Generation Mode
T16BnCCCTLm. TOUT generation mode and operations
TOUTMD[2:0] T16BnCCCTLm. Output
Count mode Change in the signal
bits TOUTMT bit signal
0x7 Reset/set mode
0 Up count mode TOUTnm The signal becomes inactive by the MATCH signal and it
Up/down count mode becomes active by the MAX signal.
Down count mode TOUTnm The signal becomes inactive by the MATCH signal and it
becomes active by the ZERO signal.
1 All count modes TOUTnm The signal becomes inactive by the MATCHm signal and it
becomes active by the MATCHm+1 signal.
TOUTnm+1 The signal becomes inactive by the MATCHm+1 signal and
it becomes active by the MATCHm signal.
0x6 Toggle/set mode
0 Up count mode TOUTnm The signal is inverted by the MATCH signal and it becomes
Up/down count mode active by the MAX signal.
Down count mode TOUTnm The signal is inverted by the MATCH signal and it becomes
active by the ZERO signal.
1 All count modes TOUTnm The signal is inverted by the MATCHm signal and it be-
comes active by the MATCHm+1 signal.
TOUTnm+1 The signal is inverted by the MATCHm+1 signal and it be-
comes active by the MATCHm signal.
0x5 Reset mode
0 All count modes TOUTnm The signal becomes inactive by the MATCH signal.
1 All count modes TOUTnm The signal becomes inactive by the MATCHm or MATCHm+1
signal.
TOUTnm+1 The signal becomes inactive by the MATCHm+1 or
MATCHm signal.
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 15-29
TECHNICAL MANUAL (Rev. 1.3)
15 16-BIT PWM TIMERS (T16B)
Bit 1 TOUTINV
This bit selects the TOUTnm signal polarity.
1 (R/W): Inverted (active low)
0 (R/W): Normal (active high)
The T16BnCCCTLm.TOUTINV bit is control bit for comparator mode and is ineffective in capture
mode.
Bit 0 CCMD
This bit selects the operating mode of the comparator/capture circuit m.
1 (R/W): Capture mode (T16BnCCRm register = capture register)
0 (R/W): Comparator mode (T16BnCCRm register = compare data register)
SNDA
CLK_SNDA Sound buffer
(SNDDAT register)
CLKSRC[1:0]
Clock generator CLKDIV[2:0]
DBRUN
MODEN Sound register SBSY
BZOUT
SINV
Output control circuit
SSTP
#BZOUT
Interrupt
controller Interrupt control
circuit
EMIE EMIF
EDIE EDIF
If the port is shared with the SNDA pin and other functions, the SNDA output function must be assigned to the port
before activating the SNDA. For more information, refer to the “I/O Ports” chapter.
BZOUT
Piezoelectric
buzzer
#BZOUT
S1C17 SNDA
Figure 16.2.2.1 Connection between SNDA and Piezoelectric Buzzer (Direct Drive)
VDD
Piezoelectric
buzzer
BZOUT
S1C17 SNDA
Figure 16.2.2.2 Connection between SNDA and Piezoelectric Buzzer (Single Pin Drive)
16.4 Operations
16.4.1 Initialization
SNDA should be initialized with the procedure shown below.
1. Assign the SNDA output function to the ports. (Refer to the “I/O Ports” chapter.)
2. Configure the SNDA operating clock.
3. Set the SNDCTL.MODEN bit to 1. (Enable SNDA operations)
4. Set the SNDSEL.SINV bit. (Set output pin drive mode)
5. Set the following bits when using the interrupt:
- Write 1 to the interrupt flags in the SNDINTF register. (Clear interrupt flags)
- Set the interrupt enable bits in the SNDINTE register to 1. (Enable interrupts)
2. Write data to the following sound buffer (SNDDAT register) bits. (Start buzzer output)
- SNDDAT.SLEN[5:0] bits (Set buzzer output signal duty ratio)
- SNDDAT.SFRQ[7:0] bits (Set buzzer output signal frequency)
3. Write 1 to the SNDCTL.SSTP bit after the output period has elapsed. (Stop buzzer output)
CLK_SNDA
Sound buffer
(SNDDAT register)
Sound register
SNDCTL.SSTP
SNDINTF.SBSY
SNDINTF.EMIF
SNDINTF.EDIF
BZOUT pin
#BZOUT pin
(
fCLK_SNDA DUTY
SNDDAT.SLEN[5:0] bits = ——————— × ————— -1
fBZOUT 100 ) (Eq. 16.2)
Where
fCLK_SNDA: CLK_SNDA frequency [Hz]
fBZOUT: Buzzer signal frequency [Hz]
DUTY: Buzzer signal duty ratio [%]
However, the following settings are prohibited:
• Settings as SNDDAT.SFRQ[7:0] bits ≤ SNDDAT.SLEN[5:0] bits
• Settings as SNDDAT.SFRQ[7:0] bits = 0x00
Table 16.4.2.2 Buzzer Duty Ratio Setting Examples (when fCLK_SNDA = 32,768 Hz)
SNDDAT. Duty ratio by buzzer frequency
SLEN[5:0] bits 16,384 Hz 8,192 Hz 4,096 Hz 2,048 Hz 1,024 Hz 512 Hz
0x3f – – – – – –
0x3e – – – – – 98.4
0x3d – – – – – 96.9
0x3c – – – – – 95.3
0x3b – – – – – 93.8
0x3a – – – – – 92.2
0x39 – – – – – 90.6
0x38 – – – – – 89.1
0x37 – – – – – 87.5
0x36 – – – – – 85.9
0x35 – – – – – 84.4
0x34 – – – – – 82.8
0x33 – – – – – 81.3
0x32 – – – – – 79.7
0x31 – – – – – 78.1
0x30 – – – – – 76.6
0x2f – – – – – 75.0
0x2e – – – – – 73.4
0x2d – – – – – 71.9
0x2c – – – – – 70.3
0x2b – – – – – 68.8
0x2a – – – – – 67.2
0x29 – – – – – 65.6
0x28 – – – – – 64.1
0x27 – – – – – 62.5
0x26 – – – – – 60.9
0x25 – – – – – 59.4
0x24 – – – – – 57.8
0x23 – – – – – 56.3
0x22 – – – – – 54.7
0x21 – – – – – 53.1
0x20 – – – – – 51.6
0x1f – – – – – 50.0
0x1e – – – – 96.9 48.4
0x1d – – – – 93.8 46.9
0x1c – – – – 90.6 45.3
0x1b – – – – 87.5 43.8
0x1a – – – – 84.4 42.2
0x19 – – – – 81.3 40.6
0x18 – – – – 78.1 39.1
0x17 – – – – 75.0 37.5
0x16 – – – – 71.9 35.9
0x15 – – – – 68.8 34.4
0x14 – – – – 65.6 32.8
0x13 – – – – 62.5 31.3
0x12 – – – – 59.4 29.7
CLK_SNDA
Sound buffer
(SNDDAT register)
Sound register
SNDINTF.SBSY
SNDINTF.EMIF
SNDINTF.EDIF
BZOUT pin
#BZOUT pin
SNDINTF.SBSY
SNDINTF.EMIF
SNDINTF.EDIF
BZOUT/#BZOUT pin
Note 1 Note 2 Note n-2 Note n-1 Note n
(Melody waveform output)
Software operation (When SNDSEL.SINV bit = 0)
Tie/slur specification
A tie or slur takes effect by setting the SNDDAT.MDTI bit to 1 and the previous note and the current note
are played continuously.
Note
Tie Slur
(
(
SNDDAT.MDTI 0 0 0 1 0 1
Figure 16.4.4.2 Tie and Slur
Scale specification
Scales can be specified using the SNDDAT.SFRQ[7:0] bits.
Table 16.4.4.2 Scale Specification (when fCLK_SNDA = 32,768 Hz)
SNDDAT.SFRQ[7:0] bits Scale Frequency [Hz]
0xf8 C3 131.60
0xea C#3 139.44
0xdd D3 147.60
0xd1 D#3 156.04
0xc5 E3 165.49
0xba F3 175.23
0xaf F#3 186.18
0xa5 G3 197.40
0x9c G#3 208.71
0x93 A3 221.41
0x8b A#3 234.06
16.5 Interrupts
SNDA has a function to generate the interrupts shown in Table 16.5.1.
Table 16.5.1 SNDA Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
Sound buffer empty SNDINTF.EMIF When data in the sound buffer (SNDDAT regis- Writing to the SNDDAT
ter) is transferred to the sound register or 1 is register
written to the SNDCTL.SSTP bit
Sound output SNDINTF.EDIF When a sound output has completed Writing 1 or writing to
completion the SNDDAT register
SNDA provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the inter-
rupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set.
For more information on interrupt control, refer to the “Interrupt Controller” chapter.
Bit 2 SINV
This bit selects an output pin drive mode.
1 (R/W): Normal drive mode
0 (R/W): Direct drive mode
For more information, refer to “Output Pin Drive Mode.”
Bits 1–0 MOSEL[1:0]
These bits select a sound output mode.
Table 16.6.3 Sound Output Mode Selection
SNDSEL.MOSEL[1:0] bits Sound output mode
0x3 Reserved
0x2 Melody mode
0x1 One-shot buzzer mode
0x0 Normal buzzer mode
This register functions as a sound buffer. Writing data to this register starts sound output. For detailed information
on the setting data, refer to “Buzzer output waveform configuration (normal buzzer mode/one-shot buzzer mode)”
and “Melody output waveform configuration.”
Bit 15 MDTI
This bit specifies a tie or slur (continuous play with the previous note) in melody mode.
1 (R/W): Enable tie/slur
0 (R/W): Disable tie/slur
This bit is ignored in normal buzzer mode/one-shot buzzer mode.
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 16-11
TECHNICAL MANUAL (Rev. 1.3)
16 SOUND GENERATOR (SNDA)
Bit 14 MDRS
This bit selects the output type in melody mode from a note or a rest .
1 (R/W): Rest
0 (R/W): Note
When a rest is selected, the BZOUT pin goes low and the #BZOUT pin goes high during the output
duration. This bit is ignored in normal buzzer mode/one-shot buzzer mode.
Bits 13–8 SLEN[5:0]
These bits select a duration (when melody mode is selected) or a buzzer signal duty ratio (when nor-
mal buzzer mode/one-shot buzzer mode is selected).
Bits 7–0 SFRQ[7:0]
These bits select a scale (when melody mode is selected) or a buzzer signal frequency (when normal
buzzer mode/one-shot buzzer mode is selected).
Notes: • In normal buzzer mode/one-shot buzzer mode, only the low-order 6 bits (SNDDAT.SFRQ[5:0]
bits) are effective within the SNDDAT.SFRQ[7:0] bits. Always set the SNDDAT.SFRQ[7:6] bits
to 0x0.
• The SNDDAT register allows 16-bit data writing only. Data writings in 8-bit size will be ig-
nored.
REMC3
CLK_REMC3
CRPER[7:0]
CLKSRC[1:0] CRDTY[7:0]
Clock Carrier signal
CLKDIV[3:0] CARREN
generator generator
DBRUN PRESET
MODEN PRUN
DBLEN[15:0]
Internal data bus
APLEN[15:0]
DBLENBSY BUFEN
Data signal
APLENBSY REMOINV
generator
REMCRST OUTINVEN
REMO
CLPLS
DBCNT[15:0]
DBCNTRUN TRMD
Interrupt Interrupt
controller DBIE control circuit DBIF
APIE APIF
If the port is shared with the REMC3 pin and other functions, the REMC3 output function must be assigned to the
port before activating the REMC3. For more information, refer to the “I/O Ports” chapter.
TXD
REMO
VCC
VDD
LEDA
17.4 Operations
17.4.1 Initialization
The REMC3 should be initialized with the procedure shown below.
1. Write 1 to the REMDBCTL.REMCRST bit. (Reset REMC3)
2. Configure the REMCLK.CLKSRC[1:0] and REMCLK.CLKDIV[3:0] bits. (Configure operating clock)
3. Assign the REMC3 output function to the port. (Refer to the “I/O Ports” chapter.)
Carrier signal
Data bit
Carrier signal
The carrier signal is generated by comparing the values of the 8-bit counter for carrier generation that runs with
CLK_REMC3 and the setting values of the REMCARR.CRDTY[7:0] and REMCARR.CRPER[7:0] bits. Fig-
ure 17.4.3.2 shows an example of the carrier signal generated.
Example) REMCARR.CRDTY[7:0] bits = 2, REMCARR.CRPER[7:0] bits = 8
CLK_REMC3
8-bit counter for
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 1 2 3 4
carrier generation
Carrier signal
A
B
The carrier signal frequency and duty ratio can be calculated by the equations shown below.
fCLK_REMC3 CRDTY + 1
Carrier frequency = ———————— Duty ratio = ———————— (Eq. 17.1)
CRPER + 1 CRPER + 1
Where
fCLK_REMC3: CLK_REMC3 frequency [Hz]
CRPER: REMCARR.CRPER[7:0] bit-setting value (1–255)
CRDTY: REMCARR.CRDTY[7:0] bit-setting value (0–254)
* REMCARR.CRDTY[7:0] bits < REMCARR.CRPER[7:0] bits
The 8-bit counter for carrier generation is reset by the REMDBCTL.PRESET bit and is started/stopped by the
REMDBCTL.PRUN bit in conjunction with the 16-bit counter for data signal generation. When the counter
value is matched with the REMCARR.CRDTY[7:0] bits, the carrier signal waveform is inverted. When the
counter value is matched with the REMCARR.CRPER[7:0] bits, the carrier signal waveform is inverted and
the counter is reset to 0x00.
Data signal
The data signal is generated by comparing the values of the 16-bit counter for data signal generation (REM-
DBCNT.DBCNT[15:0] bits) that runs with CLK_REMC3 and the setting values of the REMAPLEN.
APLEN[15:0] and REMDBLEN.DBLEN[15:0] bits. Figure 17.4.3.3 shows an example of the data signal gen-
erated.
The data length and duty ratio of the pulse-width-modulated data signal can be calculated with the equations
shown below.
DBLEN + 1 APLEN + 1
Data length = ———————— Duty ratio = ———————— (Eq. 17.2)
fCLK_REMC3 DBLEN + 1
Where
fCLK_REMC3: CLK_REMC3 frequency [Hz]
DBLEN: REMDBLEN.DBLEN[15:0] bit-setting value (1–65,535)
APLEN: REMAPLEN.APLEN[15:0] bit-setting value (0–65,534)
* REMAPLEN.APLEN[15:0] bits < REMDBLEN.DBLEN[15:0] bits
The 16-bit counter for data signal generation is reset by the REMDBCTL.PRESET bit and is started/stopped
by the REMDBCTL.PRUN bit. When the counter value is matched with the REMAPLEN.APLEN[15:0] bits
(compare AP), the data signal waveform is inverted. When the counter value is matched with the REMDBLEN.
DBLEN[15:0] bits (compare DB), the data signal waveform is inverted and the counter is reset to 0x0000.
A different interrupt can be generated when the counter value is matched with the REMDBLEN.DBLEN[15:0]
and REMAPLEN.APLEN[15:0] bits, respectively.
Example) REMDBCTL.TRMD bit = 0 (repeat mode), REMDBCTL.BUFEN bit = 1 (compare buffer enabled), REM-
DBCTL.REMOINV bit = 0 (signal logic non-inverted)
REMDBCTL.PRUN
16-bit counter for 0x0bd0 0x0bd1 0x11b8 0x00bd 0x00be 0x017a 0x00bd 0x00be 0x02f4
data signal generation 0 1 2 3 0 1 0 1 0 1
(DBCNT[15:0])
REMAPLEN.APLEN[15:0] 0x0bd0 0x00bd
REMINTF.DBCNTRUN
REMINTF.APLENBSY
REMINTF.DBLENBSY
Data signal
(Modulated data)
16T 8T T T T 3T
“0” “1”
When the compare buffer is disabled (REMDBCTL.BUFEN bit = 0), the 16-bit counter value is directly compared
with the REMAPLEN.APLEN[15:0] and REMDBLEN.DBLEN[15:0] bit values. The comparison value is altered
immediately after the REMAPLEN.APLEN[15:0] or REMDBLEN.DBLEN[15:0] bits are rewritten.
When the compare buffer is enabled (REMDBCTL.BUFEN bit = 1), the REMAPLEN.APLEN[15:0] and REM-
DBLEN.DBLEN[15:0] bit values are loaded into the compare buffers provided respectively (REMAPLEN buffer
and REMDBLEN buffer) and the 16-bit counter value is compared with the compare buffers.
The comparison values are loaded into the compare buffers when the 16-bit counter is matched with the REM-
DBLEN buffer (when the count for the data length has completed). Therefore, the next transmit data can be set
during the current data transmission. When the compare buffers are enabled, the buffer status flags (REMINTF.
APLENBSY bit and REMINTF.DBLENBSY bit) become effective. The flag is set to 1 when the setting value is
written to the register and cleared to 0 when the written value is transferred to the buffer.
17.5 Interrupts
The REMC3 has a function to generate the interrupts shown in Table 17.5.1.
Table 17.5.1 REMC3 Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
Compare AP REMINTF.APIF When the REMAPLEN register (or REMAPLEN Writing 1 to the interrupt flag or
buffer) value and the 16-bit counter for data signal the REMDBCTL.REMCRST bit
generation are matched
Compare DB REMINTF.DBIF When the REMDBLEN register (or REMDBLEN Writing 1 to the interrupt flag or
buffer) value and the 16-bit counter for data signal the REMDBCTL.REMCRST bit
generation are matched
The REMC3 provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the in-
terrupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set.
For more information on interrupt control, refer to the “Interrupt Controller” chapter.
VDD
L1
S1C17 VEL = 50–200 V
REMO R1 D1
Q1
R3 +
EL lamp
REMC3
CLPLS R2
Q2
REMAPLEN.APLEN[15:0] REMCARR.CRDTY[7:0]
REMO
CLPLS
Writing 1 to REMDBCTL.PRUN
Figure 17.6.2 Example of Generated Drive Waveform
The REMO and CLPLS signals are output from the respective pins while the REMDBCTL.PRUN bit = 1. The dif-
ference between the setting values of the REMDBLEN.DBLEN[15:0] bits and REMAPLEN.APLEN[15:0] bits
becomes the CLPLS pulse width (high period).
Before the counter can start counting by this bit, the REMDBCTL.MODEN bit must be set to 1.
While the counter is running, writing 0 to the REMDBCTL.PRUN bit stops count operations. When
the counter stops by occurrence of a compare DB in one-shot mode, this bit is automatically cleared to 0.
Bits 7–5 Reserved
Bit 4 REMOINV
This bit inverts the REMO output signal.
1 (R/W): Inverted
0 (R/W): Non-inverted
For more information, see Figure 17.4.3.1.
Bit 3 BUFEN
This bit enables or disables the compare buffers.
1 (R/W): Enable
0 (R/W): Disable
For more information, refer to “Continuous Data Transmission and Compare Buffers.”
Note: The REMDBCTL.BUFEN bit must be set to 0 when setting the data signal duty and cycle for
the first time.
Bit 2 TRMD
This bit selects the operation mode of the 16-bit counter for data signal generation.
1 (R/W): One-shot mode
0 (R/W): Repeat mode
For more information, refer to “REMO Output Waveform, Data signal.”
Bit 1 REMCRST
This bit issues software reset to the REMC3.
1 (W): Issue software reset
0 (W): Ineffective
1 (R): Software reset is executing.
0 (R): Software reset has finished. (During normal operation)
Setting this bit resets the REMC3 internal counters and interrupt flags. This bit is automatically
cleared after the reset processing has finished.
Bit 0 MODEN
This bit enables the REMC3 operations.
1 (R/W): Enable REMC3 operations (The operating clock is supplied.)
0 (R/W): Disable REMC3 operations (The operating clock is stopped.)
Note: If the REMDBCTL.MODEN bit is altered from 1 to 0 while sending data, the data being sent
cannot be guaranteed. When setting the REMDBCTL.MODEN bit to 1 again after that, be
sure to write 1 to the REMDBCTL.REMCRST bit as well.
LCD8A
Interrupt Interrupt control
controller circuit
FRMIE FRMIF
LDUTY[2:0] LFRO
FRMCNT[3:0]
BSTC[1:0]
NLINE[2:0]
CLK_LCD8A Clock
control circuit
CLKSRC[1:0] COMx
Clock generator CLKDIV[2:0] VSS
DBRUN
MODEN SEGx
VSS
Drive
control circuit LCDDIS
Display data DSPREV
DSPAR
RAM SEGREV
COMREV
DSPC[1:0]
LCD power
Internal data bus
COMxDEN
supply circuit
VC3
EXVCSEL LCD voltage CP2
VC3
LC[3:0] booster VSS
CP1
BSTEN
VSS
HVLD VC3
VC3
VCSEL LCD voltage VSS
VC2
VCEN regulator VC3
VSS
VC1
VSS
S1C17M31/M33/M34
LCD8A
Interrupt Interrupt control
controller circuit
FRMIE FRMIF
LDUTY[2:0] LFRO
FRMCNT[3:0]
NLINE[2:0] COMx
Clock VSS
CLK_LCD8A
control circuit
CLKSRC[1:0] SEGx
VSS
Clock generator CLKDIV[2:0]
DBRUN LCDDIS
MODEN DSPREV
Drive
SEGREV
control circuit
COMREV
Display data DSPC[1:0]
DSPAR
Internal data bus
RAM COMxDEN
VC3
VC3
VSS
VC2
VC3
VSS
EXVCSEL VC1
VSS
S1C17M30/M32
Figure 18.1.1 LCD8A Configuration
If the port is shared with the LCD8A pin and other functions, the LCD8A output function must be assigned to the
port before activating the LCD8A. For more information, refer to the “I/O Ports” chapter.
The COM4–7 outputs and SEG0–4 outputs share the pins and selecting a drive duty switches the pins to COM pins
or SEG pins. For the pin configuration, refer to “Drive Duty Switching.”
Notes: • Be sure to avoid using the VC1 to VC3 pin outputs of the model with an embedded LCD power
supply for driving external circuits.
• When an LCD panel is connected, set the LCD8CTL.LCDDIS bit to 1, as activating the LCD
panel when it is set to 0 may cause the LCD panel characteristics to fluctuate.
Table 18.2.1.2 Segment Pin Configuration
Model Available SEG pins Unavailable SEG pins
S1C17M30 SEG0–3 (COM4–7), SEG13–24, SEG36–40, SEG45–49 SEG4–12, SEG25–35, SEG41–44
S1C17M31 SEG0–3 (COM4–7), SEG15–24, SEG34–40, SEG45–49 SEG4–14, SEG25–33, SEG41–44
S1C17M32 SEG0–3 (COM4–7), SEG7–26, SEG32–49 SEG4–6, SEG27–31
S1C17M33 SEG0–3 (COM4–7), SEG4–49 –
S1C17M34 SEG0–3 (COM4–7), SEG7–24, SEG32–40, SEG44–49 SEG4–6, SEG25–31, SEG41–43
COMm
LCD Panel
COM0
SEGn
SEG0
S7C17 LCD8A
Figure 18.2.2.1 Connections between LCD8A and an LCD Panel
Where
fFR: Frame frequency [Hz]
fCLK_LCD8A: LCD8A operating clock frequency [Hz]
FRMCNT: LCD8TIM1.FRMCNT[3:0] setting value (0 to 15)
LDUTY: LCD8TIM1.LDUTY[2:0] setting value (0 to 7)
Table 18.3.4.1 lists frame frequency settings when fCLK_LCD8A = 32,768 Hz as an example.
CP2
CLCD4
CP1
VC3
VC2
VC1 CLCD1 CLCD2 CLCD3
CP2
Open
CP1
VC3
RLCD3
VC2
RLCD2
VC1
RLCD1
(The CP1 and CP2 pins are provided only for the model with an LCD power supply.)
Figure 18.4.2.1 External Connection Example for External Voltage Application Mode 1 (resistor divider)
CP2
CLCD4
CP1
VC3
VC2
VC1 CLCD2 CLCD3
Figure 18.4.3.1 External Connection Example for External Voltage Application Mode 2 (when VC1 is applied)
18.5 Operations
18.5.1 Initialization
The LCD8A should be initialized with the procedure shown below.
1. Assign the LCD8A output function to the ports. (Refer to the “I/O Ports” chapter.)
2. Configure the LCD8CLK.CLKSRC[1:0] and LCD8CLK.CLKDIV[2:0] bits. (Configure operating clock)
3. Configure the following LCD8CTL register bits:
- Write 1 to the LCD8CTL.MODEN bit. (Enable LCD8A operating clock)
- Write 1 to the LCD8CTL.LCDDIS bit. (Enable LCD driver pin discharge at display off)
4. Configure the following LCD8TIM1 register bits:
- LCD8TIM1.LDUTY[2:0] bits (Set drive duty)
- LCD8TIM1.FRMCNT[3:0] bits (Set frame frequency)
5. Configure the following LCD8TIM2 register bits:
- LCD8TIM2.NLINE[2:0] bits (Set n-line inverse AC drive)
- LCD8TIM2.BSTC[1:0] bits * (Set booster clock frequency)
6. Set the LCD8PWR.EXVCSEL bit. * (Select external voltage application mode/internal generation mode)
7. Configure the following LCD8PWR register bits:
- LCD8PWR.VCEN bit * (Enable LCD voltage regulator)
- LCD8PWR.VCSEL bit * (Set reference voltage for boosting)
- LCD8PWR.BSTEN bit * (Enable LCD voltage booster)
- LCD8PWR.LC[3:0] bits * (Set LCD contrast initial value)
* Do not alter these bits from the initial value when using a model that does not have an LCD power supply.
8. Configure the following LCD8DSP register bits:
- LCD8DSP.DSPAR bit (Select display area)
- LCD8DSP.COMREV bit (Select COM pin assignment direction)
- LCD8DSP.SEGREV bit (Select SEG pin assignment direction)
9. Write display data to the display data RAM.
10. Set the following bits when using the interrupt:
- Write 1 to the LCD8INTF.FRMIF bit. (Clear interrupt flag)
- Set the LCD8INTE.FRMIE bit to 1. (Enable LCD8A interrupt)
Selecting “Display off” stops the drive voltage supply and the LCD driver pin outputs are all set to VSS level when
the LCD8CTL.LCDDIS bit = 1.
Since “All on” and “All off” directly control the driving waveform output by the LCD driver, data in the display
data RAM is not altered. The common pins are set to dynamic drive for “All on” and to static drive for “All off.”
This function can be used to make the display flash on and off without altering the display memory.
Note: When “Display off” is selected while the external LCD drive voltages are being supplied in an ex-
ternal voltage application mode, the electric charges of VC3 must be discharged in the following
procedure.
1. Turn the external power supply off.
2. Set the LCD8PWR.EXVCSEL bit to 0. (Select internal generation mode)
3. Set the LCD8PWR.EXVCSEL bit to 1. (Select external voltage application mode)
Unused common pins output an OFF waveform that turns the segments off.
The some pins are shared with a SEG output and a COM output, and they are configured to the SEG or COM pin
according to the drive duty selected.
Table 18.5.4.2 SEG/COM Pin Configuration
Duty
Pin
1/8 1/7 1/6 1/5 1/4 1/3 1/2 Static
COM0 COM0 COM0 COM0 COM0 COM0 COM0 COM0 COM0
COM1 COM1 COM1 COM1 COM1 COM1 COM1 COM1 Unused
COM2 COM2 COM2 COM2 COM2 COM2 COM2 Unused Unused
COM3 COM3 COM3 COM3 COM3 COM3 Unused Unused Unused
COM4/SEG0 COM4 COM4 COM4 COM4 SEG0 SEG0 SEG0 SEG0
COM5/SEG1 COM5 COM5 COM5 Unused SEG1 SEG1 SEG1 SEG1
COM6/SEG2 COM6 COM6 Unused Unused SEG2 SEG2 SEG2 SEG2
COM7/SEG3 COM7 Unused Unused Unused SEG3 SEG3 SEG3 SEG3
SEG4–49 SEG4–49 SEG4–49 SEG4–49 SEG4–49 SEG4–49 SEG4–49 SEG4–49 SEG4–49
VC3 Off
VC2 On
COM3 VC1
VSS
VC3
VC2
COM4 VC1
VSS
VC3
VC2
COM5 VC1
VSS
VC3
VC2
COM6 VC1
VSS
VC3
VC2
COM7 VC1
VSS
VC3
VC2
VC1
VSS
VC3
VC2
VC1
VSS
VC3
VC2
VC1
SEGx VSS
VC3
VC2
VC1
VSS
VC3
VC2
VC1
VSS
VC3
VC2
VC1
VSS
1 frame
0 1 2 3 0 1 2 3
LFRO VD2
VSS
VC3
LCD
VC2
COM0 display status
VC1
VSS COM0
COM1
VC3
COM2
VC2
COM1 COM3
VC1
VSS SEGx
VC3
Off
VC2
COM2 On
VC1
VSS
VC3
VC2
COM3 VC1
VSS
VC3
VC2
VC1
VSS
VC3
VC2
VC1
VSS
VC3
VC2
VC1
SEGx VSS
VC3
VC2
VC1
VSS
VC3
VC2
VC1
VSS
VC3
VC2
VC1
VSS
Figure 18.5.5.2 1/4 Duty Drive Waveform (1/3 bias)
1 frame
0 0
LFRO VD2
LCD
VSS
display status
VC3
COM0
VC2
COM0 VC1 SEGx
VSS
Off
VC3
On
VC2
VC1
VSS
SEGx
VC3
VC2
VC1
VSS
Figure 18.5.5.3 Static Drive Waveform (1/3 bias)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
VC3
COM0
VC2
LCD8TIM2.NLINE[2:0] bits = 0x00
VC1
(Normal drive)
VSS
VC3
COM0
VC2
LCD8TIM2.NLINE[2:0] bits = 0x03
VC1
(3-line inverse drive)
VSS
VC3
SEGx
VC2
LCD8TIM2.NLINE[2:0] bits = 0x00
VC1
(Normal drive)
VSS
VC3
SEGx
VC2
LCD8TIM2.NLINE[2:0] bits = 0x03
VC1
(3-line inverse drive)
VSS
Figure 18.5.7.1 1/8 Duty (1/3 bias) Normal Drive Waveform and 3-line Inverse Drive Waveform
D1 COM1 COM6
D2 COM2 COM5
0x7000
0x7003
0x7004
0x7005
0x7031
0x7032
0x7033
D3 COM3 COM4
Display area 0
D4 COM4 COM3
D5 COM5 COM2
D6 COM6 COM1
D7 COM7 COM0
D0 COM0 COM7
D1 COM1 COM6
D2 COM2 COM5
0x7040
0x7043
0x7044
0x7045
0x7071
0x7072
0x7073
D3 COM3 COM4
Display area 1
D4 COM4 COM3
D5 COM5 COM2
D6 COM6 COM1
D7 COM7 COM0
SEG4 SEG49
LCD8DSP.SEGREV
SEG49 SEG4
SEG48 SEG5
···
bit = 1
LCD8DSP.SEGREV
···
bit = 0
LCD8DSP. LCD8DSP.
Bit Address COMREV COMREV
bit = 1 bit = 0
D0 COM0 COM5
D1 COM1 COM4
0x7004
0x7005
0x7031
D2 COM2 COM3
Display area 0
0x7000
0x7003
0x7032
0x7033
D3 COM3 COM2
:
D4 COM4 COM1
D5 COM5 COM0
D6
Unused area (general-purpose RAM)
D7
D0 COM0 COM5
D1 COM1 COM4
0x7044
0x7045
0x7071
D2 COM2 COM3
Display area 1
0x7040
0x7043
0x7072
0x7073
D3 COM3 COM2
:
D4 COM4 COM1
D5 COM5 COM0
D6
Unused area (general-purpose RAM)
D7
SEG4 SEG49
LCD8DSP.SEGREV
SEG49 SEG4
SEG48 SEG5
···
bit = 1
LCD8DSP.SEGREV
···
bit = 0
LCD8DSP. LCD8DSP.
Bit Address COMREV COMREV
bit = 1 bit = 0
D0 COM0 COM3
0x7000
0x7001
0x7031
D1 COM1 COM2
Display area 0
D2 COM2 COM1
0x7032
0x7033
D3 COM3 COM0
D4
D5
Unused area (general-purpose RAM)
D6
D7
D0 COM0 COM3
0x7040
0x7041
0x7071
D1 COM1 COM2
Display area 1
D2 COM2 COM1
0x7072
0x7073
D3 COM3 COM0
D4
D5
Unused area (general-purpose RAM)
D6
D7
SEG0 SEG49
LCD8DSP.SEGREV
SEG49 SEG0
SEG48 SEG1
···
bit = 1
LCD8DSP.SEGREV
···
bit = 0
LCD8DSP. LCD8DSP.
Bit Address COMREV COMREV
bit = 1 bit = 0
D0 Display area 0 COM0 COM0
D1
D2
0x7032
0x7033
D3
0x7000
0x7001
0x7031
D3
0x7040
0x7041
0x7071
LCD8DSP.SEGREV
SEG49 SEG0
SEG48 SEG1
···
bit = 1
LCD8DSP.SEGREV
···
bit = 0
* The S1C17M30/M31/M32/M34 does not have the segment pins listed below, so the corresponding addresses are
configured as an unused area (general-purpose RAM).
When LCD8DSP.SEGREV bit = 1
1/8 to 1/2 duty, static drive
S1C17M30: SEG4–12 (0x7004–0x700c, 0x7044–0x704c), SEG25–35 (0x7019–0x7023, 0x7059–0x7063),
SEG41–44 (0x7029–0x702c, 0x7069–0x706c)
S1C17M31: SEG4–14 (0x7004–0x700e, 0x7044–0x704e), SEG25–33 (0x7019–0x7021, 0x7059–0x7061),
SEG41–44 (0x7029–0x702c, 0x7069–0x706c)
S1C17M32: SEG4–6 (0x7004–0x7006, 0x7044–0x7046), SEG27–31 (0x701b–0x701f, 0x705b–0x705f)
S1C17M34: SEG4–6 (0x7004–0x7006, 0x7044–0x7046), SEG25–31 (0x7019–0x701f, 0x7059–0x705f),
SEG41–43 (0x7029–0x702b, 0x7069–0x706b)
18.7 Interrupt
The LCD8A has a function to generate the interrupt shown in Table 18.7.1.
Table 18.7.1 LCD8A Interrupt Function
Interrupt Interrupt flag Set condition Clear condition
Frame LCD8INTF.FRMIF Frame switching Writing 1
The LCD8A provides an interrupt enable bit corresponding to the interrupt flag. An interrupt request is sent to the
interrupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is
set. For more information on interrupt control, refer to the “Interrupt Controller” chapter.
1 frame
0 x-1 0 x-1
LFRO
VC3
VC2
COM0 VC1
VSS
VC3
VC2
COMx VC1
VSS
Note: Do not alter the control bits in this register from the initial value when using a model that does
not have an LCD power supply, except the LCD8PWR.EXVCSEL bit manipulation for VC3 dis-
charging.
18-16 Seiko Epson Corporation C17M30/M31/M32/M33/M34
TECHNICAL MANUAL (Rev. 1.3)
18 LCD DRIVER (LCD8A)
Bit 15 EXVCSEL
This bit selects the LCD drive power supply mode (external voltage application mode or internal gen-
eration mode).
1 (R/W): External voltage application mode
0 (R/W): Internal generation mode
Note: Be sure to avoid applying voltages to the VC1 to VC3 pins when the LCD8PWR.EXVCSEL bit
is set to 0, as the LCD power supply pins are short-circuited to GND.
Bits 14–12 Reserved
Bits 11–8 LC[3:0]
These bits set the LCD panel contrast.
Table 18.8.3 LCD Contrast Adjustment
LCD8PWR.LC[3:0] bits Contrast
0xf High (dark)
0xe ↑
: :
0x1 ↓
0x0 Low (light)
RFC Ch.n
Interrupt
controller
OVTCIE OVTCIF
OVMCIE Interrupt OVMCIF
ESENBIE control circuit ESENBIF
ESENAIE ESENAIF
EREFIE EREFIF
TCCLK
CLKSRC[1:0]
Clock generator CLKDIV[1:0] Time base counter RFCLKMD
DBRUN TC[23:0]
1/2
MODEN Counter RFCLKOn
control circuit
Measurement counter
MC[23:0]
Internal data bus
Note: The RFINn pin goes to VSS level when the port is switched. Be aware that large current may flow
if the pin is biased by an external circuit.
SENBn
RSEN2
SENAn
RSEN1
REFn
RREF
RREF: Reference resistor
RFINn
RSEN1: Resistive sensor (DC bias)
CREF RSEN2: Resistive sensor (DC bias)
S1C17 RFC CREF: Reference capacitor
* Leave the unused pin (SENAn or SENBn) open if one resistive sensor only is used.
Figure 19.2.2.1 Connection Example in Resistive Sensor DC Oscillation Mode
SENBn
RSEN1
SENAn RREF
REFn
RFINn
RREF: Reference resistor
CREF RSEN1: Resistive sensor (AC bias)
S1C17 RFC CREF: Reference capacitor
Figure 19.2.2.2 Connection Example in Resistive Sensor AC Oscillation Mode
SENBn
SENAn
REFn
Square wave
RFINn
Sine wave
S1C17 RFC
* Leave the unused pins open.
Figure 19.2.2.3 External Clock Input in External Clock Input Mode
19.4 Operations
19.4.1 Initialization
The RFC should be initialized with the procedure shown below.
1. Configure the RFCnCLK.CLKSRC[1:0] and RFCnCLK.CLKDIV[1:0] bits. (Configure operating clock)
2. Set the following bits when using the interrupt:
- Write 1 to the interrupt flags in the RFCnINTF register. (Clear interrupt flags)
- Set the interrupt enable bits in the RFCnINTE register to 1. (Enable interrupts)
3. Assign the RFC input/output function to the ports. (Refer to the “I/O Ports” chapter.)
Oscillation mode
The oscillation mode is selected using the RFCnCTL.SMODE[1:0] bits.
Connecting the reference element and sensor with the same resistance will result in <Initial value: n> = <Coun-
ter value at the end of sensor oscillation: m> (if error = 0). Setting a large <Initial value: n> increases the reso-
lution of measurement. However, the measurement counter may overflow during sensor oscillation when the
sensor value decreases below the reference element value (the measurement will be canceled). The initial value
for the measurement counter should be determined taking the range of sensor value into consideration.
The time base counter should be set to 0x000000 before starting reference oscillation.
The time base counter overflow sets the RFCnINTF.OVTCIF bit to 1 indicating that the reference oscilla-
tion has been terminated abnormally. If the RFCnINTE.OVTCIE bit = 1, a time base counter overflow error
interrupt request occurs at this point.
Sensor oscillation
When the RFCnTRG.SSENA bit (sensor A) or the RFCnTRG.SSENB bit (sensor B) is set to 1 in Step 7
of the conversion procedure above, the RFC Ch.n starts CR oscillation using the sensor. The measurement
counter starts counting up using the CR oscillation clock from 0x000000. The time base counter starts
counting down using TCCLK from the value at the end of reference oscillation.
When the time base counter reaches 0x000000 or the measurement counter overflows (0xffffff →
0x000000), the RFCnTRG.SSENA bit or the RFCnTRG.SSENB bit that started oscillation is cleared to 0
and the sensor oscillation stops automatically.
The time base counter reaching 0x000000 sets the RFCnINTF.ESENAIF bit (sensor A) or the RFCnINTF.
ESENBIF bit (sensor B) to 1 indicating that the sensor oscillation has been terminated normally. If the RF-
CnINTE.ESENAIE bit = 1 or the RFCnINTE.ESENBIE bit = 1, a sensor A or sensor B oscillation comple-
tion interrupt request occurs at this point.
The measurement counter overflow sets the RFCnINTF.OVMCIF to 1 indicating that the sensor oscillation
has been terminated abnormally. If the RFCnINTE.OVMCIE bit = 1, a measurement counter overflow error
interrupt request occurs at this point.
Overflow Overflow
(normal termination) (error termination)
EREFIF = 1, SREF = 0 OVMCIF = 1, SSENx = 0
Initial value n
Count up Count value m1
Varies depending on
Measurement counter the environment
Count value m2
Forced termination
To abort reference oscillation or sensor oscillation, write 0 to the RFCnTRG.SREF bit (reference oscillation),
the RFCnTRG.SSENA bit (sensor A oscillation), or the RFCnTRG.SSENB bit (sensor B oscillation) used to
start the oscillation. The counters maintain the value at the point they stopped, note, however, that the conver-
sion results cannot be guaranteed if the oscillation is resumed. When resuming oscillation, execute from coun-
ter initialization again.
Conversion error
Performing reference oscillation and sensor oscillation with the same resistor and capacitor results n ≈ m. The
difference between n and m is a conversion error. Table 19.4.4.1 lists the error factors. (n: measurement counter
initial value, m: measurement counter value at the end of sensor oscillation)
RFCnCTL.CONEN
RFINn pin
RFCLKOn pin VDD
(RFCnCTL.RFCLKMD = 0) VSS
RFCLKOn pin VDD
(RFCnCTL.RFCLKMD = 1) VSS
Figure 19.4.5.1 CR Oscillation Clock (RFCLK) Waveform
19.5 Interrupts
The RFC has a function to generate the interrupts shown in Table 19.5.1.
Table 19.5.1 RFC Interrupt Function
Clear
Interrupt Interrupt flag Set condition
condition
Reference oscillation RFCnINTF.EREFIF When reference oscillation has been completed normally Writing 1
completion due to a measurement counter overflow
Sensor A oscillation RFCnINTF.ESENAIF When sensor A oscillation has been completed normally Writing 1
completion due to the time base counter reaching 0x000000
Sensor B oscillation RFCnINTF.ESENBIF When sensor B oscillation has been completed normally Writing 1
completion due to the time base counter reaching 0x000000
Measurement counter RFCnINTF.OVMCIF When sensor oscillation has been terminated abnormally Writing 1
overflow error due to a measurement counter overflow
Time base counter RFCnINTF.OVTCIF When reference oscillation has been terminated abnor- Writing 1
overflow error mally due to a time base counter overflow
The RFC provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the in-
terrupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is
set. For more information on interrupt control, refer to the “Interrupt Controller” chapter.
Bit 7 CONEN
This bit disables the automatic CR oscillation stop function to enable continuous oscillation function.
1 (R/W): Enable continuous oscillation
0 (R/W): Disable continuous oscillation
For more information, refer to “CR Oscillation Frequency Monitoring Function.”
Bit 6 EVTEN
This bit enables external clock input mode (event counter mode).
1 (R/W): External clock input mode
0 (R/W): Normal mode
For more information, refer to “Operating Modes.”
Note: Do not input an external clock before the RFCnCTL.EVTEN bit is set to 1. The RFINn pin is
pulled down to VSS level when the port function is switched for the R/F converter.
Bits 5–4 SMODE[1:0]
These bits configure the oscillation mode. For more information, refer to “Operating Modes.”
Table 19.6.2 Oscillation Mode Selection
RFCnCTL.SMODE[1:0] bits Oscillation mode
0x3, 0x2 Reserved
0x1 AC oscillation mode for resistive sensor measurements
0x0 DC oscillation mode for resistive sensor measurements
Bit 0 SREF
This bit controls CR oscillation for the reference resistor. This bit also indicates the CR oscillation sta-
tus.
1 (W): Start oscillation
0 (W): Stop oscillation
1 (R): Being oscillated
0 (R): Stopped
Notes: • Settings in this register are all ineffective when the RFCnCTL.MODEN bit = 0 (RFC operation
disabled).
• When writing 1 to the RFCnTRG.SREF bit, the RFCnTRG.SSENA bit, or the RFCnTRG.
SSENB bit to start oscillation, be sure to avoid having more than one bit set to 1.
• Be sure to clear the interrupt flags (RFCnINTF.EREFIF bit, RFCnINTF.ESENAIF bit, RFCnINTF.
ESENBIF bit, RFCnINTF.OVMCIF bit, and RFCnINTF.OVTCIF bit) before starting oscillation
using this register.
Underflow
ADC12A Ch.n
Clock Timer
generator
CLK_T16_k
MODEN STMD
ADSTAT[2:0] SMPCLK[2:0]
BSYSTAT
ADINn0
VRANGE[1:0]
Internal data bus
Successive
ADINn1
approximation + MUX
Comparator with
AD0D[15:0] control circuit
sample & hold circuit
AD1D[15:0] – ADINnm
D/A
ADmD[15:0]
converter
VREFAn
AD0CIF AD0CIE
AD1CIF AD1CIE
ADmOVIF ADmOVIE
Note: In this chapter, n, m, and k refer to an ADC12A channel number, an analog input pin number, and
a 16-bit timer channel number, respectively.
S1C17M30/M31/M32/M33/M34 Seiko Epson Corporation 20-1
TECHNICAL MANUAL (Rev. 1.3)
20 12-BIT A/D CONVERTER (ADC12A)
If the port is shared with the ADC12A pin and other functions, the ADC12A input function must be assigned to the
port before activating the ADC12A. For more information, refer to the “I/O Ports” chapter.
VDD
DC-DC 3.3 V
VREFAn
converter
Sensor output
ADINn0 Sensor
detection
Battery voltage
ADINnm
detection
S1C17 ADC12A
Figure 20.2.2.1 Connections between ADC12A and External Devices
Note: When the CLK_T16_k supply stops during A/D conversion (e.g., when the CPU enters SLEEP
or DEBUG mode), correct conversion results cannot be obtained even if the clock supply is re-
sumed after that. In this case, perform A/D conversion again.
RS ADINnm RADIN
CADIN
RS: Source impedance
RADIN: Analog input resistance
VSS VSS CADIN: Analog input capacitance
For the RADIN and CADIN values in the equivalent circuit, refer to “12-bit A/D Converter Characteristics” in the
“Electrical Characteristics” chapter. Based on these values, configure the ADC12A operating clock CLK_T16_k
and the ADC12_nTRG.SMPCLK[2:0] bits that set the sampling time so that these settings will satisfy the equations
shown below.
tACQ = 8 × (RS + RADIN) × CADIN (Eq. 20.1)
1
—————— × SMPCLK > tACQ (Eq. 20.2)
fCLK_ADC
Where
fCLK_ADC: CLK_T16_k frequency [Hz]
SMPCLK: Sampling time = ADC12_nTRG.SMPCLK[2:0] bit-setting (4 to 11 CLK_T16_k cycles)
The following shows the relationship between the sampling time and the maximum sampling rate.
fCLK_ADC
Maximum sampling rate [sps] = —————————— (Eq. 20.3)
SMPCLK + 13
20.4 Operations
20.4.1 Initialization
The ADC12A should be initialized with the procedure shown below.
1. Assign the ADC12A input function to the ports. (Refer to the “I/O Ports” chapter.)
2. Configure the 16-bit timer Ch.k operating clock so that it will satisfy the sampling time.
3. Set the ADC12_nCTL.MODEN bit to 1. (Enable ADC12A operations)
4. Configure the following ADC12_nTRG register bits:
- ADC12_nTRG.SMPCLK[2:0] bits (Set sampling time)
- ADC12_nTRG.CNVTRG[1:0] bits (Select conversion start trigger source)
- ADC12_nTRG.CNVMD bit (Set conversion mode)
- ADC12_nTRG.STMD bit (Set data storing mode)
- ADC12_nTRG.STAAIN[2:0] bits (Set analog input pin to be A/D converted first)
- ADC12_nTRG.ENDAIN[2:0] bits (Set analog input pin to be A/D converted last)
5. Set the ADC12_nCFG.VRANGE[1:0] bits. (Set operating voltage range according to VDD)
6. Set the following bits when using the interrupt:
- Write 1 to the interrupt flags in the ADC12_nINTF register. (Clear interrupt flags)
- Set the interrupt enable bits in the ADC12_nINTE register to 1. (Enable interrupts)
ADC12_nCTL.ADSTAT[2:0] 0x0 (ADINn0) 0x1 (ADINn1) 0x0 (ADINn0) 0x1 (ADINn1) 0x0 (ADINn0)
Sampling Conversion Sampling Conversion Sampling Conversion
A/D conversion operations ADINn0 ADINn0 ADINn0 ADINn0 ADINn0 ADINn0
ADC12_nINTF.AD0OVIF
ADC12_nINTF.AD2CIF Cleared
ADC12_nINTF.AD3CIF Cleared
ADC12_nINTF.AD4CIF Cleared
ADC12_nCTL.ADSTAT[2:0] 0x3 (ADINn3) 0x4 (ADINn4) 0x3 (ADINn3) 0x4 (ADINn4) 0x5 (ADINn5)
Sampling Conversion Sampling Conversion Sampling Conversion Sampling Conversion
A/D conversion operations ADINn3 ADINn3 ADINn4 ADINn4 ADINn3 ADINn3 ADINn4 ADINn4
20.5 Interrupts
The ADC12A has a function to generate the interrupts shown in Table 20.5.1.
Table 20.5.1 ADC12A Interrupt Function
Clear
Interrupt Interrupt flag Set condition
condition
Analog input signal m A/D ADC12_nINTF.ADmCIF When an analog input signal m A/D conver- Writing 1
conversion completion sion result is loaded to the ADC12_nADmD
register
Analog input signal m A/D ADC12_nINTF.ADmOVIF When a new A/D conversion result is loaded Writing 1
conversion result overwrite to the ADC12_nADmD register while the
error ADC12_nINTF.ADmCIF bit = 1
Note that the A/D conversion continues even if an A/D conversion result overwrite error has occurred. A/D conver-
sion result overwrite errors are decided regardless of whether the ADC12_nADmD register has been read or not.
The ADC12A provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the
interrupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is
set. For more information on interrupt control, refer to the “Interrupt Controller” chapter.
Bit 15 Reserved
Bits 14–12 ADSTAT[2:0]
These bits indicate the analog input pin number m being A/D converted.
Table 20.6.1 Relationship Between Control Bit Value and Analog Input Pin
ADC12_nCTL.ADSTAT[2:0] bits
ADC12_nTRG.STAAIN[2:0] bits Analog input pin
ADC12_nTRG.ENDAIN[2:0] bits
0x7 ADINn7
0x6 ADINn6
0x5 ADINn5
0x4 ADINn4
0x3 ADINn3
0x2 ADINn2
0x1 ADINn1
0x0 ADINn0
These bits indicate the last converted analog input pin number after A/D conversion is forcefully
terminated by writing 0 to the ADC12_nCTL.ADST bit or automatically terminated in one-time
conversion mode (ADC12_nTRG.CNVMD = 0). If A/D conversion is stopped after the maximum
analog input pin number (different in each model) has been completed, these bits indicate ADINn0.
Bit 11 Reserved
Bit 10 BSYSTAT
This bit indicates whether the ADC12A is executing A/D conversion or not.
1 (R/W): A/D converting
0 (R/W): Idle
Bits 9–2 Reserved
Bit 1 ADST
This bit starts A/D conversion or enables to accept triggers.
1 (R/W): Start sampling and conversion (software trigger)/
Enable trigger acceptance (external trigger, 16-bit timer underflow trigger)
0 (R/W): Terminate conversion
This bit does not revert to 0 automatically after A/D conversion has completed. Write 0 to this bit once
and write 1 again to start another A/D conversion. After 0 is written to this bit to forcefully terminate
conversion, the ADC12A stops after the A/D conversion being executed is completed. Therefore, this
bit cannot be used to determine whether the ADC12A is executing A/D conversion or not.
Note: The data written to the ADC12_nCTL.ADST bit must be retained for one or more CLK_T16_k
clock cycles when 1 is written or two or more CLK_T16_k clock cycles when 0 is written.
Bit 0 MODEN
This bit enables the ADC12A operations.
1 (R/W): Enable ADC12A operations (The operating clock is supplied.)
0 (R/W): Disable ADC12A operations (The operating clock is stopped.)
Note: After 0 is written to the ADC12_nCTL.MODEN bit, the ADC12A executes a terminate
processing. Before the clock source is deactivated, read the ADC12_nCTL.MODEN bit to
make sure that it is set to 0.
Note: Make sure that the ADC12_nCTL.BSYSTAT bit is set to 0 before altering the ADC12_nTRG register.
Bit 7 STMD
This bit selects the data alignment when the conversion results are loaded into the A/D conversion re-
sult registers (ADC12_nADmD.ADmD[15:0] bits).
1 (R/W): Left justify
0 (R/W): Right justify
All the A/D conversion result registers change their data alignment immediately after this bit is al-
tered. This does not affect the conversion results.
ADC12_nADmD.ADmD[15:0] bits
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Left justified (ADC12_nTRG.STMD bit = 1) (MSB) 12-bit conversion result (LSB) 0 0 0 0
Right justified (ADC12_nTRG.STMD bit = 0) 0 0 0 0 (MSB) 12-bit conversion result (LSB)
Figure 20.6.1 Conversion Data Alignment
Bit 6 CNVMD
This bit sets the A/D conversion mode.
1 (R/W): Continuous conversion mode
0 (R/W): One-time conversion mode
Bits 5–4 CNVTRG[1:0]
These bits select a trigger source to start A/D conversion.
Table 20.6.2 Trigger Source Selection
ADC12_nTRG.CNVTRG[1:0] bits Trigger source
0x3 #ADTRGn pin (external trigger)
0x2 Reserved
0x1 16-bit timer Ch.k underflow
0x0 ADC12_nCTL.ADST bit (software trigger)
Bit 3 Reserved
Bits 2–0 SMPCLK[2:0]
These bits set the analog input signal sampling time.
Table 20.6.3 Sampling Time Settings
Sampling time
ADC12_nTRG.SMPCLK[2:0] bits
(Number of CLK_T16_k cycles)
0x7 11 cycles
0x6 10 cycles
0x5 9 cycles
0x4 8 cycles
0x3 7 cycles
0x2 6 cycles
0x1 5 cycles
0x0 4 cycles
Note: Make sure that the ADC12_nCTL.BSYSTAT bit is set to 0 before altering the ADC12_nCFG register.
Notes: • A/D conversion will not be performed if the ADC12_nCFG.VRANGE[1:0] bits = 0x0. Set
these bits to the value according to the operating voltage to perform A/D conversion.
• Be aware that ADC circuit current IADC flows if the ADC12_nCFG.VRANGE[1:0] bits are set
to a value other than 0x0 when the ADC12_nCTL.BSYSTAT bit = 1.
21 Temperature Sensor/Reference
Voltage Generator (TSRVR)
21.1 Overview
The TSRVR is a peripheral circuit for the internal A/D converter that outputs the internal temperature sensor detec-
tion values and generates the reference voltage. The features of the TSRVR are listed below.
• Includes a temperature sensor that has a linear output characteristic and the sensor output can be measured using
the internal A/D converter without external components being attached.
• Can supply a reference voltage (2.0 V, 2.5 V, or VDD selectable) to the internal A/D converter.
• Can supply the reference voltage generated in this circuit to external devices if this IC has the VREFA exclusive
pin.
Figure 21.1.1 shows the TSRVR configuration.
Table 21.1.1 TSRVR Configuration of S1C17M30/M31/M32/M33/M34
Item S1C17M30 S1C17M31 S1C17M32 S1C17M33 S1C17M34
Number of channels 1 channel (Ch.0)
Correspondence between TSRVR and internal A/D TSRVR Ch.0 → ADC12A Ch.0
converter channels
A/D converter input connected to temperature sensor ADIN05
Reference voltage output to external devices Unavailable
TSRVR Ch.n
VREFAMD[1:0]
VDD
Internal data bus
+
VREFAm
2.0 V 2.5 V –
Note: In this chapter, n and m refer to a TSRVR channel number and an internal A/D converter channel
number, respectively.
If the port is shared with the TSRVR pin and other functions, the TSRVR output function must be assigned to the
port before activating the TSRVR. For more information, refer to the “I/O Ports” chapter.
(1) When an external device is not connected (2) When an external device is connected
Figure 21.2.2.1 Connections between TSRVR and External Components
21.3 Operations
TSRVR should be configured before starting measurements using the internal A/D converter.
Where
TSEN: Actual temperature [°C]
VTSEN: Temperature sensor output voltage at temperature TSEN [V]
TREF: Reference temperature for calibration [°C]
VTREF: Temperature sensor output voltage at temperature TREF [V]
DVTEMP: Temperature sensor output voltage temperature coefficient [mV/°C] (Refer to the “Electrical Char-
acteristics” chapter.)
Convert the digital values corresponding to the respective temperatures, that are obtained by the internal A/D con-
verter, into voltage values and assign them to VTSEN and VTREF.
ADD
V(TSEN, TREF) = ————— × VREFA (Eq. 21.2)
4,096
Where
ADD: A/D conversion result at temperature TSEN or TREF (decimal)
VREFA: A/D converter reference voltage [V]
For details of the internal A/D converter, refer to the “12-bit A/D Converter” chapter.
Notes: • Be aware that VREFA operating current IVREFA flows when the TSRVRnVCTL.VREFAMD[1:0]
bits are set to 0x2 or 0x3.
• When the TSRVRnVCTL.VREFAMD[1:0] bits are not set to 0x0, do not apply an external volt-
age to the VREFAm pin.
22 Multiplier/Divider (COPRO2)
22.1 Overview
COPRO2 is the coprocessor that provides multiplier/divider functions. The features of COPRO2 are listed below.
• Multiplication: Supports signed/unsigned multiplications.
(16 bits × 16 bits = 32 bits)
Can be executed in 1 cycle.
• Multiplication and accumulation (MAC): Supports signed/unsigned MAC operations with overflow detection
function. (16 bits × 16 bits + 32 bits = 32 bits)
Can be executed in 1 cycle.
• Division: Supports signed/unsigned divisions.
(32 bits ÷ 32 bits = 32 bits with 32-bit reminder)
Can be executed in 17 to 20 cycles.
Overflow detection and division by zero processing are not supported.
Figure 22.1.1 shows the COPRO2 configuration.
Argument 2 COPRO2
Argument 1
Operation result
S1C17 Core
Operation result Operation result
register 1 register 0
Coprocessor Selector
output
Flag output
6 4 3 0
Output mode setting value Operation mode setting value
22.3 Multiplication
The multiplication function performs “A (32 bits) = B (16 bits) × C (16 bits).”
The following shows a procedure to perform a multiplication:
1. Set the mode to 0x04 (unsigned multiplication, 16 low-order bits output mode 0) or 0x05 (signed multiplica-
tion, 16 low-order bits output mode 0).
2. Send the 16-bit multiplicand (B) and 16-bit multiplier (C) to COPRO2 using a “ld.ca” instruction.
3. Read the one-half result (16 low-order bits = A[15:0]) and the flag status.
4. Set the mode to 0x13 (operation result read, 16 high-order bits output mode 0).
5. Read another one-half result (16 high-order bits = A[31:16]).
Argument 2 COPRO2
Argument 1 16 bits
32 bits
Operation result
S1C17 Core
Operation result Operation result
register 1 register 0
Coprocessor Selector
output (16 bits)
Flag output
22.4 Division
The division function performs “A (32 bits) = B (32 bits) ÷ C (32 bits), D (32 bits) = remainder.”
The following shows a procedure to perform a division:
1. Set the mode to 0x02 (initialize mode 2).
2 Set the 32-bit dividend (B) to the operation result register 0 using a “ld.cf” instruction.
3. Set the mode to 0x08 (unsigned division, 16 low-order bits output mode 0) or 0x09 (signed division, 16 low-
order bits output mode 0).
4. Send the 32-bit divisor (C) to COPRO2 using a “ld.ca” instruction.
5. Read the one-half result (16 low-order bits = A[15:0]) of the operation result register 0 (quotient) and the flag
status.
6. Set the mode to 0x13 (operation result read, 16 high-order bits output mode 0).
7. Read another one-half result (16 high-order bits = A[31:16]) of the operation result register 0 (quotient).
8. Set the mode to 0x23 (operation result read, 16 low-order bits output mode 1).
9. Read the one-half result (16 low-order bits = D[15:0]) of the operation result register 1 (remainder).
10. Set the mode to 0x33 (operation result read, 16 high-order bits output mode 1).
11. Read another one-half result (16 high-order bits = D[31:16]) of the operation result register 1 (remainder).
Argument 2 COPRO2
Argument 1 16 bits
32 bits
Operation result
S1C17 Core
Operation result Operation result
register 1 register 0
Coprocessor Selector
output
Flag output
Argument 2 COPRO2
32 bits
Argument 1 16 bits
÷
32 bits
Coprocessor Selector
output (16 bits)
Flag output
Example:
ld.cw %r0,0x02 ; Sets the mode (initialize mode 2).
ld.cf %r0,%r1 ; Set the dividend {%r0, %r1} to the operation result register 0.
ld.cw %r0,0x08 ; Sets the mode (unsigned division mode and 16 low-order bits output mode 0).
ld.ca %r0,%r1 ; Performs “res0[31:0] (quotient), res1[31:0] (remainder) = res0[31:0] ÷ {%r0[15:0],
%r1[15:0]}” and loads the 16 low-order bits of the result (quotient) to %r0.
ld.ca %r1,%r0 ; Loads the 16 low-order bits of the result (quotient) to %r1.
ld.cw %r0,0x13 ; Sets the mode (operation result read mode and 16 high-order bits output mode 0).
ld.ca %r2,%r0 ; Loads the 16 high-order bits of the result (quotient) to %r2.
ld.cw %r0,0x23 ; Sets the mode (operation result read mode and 16 low-order bits output mode 1).
ld.ca %r3,%r0 ; Loads the 16 low-order bits of the result (remainder) to %r3.
ld.cw %r0,0x33 ; Sets the mode (operation result read mode and 16 high-order bits output mode 1).
ld.ca %r4,%r0 ; Loads the 16 high-order bits of the result (remainder) to %r4.
22.5 MAC
The MAC (multiplication and accumulation) function performs “A (32 bits) = B (16 bits) × C (16 bits) + A (32
bits).”
The following shows a procedure to perform a MAC operation:
1. Set the initial value (A) to the operation result register 0.
• To clear the operation result registers (A = 0):
Set the mode to 0x00 (initialize mode 0). (It is not necessary to send 0x00 to COPRO2 with another instruc-
tion.)
• To load a 16-bit value to the operation result register 0:
Set the operation mode to 0x01 (initialize mode 1) and then send the initial value (16 bits) to COPRO2 us-
ing a “ld.cf” instruction.
• To load a 32-bit value to the operation result register 0:
Set the operation mode to 0x02 (initialize mode 2) and then send the initial value (32 bits) to COPRO2 us-
ing a “ld.cf” instruction.
2. Set the mode to 0x06 (unsigned MAC, 16 low-order bits output mode 0) or 0x07 (signed MAC, 16 low-order
bits output mode 0).
3. Repeat sending the 16-bit multiplicand (B) and 16-bit multiplier (C) to COPRO2 the number of times required
using a “ld.ca” instruction.
4. Read the one-half result (16 low-order bits = A[15:0]) and the flag status.
5. Set the mode to 0x13 (operation result read, 16 high-order bits output mode).
6. Read another one-half result (16 high-order bits = A[31:16]).
Argument 2 COPRO2
Argument 1 16 bits
32 bits
S1C17 Core
Operation result Operation result
register 1 register 0
Coprocessor Selector
output
Flag output
Argument 2 COPRO2
32 bits
Argument 1 16 bits
32 bits
Operation result
S1C17 Core
Operation result Operation result
register 1 register 0
Coprocessor Selector
output (16 bits)
Flag output
An overflow occurs when a MAC operation performs addition of positive values and a negative value results,
or it performs addition of negative values and a positive value results. The coprocessor holds the operation re-
sult until the overflow (V) flag is cleared.
Argument 2 COPRO2
Argument 1 16 bits
S1C17 Core
Operation result Operation result
register 1 register 0
Coprocessor Selector
output (16 bits)
Flag output
23 Electrical Characteristics
23.1 Absolute Maximum Ratings
(VSS = 0 V)
Item Symbol Condition Rated value Unit
Power supply voltage VDD -0.3 to 7.0 V
Flash programming voltage VPP -0.3 to 8.0 V
LCD power supply voltage VC1 -0.3 to 7.0 V
VC2 -0.3 to 7.0 V
VC3 -0.3 to 7.0 V
Input voltage VI P00–07, P10–17, P20–27, P30–37, P40–47, P50–55, -0.3 to 7.0 V
P60–67, PD0–D1
P70–76, PD3–D4, #RESET -0.3 to VDD + 0.5 V
Output voltage VO P00–07, P10–17, P20–27, P30–37, P40–47, P50–55, -0.3 to VDD + 0.5 V
P60–67, P70–76, PD0–D4
High level output current IOH 1 pin P00–07, P10–17, P20–27, P30–37, P40–47, -10 mA
Total of all pins P50–55, P60–67, P70–76, PD0–D4 -20 mA
Low level output current IOL 1 pin P00–07, P10–17, P20–27, P30–37, P40–47, 10 mA
Total of all pins P50–55, P60–67, P70–76, PD0–D4 20 mA
Operating temperature Ta -40 to 85 °C
Storage temperature Tstg -65 to 125 °C
0.9
50
0.8
0.7
40
0.6
IHALT1 [µA]
ISLP [µA]
0.5 30
0.4
20
0.3
0.2
10
0.1
0 0
-50 -25 0 25 50 75 100 -50 -25 0 25 50 75 100
Ta [°C] Ta [°C]
500
2.0
16 MHz (0x2)
400
12 MHz (0x1)
1.5
IHALT2 [µA]
IHALT3 [µA]
300
1.0
200
0.5
100
200 8
150 6
IRUN1 [µA]
IRUN2 [µA]
100 4
50 2
0 0
-50 -25 0 25 50 75 100 -50 -25 0 25 50 75 100
Ta [°C] Ta [°C]
16 MHz (0x2)
2,000
12 MHz (0x1)
1,600
IRUN3 [µA]
1,200
800
400
tSR
VT+
#RESET
VT-
POR/BOR characteristics
Unless otherwise specified: VDD = 1.8 to 5.5 V, VSS = 0 V, Ta = -40 to 85 °C
Item Symbol Condition Min. Typ. Max. Unit
POR/BOR canceling voltage VRST+ 1.41 – 1.75 V
POR/BOR detection voltage VRST- 1.25 – 1.55 V
POR/BOR hysteresis voltage ΔVRST 40 60 – mV
POR/BOR detection response time tRST – – 20 µs
POR/BOR operating limit voltage VRSTOP – 0.5 0.95 V
POR/BOR reset request hold time tRRQ 0.01 – 4 ms
VRST+
∆VRST
VRST+
VRST- VRST- VRST-
VDD
VSS
POR&BOR
X REQ REQ X REQ X
reset request
tRRQ tRRQ tRRQ
X Indefinite (operating limit) REQ POR/BOR reset request
Note: When performing a power-on-reset again after the power is turned off, decrease the VDD voltage
to VRSTOP or less.
Reset hold circuit characteristics
Unless otherwise specified: VDD = 1.8 to 5.5 V, VSS = 0 V, Ta = -40 to 85 °C
Item Symbol Condition Min. Typ. Max. Unit
Reset hold time*1 tRSTR 0.5 – 0.9 ms
*1 Time until the internal reset signal is negated after the reset request is canceled.
850
800
750
fIOSC [kHz]
700
650
600
550
500
-50 -25 0 25 50 75 100
Ta [°C]
35
fOSC1I [kHz]
30
25
20
-50 -25 0 25 50 75 100
Ta [°C]
16
16 MHz
14
12
12 MHz
fOSC3I [MHz]
10
0
-50 -25 0 25 50 75 100
Ta [°C]
High level
Input data
Low level
0 VT- VT + VDD 7.0 V*
Input voltage [V]
(∗ For over voltage tolerant fail-safe type port)
-2
VDD = 1.8 V VDD = 3.6 V
6
IOL [mA]
-4
IOH [mA]
4
VDD = 1.8 V
-6
2
-8
0
VDD = 5.5 V VDD = 3.6 V 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
-10 VOL [V]
CLK_SVD3
SVDCTL.MODEN
tSVDEN tSVD
15
ISVD [µA]
10
5 0x1
0x2
0x3
0
0 1 2 3 4 5 6
VDD [V]
Slave mode
tSSS tSSH
#SPISSn
SPICLKn
(CPOL, CPHA) = (0, 1)
SPICLKn
(CPOL, CPHA) = (1, 0)
SDIn
tSDD tSDZ
Hi-Z
SDOn
tf tBUF
tr tSU:DAT
SDAn
tHD:DAT tSU:STA tSU:STO
tf tr tHIGH tHD:STA
SCLn
S Sr P S
tHD:STA tLOW
S: START condition
1/fSCL
Sr: Repeated START condition
1st clock cycle 9th clock cycle P: STOP condition
LCD drive voltage-supply voltage characteristic LCD drive voltage-supply voltage characteristic
(VC2 reference voltage) (VC1 reference voltage)
Ta = 25 °C, Typ. value, when a 1 MW load resistor Ta = 25 °C, Typ. value, when a 1 MW load resistor
is connected between VSS and VC3 (no panel load) is connected between VSS and VC3 (no panel load)
6.0 6.0
5.5 5.5
5.0 5.0
4.5 4.5
4.0 4.0
VC3 [V]
VC3 [V]
LCD8PWR.LC[3:0] bits = 0xf LCD8PWR.LC[3:0] bits = 0xf
3.5 3.5
3.0 3.0
LCD8PWR.LC[3:0] bits = 0x0 LCD8PWR.LC[3:0] bits = 0x0
2.5 2.5
2.0 2.0
1.5 1.5
1.0 1.0
1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD [V] VDD [V]
1.04VC3
1.03VC3 3.8
1.02VC3
1.01VC3 3.6
VC3 [V]
VC3 [V]
0.99VC3 3.4
LCD8PWR.VCSEL bit = 0
0.98VC3
0.97VC3 3.2
0.96VC3
0.95VC3 3.0
-50 -25 0 25 50 75 100 0 2 4 6 8 10 12 14 16 18 20
Ta [°C] -IVC3 [µA]
70
60
ILCD1/ILCD2 [µA]
50
40
LCD8PWR.VCSEL bit = 0
30
20
10
LCD8PWR.VCSEL bit = 1
0
0 2 4 6 8 10 12 14 16 18 20
-IVC3 [µA]
1,000 1,000
VDD
5.5 V VDD
3.6 V 5.5 V
100
fRFCLK [kHz]
fRFCLK [kHz]
1 1
0 0
1 10 100 1,000 10,000 10 100 1,000 10,000 100,000
RREF/RSEN [kΩ] CREF [pF]
2,500
20 VDD = 5.5 V
3.6 V 2,000
fRFCLK [kHz]
15 VDD = 5.5 V
IRFC [µA]
1.8 V
1,500
10
1,000
3.6 V
5
500
1.8 V
0 0
-50 -25 0 25 50 75 100 1 10 100 1,000
Ta [°C] fRFCLK [kHz]
800
700
600
IADC [µA]
500
400
0x2
300
0x1
200
100
0
1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
VDD = VREFA [V]
TSRVRnTCTL.TEMPEN
1.4
1.2
1.0
VTEMP [V]
0.8
0.6
0.4
0.2
0
-50 -25 0 25 50 75 100
Ta [°C]
LCD panel
VDD
BZ
External
COM0
COM3/7
SEG0/4
SEG49
EXSVD0 voltage
BZOUT
SENBn RTMP2
SENAn RTMP1
REFn RREF
1.8–5.5 V VDD
+ RFINn
or CPW1 CREF
2.4–5.5 V ∗1 CPW2
VD1 VDD
∗2 CLCD1
VC1
CLCD2
VC2 REMO
CLCD3
VC3 IR transmitter module
CLCD4
CP1
CP2 S1C17M30/M31/M32/M33/M34 RDBG
( ) VDD
[The potential of the substrate DCLK
∗3
( ) OSC1 (back of the chip) is VSS.]
CG1
DSIO ICDmini
( ) OSC2
DST2
CD1 X'tal1
VPP
CVPP
∗4
( ) OSC3
CG3 Pxy I/O
( ) OSC4
CD3 X'tal3/ SDIn
Ceramic SDOn
SPI
SPICLKn
#RESET #SPISSn
VSS SCL0
I2C
SDA0
USINn
UART
USOUTn
TOUTn0/CAPn0
PWM/Capture
TOUTn1/CAPn1
ADIN0x
#ADTRG0 A/D conversion inputs
VREFA0
( ) CVREFA
*1: For Flash programming
*2: When the internal LCD power supply is used (S1C17M31/M33/M34)
*3: When OSC1 crystal oscillator is selected (S1C17M30/M32/M33/M34)
*4: When OSC3 crystal/ceramic oscillator is selected
( ): Do not mount components if unnecessary.
25 Package
TQFP12-48PIN (P-TQFP048-0707-0.50) [S1C17M30/M31]
(Unit: mm)
9
7
36 25
37 24
7
9
INDEX
48 13
1 12
0.5 0.17min/0.27max
1.2max
0.09min/0.2max
1
0°min/10°max
0.1
0.3min/0.7max
1
Figure 25.1 QFP12-48PIN Package Dimensions
49 32
10
12
INDEX
64 17
1 16
0.5 0.17min/0.27max
1.2max
0.09min/0.2max
0.1 1
0°min/10°max
0.3min/0.75max
1
Figure 25.2 QFP13-64PIN Package Dimensions
61 40
12
14
INDEX
80 21
1 20
0.5 0.13min/0.27max
1.7max
0.09min/0.2max
0.1 1.4
0°min/10°max
0.3min/0.75max
1
Figure 25.3 QFP14-80PIN Package Dimensions
Address Register name Bit Bit name Initial Reset R/W Remarks
0x4046 CLGOSC1 15 – 0 – R –
(CLG OSC1 Control 14 OSDRB 1 H0 R/WP
Register) 13 OSDEN 0 H0 R/WP
12 OSC1BUP 1 H0 R/WP
11 OSC1SELCR 0 H0 R/WP
10–8 CGI1[2:0] 0x0 H0 R/WP
7–6 INV1B[1:0] 0x2 H0 R/WP
5–4 INV1N[1:0] 0x1 H0 R/WP
3–2 – 0x0 – R
1–0 OSC1WT[1:0] 0x2 H0 R/WP
0x4048 CLGOSC3 15–11 – 0x00 – R –
(CLG OSC3 Control 10 OSC3FQ 0 H0 R/WP
Register) 9 OSC3MD 0 H0 R/WP
8 – 0 – R
7–6 – 0x0 – R
5–4 OSC3INV[1:0] 0x3 H0 R/WP
3 OSC3STM 0 H0 R/WP
2–0 OSC3WT[2:0] 0x6 H0 R/WP
0x404c CLGINTF 15–8 – 0x00 – R –
(CLG Interrupt Flag 7 – 0 – R
Register) 6 – 0 H0 R
5 OSC1STPIF 0 H0 R/W Cleared by writing 1.
4 OSC3TEDIF 0 H0 R/W
3 – 0 – R –
2 OSC3STAIF 0 H0 R/W Cleared by writing 1.
1 OSC1STAIF 0 H0 R/W
0 IOSCSTAIF 0 H0 R/W
0x404e CLGINTE 15–8 – 0x00 – R –
(CLG Interrupt Enable 7 – 0 – R
Register) 6 – 0 H0 R
5 OSC1STPIE 0 H0 R/W
4 OSC3TEDIE 0 H0 R/W
3 – 0 – R
2 OSC3STAIE 0 H0 R/W
1 OSC1STAIE 0 H0 R/W
0 IOSCSTAIE 0 H0 R/W
0x4050 CLGFOUT 15–8 – 0x00 – R –
(CLG FOUT Control 7 – 0 – R
Register) 6–4 FOUTDIV[2:0] 0x0 H0 R/W
3–2 FOUTSRC[1:0] 0x0 H0 R/W
1 – 0 – R
0 FOUTEN 0 H0 R/W
0x4052 CLGTRIM1 15 – 0 – R –
(CLG Oscillation 14–8 OSC3AJ[6:0] * H0 R/WP * Determined by factory
Frequency Trimming adjustment.
Register 1) 7–6 – 0x0 – R –
5–0 IOSCAJ[5:0] * H0 R/WP * Determined by factory
adjustment.
0x4054 CLGTRIM2 15–8 – 0x00 – R –
(CLG Oscillation 7–6 – 0x0 – R
Frequency Trimming 5–0 OSC1AJ[5:0] * H0 R/WP * Determined by factory
Register 2) adjustment.
Address Register name Bit Bit name Initial Reset R/W Remarks
0x4094 ITCLV10 15–11 – 0x00 – R –
(ITC Interrupt Level 10–8 ILV21[2:0] 0x0 – R/W 12-bit A/D converter
Setup Register 10) interrupt (ILVADC12A_0)
7–3 – 0x00 – R –
2–0 ILV20[2:0] 0x0 – R/W 16-bit timer Ch.3 interrupt
(ILVT16_3)
0x4096 ITCLV11 15–8 – 0x00 – R –
(ITC Interrupt Level 7–3 – 0x00 – R
Setup Register 11) 2–0 ILV22[2:0] 0x0 – R/W 16-bit PWM timer Ch.2
interrupt (ILVT16B_2)
Address Register name Bit Bit name Initial Reset R/W Remarks
0x40c6 RTCSWCTL 15–12 BCD10[3:0] 0x0 H0 R –
(RTC Stopwatch 11–8 BCD100[3:0] 0x0 H0 R
Control Register) 7–5 – 0x0 – R
4 SWRST 0 H0 W Read as 0.
3–1 – 0x0 – R –
0 SWRUN 0 H0 R/W
0x40c8 RTCSEC 15 – 0 – R –
(RTC Second/1Hz 14–12 RTCSH[2:0] 0x0 H0 R/W
Register) 11–8 RTCSL[3:0] 0x0 H0 R/W
7 RTC1HZ 0 H0 R Cleared by setting the
6 RTC2HZ 0 H0 R RTCCTL.RTCRST bit to 1.
5 RTC4HZ 0 H0 R
4 RTC8HZ 0 H0 R
3 RTC16HZ 0 H0 R
2 RTC32HZ 0 H0 R
1 RTC64HZ 0 H0 R
0 RTC128HZ 0 H0 R
0x40ca RTCHUR 15 – 0 – R –
(RTC Hour/Minute 14 RTCAP 0 H0 R/W
Register) 13–12 RTCHH[1:0] 0x1 H0 R/W
11–8 RTCHL[3:0] 0x2 H0 R/W
7 – 0 – R
6–4 RTCMIH[2:0] 0x0 H0 R/W
3–0 RTCMIL[3:0] 0x0 H0 R/W
0x40cc RTCMON 15–13 – 0x0 – R –
(RTC Month/Day 12 RTCMOH 0 H0 R/W
Register) 11–8 RTCMOL[3:0] 0x1 H0 R/W
7–6 – 0x0 – R
5–4 RTCDH[1:0] 0x0 H0 R/W
3–0 RTCDL[3:0] 0x1 H0 R/W
0x40ce RTCYAR 15–11 – 0x00 – R –
(RTC Year/Week 10–8 RTCWK[2:0] 0x0 H0 R/W
Register) 7–4 RTCYH[3:0] 0x0 H0 R/W
3–0 RTCYL[3:0] 0x0 H0 R/W
0x40d0 RTCINTF 15 RTCTRMIF 0 H0 R/W Cleared by writing 1.
(RTC Interrupt Flag 14 SW1IF 0 H0 R/W
Register) 13 SW10IF 0 H0 R/W
12 SW100IF 0 H0 R/W
11–9 – 0x0 – R –
8 ALARMIF 0 H0 R/W Cleared by writing 1.
7 1DAYIF 0 H0 R/W
6 1HURIF 0 H0 R/W
5 1MINIF 0 H0 R/W
4 1SECIF 0 H0 R/W
3 1_2SECIF 0 H0 R/W
2 1_4SECIF 0 H0 R/W
1 1_8SECIF 0 H0 R/W
0 1_32SECIF 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x40d2 RTCINTE 15 RTCTRMIE 0 H0 R/W –
(RTC Interrupt Enable 14 SW1IE 0 H0 R/W
Register) 13 SW10IE 0 H0 R/W
12 SW100IE 0 H0 R/W
11–9 – 0x0 – R
8 ALARMIE 0 H0 R/W
7 1DAYIE 0 H0 R/W
6 1HURIE 0 H0 R/W
5 1MINIE 0 H0 R/W
4 1SECIE 0 H0 R/W
3 1_2SECIE 0 H0 R/W
2 1_4SECIE 0 H0 R/W
1 1_8SECIE 0 H0 R/W
0 1_32SECIE 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x4166 T16_0TR 15–0 TR[15:0] 0xffff H0 R/W –
(T16 Ch.0 Reload
Data Register)
0x4168 T16_0TC 15–0 TC[15:0] 0xffff H0 R –
(T16 Ch.0 Counter
Data Register)
0x416a T16_0INTF 15–8 – 0x00 – R –
(T16 Ch.0 Interrupt 7–1 – 0x00 – R
Flag Register) 0 UFIF 0 H0 R/W Cleared by writing 1.
0x416c T16_0INTE 15–8 – 0x00 – R –
(T16 Ch.0 Interrupt 7–1 – 0x00 – R
Enable Register) 0 UFIE 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4204 P0RCTL 15 P0PDPU7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P0 Port Pull-up/down 14 P0PDPU6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Control Register) 13 P0PDPU5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P0PDPU4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P0PDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P0PDPU2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P0PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P0PDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P0REN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
6 P0REN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P0REN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0REN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0REN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0REN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0REN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4206 P0INTF 15–8 – 0x00 – R – – – – – –
(P0 Port Interrupt 7 P0IF7 0 H0 R/W Cleared ✓ ✓ ✓ ✓ ✓
Flag Register) 6 P0IF6 0 H0 R/W by writ- ✓ ✓ ✓ ✓ ✓
5 P0IF5 0 H0 R/W ing 1. ✓ ✓ ✓ ✓ ✓
4 P0IF4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4208 P0INTCTL 15 P0EDGE7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P0 Port Interrupt 14 P0EDGE6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Control Register) 13 P0EDGE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P0EDGE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P0EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P0EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P0EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P0EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P0IE7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
6 P0IE6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P0IE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0IE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x420a P0CHATEN 15–8 – 0x00 – R – – – – – –
(P0 Port Chattering 7 P0CHATEN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Filter Enable Register) 6 P0CHATEN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P0CHATEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0CHATEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x420c P0MODSEL 15–8 – 0x00 – R – – – – – –
(P0 Port Mode Select 7 P0SEL7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Register) 6 P0SEL6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P0SEL5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P0SEL4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P0SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P0SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P0SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P0SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x420e P0FNCSEL 15–14 P07MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P0 Port Function 13–12 P06MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Select Register) 11–10 P05MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
9–8 P04MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–6 P03MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P02MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P01MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P00MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4210 P1DAT 15 P1OUT7 0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Data 14 P1OUT6 0 H0 R/W – – ✓ ✓ ✓
Register) 13 P1OUT5 0 H0 R/W – – ✓ ✓ ✓
12 P1OUT4 0 H0 R/W – – ✓ ✓ ✓
11 P1OUT3 0 H0 R/W ✓ – ✓ ✓ ✓
10 P1OUT2 0 H0 R/W ✓ – ✓ ✓ ✓
9 P1OUT1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P1OUT0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P1IN7 0 H0 R – – – ✓ ✓ ✓
6 P1IN6 0 H0 R – – ✓ ✓ ✓
5 P1IN5 0 H0 R – – ✓ ✓ ✓
4 P1IN4 0 H0 R – – ✓ ✓ ✓
3 P1IN3 0 H0 R ✓ – ✓ ✓ ✓
2 P1IN2 0 H0 R ✓ – ✓ ✓ ✓
1 P1IN1 0 H0 R ✓ ✓ ✓ ✓ ✓
0 P1IN0 0 H0 R ✓ ✓ ✓ ✓ ✓
0x4212 P1IOEN 15 P1IEN7 0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Enable 14 P1IEN6 0 H0 R/W – – ✓ ✓ ✓
Register) 13 P1IEN5 0 H0 R/W – – ✓ ✓ ✓
12 P1IEN4 0 H0 R/W – – ✓ ✓ ✓
11 P1IEN3 0 H0 R/W ✓ – ✓ ✓ ✓
10 P1IEN2 0 H0 R/W ✓ – ✓ ✓ ✓
9 P1IEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P1IEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P1OEN7 0 H0 R/W – – – ✓ ✓ ✓
6 P1OEN6 0 H0 R/W – – ✓ ✓ ✓
5 P1OEN5 0 H0 R/W – – ✓ ✓ ✓
4 P1OEN4 0 H0 R/W – – ✓ ✓ ✓
3 P1OEN3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1OEN2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1OEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1OEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4214 P1RCTL 15 P1PDPU7 0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Pull-up/down 14 P1PDPU6 0 H0 R/W – – ✓ ✓ ✓
Control Register) 13 P1PDPU5 0 H0 R/W – – ✓ ✓ ✓
12 P1PDPU4 0 H0 R/W – – ✓ ✓ ✓
11 P1PDPU3 0 H0 R/W ✓ – ✓ ✓ ✓
10 P1PDPU2 0 H0 R/W ✓ – ✓ ✓ ✓
9 P1PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P1PDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P1REN7 0 H0 R/W – – – ✓ ✓ ✓
6 P1REN6 0 H0 R/W – – ✓ ✓ ✓
5 P1REN5 0 H0 R/W – – ✓ ✓ ✓
4 P1REN4 0 H0 R/W – – ✓ ✓ ✓
3 P1REN3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1REN2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1REN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4216 P1INTF 15–8 – 0x00 – R – – – – – –
(P1 Port Interrupt 7 P1IF7 0 H0 R/W Cleared – – ✓ ✓ ✓
Flag Register) 6 P1IF6 0 H0 R/W by writ- – – ✓ ✓ ✓
5 P1IF5 0 H0 R/W ing 1. – – ✓ ✓ ✓
4 P1IF4 0 H0 R/W – – ✓ ✓ ✓
3 P1IF3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1IF2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4218 P1INTCTL 15 P1EDGE7 0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Interrupt 14 P1EDGE6 0 H0 R/W – – ✓ ✓ ✓
Control Register) 13 P1EDGE5 0 H0 R/W – – ✓ ✓ ✓
12 P1EDGE4 0 H0 R/W – – ✓ ✓ ✓
11 P1EDGE3 0 H0 R/W ✓ – ✓ ✓ ✓
10 P1EDGE2 0 H0 R/W ✓ – ✓ ✓ ✓
9 P1EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P1EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P1IE7 0 H0 R/W – – – ✓ ✓ ✓
6 P1IE6 0 H0 R/W – – ✓ ✓ ✓
5 P1IE5 0 H0 R/W – – ✓ ✓ ✓
4 P1IE4 0 H0 R/W – – ✓ ✓ ✓
3 P1IE3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1IE2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x421a P1CHATEN 15–8 – 0x00 – R – – – – – –
(P1 Port Chattering 7 P1CHATEN7 0 H0 R/W – – – ✓ ✓ ✓
Filter Enable Register) 6 P1CHATEN6 0 H0 R/W – – ✓ ✓ ✓
5 P1CHATEN5 0 H0 R/W – – ✓ ✓ ✓
4 P1CHATEN4 0 H0 R/W – – ✓ ✓ ✓
3 P1CHATEN3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1CHATEN2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x421c P1MODSEL 15–8 – 0x00 – R – – – – – –
(P1 Port Mode Select 7 P1SEL7 0 H0 R/W – – – ✓ ✓ ✓
Register) 6 P1SEL6 0 H0 R/W – – ✓ ✓ ✓
5 P1SEL5 0 H0 R/W – – ✓ ✓ ✓
4 P1SEL4 0 H0 R/W – – ✓ ✓ ✓
3 P1SEL3 0 H0 R/W ✓ – ✓ ✓ ✓
2 P1SEL2 0 H0 R/W ✓ – ✓ ✓ ✓
1 P1SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P1SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x421e P1FNCSEL 15–14 P17MUX[1:0] 0x0 H0 R/W – – – ✓ ✓ ✓
(P1 Port Function 13–12 P16MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
Select Register) 11–10 P15MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
9–8 P14MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
7–6 P13MUX[1:0] 0x0 H0 R/W ✓ – ✓ ✓ ✓
5–4 P12MUX[1:0] 0x0 H0 R/W ✓ – ✓ ✓ ✓
3–2 P11MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P10MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4220 P2DAT 15 P2OUT7 0 H0 R/W – – – ✓ ✓ –
(P2 Port Data 14 P2OUT6 0 H0 R/W – – ✓ ✓ –
Register) 13 P2OUT5 0 H0 R/W – – ✓ ✓ –
12 P2OUT4 0 H0 R/W – – ✓ ✓ ✓
11 P2OUT3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P2OUT2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P2OUT1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P2OUT0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P2IN7 0 H0 R – – – ✓ ✓ –
6 P2IN6 0 H0 R – – ✓ ✓ –
5 P2IN5 0 H0 R – – ✓ ✓ –
4 P2IN4 0 H0 R – – ✓ ✓ ✓
3 P2IN3 0 H0 R ✓ ✓ ✓ ✓ ✓
2 P2IN2 0 H0 R ✓ ✓ ✓ ✓ ✓
1 P2IN1 0 H0 R ✓ ✓ ✓ ✓ ✓
0 P2IN0 0 H0 R ✓ ✓ ✓ ✓ ✓
0x4222 P2IOEN 15 P2IEN7 0 H0 R/W – – – ✓ ✓ –
(P2 Port Enable 14 P2IEN6 0 H0 R/W – – ✓ ✓ –
Register) 13 P2IEN5 0 H0 R/W – – ✓ ✓ –
12 P2IEN4 0 H0 R/W – – ✓ ✓ ✓
11 P2IEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P2IEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P2IEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P2IEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P2OEN7 0 H0 R/W – – – ✓ ✓ –
6 P2OEN6 0 H0 R/W – – ✓ ✓ –
5 P2OEN5 0 H0 R/W – – ✓ ✓ –
4 P2OEN4 0 H0 R/W – – ✓ ✓ ✓
3 P2OEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2OEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2OEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2OEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4224 P2RCTL 15 P2PDPU7 0 H0 R/W – – – ✓ ✓ –
(P2 Port Pull-up/down 14 P2PDPU6 0 H0 R/W – – ✓ ✓ –
Control Register) 13 P2PDPU5 0 H0 R/W – – ✓ ✓ –
12 P2PDPU4 0 H0 R/W – – ✓ ✓ ✓
11 P2PDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P2PDPU2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P2PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P2PDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P2REN7 0 H0 R/W – – – ✓ ✓ –
6 P2REN6 0 H0 R/W – – ✓ ✓ –
5 P2REN5 0 H0 R/W – – ✓ ✓ –
4 P2REN4 0 H0 R/W – – ✓ ✓ ✓
3 P2REN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2REN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2REN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4226 P2INTF 15–8 – 0x00 – R – – – – – –
(P2 Port Interrupt 7 P2IF7 0 H0 R/W Cleared – – ✓ ✓ –
Flag Register) 6 P2IF6 0 H0 R/W by writ- – – ✓ ✓ –
5 P2IF5 0 H0 R/W ing 1. – – ✓ ✓ –
4 P2IF4 0 H0 R/W – – ✓ ✓ ✓
3 P2IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4228 P2INTCTL 15 P2EDGE7 0 H0 R/W – – – ✓ ✓ –
(P2 Port Interrupt 14 P2EDGE6 0 H0 R/W – – ✓ ✓ –
Control Register) 13 P2EDGE5 0 H0 R/W – – ✓ ✓ –
12 P2EDGE4 0 H0 R/W – – ✓ ✓ ✓
11 P2EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P2EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P2EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P2EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P2IE7 0 H0 R/W – – – ✓ ✓ –
6 P2IE6 0 H0 R/W – – ✓ ✓ –
5 P2IE5 0 H0 R/W – – ✓ ✓ –
4 P2IE4 0 H0 R/W – – ✓ ✓ ✓
3 P2IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x422a P2CHATEN 15–8 – 0x00 – R – – – – – –
(P2 Port Chattering 7 P2CHATEN7 0 H0 R/W – – – ✓ ✓ –
Filter Enable Register) 6 P2CHATEN6 0 H0 R/W – – ✓ ✓ –
5 P2CHATEN5 0 H0 R/W – – ✓ ✓ –
4 P2CHATEN4 0 H0 R/W – – ✓ ✓ ✓
3 P2CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x422c P2MODSEL 15–8 – 0x00 – R – – – – – –
(P2 Port Mode Select 7 P2SEL7 0 H0 R/W – – – ✓ ✓ –
Register) 6 P2SEL6 0 H0 R/W – – ✓ ✓ –
5 P2SEL5 0 H0 R/W – – ✓ ✓ –
4 P2SEL4 0 H0 R/W – – ✓ ✓ ✓
3 P2SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P2SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P2SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P2SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x422e P2FNCSEL 15–14 P27MUX[1:0] 0x0 H0 R/W – – – ✓ ✓ –
(P2 Port Function 13–12 P26MUX[1:0] 0x0 H0 R/W – – ✓ ✓ –
Select Register) 11–10 P25MUX[1:0] 0x0 H0 R/W – – ✓ ✓ –
9–8 P24MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
7–6 P23MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P22MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P21MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P20MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4230 P3DAT 15 P3OUT7 0 H0 R/W – – – ✓ ✓ ✓
(P3 Port Data 14 P3OUT6 0 H0 R/W – ✓ ✓ ✓ ✓
Register) 13 P3OUT5 0 H0 R/W – ✓ ✓ ✓ ✓
12 P3OUT4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P3OUT3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P3OUT2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P3OUT1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P3OUT0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P3IN7 0 H0 R – – – ✓ ✓ ✓
6 P3IN6 0 H0 R – ✓ ✓ ✓ ✓
5 P3IN5 0 H0 R – ✓ ✓ ✓ ✓
4 P3IN4 0 H0 R ✓ ✓ ✓ ✓ ✓
3 P3IN3 0 H0 R ✓ ✓ ✓ ✓ ✓
2 P3IN2 0 H0 R ✓ ✓ ✓ ✓ ✓
1 P3IN1 0 H0 R ✓ ✓ ✓ ✓ ✓
0 P3IN0 0 H0 R ✓ ✓ ✓ ✓ ✓
0x4232 P3IOEN 15 P3IEN7 0 H0 R/W – – – ✓ ✓ ✓
(P3 Port Enable 14 P3IEN6 0 H0 R/W – ✓ ✓ ✓ ✓
Register) 13 P3IEN5 0 H0 R/W – ✓ ✓ ✓ ✓
12 P3IEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P3IEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P3IEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P3IEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P3IEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P3OEN7 0 H0 R/W – – – ✓ ✓ ✓
6 P3OEN6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3OEN5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3OEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3OEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3OEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3OEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3OEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4234 P3RCTL 15 P3PDPU7 0 H0 R/W – – – ✓ ✓ ✓
(P3 Port Pull-up/down 14 P3PDPU6 0 H0 R/W – ✓ ✓ ✓ ✓
Control Register) 13 P3PDPU5 0 H0 R/W – ✓ ✓ ✓ ✓
12 P3PDPU4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P3PDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P3PDPU2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P3PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P3PDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P3REN7 0 H0 R/W – – – ✓ ✓ ✓
6 P3REN6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3REN5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3REN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3REN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3REN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3REN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4236 P3INTF 15–8 – 0x00 – R – – – – – –
(P3 Port Interrupt 7 P3IF7 0 H0 R/W Cleared – – ✓ ✓ ✓
Flag Register) 6 P3IF6 0 H0 R/W by writ- – ✓ ✓ ✓ ✓
5 P3IF5 0 H0 R/W ing 1. – ✓ ✓ ✓ ✓
4 P3IF4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4238 P3INTCTL 15 P3EDGE7 0 H0 R/W – – – ✓ ✓ ✓
(P3 Port Interrupt 14 P3EDGE6 0 H0 R/W – ✓ ✓ ✓ ✓
Control Register) 13 P3EDGE5 0 H0 R/W – ✓ ✓ ✓ ✓
12 P3EDGE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P3EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P3EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P3EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P3EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P3IE7 0 H0 R/W – – – ✓ ✓ ✓
6 P3IE6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3IE5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3IE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x423a P3CHATEN 15–8 – 0x00 – R – – – – – –
(P3 Port Chattering 7 P3CHATEN7 0 H0 R/W – – – ✓ ✓ ✓
Filter Enable Register) 6 P3CHATEN6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3CHATEN5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3CHATEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x423c P3MODSEL 15–8 – 0x00 – R – – – – – –
(P3 Port Mode Select 7 P3SEL7 0 H0 R/W – – – ✓ ✓ ✓
Register) 6 P3SEL6 0 H0 R/W – ✓ ✓ ✓ ✓
5 P3SEL5 0 H0 R/W – ✓ ✓ ✓ ✓
4 P3SEL4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P3SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P3SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P3SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P3SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x423e P3FNCSEL 15–14 P37MUX[1:0] 0x0 H0 R/W – – – ✓ ✓ ✓
(P3 Port Function 13–12 P36MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
Select Register) 11–10 P35MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
9–8 P34MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–6 P33MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P32MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P31MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P30MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4240 P4DAT 15 P4OUT7 0 H0 R/W – – – – ✓ –
(P4 Port Data 14 P4OUT6 0 H0 R/W – – ✓ ✓ ✓
Register) 13 P4OUT5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P4OUT4 0 H0 R/W – – – ✓ –
11 P4OUT3 0 H0 R/W – – – ✓ –
10 P4OUT2 0 H0 R/W – – – ✓ –
9 P4OUT1 0 H0 R/W – – ✓ ✓ ✓
8 P4OUT0 0 H0 R/W – – ✓ ✓ ✓
7 P4IN7 0 H0 R – – – – ✓ –
6 P4IN6 0 H0 R – – ✓ ✓ ✓
5 P4IN5 0 H0 R ✓ ✓ ✓ ✓ ✓
4 P4IN4 0 H0 R – – – ✓ –
3 P4IN3 0 H0 R – – – ✓ –
2 P4IN2 0 H0 R – – – ✓ –
1 P4IN1 0 H0 R – – ✓ ✓ ✓
0 P4IN0 0 H0 R – – ✓ ✓ ✓
0x4242 P4IOEN 15 P4IEN7 0 H0 R/W – – – – ✓ –
(P4 Port Enable 14 P4IEN6 0 H0 R/W – – ✓ ✓ ✓
Register) 13 P4IEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P4IEN4 0 H0 R/W – – – ✓ –
11 P4IEN3 0 H0 R/W – – – ✓ –
10 P4IEN2 0 H0 R/W – – – ✓ –
9 P4IEN1 0 H0 R/W – – ✓ ✓ ✓
8 P4IEN0 0 H0 R/W – – ✓ ✓ ✓
7 P4OEN7 0 H0 R/W – – – – ✓ –
6 P4OEN6 0 H0 R/W – – ✓ ✓ ✓
5 P4OEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4OEN4 0 H0 R/W – – – ✓ –
3 P4OEN3 0 H0 R/W – – – ✓ –
2 P4OEN2 0 H0 R/W – – – ✓ –
1 P4OEN1 0 H0 R/W – – ✓ ✓ ✓
0 P4OEN0 0 H0 R/W – – ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4244 P4RCTL 15 P4PDPU7 0 H0 R/W – – – – ✓ –
(P4 Port Pull-up/down 14 P4PDPU6 0 H0 R/W – – ✓ ✓ ✓
Control Register) 13 P4PDPU5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P4PDPU4 0 H0 R/W – – – ✓ –
11 P4PDPU3 0 H0 R/W – – – ✓ –
10 P4PDPU2 0 H0 R/W – – – ✓ –
9 P4PDPU1 0 H0 R/W – – ✓ ✓ ✓
8 P4PDPU0 0 H0 R/W – – ✓ ✓ ✓
7 P4REN7 0 H0 R/W – – – – ✓ –
6 P4REN6 0 H0 R/W – – ✓ ✓ ✓
5 P4REN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4REN4 0 H0 R/W – – – ✓ –
3 P4REN3 0 H0 R/W – – – ✓ –
2 P4REN2 0 H0 R/W – – – ✓ –
1 P4REN1 0 H0 R/W – – ✓ ✓ ✓
0 P4REN0 0 H0 R/W – – ✓ ✓ ✓
0x4246 P4INTF 15–8 – 0x00 – R – – – – – –
(P4 Port Interrupt 7 P4IF7 0 H0 R/W Cleared – – – ✓ –
Flag Register) 6 P4IF6 0 H0 R/W by writ- – – ✓ ✓ ✓
5 P4IF5 0 H0 R/W ing 1. ✓ ✓ ✓ ✓ ✓
4 P4IF4 0 H0 R/W – – – ✓ –
3 P4IF3 0 H0 R/W – – – ✓ –
2 P4IF2 0 H0 R/W – – – ✓ –
1 P4IF1 0 H0 R/W – – ✓ ✓ ✓
0 P4IF0 0 H0 R/W – – ✓ ✓ ✓
0x4248 P4INTCTL 15 P4EDGE7 0 H0 R/W – – – – ✓ –
(P4 Port Interrupt 14 P4EDGE6 0 H0 R/W – – ✓ ✓ ✓
Control Register) 13 P4EDGE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P4EDGE4 0 H0 R/W – – – ✓ –
11 P4EDGE3 0 H0 R/W – – – ✓ –
10 P4EDGE2 0 H0 R/W – – – ✓ –
9 P4EDGE1 0 H0 R/W – – ✓ ✓ ✓
8 P4EDGE0 0 H0 R/W – – ✓ ✓ ✓
7 P4IE7 0 H0 R/W – – – – ✓ –
6 P4IE6 0 H0 R/W – – ✓ ✓ ✓
5 P4IE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4IE4 0 H0 R/W – – – ✓ –
3 P4IE3 0 H0 R/W – – – ✓ –
2 P4IE2 0 H0 R/W – – – ✓ –
1 P4IE1 0 H0 R/W – – ✓ ✓ ✓
0 P4IE0 0 H0 R/W – – ✓ ✓ ✓
0x424a P4CHATEN 15–8 – 0x00 – R – – – – – –
(P4 Port Chattering 7 P4CHATEN7 0 H0 R/W – – – – ✓ –
Filter Enable Register) 6 P4CHATEN6 0 H0 R/W – – ✓ ✓ ✓
5 P4CHATEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4CHATEN4 0 H0 R/W – – – ✓ –
3 P4CHATEN3 0 H0 R/W – – – ✓ –
2 P4CHATEN2 0 H0 R/W – – – ✓ –
1 P4CHATEN1 0 H0 R/W – – ✓ ✓ ✓
0 P4CHATEN0 0 H0 R/W – – ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x424c P4MODSEL 15–8 – 0x00 – R – – – – – –
(P4 Port Mode Select 7 P4SEL7 0 H0 R/W – – – – ✓ –
Register) 6 P4SEL6 0 H0 R/W – – ✓ ✓ ✓
5 P4SEL5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P4SEL4 0 H0 R/W – – – ✓ –
3 P4SEL3 0 H0 R/W – – – ✓ –
2 P4SEL2 0 H0 R/W – – – ✓ –
1 P4SEL1 0 H0 R/W – – ✓ ✓ ✓
0 P4SEL0 0 H0 R/W – – ✓ ✓ ✓
0x424e P4FNCSEL 15–14 P47MUX[1:0] 0x0 H0 R/W – – – – ✓ –
(P4 Port Function 13–12 P46MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
Select Register) 11–10 P45MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
9–8 P44MUX[1:0] 0x0 H0 R/W – – – ✓ –
7–6 P43MUX[1:0] 0x0 H0 R/W – – – ✓ –
5–4 P42MUX[1:0] 0x0 H0 R/W – – – ✓ –
3–2 P41MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
1–0 P40MUX[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
0x4250 P5DAT 15–14 – 0x0 – R – – – – – –
(P5 Port Data 13 P5OUT5 0 H0 R/W – – – ✓ ✓ –
Register) 12 P5OUT4 0 H0 R/W – – ✓ ✓ –
11 P5OUT3 0 H0 R/W – – – ✓ –
10 P5OUT2 0 H0 R/W – – – ✓ –
9 P5OUT1 0 H0 R/W – – – ✓ –
8 P5OUT0 0 H0 R/W – – – ✓ –
7–6 – 0x0 – R – – – – – –
5 P5IN5 0 H0 R – – – ✓ ✓ –
4 P5IN4 0 H0 R – – ✓ ✓ –
3 P5IN3 0 H0 R – – – ✓ –
2 P5IN2 0 H0 R – – – ✓ –
1 P5IN1 0 H0 R – – – ✓ –
0 P5IN0 0 H0 R – – – ✓ –
0x4252 P5IOEN 15–14 – 0x0 – R – – – – – –
(P5 Port Enable 13 P5IEN5 0 H0 R/W – – – ✓ ✓ –
Register) 12 P5IEN4 0 H0 R/W – – ✓ ✓ –
11 P5IEN3 0 H0 R/W – – – ✓ –
10 P5IEN2 0 H0 R/W – – – ✓ –
9 P5IEN1 0 H0 R/W – – – ✓ –
8 P5IEN0 0 H0 R/W – – – ✓ –
7–6 – 0x0 – R – – – – – –
5 P5OEN5 0 H0 R/W – – – ✓ ✓ –
4 P5OEN4 0 H0 R/W – – ✓ ✓ –
3 P5OEN3 0 H0 R/W – – – ✓ –
2 P5OEN2 0 H0 R/W – – – ✓ –
1 P5OEN1 0 H0 R/W – – – ✓ –
0 P5OEN0 0 H0 R/W – – – ✓ –
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4254 P5RCTL 15–14 – 0x0 – R – – – – – –
(P5 Port Pull-up/down 13 P5PDPU5 0 H0 R/W – – – ✓ ✓ –
Control Register) 12 P5PDPU4 0 H0 R/W – – ✓ ✓ –
11 P5PDPU3 0 H0 R/W – – – ✓ –
10 P5PDPU2 0 H0 R/W – – – ✓ –
9 P5PDPU1 0 H0 R/W – – – ✓ –
8 P5PDPU0 0 H0 R/W – – – ✓ –
7–6 – 0x0 – R – – – – – –
5 P5REN5 0 H0 R/W – – – ✓ ✓ –
4 P5REN4 0 H0 R/W – – ✓ ✓ –
3 P5REN3 0 H0 R/W – – – ✓ –
2 P5REN2 0 H0 R/W – – – ✓ –
1 P5REN1 0 H0 R/W – – – ✓ –
0 P5REN0 0 H0 R/W – – – ✓ –
0x4256 P5INTF 15–8 – 0x00 – R – – – – – –
(P5 Port Interrupt 7–6 – 0x0 – R – – – – – –
Flag Register) 5 P5IF5 0 H0 R/W Cleared – – ✓ ✓ –
4 P5IF4 0 H0 R/W by writ- – – ✓ ✓ –
3 P5IF3 0 H0 R/W ing 1. – – – ✓ –
2 P5IF2 0 H0 R/W – – – ✓ –
1 P5IF1 0 H0 R/W – – – ✓ –
0 P5IF0 0 H0 R/W – – – ✓ –
0x4258 P5INTCTL 15–14 – 0x0 – R – – – – – –
(P5 Port Interrupt 13 P5EDGE5 0 H0 R/W – – – ✓ ✓ –
Control Register) 12 P5EDGE4 0 H0 R/W – – ✓ ✓ –
11 P5EDGE3 0 H0 R/W – – – ✓ –
10 P5EDGE2 0 H0 R/W – – – ✓ –
9 P5EDGE1 0 H0 R/W – – – ✓ –
8 P5EDGE0 0 H0 R/W – – – ✓ –
7–6 – 0x0 – R – – – – – –
5 P5IE5 0 H0 R/W – – – ✓ ✓ –
4 P5IE4 0 H0 R/W – – ✓ ✓ –
3 P5IE3 0 H0 R/W – – – ✓ –
2 P5IE2 0 H0 R/W – – – ✓ –
1 P5IE1 0 H0 R/W – – – ✓ –
0 P5IE0 0 H0 R/W – – – ✓ –
0x425a P5CHATEN 15–8 – 0x00 – R – – – – – –
(P5 Port Chattering 7–6 – 0x0 – R – – – – – –
Filter Enable Register) 5 P5CHATEN5 0 H0 R/W – – – ✓ ✓ –
4 P5CHATEN4 0 H0 R/W – – ✓ ✓ –
3 P5CHATEN3 0 H0 R/W – – – ✓ –
2 P5CHATEN2 0 H0 R/W – – – ✓ –
1 P5CHATEN1 0 H0 R/W – – – ✓ –
0 P5CHATEN0 0 H0 R/W – – – ✓ –
0x425c P5MODSEL 15–8 – 0x00 – R – – – – – –
(P5 Port Mode Select 7–6 – 0x0 – R – – – – – –
Register) 5 P5SEL5 0 H0 R/W – – – ✓ ✓ –
4 P5SEL4 0 H0 R/W – – ✓ ✓ –
3 P5SEL3 0 H0 R/W – – – ✓ –
2 P5SEL2 0 H0 R/W – – – ✓ –
1 P5SEL1 0 H0 R/W – – – ✓ –
0 P5SEL0 0 H0 R/W – – – ✓ –
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x425e P5FNCSEL 15–12 – 0x00 – R – – – – – –
(P5 Port Function 11–10 P55MUX[1:0] 0x0 H0 R/W – – – ✓ ✓ –
Select Register) 9–8 P54MUX[1:0] 0x0 H0 R/W – – ✓ ✓ –
7–6 P53MUX[1:0] 0x0 H0 R/W – – – ✓ –
5–4 P52MUX[1:0] 0x0 H0 R/W – – – ✓ –
3–2 P51MUX[1:0] 0x0 H0 R/W – – – ✓ –
1–0 P50MUX[1:0] 0x0 H0 R/W – – – ✓ –
0x4260 P6DAT 15 P6OUT7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P6 Port Data 14 P6OUT6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register) 13 P6OUT5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P6OUT4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P6OUT3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P6OUT2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P6OUT1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P6OUT0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P6IN7 0 H0 R – ✓ ✓ ✓ ✓ ✓
6 P6IN6 0 H0 R ✓ ✓ ✓ ✓ ✓
5 P6IN5 0 H0 R ✓ ✓ ✓ ✓ ✓
4 P6IN4 0 H0 R ✓ ✓ ✓ ✓ ✓
3 P6IN3 0 H0 R ✓ ✓ ✓ ✓ ✓
2 P6IN2 0 H0 R ✓ ✓ ✓ ✓ ✓
1 P6IN1 0 H0 R ✓ ✓ ✓ ✓ ✓
0 P6IN0 0 H0 R ✓ ✓ ✓ ✓ ✓
0x4262 P6IOEN 15 P6IEN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P6 Port Enable 14 P6IEN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Register) 13 P6IEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P6IEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P6IEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P6IEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P6IEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P6IEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P6OEN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
6 P6OEN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P6OEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6OEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6OEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6OEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6OEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6OEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4264 P6RCTL 15 P6PDPU7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P6 Port Pull-up/down 14 P6PDPU6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Control Register) 13 P6PDPU5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P6PDPU4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P6PDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P6PDPU2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P6PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P6PDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P6REN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
6 P6REN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P6REN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6REN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6REN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6REN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6REN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4266 P6INTF 15–8 – 0x00 – R – – – – – –
(P6 Port Interrupt 7 P6IF7 0 H0 R/W Cleared ✓ ✓ ✓ ✓ ✓
Flag Register) 6 P6IF6 0 H0 R/W by writ- ✓ ✓ ✓ ✓ ✓
5 P6IF5 0 H0 R/W ing 1. ✓ ✓ ✓ ✓ ✓
4 P6IF4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6IF0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4268 P6INTCTL 15 P6EDGE7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P6 Port Interrupt 14 P6EDGE6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
Control Register) 13 P6EDGE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
12 P6EDGE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
11 P6EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P6EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P6EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P6EDGE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7 P6IE7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
6 P6IE6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P6IE5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6IE4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6IE0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x426a P6CHATEN 15–8 – 0x00 – R – – – – – –
(P6 Port Chattering 7 P6CHATEN7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Filter Enable Register) 6 P6CHATEN6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P6CHATEN5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6CHATEN4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6CHATEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x426c P6MODSEL 15–8 – 0x00 – R – – – – – –
(P6 Port Mode Select 7 P6SEL7 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Register) 6 P6SEL6 0 H0 R/W ✓ ✓ ✓ ✓ ✓
5 P6SEL5 0 H0 R/W ✓ ✓ ✓ ✓ ✓
4 P6SEL4 0 H0 R/W ✓ ✓ ✓ ✓ ✓
3 P6SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P6SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P6SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P6SEL0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x426e P6FNCSEL 15–14 P67MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P6 Port Function 13–12 P66MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Select Register) 11–10 P65MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
9–8 P64MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–6 P63MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P62MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P61MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 P60MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4270 P7DAT 15 – 0 – R – – – – – –
(P7 Port Data 14 P7OUT6 0 H0 R/W – – – – ✓ ✓
Register) 13 P7OUT5 0 H0 R/W – – – ✓ ✓
12 P7OUT4 0 H0 R/W – – – ✓ ✓
11 P7OUT3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P7OUT2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P7OUT1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P7OUT0 0 H0 R/W – – – ✓ –
7 – 0 – R – – – – – –
6 P7IN6 0 H0 R – – – – ✓ ✓
5 P7IN5 0 H0 R – – – ✓ ✓
4 P7IN4 0 H0 R – – – ✓ ✓
3 P7IN3 0 H0 R ✓ ✓ ✓ ✓ ✓
2 P7IN2 0 H0 R ✓ ✓ ✓ ✓ ✓
1 P7IN1 0 H0 R ✓ ✓ ✓ ✓ ✓
0 P7IN0 0 H0 R – – – ✓ –
0x4272 P7IOEN 15 – 0 – R – – – – – –
(P7 Port Enable 14 P7IEN6 0 H0 R/W – – – – ✓ ✓
Register) 13 P7IEN5 0 H0 R/W – – – ✓ ✓
12 P7IEN4 0 H0 R/W – – – ✓ ✓
11 P7IEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P7IEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P7IEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P7IEN0 0 H0 R/W – – – ✓ –
7 – 0 – R – – – – – –
6 P7OEN6 0 H0 R/W – – – – ✓ ✓
5 P7OEN5 0 H0 R/W – – – ✓ ✓
4 P7OEN4 0 H0 R/W – – – ✓ ✓
3 P7OEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7OEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7OEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7OEN0 0 H0 R/W – – – ✓ –
0x4274 P7RCTL 15 – 0 – R – – – – – –
(P7 Port Pull-up/down 14 P7PDPU6 0 H0 R/W – – – – ✓ ✓
Control Register) 13 P7PDPU5 0 H0 R/W – – – ✓ ✓
12 P7PDPU4 0 H0 R/W – – – ✓ ✓
11 P7PDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P7PDPU2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P7PDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P7PDPU0 0 H0 R/W – – – ✓ –
7 – 0 – R – – – – – –
6 P7REN6 0 H0 R/W – – – – ✓ ✓
5 P7REN5 0 H0 R/W – – – ✓ ✓
4 P7REN4 0 H0 R/W – – – ✓ ✓
3 P7REN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7REN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7REN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7REN0 0 H0 R/W – – – ✓ –
0x4276 P7INTF 15–8 – 0x00 – R – – – – – –
(P7 Port Interrupt 7 – 0 – R – – – – – –
Flag Register) 6 P7IF6 0 H0 R/W Cleared – – – ✓ ✓
5 P7IF5 0 H0 R/W by writ- – – – ✓ ✓
4 P7IF4 0 H0 R/W ing 1. – – – ✓ ✓
3 P7IF3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7IF2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7IF1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7IF0 0 H0 R/W – – – ✓ –
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4278 P7INTCTL 15 – 0 – R – – – – – –
(P7 Port Interrupt 14 P7EDGE6 0 H0 R/W – – – – ✓ ✓
Control Register) 13 P7EDGE5 0 H0 R/W – – – ✓ ✓
12 P7EDGE4 0 H0 R/W – – – ✓ ✓
11 P7EDGE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 P7EDGE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 P7EDGE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 P7EDGE0 0 H0 R/W – – – ✓ –
7 – 0 – R – – – – – –
6 P7IE6 0 H0 R/W – – – – ✓ ✓
5 P7IE5 0 H0 R/W – – – ✓ ✓
4 P7IE4 0 H0 R/W – – – ✓ ✓
3 P7IE3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7IE2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7IE1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7IE0 0 H0 R/W – – – ✓ –
0x427a P7CHATEN 15–8 – 0x00 – R – – – – – –
(P7 Port Chattering 7 – 0 – R – – – – – –
Filter Enable Register) 6 P7CHATEN6 0 H0 R/W – – – – ✓ ✓
5 P7CHATEN5 0 H0 R/W – – – ✓ ✓
4 P7CHATEN4 0 H0 R/W – – – ✓ ✓
3 P7CHATEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7CHATEN2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7CHATEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 P7CHATEN0 0 H0 R/W – – – ✓ –
0x427c P7MODSEL 15–8 – 0x00 – R – – – – – –
(P7 Port Mode Select 7 – 0 – R – – – – – –
Register) 6 P7SEL6 0 H0 R/W – – – – ✓ ✓
5 P7SEL5 0 H0 R/W – – – ✓ ✓
4 P7SEL4 0 H0 R/W – – – ✓ ✓
3 P7SEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 P7SEL2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
1 P7SEL1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 – 0 – R – – – – – –
0x427e P7FNCSEL 15–14 – 0x0 – R – – – – – –
(P7 Port Function 13–12 P76MUX[1:0] 0x0 H0 R/W – – – – ✓ ✓
Select Register) 11–10 P75MUX[1:0] 0x0 H0 R/W – – – ✓ ✓
9–8 P74MUX[1:0] 0x0 H0 R/W – – – ✓ ✓
7–6 P73MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 P72MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 P71MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 – 0x0 – R – – – – – –
0x42d0 PDDAT 15–13 – 0x0 – R – – – – – –
(Pd Port Data 12 PDOUT4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Register) 11 PDOUT3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 PDOUT2 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 PDOUT1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 PDOUT0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–5 – 0 – R – – – – – –
4 PDIN4 X H0 R – ✓ ✓ ✓ ✓ ✓
3 PDIN3 X H0 R ✓ ✓ ✓ ✓ ✓
2 – 0 – R – – – – –
1 PDIN1 X H0 R ✓ ✓ ✓ ✓ ✓
0 PDIN0 X H0 R ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x42d2 PDIOEN 15–13 – 0x0 – R – – – – – –
(Pd Port Enable 12 PDIEN4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Register) 11 PDIEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 (reserved) 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 PDIEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 PDIEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–5 – 0 – R – – – – – –
4 PDOEN4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
3 PDOEN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 PDOEN2 0 H0 R/W ✓ ✓ ✓ – ✓
1 PDOEN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 PDOEN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x42d4 PDRCTL 15–13 – 0x0 – R – – – – – –
(Pd Port Pull-up/down 12 PDPDPU4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Control Register) 11 PDPDPU3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
10 (reserved) 0 H0 R/W ✓ ✓ ✓ ✓ ✓
9 PDPDPU1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
8 PDPDPU0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
7–5 – 0 – R – – – – – –
4 PDREN4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
3 PDREN3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 (reserved) 0 H0 R/W ✓ ✓ ✓ – ✓
1 PDREN1 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0 PDREN0 0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x42dc PDMODSEL 15–8 – 0x00 – R – – – – – –
(Pd Port Mode Select 7–5 – 0 – R – – – – – –
Register) 4 PDSEL4 0 H0 R/W – ✓ ✓ ✓ ✓ ✓
3 PDSEL3 0 H0 R/W ✓ ✓ ✓ ✓ ✓
2 PDSEL2 1 H0 R/W ✓ ✓ ✓ ✓ ✓
1 PDSEL1 1 H0 R/W ✓ ✓ ✓ ✓ ✓
0 PDSEL0 1 H0 R/W ✓ ✓ ✓ ✓ ✓
0x42de PDFNCSEL 15–10 – 0x00 – R – – – – – –
(Pd Port Function 9–8 PD4MUX[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
Select Register) 7–6 PD3MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
5–4 PD2MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
3–2 PD1MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
1–0 PD0MUX[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x42e0 PCLK 15–9 – 0x00 – R – – – – – –
(P Port Clock Control 8 DBRUN 0 H0 R/WP – ✓ ✓ ✓ ✓ ✓
Register) 7–4 CLKDIV[3:0] 0x0 H0 R/WP ✓ ✓ ✓ ✓ ✓
3–2 KRSTCFG[1:0] 0x0 H0 R/WP ✓ ✓ ✓ ✓ ✓
1–0 CLKSRC[1:0] 0x0 H0 R/WP ✓ ✓ ✓ ✓ ✓
0x42e2 PINTFGRP 15–8 – 0x00 – R – – – – – –
(P Port Interrupt Flag 7 P7INT 0 H0 R – ✓ ✓ ✓ ✓ ✓
Group Register) 6 P6INT 0 H0 R ✓ ✓ ✓ ✓ ✓
5 P5INT 0 H0 R – – ✓ ✓ –
4 P4INT 0 H0 R ✓ ✓ ✓ ✓ ✓
3 P3INT 0 H0 R ✓ ✓ ✓ ✓ ✓
2 P2INT 0 H0 R ✓ ✓ ✓ ✓ ✓
1 P1INT 0 H0 R ✓ ✓ ✓ ✓ ✓
0 P0INT 0 H0 R ✓ ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks M30 M31 M32 M33 M34
0x4312 P2UPMUX1 15–13 P23PPFNC[2:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P22–23 Universal 12–11 P23PERICH[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Port Multiplexer 10–8 P23PERISEL[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Setting Register) 7–5 P22PPFNC[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
4–3 P22PERICH[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
2–0 P22PERISEL[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x4314 P2UPMUX2 15–13 P25PPFNC[2:0] 0x0 H0 R/W – – – ✓ ✓ –
(P24–25 Universal 12–11 P25PERICH[1:0] 0x0 H0 R/W – – ✓ ✓ –
Port Multiplexer 10–8 P25PERISEL[2:0] 0x0 H0 R/W – – ✓ ✓ –
Setting Register) 7–5 P24PPFNC[2:0] 0x0 H0 R/W – – ✓ ✓ ✓
4–3 P24PERICH[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
2–0 P24PERISEL[2:0] 0x0 H0 R/W – – ✓ ✓ ✓
0x4316 P2UPMUX3 15–13 P27PPFNC[2:0] 0x0 H0 R/W – – – ✓ ✓ –
(P26–27 Universal 12–11 P27PERICH[1:0] 0x0 H0 R/W – – ✓ ✓ –
Port Multiplexer 10–8 P27PERISEL[2:0] 0x0 H0 R/W – – ✓ ✓ –
Setting Register) 7–5 P26PPFNC[2:0] 0x0 H0 R/W – – ✓ ✓ –
4–3 P26PERICH[1:0] 0x0 H0 R/W – – ✓ ✓ –
2–0 P26PERISEL[2:0] 0x0 H0 R/W – – ✓ ✓ –
0x4318 P3UPMUX0 15–13 P31PPFNC[2:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P30–31 Universal 12–11 P31PERICH[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Port Multiplexer 10–8 P31PERISEL[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Setting Register) 7–5 P30PPFNC[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
4–3 P30PERICH[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
2–0 P30PERISEL[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x431a P3UPMUX1 15–13 P33PPFNC[2:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓ ✓
(P32–33 Universal 12–11 P33PERICH[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Port Multiplexer 10–8 P33PERISEL[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
Setting Register) 7–5 P32PPFNC[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
4–3 P32PERICH[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
2–0 P32PERISEL[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x431c P3UPMUX2 15–13 P35PPFNC[2:0] 0x0 H0 R/W – – ✓ ✓ ✓ ✓
(P34–35 Universal 12–11 P35PERICH[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
Port Multiplexer 10–8 P35PERISEL[2:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
Setting Register) 7–5 P34PPFNC[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
4–3 P34PERICH[1:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
2–0 P34PERISEL[2:0] 0x0 H0 R/W ✓ ✓ ✓ ✓ ✓
0x431e P3UPMUX3 15–13 P37PPFNC[2:0] 0x0 H0 R/W – – – ✓ ✓ ✓
(P36–37 Universal 12–11 P37PERICH[1:0] 0x0 H0 R/W – – ✓ ✓ ✓
Port Multiplexer 10–8 P37PERISEL[2:0] 0x0 H0 R/W – – ✓ ✓ ✓
Setting Register) 7–5 P36PPFNC[2:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
4–3 P36PERICH[1:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
2–0 P36PERISEL[2:0] 0x0 H0 R/W – ✓ ✓ ✓ ✓
Address Register name Bit Bit name Initial Reset R/W Remarks
0x4382 UA0MOD 15–13 – 0x0 – R –
(UART3 Ch.0 Mode 12 PECAR 0 H0 R/W
Register) 11 CAREN 0 H0 R/W
10 BRDIV 0 H0 R/W
9 INVRX 0 H0 R/W
8 INVTX 0 H0 R/W
7 – 0 – R
6 PUEN 0 H0 R/W
5 OUTMD 0 H0 R/W
4 IRMD 0 H0 R/W
3 CHLN 0 H0 R/W
2 PREN 0 H0 R/W
1 PRMD 0 H0 R/W
0 STPB 0 H0 R/W
0x4384 UA0BR 15–12 – 0x0 – R –
(UART3 Ch.0 Baud- 11–8 FMD[3:0] 0x0 H0 R/W
Rate Register) 7–0 BRT[7:0] 0x00 H0 R/W
0x4386 UA0CTL 15–8 – 0x00 – R –
(UART3 Ch.0 Control 7–2 – 0x00 – R
Register) 1 SFTRST 0 H0 R/W
0 MODEN 0 H0 R/W
0x4388 UA0TXD 15–8 – 0x00 – R –
(UART3 Ch.0 Trans-
7–0 TXD[7:0] 0x00 H0 R/W
mit Data Register)
0x438a UA0RXD 15–8 – 0x00 – R –
(UART3 Ch.0 Receive
7–0 RXD[7:0] 0x00 H0 R
Data Register)
0x438c UA0INTF 15–10 – 0x00 – R –
(UART3 Ch.0 Status 9 RBSY 0 H0/S0 R
and Interrupt Flag 8 TBSY 0 H0/S0 R
Register) 7 – 0 – R
6 TENDIF 0 H0/S0 R/W Cleared by writing 1.
5 FEIF 0 H0/S0 R/W Cleared by writing 1 or read-
4 PEIF 0 H0/S0 R/W ing the UA0RXD register.
3 OEIF 0 H0/S0 R/W Cleared by writing 1.
2 RB2FIF 0 H0/S0 R Cleared by reading the
1 RB1FIF 0 H0/S0 R UA0RXD register.
0 TBEIF 1 H0/S0 R Cleared by writing to the
UA0TXD register.
0x438e UA0INTE 15–8 – 0x00 – R –
(UART3 Ch.0 Inter- 7 – 0 – R
rupt Enable Register) 6 TENDIE 0 H0 R/W
5 FEIE 0 H0 R/W
4 PEIE 0 H0 R/W
3 OEIE 0 H0 R/W
2 RB2FIE 0 H0 R/W
1 RB1FIE 0 H0 R/W
0 TBEIE 0 H0 R/W
0x4390 UA0CAWF 15–8 – 0x00 – R –
(UART3 Ch.0 Carrier
7–0 CRPER[7:0] 0x00 H0 R/W
Waveform Register)
Address Register name Bit Bit name Initial Reset R/W Remarks
0x43b8 SPI0INTF 15–8 – 0x00 – R –
(SPIA Ch.0 Interrupt 7 BSY 0 H0 R
Flag Register) 6–4 – 0x0 – R
3 OEIF 0 H0/S0 R/W Cleared by writing 1.
2 TENDIF 0 H0/S0 R/W
1 RBFIF 0 H0/S0 R Cleared by reading the
SPI0RXD register.
0 TBEIF 1 H0/S0 R Cleared by writing to the
SPI0TXD register.
0x43ba SPI0INTE 15–8 – 0x00 – R –
(SPIA Ch.0 Interrupt 7–4 – 0x0 – R
Enable Register) 3 OEIE 0 H0 R/W
2 TENDIE 0 H0 R/W
1 RBFIE 0 H0 R/W
0 TBEIE 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x43d0 I2C0INTF 15–13 – 0x0 – R –
(I2C Ch.0 Status 12 SDALOW 0 H0 R
and Interrupt Flag 11 SCLLOW 0 H0 R
Register) 10 BSY 0 H0/S0 R
9 TR 0 H0 R
8 – 0 – R
7 BYTEENDIF 0 H0/S0 R/W Cleared by writing 1.
6 GCIF 0 H0/S0 R/W
5 NACKIF 0 H0/S0 R/W
4 STOPIF 0 H0/S0 R/W
3 STARTIF 0 H0/S0 R/W
2 ERRIF 0 H0/S0 R/W
1 RBFIF 0 H0/S0 R Cleared by reading the
I2C0RXD register.
0 TBEIF 0 H0/S0 R Cleared by writing to the
I2C0TXD register.
0x43d2 I2C0INTE 15–8 – 0x00 – R –
(I2C Ch.0 Interrupt 7 BYTEENDIE 0 H0 R/W
Enable Register) 6 GCIE 0 H0 R/W
5 NACKIE 0 H0 R/W
4 STOPIE 0 H0 R/W
3 STARTIE 0 H0 R/W
2 ERRIE 0 H0 R/W
1 RBFIE 0 H0 R/W
0 TBEIE 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x500a T16B0INTF 15–8 – 0x00 – R –
(T16B Ch.0 Interrupt 7–6 – 0x0 – R
Flag Register) 5 CAPOW1IF 0 H0 R/W Cleared by writing 1.
4 CMPCAP1IF 0 H0 R/W
3 CAPOW0IF 0 H0 R/W
2 CMPCAP0IF 0 H0 R/W
1 CNTMAXIF 0 H0 R/W
0 CNTZEROIF 0 H0 R/W
0x500c T16B0INTE 15–8 – 0x00 – R –
(T16B Ch.0 Interrupt 7–6 – 0x0 – R
Enable Register) 5 CAPOW1IE 0 H0 R/W
4 CMPCAP1IE 0 H0 R/W
3 CAPOW0IE 0 H0 R/W
2 CMPCAP0IE 0 H0 R/W
1 CNTMAXIE 0 H0 R/W
0 CNTZEROIE 0 H0 R/W
0x5010 T16B0CCCTL0 15 SCS 0 H0 R/W –
(T16B Ch.0 Compare/ 14–12 CBUFMD[2:0] 0x0 H0 R/W
Capture 0 Control 11–10 CAPIS[1:0] 0x0 H0 R/W
Register) 9–8 CAPTRG[1:0] 0x0 H0 R/W
7 – 0 – R
6 TOUTMT 0 H0 R/W
5 TOUTO 0 H0 R/W
4–2 TOUTMD[2:0] 0x0 H0 R/W
1 TOUTINV 0 H0 R/W
0 CCMD 0 H0 R/W
0x5012 T16B0CCR0 15–0 CC[15:0] 0x0000 H0 R/W –
(T16B Ch.0 Compare/
Capture 0 Data
Register)
0x5018 T16B0CCCTL1 15 SCS 0 H0 R/W –
(T16B Ch.0 Compare/ 14–12 CBUFMD[2:0] 0x0 H0 R/W
Capture 1 Control 11–10 CAPIS[1:0] 0x0 H0 R/W
Register) 9–8 CAPTRG[1:0] 0x0 H0 R/W
7 – 0 – R
6 TOUTMT 0 H0 R/W
5 TOUTO 0 H0 R/W
4–2 TOUTMD[2:0] 0x0 H0 R/W
1 TOUTINV 0 H0 R/W
0 CCMD 0 H0 R/W
0x501a T16B0CCR1 15–0 CC[15:0] 0x0000 H0 R/W –
(T16B Ch.0 Compare/
Capture 1 Data
Register)
Address Register name Bit Bit name Initial Reset R/W Remarks
0x5042 T16B1CTL 15–9 – 0x00 – R –
(T16B Ch.1 Counter 8 MAXBSY 0 H0 R
Control Register) 7–6 – 0x0 – R
5–4 CNTMD[1:0] 0x0 H0 R/W
3 ONEST 0 H0 R/W
2 RUN 0 H0 R/W
1 PRESET 0 H0 R/W
0 MODEN 0 H0 R/W
0x5044 T16B1MC 15–0 MC[15:0] 0xffff H0 R/W –
(T16B Ch.1 Max
Counter Data Register)
0x5046 T16B1TC 15–0 TC[15:0] 0x0000 H0 R –
(T16B Ch.1 Timer
Counter Data Register)
0x5048 T16B1CS 15–8 – 0x00 – R –
(T16B Ch.1 Counter 7–4 – 0x0 – R
Status Register) 3 CAPI1 0 H0 R
2 CAPI0 0 H0 R
1 UP_DOWN 1 H0 R
0 BSY 0 H0 R
0x504a T16B1INTF 15–8 – 0x00 – R –
(T16B Ch.1 Interrupt 7–6 – 0x0 – R
Flag Register) 5 CAPOW1IF 0 H0 R/W Cleared by writing 1.
4 CMPCAP1IF 0 H0 R/W
3 CAPOW0IF 0 H0 R/W
2 CMPCAP0IF 0 H0 R/W
1 CNTMAXIF 0 H0 R/W
0 CNTZEROIF 0 H0 R/W
0x504c T16B1INTE 15–8 – 0x00 – R –
(T16B Ch.1 Interrupt 7–6 – 0x0 – R
Enable Register) 5 CAPOW1IE 0 H0 R/W
4 CMPCAP1IE 0 H0 R/W
3 CAPOW0IE 0 H0 R/W
2 CMPCAP0IE 0 H0 R/W
1 CNTMAXIE 0 H0 R/W
0 CNTZEROIE 0 H0 R/W
0x5050 T16B1CCCTL0 15 SCS 0 H0 R/W –
(T16B Ch.1 Compare/ 14–12 CBUFMD[2:0] 0x0 H0 R/W
Capture 0 Control 11–10 CAPIS[1:0] 0x0 H0 R/W
Register) 9–8 CAPTRG[1:0] 0x0 H0 R/W
7 – 0 – R
6 TOUTMT 0 H0 R/W
5 TOUTO 0 H0 R/W
4–2 TOUTMD[2:0] 0x0 H0 R/W
1 TOUTINV 0 H0 R/W
0 CCMD 0 H0 R/W
0x5052 T16B1CCR0 15–0 CC[15:0] 0x0000 H0 R/W –
(T16B Ch.1 Compare/
Capture 0 Data
Register)
Address Register name Bit Bit name Initial Reset R/W Remarks
0x5058 T16B1CCCTL1 15 SCS 0 H0 R/W –
(T16B Ch.1 Compare/ 14–12 CBUFMD[2:0] 0x0 H0 R/W
Capture 1 Control 11–10 CAPIS[1:0] 0x0 H0 R/W
Register) 9–8 CAPTRG[1:0] 0x0 H0 R/W
7 – 0 – R
6 TOUTMT 0 H0 R/W
5 TOUTO 0 H0 R/W
4–2 TOUTMD[2:0] 0x0 H0 R/W
1 TOUTINV 0 H0 R/W
0 CCMD 0 H0 R/W
0x505a T16B1CCR1 15–0 CC[15:0] 0x0000 H0 R/W –
(T16B Ch.1 Compare/
Capture 1 Data
Register)
Address Register name Bit Bit name Initial Reset R/W Remarks
0x508c T16B2INTE 15–8 – 0x00 – R –
(T16B Ch.2 Interrupt 7–6 – 0x0 – R
Enable Register) 5 CAPOW1IE 0 H0 R/W
4 CMPCAP1IE 0 H0 R/W
3 CAPOW0IE 0 H0 R/W
2 CMPCAP0IE 0 H0 R/W
1 CNTMAXIE 0 H0 R/W
0 CNTZEROIE 0 H0 R/W
0x5090 T16B2CCCTL0 15 SCS 0 H0 R/W –
(T16B Ch.2 Compare/ 14–12 CBUFMD[2:0] 0x0 H0 R/W
Capture 0 Control 11–10 CAPIS[1:0] 0x0 H0 R/W
Register) 9–8 CAPTRG[1:0] 0x0 H0 R/W
7 – 0 – R
6 TOUTMT 0 H0 R/W
5 TOUTO 0 H0 R/W
4–2 TOUTMD[2:0] 0x0 H0 R/W
1 TOUTINV 0 H0 R/W
0 CCMD 0 H0 R/W
0x5092 T16B2CCR0 15–0 CC[15:0] 0x0000 H0 R/W –
(T16B Ch.2 Compare/
Capture 0 Data
Register)
0x5098 T16B2CCCTL1 15 SCS 0 H0 R/W –
(T16B Ch.2 Compare/ 14–12 CBUFMD[2:0] 0x0 H0 R/W
Capture 1 Control 11–10 CAPIS[1:0] 0x0 H0 R/W
Register) 9–8 CAPTRG[1:0] 0x0 H0 R/W
7 – 0 – R
6 TOUTMT 0 H0 R/W
5 TOUTO 0 H0 R/W
4–2 TOUTMD[2:0] 0x0 H0 R/W
1 TOUTINV 0 H0 R/W
0 CCMD 0 H0 R/W
0x509a T16B2CCR1 15–0 CC[15:0] 0x0000 H0 R/W –
(T16B Ch.2 Compare/
Capture 1 Data
Register)
Address Register name Bit Bit name Initial Reset R/W Remarks
0x5202 UA1MOD 15–13 – 0x0 – R –
(UART3 Ch.1 Mode 12 PECAR 0 H0 R/W
Register) 11 CAREN 0 H0 R/W
10 BRDIV 0 H0 R/W
9 INVRX 0 H0 R/W
8 INVTX 0 H0 R/W
7 – 0 – R
6 PUEN 0 H0 R/W
5 OUTMD 0 H0 R/W
4 IRMD 0 H0 R/W
3 CHLN 0 H0 R/W
2 PREN 0 H0 R/W
1 PRMD 0 H0 R/W
0 STPB 0 H0 R/W
0x5204 UA1BR 15–12 – 0x0 – R –
(UART3 Ch.1 Baud- 11–8 FMD[3:0] 0x0 H0 R/W
Rate Register) 7–0 BRT[7:0] 0x00 H0 R/W
0x5206 UA1CTL 15–8 – 0x00 – R –
(UART3 Ch.1 Control 7–2 – 0x00 – R
Register) 1 SFTRST 0 H0 R/W
0 MODEN 0 H0 R/W
0x5208 UA1TXD 15–8 – 0x00 – R –
(UART3 Ch.1 Trans-
7–0 TXD[7:0] 0x00 H0 R/W
mit Data Register)
0x520a UA1RXD 15–8 – 0x00 – R –
(UART3 Ch.1 Receive
7–0 RXD[7:0] 0x00 H0 R
Data Register)
0x520c UA1INTF 15–10 – 0x00 – R –
(UART3 Ch.1 Status 9 RBSY 0 H0/S0 R
and Interrupt Flag 8 TBSY 0 H0/S0 R
Register) 7 – 0 – R
6 TENDIF 0 H0/S0 R/W Cleared by writing 1.
5 FEIF 0 H0/S0 R/W Cleared by writing 1 or read-
4 PEIF 0 H0/S0 R/W ing the UA1RXD register.
3 OEIF 0 H0/S0 R/W Cleared by writing 1.
2 RB2FIF 0 H0/S0 R Cleared by reading the
1 RB1FIF 0 H0/S0 R UA1RXD register.
0 TBEIF 1 H0/S0 R Cleared by writing to the
UA1TXD register.
0x520e UA1INTE 15–8 – 0x00 – R –
(UART3 Ch.1 Inter- 7 – 0 – R
rupt Enable Register) 6 TENDIE 0 H0 R/W
5 FEIE 0 H0 R/W
4 PEIE 0 H0 R/W
3 OEIE 0 H0 R/W
2 RB2FIE 0 H0 R/W
1 RB1FIE 0 H0 R/W
0 TBEIE 0 H0 R/W
0x5210 UA1CAWF 15–8 – 0x00 – R –
(UART3 Ch.1 Carrier
7–0 CRPER[7:0] 0x00 H0 R/W
Waveform Register)
Address Register name Bit Bit name Initial Reset R/W Remarks
0x5278 SPI1INTF 15–8 – 0x00 – R –
(SPIA Ch.1 Interrupt 7 BSY 0 H0 R
Flag Register) 6–4 – 0x0 – R
3 OEIF 0 H0/S0 R/W Cleared by writing 1.
2 TENDIF 0 H0/S0 R/W
1 RBFIF 0 H0/S0 R Cleared by reading the
SPI1RXD register.
0 TBEIF 1 H0/S0 R Cleared by writing to the
SPI1TXD register.
0x527a SPI1INTE 15–8 – 0x00 – R –
(SPIA Ch.1 Interrupt 7–4 – 0x0 – R
Enable Register) 3 OEIE 0 H0 R/W
2 TENDIE 0 H0 R/W
1 RBFIE 0 H0 R/W
0 TBEIE 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x5322 REMDBCTL 15–10 – 0x00 – R –
(REMC3 Data Bit 9 PRESET 0 H0/S0 R/W Cleared by writing 1 to the
Counter Control 8 PRUN 0 H0/S0 R/W REMDBCTL.REMCRST bit.
Register) 7–5 – 0x0 – R –
4 REMOINV 0 H0 R/W
3 BUFEN 0 H0 R/W
2 TRMD 0 H0 R/W
1 REMCRST 0 H0 W
0 MODEN 0 H0 R/W
0x5324 REMDBCNT 15–0 DBCNT[15:0] 0x0000 H0/S0 R Cleared by writing 1 to the
(REMC3 Data Bit REMDBCTL.REMCRST bit.
Counter Register)
0x5326 REMAPLEN 15–0 APLEN[15:0] 0x0000 H0 R/W Writing enabled when REM-
(REMC3 Data Bit DBCTL.MODEN bit = 1.
Active Pulse Length
Register)
0x5328 REMDBLEN 15–0 DBLEN[15:0] 0x0000 H0 R/W Writing enabled when REM-
(REMC3 Data Bit DBCTL.MODEN bit = 1.
Length Register)
0x532a REMINTF 15–11 – 0x00 – R –
(REMC3 Status 10 DBCNTRUN 0 H0/S0 R Cleared by writing 1 to the
and Interrupt Flag REMDBCTL.REMCRST bit.
Register) 9 DBLENBSY 0 H0 R Effective when the REM-
8 APLENBSY 0 H0 R DBCTL.BUFEN bit = 1.
7–2 – 0x00 – R –
1 DBIF 0 H0/S0 R/W Cleared by writing 1 to this
bit or the REMDBCTL.REM-
0 APIF 0 H0/S0 R/W
CRST bit.
0x532c REMINTE 15–8 – 0x00 – R –
(REMC3 Interrupt 7–2 – 0x00 – R
Enable Register) 1 DBIE 0 H0 R/W
0 APIE 0 H0 R/W
0x5330 REMCARR 15–8 CRDTY[7:0] 0x00 H0 R/W –
(REMC3 Carrier
7–0 CRPER[7:0] 0x00 H0 R/W
Waveform Register)
0x5332 REMCCTL 15–9 – 0x00 – R –
(REMC3 Carrier 8 OUTINVEN 0 H0 R/W
Modulation Control 7–1 – 0x00 – R
Register) 0 CARREN 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x5406 LCD8TIM2 15–10 – 0x00 – R –
(LCD8A Timing 9–8 BSTC[1:0] 0x1 H0 R/W S1C17M31/M33 only
Control Register 2) 7–3 – 0x00 – R –
2–0 NLINE[2:0] 0x0 H0 R/W
0x5408 LCD8PWR 15 EXVCSEL 1 H0 R/W –
(LCD8A Power 14–12 – 0x0 – R S1C17M31/M33 only
Control Register) 11–8 LC[3:0] 0x0 H0 R/W
7–5 – 0x0 – R
4 BSTEN 0 H0 R/W
3 – 0 – R
2 HVLD 0 H0 R/W
1 VCSEL 0 H0 R/W
0 VCEN 0 H0 R/W
0x540a LCD8DSP 15–8 – 0x00 – R –
(LCD8A Display 7 – 0 – R
Control Register) 6 SEGREV 1 H0 R/W
5 COMREV 1 H0 R/W
4 DSPREV 1 H0 R/W
3 – 0 – R
2 DSPAR 0 H0 R/W
1–0 DSPC[1:0] 0x0 H0 R/W
0x540c LCD8COMC0 15–8 – 0x00 – R –
(LCD8A COM Pin 7 COM7DEN 1 H0 R/W
Control Register 0) 6 COM6DEN 1 H0 R/W
5 COM5DEN 1 H0 R/W
4 COM4DEN 1 H0 R/W
3 COM3DEN 1 H0 R/W
2 COM2DEN 1 H0 R/W
1 COM1DEN 1 H0 R/W
0 COM0DEN 1 H0 R/W
0x5410 LCD8INTF 15–8 – 0x00 – R –
(LCD8A Interrupt Flag 7–1 – 0x00 – R
Register) 0 FRMIF 0 H0 R/W Cleared by writing 1.
0x5412 LCD8INTE 15–8 – 0x00 – R –
(LCD8A Interrupt 7–1 – 0x00 – R
Enable Register) 0 FRMIE 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x5444 RFC0TRG 15–8 – 0x00 – R –
(RFC Ch.0 Oscillation 7–3 – 0x00 – R
Trigger Register) 2 SSENB 0 H0 R/W
1 SSENA 0 H0 R/W
0 SREF 0 H0 R/W
0x5446 RFC0MCL 15–0 MC[15:0] 0x0000 H0 R/W –
(RFC Ch.0 Measure-
ment Counter Low
Register)
0x5448 RFC0MCH 15–8 – 0x00 – R –
(RFC Ch.0 Measure-
ment Counter High 7–0 MC[23:16] 0x00 H0 R/W
Register)
0x544a RFC0TCL 15–0 TC[15:0] 0x0000 H0 R/W –
(RFC Ch.0 Time Base
Counter Low Register)
0x544c RFC0TCH 15–8 – 0x00 – R –
(RFC Ch.0 Time Base
7–0 TC[23:16] 0x00 H0 R/W
Counter High Register)
0x544e RFC0INTF 15–8 – 0x00 – R –
(RFC Ch.0 Interrupt 7–5 – 0x0 – R
Flag Register) 4 OVTCIF 0 H0 R/W Cleared by writing 1.
3 OVMCIF 0 H0 R/W
2 ESENBIF 0 H0 R/W
1 ESENAIF 0 H0 R/W
0 EREFIF 0 H0 R/W
0x5450 RFC0INTE 15–8 – 0x00 – R –
(RFC Ch.0 Interrupt 7–5 – 0x0 – R
Enable Register) 4 OVTCIE 0 H0 R/W
3 OVMCIE 0 H0 R/W
2 ESENBIE 0 H0 R/W
1 ESENAIE 0 H0 R/W
0 EREFIE 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x5466 RFC1MCL 15–0 MC[15:0] 0x0000 H0 R/W –
(RFC Ch.1 Measure-
ment Counter Low
Register)
0x5468 RFC1MCH 15–8 – 0x00 – R –
(RFC Ch.1 Measure-
ment Counter High 7–0 MC[23:16] 0x00 H0 R/W
Register)
0x546a RFC1TCL 15–0 TC[15:0] 0x0000 H0 R/W –
(RFC Ch.1 Time Base
Counter Low Register)
0x546c RFC1TCH 15–8 – 0x00 – R –
(RFC Ch.1 Time Base
7–0 TC[23:16] 0x00 H0 R/W
Counter High Register)
0x546e RFC1INTF 15–8 – 0x00 – R –
(RFC Ch.1 Interrupt 7–5 – 0x0 – R
Flag Register) 4 OVTCIF 0 H0 R/W Cleared by writing 1.
3 OVMCIF 0 H0 R/W
2 ESENBIF 0 H0 R/W
1 ESENAIF 0 H0 R/W
0 EREFIF 0 H0 R/W
0x5470 RFC1INTE 15–8 – 0x00 – R –
(RFC Ch.1 Interrupt 7–5 – 0x0 – R
Enable Register) 4 OVTCIE 0 H0 R/W
3 OVMCIE 0 H0 R/W
2 ESENBIE 0 H0 R/W
1 ESENAIE 0 H0 R/W
0 EREFIE 0 H0 R/W
Address Register name Bit Bit name Initial Reset R/W Remarks
0x54ae ADC12_0AD1D 15–0 AD1D[15:0] 0x0000 H0 R –
(ADC12A Ch.0
Result Register 1)
0x54b0 ADC12_0AD2D 15–0 AD2D[15:0] 0x0000 H0 R S1C17M33 only
(ADC12A Ch.0
Result Register 2)
0x54b2 ADC12_0AD3D 15–0 AD3D[15:0] 0x0000 H0 R S1C17M33 only
(ADC12A Ch.0
Result Register 3)
0x54b4 ADC12_0AD4D 15–0 AD4D[15:0] 0x0000 H0 R S1C17M33 only
(ADC12A Ch.0
Result Register 4)
0x54b6 ADC12_0AD5D 15–0 AD5D[15:0] 0x0000 H0 R –
(ADC12A Ch.0
Result Register 5)
If the current consumption order by the operating status configuration shown in Table B.1.1 is different from one
that is listed in “Electrical Characteristics,” check the settings shown below.
#RESET pin
Components such as a switch and resistor connected to the #RESET pin should have the shortest connections
possible to prevent noise-induced resets.
VPP pin
VPP pin connection example
Connect a capacitor C VPP between the V SS and V PP pins to suppress Pin Pin
fluctuations within VPP ± 1 V. The CVPP should be placed as close to the VPP VPP VPP
pin as possible and use a sufficiently thick wiring pattern that allows current
VSS VSS
of several tens of mA to flow. CVPP CVPP
Unused pins
(1) I/O port (P) pins
Unused pins should be left open. The control registers should be fixed at the initial status.
(2) OSC1, OSC2, OSC3, OSC4, and EXOSC pins
If the OSC1 crystal oscillator circuit is not used, the OSC1 and OSC2 pins should be left open. If the OSC3
crystal/ceramic oscillator circuit or EXOSC input circuit is not used, the pin should be configured as a
general-purpose I/O port. The control registers should be fixed at the initial status (disabled).
(3) VC1–3, CP1–2, SEGx, and COMx pins
If the LCD driver is not used, the VC1–3 and CP1–2 pins should be left open. The control registers should be
fixed at the initial status (display off). The unused SEGx and COMx pins that are not required to connect
with the LCD panel should be configured as a general-purpose/peripheral circuit I/O port even if the LCD
driver is used.
Miscellaneous
Minor variations over time may result in electrical damage arising from disturbances in the form of voltages
exceeding the absolute maximum rating when mounting the product in addition to physical damage. The fol-
lowing factors can give rise to these variations:
(1) Electromagnetically-induced noise from industrial power supplies used in mounting reflow, reworking after
mounting, and individual characteristic evaluation (testing) processes
(2) Electromagnetically-induced noise from a solder iron when soldering
In particular, during soldering, take care to ensure that the soldering iron GND (tip potential) has the same po-
tential as the IC GND.
Noise Measures for Input Pins Connected to Signal with High Driving Capability Such
As Power Supply
There is a possibility of a large current flow into the pins that are directly connected to a power supply or an
output of a device with high driving capability if noise is input to those pins. To prevent this, connect a 30 Ω or
more pin protection resistor to the pins in series. The resistance value should be determined by evaluating it on
the mounting board.
When connecting a power supply directly to the VREFA pin, insert a 100 Ω resistor in series. This resistance
does not affect the A/D converter characteristics.
boot.s
.org 0x8000
.section .rodata ...(1)
; ======================================================================
; Vector table
; ======================================================================
; interrupt vector interrupt
; number offset source
.long BOOT ; 0x00 0x00 reset ...(2)
.long unalign_handler ; 0x01 0x04 unalign
.long nmi_handler ; 0x02 0x08 NMI
.long int03_handler ; 0x03 0x0c -
.long svd3_handler ; 0x04 0x10 SVD3
.long pport_handler ; 0x05 0x14 PPORT
.long int06_handler ; 0x06 0x18 -
.long clg_handler ; 0x07 0x1c CLG
.long rtca_handler ; 0x08 0x20 RTCA
.long t16_0_handler ; 0x09 0x24 T16 ch0
.long uart3_0_handler ; 0x0a 0x28 UART3 ch0
.long t16_1_handler ; 0x0b 0x2c T16 ch1
.long spia_0_handler ; 0x0c 0x30 SPIA ch0
.long i2c_handler ; 0x0d 0x34 I2C
.long t16b_0_handler ; 0x0e 0x38 T16B ch0
.long t16b_1_handler ; 0x0f 0x3c T16B ch1
.long uart3_1_handler ; 0x10 0x40 UART3 ch1
.long snda_handler ; 0x11 0x44 SNDA
.long remc3_handler ; 0x12 0x48 REMC3
.long lcd8a_handler ; 0x13 0x4c LCD8A
.long rfc_0_handler ; 0x14 0x50 RFC ch0
.long rfc_1_handler ; 0x15 0x54 RFC ch1
.long t16_2_handler ; 0x16 0x58 T16 ch2
.long spia_1_handler ; 0x17 0x5c SPIA ch1
.long t16_3_handler ; 0x18 0x60 T16 ch3
.long adc12a_handler ; 0x19 0x64 ADC12A
.long t16B_2_handler ; 0x1a 0x68 T16B ch2
.long int1b_handler ; 0x1b 0x6c -
.long int1c_handler ; 0x1c 0x70 -
.long int1d_handler ; 0x1d 0x74 -
.long int1e_handler ; 0x1e 0x78 -
.long int1f_handler ; 0x1f 0x7c -
; ======================================================================
; Program code
; ======================================================================
.text ...(3)
.align 1
BOOT:
; ===== Initialize ===========================================
; ----- Stack pointer --------------------
Xld.a %sp, 0xfc0 ...(4)
; ----- Memory controller ----------------
Xld.a %r1, 0x41b0 ; FLASHC register address
; Flash read wait cycle
Xld.a %r0, 0x00 ; 0x00 = No wait
ld.b [%r1], %r0 ; [0x41b0] <= 0x00 ...(5)
; ======================================================================
; Interrupt handler
; ======================================================================
; ----- Address unalign --------------------------
unalign_handler:
...
(1) A “.rodata” section is declared to locate the vector table in the “.vector” section.
(2) Interrupt handler routine addresses are defined as vectors.
“intXX_handler” can be used for software interrupts.
(3) The program code is written in the “.text” section.
(4) Sets the stack pointer.
(5) Sets the number of Flash memory read cycles.
(See the “Memory and Bus” chapter.)
For more information on how to use the library and sample program specifications, refer to the “S1C17 Family EE-
PROM Emulation Library Manual” included in each library package.
Revision History
Code No. Page Contents
413495600 All New establishment
413495601 P1-1, Descriptions on the EEPROM emulation were added.
PAP-F-1
P6-6 Reading input data from a GPIO port
Deleted the note.
Note: The PxDAT.PxINy bit retains the input port status at 1 clock before being read from the CPU.
413495602 1-2 to 3 1.1 Features
Modified Table 1.1.
Power supply voltage: VDD operating voltage for Flash programming (When VPP is generated internally)
2.7 to 5.5 V → 2.4 to 5.5 V
Shipping form: A JEITA name was added to the package name.
3-3 3.3.3 List of debugger input/output pins
Added a note.
Notes: ...
• Do not drive the DSIO pin with a low level from outside, as it generates a debug interrupt that
puts the CPU into DEBUG mode.
4-3 4.3.3 Flash Programming
Corrected the note.
Notes: • The Flash programming requires a 2.4 V or higher VDD voltage.
6-31 6.7.9 Pd Port Group
Modified Table 6.7.9.1.
PDIOEN register: PDOEN2 was added.
9-2 9.3.2 Theoretical Regulation Function
Corrected Step 1.
1. Measure fOSC1 and calculate the frequency tolerance correction value
“m [ppm] = -{(fOSC1 - 32,768 [Hz]) / 32,768 [Hz]} × 106.”
(Eq. 9.1) m: OSC1 frequency tolerance correction value [ppm]
9-4 9.4.2 Real-Time Clock Counter Operations
Corrective operation when a value out of the effective range is set
Added a note.
Note: Do not set the RTCMON.RTCMOL[3:0] bits to 0x0 if the RTCMON.RTCMOH bit = 0.
9-11 9.6 Control Registers
RTC Month/Day Register
Bit 12 RTCMOH
Bits 11–8 RTCMOL[3:0]
Added a note.
Notes: ...
• Be sure to avoid setting the RTCMON.RTCMOH/RTCMOL[3:0] bits to 0x00.
16-10 16.6 Control Registers
SNDA Clock Control Register
Modified Table 16.6.1.
The IOSC and OSC3 division ratios were corrected.
18-3 18.2.1 List of Output Pins
Added a note.
Notes: ...
• When an LCD panel is connected, set the LCD8CTL.LCDDIS bit to 1, as activating the LCD
panel when it is set to 0 may cause the LCD panel characteristics to fluctuate.
18-15 18-8 Control Registers
LCD8A Clock Control Register
Modified Table 18.8.1.
The IOSC division ratios were corrected.
23-1 23.1 Absolute Maximum Ratings
Modified the characteristics table.
VI: #RESET was added to the condition.
23-1 23.2 Recommended Operating Conditions
Modified the characteristics table.
VDD: Min. = 2.7 → 2.4 V, For Flash programming (When VPP is generated internally)
A note (*1) was added.
*1 When the LCD driver is used with VDD ≥ 4.6 V, the LCD power supply voltage should be set as |VC3 -
VDD| ≥ 0.4 V.
CVREFA (Typ. = 0.1 µF) was added.
23-4 23.4 System Reset Controller (SRC) Characteristics
Reset hold circuit characteristics
Modified the characteristics table.
tRSTR: Min. = 0.5 ms, Max. = 0.9 ms
REVISION HISTORY
America Asia
Epson America, Inc. Epson (China) Co., Ltd.
Headquarter: 4th Floor, Tower 1 of China Central Place, 81 Jianguo Road,
3131 Katella Ave., Chaoyang District, Beijing 100025, China
Los Alamitos, CA 90720, USA Phone: +86-10-8522-1199 Fax: +86-10-8522-1120
Phone: +1-800-463-7766
Shanghai Branch
San Jose Office: Room 601-603, Building A One East, No. 325 East Longhua
2860 Zanker Road Suite 204, Road, Shanghai 200023, China
San Jose, CA 95134, USA Phone: +86-21-5330-4888 Fax: +86-21-5423-4677
Phone: +1-800-463-7766
Shenzhen Branch
Room 804-805, 8 Floor, Tower 2, Ali Center, No. 3331
Keyuan South RD (Shenzhen bay), Nanshan District,
Europe Shenzhen 518054, China
Phone: +86-755-3299-0588 Fax: +86-755-3299-0560
Epson Europe Electronics GmbH
Riesstrasse 15, 80992 Munich,
Germany
Phone: +49-89-14005-0 Fax: +49-89-14005-110 Epson Taiwan Technology & Trading Ltd.
15F, No. 100, Songren Rd, Sinyi Dist, Taipei City 110, Taiwan
Phone: +886-2-8786-6688