DST Tmpm370fydfg-Tde en 21751
DST Tmpm370fydfg-Tde en 21751
DST Tmpm370fydfg-Tde en 21751
TX03 Series
TMPM370FYDFG/FYFG
Semiconductor Company
Revision History
Date Revision
2010/10/18 Rev 1 First Release
2011/3/7 Rev 2 Contents Revised
TMPM370
***************************************************************************************************************
ARM, ARM Powered, AMBA, ADK, ARM9TDMI, TDMI, PrimeCell, RealView, Thumb, Cortex,
Coresight, ARM9, ARM926EJ-S, Embedded Trace Macrocell, ETM, AHB, APB, and KEIL are
registered trademarks or trademarks of ARM Limited in the EU and other countries.
****************************************************************************************************************
TMPM370 1-1
TMPM370
1.1 Features
1) Improved code efficiency has been realized through the use of Thumb®-2 instruction
- New 16-bit Thumb® instructions for improved program flow
- New 32-bit Thumb instructions for improved performance and code size.
- Auto-switching between 32-bit instruction and 16-bit instruction is executed by compiler.
2) Both high performance and low power consumption have been achieved
High performance
- A 32-bit multiplication (32×32=32 bit) can be executed with one clock
- Division takes between 2 and 12 cycles depending on dividend and devisor
( 2 ) Interrupt source
- Internal: 62 factors…The order of precedence can be set over 7 levels (except the watchdog
timer interrupt).
- External: 16 factors…The order of precedence can be set over 7 levels
( 14 ) OP-Amp(AMP): 4 channel
- 8 gain can be selected
( 16 ) Standby mode
- Standby mode: IDLE, STOP
( 17 ) Clock generator(CG)
- On-chip PLL (8 times)
- Clock gear function: The high-speed clock can be divided into 1/1, 1/2, 1/4, 1/8 or 1/16
( 18 ) Endian
- Little endian
( 21 ) Temperature range
- -40°C~85°C (except during Flash writing/ erasing and debugging)
- 0°C~70°C (during Flash writing/ erasing and degugging)
3.3V
I/F NANO
REGULATOR 5V
Cortex-M3 I-Code FLASH
AHB-Bus-Matrix (80MHz)
CPU
1.5V
D-Code
I/F RAM
Debug System
NVIC
I/F BOOT
ROM
Bus Bridge
Oscillator
ROM for VE
CG PLL
VE WDT
PMD POR/VLTD
ENC (2ch)
PI2/AINA10/AINB1
PI3/AINA11/AINB2
AVDD5A/VREFHA
AVDD5B/VREFHB
PI1/AINA9/AINB0
PH0/AINA0/INT0
PH1/AINA1/INT1
PH2/AINA2/INT2
AVSSA/VREFLA
AVSSB/VREFLB
CVREFABC
PH3/AINA3
PH4/AINA4
PH5/AINA5
PH6/AINA6
PH7/AINA7
PJ0/AINB3
PJ1/AINB4
PJ2/AINB5
PJ3/AINB6
PJ4/AINB7
AMPVDD5
PI0/AINA8
AMPVSS
CVREFD
100
95
90
85
80
76
DVSS 1 75 PJ5/AINB8
INT3/TB0IN/PA0 PJ6/AINB9/INTC
TB0OUT/PA1 PJ7/AINB10/INTD
INT4/TB1IN/PA2 PK0/AINB11/INTE
TB1OUT/PA3 5 PK1/AINB12/INTF
CTS1/SCLK1/PA4 70 PB7/TRST
TB6OUT/TXD1/PA5 PB6/TDI
TB6IN/RXD1/PA6 PB5/TDO/SWV
INT8/TB4IN/PA7 PB4/TCK/SWCLK
TXD0/PE0
RXD0/PE1
10 TMPM370FYFG 65
PB3/TMS/SWDIO
PB2/TRACEDATA 1
CTS0/SCLK0/PE2 PB1/TRACEDATA 0
TB4OUT/PE3
DVDD5
100 pin(14x14) PB0/TRACECLK
DVSS
INT5/TB2IN/PE4 15 DVDD5E
TB2OUT/PE5
INT6/TB3IN/PE6
(Top View) 60 VOUT3
RESET
INT7/TB3OUT/PE7 RVDD5
DVSS MODE
INTB/PL0 20 DVSS
INTA/PL1 55 VOUT15
UO0/PC0 PF4/ENCZ1/RXD3
XO0/PC1 PF3/ENCB1/TXD3
VO0/PC2 PF2/ENCA1/SCLK3/CTS3
YO0/PC3 25 51 PF1/TB7OUT
26
30
35
40
45
50
DVDD5
WO0/PC4
ZO0/PC5
DVSS
X1
DVSS
X2
EMG0/PC6
OVV0/PC7
INT9/PD3
CTS2/SCLK2/PD4
TXD2/PD5
RXD2/PD6
BOOT/TB7IN/PF0
UO1/PG0
TB5IN/ENCA0/PD0
TB5OUT/ENCB0/PD1
ENCZ0/PD2
XO1/PG1
VO1/PG2
YO1/PG3
WO1/PG4
ZO1/PG5
EMG1/PG6
OVV1/PG7
PI2/AINA10/AINB1
PI3/AINA11/AINB2
AVDD5A/VREFHA
AVDD5B/VREFHB
PI1/AINA9/AINB0
PH0/AINA0/INT0
PH1/AINA1/INT1
PH2/AINA2/INT2
AVSSA/VREFLA
AVSSB/VREFLB
PH3/AINA3
PH4/AINA4
PH5/AINA5
PH6/AINA6
PH7/AINA7
PJ0/AINB3
PJ1/AINB4
AMPVDD5
PI0/AINA8
AMPVSS
100
95
90
85
81
CVREFD 1 80 PJ2/AINB5
CVREFABC PJ3/AINB6
DVSS PJ4/AINB7
INT3/TB0IN/PA0 PJ5/AINB8
TB0OUT/PA1 5 PJ6/AINB9/INTC
INT4/TB1IN/PA2 75 PJ7/AINB10/INTD
TB1OUT/PA3 PK0/AINB11/INTE
CTS1/SCLK1/PA4 PK1/AINB12/INTF
TB6OUT/TXD1/PA5 PB7/TRST
TB6IN/RXD1/PA6 10 PB6/TDI
INT8/TB4IN/PA7 70 PB5/TDO/SWV
TXD0/PE0 PB4/TCK/SWCLK
RXD0/PE1 TMPM370FYDFG PB3/TMS/SWDIO
CTS0/SCLK0/PE2 PB2/TRACEDATA 1
TB4OUT/PE3 15 PB1/TRACEDATA 0
DVDD5 100 pin(14x20) 65 PB0/TRACECLK
INT5/TB2IN/PE4 DVSS
TB2OUT/PE5 DVDD5E
INT6/TB3IN/PE6 (Top View) VOUT3
INT7/TB3OUT/PE7 20 RESET
DVSS 60 RVDD5
INTB/PL0 MODE
INTA/PL1 DVSS
UO0/PC0 VOUT15
XO0/PC1 25 PF4/ENCZ1/RXD3
VO0/PC2 55 PF3/ENCB1/TXD3
YO0/PC3 PF2/ENCA1/SCLK3/CTS3
WO0/PC4 PF1/TB7OUT
ZO0/PC5 PF0/TB7IN/BOOT
EMG0/PC6 30 51 X2
31
35
40
45
50
OVV0/PC7
DVDD5
INT9/PD3
CTS2/SCLK2/PD4
TXD2/PD5
RXD2/PD6
DVSS
X1
UO1/PG0
OVV1/PG7
DVSS
TB5IN/ENCA0/PD0
TB5OUT/ENCB0/PD1
ENCZ0/PD2
XO1/PG1
VO1/PG2
YO1/PG3
WO1/PG4
ZO1/PG5
EMG1/PG6
Table2.1 shows the pin functions of TMPM370FYFG/FYDFG. Table 2.2 shows the operating voltage of
each pin, and table 2.3 shows the voltage range of every pin.
Table 2.1 Pin functions (1/5)
SCHIMITT Open Drain High
Pin name Output during Reset
(O:Yes) mode Speed
CVREFD Hi-Z
CVREFABC Hi-Z
DVSS
PA0
Hi-Z O O
TB0IN/INT3
PA1
Hi-Z O O
TB0OUT
PA2
TB1IN Hi-Z O O
INT4
PA3
Hi-Z O O
TB1OUT
PA4
SCLK1 Hi-Z O O
CTS1
PA5
TXD1 Hi-Z O O
TB6OUT
PA6
RXD1 Hi-Z O O
TB6IN
PA7
TB4IN Hi-Z O O
INT8
PE0
Hi-Z O O
TXD0
PE1
Hi-Z O O
RXD0
PE2
SCLK0 Hi-Z O O
CTS0
PE3
Hi-Z O O
TB4OUT
DVDD5
PE4
TB2IN Hi-Z O O
INT5
PE5
Hi-Z O O
TB2OUT
PE6
TB3IN Hi-Z O O
INT6
PE7
TB3OUT Hi-Z O O
INT7
DVSS
DVSS
AVSSA,AVSSB GND
AMPVSS
Note: VOUT15 and VOUT3 must be connected with the same value of capacitors.
3 Processor Core
The following table shows the revision of the processor core in the TMPM370FY. For further
information on each revision, see the documents issued by ARM Limited.
The Cortex-M3 core has the optional blocks. The optional blocks of the revision r2p0 are below;
3.3 Event
TMPM370FY is not support event input/output. Do not use SEV instruction and WFE instruction.
3.4 SLEEPDEEP
The DCode bus and the system bus of TMPM370FY are not support EXCLUSIVE ACCESS.
(Note 1) It is possible to turn power on after RESET pin is set to "Low". Detail information is
describedi in “Note the power on” in the chapter “Electrical Characteristics”.
(Note 2) The reset operation may alter the internal RAM state.
4 Dubug Interface
After reset, the PB3, PB4, PB5, PB6 and PB7 are configured as debug port function pins. The
functions of other debug interface pins need to be programmed as required. Debug interface pins
can use general purpose port that is not use debug interface.
The table 4-2 below summarizes the debug interface pin functions and related port settings after reset.
Table 4-2 Debug interface pins and port setting after reset
Port Setting After Reset
Initial PORT
Debug Function
Setting (Bit name) Function Input Output Open drain Pull-up Pull-down
(PBFR1) (PBIE) (PBCR) (PBOD) (PBPUP) (PBPDN)
PORT PB0 TRACECLK 0 0 0 0 0 0
PORT PB1 TARCEDATA0 0 0 0 0 0 0
PORT PB2 TRACEDATA1 0 0 0 0 0 0
DEBUG PB3 TMS/SWDIO 1 1 1 0 1 0
DEBUG PB4 TCK/SWCLK 1 1 0 0 0 1
DEBUG PB5 TDO/SWV 1 0 1 0 0 0
DEBUG PB6 TDI 1 1 0 0 1 0
---------------
DEBUG PB7 TRST 1 1 0 0 1 0
When using a low power consumption mode, take note of the following points.
(Note 1) If PB3 and PB5 are configured as debug function pins, output continues to be enabled
even in STOP mode regardless of the setting of the CGSTBYCR<DRVE> .
(Note 2) If PB4 is configured as a debug function pin, it prevents a low power consumption mode
from being fully effective. Configure PB4 to function as a general-purpose port if the
debug function is not used.
For how to connect a debug tool, refer to the method recommended by each manufacturer.
Debug interface pins have pull-up or pull-down register. When connect with pull-up or pull-down
registers ,be sure their settings.
4.8 Peripherals operation during HALT mode (one time stop of running program)
When Break during debugging, Cortex-M3 CPU core going into HALT mode. Watch dog timer (WDT)
is stopped counting automatically. Other peripherals are continue operating.
5 Memory Map
The memory maps for the TMPM370FY are based on the ARM Cortex-M3 processor core memory map.
The internal ROM, internal RAM and internal I/O regions of the TMPM370FY are mapped to the code,
SRAM and peripheral regions of the Cortex-M3 respectively. The SRAM and internal I/O regions are all
included in the bit-band region.
The CPU register region is the processor core’s internal register region.
For more information on each region, see the “Cortex-M3 Technical Reference Manual”.
Note that regions indicated as “Fault” is accessed, memory fault is generated if memory fault is enable, or
hard fault is generated if memory fault is disable. Do not access the vendor-specific regions.
See “Special Function Registers” for details on the internal I/O region.
Fault Fault
0x2000 27FF Internal RAM (10K) 0x2000 27FF Internal RAM (10K)
0x2000 0000 0x2000 0000
Fault
Fault
0x0003 FFFF
Internal ROM (256K) 0x0000 0FFF BOOTROM (4K)
0x0000 0000 0x0000 0000
6 Clock/Mode Control
6.1 Features
The clock/mode control block enables to select clock gear, prescaler clock and warm-up of the PLL
(including clock multiplication circuit) and oscillator.
The low power consumption mode can reduce power consumption.
This chapter describes how to control clocks, clock operating modes and mode transitions.
In addition to NORMAL mode, the TMPM370FY can operate in two types of low power mode to reduce
power consumption according to its usage conditions.
6.2 Registers
31 30 29 28 27 26 25 24
Bit symbol - - - - - - - -
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
7 6 5 4 3 2 1 0
Bit symbol - - - - WUPSEL1 PLLON WUEF WUEON
Read/Write R R R R R/W R/W R W
After reset 0 0 0 0 0 0 0 0
Function “0” is read. Clock PLL Status of Operation of
source for operation Warm-up warm-up
Warm-up timer (WUP) timer (WUP)
timer 0: Stop
1: Oscillation 0: warm-up 0: don’t care
Write “0”. completed 1: starting
1: Warm-up in warm-up
operation
15 14 13 12 11 10 9 8
Bit symbol WUODR1 WUODR0 - - - - - XEN1
Read/Write R/W R/W R/W R R/W R/W
After reset 0 0 0 0 0 0 0 1
Function Write “00”. Write “0”. Write “0” “0” is read. Write “0”. High-speed
oscillator
0: Stop
1: Oscillation
23 22 21 20 19 18 17 16
Bit symbol WUODR5 WUODR4 WUODR3 WUODR2 - - - -
Read/Write R/W R/W R/W R/W R/W
After reset 0 0 0 0 1 1 1 0
Function Bit5:2 for warm-up counter value. Write “1110”
31 30 29 28 27 26 25 24
Bit symbol WUODR13 WUODR12 WUODR11 WUODR10 WUODR9 WUODR8 WUODR7 WUODR6
Read/Write R/W
After reset 1 0 0 0 0 0 0 0
Function Bit13:6 for warm-up counter value.
7 6 5 4 3 2 1 0
Bit symbol - - - - - STBY2 STBY1 STBY0
Read/Write R R/W R/W R/W
After reset 0 0 0 0 0 0 1 1
Function “0” is read. Low power consumption mode
000: Reserved
001: STOP
010: Reserved
011: IDLE
100: Reserved
101: Reserved
110: Reserved
111: Reserved
15 14 13 12 11 10 9 8
Bit symbol - - - - - - - RXEN
Read/Write R R/W R/W
After reset 0 0 0 0 0 0 0 1
Function “0” is read. Write “0”. High-speed
oscillator after
releasing
STOP mode
Write “1”.
23 22 21 20 19 18 17 16
Bit symbol - - - - - - - DRVE
Read/Write R R/W R/W
After reset 0 0 0 0 0 0 0 0
Function “0” is read. Write “0”. Pin status in
STOP mode
0: Active
1: Inactive
31 30 29 28 27 26 25 24
Bit symbol - - - - - - - -
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
7 6 5 4 3 2 1 0
Bit symbol - - - - - - - PLLSEL
Read/Write R/W R/W
After reset 0 0 1 1 1 1 1 0
Function Write “0011111” Select PLL
output
0: fosc
1: fpll
15 14 13 12 11 10 9 8
Bit symbol - - - - - - - -
Read/Write R/W R R/W R/W R/W
After reset 1 0 1 0 0 0 0 1
Function Write “1010” “0” is read. Write “001”
23 22 21 20 19 18 17 16
Bit symbol - - - - - - - -
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read
31 30 29 27 26 25 24 23
Bit symbol - - - - - - - -
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read
<Bit 0><PLLSEL> : Specifies use or disuse of the clock multiplied by the PLL.
“fosc” is automatically set after reset. Resetting is required when using the PLL.
Note: When the PLLSEL is controlled, the oscillation frequency detector (OFD) must
be disablded beforehand even though the PLLSEL is controlled in an initial
routine. Note that the OFD reset doesn’t initialize OFD setting.
7 6 5 4 3 2 1 0
Bit symbol - - - - - - SYSCK SYSCK
FLG
Read/Write R R/W R
After reset 0 0 0 0 0 0 0 0
Function “0” is read. System clock System clock
status
0:High-speed
(fc) 0:High-speed
1: Reserved (fc)
1: -
15 14 13 12 11 10 9 8
Bit symbol - - - - - - - -
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
23 22 21 20 19 18 17 16
Bit symbol - - - - - - - -
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
31 30 29 28 27 26 25 24
Bit symbol - - - - - - - -
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
Fig.6-1 shows the clock system diagram. Each clock is defined as follows.
fosc : Clock input from high-speed oscillator (X1 and X2)
fpll : Clock octupled by PLL
fc : Clock specified by CGPLLSEL<PLLSEL> (high-speed clock)
fgear : Clock specified by CGSYSCR<GEAR2:0>
fsys : The same clock as fgear (system clock)
fperiph : Clock specified by CGSYSCR<FPSEL>
ΦT0 : Clock specified by CGSYSCR<PRCK2:0> (prescaler clock)
The high-speed clock gear (fgear) and the prescaler clock ΦT0 are dividable.
CGOSCCR<WUEON>
CGOSCCR<WUODR>
Warm-up timer
CGSYSCR<FPSEL>
CGSYSCR<PRCK2:0>
fperiph
1/2 1/4 1/8 1/16 1/32
CGOSCCR<PLLON>
fgear
fpll ΦT0
PLL
(Note) The input clocks to selector shown with an arrow are set as default after reset.
This circuit outputs the fpll clock that is octuple of the high-speed oscillator output clock, fosc. This
lowers the oscillator input frequency while increasing the internal clock speed.
The PLL is disabled after reset is released. To enable the PLL, set "1" to the CGOSCCR<PLLON> bit.
The PLL requires a certain amount of time to be stabilized, which should be secured using the warm-up
function.
The warm-up function is used when returning from STOP mode. In this case, an interrupt for returning
from the low power consumption mode triggers the automatic timer count. After the specified time is
reached, the system clock is output and the CPU starts operation.
In STOP modes, the PLL is disabled. When returning from these modes, configure the warm-up time in
consideration of the stability time of the PLL.
(Note) The warm-up timer operates according to the oscillation clock, and it may contain errors
if there is any fluctuation in the oscillation frequency. Therefore, the warm-up time should
be taken as approximate time.
<Example Securing the stability time fro the PLL> (fc = fosc)
CGOSCCR<WUPSEL1>=”0” : Write “0” to CGOSCCR<WUPSEL1>
CGOSCCR<WUPODR13:2>= “Warm-up time” / (1/fosc) / 16
: Specify the warm-up time
CGOSCCR<WUEON>=”1” : Start the warm-up timer (WUP)
CGOSCCR<WUEF> Read : Wait until the state becomes "0" (warm-up is finished)
(Note) The warm-up counter consists of 16-bit counter. The warm-up period lasts until the upper
12-bit of the counter value corresponds to the values specified in <WUODR 13:2>.
(Note ) Switching of clock gear is executed when a value is written to the CGSYSCR<GEAR2:0>
register. The actual switching takes place after a slight delay.
(Note) To use the clock gear, ensure that you make the time setting such that prescaler output
φTn from each peripheral function is slower than fsys (φTn < fsys). Do not switch the
clock gear while the timer counter or other peripheral function is operating.
The NORMAL mode uses the high-speed clock for system clock.
The IDLE and STOP modes can be used as the low power consumption mode that enables to reduce
power consumption by halting processor core operation.
Reset
Interrupt Interrupt
IDLE mode NORMAL mode STOP mode
Instruction / Instruction /
sleep on exit sleep on exit
(Note 1) Transition to the low power consumption mode by executing the WFE (Wait For
Event) instruction is prohibited as the TMPM370 does not offer any event for
releasing the low power consumption mode.
(Note 2) The TMPM370 does not support the low power consumption mode configured with
the SLEEPDEEP bit in the Cortex-M3 core. Setting the SLEEPDEEP bit of the system
control register is prohibited.
(Note1) In STOP modes, the PLL is disabled. When returning from these modes, configure the
warm-up time in consideration of the stability time of the PLL. It takes approx. 200μs
for the PLL to be stabilized. When the PLL is not used, 60μs or more is needed for
warm-up to stabilize the internal circuit.
(Note2) When PB4 is configured as a debug function pin, it prevents the low power
consumption mode from being fully effective. Configure PB4 to function as a
general-purpose port when the debug function is not used.
(Note) Do not set any value other than those shown above in <STBY2:0>.
(Note 2) The blocks are not stopped even though the clock is halted.
The low power consumption mode can be released by an interrupt request or reset. The release
source that can be used is determined by the low power consumption mode selected. Details are
shown in Table 6-6.
○: Starts the interrupt handling after the mode is released. (The reset
initializes the LSI).
×: Unavailable
(Note 1) To release the low power consumption mode by using the level mode interrupt,
keep the level until the interrupt handling is started. Changing the level before
then will prevent the interrupt handling from starting properly.
(Note 2) For shifting to the low power consumption mode, set the CPU to prohibit all the
interrupts other than the release source. If not, releasing may be executed by an
unspecified interrupt.
● Release by reset
------------------------------
Any low power consumption modes can be released by reset from the R E S E T pin. After that, the
mode switches to NORMAL and all the registers are initialized as is the case with normal reset.
Note that returning to NORMAL mode by reset does not induce the automatic warm-up. Keep the
reset signal valid until the oscillator operation becomes stable.
6.6.6 Warm-up
Mode transition requires the warm-up for stabilization of the internal circuit.
In the mode transition from STOP to NORMAL, the warm-up counter is activated automatically.
And then the system clock output is started after the elapse of configured warm-up time. It is
necessary to set the oscillator to be used for warm-up in the CGOCCR<WUPSEL> and to set the
warm-up time in the CGOSCCR<WUODR13:0> before executing the instruction to enter the STOP
mode.
(Note) In STOP mode, the PLL is disabled. When returning from these modes, configure
the warm-up time in consideration of the stability time of the PLL and the internal
oscillator. It takes approx. 200μs for the PLL to be stabilized.
Table 6-7 shows whether the warm-up setting of each mode transition is required or not.
(Note 1) Returning to NORMAL mode by reset does not induce the automatic warm-up.
Keep the reset signal valid until the oscillator operation becomes stable.
The clock operations in mode transition are described in the following section.
When returning to NORMAL mode from STOP mode, the warm-up is activated automatically. It is
necessary to set the warm-up time before entering the STOP mode.
Returning to NORMAL mode by reset does not induce the automatic warm-up. Keep the reset signal
asserted until the oscillator operation becomes stable.
fosc
Warm-up
fsys
(System clock)
7. Exceptions
This chapter describes features, types and handling of exceptions.
Exceptions have close relation to the CPU core. Refer to “Cortex-M3 Technical Reference Manual” if
needed.
7.1 Overview
An exception causes the CPU to stop the currently executing process and handle another process.
There are two types of exceptions: those that are generated when some error condition occurs or when
an instruction to generate an exception is executed; and those that are generated by hardware, such as an
interrupt request signal from an external pin or peripheral function.
All exceptions are handled by the Nested Vectored Interrupt Controller (NVIC) in the CPU according to
the respective priority levels. When an exception occurs, the CPU stores the current state to the stack
and branches to the corresponding interrupt service routine (ISR). Upon completion of the ISR, the
information stored to the stack is automatically restored.
z Reset
z Non-Maskable Interrupt (NMI)
z Hard Fault
z Memory Management
z Bus Fault
z Usage Fault
z SVCall (Supervisor Call)
z Debug Monitor
z PendSV
z SysTick
z External Interrupt
Detection by CG/CPU The CG/CPU detects the exception request. Section 7.1.2.1
An exception occurs when the CPU executes an instruction that causes an exception or when an error
condition occurs during instruction execution.
An exception also occurs by an instruction fetch from the Execute Never (XN) region or an access
violation to the Fault region.
An interrupt request is generated from an external interrupt pin or peripheral function. For interrupts that
are used for releasing a standby mode, relevant settings must be made in the clock generator. For
details,refer to “7.5 Interrupts”.
If multiple exceptions occur simultaneously, the CPU takes the exception with the highest priority.
Table 7-1 shows the priority of exceptions. “Configurable” means that you can assign a priority level to that
exception. Memory Management, Bus Fault and Usage Fault exceptions can be enabled or disabled. If a
disabled exception occurs, it is handled as Hard Fault.
z Priority levels
The external interrupt priority is set to the interrupt priority register and other exceptions are set to
<PRI_n> bit in the system handler priority register.
The configuration <PRI_n> can be changed, and the number of bits required for setting the priority
varies from 3 bits to 8 bits depending on products. Thus, the range of priority values you can specify is
different depending on products.
In case of 8-bit configuration, the priority can be configured in the range from 0 to 255. The highest
priority is “0”. If multiple elements with the same priority exist, the smaller the number, the higher the
priority becomes.
z Priority groping
The priority group can be split into groups. By setting the <PRIGROUP> of the application interrupt
and reset control register, <PRI_n> can be divided into the pre-emption priority and the sub priority.
A priority is compared with the pre-emption priority. If the priority is the same as the preemption
priority, then it is compared with the sub priority. If the sub priority is the same as the priority, the smaller
the exception number, the higher the priority.
The Table 7-2 Priority grouping setting shows the priority group setting. The pre-emption priority and
the sub priority in the table are the number in the case that <PRI_n> is defined as an 8-bit configuration.
(Note) If the configuration of <PRI_n> is less than 8 bits, the lower bit is "0".
For the example, in the case of 3-bit configuration, the priority is set as <PRI_n[7:5]>
and <PRI_n[4:0]> is "00000".
When an exception occurs, the CPU suspends the currently executing process and branches to the
interrupt service routine. This is called “pre-emption”.
(1) Stacking
When the CPU detects an exception, it pushes the contents of the following eight registers to the stack
in the following order:
The SP is decremented by eight words by the completion of the stack push. The following shows the
state of the stack after the register contents have been pushed.
Old SP
<previous>
xPSR
PC
LR
r12
r3
r2
r1
SP r0
The CPU enables instruction to fetch the interrupt processing with data store to the register.
Prepare a vector table containing the top addresses of ISRs for each exception. After reset, the vector
table is located at address 0x0000_0000 in the code space. By setting the Vector Table Offset Register,
you can place the vector table at any address in the code or SRAM space.
The vector table should also contain the initial value of the main stack.
(3) Late-arriving
If the CPU detects a higher priority exception before executing the ISR for a previous exception, the
CPU handles the higher priority exception first. This is called “late-arriving”.
A late-arriving exception causes the CPU to fetch a new vector address for branching to the
corresponding ISR, but the CPU does not newly push the register contents to the stack.
0x34 Reserved
An ISR performs necessary processing for the corresponding exception. ISRs must be prepared by
the user.
An ISR may need to include code for clearing the interrupt request so that the same interrupt will not
occur again upon return to normal program execution.
For details about interrupt handling, see “7.5 Interrupts”.
If a higher priority exception occurs during ISR execution for the current exception, the CPU abandons
the currently executing ISR and services the newly detected exception.
When returning from an ISR, the CPU takes one of the following actions:
z Tail-chaining
If a pending exception exists and there are no stacked exceptions or the pending exception has higher
priority than all stacked exceptions, the CPU returns to the ISR of the pending exception.
In this case, the CPU skips the pop of eight registers and push of eight registers when exiting one ISR
and entering another. This is called “tail-chaining”.
When returning from an ISR, the CPU performs the following operations:
z Select SP
If returning to an exception (Handler Mode), SP is SP_main. If returning to Thread Mode, SP can be
SP_main or SP_process.
At least 12 Low level system clock is necessary for reset the device, with the condition that the power
supply is within the operation voltage and high frequency oscilation is stable.
Please refer the “Electrical characteristics” for detail about power supply sequence.
The watchdog timer (WDT) has a non-maskable interrupt generating feature. For details, see
the chapter on the WDT.
7.4 SysTick
When you set a value in the SysTick Reload Value Register and enable the SysTick features in the
SysTick Control and Status Register, the counter loads with the value set in the Reload Value Register
and begins counting down. When the counter reaches “0”, a SysTick exception occurs. You may be
pending exceptions and use a flag to know when the timer reaches “0”.
The SysTick Calibration Value Register holds a reload value for counting 10 ms with the system timer.
The count clock frequency varies with each product, and so the value set in the SysTick Calibration Value
Register also varies with each product.
(Note) In this product, the system timer counts based on a clock obtained by dividing the
clock input from the X1 pin by 32.
The SysTick Calibration Value Register is set to 0x9C4, which provides 10 ms timing
when the clock input from X1 is 8 MHz. In case of 10MHz clock input, 10 ms timing is
made by setting 0xC35 to SysTick Reload Register.
7.5 Interrupts
The interrupts issued by the peripheral function that is not used to release standby are directly input to
the CPU (route1).
The peripheral function interrupts used to release standby (route 2) and interrupts from the external
interrupt pin (route 3) are input to the clock generator and are input to the CPU through the logic for
releasing standby (route 4 and 5).
If interrupts from the external interrupt pins are not used to release standby, they are directly input to
the CPU, not through the logic for standby release (route 6).
Peripheral
function
Rout 5 CPU
Rout 6
<INTxEN>
External Rout 3
Port Exiting
interrupt standby
pin mode
Rout 2
Clock generator
Peripheral
function
7.5.1.2 Generation
An interrupt request is generated from an external pin or peripheral function assigned as an interrupt
source or by setting the NVIC’s Interrupt Set-Pending Register.
7.5.1.3 Transmission
An interrupt signal from an external pin or a peripheral function is directly sent to the CPU unless it is
used to exit the standby mode.
Interrupt requests from interrupt sources that can be used for clearing a standby mode is transmitted to
the CPU via the clock generator. For these interrupt sources, appropriate settings must be made in the
clock generator in advance. External interrupt sources not used for exiting a standby mode can be used
without setting the clock generator.
Active level is set to the clock generator for interrupts which can be a trigger to release standby.
Interrupt requests from peripheral functions are set as rising-edge or falling-edge triggered. Interrupt
requests from interrupt pins can be set as level-sensitive ("High" or "Low") or edge-triggered (rising or
falling).
If an interrupt source is used for clearing a standby mode, setting the relevant clock generator register
is also required. Enable the CGIMCGx<INTxEN> bit and specify the active level in the
CGIMCGx<EMCGx> bits. You must set the active level for interrupt requests from each peripheral
function as shown in Table 7-3.
An interrupt request detected by the clock generator is notified to the CPU with a signal in “H” level .
7.5.2.1 Flowchart
7.5.2.2
Set the NVIC registers for detecting interrupts.
Preparation
Set the clock generator as well if the interrupt source is used
to clear a standby mode.
○ Common setting
Settings for detection
NVIC registers
○ Setting to clear standby mode
Clock generator
Not clearing
standby mode Clearing standby
mode
7.5.2.2 Preparation
When preparing for an interrupt, it is needed to pay attention to the order of configuration to avoid
any unexpected interrupt on the way.
Initiating an interrupt or changing its configuration must be implemented in the following order
basically. Disable the interrupt by the CPU. Configure from the farthest route from the CPU. Then
enable the interrupt by the CPU.
To configure the clock generator, you must follow the order indicated here not to cause any
unexpected interrupt. First, configure the precondition. Secondly, clear the data related to the interrupt
in the clock generator and then enable the interrupt.
The following sections are listed in the order of interrupt handling and describe how to configure
them.
You can assign grouping priority by using the PRIGROUP field in the Application Interrupt and
Reset Control Register.
●NVIC register
<PRI_n> ← “Priority”
<PRIGROUP> ← “group priority” (This is configurable if required)
● Port register
PnFRx<PnmFRx> ← “1”
PnIE<PnmIE> ← “1”
● NVIC register
Interrupt Set-Pending[m] ← “1”
For an interrupt source to be used for exiting a standby mode, you need to set the active level
and enable interrupts in the CGIMCG register of the clock generator. The CGIMCG register is
capable of configuring each source.
Before enabling an interrupt, clear the corresponding interrupt request already held. This can
avoid unexpected interrupt. To clear corresponding interrupt request, write a value corresponding
to the interrupt to be used to the CGICRCG register. See “7.6.3.5 CGICRCG (CG Interrupt Clear
Register)” for each value.
Interrupt requests from external pins can be used without setting the clock generator if they are
not used for exiting a standby mode. However, an “H” pulse or “H”–level signal must be input so
that the CPU can detect it as an interrupt request. Also, be aware of the description of “7.5.1.4
Precautions when using external interrupt pins”.
●NVIC register
Interrupt Clear-Pending<m> ← “1”
Interrupt Set-Enable<m> ← “1”
●Interrupt mask register
PRIMASK ← “0”
If an interrupt source is used for exiting a standby mode, an interrupt request is detected
according to the active level specified in the clock generator, and is notified to the CPU.
When the clock generator detects an interrupt request, it keeps sending the interrupt signal in
"High" level to the CPU until the interrupt request is cleared in the CG Interrupt Request Clear
(CGICRCG) Register. If a standby mode is exited without clearing the interrupt request, the same
interrupt will be detected again when normal operation is resumed. Be sure to clear each interrupt
request in the ISR.
On detecting an interrupt, the CPU pushes the contents of PC, PSR, r0-r3, r12 and LR to the
stack then enter the ISR.
An ISR requires specific programming according to the application to be used. This section
describes what is recommended at the service routine programming and how the factor is cleared.
Interrupt with the higher priority and exceptions such as NMI are accepted even when an ISR is
being executed. We recommend you to push the contents of general-purpose registers that might
be rewritten.
7 6 5 4 3 2 1 0
bit Symbol CLK TICKINT ENABLE
SOURCE
Read/Write R R/W R/W R/W
After reset 0 0 0 0
Function “0” is read. 0: External 0: Do not 0: Disable
reference pend 1: Enable
clock SysTick
1: Core 1: Pend
clock SysTick
15 14 13 12 11 10 9 8
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
23 22 21 20 19 18 17 16
bit Symbol COUNT
FLAG
Read/Write R R/W
After reset 0 0
Function “0” is read. 0: Timer not
counted to 0
1: Timer
counted to 0
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
<bit0> <ENABLE> 1 = The counter loads with the Reload value and then begins counting down.
0 = The timer is disabled.
<bit1> <TICKINT> 1 = SysTick exceptions are pended.
0 = SysTick exceptions are not pended.
<bit2> <CLKSOURCE> 0 = External reference clock
1 = Core clock
<bit16> <COUNTFLAG> 1 =Indicates that the timer counted to 0 since last time this was read.
Clears on read of any part of the SysTick Control and Status Register.
7 6 5 4 3 2 1 0
bit Symbol RELOAD
Read/Write R/W
After reset Undefined
Function Reload value
15 14 13 12 11 10 9 8
bit Symbol RELOAD
Read/Write R/W
After reset Undefined
Function Reload value
23 22 21 20 19 18 17 16
bit Symbol RELOAD
Read/Write R/W
After reset Undefined
Function Reload value
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
<bit23:0> <RELOAD> Set the value to load into the SysTick Current Value Register when the timer reaches
“0”.
(Note) In this product, the system timer counts based on a clock obtained by dividing the
clock input from the X1 pin by 32.
7 6 5 4 3 2 1 0
bit Symbol CURRENT
Read/Write R/W
After reset Undefined
Function [Read] Current SysTick timer value
[Write] Clear
15 14 13 12 11 10 9 8
bit Symbol CURRENT
Read/Write R/W
After reset Undefined
Function [Read] Current SysTick timer value
[Write] Clear
23 22 21 20 19 18 17 16
bit Symbol CURRENT
Read/Write R/W
After reset Undefined
Function [Read] Current SysTick timer value
[Write] Clear
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
7 6 5 4 3 2 1 0
bit Symbol TENMS
Read/Write R
After reset 1 1 0 0 0 1 0 0
Function Calibration value (Note)
15 14 13 12 11 10 9 8
bit Symbol TENMS
Read/Write R
After reset 0 0 0 0 1 0 0 1
Function Calibration value (Note)
23 22 21 20 19 18 17 16
bit Symbol TENMS
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function Calibration value (Note)
31 30 29 28 27 26 25 24
bit Symbol NOREF SKEW
Read/Write R R R
After reset 0 0 0
Function 0: 0: “0” is read.
Reference Calibration
clock value is 10
provided ms.
1: No 1:
reference Calibration
clock value is not
10 ms.
(Note) In this product, the system timer counts based on a clock obtained by dividing the
clock input from the X1 pin by 32.
The SysTick Calibration Value Register is set to a value that provides 10 ms timing
when the cock input from X1 is 8 MHz. In case of 10MHz clock input, 10 ms timing is
made by setting 0xC35 to SysTick Reload Register.
<bit31:0> <SETENA> Use these bits to enable interrupts or determine which interrupts are currently
enabled.
Writing “1” to a bit in this register enables the corresponding interrupt. Writing “0” has
no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Disabled
1 = Enabled
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol SETENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 39 number 38 number 37 number 36 number 35 number 34 number 33 number 32
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
15 14 13 12 11 10 9 8
bit Symbol SETENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 47 number 46 number 45 number 44 number 43 number 42 number 41 number 40
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
23 22 21 20 19 18 17 16
bit Symbol SETENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 55 number 54 number 53 number 52 number 51 number 50 number 49 number 48
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
31 30 29 28 27 26 25 24
bit Symbol SETENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 63 number 62 number 61 number 60 number 59 number 58 number 57 number 56
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
<bit31:0> <SETENA> Use these bits to enable interrupts or determine which interrupts are currently
enabled.
Writing “1” to a bit in this register enables the corresponding interrupt. Writing “0” has
no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Disabled
1 = Enabled
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol SETENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 71 number 70 number 69 number 68 number 67 number 66 number 65 number 64
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
15 14 13 12 11 10 9 8
bit Symbol SETENA
Read/Write R R/W
After reset 0 0 0 0 0 0 0 0
Function “0” is read. Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 77 number 76 number 75 number 74 number 73 number 72
[Write] [Write] [Write] [Write] [Write] [Write]
1: Enable 1: Enable 1: Enable 1: Enable 1: Enable 1: Enable
[Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1:
Enabled
23 22 21 20 19 18 17 16
bit Symbol
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
<bit13:0> <SETENA> Use these bits to enable interrupts or determine which interrupts are currently
enabled.
Writing “1” to a bit in this register enables the corresponding interrupt. Writing “0” has
no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Disabled
1 = Enabled
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 7 number 6 number 5 number 4 number 3 number 2 number 1 number 0
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disable
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enable
15 14 13 12 11 10 9 8
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 15 number 14 number 13 number 12 number 11 number 10 number 9 number 8
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1 Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
23 22 21 20 19 18 17 16
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 23 number 22 number 21 number 20 number 19 number 18 number 17 number 16
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
31 30 29 28 27 26 25 24
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 31 number 30 number 29 number 28 number 27 number 26 number 25 number 24
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
<bit31:0> <CLRENA> Use these bits to disable or determine which interrupts are currently disabled.
Writing “1” to a bit in this register disables the corresponding interrupt. Writing “0”
has no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Disabled
1 = Enabled
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 39 number 38 number 37 number 36 number 35 number 34 number 33 number 32
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disable
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enable
15 14 13 12 11 10 9 8
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 47 number 46 number 45 number 44 number 43 number 42 number 41 number 40
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1 Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
23 22 21 20 19 18 17 16
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 55 number 54 number 53 number 52 number 51 number 50 number 49 number 48
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
31 30 29 28 27 26 25 24
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 63 number 62 number 61 number 60 number 59 number 58 number 57 number 56
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
<bit31:0> <CLRENA> Use these bits to disable or determine which interrupts are currently disabled.
Writing “1” to a bit in this register disables the corresponding interrupt. Writing “0”
has no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Disabled
1 = Enabled
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 71 number 70 number 69 number 68 number 67 number 66 number 65 number 64
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
15 14 13 12 11 10 9 8
bit Symbol CLRENA
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function “0” is read. Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 77 number76 number 75 number 74 number 73 number 72
[Write] [Write] [Write] [Write] [Write] [Write]
1: Disable 1: Disable 1: Disable 1: Disable 1: Disable 1: Disable
[Read] [Read] [Read] [Read] [Read] [Read]
0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled 0: Disabled
1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled 1: Enabled
23 22 21 20 19 18 17 16
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
<bit13:0> <CLRENA> Use these bits to disable or determine which interrupts are currently disabled.
Writing “1” to a bit in this register disables the corresponding interrupt. Writing “0”
has no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Disabled
1 = Enabled
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 7 number 6 number 5 number 4 number 3 number 2 number 1 number 0
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
15 14 13 12 11 10 9 8
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 15 number 14 number 13 number 12 number 11 number10 number 9 number 8
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
23 22 21 20 19 18 17 16
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 23 number 22 number 21 number 20 number 19 number 18 number 17 number 16
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
31 30 29 28 27 26 25 24
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 31 number 30 number 29 number 28 number 27 number 26 number 25 number 24
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
<bit31:0> <SETPEND> Use these bits to force interrupts into the pending state or determine which
interrupts are currently pending.
Writing “1” to a bit in this register pends the corresponding interrupt. However,
writing “1” has no effect on an interrupt that is already pending or is disabled.
Writing “0” has no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Not pending
1 = Pending
Each bit in this register can be cleared by writing “1” to the corresponding bit in the
Interrupt Clear-Pending Register.
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 39 number 38 number 37 number 36 number 35 number 34 number 33 number 32
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
15 14 13 12 11 10 9 8
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 47 number 46 number 45 number 44 number 43 number42 number 41 number40
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
23 22 21 20 19 18 17 16
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 55 number 54 number 53 number 52 number 51 number 50 number 49 number 48
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
31 30 29 28 27 26 25 24
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 63 number 62 number 61 number 60 number 59 number 58 number 57 number 56
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
<bit31:0> <SETPEND> Use these bits to force interrupts into the pending state or determine which
interrupts are currently pending.
Writing “1” to a bit in this register pends the corresponding interrupt. However,
writing “1” has no effect on an interrupt that is already pending or is disabled.
Writing “0” has no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Not pending
1 = Pending
Each bit in this register can be cleared by writing “1” to the corresponding bit in the
Interrupt Clear-Pending Register.
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol SETPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 71 number 70 number 69 number 68 number 67 number 66 number 65 number 64
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
15 14 13 12 11 10 9 8
bit Symbol SETPEND
Read/Write R R/W
After reset 0 Undefined
Function “0” is read. Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 77 number 76 number 75 number 74 number 73 number 72
[Write] [Write] [Write] [Write] [Write] [Write]
1: Pend 1: Pend 1: Pend 1: Pend 1: Pend 1: Pend
[Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
23 22 21 20 19 18 17 16
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
<bit13:0> <SETPEND> Use these bits to force interrupts into the pending state or determine which
interrupts are currently pending.
Writing “1” to a bit in this register pends the corresponding interrupt. However,
writing “1” has no effect on an interrupt that is already pending or is disabled.
Writing “0” has no effect.
Reading a bit in this register returns the current state of the corresponding
interrupt as shown below.
0 = Not pending
1 = Pending
Each bit in this register can be cleared by writing “1” to the corresponding bit in the
Interrupt Clear-Pending Register.
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 7 number 6 number 5 number 4 number 3 number 2 number 1 number 0
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
15 14 13 12 11 10 9 8
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 15 number 14 number 13 number 12 number 11 number 10 number 9 number 8
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
23 22 21 20 19 18 17 16
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 23 number 22 number 21 number 20 number 19 number 18 number 17 number 16
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
31 30 29 28 27 26 25 24
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 31 number 30 number 29 number 28 number 27 number 26 number 25 number 24
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
<bit31:0> <CLRPEND> Use these bits to clear pending interrupts or determine which interrupts are
currently pending.
Writing “1” to a bit in this register clears the corresponding pending interrupt.
However, writing “1” has no effect on an interrupt that is already being serviced.
Writing “0” has no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Not pending
1 = Pending
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number39 number 38 number 37 number 36 number 35 number 34 number 33 number 32
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
15 14 13 12 11 10 9 8
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 47 number 46 number 45 number 44 number 43 number 42 number 41 number 40
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
23 22 21 20 19 18 17 16
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 55 number 54 number 53 number 52 number 51 number 50 number 49 number 48
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
31 30 29 28 27 26 25 24
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 63 number 62 number 61 number 60 number 59 number58 number 57 number 56
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
<bit31:0> <CLRPEND> Use these bits to clear pending interrupts or determine which interrupts are
currently pending.
Writing “1” to a bit in this register clears the corresponding pending interrupt.
However, writing “1” has no effect on an interrupt that is already being serviced.
Writing “0” has no effect.
Reading a bit in this register returns the current state of the corresponding interrupt
as shown below.
0 = Not pending
1 = Pending
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
7 6 5 4 3 2 1 0
bit Symbol CLRPEND
Read/Write R/W
After reset Undefined
Function Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 39 number 38 number 37 number 36 number 35 number 34 number 33 number 32
[Write] [Write] [Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
15 14 13 12 11 10 9 8
bit Symbol CLRPEND
Read/Write R R/W
After reset 0 Undefined
Function “0” is read. Interrupt Interrupt Interrupt Interrupt Interrupt Interrupt
number 45 number 44 number 43 number 42 number 41 number 40
[Write] [Write] [Write] [Write] [Write] [Write]
1: Clear 1: Clear 1: Clear 1: Clear 1: Clear 1: Clear
pending pending pending pending pending pending
interrupt interrupt interrupt interrupt interrupt interrupt
[Read] [Read] [Read] [Read] [Read] [Read]
0: Not 0: Not 0: Not 0: Not 0: Not 0: Not
pending pending pending pending pending pending
1: Pending 1: Pending 1: Pending 1: Pending 1: Pending 1: Pending
23 22 21 20 19 18 17 16
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
<bit13:0> <CLRPEND> Use these bits to clear pending interrupts or determine which interrupts are
currently pending.
Writing “1” to a bit in this register clears the corresponding pending interrupt.
However, writing “1” has no effect on an interrupt that is already being serviced.
Writing “0” has no effect.
Reading a bit in this register returns the current state of the corresponding
interrupt as shown below.
0 = Not pending
1 = Pending
(Note) For descriptions of interrupts and interrupt numbers, see Section 7.5.1.5 List of
Interrupt Sources.
31 24 23 16 15 8 7 0
0xE000_E400 PRI_3 PRI_2 PRI_1 PRI_0
0xE000_E404 PRI_7 PRI_6 PRI_5 PRI_4
0xE000_E408 PRI_11 PRI_10 PRI_9 PRI_8
0xE000_E40C PRI_15 PRI_14 PRI_13 PRI_12
0xE000_E410 PRI_19 PRI_18 PRI_17 PRI_16
0xE000_E414 PRI_23 PRI_22 PRI_21 PRI_20
0xE000_E418 PRI_27 PRI_26 PRI_25 PRI_24
0xE000_E41C PRI_31 PRI_30 PRI_29 PRI_28
0xE000_E420 PRI_35 PRI_34 PRI_33 PRI_32
0xE000_E424 PRI_39 PRI_38 PRI_37 PRI_36
0xE000_E428 PRI_43 PRI_42 PRI_41 PRI_40
0xE000_E42C PRI_47 PRI_46 PRI_45 PRI_44
0xE000_E430 PRI_51 PRI_50 PRI_49 PRI_48
0xE000_E434 PRI_55 PRI_54 PRI_53 PRI_52
0xE000_E438 PRI_59 PRI_58 PRI_57 PRI_56
0xE000_E43C PRI_63 PRI_62 PRI_61 PRI_60
0xE000_E440 PRI_67 PRI_66 PRI_65 PRI_64
0xE000_E444 PRI_71 PRI_70 PRI_69 PRI_68
0xE000_E448 PRI_75 PRI_74 PRI_73 PRI_72
0xE000_E44C - - PRI_77 PRI_76
The number of bits to be used for assigning a priority varies with each product. This product uses three
bits for assigning a priority.
The following shows the fields of the Interrupt Priority Registers for interrupt numbers 0 to 3. The
Interrupt Priority Registers for all other interrupt numbers have the identical fields. Unused bits return “0”
when read, and writing to unused bits has no effect.
7 6 5 4 3 2 1 0
bit Symbol PRI_0
Read/Write R/W R
After reset 0 0
Function Priority of interrupt number 0 “0” is read.
15 14 13 12 11 10 9 8
bit Symbol PRI_1
Read/Write R/W R
After reset 0 0
Function Priority of interrupt number 1 “0” is read.
23 22 21 20 19 18 17 16
bit Symbol PRI_2
Read/Write R/W R
After reset 0 0
Function Priority of interrupt number 2 “0” is read.
31 30 29 28 27 26 25 24
bit Symbol PRI_3
Read/Write R/W R
After reset 0 0
Function Priority of interrupt number 3 “0” is read.
7 6 5 4 3 2 1 0
bit Symbol TBLOFF
Read/Write R/W R
After reset 0 0
Function Offset value “0” is read.
15 14 13 12 11 10 9 8
bit Symbol TBLOFF
Read/Write R/W
After reset 0
Function Offset value
23 22 21 20 19 18 17 16
bit Symbol TBLOFF
Read/Write R/W
After reset 0
Function Offset value
31 30 29 28 27 26 25 24
bit Symbol TBLBA TBLOFF
SE
Read/Write R R/W R/W
After reset 0 0 0
Function “0” is read. Table base Offset value
<bit28:7> <TBLOFF> Set the offset value from the top of the space specified in TBLBASE.
The offset must be aligned based on the number of exceptions in the table. This
means that the minimum alignment is 32 words that you can use for up to 16
interrupts. For more interrupts, it is necessary to adjust the alignment by rounding
up to the next power of two.
<bit29> <TBLBASE> The vector table is in:
0 = Code space
1 = SRAM space
7 6 5 4 3 2 1 0
bit Symbol SYS VECT VECT
RESET CLR RESET
REQ ACTIVE
Read/Write R R/W R/W R/W
After reset 0 0 0 0 0 0 0 0
Function “0” is read. System Clear active System
Reset vector bit Reset bit
Request.
15 14 13 12 11 10 9 8
bit Symbol ENDIAN PRIGROUP
ESS
Read/Write R/W R R R R R/W R/W R/W
After reset 0 0 0 0 0 0 0 0
Function Endiannes “0” is read. Interrupt priority grouping
s bit
23 22 21 20 19 18 17 16
bit Symbol VECTKEY/VECTKEYSTAT
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Register key
[Write] Writing to this register requires 0x5FA in the <VECTKEY> field.
[Read] Read as 0xFA05
31 30 29 28 27 26 25 24
bit Symbol VECTKEY/VECTKEYSTAT
Read/Write R/W
After reset 0 0 0 0 0 0 0 0
Function Register key
[Write] Writing to this register requires 0x5FA in the <VECTKEY> field.
[Read] Read as 0xFA05
1: big endian
0: little endian
<bit31:16> VECTKEY/ Register key
VECTSTAT [Write] Writing to this register requires 0x5FA in the <VECTKEY> field.
[Read] Read as 0xFA05.
System Handler Priority Registers have eight bits per each exception.
The following shows the addresses of the System Handler Priority Registers corresponding to each
exception.
31 24 23 16 15 8 7 0
0xE000_ED18 PRI_7 PRI_6 PRI_5 PRI_4
(Usage Fault) (Bus Fault) (Memory
Management)
0xE000_ED1C PRI_11 PRI_10 PRI_9 PRI_8
(SVCall)
0xE000_ED20 PRI_15 PRI_14 PRI_13 PRI_12
(SysTick) (PendSV) (Debug Monitor)
The number of bits to be used for assigning a priority varies with each product. This product uses three
bits for assigning a priority.
The following shows the fields of the System Handler Priority Registers for Memory Management, Bus
Fault and Usage Fault. The System Handler Priority Registers for all other exceptions have the identical
fields. Unused bits return “0” when read, and writing to unused bits has no effect.
7 6 5 4 3 2 1 0
bit Symbol PRI_4
Read/Write R/W R
After reset 0 0
Function Priority of Memory Management “0” is read.
15 14 13 12 11 10 9 8
bit Symbol PRI_5
Read/Write R/W R
After reset 0 0
Function Priority of Bus Fault “0” is read.
23 22 21 20 19 18 17 16
bit Symbol PRI_6
Read/Write R/W R
After reset 0 0
Function Priority of Usage Fault “0” is read.
31 30 29 28 27 26 25 24
bit Symbol PRI_7
Read/Write R/W R
After reset 0 0
Function Reserved “0” is read.
7 6 5 4 3 2 1 0
bit Symbol SVCALL USG BUS MEM
ACT FAULT FAULT FAULT
ACT ACT ACT
Read/Write R/W R R/W R R/W R/W
After reset 0 0 0 0 0 0
Function SVCall “0” is read. Usage fault “0” is read. Bus fault Memory
Management
0: Inactive 0: Inactive 0: Inactive 0: Inactive
1: Active 1: Active 1: Active 1: Active
15 14 13 12 11 10 9 8
bit Symbol SVCALL BUS MEM USG SYSTICK PENDSV MONI
PENDED FAULT FAULT FAULT ACT ACT TOR
PENDED PENDED PENDED ACT
Read/Write R/W R/W R/W R/W R/W R/W R R/W
After reset 0 0 0 0 0 0 0 0
Function SVCall Bus Fault Memory Usage SysTick PendSV “0” is read. Debug
Management Fault Monitor
0: Not 0: Not 0: Not 0: Not 0: Inactive 0: Inactive 0: Inactive
pended pended pended pended 1: Active 1: Active 1: Active
1: Pended 1: Pended 1: Pended 1: Pended
23 22 21 20 19 18 17 16
bit Symbol USG BUS MEM
FAULT FAULT FAULT
ENA ENA ENA
Read/Write R R/W R/W R/W
After reset 0 0 0 0
Function “0” is read. Usage Bus Fault Memory
Fault Management
0: Disable 0: Disable 0: Disable
1: Enable 1: Enable 1: Enable
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
(Note) Extreme caution is needed to clear or set the active bits, because clearing and setting
these bits does not repair stack contents.
7 6 5 4 3 2 1 0
CGIMCGA bit Symbol EMCG02 EMCG01 EMCG00 EMST01 EMST00 INT0EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT0 standby Active state of INT0 Reads as INT0 clear
clear request. (101~111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
15 14 13 12 11 10 9 8
bit Symbol EMCG12 EMCG11 EMCG10 EMST11 EMST10 INT1EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT1 standby Active state of INT1 Reads as INT1 clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
23 22 21 20 19 18 17 16
bit Symbol EMCG22 EMCG21 EMCG20 EMST21 EMST20 INT2EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT2 standby Active state of INT2 Reads as INT2 clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
31 30 29 28 27 26 25 24
bit Symbol EMCG32 EMCG31 EMCG30 EMST31 EMST30 INT3EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT3 standby Active state of INT3 Reads as INT3 clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
(Note1) EMSTxx is effective only when EMCGxx is set to "100" for both rising and falling
edge. The active level used for the reset of standby can be checked by referring
EMSTxx. If interrupts are cleared with the CGICRCG register, EMSTxx is also
cleared.
(Note2) Please specify the bit for the edge first and then specify the bit for the <INTxEN>.
Setting them simultaneously is prohibited.
This resister set the clearing standby request active level of external interrupt INT4 to INT7.
7 6 5 4 3 2 1 0
CGIMCGB bit Symbol EMCG42 EMCG41 EMCG40 EMST41 EMST40 INT4EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT4 standby Active state of INT4 Reads as INT4 clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
15 14 13 12 11 10 9 8
bit Symbol EMCG52 EMCG51 EMCG50 EMST51 EMST50 INT5EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT5 standby Active state of INT5 Reads as INT5 clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
23 22 21 20 19 18 17 16
bit Symbol EMCG62 EMCG61 EMCG60 EMST61 EMST60 INT6EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT6 standby Active state of INT6 Reads as INT6 clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
31 30 29 28 27 26 25 24
bit Symbol EMCG72 EMCG71 EMCG70 EMST71 EMST70 INT7EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT7 standby Active state of INT7 Reads as INT7 clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
(Note1) EMSTxx is effective only when EMCGxx is set to "100" for both rising and falling
edge. The active level used for the reset of standby can be checked by referring
EMSTxx. If interrupts are cleared with the CGICRCG register, EMSTxx is also
cleared.
(Note2) Please specify the bit for the edge first and then specify the bit for the <INTxEN>.
Setting them simultaneously is prohibited.
This resister set the clearing standby request active level of external interrupt INT8 to INTB.
7 6 5 4 3 2 1 0
CGIMCGC bit Symbol EMCG82 EMCG81 EMCG80 EMST81 EMST80 INT8EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT8 standby Active state of INT8 Reads as INT8 clear
clear request. (101~111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
15 14 13 12 11 10 9 8
bit Symbol EMCG92 EMCG91 EMCG90 EMST91 EMST90 INT9EN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INT9 standby Active state of INT9 Reads as INT9 clear
clear request. (101~111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
23 22 21 20 19 18 17 16
bit Symbol EMCGA2 EMCGA1 EMCGA0 EMSTA1 EMSTA0 INTAEN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INTA standby Active state of INTA Reads as INTA clear
clear request. (101~111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
31 30 29 28 27 26 25 24
bit Symbol EMCGB2 EMCGB1 EMCGB0 EMSTB1 EMSTB0 INTBEN
Read/Write R R/W R R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INTB standby Active state of INTB Reads as INTB clear
clear request. (101~111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
(Note1) EMSTxx is effective only when EMCGxx is set to "100" for both rising and falling
edge. The active level used for the reset of standby can be checked by referring
EMSTxx. If interrupts are cleared with the CGICRCG register, EMSTxx is also
cleared.
(Note2) Please specify the bit for the edge first and then specify the bit for the <INTxEN>.
Setting them simultaneously is prohibited.
This resister set the clearing standby request active level of external interrupt INTC to INTF.
7 6 5 4 3 2 1 0
CGIMCGD bit Symbol EMCGC2 EMCGC1 EMCGC0 EMSTC1 EMSTC0 INTCEN
Read/Write R R/W R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INTC standby Active state of INTC Reads as INTC clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
15 14 13 12 11 10 9 8
bit Symbol EMCGD2 EMCGD1 EMCGD0 EMSTD1 EMSTD0 INTDEN
Read/Write R R/W R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INTD standby Active state of INTD Reads as INTD clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
23 22 21 20 19 18 17 16
bit Symbol EMCGE2 EMCGE1 EMCGE0 EMSTE1 EMSTE0 INTEEN
Read/Write R R/W R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INTE standby Active state of INTE Reads as INTE clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
31 30 29 28 27 26 25 24
bit Symbol EMCGF2 EMCGF1 EMCGF0 EMSTF1 EMSTF0 INTFEN
Read/Write R R/W R R/W
After reset 0 0 1 0 0 0 Undefined 0
Function “0” is read Active state setting of INTF standby Active state of INTF Reads as INTF clear
clear request. (101 to 111: setting standby clear request undefined. input
prohibited)
000: “L” level 00: - 0: Disable
001: “H” level 01: Rising edge 1: Enable
010: Falling edge 10: Falling edge
011: Rising edge 11: Both edges
100: Both edges
(Note1) EMSTxx is effective only when EMCGxx is set to "100" for both rising and falling
edge. The active level used for the reset of standby can be checked by referring
EMSTxx. If interrupts are cleared with the CGICRCG register, EMSTxx is also
cleared.
(Note2) Please specify the bit for the edge first and then specify the bit for the <INTxEN>.
Setting them simultaneously is prohibited.
Be sure to set active state of the Standby clear request, in case the interrupt is enabled for clearing the
Standby modes.
(Note 1) When using interrupts, be sure to follow the sequence of actions shown below:
1) If the external intrrupt request pin shared with other general ports, enable the port to receive the
interrupt.
2) Set conditions such as active state upon initialization.
3) Clear interrupt requests.
4) Enable interrupts.
(Note 2) Each settings must be performed while interrupts are disabled.
(Note 3) For clearing the Standby modes , 16 interrupt factors (INT0 to INTF) are available. CGIMCGA to
CGIMCGD Resisters in CG are used for selecting edge/level of active state and which
aforementioned factors are used for clearing the standby modes.
(Note 4) In case the standby mode clear is not required, INT0 to INTF can be used as a normal interrupt
without setting CGIMCGA to CGIMCGD Resisters in CG.
7 6 5 4 3 2 1 0
CGICRCG bit Symbol ICRCG4 ICRCG3 ICRCG2 ICRCG1 ICRCG0
Read/Write R W
After reset 0 0 0 0 0 0
Function “0” is read. Clear interrupt requests
0_0000:INT0 0_1000:INT8
0_0001:INT1 0_1001:INT9
0_0010:INT2 0_1010:INTA
0_0011:INT3 0_1011:INTB
0_0100:INT4 0_1100:INTC
0_0101:INT5 0_1101:INTD
0_0110:INT6 0_1110:INTE
0_0111:INT7 0_1111:INTF
1_0000 to 1_1111: setting prohibited
* ”0” is read.
15 14 13 12 11 10 9 8
bit Symbol
Read/Write R
After reset 0
Function “0” is read.。
23 22 21 20 19 18 17 16
bit Symbol
Read/Write
After reset
Function “0” is read.。
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0
Function “0” is read.
CGNMIFLG 7 6 5 4 3 2 1 0
bit Symbol NMIFLG0
Read/Write R
After reset 0 0 0 0 0 0 0 0
0:not
applicable
1:
generated
from WDT
15 14 13 12 11 10 9 8
bit Symbol
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
23 22 21 20 19 18 17 16
bit Symbol
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After reset 0 0 0 0 0 0 0 0
Function “0” is read.
Reset Flag Resister is a resister for reading internal Reset generation status per generation factors.
Since this register is not cleared automatically, it is necceary to write “0” to clear the register.
CGRSTFLG 7 6 5 4 3 2 1 0
bit Symbol OFDRSTF SYSRSTF VLTDRSTF WDTRSTF PINRSTF PONRSTF
Read/Write R R/W R/W R/W R/W R/W R/W
After pin reset 0 0 0 0 0 0 0 1/0
Function “0” is read. OFD reset Debug reset VLTD reset WDT reset RESETpin Power On
flag flag (Note 1) flag. flag flag Reset
flag
23 22 21 20 19 18 17 16
bit Symbol
Read/Write R
After pin reset 0 0 0 0 0 0 0 0
Function “0” is read.
31 30 29 28 27 26 25 24
bit Symbol
Read/Write R
After pin reset 0 0 0 0 0 0 0 0
Function “0” is read.
(Note 1) This flag indicates a reset generated by the SYSRESETREQ bit of the Application
Interrupt and Reset Control Register of the CPU's NVIC.
(Note 2) This register is not cleared automatically. Write "0" to clear the register.
8 Input/Output Ports
8.1 Port registers
The port A is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port A performs the
serial interface function and the external interrupt input and 16-bit timer input and 16-bit timer output.
Reset initializes all bits of the port A as general-purpose ports with input, output, pull-up and pull-down
disabled.
To use the external interrupt input for releasing STOP mode, select this function in the PAFR2 register
and enable input in the PAIE register. These settings enable the interrupt input even if the
CGSTBYCR<DRVE> bit in the clock/mode control block is set to stop driving of pins during STOP
mode.
(Note) In modes other than STOP mode, interrupt input is enabled regardless of the PxFR
register setting as long as input is enabled in PxIE. Make sure to disable unused
interrupts when programming the device.
Port A register
7 6 5 4 3 2 1 0
PADATA Bit Symbol PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0
(0x4000_0000) Read/Write R/W
After reset “0”
The port B is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port B performs the
debug communication function and the debug trace output function.
Reset initializes PB3, PB4, PB5, PB6 and PB7 to perform debug communication function.When PB3
functions as the TMS or SWDIO, input, output and pull-up are enabled. When PB4 functions as the TCK
or SWCLK, input, pull-down are enabled. When PB5 functions as the TDO or SWV, output is enabled.
When PB6 functions TDI, input, pull-up are enabled. When PB7 functions as TRST input, pull-up is
enabled. PB0, PB1, PB2 perform as the general-purpose ports with input, output and pull-up disabled.
(Note 1) The default setting for PB3 is function port. Input, output, and pull-up are enabled.
(Note 2) The default setting for PB4 is function port. Input, and pull-down are enabled.
(Note 3) The default setting for PB5 is function port. Output is enabled.
(Note 4) The default setting for PB6 and PB7 are function port. Input and pull-up are enabled.
(Note 5) If PB3 and PB5 are configured to alternated function port for debug function, outputs
are enabled even during Stop mode regardless of the CGSTBYCR<DRVE> bit setting.
7 6 5 4 3 2 1 0
Type T7 T7 T19 T8 T6 T18 T18 T18
Port B register
7 6 5 4 3 2 1 0
PBDATA Bit Symbol PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0
(0x4000_0040) Read/Write R/W
After reset “0”
The port C is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the ports C perform the
input/output port for three-phase moter control (PMD).
Reset initializes all bits of the port C as general-purpose ports with input, output, pull-up and
pull-down disabled.
7 6 5 4 3 2 1 0
Type T3 T3 T1 T1 T1 T1 T1 T1
Port C register
7 6 5 4 3 2 1 0
PCDATA Bit Symbol PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0
(0x4000_0080) Read/Write R/W
After reset “0”
The port D is a general-purpose, 7-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port D performs the
serial interface function, 16-bit timer input/output, the external interrupt input and encoder input.
Reset initializes all bits of the port D as general-purpose ports with input, output, pull-up and
pull-down disabled.
To use the external interrupt input for releasing STOP mode, select this function in the PDFR1 register
and enable input in the PDIE register. These settings enable the interrupt input even if the
CGSTBYCR<DRVE> bit in the clock/mode control block is set to stop driving of pins during STOP
mode.
(Note) In modes other than STOP mode, interrupt input is enabled regardless of the PxFR
register setting as long as input is enabled in PxIE. Make sure to disable unused
interrupts when programming the device.
7 6 5 4 3 2 1 0
Type - T3 T2 T9 T4 T3 T10 T11
Port D register
7 6 5 4 3 2 1 0
PDDATA Bit Symbol - PD6 PD5 PD4 PD3 PD2 PD1 PD0
(0x4000_00C0) Read/Write R R/W
After reset “0” is read. “0”
The port E is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port E performs the
serial interface function, timer input/output and the external interrupt input.
Reset initializes all bits of the port E as general-purpose ports with input, output, pull-up and pull-down
disabled.
To use the external interrupt input for releasing STOP mode, select this function in the PEFR2 register
and enable input in the PEIE register. These settings enable the interrupt input even if the
CGSTBYCR<DRVE> bit in the clock/mode control block is set to stop driving of pins during STOP
mode.
(Note) In modes other than STOP mode, interrupt input is enabled regardless of the PxFR
register setting as long as input is enabled in PxIE. Make sure to disable unused
interrupts when programming the device.
7 6 5 4 3 2 1 0
Type T14 T12 T2 T12 T2 T9 T3 T2
Port E register
7 6 5 4 3 2 1 0
PEDATA Bit Symbol PE7 PE6 PE5 PE4 PE3 PE2 PE1 PE0
(0x4000_0100) Read/Write R/W
After reset “0”
Port F register
7 6 5 4 3 2 1 0
PFDATA Bit Symbol - - - PF4 PF3 PF2 PF1 PF0
(0x4000_0140) Read/Write R R/W
After reset “0” is read. “0”
1:CTS3
The port G is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port G performs the
input/output port for three-phase moter control (PMD).
Reset initializes all bits of the port G as general-purpose ports with input, output, pull-up and
pull-down disabled.
7 6 5 4 3 2 1 0
Type T3 T3 T1 T1 T1 T1 T1 T1
Port G register
7 6 5 4 3 2 1 0
PGDATA Bit Symbol PG7 PG6 PG5 PG4 PG3 PG2 PG1 PG0
(0x4000_0180) Read/Write R/W
After reset “0”
The port H is a general-purpose 8-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port H performs the
analog input of the A/D converter and the external interrupt input.
Reset initializes all bits of the port H as general-purpose ports with input, output, pull-up and
pull-down disabled.
To use the external interrupt input for releasing STOP mode, select this function in the PHFR1 register
and enable input in the PHIE register. These settings enable the interrupt input even if the
CGSTBYCR<DRVE> bit in the clock/mode control block is set to stop driving of pins during STOP
mode.
(Note 1) In modes other than STOP mode, interrupt input is enabled regardless of the PxFR
register setting as long as input is enabled in PxIE. Make sure to disable unused
interrupts when programming the device.
(Note 2) Unless you use all the bits of port H as analog input pins, conversion accuracy may be
reduced. Be sure to verify that this causes no problem on your system.
7 6 5 4 3 2 1 0
Type T16 T16 T16 T16 T16 T17 T17 T17
Port H register
7 6 5 4 3 2 1 0
PHDATA Bit Symbol PH7 PH6 PH5 PH4 PH3 PH2 PH1 PH0
(0x4000_01C0) Read/Write R/W
After reset “0”
The port I is a general-purpose, 4-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port I performs the
analog input of the A/D converter.
Reset initializes all bits of the port I as general-purpose ports with input, output, pull-up and pull-down
disabled.
(Note) Unless you use all the bits of port I as analog input pins, conversion accuracy may be
reduced. Be sure to verify that this causes no problem on your system.
7 6 5 4 3 2 1 0
Type - - - - T16 T16 T16 T16
Port I register
7 6 5 4 3 2 1 0
PIDATA Bit Symbol - - - - PI3 PI2 PI1 PI0
(0x4000_0200) Read/Write R R/W
After reset “0” is read “0”
The port J is a general-purpose, 8-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port J performs the
analog input of the A/D converter and external interrupt input.
Reset initializes all bits of the port J as general-purpose ports with input, output, pull-up and pull-down
disabled.
To use the external interrupt input for releasing STOP mode, select this function in the PJFR1 register
and enable input in the PJIE register. These settings enable the interrupt input even if the
CGSTBYCR<DRVE> bit in the clock/mode control block is set to stop driving of pins during STOP
mode.
(Note 1) In modes other than STOP mode, interrupt input is enabled regardless of the PxFR
register setting as long as input is enabled in PxIE. Make sure to disable unused
interrupts when programming the device.
(Note 2) Unless you use all the bits of port J as analog input pins, conversion accuracy may be
reduced. Be sure to verify that this causes no problem on your system.
7 6 5 4 3 2 1 0
Type T17 T17 T16 T16 T16 T16 T16 T16
Port J register
7 6 5 4 3 2 1 0
PJDATA Bit Symbol PJ7 PJ6 PJ5 PJ4 PJ3 PJ2 PJ1 PJ0
(0x4000_0240) Read/Write R/W
After reset “0”
The port K is a general-purpose, 2-bit input/output port. For this port, inputs and outputs can be
specified in units of bits. Besides the general-purpose input/output function, the port K performs the
functions as the analog input of the A/D converter and the external interrupt input.
Reset initializes all bits of the port K as general-purpose ports with input, output, pull-up and pull-down
disabled.
To use the external interrupt input for releasing STOP mode, select this function in the PKFR1 register
and enable input in the PKIE register. These settings enable the interrupt input even if the
CGSTBYCR<DRVE> bit in the clock/mode control block is set to stop driving of pins during STOP
mode.
(Note 1) In modes other than STOP mode, interrupt input is enabled regardless of the PxFR
register setting as long as input is enabled in PxIE. Make sure to disable unused
interrupts when programming the device.
(Note 2) Unless you use all the bits of port K as analog input pins, conversion accuracy may be
reduced. Be sure to verify that this causes no problem on your system.
7 6 5 4 3 2 1 0
Type - - - - - - T17 T17
Port K register
7 6 5 4 3 2 1 0
PKDATA Bit Symbol - - - - - - PK1 PK0
(0x4000_0280) Read/Write R R/W
After reset “0” is read “0”
The port L is a general-purpose, 2-bit input port. For this port, inputs can be specified in units of bits.
Besides the general-purpose input function, the port L performs the functions as the external interrupt
input.
Reset initializes all bits of the port L as general-purpose input ports with input disabled.
To use the external interrupt input for releasing STOP mode, select this function in the PLFR1 register
and enable input in the PLIE register. These settings enable the interrupt input even if the
CGSTBYCR<DRVE> bit in the clock/mode control block is set to stop driving of pins during STOP
mode.
(Note1) In modes other than STOP mode, interrupt input is enabled regardless of the PxFR
register setting as long as input is enabled in PxIE. Make sure to disable unused
interrupts when programming the device.
(Note2)
When the power supply switch on, please keep ‘L’ level to port_L, constant time.
(include in reset time) The details please watch ‘Notice for the power supply’ of
‘Electrical Characteristics’.
7 6 5 4 3 2 1 0
Type - - - - - - T5 T5
Port L register
7 6 5 4 3 2 1 0
PL Bit Symbol - - - - - - PL1 PL0
(0x4000_02C0) Read/Write R R
After reset “0” is read “0”
The ports are classified into 21 types shown below. Please refer to the following pages for the block diagrams
of each port type.
T2 i/o o - - - R R ○
T3 i/o i - - - R R ○
T4 i/o i(int) - - - R R ○
T5 i i(int) - - - - - -
T7 i/o i - - - NoR - -
T8 i/o i - - - - NoR -
T9 i/o i/o i - - R R ○
T10 i/o i o - - R R ○
T11 i/o i i - - R R ○
T13 i/o o o - - R R ○
T16 i/o - - - ○ R R ○
T18 i/o o - - - R - -
8.3.2 Type T1
Type T1 is a general-purpose input/output port with pull-up and pull-down. It is used to output function
data as well.
The function output is controlled by an enable signal. If enabled, the function data is output.
Drive時のドライブ禁止
STOP disable in RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
プルダウン
pull-down
PxUP
PxDN
PxCR
0
Internal Data Bus
内部データバス
機能出力許可
Function output control
1
PxFR1
機能出力output1
Function 1 I/O port
1
ポート
PxDATA 入出力
0
PxOD
PxIE
1
ポートリード
Port read
8.3.3 Type T2
Type T2 is a general-purpose input/output port with pull-up and pull-down. It is used to output function
data as well.
Drive
STOP disable in
時のドライブ禁止 RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
Internal Data Bus
内部データバス
PxFR1
Function
機能出力 output1
1 I/O port
1
ポート
PxDATA 入出力
0
PxOD
PxIE
1
ポートリード
Port read
8.3.4 Type T3
Type T3 is a general-purpose input/output port with pull-up and pull-down. It is used to input function
data as well.
Drive
STOP disable in
時のドライブ禁止 RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
内部データバス
Internal Data Bus
PxFR1
I/O port
ポート
PxDATA 入出力
PxOD
PxIE
1
Port read
ポートリード
機能入力
Function input11
8.3.5 Type T4
Type T4 is a general-purpose input/output port with pull-up and pull-down. It is used to output function
data and interrupt input as well.
STOP 時のドライブ禁止
Drive disable in RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
プルダウン
pull-down
PxUP
PxDN
PxCR
内部データバス
Internal Data Bus
PxFR1
I/O port
ポート
PxDATA 入出力
PxOD
PxIE
1
ポートリード
Port read
割り込み入力
Interrupt
input
8.3.6 Type T5
Drive
STOP disable in
時のドライブ禁止
Stop mode
PxFR1
内部データバス
Internal Data Bus
PxIE
0
I/O port
ポート
1 入出力
Port read
ポートリード
Interrupt
割り込み入力
input
8.3.7 Type T6
Type T6 is a general-purpose port with pull-up. It is used to output function data and input interrupt as
well.
The function output is controlled by an enable signal. If enabled, the function data is output.
Drive
STOP disable in
時のドライブ禁止
Stop mode Programmable
プログラマブル
PxUP pull-up
プルアップ
PxCR
0
Function output control
機能出力許可
内部データバス
1
Internal Data Bus
PxFR1
機能出力
Function 1
output1 I/O port
1
ポート
PxDATA 入出力
0
PxIE
1
Port read
ポートリード
機能入力
Function input11
8.3.8 Type T7
Type T7 is a general-purpose input/output port with pull-up. It is used to input function data as well.
Drive
STOP disable in
時のドライブ禁止 RESET
Stop mode プログラマブル
Programmable
PxUP プルアップ
pull-up
PxCR
Internal Data Bus
内部データバス
PxFR1
I/O port
ポート
PxDATA 入出力
PxIE
1
Port read
ポートリード
機能入力
Function input11
8.3.9 Type T8
Type T8 is a general-purpose input/output port with pull-down. It is used to input function data as well.
Drive
STOP disable in
時のドライブ禁止 RESET
Stop mode プログラマブル
Programmable
PxDN プルダウン
pull-down
PxCR
内部データバス
Internal Data Bus
PxFR1
I/O port
ポート
PxDATA 入出力
PxIE
1
Port read
ポートリード
機能入力
Function input1
1
8.3.10 Type T9
Type T9 is a general-purpose input/output port with pull-up and pull-down. It is used to output function
data and two input function data as well.
Drive
STOP disable in
時のドライブ禁止 RESET Programmable
Stop mode プログラマブル
pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
Internal Data Bus
内部データバス
PxFR1
PxFR2
Function output1 I/O port
機能出力 1 1
ポート
PxDATA 入出力
0
PxOD
PxIE
1
Port read
ポートリード
Function input11
機能入力
機能入力
Function input22
Drive
STOP disable in
時のドライブ禁止 RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
Internal Data Bus
内部データバス
PxFR1
PxFR2
I/O port
機能出力
Function output1
1 1
ポート
PxDATA 入出力
0
PxOD
PxIE
1
Port read
ポートリード
機能入力
Function input11
Type T11 is a general-purpose input/output port with pull-up and pull-down. It is used to two input
function data as well.
Drive
STOP disable in
時のドライブ禁止 RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
プルダウン
pull-down
PxUP
PxDN
PxCR
Internal Data Bus
内部データバス
PxFR1
PxFR2
I/O port
ポート
PxDATA 入出力
PxOD
PxIE
1
Port read
ポートリード
機能入力
Function input11
機能入力
Function 2
input2
Type T12 is a general-purpose input/output port with pull-up and pull-down. It is used to input function
data and interrupt input as well.
Drive
STOP disable in
時のドライブ禁止 RESET Programmable
Stop mode プログラマブル
pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
内部データバス
Internal Data Bus
PxFR1
PxFR2
I/O port
ポート
PxDATA 入出力
PxOD
PxIE
1
Port read
ポートリード
Interrupt
割り込み入力
input
Function input1
機能入力 1
Type T13 is a general-purpose input/output port with pull-up and pull-down. It is used to two output
function data as well.
Drive
STOP disable in
時のドライブ禁止 RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
Internal Data Bus
PxFR1
内部データバス
PxFR2
機能出力
Function input
22 I/O port
1
機能出力 1 1
Function input 1 ポート
入出力
PxDATA 0
0
PxOD
PxIE
1
Port read
ポートリード
Type T14 is a general-purpose input/output port with pull-up and pull-down. It is used to output
function data and interrupt input as well.
STOP 時のドライブ禁止
Drive disable in RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
Internal Data Bus
内部データバス
PxFR1
PxFR2
Function
機能出力 output
1 1 I/O port
1
ポート
PxDATA 入出力
0
PxOD
PxIE
1
Port read
ポートリード
Interrupt
割り込み入力 input
Type T15 is a general-purpose input/output port with pull-up and pull-down. It is used to output
function data and three input function data as well.
STOP 時のドライブ禁止
Drive disable in RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
PxFR1
Internal Data Bus
内部データバス
PxFR2
PxFR3
Function output1 I/O port
機能出力 2 1
ポート
PxDATA 入出力
0
PxOD
PxIE
1
Port read
ポートリード
Function input11
機能入力
機能入力
Function input22
機能入力
Function input33
Type T16 is a general-purpose input/output port with pull-up and pull-down. It is used to input analog
signals for A/D converter as well.
STOP 時のドライブ禁止
Drive disable in RESET
Programmable
プログラマブル
Stop mode プルアップ/
pull-up and
プルダウン
pull-down
PxUP
PxDN
PxCR
Internal Data Bus
内部データバス
I/O port
ポート
PxDATA 入出力
PxOD
PxIE
1
Port read
ポートリード
アナログ入力
Analog input
Type T17 is a general-purpose input/output port with pull-up and pull-down. It is used to input analog
signals for A/D converter and interrupt input as well.
Drive
STOP disable in
時のドライブ禁止 RESET Programmable
プログラマブル
Stop mode pull-up and
プルアップ/
pull-down
プルダウン
PxUP
PxDN
PxCR
Internal Data Bus
内部データバス
PxFR1
I/O port
ポート
PxDATA 入出力
PxOD
PxIE
1
Port read
ポートリード
Interrupt
input
割り込み入力
Analog
アナログ入力
input
Fig 8.17 Type T17
Type T18 is a general-purpose input/output port with pull-up. It is used to output function data as well.
Drive
STOP disable in
時のドライブ禁止 RESET
Stop mode Programmable
プログラマブル
プルアップ
pull-up
PxUP
PxCR
Internal Data Bus
内部データバス
PxFR1
機能出力
Function 1
output1 I/O port
1
ポート
PxDATA 入出力
0
PxIE
1
Port read
ポートリード
Type T19 is a general-purpose port with pull-up. It is used to output function data as well.
The function output is controlled by an enable signal. If enabled, the function data is output.
Drive
STOP disable in
時のドライブ禁止
Stop mode Programmable
プログラマブル
PxUP pull-up
プルアップ
PxCR
0
機能出力許可
Function output control
Internal Data Bus
内部データバス
1
PxFR1
機能出力
Function output1
1 I/O port
1
ポート
PxDATA 入出力
0
PxIE
1
Port read
ポートリード
Type T20 is a general-purpose input/output port with pull-up and pull-down. It is used to input function
data as well.
During reset, it functions as an input port for a BOOT signal.
Drive
STOP disable in
時のドライブ禁止 RESET
Stop mode Programmable
プログラマブル
pull-up and
プルアップ/
PxUP プルダウン
pull-down
PxDN
PxCR
内部デー タバス
Internal Data Bus
PxFR1
I/O port
ポート
PxDATA 入出力
PxIE
1
Port read
ポートリード
機能入力
Function input11
BOOT
9.1 Outline
TMPM370 have the eight channels multi-functional 16-bit timer/event counter. (TMRB0 through
TMRB7) TMRBs operate in the following four operation modes:
The use of the capture function allows TMRBs to perform the following two measurements
Pulse width measurement
One-shot pulse generation from an external trigger pulse
Channels (TMRB0 through TMRB7) operate independently and the functions are same except the
differences as shown in Table 9-1 and Table 9-2. Therefore, the operational descriptions here are
explained only for TMRB0.
External pins
Specification
External clock/
Channel Timer flip-flop output pin
capture trigger input pin
INTCAP00 INTTB00
TMRB0
INTCAP01 INTTB01
INTCAP10 INTTB10
TMRB1
INTCAP11 INTTB11
INTCAP20 INTTB20
TMRB2
INTCAP21 INTTB21
INTCAP30 INTTB30
TMRB3
INTCAP31 INTTB31
INTCAP40 INTTB40
TMRB4
INTCAP41 INTTB41
INTCAP50 INTTB50
TMRB5
INTCAP51 INTTB51
INTCAP60 INTTB60
TMRB6
INTCAP61 INTTB61
INTCAP70 INTTB70
TMRB7
INTCAP71 INTTB71
9.3 Configuration
Each channel consists of a 16-bit up-counter, two 16-bit timer registers (one of which is
double-buffered), two 16-bit capture registers, two comparators, a capture input control, a timer
flip-flop and its associated control circuit.
Timer operation modes and the timer flip-flop are controlled by registers.
Fig. 9-1 TMRB0 Block Diagram (the same applies to channels 1 through7)
9.4 Registers
Timer up counter
TB0UC 0x4001_001C TB1UC 0x4001_005C TB2UC 0x4001_009C TB3UC 0x4001_00DC
register
TB0RG0 0x4001_0020 TB1RG0 0x4001_0060 TB2RG0 0x4001_00A0 TB3RG0 0x4001_00E0
Timer register
TB0RG1 0x4001_0024 TB1RG1 0x4001_0064 TB2RG1 0x4001_00A4 TB3RG1 0x4001_00E4
TB0CP0 0x4001_0028 TB1CP0 0x4001_0068 TB2CP0 0x4001_00A8 TB3CP0 0x4001_00E8
Capture register
TB0CP1 0x4001_002C TB1CP1 0x4001_006C TB2CP1 0x4001_00AC TB3CP1 0x4001_00EC
Channel
TMRB4 TMRB5 TMRB6 TMRB7
Specification
Timer enable register TB4EN 0x4001_0100 TB5EN 0x4001_0140 TB6EN 0x4001_0180 TB7EN 0x4001_01C0
Timer RUN register TB4RUN 0x4001_0104 TB5RUN 0x4001_0144 TB6RUN 0x4001_0184 TB7RUN 0x4001_01C4
Timer control register TB4CR 0x4001_0108 TB5CR 0x4001_0148 TB6CR 0x4001_0188 TB7CR 0x4001_01C8
Timer mode register TB4MOD 0x4001_010C TB5MOD 0x4001_014C TB6MOD 0x4001_018C TB7MOD 0x4001_01CC
Timer flip-flop control
TB4FFCR 0x4001_0110 TB5FFCR 0x4001_0150 TB6FFCR 0x4001_0190 TB7FFCR 0x4001_01D0
register
Register Timer status register TB4ST 0x4001_0114 TB5ST 0x4001_0154 TB6ST 0x4001_0194 TB7ST 0x4001_01D4
names
(addresses) Interrupt mask register TB4IM 0x4001_0118 TB5IM 0x4001_0158 TB6IM 0x4001_0198 TB7IM 0x4001_01D8
Timer up counter
TB4UC 0x4001_011C TB5UC 0x4001_015C TB6UC 0x4001_019C TB7UC 0x4001_01DC
register
TB4RG0 0x4001_0120 TB5RG0 0x4001_0160 TB6RG0 0x4001_01A0 TB7RG0 0x4001_01E0
Timer register
TB4RG1 0x4001_0124 TB5RG1 0x4001_0164 TB6RG1 0x4001_01A4 TB7RG1 0x4001_01E4
TB4CP0 0x4001_0128 TB5CP0 0x4001_0168 TB6CP0 0x4001_01A8 TB7CP0 0x4001_01E8
Capture register
TB4CP1 0x4001_012C TB5CP1 0x4001_016C TB6CP1 0x4001_01AC TB7CP1 0x4001_01EC
<TBnEN>: Specifies the TMRBn operation. When the operation is disabled, no clock is supplied to the
other registers in the TMRBn module. This can reduce power consumption. (This disables
reading from and writing to the other registers.)
To use the TMRBn, enable the TMRBn operation (set to “1”) before programming each register
in the TMRBn module.
After the TMRBn operation is executed and then disabled, the settings will be maintained in
each registers.
(Note1) TBnCR resister must not be changed during Timer operation TBnRUN<TERUN>=1”.
(Note2) When the external trigger start is used (<CSSELn>=”1”), select <CSSELn> and
<TRGSELn> before the setting of <TBnRUN>=<TBnPRUN>=”1”.
1: Must be
written
simultaneo
usly
<TBnCP0>:Captures count values by software and takes them into capture register 0 (TBnCP0).
00: software capture
01: Don’t care
<TBnRSWR>: Controls the timing to write to timer registers 0 and 1 when double buffering is enabled.
0: The data transfer to the timer register 0 and 1 is done by corresponding to the up-counter
(UC) regardless of the rewriting of the buffer register 0 and 1.
1: To transfer the buffer registers data to the timer registers, the writing of the timer register 0
and 1 together are needed.
(Note) TBnFFCR register must not be changed during Timer operation TBnRUN<TBRUN>=”1”.
(Note) If any interrupt is generated, the flag that corresponds to the interrupt is set to TBnST and
the generation of interrupt enabled by TBnIM is notified to the CPU.
The flag is cleared by reading the TBnST register.
(Note) Even in case TBnIM set interrupt Mask, TBnST status register have an interrupt requested status.
The channels operate in the same way, except for the differences in their specifications as shown in Table 9-1
and Table 9-2 . Therefore, the operational descriptions here are only for channel 0.
9.5.1 Prescaler
There is a 4-bit prescaler to generate the source clock for up-counter UC. The prescaler input
clock φT0 is fperiph, fperiph/2, fperiph/4, fperiph/8, fperiph/16 or fperiph/32 selected by
SYSCR1<PRCLK2:0> in the CG. The peripheral clock, fperiph, is either fgear, a clock selected by
SYSCR1<FPSEL> in the CG, or fc, which is a clock before it is divided by the clock gear.
The operation or the stop of a prescaler is set with TB0RUN<TB0PRUN> where writing “1” starts
counting and writing “0” clears and stops counting. Table 9-4 show prescaler output clock
resolutions.
(Note 1) The prescaler output clock φTn must be selected as φTn<fsys. (φTn is slower than
fsys).
(Note 2) Do not change the clock gear while the timer is operating.
• Source clock
UC source clock, specified by TB0MOD<TB0CLK1:0>, can be selected from either three
types φT1, φT4 and φT16 of prescaler output clock or the external clock of the TB0IN pin.
• Timing to clear UC
1) When a compare match is detected
By setting TB0MOD<TB0CLE> = “1”, UC is cleared in case the comparator detects a
match between counter value and the value set in TB0RG1. UC operates as a
free-running counter if TB0MOD<TB0CLE> = “0”.
2) When UC stops
UC stops counting and clears counter value if TB0RUN <TB0RUN> = “0”.
• UC overflow
If UC overflow occurs, the INTTB00 overflow interrupt is generated.
• Interrupt
INTTB00 is generated by UC count value matching with TB0RG0 value.
INTTB01 is generated by UC count value matching with TB0RG1 value.
Software can also be used to capture values from the UC up-counter into the capture register;
specifically, UC values are taken into the TB0CP0 capture register each time “0” is written to
TB0MOD<TB0CP0>. To use this capability, the prescaler must be running
(TB0RUN<TB0PRUN> = “1”).
The value of TB0FF0 becomes undefined after a reset. The flip-flop can be reversed by
writing “00” to TB0FFCR<TB0FF0C1:0>. It can be set to “1” by writing “01,” and can be cleared
to “0” by writing “10.”
The TB0FF0 value can be output to the timer output pin:TB0OUT (shared with PA1). To
enable timer output, the port A related registers PACR and PAFR1 must be programmed
beforehand.
The up-counter counts up on the rising edge of TB0IN pin input. It is possible to read the
count value by capturing value using software and reading the captured value.
Programmable square waves can be output from the TB0OUT pin by triggering the timer
flip-flop (TB0FF0) to reverse when the set value of the up-counter (UC) matches the set
values of the timer registers (TB0RG0 and TB0RG1). Note that the set values of TB0RG0
and TB0RG1 must satisfy the following requirement:
In this mode, by enabling the double buffering of TB0RG0 and TB0RG1, the value of
register buffers are shifted into TB0RG0 and TB0RG1 when the set value of the up-counter
matches the set value of TB0RG1. Since software writing time is secured by double buffer,
this facilitates handling of small duties pulse.
Register buffer Q2 Q3
Write TB0RG0
TB0RUN<TB0RUN>
TB0OUT (PPG output)
Selector
TB0IN0
φT1 16-bit up-counter UC0 F/F
φT4 Clear
φT16 (TB0FF0)
Match
16-bit comparator 16-bit comparator
TB0RG0-WR
Each register in the 16-bit PPG output mode must be programmed as listed below.
7 6 5 4 3 2 1 0
TB0EN ← 1 X X X X X X X Starts the TMRB0 module.
TB0RUN ← X X X X X 0 X 0 Stops the TMRB0
Using an external count start trigger enables one-shot pulse generation with a short delay.
(1) The 16-bit up-counter (UC) is programmed to count up on the rising edge of the TB0IN pin
(TB0CR<TRGSEL0,CSSEL0>=”01”). The TB0RG0 is loaded with the pulse delay (d), and the
TB0RG1 is loaded with the sum of the TB0RG0 value (d) and the pulse width (P). The above
settings must be done while the 16-bit up-counter is stopped (TB0RUN<TB0RUN>=0).
(2) To enable the trigger for timer flip-flop, sets TB0FFCR<TB0E1T1, TB0E0T1> to 11. With this
setting, the timer flip-flop reverses when 16-bit up-counter (UC) corresponds to TB0RG0 or
TB0RG1.
(4) After the generation of one-shot pulse by the external trigger, to disable reverse of the timer
flip-flop or to stop 16bit counter by TB0RUN<TB0RUN> setting.
Figure 9-5 shows one-shot pulse generation, with annotations showing (d) and (p).
Counter Clock
(Internal Clock) 0 d+ p
d
TB0IN Input PIn
(External Trigger Pulse) The counter starts at the rising edge of external trigger.
INTTB00 is
generated.
TB0RG0 Match
Toggle is INTTB01
enabled. is generated.
TB0RG1 Match
Toggle is disabled for a Toggle is
capture into CAP1. enabled.
(d) (p)
Fig. 9-5 One-shot pulse generation using an external count start trigger (with a delay)
Count clock
(Internal clock) c c+d c+d +p
TB0IN pin input
(External trigger pulse) Taking data into the capture register (TB0CP0)
INTCAP00 generation
INTTB00
(d) (p)
If a delay is not required, TB0FF0 is reversed when data is taken into TB0CP0, and
TB0RG1 is set to the sum of the TB0CPO value (c) and the one-shot pulse width (p), (c + p),
by generating the INTTB00 interrupt. TB0RG1 change must be completed before the next
match. TB0FF0 is enabled to reverse when UC matches with TB0RG1, and is disabled by
generating the INTTB01 interrupt.
Count clock
(Prescaler output
clock) c c+p
TB0IN input Taking data into the capture register
(External trigger pulse)
TB0CP0. INTCAP00 generation Taking data into the capture
register TB0CP1
INTTB01 generation
Match with TB0RG1
Enable reverse
Timer output TB0OUT pin
Pulse width
Enable reverse when data is (p) Disable reverse when data is taken into
taken into TB0CP0 TB0CP1
Fig. 9-7 One-shot Pulse Output Triggered by an External Pulse (Without Delay)
The “H” level pulse width can be calculated by multiplying the difference between
TB0CP0 and TB0CP1 by the clock cycle of an internal clock.
For example, if the difference between TB0CP0 and TB0CP1 is 100 and the cycle of
the prescaler output clock is 0.5 us, the pulse width is 100 × 0.5 us = 50 us.
Caution must be exercised when measuring pulse widths exceeding the UC maximum
count time which is dependant upon the source clock used. The measurement of such
pulse widths must be made using software.
C1 C2
TB0IN pin input
(external pulse)
INTCAP00
INTCAP01
The “L” level width of an external pulse can also be measured. In such cases, the
difference between C2 generated the first time and C1 generated the second time is
initially obtained by performing the second stage of INTCAP00 interrupt processing as
shown in “Fig. 9-8 Pulse Width Measurement” and this difference is multiplied by the
cycle of the prescaler output clock to obtain the “Low” level width.
I/O interface mode Mode 0: This is the mode to transmit and receive I/O data
and associated synchronization signals (SCLK) to extend I/O.
In the above modes 1 and 2, parity bits can be added. The mode 3 has a wakeup function in which
the master controller can start up slave controllers via the serial link (multi-controller system). Fig.
10-2 shows the block diagram of SIO0.
Each channel consists of a prescaler, a serial clock generation circuit, a receive buffer, its control
circuit, a transmit buffer and its control circuit. Each channel functions independently.
As the SIOs 0 to 3 operate in the same way, only SIO0 is described here.
bit 0 1 2 3 4 5 6 7
Transmission direction
bit 7 6 5 4 3 2 1 0
Transmission direction
Prescaler
φT0 2 4 8 16 32 64 128
SC0BRCR SC0BRADD
<BR0S3: 0> <BR0K3: 0>
φT1 UART
Selector
Selector
Selector
mode
Divider
φT4 SIOCLK
φT16
φT64
SC0BRCR
<BR0ADDE> SC0MOD0 SC0MOD0
Baud rate generator <SC1, 0> <SM1, 0>
fSYS/2
Selector
÷2
I/O interface mode
SCLK0 input
(shared with
PE2)
SC0CR
I/O interface mode <IOC>
SCLK0 output Interrupt
(shared with request INTRX0
PE2) Interrupt
SC0MOD0 request INTTX0
Receive counter Serial channel Transmit counter
(÷ 16 only with UART) <WU> interrupt control (÷ 16 only with UART)
RXDCLK TXDCLK
SC0MOD0
<RXE> Receive control Transmit control CTS0
(Shared with
SC0CR
<PE> <EVEN> PE2)
SC0MOD0
<CTSE>
Parity control
10.3.1 Prescaler
The device includes a 7-bit prescaler to generate necessary clocks to drive SIO0. The input
clock φT0 to the prescaler is selected by SYSCR1 of CG <PRCK2:0> to provide the frequency of
either fperiph/1, fperiph/2, fperiph/4, fperiph/8, fperiph/16 or fperiph/32.
The clock frequency fperiph is either the clock “fgear,” to be selected by SYSCR1<FPSEL> of
CG, or the clock “fc” before it is divided by the clock gear.
The prescaler becomes active only when the baud rate generator is selected for generating the
serial transfer clock. Table 10-2 list the prescaler output clock resolution.
Clear peripheral Clock gear Prescaler clock Prescaler output clock resolution
clock value selection
<FPSEL> <GEAR2:0> <PRCK2:0>
φT1 φT4 φT16 φT64
(Note 1) The prescaler output clock φTn must be selected so that the relationship “φTn < fsys”
is satisfied (so that φTn is slower than fsys).
(Note 2) Do not change the clock gear while SIO is operating.
(Note 3) The horizontal lines in the above table indicate that the setting is prohibited.
The serial interface baud rate generator uses four different clocks, i.e., φT1, φT4, φT16 and φT64, supplied from
the prescaler output clock.
• UART mode
1) If SC0BRCR <BR0ADDE> = 0,
The setting of SC0BRADD <BR0K3:0> is ignored and the counter is divided by N
where N is the value set to SC0BRCR <BR0S3:0>. (N = 1 to 16).
2) If SC0BRCR <BR0ADDE> = 1,
The N + (16 - K)/16 division function is enabled and the division is made by using the
values N (set in SC0BRCR <BR0S3:0>) and K (set in SC0BRADD<BR0K3:0>). (N = 2
to 15, K = 1 to 15)
(Note) For the N values of 1 and 16, the above N+(16-K)/16 division function is
inhibited. So, be sure to set SC0BRCR<BR0ADDE> to “0.”
The N + (16 - K)/16 division function cannot be used in the I/O interface mode. Be sure to
divide by N, by setting SC0BRCR <BR0ADDE> to “0”.
1) UART mode
Baud rated generator input clock
Baud rate = /16
Frequency divided by the divide ratio
The highest baud rate out of the baud rate generator is 2.5 Mbps.
The fsys frequency, which is independent of the baud rate generator, can be used as
the serial clock. In this case, the highest baud rate will be 5.0 Mbps.
When it uses a double buffer, the highest baud rate generated with the baud rate
generator becomes 20Mbps. (If double buffering is not used, the highest baud rate will
be 10 Mbps).
fc/16
Baud rate = /16
(16 - 3)
7+
16
= 9.6 × 10 ÷ 16 ÷ ( 7 + 13 ) ÷ 16 = 4800 (bps)
6
16
Also, an external clock input may be used as the serial clock. The resulting baud rate
calculation is shown below:
1) UART mode
Baud Rate = external clock input / 16
In this, the period of the external clock input must be greater than 2/fsys.
The highest baud rate must be less than 80 ÷ 2 ÷ 16 = 2.5 Mbps.
The baud rate examples for the UART mode are shown in Table 10-3 and Table 10-4.
(Note) This table shows the case where the system clock is set to fc, the clock gear is set to fc/1,
and the prescaler clock is set to fperiph/2.
(Note 1) In the I/O interface mode, the TMRB4 timer output signal cannot be used internally
as the transfer clock.
(Note 2) This table shows the case where the system clock is set to fc, the clock gear is set
to fc, and the prescaler clock is set to fperiph/2.
The CPU will read the data from either the second receive buffer (SC0BUF) or from the
receive FIFO (the address is the same as that of the receive buffer). If the receive FIFO has
not been enabled, the receive buffer full flag <RBFLL> is cleared to “0” by the read
operation. The next data received can be stored in the first receive buffer even if the CPU
has not read the previous data from the second receive buffer (SC0BUF) or the receive
FIFO.
If SCLK is set to generate clock output in the I/O interface mode, the double buffer control
bit SC0MOD2 <WBUF> can be programmed to enable or disable the operation of the
second receive buffer (SCOBUF).
By disabling the second receive buffer (i.e., the double buffer function) and also disabling
the receive FIFO (SCOFCNF <CNFG> = 0 and <FDPX1:0> = 01), handshaking with the
other side of communication can be enabled and the SCLK output stops each time one
frame of data is transferred. In this setting, the CPU reads data from the first receive buffer.
By the read operation of CPU, the SCLK output resumes.
If the second receive buffer (i.e., double buffering) is enabled but the receive FIFO is not
enabled, the SCLK output is stopped when the first receive data is moved from the first
receive buffer to the second receive buffer and the next data is stored in the first buffer filling
both buffers with valid data. When the second receive buffer is read, the data of the first
receive buffer is moved to the second receive buffer and the SCLK output is resumed upon
generation of the receive interrupt INTRX0. Therefore, no buffer overrun error will be
caused in the I/O interface SCLK output mode regardless of the setting of the double buffer
control bit SC0MOD2 <WBUF>.
If the second receive buffer (double buffering) is enabled and the receive FIFO is also
enabled (SCNFCNF <CNFG> = 1 and <FDPX1:0> = 01/11), the SCLK output will be
stopped when the receive FIFO is full (according to the setting of SCOFNCF <RFST>) and
both the first and second receive buffers contain valid data. Also in this case, if SCOFCNF
<RXTXCNT> has been set to “1,” the receive control bit RXE will be automatically cleared
upon suspension of the SCLK output. If it is set to “0,” automatic clearing will not be
performed.
(Note) In this mode, the SC0CR <OEER> flag is insignificant and the operation is
undefined. Therefore, before switching from the SCLK output mode to
another mode, the SC0CR register must be read to initialize this flag.
In other operating modes, the operation of the second receive buffer is always valid, thus
improving the performance of continuous data transfer. If the receive FIFO is not enabled,
an overrun error occurs when the data in the second receive buffer (SC0BUF) has not been
read before the first receive buffer is full with the next receive data. If an overrun error
occurs, data in the first receive buffer will be lost while data in the second receive buffer and
the contents of SC0CR <RB8> remain intact. If the receive FIFO is enabled, the FIFO must
be read before the FIFO is full and the second receive buffer is written by the next data
through the first buffer. Otherwise, an overrun error will be generated and the receive FIFO
overrun error flag will be set. Even in this case, the data already in the receive FIFO remains
intact.
The parity bit to be added in the 8-bit UART mode as well as the most significant bit in the
9-bit UART mode will be stored in SC0CR <RB8>.
In the 9-bit UART mode, the slave controller can be operated in the wake-up mode by
setting the wake-up function SC0MOD0 <WU> to “1.” In this case, the interrupt INTRX0 will
be generated only when SC0CR <RB8> is set to “1.”
In this condition, data reception may be initiated by setting the half duplex transmission mode
and writing “1” to the RXE bit. When the data is stored all in the receive shift register, receive
buffer and receive FIFO, SCxMOD0<RXE> is automatically cleared and the receive
operation is finished.
Receive interrupt
RBFLL
RXE
Receive interrupt
RBFLL
RXE
SIOCLK
15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2
TXDCLK
• Handshake function
The CTS pin enables frame by frame data transmission so that overrun errors can be
prevented. This function can be enabled or disabled by SC0MOD0 <CTSE>.
When the CTS0 pin is set to the “H” level, the current data transmission can be completed
but the next data transmission is suspended until the CTS0 pin returns to the “L” level.
However in this case, the INTTX0 interrupt is generated, the next transmit data is requested
to the CPU, data is written to the transmit buffer, and it waits until it is ready to transmit data.
Although no RTS pin is provided, a handshake control function can be easily implemented
by assigning a port for the RTS function. By setting the port to “H” level upon completion of
data reception (in the receive interrupt routine), the transmit side can be requested to
suspend data transmission.
TXD RXD
SIOCLK
TXDCLK
(Note 1) If the CTS signal is set to “H” during transmission, the next data transmission is
suspended after the current transmission is completed.
(Note 2) Data transmission starts on the first falling edge of the TXDCLK clock after CTS is set to
“L.”
Note) In the I/O interface SCLK output mode, the SC0CR <PEER> flag is
insignificant. In this case, the operation is undefined. Therefore, to switch
from the SCLK output mode to another mode, SC0CR must be read in
advance to initialize the flag.
If double buffering is disabled, the CPU writes data only to Transmit Buffer 1 and the
transmit interrupt INTTX0 is generated upon completion of data transmission.
If handshaking with the other side is necessary, set the double buffer control bit <WBUF> to
“0” (disable) to disable Transmit Buffer 2; any setting for the transmit FIFO should not be
performed.
Note) Please clear transmission FIFO after setting of the forwarding mode of
SIO (half duplex/full duplex) and permission (SC0FCNF<CNFG>="1") of
FIFO when you use transmission FIFO Buffer.
Data 5
TX FIFO
Data 4 Data 5
Data 3 Data 4 Data 5
Data 2 Data 3 Data 4 Data 5
TBEMP
INTTX0
TXE
Data 5
TX FIFO
Data 4 Data 5
Data 3 Data 4 Data 5
Data 2 Data 3 Data 4 Data 5
TBEMP
INTTX0
TXE
Note) Changing the mode from I/O interface SCLK output mode to the other
mode, read SC0CR to clear SC0CR<OERR> flag.
and the operation is undefined. If Transmit Buffer 2 is disabled, the under-run flag
<PERR> will not be set. This flag is set to “0” when it is read.
Note) Changing the mode from I/O interface SCLK output mode to the other
mode, read SC0CR to clear SC0CR<PERR> flag.
CPU, the bit is cleared to “0.” If <WBUF> is set to “0,” this bit is insignificant and must not be
used as a status flag.
c RX Interrupts
Fig. 10-10 shows the data flow of receive operation and the route of read.
Buffer
UART mode IO interface modes
Configuration
FIFO
In use of FIFO, receive interrupt is generated on the condition that the following either
operation and SC0RFC<RFIS > setting are established.
z Reception completion of all bits of one frame.
z Reading FIFO
Interrupt conditions are decided by the SCxRFC<RFIS> settings as described in Table
10-5.
TMPM370 10-24 Serial Channel
TMPM370
“0” "The fill level of FIFO" is equal to "the fill level of FIFO interruption generation."
"The fill level of FIFO" is greater than or equal to "the fill level of FIFO intrruption
“1”
generation."
d TX Interrupts
Fig. 10-11 shows the data flow of transmit operation and the route of write.
Buffer
UART mode IO interface modes
Configuration
Double Buffer When a data is moved from the transmit buffet to the transmit shift register.
(Note) If double buffer is enabled, a interrupt is also generated when the data is
moved from the buffer to the shift register by writing to the buffer.
FIFO
In use of FIFO, transmit interrupt is generated on the condition that the following either
operation and SC0TFC<TFIS> setting are established.
z Transmittion completion of all bits of one frame.
z Writing FIFO
Interrupt conditions are decided by the SC0TFC<TFIS> settings as described in Table
10-6.
“0” "The fill level of FIFO" is equal to "the fill level of FIFO interruption generation."
"The fill level of FIFO" is smaller than or equal to "the fill level of FIFO intrruption
“1”
generation."
③ Error Generation
UART Mode
7 bits
8 bits
mode 9 bits
7bits+Parity
8bits+Parity
Framing Error
Around the center of stop bit
Overrun Error
The channel 0 registers are described here. Each register for all the channels operates in the same way.
(Note) Do not modify any control register when data is being transmitted or received.
7 6 5 4 3 2 1 0
bit Symbol SIOE
SC0EN Read/Write R R/W
After reset 0 0
“0” is read. SIO
operation
Function
0:disabled
1:enabled
SC0BUF works as a transmit buffer for WR operation and as a receive buffer for
RD operation.
7 6 5 4 3 2 1 0
bit Symbol TB7/RB7 TB6/RB6 TB5/RB5 TB4/RB4 TB3/RB3 TB2/RB2 TB1/RB1 TB0/RB0
SC0BUF Read/Write R/W
After reset 0 0 0 0 0 0 0 0
TB7 to 0 : Transmit buffer/FIFO
Function
RB7 to 0 : Receive buffer/FIFO
7 6 5 4 3 2 1 0
bit Symbol RB8 EVEN PE OERR PERR FERR SCLKS IOC
Read/Write R R/W R (Cleared to “0” when read) R/W
SC0CR
After reset 0 0 0 0 0 0 0 0
Receive Parity Add parity 0: Normal operation 0: SCLK0 (For I/O
data bit 8 (For UART) (For UART) 1: Error interface)
(For UART) 0: Odd 0: Disabled 0:Baud rate
Function
1: Even 1: Enabled 1: SCLK0 generator
Overrun Parity/ Framing
1:SCLK0
underrun
pin input
<RB8>: 9th bit of the received data in the 9 bits UART mode.
<SCLKS>: The input clock edge used by the data sending and receiving is selected.
“0”: Data transmit/receive at rising edges of SCLK0
“1”: Data transmit/receive at falling edges of SCLK0
Please set it to "0" at the clock output mode.
7 6 5 4 3 2 1 0
bit Symbol TB8 CTSE RXE WU SM1 SM0 SC1 SC0
Read/Write R/W
SC0MOD0 After reset 0 0 0 0 0 0 0 0
Transmit Handshake Receive Wake-up Serial transfer mode Serial transfer clock
data bit 8 function control function 00: I/O interface mode (for UART)
control 0:Reception 0:Reception 01: 7-bit length 00: TB4OUT
0: CTS disabled disabled UART mode 01: Baud rate generator
Function
diable 1:Reception 1:Reception 10: 8-bit length 10: Internal clock fSYS
1: CTS enabled enabled UART mode 11: External clock
enable 11: 9-bit length (SCLK0 input)
UART mode
<TB8>: Writes the 9th bit of transmit data in the 9 bits UART mode.
(Note 1) With <RXE> set to “0,” set each mode register (SC0MOD0, SC0MOD1 and
SC0MOD2). Then set <RXE> to “1.”
(Note 2) Do not clear SC0MOD0<RXE> to “0” during the receiving data.
7 6 5 4 3 2 1 0
bit Symbol I2S0 FDPX1 FDPX0 TXE SINT2 SINT1 SINT0 -
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
SC0MOD1
After reset 0 0 0 0 0 0 0 0
IDLE Transfer mode setting Transmit Interval time of continuous Write “0”.
Function 0: Stop 00: Transfer prohibited control transmission
1: Start 01: Half duplex(RX) 0:Disabled (for I/O interface)
10:Half duplex(TX) 1: Enabled 000: None 100:8SCLK
11:Full duplex 001:1SCLK 101:16SCLK
010:2SCLK 110:32SCLK
011:4SCLK 111:64SCLK
<FDPX1:0>: Configures the transfer mode in the I/O interface mode. Also configures the FIFO if it is
enabled. In the UART mode, it is used only to specify the FIFO configuration.
<TXE>: This bit enables transmission and is valid for all the transfer modes (see note 1).
<SINT2:0>: Specifies the interval time of continuous transmission when double buffering or FIFO is
enabled in the I/O interface mode. This parameter is valid only for the I/O interface
mode when SCLK0 pin input is not selected.
(Note 1) Specify the mode first and then specify the <TXE> bit.
(Note 2) Do not stop the transmit operation (by setting <TXE> = "0") when data is being
transmitted.
7 6 5 4 3 2 1 0
bit Symbol TBEMP RBFLL TXRUN SBLEN DRCHG WBUF SWRST1 SWRST0
Read/Write R R/W
SC0MOD2 After reset 1 0 0 0 0 0 0 0
Transmit Receive In STOP bit Setting W-buffer SOFT RESET
buffer Buffer full transmission (for UART) transfer 0: Disabled Overwrite “01” on “10”to
Function empty flag flag flag 0: 1-bit direction 1: Enabled reset.
0: full 0: Empty 0: Stop 1: 2-bit 0: LSB first
1: Empty 1: full 1: Start 1: MSB first
<TBEMP>: This flag shows that the transmit double buffers are empty. When data in the transmit
double buffers is moved to the transmit shift register and the double buffers are empty,
this bit is set to “1.” Writing data again to the double buffers sets this bit to “0.”
If double buffering is disabled, this flag is insignificant.
<RBFLL>: This is a flag to show that the receive double buffers are full. When a receive operation
is completed and received data is moved from the receive shift register to the receive
double buffers, this bit changes to “1” while reading this bit changes it to “0.”
If double buffering is disabled, this flag is insignificant.
<SBLEN>: This specifies the length of stop bit transmission in the UART mode. On the receive
side, the decision is made using only a single bit regardless of the <SBLEN> setting.
<DRCHG>: Specifies the direction of data transfer in the I/O interface mode. In the UART mode, it is
fixed to LSB first.
<WBUF>: This parameter enables or disables the transmit/receive buffers to transmit (in both
SCLK output/input modes) and receive (in SCLK output mode) data in the I/O interface
mode and to transmit data in the UART. When receiving data in the I/O interface mode (I
SCLK input) and UART mode, double buffering is enabled in both cases that 0 or 1 is
set to <WBUF> bit.
<SWRST1:0>: Overwriting “01” in place of “10” generates a software reset. When this software reset
is executed, the following bits and their internal circuits are initialized (see note 1, 2
and 3).
Register Bit
SC0MOD0 RXE
SC0MOD1 TXE
SC0MOD2 TBEMP,RBFLL,TXRUN,
SC0CR OERR,PERR,FERR
(Note 1) While data transmission is in progress, any software reset operation must be
executed twice in succession.
(Note 2) A software reset requires 2 clocks-duration at the time between the end of
recognition and the start of execution of software reset instruction.
(Note 3) A software reset initializes other bits. Resetting a mode register and a control
register are needed.
7 6 5 4 3 2 1 0
bit Symbol - BR0ADDE BR0CK1 BR0CK0 BR0S3 BR0S2 BR0S1 BR0S0
Read/Write R/W
SC0BRCR After reset 0 0 0 0 0 0 0 0
Write “0”. N + (16 − K)/ Select input clock to the Division ratio “N”
16 divider baud rate generator 0000: 16
function 00: φT1 0001: 1
Function 0: disabled 01: φT4 0010: 2
1: enabled 10: φT16 :
11: φT64 1111: 15
7 6 5 4 3 2 1 0
bit Symbol BR0K3 BR0K2 BR0K1 BR0K0
Read/Write R R/W
SC0BRADD
After reset 0 0 0 0 0
“0” is read. Specify K for the “N + (16 − K)/16” division
0000: Prohibited
0001: K=1
Function
0010: K=2
:
1111: K=15
The division ratio of the baud rate generator can be specified in the registers shown above.
Table 10-5 lists the settings of baud rate generator division ratio.
(Note 1) To use the “N + (16 - K)/16” division function, be sure to set BR0K <BR0ADDE> to
“1” after setting the K value to BR0K. The “N + (16 - K)/16” division function can
only be used in the UART mode.
(Note 2) The division ratio 1(“0001”) and 16(“0000”) cannot be applied when the “N + (16 -
K)/16” division function is used in the UART mode.
(Note 3) The division ratio 1 (“0001”) is available only for using double buffer in the I/O
interface mode.
7 6 5 4 3 2 1 0
bit Symbol Reserved Reserved Reserved RFST TFIE RFIE RXTXCNT CNFG
Read/Write R/W
SC0FCNF After reset 0 0 0 0 0 0 0 0
Bytes used TX interrupt RX interrupt Automatic FIFO
in RX FIFO for TX FIFO for RX FIFO disable of enable
Be sure to write “000”. 0: Maximum 0: Disabled 0:Disabled RXE/TXE 0: Disabled
Function
1:Same as 1: Enabled 1: Enabled 0:None 1: Enabled
FILL level of 1:Auto
RX FIFO disable
<RFST>: When RX FIFO is enabled, the number of RX FIFO bytes to be used is selected (see
note).
0: The maximum number of bytes of the FIFO configured (see also <CNFG>).
1: Same as the fill level for receive interrupt generation specified by SC0RFC <RIL1:0>.
<TFIE>: When TX FIFO is enabled, transmit interrupts are enabled or disabled by this parameter.
<RFIE>: When RX FIFO is enabled, receive interrupts are enabled or disabled by this parameter.
Half duplex When the receive shift register, receive buffer and RX FIFO are filled
RX up to the specified number of valid bytes, SC0MOD0<RXE> is
automatically set to “0” to inhibit further reception.
Half duplex When the data transfer in the TX FIFO, the transmit buffer and the
TX transmit shift register is completed, SC0MOD1<TXE> is
automatically set to “0” to inhibit further transmission.
Full duplex When either of the above two conditions is satisfied, TXE/RXE are
automatically set to “0” to inhibit further transmission and
reception.
(Note1) Regarding TX FIFO, the maximum number of bytes being configured is always
available. The available number of bytes is the bytes already written to the TX FIFO.
(Note2) FIFO cannot be used in the 9bit UART mode.
7 6 5 4 3 2 1 0
bit Symbol RFCS RFIS RIL1 RIL0
Read/Write W R/W R R/W
SC0RFC
After reset 0 0 0 0 0
RX FIFO Select “0” is read. FIFO fill level to generate RX
clear interrupt interrupts
generation
1: Clear condition 00:4byte
0: when the (2 Byte at full duplex)
“0” is read. data reaches 01:1byte
to the 10:2byte
specified fill 11:3byte
Function level.
1: when the
data reaches to
the specified fill
level or the data
exceeds the
specified fill
level at the
time data is
read.
7 6 5 4 3 2 1 0
bit Symbol TFCS TFIS TIL1 TIL0
Read/Write W R/W R R/W
SC0TFC After reset 0 0 0 0 0
TX FIFO Select “0” is read. FIFO fill level to generate TX
clear interrupt interrupts.
generation
1:Clear condition 00:Empty
Always 0: when the 01:1byte
reads “0”. data reaches 10:2byte
to the 11:3byte
specified fill Note: TIL1 is ignored when
level. FDPX1:0=11 (full duplex).
Function 1: when the
data reaches to
the specified fill
level or the data
cannot reach
the
specified fill
level at the
time new data
is read.
7 6 5 4 3 2 1 0
bit Symbol ROR RLVL2 RLVL1 RLVL0
Read/Write R R R
SC0RST After reset 0 0 0 0 0
RX FIFO “0” is read. Status of RX FIFO fill level
Overrun 000:Empty
001:1Byte
Function
1: 010:2Byte
Generated 011:3Byte
100:4Byte
<ROR>: Flags for RX FIFO overrun. When the overrun occurs, these bits are set to “1” (see note).
(Note) The <ROR> bit is cleared to “0” when receive data is read from the SC0BUF
register.
7 6 5 4 3 2 1 0
bit Symbol TUR TLVL2 TLVL1 TLVL0
Read/Write R R R
SC0TST
After reset 1 0 0 0 0
TX FIFO “0” is read. Status of TX FIFO fill level
Under run 000:Empty
1:Generated 001:1Byte
Function
Cleared by 010:2Byte
writing FIFO 011:3Byte
100:4Byte
<TUR>: Flags for TX FIFO underrun. When the underrun occurs, these bits are set to “1” (see
note).
(Note) The <TUR> bit is cleared to “0” when transmit data is written to the SC0BUF
register.
c Transmitting data
SCLK output mode
In the SCLK output mode, if SC0MOD2<WBUF> is set to “0” and the transmit double
buffers are disabled, 8 bits of data are output from the TXD0 pin and the synchronous
clock is output from the SCLK0 pin each time the CPU writes data to the transmit buffer.
When all data is output, the INTTX0 interrupt is generated.
If SC0MOD2 <WBUF> is set to “1” and the transmit double buffers are enabled, data is
moved from Transmit Buffer 2 to Transmit Buffer 1 when the CPU writes data to
Transmit Buffer 2 while data transmission is halted or when data transmission from
Transmit Buffer 1 (shift register) is completed. When data is moved from Transmit
Buffer 2 to Transmit Buffer 1, the transmit buffer empty flag SC0MOD2 <TBEMP> is
set to “1,” and the INTTX0 interrupt is generated. If Transmit Buffer 2 has no data to be
moved to Transmit Buffer 1, the INTTX0 interrupt is not generated and the SCLK0
output stops.
Transmit data
write timing
SCLK0 output
TXRUN
<WBUF>=“0” (if double buffering is disabled)
Transimit data
write timing
SCLK0 output
TBRUN
TBEMP
Transmit data
write timing
SCLK0 output
TBRUN
TBEMP
Fig. 10-12 Transmit Operation in the I/O Interface Mode (SCLK0 Output Mode)
If SC0MOD2 <WBUF> is set to “1” and the transmit double buffers are enabled, data is
moved from Transmit Buffer 2 to Transmit Buffer 1 when the CPU writes data to
Transmit Buffer 2 before the SCLK0 becomes active or when data transmission from
Transmit Buffer 1 (shift register) is completed. As data is moved from Transmit Buffer 2
to Transmit Buffer 1, the transmit buffer empty flag SC0MOD2 <TBEMP> is set to “1”
and the INTTX0 interrupt is generated. If the SCLK0 input becomes active while no
data is in Transmit Buffer 2, although the internal bit counter is started, an under-run
error occurs and 8-bit dummy data (FFh) is sent.
Transimit data A
write timing
SCLK0 input
(<SCLKS>=0
Rising edge mode)
SCLK0 input
(<SCLKS>=1
Falling edge mode)
Transimit data A
write timing
SCLK0 input
(<SCLKS>=0
Rising edge more)
SCLK0 input
(<SCLKS>=1
Falling edge mode)
TBRUN
TBEMP
Transmit data A
write timing
SCLK0 input
(<SCLKS>=0
Rising edge mode)
SCLK0 input
(<SCLKS>=1
Falling edge mode)
TBRUN
TBEMP
PERR(functions to detect under-run errors)
Fig. 10-13 Transmit Operation in the I/O Interface Mode (SCLK0 Input Mode)
d Receiving data
SCLK output mode
In the SCLK output mode, if SC0MOD2 <WBUF> = “0” and receive double buffering is
disabled, a synchronous clock pulse is output from the SCLK0 pin and the next data is
shifted into receive buffer 1 each time the CPU reads received data. When all the 8 bits
are received, the INTRX0 interrupt is generated.
The first SCLK output can be started by setting the receive enable bit SC0MOD0
<RXE> to “1.” If the receive double buffering is enabled with SC0MOD2 <WBUF> set
to “1,” the first frame received is moved to receive buffer 2 and receive buffer 1 can
receive the next frame successively. As data is moved from receive buffer 1 to receive
buffer 2, the receive buffer full flag SC0MOD2 <RBFULL> is set to “1” and the INTRX0
interrupt is generated.
While data is in receive buffer 2, if CPU cannot read data from receive buffer 2 before
completing reception of the next 8 bits, the INTRX0 interrupt is not generated and the
SCLK0 clock stops. In this state, reading data from receive buffer 2 allows data in
receive buffer 1 to move to receive buffer 2 and thus the INTRX0 interrupt is generated
and data reception resumes.
Receive data
write timing
SCLK0 output
Receive data
write timing
SCLK0 output
RBFULL
<WBUF>=“1” (if double buffering is enabled and data is read from buffer 2)
Receive data
write timing
SCLK0 output
RBFULL
<WBUF>=“1” (if double buffering is enabled and data cannot be read from buffer 2)
Fig. 10-14 Receive Operation in the I/O Interface Mode (SCLK0 Output Mode)
Receive data
read timing
SCLK0 input
(<SCLKS>=0
Rising edge mode)
SCLK0 input
(<SCLKS>=1
Falling edge mode)
RXD0 bit 0 bit 1 bit 5 bit 6 bit 7 bit 0
RBFULL
RBFULL
OERR
Fig. 10-15 Receive Operation in the I/O Interface Mode (SCLK0 Input Mode)
(Note) To receive data, SC0MOD <RXE> must always be set to “1” (receive enable) in the
SCLK output / SCLK input mode.
If SC0MOD2 <WBUF> = “1” and double buffering is enabled for both transmission and
reception, SCLK is output when the CPU writes data to the transmit buffer.
Subsequently, 8 bits of data are shifted into receive buffer 1, moved to receive buffer 2,
and the INTRX0 interrupt is generated. While 8 bits of data is received, 8 bits of
transmit data is output from the TXD0 pin. When all data bits are sent out, the INTTX0
interrupt is generated and the next data is moved from the Transmit Buffer 2 to
Transmit Buffer 1. If Transmit Buffer 2 has no data to be moved to Transmit Buffer 1
(SC0MOD2 <TBEMP> = 1) or when receive buffer 2 is full (SC0MOD2 <RBFULL> = 1),
the SCLK clock is stopped. When both conditions, receive data is read and transmit
data is written, are satisfied, the SCLK output is resumed and the next round of data
transmission is started.
Receive data
read timing
Transmit data
write timing
SCLK0 output
Receive data
read timing
Transmit data
write timing
SCLK0 output
Receive data
read timing
Transmit data
write timing
SCLK0 output
Fig. 10-16 Transmit/Receive Operation in the I/O Interface Mode (SCLK0 Output Mode)
SCLK0 input
SCLK0 input
SCLK0 input
PERR(Under-run errors)
The following table shows the control register settings for transmitting in the following data
format.
even
start bit 0 1 2 3 4 5 6 parity stop
The control register settings for receiving data in the following format are as follows:
odd
start bit 0 1 2 3 4 5 6 7 parity stop
The most significant bit (9th bit) is written to bit 7 <TB8> of the serial mode control register 0
(SC0MOD0) for transmitting data. The data is stored in bit 7 <RB8> of the serial control
register SC0CR. When writing or reading data to/from the buffers, the most significant bit
must be written or read first before writing or reading to/from SC0BUF. The stop bit length
can be specified using SC0MOD2 <SBLEN>.
Wakeup function
In the 9-bit UART mode, slave controllers can be operated in the wake-up mode by setting
the wake-up function control bit SC0MOD0 <WU> to “1.” In this case, the interrupt INTRX0
will be generated only when SC0CR <RB8> is set to “1”.
(Note)The TXD pin of the slave controller must be set to the open drain output mode
using the ODE register.
Protocol
c Select the 9-bit UART mode for the master and slave controllers.
d Set SC0MOD <WU> to “1” for the slave controllers to make them ready to receive data.
e The master controller is to transmit a single frame of data that includes the slave controller
select code (8 bits). In this, the most significant bit (bit 8) <TB8> must be set to “1”.
f Each slave controller receives the above data frame; if the code received matches with the
controller's own select code, it clears the WU bit to “0”.
g The master controller transmits data to the designated slave controller (the controller of
which SC0MOD <WU> bit is cleared to “0”). In this, the most significant bit (bit 8) <TB8>
must be set to “0”.
Data “0”
h The slave controllers with the <WU> bit set to “1” ignore the receive data because the most
significant bit (bit 8) <RB8> is set to “0” and thus no interrupt (INTRX0) is generated.
Also, the slave controller with the <WU> bit set to “0” can transmit data to the master
controller to inform that the data has been successfully received.
An example: Using the internal clock fSYS as the transfer clock, two slave controllers are
serially linked as follows.
The watchdog timer (WDT) is for detecting malfunctions (runaways) of the CPU caused by noises or
other disturbances and remedying them to return the CPU to normal operation. If the timer detects a
runaway, it generates a non-maskable interrupt or an internal reset to notify the CPU. The watchdog
timer starts immediately after reset release.
11.1 Configuration
Fig. 11-1 shows the block diagram of the watchdog timer
RESET pin
WDMOD <RESCR>
Internal reset
Non-maskable
interrupt request
(NMI)
WDMOD Selector
<WDTP2:0>
fSYS
Reset
Internal reset
Write
0x4E
11.2 Outline
The watchdog timer consists of the binary counters that are arranged in 25 stages and work using the
fSYS system clock as an input clock. The outputs produced by these binary counters are 215, 217, 219,
221, 223 are 225.By selecting one of these outputs with WDMOD <WDTP2:0>, NMI can be generated
when an overflow occurs, as shown in Fig. 11-2.
NMI
When an overflow occurs, resetting the chip itself is an option to choose. If the chip is reset, a reset is
affected for a 32-state time, as shown in Fig. 11-3. If this reset is affected, the clock fSYS that the clock
gear generates by dividing the clock fC of the high-speed oscillator by 1 is used as an input clock fSYS.
Overflow
WDT counter
n
NMI
Internal reset
32-state
(3.2 μs @ fosc = 10 MHz, fC = fsys = 10 MHz,)
• Disabling control
By writing the disable code (0xB1) to this WDCR register after setting WDMOD <WDTE> to "0," the
watchdog timer can be disabled.
• Enabling control
Set WDMOD <WDTE> to "1".
(Note) Writing the disable code (0xB1) clears the binary counter.
11.4 Operation
The watchdog timer generates the NMI or an internal reset after a lapse of the detection time specified
by the WDMOD <WDTP2: 0> register. Before generating the NMI or an internal reset, the binary
counter for the watchdog timer must be cleared to "0" using software (instruction). If the CPU
malfunctions (runaways) due to noise or other disturbances and cannot execute the instruction to
clear the binary counter, the binary counter overflows and the non-maskable interrupt by the NMI or
an internal reset is generated. The CPU is able to recognize the occurrence of a malfunction
(runaway) by identifying the non-maskable interrupt and to restore the faulty condition to normal by
using a malfunction (runaway) countermeasure program.
In STOP mode, the watchdog timer is reset and in an idle state. In IDLE mode, its operation depends
on the WDMOD <I2WDT> setting. Before putting it in IDLE mode, WDMOD <I2WDT> must be set to
an appropriate setting, as required.
Example:
1. To clear the binary counter
7 6 5 4 3 2 1 0
WDCR ← 0 1 0 0 1 1 1 0 Writes the clear code (0x4E)
(Note 1) The counter of the watchdog timer stops at the debug mode.
12.1 Configuration
The oscillation frequency detector generates a reset for I/O if the oscillation of high frequency for CPU
clock OFDMNPLLexceeds the detection frequency range.
The oscillation frequency detection is controlled by OFDCR1, OFDCR2 registers and the detection fre-
quency range is specified by OFDMNPLLOFF/OFDMNPLLON/OFDMXPLLOFF/OFDMXPLLON which
are the detection frequency setting registers. The lower detection frequency is specified by OFDMN-
PLLOFF/OFDMNPLLON registers and the higher detection frequency is specified by OFDMXPLLOFF/
OFDMXPLLON registers. An initial value of detection frequency is shown in Figure 12-1.
When the oscillation frequency detection is enabled, writing to OFDMNPLLOFF/OFDMNPLLON/OFD-
MXPLLOFF/OFDMXPLLON registers is disabled. Therefore, the setting the detection frequency to these
registers should be done when the oscillation frequency detection is disabled. And writing to OFDCR2/
OFDMNPLLOFF/OFDMNPLLON/OFDMXPLLOFF/OFDMXPLLON registers is controlled by OFDCR1
register. To write OFDCR2/OFDMNPLLOFF/OFDMNPLLON/OFDMXPLLOFF/OFDMXPLLON registers,
the write enable code "0xF9" should be set to OFDCR1 beforehand. To enable the oscillation frequency
detector, set "0xE4" to OFDCR2 after setting "0xF9" to OFDCR1. Since the oscillation frequency detection
is disabled after an external reset input, write "0xF9" to OFDCR1 and write "0xE4" to OFDCR2 register to
enable its function.
When the TMPM370 detects the out of frequency by lower and higher detection frequency setting regis-
ters, all I/Os become high impedance by reset. In case of PLLOFF, OFDMNPLLOFF and OFDMXPLLOFF
registers are valid for detection and the setting value of OFDMNPLLON/OFDMXPLLON registers are
ignored. In case of PLLON, OFDMNPLLON and OFDMXPLLON registers are valid for detection and the
setting value of OFDMNPLLOFF/OFDMXPLLOFF registers are ignored. By the oscillation frequency
detection reset, all I/Os except power supply pins, RESET, X1 and X2 become high impedance. If oscilla-
tion frequency detection reset is generated by detecting the stopping of high frequency, the internal circu-
ities such as registers hold the condition at the timing of oscillation stop. To initialize these internal
circuitries, an external re-starting of oscillation is needed.
Since all registers for oscillation frequency detector (OFDCR1/OFDCR2/OFDMNPLLOFF/OFDMN-
PLLON/ OFDMXPLLOFF/OFDMXPLLON) are not initialized by the reset generated from oscillation fre-
quency detector, the detection of oscillation is keeps its function during the reset period of oscillation
frequency detection. Therefore, if the oscillation frequency detection reset occurs, the reset is not
released unless the CPU clock resumes its normal frequency.
Note 1: The oscillation frequency detection reset is available only in NORMAL and IDLE modes. In STOP mode, the oscil-
lation frequency detection reset is disabled automatically.
Note 2: When the PLL is controlled (enabled or disabled) by the CGPLLSEL register, the OFD must be disabled before-
hand. If OFD reset is generated with PLL-ON, the detection frequency setting registers (OFDMNPLLON/OFDMX-
PLLON) are automatically switched over to OFDMNPLLOFF/OFDMXPLLOFF.
Detection Area
10MHzr
VDD [V] Harmonics
Subharmonics of 10MHz-10%
of 10MHz
5.5
4.5
5 5.5 9 10 11 18 20
fc [MHz]
(a) In case of PLLOFF
Detection Area
80MHzr
VDD [V] Harmonics
Subharmonics of 80MHz-10%
of 80MHz
5.5
4.5
40 44 72 80 88 144 160
fc [MHz]
(b) In case of PLLON
PLLON
PLLSEL
XEN
Note: When the PLL is controlled (enabled or disabled) by the CGPLLSEL register, the OFD must be disabled beforehand.
12.2 Control
The oscillation frequency detection is controlled by oscillation frequency detection control register 2
(OFDCR2). The detection frequency is specified by lower/higher detection frequency setting registers
(OFDMNPLLOFF, OFDMNPLLON, OFDMXPLLOFF and OFDMXPLLON). Writing to OFDCR2/OFDMN-
PLLOFF/OFDMNPLLON/OFDMXPLLOFF/OFDMXPLLON is controlled by oscillation frequency control
register 1 (OFDCR1).
(0x4004_0800) Read/Write R
After reset 0
7 6 5 4 3 2 1 0
Bit Symbol CLKWEN7 CLKWEN6 CLKWEN5 CLKWEN4 CLKWEN3 CLKWEN2 CLKWEN1 CLKWEN0
After reset 0 0 0 0 0 1 1 0
Note 1: Only "0x06" and "0xF9" is valid to OFDCR1. If other value than "0x06" and "0xF9" is written to OFDCR1, "0x06" is
written to OFDCR1 automatically.
Note 2: OFDCR1 is not initialized by an internal factor reset including oscillation frequency detection reset. To initialize this
registers, set the RESET pin (external factor reset) to the low level.
(0x4004_0804) Read/Write R
After reset 0
7 6 5 4 3 2 1 0
Bit Symbol CLKSEN7 CLKSEN6 CLKSEN5 CLKSEN4 CLKSEN3 CLKSEN2 CLKSEN1 CLKSEN0
After reset 0 0 0 0 0 0 0 0
Note 1: Only "0x00" and "0xE4" is valid to OFDCR2. Writing other value than "0x00" and "0xE4" to OFDCR2 is ignored.
Note 2: Writing to OFDCR2 is protected by setting "0x06" to OFDCR1 but reading from OFDCR2 is always enabled with-
out setting of OFDCR1.
Note 3: OFDCR2 is not initialized by an internal factor reset including oscillation frequency detection reset. To initialize this
registers, set the RESET pin (external factor reset) to the low level.
After reset 0 0
7 6 5 4 3 2 1 0
After reset 0 0 0 1 1 1 1 1
After reset 0 0
7 6 5 4 3 2 1 0
After reset 1 1 1 1 0 0 0 1
After reset 0 0
7 6 5 4 3 2 1 0
After reset 0 0 1 1 0 1 1 1
After reset 0 0
7 6 5 4 3 2 1 0
After reset 1 1 0 0 0 0 0 0
Note 1: OFDMNPLLOFF, OFDMNPLLON, OFDMXPLLOFF and OFDMXPLLON can not be written when the oscillation frequency
detection circuit is enabled (OFDCR2="0xE4") or writing is disabled with OFDCR1="0x06". An attempt to write OFDMN-
PLLOFF, OFDMNPLLON, OFDMXPLLOFF and OFDMXPLLON can not complete a write operation.
Note 2: Writing to OFDMNPLLOFF, OFDMNPLLON, OFDMXPLLOFF and OFDMXPLLON is protected by setting "0x06" to
OFDCR1 but reading from OFDMNPLLOFF, OFDMNPLLON, OFDMXPLLOFF and OFDMXPLLON is always enabled
without setting of OFDCR1.
Note 3: Specify an appropriate value to OFDMNPLLOFF and OFDMXPLLOFF depending on the clock frequency to be used
under the condition of OFDMNPLLOFF<OFDMXPLLOFF. For how to calculate the value, refer to " 12.3.2 Setting the
Lower and Higher Frequency for Detection ".
Note 4: Specify an appropriate value to OFDMNPLLON and OFDMXPLLON depending on the clock frequency to be used under
the condition of OFDMNPLLON<OFDMXPLLON. For how to calculate the value, refer to " 12.3.2 Setting the Lower and
Higher Frequency for Detection ".
Note 5: OFDMNPLLOFF, OFDMNPLLON, OFDMXPLLOFF and OFDMXPLLON are not initialized by an internal factor reset
including oscillation frequency detection reset. To initialize these registers, set the RESET pin (external factor reset) to the
low level.
Note 6: OFDMNPLLOFF/OFDMXPLLOFF and OFDMNPLLON/OFDMXPLLON are automatically switched over by the setting of
PLLON.
12.3 Function
Note:After writing data to OFDCR2, set "0x06" to OFDCR1 to protect OFDCR2 register.
When STOP mode is executed with OFDCR2=0xE4, the oscillation frequency detection is auto-
matically disabled. After releasing STOP and warming up period, the oscillation frequency detection
is enabled. The oscillation frequency detection is available only in NORMAL and IDLE mode. Table
12-1 shows the availability of oscillation frequency detector.
Oscillation Frequency Detection All I/Os condition after Oscillation Frequency Detection RESET
Operating Mode
(OFDCR2=0xE4) (Except power supply, RESET, X1, X2 pins)
STOP
Oscillation Frequency Detection is disabled automatically.
(Including warming up period)
VDD
High-frequency
clock
External RESET
input
Internal RESET
Oscillation Frequency
Detector control
External NORMAL or STOP mode NORMAL or Internal NORMAL or External NORMAL or
RESET IDLE mode including warming up IDLE mode RESET IDLE mode RESET IDLE mode
Table 12-2 High frequency and Setting value for detection frequency
High-frequency
clock
Stable Abnormal Stable
Hi-Z
All I/Os
Clocked RESET
Clocked reset is generated
Hi-Z after resuming of frequency.
All I/Os
13.1 Configuration
The power-on reset circuit consists of a reference voltage generation circuit, a comparator and a
power-on counter.
The supply voltage divided by ladder resistor is compared with the voltage generated by the reference
voltage generation circuit by the comparator.
RVDD5
fosc
-
Power-on counter Power-on reset signal
+
Power-on
Reference voltage detection signal
generation circuit
When power supply voltage goes down, if the supply voltage is equal to or lower than the detecting
voltage of the power-on reset circuit, a power-on reset signal is generated.
During the generation of power-on reset, the power-on counter circuit, the CPU and peripheral circuits
are reset.
When the power-on reset cuicuit is activated without an external reset input signal, the supply voltage
should be increased to the recommended operating voltage range (Note) within 3ms from the detection
of the releasing voltage of the power-on reset circuit. If the supply voltage does not reach the range, the
TMPM370 cannot operate properly.
(Note) When the supply voltage rises, until the supply voltage (at RVDD5 pin) reach the recommended operating
voltage range (4.5V through 5.5V) and 200μs passes by, the following condition should be satisfied; Port L (PL0
and PL1) is opened or the input voltage is within 0.5 volts.
Supply voltage
4.5V
tPORPW
VPORH
VPORL
Minimum voltage of
POR circuit
Power-on
detection signal
(Low-level enable)
tPORDT1 tPORDT2 tPORDT1
Power-on
counter
・・
tPWUP tPWUP
Power-on reset
signal
(Low-level enable)
Note 1: The power-on reset circuit may operate improperly, depending on fluctuations in the supply voltage. Refer to the electrical
characteristics and take them into consideration when designing equipment.
Note 2: If the supply voltage is lower than the minimum voltage of Power-on Reset circuit in which the circuit cannot operate
properly, the power-on reset signal becomes undefined value.
Note 1 : Since the power-on reset releasing voltage and the power-on reset detection voltage relatively change, the
detection voltage is never reversed.
Note 2 : 3.2ms at 10MHz.
For the details about Power-on sequence, refer to the chapter of “Electrical Characteristics”.
For the details about how to use external reset input, refer to “reset exceptions” in the chapter of
“Exceptions”.
Note: The voltage detection circuit may operate improperly, depending on fluctuations in the supply voltage (RVDD5). Refer to
the electrical characteristics and take them into consideration when designing equipment.
14.1 Configuration
The voltage detection circuit consists of a reference voltage generation circuit, a detection voltage
level selection circuit, a comparator and control registers.
The supply voltage (RVDD5) is divided by the ladder resistor and input to the detection voltage
selection circuit. The detection voltage selection circuit selects a voltage according to the specified
detection voltage (VDLVL), and the comparator compares it with the reference voltage.
When the supply voltage (RVDD5) becomes lower than the detection voltage (VDLVL), a voltage
detection reset signal is generated.
RVDD5
level selection circuit
Detection voltage
Reference voltage
generation circuit
VDLVL1
VDLVL0
VDEN
VDCR
14.2 Control
VDCR 7 6 5 4 3 2 1 0
(0x4004_0900) Bit Symbol - - - - - VDLVL1 VDLVL0 VDEN
Read/Write R R R R R R/W R/W
After reset 0 0 0 0 0 00 0
00 : Reserved
01 : 4.1 ± 0.2 V
VDLVL[1:0] Selection for detection voltage
10 : 4.4 ± 0.2 V
11 : 4.6 ± 0.2 V
Enables/disables the operation of 0 : Disables the operation of voltage detection
VDEN
voltage detection 1 : Enables the operation of voltage detection
14.3 Function
The detection voltage can be selected by VDCR<VDLVL[1:0]>. Enabling/disabling the voltage detection
can be programmed by VDCR<VDEN>.
After the voltage detection operation is enabled, When the supply voltage (RVDD5) becomes lower
than the detection voltage <VDLVL[1:0]>, a voltage detection reset signal is generated.
Note: When the supply voltage (RVDD5) is lower than the detection voltage (VDLVL), setting VDCR<VDEN> to "1" generates
VLTD
etection Voltage
POR
etection Voltage
Power-on reset
signal tVDEN
tVDEN
Voltage
detection tVDDT1 tVDDT2 tVDDT1
Software Software
Voltage detection
reset signal
15.1 Overview
15.1.1 Features
The Vector Engine provides the following features:
1) Executes basic tasks for vector control (coordinate conversion, phase conversion and SIN/COS
computation).
2) Enables interface (output control, trigger generation, input processing) with the motor control circuit
(PMD: Programmable Motor Driver) and AD converter (ADC).
y Converts computation results from fixed-point format to data format usable in the PMD.
y Generates timing data for interactive operation with the PMD and ADC.
y Converts AD conversion results into fixed-point format.
3) Calculates current, voltage and rotation speed by using normalized values with respect to their
maximum values in fixed-point format.
Current control
Id_ref PI control
Phase DUTYa
Vd Coordinate VA conversion DUTYb Output
Iq_ref PI control Vq conversion VB 2→3 DUTYc control PWM output
dq→AB SECTOR setting (PMD)
(SVM)
Vdc
Vdc
Input
Iu Current/voltage
Id Coordinate IA Phase processing
Id Iv detection (ADC)
Iq conversion IB conversion
Iq Iw
dq←AB 2←3
2) ADC sampling timing can be generated for sensorless current detection. Current detection can be
performed by the 1-shunt, 3-shunt and 2-sensor methods.
3) In current control, PI control is implemented independently for d-axis and q-axis. It is also possible to
directly supply reference voltage information without using current control.
* For using the Vector Engine, the PMD must be set to the VE mode through the mode select register
(PMDnMODESEL).
It is also necessary to make appropriate settings in the ADC (enabling trigger and selecting AIN and
result registers to be used) for each synchronizing trigger from the PMD.
15.2 Configuration
Figure 15-2 shows the configuration of the Vector Engine.
ADC PMD
15.2.1 Interaction among Vector Engine, Motor Control Circuit and A/D Converter
The Vector Engine can control two motors by interacting with two channels of motor control circuit (PMD)
and two units of AD converter (ADC). Channel 0 of the Vector Engine controls PMD channel 0, and channel
1 of the Vector Engine controls PMD channel 1.
As shown in Figure 15-3, the Vector Engine allows direct interaction with the PMD and ADC.
When the PMD0MODESEL register is set to the VE mode, the PMD channel 0 registers PMD0CMPU,
PMD0CMPV, PMD0CMPW, PMD0MDOUT, PMD0TRGCMP0, PMD0TRGCMP1 and PMD0TRGSEL are
switched to the Vector Engine registers VECMPU0, VECMPV0, VECMPW0, VEOUTCR0, VETRGCMP00,
VETRGCMP10 and VETRGSEL0 respectively. Likewise, the PMD channel 1 registers are switched to
Vector Engine registers VECMPU1, VECMPV1, VECMPW1, VEOUTCR1, VETRGCMP01, VETRGCMP11
and VETRGSEL1. In this case, these registers can only be controlled from the Vector Engine, and cannot
be written from the PMD. Other PMD registers have no read/write restrictions.
The ADC unit A registers ADAREG0, ADAREG1, ADAREG2, ADAREG3 and UVWISx0, UVWISx1,
UVWISx2, UVWISx3 which are the phase information specified by ADAPSETx are read into the Vector
Engine as the Vector Engine registers VEADREG0A, VEADREG1A, VEADREG2A, VEADREG3A,
VEPHNUM0A, VEPNNUM1A, VEPHNUM2A and VEPHNUM3A respectively. (These registers cannot be
accessed from the CPU.) Likewise, the ADC unit B registers are read into the Vector Engine as the Vector
Engine registers VEADREG0B, VEADREG1B, VEADREG2B, VEADREG3B, VEPHNUM0B, VEPNNUM1B,
VEPHNUM2B and VEPHNUM3B. (These registers cannot be accessed from the CPU.) These ADC
registers can be written and read from the ADC.
(x = 0 to 5)
Trigger generation
TRGCMP0 register MUX
Buffer
VEVTRGCMP00 register
VEVTRGSEL0 register
The Vector Engine registers are divided into the following three types:
Channel-specific registers : Computation data and control registers for each channel
*1) Maximum speed: Maximum rotation speed [Hz] that can be controlled or operated
*2) Maximum current: (Phase current value [A] which corresponds to 1 LSB of AD converter) × 2^11
*3) Maximum voltage: (Supply voltage (VDC) value [V] which corresponds to 1 LSB of AD conveter) × 2^12
*4) AD conversion results are stored in the upper 12 bits of each 16-bit register.
*1) Maximum speed: Maximum rotation speed [Hz] that can be controlled or operated
*2) Maximum current: (Phase current value [A] which corresponds to 1 LSB of AD converter) × 2^11
*3) Maximum voltage: (Supply voltage (VDC) value [V] which corresponds to 1 LSB of AD conveter) × 2^12
*4) AD conversion results are stored in the upper 12 bits of each 16-bit register.
<VTRGA> Specifies the AD conversion end interrupt that triggers input processing in channel 0.
<VTRGB> Specifies the AD conversion end interrupt that triggers input processing in channel 1.
31 ・・・ 1 0
VETMPREG1 bit Symbol TMPREG1
(0x4005_0030) Read/Write R/W
After reset 0x00000000
Function
31 ・・・ 1 0
VETMPREG2 bit Symbol TMPREG2
(0x4005_0034) Read/Write R/W
After reset 0x00000000
Function
31 ・・・ 1 0
VETMPREG3 bit Symbol TMPREG3
(0x4005_0038) Read/Write R/W
After reset 0x00000000
Function
31 ・・・ 1 0
VETMPREG4 bit Symbol TMPREG4
(0x4005_003C) Read/Write R/W
After reset 0x00000000
Function
31 ・・・ 1 0
VETMPREG5 bit Symbol TMPREG5
(0x4005_0040) Read/Write R/W
After reset 0x00000000
Function
* This register is effective when the 1-shunt current detection mode is selected and PWM shift is
enabled.
<TPWM> Set a PWM period rate (it is valid when the phase interpolation is enabled,
16-bit fixed-point data: 0.0 to 1.0) as follows:
PWM period [s] × Max_Hz×2^16
* Max_Hz: Maximum rotation speed
* It indicates a ratio between PWM frequency and maximum rotation speed.
<OMEGA> Set a rotation speed (16-bit fixed-point data: -1.0 to 1.0) as follows:
Rotation speed [Hz] ÷ Max_Hz×2^15
<THETA> Set phase data (16-bit fixed-point data: 0.0 to 1.0) as follows:
Phase [deg] ÷ 360 × 2^16
31 ・・・ 17 16
VESIN0 bit Symbol
(0x4005_00A4) Read/Write R
VESIN1 After reset 0x0000
(0x4005_013C) Function -
15 ・・・ 1 0
bit Symbol SIN
Read/Write R/W
After reset 0x0000
Function Sine value: 0x0000-0xFFFF
31 ・・・ 17 16
VECOSM0 bit Symbol
(0x4005_00A8) Read/Write R
VECOSM1 After reset 0x0000
(0x4005_0140) Function -
15 ・・・ 1 0
bit Symbol COSM
Read/Write R/W
After reset 0x0000
Function Cosine value (previous value): 0x0000-0xFFFF
31 ・・・ 17 16
VESINM0 bit Symbol
(0x4005_00AC) Read/Write R
VESINM1 After reset 0x0000
(0x4005_0144) Function -
15 ・・・ 1 0
bit Symbol SINM
Read/Write R/W
After reset 0x0000
Function Sine value (previous value): 0x0000-0xFFFF
The upper and lower register names correspond to channel 0 and channel 1 respectively.
<COS> Cosine value based on the THETA value (16-bit fixed-point data: -1.0 to 1.0)
<SIN> Sine value based on the THETA value (16-bit fixed-point data: -1.0 to 1.0)
<COSM> Previous value of the COS register
<SINM> Previous value of the SIN register
31 ・・・ 17 16
VEIQREF0 bit Symbol
(0x4005_0060) Read/Write R
VEIQREF1 After reset 0x0000
(0x4005_00F8) Function -
15 ・・・ 1 0
bit Symbol IQREF
Read/Write R/W
After reset 0x0000
Function Reference value of q-axis current: 0x0000 to 0xFFFF
The upper and lower register names correspond to channel 0 and channel 1 respectively.
<ID_REF> Reference value of d-axis current (16-bit fixed-point data: -1.0 to 1.0)
<IQ_REF> Reference value of q-axis current (16-bit fixed-point data: -1.0 to 1.0)
* Max_I: (Phase current value [A] which corresponds to 1 LSB of ADC) × 2^11
31 ・・・ 1 0
VEVQ0 bit Symbol VQ
(0x4005_0068) Read/Write R/W
VEVQ1 After reset 0x00000000
(0x4005_0100) Function q-axis voltage: 0x00000000-0xFFFFFFFF
The upper and lower register names correspond to channel 0 and channel 1 respectively.
* Max_V: (Supply voltage (VDC) value [V] which corresponds to 1 LSB of ADC) × 2^12
31 ・・・ 17 16
VECIDKP0 bit Symbol
(0x4005_0070) Read/Write R
VECIDKP1 After reset 0x0000
(0x4005_0108) Function -
15 ・・・ 1 0
bit Symbol CIDKP
Read/Write R/W
After reset 0x0000
Function Proportional coefficient for PI control of d-axis: 0x0000-0xFFFF
31 ・・・ 17 16
VECIQKI0 bit Symbol
(0x4005_0074) Read/Write R
VECIQKI1 After reset 0x0000
(0x4005_010C) Function -
15 ・・・ 1 0
bit Symbol CIQKI
Read/Write R/W
After reset 0x0000
Function Integral coefficient for PI control of q-axis: 0x0000-0xFFFF
31 ・・・ 17 16
VECIQKP0 bit Symbol
(0x4005_0078) Read/Write R
VECIQKP1 After reset 0x0000
(0x4005_0110) Function -
15 ・・・ 1 0
bit Symbol CIQKP
Read/Write R/W
After reset 0x0000
Function Proportional coefficient for PI control of q-axis: 0x0000-0xFFFF
The upper and lower register names correspond to channel 0 and channel 1 respectively.
31 ・・・ 17 16
VEVDILH0 bit Symbol VDILH
(0x4005_0080) Read/Write R/W
VEVDILH1 After reset 0x0000
(0x4005_0118) Function
15 ・・・ 1 0
bit Symbol
Read/Write R
After reset 0x0000
Function -
31 ・・・ 1 0
VEVQIH0 bit Symbol VQIH
(0x4005_0084) Read/Write R/W
VEVQIH1 After reset 0x00000000
(0x4005_011C) Function
31 ・・・ 17 16
VEVQILH0 bit Symbol VQILH
(0x4005_0088) Read/Write R/W
VEVQILH1 After reset 0x0000
(0x4005_0120) Function
15 ・・・ 1 0
bit Symbol
Read/Write R
After reset 0x0000
Function -
The upper and lower register names correspond to channel 0 and channel 1 respectively.
<VDIH> Upper 32 bits of the integral term (VDI) for PI control of d-axis
<VDILH> Bit 31 to 16 of the integral term (VDI) for PI control of d-axis
<VQIH> Upper 32 bits of the integral term (VQI) for PI control of q-axis
<VQILH> Bit 31 to 16 of the integral term (VQI) for PI control of q-axis
<FPWMCHG> Rortation speed when PWM shift is enabled. The value to be set is:
Rortation speed [Hz] ÷ Max_Hz×2^15
<VMDPRD> PWM period. Set the value of the PMD’s MDPRD register.
<MINPLS> Set the minimum disparity of pulse width among the duty of VECMPU, VECMPV,
VECMPW.
Disparity of pulse width [s] ÷ PWM counter clock period [s]
31 ・・・ 9 8
VESECTORM0 bit Symbol
(0x4005_00B4) Read/Write R
VESECTORM1 Function -
(0x4005_014C) After reset 0x000000
7 6 5 4 3 2 1 0
bit Symbol SECTORM
Read/Write R R/W
After reset 0x0 0x0
- Sector information
Function
0x0-0xF:
The upper and lower register names correspond to channel 0 and channel 1 respectively.
<SECTOR> Sector information. Indicates the rotation position at the time of output by 12 sectors
each having 30 degrees.
<SECTORM> Previous sector information. Used in input processing.
31 ・・・ 17 16
VEIB00 bit Symbol
(0x4005_00BC) Read/Write R
VEIB01 After reset 0x0000
(0x4005_0154) Function -
15 ・・・ 1 0
bit Symbol IB0
Read/Write R/W
After reset 0x0000
Function AD conversion result of V-phase at zero-current
31 ・・・ 17 16
VEIC00 bit Symbol
(0x4005_00C0) Read/Write R
VEIC01 After reset 0x0000
(0x4005_0158) Function -
15 ・・・ 1 0
bit Symbol IC0
Read/Write R/W
After reset 0x0000
Function AD conversion result of W-phase at zero-current
The upper and lower register names correspond to channel 0 and channel 1 respectively.
<IA0> Stores the AD conversion result of U-phase current when the motor is at stop.
<IB0> Stores the AD conversion result of V-phase current when the motor is at stop
<IC0> Stores the AD conversion result of W-phase current when the motor is at stop
31 ・・・ 17 16
VEIBADC0 bit Symbol
(0x4005_00C8) Read/Write R
VEIBADC1 After reset 0x0000
(0x4005_0160) Function -
15 ・・・ 1 0
bit Symbol IBADC
Read/Write R/W
After reset 0x0000
Function AD conversion result of V-phase current: 0x0000-0xFFFF
31 ・・・ 17 16
VEICADC0 bit Symbol
(0x4005_00CC) Read/Write R
VEICADC1 After reset 0x0000
(0x4005_0164) Function -
15 ・・・ 1 0
bit Symbol ICADC
Read/Write R/W
After reset 0x0000
Function AD conversion result of W-phase current: 0x0000-0xFFFF
The upper and lower register names correspond to channel 0 and channel 1 respectively.
* AD conversion results are stored in the 15--4 bits, with the 3--0 bits always “0”.
* Max_V: (Supply voltage (VDC) value [V] which corresponds to 1 LSB of ADC) × 2^12
31 ・・・ 1 0
VEIQ0 bit Symbol IQ
(0x4005_00D8) Read/Write R/W
VEIQ1 After reset 0x00000000
(0x4005_0170) Function q-axis current: 0x00000000-0xFFFFFFFF
The upper and lower register names correspond to channel 0 and channel 1 respectively.
* Max_I: (Phase current value [A] which corresponds to 1 LSB of ADC) × 2^11
31 ・・・ 17 16
VECMPV0 bit Symbol
(0x4005_0180) Read/Write R
VECMPV1 After reset 0x0000
(0x4005_01A0) Function -
15 ・・・ 1 0
bit Symbol VCMPV
Read/Write R/W
After reset 0x0000
Function PWM pulse width of V-phase: 0-0xFFFF
31 ・・・ 17 16
VECMPW0 bit Symbol
(0x4005_0184) Read/Write R
VECMPW1 After reset 0x0000
(0x4005_01A4) Function -
15 ・・・ 1 0
bit Symbol VCMPW
Read/Write R/W
After reset 0x0000
Function PWM pulse width of W-phase: 0-0xFFFF
The upper and lower register names correspond to channel 0 and channel 1 respectively.
Setting Output
UPWM U0C U0 X0
0 00 OFF output OFF output
1 00 PWMU PWMU
inverted output output
1 11 PWMU PWMU
output inverted output
*The table shows only those combinations that are used in the VE.
Setting Output
VPWM V0C V0 Y0
0 00 OFF output OFF output
1 00 PWMV PWMV
inverted output output
1 11 PWMV PWMV
output inverted output
*The table shows only those combinations that are used in the VE.
Setting Output
WPWM W0C W0 Z0
0 00 OFF output OFF output
1 00 PWMW PWMW
inverted output output
1 11 PWMW PWMW
output inverted output
* The table shows only those combinations that are used in the VE.
<TRGCRC>: Used to correct the synchronizing trigger timing. The value to be set is:
Correction time [s] ÷ PWM counter clock frequency [s]
31 ・・・ 17 16
VETRGCMP10 bit Symbol
(0x4005_0190) Read/Write R
VETRGCMP11 After reset 0x0000
(0x4005_01B0) Function -
15 ・・・ 1 0
bit Symbol VTRGCMP1
Read/Write R/W
After reset 0x0000
Trigger timing setting
0x0000:Prohibited
Function
0x0001 to (MDPRD value-1): Trigger timing
MDPRD value to 0xFFFF: Prohibited
The upper and lower register names correspond to channel 0 and channel 1 respectively.
<VTRGCMP0> PMD setting: Specifies the trigger timing for sampling ADC in synchronization with
PMD.
<VTRGCMP1> PMD setting: Specifies the trigger timing for sampling ADC in synchronization with
PMD.
* These registers are effective when one of the following PMD trigger modes is selected:
count-down match, count-up match, count-up/-down match
* These registers are ineffective when the PMD trigger output mode is set to trigger select output
(TRGOUT=1).
<VTRGSEL> PMD setting: Specifies the synchronizing trigger number to be output at the timing
specified in the VTRGCMP0 register.
* These registers are effective when the PMD trigger output mode is set to trigger select output
(TRGOUT= 1).
<EMGRS> PMD setting : EMG return command for returning from the EMG state
Figure 15-4 shows a flowchart for motor control. The Vector Engine makes state transitions according to the
schedule and mode settings which are programmed through the relevant registers.
RESET
Initial setting
VE/PMD/ADC
Enable VE
Stop Change
Initial input
VEMODE
Change VEACTSCH
Positioning
Change VEMODE
Change VEACTSCH
Change VEMODE
Forced
commutation
Change VEACTSCH
Change VEMODE
Brake
The VEACTSCH register is used to select the schedule to be executed. A schedule is comprised of an
output schedule handling output-related tasks and an input schedule handling input-related tasks. Table
15-5 shows the tasks that are executed in each schedule.
The VEMODE register is used to enable or disable phase interpolation, control output operation, and
enable or disable zero-current detection as appropriate for each step of the motor control flow (see Table
15-6).
1 Schedule 1 *2 *3 *4
4 Schedule 4 - *2 *3 *4
9 Schedule 9 - - - - *3 *4 - -
An output schedule begins executing by the VECPURUNTRG command. When all output-related tasks
are completed, the Vector Engine enters a standby state and waits for a start trigger for input-related tasks.
At this time, schedules of the other channel can be executed.
An input schedule begins executing by a start trigger. When all input-related tasks are completed, the
Vector Engine generates an interrupt to the CPU and enters a halt state. However, if the schedule has its
repeat count (VEREPTIME) set to “2” or more, an interrupt is not generated until the schedule is executed
the specified number of times.
Start command
Execute
output schedule
Wait for
start trigger
Start trigger
Execute
input schedule
Repeated specified N
number of times?
Schedule end
Enable the Vector Engine with the VEEN register. Specify a schedule (VEACTSCH register), task to be
executed (VETASKAPP register) and repeat count (VEREPTIME register).
A schedule of the Vector Engine is comprised of an output schedule and an input schedule. Typically, the
Vector Engine executes an output schedule first, enters a standby state, and then starts executing an input
schedule by a start trigger.
i) By the VECPURUNTRG command. In this case, the task specified in the VETASKAPP register is
executed.
ii) On a repeat start (when VEREPTIME ≥ 2) after the corresponding input schedule is completed.
i) By a start trigger (selected in the VETRGMODE register) after the corresponding output schedule is
completed.
ii) By the VECPURUNTRG command. In this case, the task specified in the VETASKAPP register is
executed.
Table 15-7 gives a summary of tasks executed in output and input schedules. When each task is to be
executed individually or specified as a startup task, use the task number shown in this table.
The current control unit is comprised of a PI control unit for d-axis and a PI control unit for q-axis, and
calculates d-axis and q-axis voltages.
The SIN/COS computation unit is comprised of a phase interpolation unit and a SIN/COS computation
unit.
Phase interpolation calculates the rotation speed by integrating with the PWM period. It is executed only
when phase interpolation is enabled.
i) Phase interpolation
[Equations]
VETHEATA = (VEOMEGA ×VETPWM + VETHEATA × 2^31) / 2^31 : Integration of rotation speed.
Only when phase interpolation is enabled.
Output voltage conversion is comprised of dq-to-αβ coordinate axis conversion and 2-phase-to-3-phase
conversion.
The dq-to-αβ coordinate axis conversion calculates Vα and Vβ from Vd, Vq in SIN and COS.
The 2-phase-to-3-phase conversion performs segmentation by using Vα and Vβ and performs space
vector conversion to calculate Va, Vb and Vc.
For the 2-phase-to-3-phase conversion, either 2-phase modulation or 3-phase modulation can be
selected.
ii) 3-phase voltage calculation (when 3-phase modulation is selected and SECTOR=0 )
[Equations]
t1 = √3/VEVDC ×2^15 ×(√3/2×Vα - 1/2×Vβ) : Calculates V1 period.
t2 = √3/VEVDC ×2^15 ×Vβ : Calculates V2 period.
t3 = 1 - t1 - t2 : Calculates V0+V7 period.
VETMPREG0 = t1 + t2 + t3 ÷ 2 : Calculates Va.
VETMPREG1 = t1 + t3 ÷ 2 : Calculates Vb.
VETMPREG2 = t3 ÷ 2 : Calculates Vc.
The output control unit converts 3-phase voltage values into PWM setting format (VECMPU, VECMPV
and VECMPW ), and sets the VEOUTCR register to control output operation.
When 1-shunt current detection and 2-phase modulation are selected and PWM is enabled, if the rotation
speed is slower than the PWM shift switching reference value, output is switched to shift PWM output.
The trigger generation unit calculates the trigger timing from the PWM setting values (VECMPU, VECMPV
and VECMPW) as appropriate to the current detection method, and sets the VETRGCMP0 and
VETRGCMP1 registers.
The input processing unit saves segmented 3-phase current conversion results, and converts the current
and voltage conversion results into fixed-point data.
It saves zero-current conversion results in the initial input processing..
Input current conversion is comprised of 3-phase-to-2-phase conversion and αβ-to-dq coordinate axis
conversion.
The 3-phase-to-2-phase conversion calculates Iα and Iβ from la, lb and lc.
The αβ-to-dq coordinate axis conversion calculates ld and lq from Iα, Iβ, VESINM and VECOSM.
Table 15-8 and Table 15-9 show the combinations of AD unit and PMD channel that can be used with each
Vector Engine channel depending on the current detection mode to be used.
The Vector Engine calculates the stored value in AD conversion result register 0 to 2 (ADxREG0 to 2) as
a current data and calculates the sotred value in AD conversion result register 3 (ADxREG3) as a voltage
data. Therefore, please specify it with proper setting, referring to Table 15-9.
(x=A or B)
CPU
IO Bus I/F
VE
ADC Trigger
EMG detection input Overvoltage Detection Input Conduction output Analog Input
/EMG /OVV U,V,W,X,Y,Z Motor current,Motor voltage
The table below shows the signals that are input to and output from each PMD.
VE
pwmb.0 uo
PMDnMDPR UO
pwmb.1 xo
D Pulse Width Con duction Protection Dead XO
POUTU
PMDnCMPU Modulati on Control Control Time
POUTV pwmb.2 vo
Control VO
pwmb.3 yo
PMDnCMPV YO
POUTW
pwmb.4 wo
PMDnCMPW WO
pwmb.5 zo
ZO
EMG
VE
UPEQUS OVV
DNEQUS INTEMG
PTENC INTOVV
INTPWM
PORTEN
MDCNT
PMDnTRGCMP0
PMDTRG0
Sync
PMDnTRGCMP1 Trigger PMDTRG1
Generation
PMDnTRGCMP2 PMDTRG2
PMDnTRGCMP3 PMDTRG3
PMDTRG4
PMDnTRGCR
PMDTRG5
VE
The PMD circuit consists of two blocks of a wave generation circuit and a sync trigger generation circuit.
The wave generation circuit includes a pulse width modulation circuit, a conduction control circuit, a
protection control circuit, a dead time control circuit.
- The pulse width modulation circuit generates independent 3-phase PWM waveforms with the same
PWM frequency.
- The conduction control circuit determines the output pattern for each of the upper and lower sides of
the U, V and W phases.
- The protection control circuit controls emergency output stop by EMG input and OVV input.
- The dead time control circuit prevents a short circuit which may occur when the upper side and lower
side are switched.
- The sync trigger generation circuit generates sync trigger signals to the AD converter.
Output ports that are used for the PMD become high impedance when the PMD is disabled.
Before enabling the PMD, Setting <PWMEN>=”1”(enable) other relevant settings, such as output
port polarity.
The <PORTMD> setting controls external port outputs of the upper phases (U, V and W phases) and
the lower phases (X, Y and Z phases). When a tool break occurs while “High-Z” is selected, the upper
and lower phases of external output ports are set to high impedance. In other cases, external port
outputs depend on PMD outputs.
* When PWMEN=0, output ports are set to high impedance regardless of the output port setting.
* When an EMG input occurs, external port outputs are controlled depending on the EMGMD setting.
This bit selects whether to load the second buffer of each double-buffered register with the register
value set via the bus (bus mode) or the value supplied from the Vector Engine (VE mode). The PWM
compare registers (CMPU, CMPV, CMPW), trigger compare registers (TRGCMP0, TRGCMP1) and
MDOUT register are double-buffered, and the second buffers are loaded in synchronization with the
PMD’s internal update timing.
4
PWM Sync Clock
UPEQUS,DNEQUS PWM
PWM nterrupt Request
INTPWM
Control
CMPRLD Up/Down
PWM Counter
fsys Clock control
MDCNT
Selector
0x0001
PMDnMODESEL
The pulse width modulation circuit has a 16-bit PMD up-/down-counter and generates PWM carrier
waveforms with a resolution of 12.5 nsec at 80 MHz. The PWM carrier waveform mode can be selected
from mode 0 (edge-aligned PWM, sawtooth wave modulation) and mode 1 (center-aligned PWM,
triangular wave modulation).
The PWM period extension mode (MDCR<PWMCK> = 1) is also available. When this mode is selected,
the PWM counter generates PWM carrier waveforms with a resolution of 50 nsec.
[Sawtooth wave]
MDCNT counts up to MDPRD and
MDCNT is cleared to 1 in the next cycle.
[MDPRD]
[CMPU
Time
PWMU on
waveform
off
When switching from counting
When switching from counting down to counting up,
[Triangular down
MDCNT
to counting up, MDCNT=peak value (MDPRD)
wave] MDCNT=1 in two cycles. in two cycles.
[MDPRD]
[CMPU
Time
PWMU on
waveform
off
* When the PMD is disabled (PWMEN=0), the value of PWM counter depends on the setting of
PWMMD (PWM carrier waveform). The value is as follows.
In case of PWMMD=0: 0x0001
In case of PWMMD=1: the value of MDPRD
CMPU, CMPV and CMPW are compare registers for determining the output pulse width of the U, V
and W phases. Theses registers are double-buffered. Pulse width is determined by comparing the
buffer and the PWM counter to evaluate which is larger. (To be loaded when the PWM counter value
matches the MDPRD value. When 0.5 PWM period is selected, loading is performed when the PWM
counter matches 1 or MDPRD.) When this register is read, the value of the first buffer (data set via the
bus) is returned.
* To load the second buffer with the value in the compare register updated via the bus, select the bus
mode (default) by setting MODESEL<MDSEL> to 0.
* Do not write to these registers in byte units. If the upper 8 bits [15:8] and the lower 8 bits [7:0] are
written separately, operation cannot be guaranteed.
PMDnMODESEL
PMDnMDOUT
VE:OUTCR
PMDnMDCR Decoder
UPWM
DTYMD FF FF xpwm U
UOC
outd
PWMU MUX mddec
pwmin X
pwminx
PWMV 1 VPWM
FF FF Decoder
VOC V
PWMW
WPWM
FF FF Decoder
0 WOC W
Sync
FF rel
The conduction control circuit performs output port control according to the settings made in the PMD
output register (MDOUT). The MDOUT register bits are divided into two parts: settings for the
synchronizing signal for port output and settings for port output. The latter part is double-buffered and
update timing can be set as synchronous or asynchronous to PWM.
The output settings for six port lines are made independently for each of the upper and lower phases
through the bits 10 to 8 of the MDOUT register and bits 3 and 2 of the MDPOT register. In addition, bits 10
to 8 of the MDOUT register select PWM or H/L output for each of the U, V and W phases. When PWM
output is selected, PWM waveforms are output. When H/L output is selected, output is fixed to either a
high or low level. Table 16-3 shows a summary of port outputs according to port output settings in the
MDOUT register and polarity settings in the MDCR register.
<UOC, VOC, WOC>,<UPWM, VPWM,WPWM>: U-, V-, and W-phase output control
The MDOUT register controls the port outputs of the U, V and W phases (see Table 16-3 below.)
* To load the second buffer of MDOUT with a value updated via the bus, select the bus mode (default)
by setting MODESEL<MDSEL> to 0.
* Do not write to this register in byte units. If the upper 8 bits [15:8] and the lower 8 bits [7:0] are written
separately, operation cannot be guaranteed.
○PMDnMDCR<SYNTMD>=0
Polarity: Active high (MDPOT bits 3, 2=1) Polarity: Active low (MDPOT bits 3, 2=0)
MDOUT MDOUT Bits 10, 9, 8 MDOUT MDOUT Bits 10, 9, 8
Output Control H/L or PWM Output Select Output Control H/L or PWM Output Select
Bits 5, 3, 1 Bits 4, 2, 0 0: H/L output 1: PWM output Bits 5,3,1 Bits 4,2,0 0: H/L output 1: PWM output
Upper Lower Upper Lower Upper Lower Upper Lower Upper Lower Upper Lower
phase phase phase phase phase phase phase phase phase phase phase phase
output output output output output output output output
0 0 L L /PWM PWM 0 0 H H PWM /PWM
0 1 L H L PWM 0 1 H L H /PWM
1 0 H L PWM L 1 0 L H /PWM H
1 1 H H PWM /PWM 1 1 L L /PWM PWM
○PMDnMDCR<SYNTMD>=1
Polarity: Active high (MDPOT bits 3, 2=1) Polarity: Active low (MDPOT bits 3, 2=0)
MDOUT MDOUT Bits 10, 9, 8 MDOUT MDOUT Bits 10, 9, 8
Output Control H/L or PWM Output Select Output Control H/L or PWM Output Select
Bits 5, 3, 1 Bits 4, 2, 0 0: H/L output 1: PWM output Bits 5,3,1 Bits 4,2,0 0: H/L output 1: PWM output
Upper Lower Upper Lower Upper Lower Upper Lower Upper Lower Upper Lower
phase phase phase phase phase phase phase phase phase phase phase phase
output output output output output output output output
0 0 L L /PWM PWM 0 0 H H PWM /PWM
0 1 L H L /PWM 0 1 H L H PWM
1 0 H L PWM L 1 0 L H /PWM H
1 1 H H PWM /PWM 1 1 L L /PWM PWM
Table 16-3 Port Outputs according to the UOC, VOC, WOC, UPWM, VPWM and WPWM Settings
8
6 6
u’
U
x’
X
v’
V
y’
Y
w’
W
z’
Z
The protection control circuit consists of an EMG protection control circuit and an OVV protection control
circuit.
The EMG protection circuit consists of an EMG protection control unit and a port output disable unit. This
circuit is activated when the EMG input becomes low. The EMG protection circuit offers an emergency
stop mechanism: when the EMG input is asserted (H → L), all six port outputs are immediately disabled
(depending on the EMGCR<EMGMD> setting) and an EMG interrupt (INTEMG) is generated.
EMGCR<EMGMD> can be set to output a control signal that sets external output ports to high impedance
in case of an emergency.
A tool break also disables all six PWM output lines depending on the EMGCR<EMGMD> setting. When a
tool break occurs, external output ports can be set to high impedance through the setting of the PORTMD
register.
EMG protection is set through the EMG Control Register (EMGCR). A read value of 1 in
EMGSTA<EMGST> indicates that the EMG protection circuit is active. In this state, EMG protection can
be released by setting all the port output lines inactive (MDOUT[10:8][5:0]) and then setting
EMGCR<EMGRS> to 1.
To disable the EMG protection function, write 0x5A and 0xA5 in this order to the EMGREL register and
then clear EMGCR<EMGEN> to 0. (These three instructions must be executed consecutively.) While the
EMG protection input is low, any attempt to release the EMG protection state is ignored. Before setting
EMGCR<EMGRS> to 1 to release EMG protection, make sure that EMGST<EMGI> is high.
The EMG protection circuit can be disabled only after the specified key codes (0x5A, 0xA5) are written in
the EMGREL register to prevent it from being inadvertently disabled.
Note: Initial procedure for EMG function
After reset, the EMG function is enabled but EMG pin is configured as a normal port.
Therefore, as the EMG protection might be valid, release the EMG protection by the following
procedure at the initial sequence.
① Selects EMG function by PxFC register.
② Reads PMDnEMGSTA<EMGI> to confirm it as “1”.
③ Sets PMDnMDOUT<10:8、5:0> to ”0” to make all ports in-active (“L” output).
④ Releases EMG protection by setting PMDnEMGCR<EMGRS> to ”1”.
The OVV protection control circuit consists of an OVV protection control unit and a port output disable
unit. This circuit is activated when the OVV input port is asserted.
When the OVV input is asserted (H → L) for a specified period (set in OVVCR<OVVCNT>), the OVV
protection circuit fixes the six port output lines in the conduction control circuit to high or low. At this time,
an OVV interrupt (INTOV) is generated. It is possible to turn off only the upper or lower phases or all
phases.
OVV protection is set through the OVV Control Register (OVVCR). A read value of 1 in
OVVSTA<OVVST> indicates that the OVV protection circuit is active.
The release of the OVV protection state is enabled by setting OVVCR<OVVEN> to 1. Then, OVV
protection is automatically released after the OVV protection circuit completes its operation.
* The OVV protection state is not released while the OVV protection input is low. The state of this port
input can be checked by reading OVVSTA<OVVI>.
The OVV protection state is released in synchronization with the PWM period (when the PWM count
matches the MDPRD value). (When 0.5 PWM period is selected, the release timing is when the PWM
counter equals 1 or MDPRD.)
To disable the OVV protection function, write 0x5A and 0xA5 in this order to the EMGREL register and
then clear OVVCR<OVVEN> to 0. (These three instructions must be executed consecutively.)
The OVV protection circuit can be disabled only after the specified key codes (0x5A, 0xA5) are written in
the EMGREL register to prevent it from being inadvertently disabled.
This field controls the outputs of the upper and lower phases when an OVV condition occurs.
* If OVV and EMG conditions occur simultaneously, the protection mode settings in the EMGCR
register become effective.
<ADIN0EN>: ADC A monitor interrupt input enable
0: Disable
1: Enable
This bit selects whether to enable or disable the monitor signal input from ADC A.
When this bit is set to enable and <OVVISEL>=1, the PMD is placed in a protection state (if OVV
protection is enabled) by an interrupt signal from ADC A that is generated by a match between an AD
conversion result and the specified compare value.
* For details, see the chapter on the ADC.
<ADIN1EN>: ADC B monitor interrupt input enable
0: Disable input
1: Enable input
This bit selects whether to enable or disable the monitor signal input from ADC B.
When this bit is set to enable and <OVVISEL>=1, the PMD is placed in a protection state (if OVV
protection is enabled) by an interrupt signal from ADC B that is generated by a match between an AD
conversion result and the specified compare value.
* For details, see the chapter on the ADC.
<OVVCNT>: OVV input detection time
1-15 (If 0 is set, it is handled as 1.)
OVVCNT×16/fsys (resolution: 200[nsec] at 80 MHz )
* OVVCNT is effective only when port input is selected as the OVV signal (<OVVISEL>=1).
MDPOT MDPOT
PMDnDTR <POLL> <POLH>
fsys/8
ON Delay Circuit
U
u’ X
x’
ON Delay Circuit
V
v’ Y
y’
ON Delay Circuit
W
w’ Z
z’
The dead time circuit consists of a dead time unit and an output polarity switching unit.
For each of the U, V and W phases, the ON delay circuit introduces a delay (dead time) when the upper
and lower phases are switched to prevent a short circuit. The dead time is set to the Dead Time Register
(DTR) as an 8-bit value with a resolution of 100 ns at 80 MHz.
The output polarity switching circuit allows the polarity (active high or active low) of the upper and lower
phases to be independently set through MDPOT<POLH> and <POLL>.
updn PTENC
T RG0
PMD nT RGCM P0 A=B S lo pe S elect Trigg er Outp ut
Buffer
Select
VE:VTRGC MP 0
PM DTRG0
PM DTRG1
TRG 1
PMD nT RGCM P1 A=B
Buffer
VE:VTRGC MP 1 PM DTRG2
PM DTRG3
TRG 2
A=B
PM DnTRGC MP2 Buffer
PM DTRG4
PM DTRG5
TRG 3
A=B
PM DnTRGC MP3 Buffer
The sync trigger generation circuit generates trigger signals for starting ADC sampling in synchronization
with PWM. The ADC trigger signal (PMDTRG) is generated by a match between MDCNT and TRGCMP.
The signal generation timing can be selected from up-count match, down-count match and
up-/down-count match. When the edge-aligned PWM mode is selected, the ADC trigger signal is
generated on an up-count match. When PWM output is disabled (MDEN<PWMEN>=0), trigger output is
also disabled.
When the trigger select output mode is selected, the trigger output port is switched according to the
TRGSEL register setting or sector information from the Vector Engine.
When the PMD counter value (MDCNT) matches the value set in TRGCMPx, PMDTRG is output.
When TRGCMPx is read, the value in the first buffer of the double buffers (data set via the bus) is
returned.
TRGCMPx should be set in a range of 1 to [MDPRD set value – 1].
* It is prohibited to set TRGCMPx to 0 or the MDPRD value.
* To load the data in TRGCMP0 and TRGCMP1 to the second buffers, select the bus mode (default)
by setting MODESEL<MDSEL> to 0.
* Do not write to these registers in byte units. If the upper 8 bits [15:8] and the lower 8 bits [7:0] are
written separately, operation cannot be guaranteed.
* When TRGCMPx is set to 0x0001, no trigger output is made only in the first cycle after PWM
start (MDEN<PWMEN>1).
Table 16-6 TRGCMPx Buffer Update Timing according to Trigger Output Mode Setting
TRGxMD TBUFx Update Timing
000:Trigger output disabled Always updated
001:Trigger output on down-count match Updated when PWM counter equals MDPRD (PWM carrier peak)
010:Trigger output on up-count match Updated when PWM counter equals 1 (PWM carrier bottom)
Updated when PWM counter equals 1 or MDPRD
011:Trigger output on up-/down-count match
(PWM carrier peak/bottom)
100:Trigger output at PWM carrier peak
101:Trigger output at PWM carrier bottom
Always updated
110:Trigger output at PWM carrier peak/bottom
111:Trigger output disabled
This bit enables or disables trigger output in the EMG protection state.
When <TRGOUT>=0, trigger outputs PMDTRG0 to PMDTRG3 output the trigger signals generated by
a match with TRGCMP0 to TRGCMP3 respectively.PMDTRG4 and PMDTRG5 are fixed to a low level.
When <TRGOUT>=1, trigger output by TRGCMP0 is switched according to the TRGSEL register
setting or sector information from the Vector Engine. For details, see the table below.
This field is effective when the variable trigger output mode is selected (TRGMD<TRGOUT>=1). The
selected trigger is output by a match between the PMD counter and the TRGCMP0 value. (See Table
16-6.)
(1) It can select analog input and start AD conversion when receiving trigger signal from PMD or
TMRB(interrupt).
(2) It can select analog input, in the Software Trigger Program and the Constant Trigger Program.
(3) The ADCs has twelve register for AD conversion result.
(4) The ADCs generate interrupt signal at the end of the program which was started by PMD trigger
and TMRB trigger.
(5) The ADCs generate interrupt signal at the end of the program which are the Software Trigger
Program and the Constant Trigger Program.
(6) The ADCs have the AD conversion monitoring function. When this function is enabled, an interrupt
is generated when a conversion result matches the specified comparison value.
AVDDA
/ VREFHA
AD conversion is performed at the clock frequency selected in the ADC Clock Setting Register.
ADACLK 7 6 5 4 3 2 1 0
0x4003_0000 Bit symbol - TSH3 TSH2 TSH1 TSH0 ADCLK2 ADCLK1 ADCLK0
Read/Write R R/W R/W
ADBCLK After reset 0 1011 000
0x4003_0200 Function Always read AD prescaler output (SCLK) select
Write “1001”
as 0. 000: fc (Note1) 001: fc/2
010: fc/4 011: fc/8
1XX: fc/16
SCLK
sclk_vadc
Note 1: Frequency of SCLK can be use up to 40MHz. Do not set ADCLK[2:0] to “000” when fc=80MHz.
Note 2: AD conversion is performed at the clock frequency selected in this register. The conversion clock frequency must be selected to
ensure the guaranteed accuracy.
Note 3: The conversion clock must not be changed while AD conversion is in progress.
The ADC Mode Setting Registers (ADxMOD0, ADxMOD1, ADxMOD2 and ADxMOD3) are used to select
how AD conversion is started. (x=A , B : ADC unit)
ADxMOD0
ADAMOD0 7 6 5 4 3 2 1 0
0x4003_0004 Bit symbol - DACON ADSS
Read/Write R R/W W
ADBMOD0 After reset 0 0 0
0x4003_0204 Function Always read as 0. DAC control Software
triggered
0: off conversion
1: On
0:Don't care
1: Start
ADxMOD1
ADAMOD1 7 6 5 4 3 2 1 0
0xc4003_0008 Bit symbol ADEN - ADAS
Read/Write R/W R R/W
ADBMOD1 After reset 0 0 0
0x4003_0208 Function AD Always read as 0. Constant
conversion AD
control conversion
control
0: Disable 0: Disable
1: Enable 1: Enable
Setting <ADEN> to “1”, when using the ADC. After Setting <ADEN> to “1”, setting <ADAS> to “1” starts AD
conversion and repeat conversion.
ADxMOD2
ADAMOD2 7 6 5 4 3 2 1 0
0x4003_000C Bit symbol - ADSFN ADBFN
Read/Write R R R
ADBMOD2 After reset 0 0 0
0x4003_020C Function Always read as 0. Software AD
conversion conversion
busy flag busy flag
0: 0:
Conversion Conversion
completed not in
1: progress
Conversion 1:
in progress Conversion
in progress
The <ADBFN> is an AD conversion busy flag. When AD conversion is started regardless of conversion
factor (PMD, Timer, Software, Constant), <ADBFN> is set to “1”. When finished AD conversion, <ADBFN> is
cleared to “0”.
The <ADSFN> is a software AD conversion busy flag. After <ADSS> was set to “1”, when AD conversion is
actually started, <ADSFN> is set to “1”. When finished AD conversion, <ADSFN> is cleared to “0”.
ADxMOD3
ADAMOD3 7 6 5 4 3 2 1 0
0x4003_00D4 Bit symbol - - PMODE2 PMODE1 PMODE0 - - -
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
ADBMOD3 After reset 0 1 0 1 1 0 0 0
0x4003_02D4 Function Write “0” Write “1” Write “100” Write “0” Write “0” Write “0”
15 14 13 12 11 10 9 8
Bit symbol - - - - - - - -
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
After reset 0 0 0 0 0 1 0 0
Function Write “0” Write “0” Write “0” Write “0” Write “0” Write “1” Write “0” Write “0”
Note : <PMODE[2:0]> must be set to “100”. And do not change other bits in ADxMOD3 register.
The ADxCMPCR0 and ADxCMPCR1 registers are used to enable or disable comparison between an AD
conversion result and the specified comparison value, to select the register to be compared with an AD
conversion result and to set how many times comparison should be performed to determine the result.
After fixing the conversion result, the interrupt signal (INTADxCPA, INTADxCPB) is generated.
(x=A , B : ADC unit)
ADxCMPCR0
ADACMPCR0 7 6 5 4 3 2 1 0
0x4003_0010 Bit symbol CMP0EN - - ADBIG0 REGS03 REGS02 REGS01 REGS00
Read/Write R/W R R R/W R/W R/W R/W R/W
ADBCMPR0 After reset 0 0 0 0 0 0 0 0
0x4003_0210 Function Monitoring Always read Always read Comparison AD conversion result register to be compared
condition
function as 0. as 0.
0: Larger than or 0000: ADREG0 0100: ADREG4 1000: ADREG8
0: Disable equal to compare 0001: ADREG1 0101: ADREG5 1001: ADREG9
1: Enable register 0010: ADREG2 0110: ADREG6 1010: ADREG10
1: Smaller than or
0011: ADREG3 0111: ADREG7 1011: ADREG11
equal to compare
register
15 14 13 12 11 10 9 8
Bit symbol - - - - CMPCNT03 CMPCNT02 CMPCNT01 CMPCNT00
Read/Write R R R R R/W R/W R/W R/W
After reset 0 0 0 0 0 0 0 0
Function Always read Always read Always read Always read as Comparison count for determining the result
as 0. as 0. as 0. 0. 0000: After every comparison
0001: After two comparisons
・
・
1111: After 16 comparisons
ADxCMPCR1
ADACMPCR1 7 6 5 4 3 2 1 0
0x4003_0014 Bit symbol CMP1EN - - ADBIG1 REGS13 REGS12 REGS11 REGS10
Read/Write R/W R R R/W R/W R/W R/W R/W
ADBCMPR1 After reset 0 0 0 0 0 0 0 0
0x4003_0214 Function Monitoring Always read Always read Comparison AD conversion result register to be compared
condition
function as 0. as 0.
0: Larger than or 0000: ADREG0 0100: ADREG4 1000: ADREG8
0: Disable equal to compare 0001: ADREG1 0101: ADREG5 1001: ADREG9
1: Enable register 0010: ADREG2 0110: ADREG6 1010: ADREG10
1: Smaller than or
0011: ADREG3 0111: ADREG7 1011: ADREG11
equal to compare
register
15 14 13 12 11 10 9 8
Bit symbol - - - - CMPCNT13 CMPCNT12 CMPCNT11 CMPCNT10
Read/Write R R R R R/W R/W R/W R/W
After reset 0 0 0 0 0 0 0 0
Function Always read Always read Always read Always read as Comparison count for determining the result
as 0. as 0. as 0. 0. 0000: After every comparison
0001: After two comparisons
・
・
1111: After 16 comparisons
The ADxCMP0 and ADxCMP1 registers specify the value to be compared with an AD conversion result. The
upper 12 bits (bits 4 to 15) are used. (x=A , B : ADC unit)
ADxCMP0
ADACMP0 7 6 5 4 3 2 1 0
0x4003_0018 Bit symbol AD0CMP03 AD0CMP02 AD0CMP01 AD0CMP00 - - - -
Read/Write R/W R/W R/W R/W R R R R
ADBCMP0 After reset 0 0 0 0 0 0 0 0
0x4003_0218 Function Bits 0 to 3 of the value to be compared with an AD conversion Always read as 0.
result
15 14 13 12 11 10 9 8
Bit symbol AD0CMP11 AD0CMP10 AD0CMP09 AD0CMP08 AD0CMP07 AD0CMP06 AD0CMP05 AD0CMP04
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
After reset 0 0 0 0 0 0 0 0
Function Bits 4 to 11 of the value to be compared with an AD conversion result
ADxCMP1
ADACMP1 7 6 5 4 3 2 1 0
0x4003_001C Bit symbol AD1CMP03 AD1CMP02 AD1CMP01 AD1CMP00 - - - -
Read/Write R/W R/W R/W R/W R R R R
ADBCMP1 After reset 0 0 0 0 0 0 0 0
0x4003_021C Function Bits 0 to 3 of the value to be compared with an AD conversion Always read as 0.
result
15 14 13 12 11 10 9 8
Bit symbol AD1CMP11 AD1CMP10 AD1CMP09 AD1CMP08 AD1CMP07 AD1CMP06 AD1CMP05 AD1CMP04
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
After reset 0 0 0 0 0 0 0 0
Function Bits 4 to 11 of the value to be compared with an AD conversion result
The ADxREGn (n = 0 to 11) register is used to store the result of an AD conversion. Bit 0 <ADRnRF> is
a flag that is set when an AD conversion result is stored in the ADxREGn register and is cleared when the
low-order byte of ADxREGn is read. Bit 1 <OVRn> is an overrun flag. This flag is set when a new AD
conversion result is stored before the low-order byte of ADxREGn is read and is cleared when the
low-order byte of ADxREGn is read.
There are twelve ADxREGn registers, which are all functionally equivalent.
(x=A , B : ADC unit)
AD conversion can be started by a trigger from the PMD (programmable motor driver).
The PMD trigger program registers are used to specify the program to be started by each of twelve
triggers generated by the PMD, to select the interrupt to be generated upon completion of the program
and to select the AIN input to be used.
The PMD trigger program registers include three types of registers: PMD Trigger Program Number Select
Register (ADxPSELp), PMD Trigger Interrupt Select Register (ADxPINTSn) and PMD Trigger Program Setting
Register (ADxPSETnm). (x=A , B : ADC unit , p=0 to 11, n=0 to 5, m=0 to 3)
ADPSEL11
ADPSEL0
ADPSEL1
ADPSEL2
ADPSEL3
ADPSEL4
ADPSEL5
ADPSEL6
ADPSEL7
ADPSEL8
ADPSEL9
The PMD Trigger Program Number Select Register (ADxPSELn) specifies the program to be started
by each of twelve AD conversion start signals corresponding to twelve triggers generated by the PMD.
Programs 0 to 5 are available.
The PMD Trigger Interrupt Select Register (ADxPINTSn) selects the interrupt to be generated upon
completion of each program, and enables or disables the interrupt.
The PMD Trigger Program Setting Register (ADxPSETnm) specifies the settings for each of
programs 0 to 5. Each PMD Trigger Program Register is comprised of four registers for specifying the
AIN input to be converted. The conversion results corresponding to the ADxPSETn0 to ADxPSETn3
registers are stored in the Conversion Result Registers 0 to 3 (ADxREG0 to ADxREG3).
The PMD Trigger Interrupt Select Registers (ADxPINTS0 to ADxPINTS5) select the interrupt to
be generated for each of programs 0 to 5.
(x=A , B : ADC unit)
ADxPINTS0 (for program 0)
ADAPINTS0 7 6 5 4 3 2 1 0
0x4003_0080 Bit symbol INTSEL01 INTSEL00
Read/Write R R/W
ADBPINTS0 After reset 0 0
0x4003_0280 Function Always read as 0. Interrupt select
00: No interrupt output
01: INTADPDA
10: INTADPDB
11: Reserved
Each of the PMD Trigger Program Registers (ADxPSET0 to 5) are comprised of four registers.
These four registers are used to select the AD conversion input pin (AINA0 to AINA14, AINB0 to
AINB16) to be used and select phase of the Vector Engine. The numbers of these registers
correspond to those of the Conversion Result Registers.
Setting the <ENSPnm> to 1 enables the ADxPSETnm register. The <UVWISnm> bits are used to
select phase-U, phase-V or phase-W. The <AINSPnm> bits are used to select the AIN pin to be
used. The numbers of the PMD Trigger Program Setting Registers correspond to those of the
Conversion Result Registers. (n= 0 to 5 , m= 0 to 3)
AD conversion can be started by software. There are twelve 8-bit registers for programming
software triggers. Setting the <ENSSn> to “1” enables the ADxSSETn register. The <AINSSnm>
are used to select the AIN pin to be used. The numbers of the Software Trigger Program
Registers correspond to those of the Conversion Result Registers.
When finished this AD conversion, interrupt :INTADxSFT is generated.
(x=A , B : ADC unit , n= 0 to 11, m= 0 to 4)
The ADCs allow conversion triggers to be constantly enabled. There are twelve 8-bit registers for
programming constant triggers. Setting the <ENSAm> to “1” enables the ADxASETm register. The
<AINSAnm> are used to select the AIN pin to be used. The numbers of the Constant Trigger
Program Registers correspond to those of the Conversion Result Registers.
(x=A , B : ADC unit , m= 0 to 11, n= 0 to 4)
For the High-level and Low-level analog reference voltages, the AVDD5A and AVSSA pins are
used in ADC A and the AVDD5B and AVSSB pins are used in ADC B. There are no registers for
controlling current between AVDD5x and AVSSx. Inputs to these pins are fixed. (x=A,B:ADC unit)
The internal amplifiers and comparators share the power supply and GND, which are connected
to AMPVDD and AMPVSS respectively.
(Note 1) During AD conversion, do not change the output data of port H/I/J/K, to avoid the
influence on the conversion result.
(Note 2) AD conversion results might be unstable by the following conditions.
Input operation is executed.
Output operation is executed.
Output current of port varies.
Take a countermeasure such as averaging the multiple conversion results, to get
precise value.
PMD trigger 0 > y y y > PMD trigger 5 > Timer trigger > Software trigger > constant trigger
If the PMD trigger occurs while an AD conversion is in progress, the PMD trigger is handled stop
the ongoing program and start AD conversion correspond to PMD trigger number.
If a higher-priority trigger occurs while an AD conversion is in progress, the higher-priority trigger
is handled after the ongoing program is completed.
It has some delay from generation of trigger to start of AD conversion. The delay depends on the
trigger. The following timing chart and table show the delay.
Trigger
AD conversion result
Result of 1st conversion
register0 (ADxREG0)
AD conversion result
Result of 2nd conversion
register1 (ADxREG1)
The ADCs have the AD conversion monitoring function. When this function is enabled, an
interrupt is generated when a conversion result matches the specified comparison value.
To enable the monitoring function, set ADxCMPCR0<CMP0EN> or ADxCMPCR1<CMP1EN> to
“1”. In the monitoring function, if the value of AD conversion result register to which the monitoring
function is assigned corresponds to the comparison condition specified by ADxCMCR< ADBIG0>,
the interrupt (INTADxCPA for ADxCMPCR0, INTADxCPB for ADxCMPCR1) is generated. The
comparison is executed at the timing of storing the conversion result into the register.
(x=A , B : ADC unit)
Note 1: The AD conversion result store flag (ADRxRF) is not cleared by the comparison function.
Note 2: The comparison function differs from reading the conversion result by software. Therefore, if
the next conversion is completed without reading the previous result, the overrun flag (OVRs)
is set.
The following shows a timing chart of software trigger conversion, constant conversion and acceptance of
trigger.
In the software trigger conversion, the interrupt is generated after completion of conversion programmed by
ADxSSET03, ADxSSET47 and ADxSSET811.
If the ADxMOD1<ADEN> is cleared to “0” during AD conversion, the ongoing conversion stops without storing
to the result register.
Fig 17-4 Writing “0” to ADEN during the software trigger AD conversion
In the constant conversion, if the next conversion completes without reading the previous result from the
conversion result register, the overrun flag is set to “1”. In this case, the previous conversion result in the
conversion result register is overwritten by the next result. The overrun flag is cleared by reading of the
conversion result.
If the PMD trigger is occurred during the software trigger conversion, the ongoing conversion stops
immediately.
If the timer trigger is occurred during the software trigger conversion, the ongoing conversion stops after the
completion of ongoing conversion. After the completion of conversion by trigger, the software trigger
conversion starts from the beginning programmed by ADxSSET03, ADxxSSET47 and ADxxSSET811.
(x=A , B : ADC unit)
17.6.1 Successive Conversion Using PMD A (Three Shunts) and One ADC
The following shows a circuit diagram for AD conversion using one PMD for three shunts and
one ADC.
U AINA0 PMD0TRGn
(n = 0~5)
V AINA1 ADC A
W AINA2
6 PMD 0
INTADAPDA
Program 0 1 2 3 4 5
reg0 U V W V W U
reg1 V W U U V W
INT A A A A A A
Programs 0 to 5 are assigned to trigger inputs PMD0TRG0 to 5. “reg0” and “reg1” indicate the
PMD Trigger Program Registers ADAPSETn0 and ADAPSETn1. “U”, “V” and “W” indicate the
phases of a motor. AIN inputs are selected to obtain these phases.
When a trigger input occurs, AD conversion is performed based on reg0 and reg1 sequentially, and
then the interrupt signal (INTADAPDA) is generated.
17.6.2 Simultaneous Conversion Using One PMD (Three Shunts) and Two ADCs
The following shows a block diagram for AD conversion using one PMD for three shunts and two
ADCs.
U AINA0 PMD0TRGn
(n = 0~2)
V AINA1
W AINA2
ADC A 3 PMD 0
INTADAPDA
PMD0TRGn
(n = 0~2)
AINB0
AINB1
ADC B 3
AINB2
INTADBPDA
ADC A
Program 0 1 2
reg0 U V W
INT A A A
ADC B
Program 0 1 2
reg0 V W U
INT A A A
Programs 0 to 2 are assigned to three trigger inputs to ADC A and ADC B. “reg0” indicates the
PMD Trigger Program Register ADAPSETn0 and ADBPSETn0. “U”, “V” and “W” indicate the
phases of a motor. AIN inputs are selected to obtain these phases.
When a trigger input occurs, ADC A and ADC B are started simultaneously to perform AD
conversion based on reg0, and the interrupt signals (INTADAPDA , INTADBPDA) are output to
ADC A and ADC B.
17.6.3 Successive Conversion Using PMD A (Three Shunts), PMD B (One Shunt)
and Two ADCs
The following shows a circuit diagram for AD conversion using one PMD for three shunts, one
PMD for one shunt and two ADCs.
U AIN0 PMD0TRGn
(n = 0~5)
V AIN1
W AIN2
ADC A 6 PMD 0
R AIN5C
INTADAPDA
INTADAPDB
PMD1TRGn
(n = 6, 7)
AIN0 2
AIN1 PMD 1
ADC B
AIN2C
ADC B
PMD0 PMD0 PMD0
Trigger
0 ,3 1,4 2,5
Program 0 1 2
reg0 PMD0 V PMD0 W PMD0 U
INT - - -
In ADC A, programs 0 to 2 are assigned to six trigger signals from PMD0 and programs 3 and 4
are assigned to two trigger signals from PMD1. In ADC B, programs 0 to 2 are assigned to six
trigger signals from PMD0. “reg0”, “reg1” and “reg2” indicate the PMD Trigger Program Registers
ADxPSETn0, ADxPSETn1 and ADxPSETn2 (x=A,B : ADC Unit). “U”, “V” and “W” indicate the
phases of a motor. AIN inputs are selected to obtain these phases. “R” indicates a resistor, where
the AIN that is connected to that resistor is set.
When a trigger input occurs, ADC A or ADC B is started to perform AD conversion. In ADC A, the
interrupt (INTADAPDA) is generated for a trigger from PMD0 and the interrupt (INTADAPDB) is
generated for a trigger from PMD1. In ADC B, interrupt generation is disabled in this example.
17.6.4 Successive Conversion Using One PMD (One Shunt) and One ADC
The following shows a circuit diagram for AD conversion using one PMD for one shunt and one
ADC.
R AINA0 PMD0TRGn
(n = 0, 1)
ADC A 2 PMD 0
INTADAPDA
PMD0 PMD0
Trigger
0 1
Program 0 1
reg0 R -
reg1 - R
INT - A
Programs 0 and 1 are assigned to two trigger signals from PMD0. “reg0” and “reg1” indicate the
PMD Trigger Program Registers ADAPSETn0 and ADAPSETn1. “R” indicates a resistor, where
the AIN input that is connected to that resistor is set.
When a trigger input occurs, the ADC is started to execute programs 0 and 1 sequentially. When
program 1 is completed, the interrupt (INTADAPDA) is generated.
18.Op-Amps/Analog Comparators
The TMPM370 has four op-amps and analog comparators. Each op-amp amplifies a voltage
received via an input port and feeds its output voltage into a 12-bit successive-approximation
analog-to-digital (A/D) converter(s). These op-amps are used to amplify voltage differentials
across shunt resistors for motor current measurement. The output of each op-amp is also fed into
an analog comparator and compared to the corresponding reference voltage derived from an
external resistor. The comparator provides an abnormal current indication to the EMG logic.
Figure 18-1 shows the block diagram of the op-amps/analog converters.
AVDDA
/ VREFHA
Op-amps A, B and C (AMP A/B/C) are intended to be used for 3-shunt current sensing. The
amplified voltages from AMP A/B/C are fed into two A/D converters to allow simultaneous
conversions of two shunt voltages out of three corresponding to the U, V and W phases of a motor.
The inputs of AMP A/B/C are also connected with the A/D converters (AINA 9/10/11, AINB13/
14/15) directly; thus, even if AMP A/B/C are disabled, two shunt voltages can be converted into
digital values at a time.
Op-amp D (AMP D) only supports 1-shunt current sensing. The amplified voltage from AMP D is
fed into one A/D converter (AINB16).
See the block diagram of the op-amps/analog converters shown in Figure 18-1.
Analog comparators A/B/C/D are all connected to op-amps A/B/C/D; thus the comparators can
compare an amplified voltage against the reference voltage. Each op-amp can be individually
disabled by software; if disabled, the corresponding comparator takes as input a shunt voltage
from an input port.
Analog comparators A/B/C, designed to be connected to a 3-shunt resistor circuit, have a
common reference voltage (CMPREFABC).
Analog comparator D is designed to be connected to a 1-shunt resistor circuit; it has an
independent reference voltage (CMPREFD).
ADC
AIN
CMPCTL<CMPSEL>
Analog Port
Input AMP
AMPCTL<AMPGLIN>
CMP PMD
Port Input EMG Signal
CMPREF
Register Address
Amp A Control Register AMPCTLA 0x4003_0400
Amp B Control Register AMPCTLB 0x4003_0408
Amp C Control Register AMPCTLC 0x4003_0410
Amp D Control Register AMPCTLD 0x4003_0418
Comparator A Control Register CMPCTLA 0x4003_0420
Comparator B Control Register CMPCTLB 0x4003_0428
Comparator C Control Register CMPCTLC 0x4003_0430
Comparator D Control Register CMPCTLD 0x4003_0438
The discussions in this chapter apply to ENC0. For ENC1, the names of registers, interrupt signals and
pins in the following text should be replaced as appropriate, as shown in Table 19.1 to Table 19.3.
ENC0 ENC1
Register Register Register
Address Address
Symbol Symbol
Encoder Input Control Register EN0TNCR 0x4001_0400 EN1TNCR 0x4001_0500
Encoder Counter Reload Register EN0RELOAD 0x4001_0404 EN1RELOAD 0x4001_0504
Encoder Compare Register EN0INT 0x4001_0408 EN1INT 0x4001_0508
Encoder Counter EN0CNT 0x4001_040C EN1CNT 0x4001_050C
19.1 Outline
The ENC can be configured to operate in one of four different modes: Encoder mode, two Sensor
modes (Event count mode, Timer count mode) and Timer mode. And it also has some functions as
below.
z Supports incremental encoders and Hall sensor ICs. (signals of Hall sensor IC can be input
directly)
z 24-bit general-purpose timer mode
z Multiply-by-4 (multiply-by-6) logic
z Direction discriminator
z 24-bit counter
z Comparator enable/disable
z Interrupt request output
z Digital noise filters for input signals
Noise
ENCA0
Filter
Interrupt
Request Interrupt
Noise Input Decoder Counter
ENCB0 Request
Filter Selector Control
INTENC0
Noise
ENCZ0
Filter
In Encoder mode, the ENC provides high-speed position tracking, based on the A/B or A/B/Z input
signals from an incremental encoder.
In Sensor modes, the ENC provides low-speed position (zero-cross) tracking, based on either the
U/V or U/V/W input signals from a Hall sensor.
There are two operating modes: Event Count mode and Timer Count mode (which runs with fsys).
19.1.2.1 Event Count Mode
z 24-bit up-counter
z Counter clear: via a software clear bit, or at a preset count, or by an external trigger input, or on
overflow of the free-running counter.
23 22 21 20 19 18 17 16
Bit Symbol - - - - - MODE1 MODE0 P3EN
Read/Write R R R R R R/W R/W R/W
Default 0 0 0 0 0 0 0 0
ENC Operating Mode [In Sensor
00: Encoder mode mode]
01: Sensor Event Count mode 2/3-Phase
Description Reading these bits returns a 0. 10: Sensor Timer Count mode Input Select
0: 2-phase
11: Timer mode 1: 3-phase
15 14 13 12 11 10 9 8
Bit Symbol CMP REVERR UD ZDET SFTCAP ENCLR ZESEL CMPEN
Read/Write R R R R W W R/W R/W
Default 0 0 0 0 0 0 0 0
Compare [In Sensor Rotation Z_ Detected [In Sensor Encoder [In Timer Compare
Flag Timer Count Direction 0: Not Timer Count Counter mode] Enable
0: - mode] 0: CCW detected and Timer Clear Z Trigger 0: Compare
1: Counter Revolution 1: CW 1: Z phase modes] 0: - Edge Select disabled
compared Error detected Software 1: Clears the 0: Rising 1: Compare
0: - Capture counter. edge enabled
Description This bit is 1: Error 0: - 1: Falling
cleared on a occurred. 1: Software edge
read. capture
This bit is
cleared on a
read.
7 6 5 4 3 2 1 0
Bit Symbol ZEN ENRUN NR1 NR0 INTEN ENDEV2 ENDEV1 ENDEV0
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Default 0 0 0 0 0 0 0 0
Z Phase ENC Run Noise Filter ENC Encoder Pulse Division Factor
Enable 0: Disabled 00: No filtering Interrupt 000: ÷ 1
0: Disabled 1: Enabled 01: Filters out pulses narrower Enable
1: Enabled than 31/fsys (387.5 ns@80 0: Disabled 001: ÷ 2
MHz). 1: Enabled 010: ÷ 4
Description 10: Filters out pulses narrower 011: ÷ 8
than 63/fsys(787.5 ns@80 100: ÷ 16
MHz).
11: Filters out pulses narrower 101: ÷ 32
than 127/fsys(1587 ns@80 110: ÷ 64
MHz). 111: ÷ 128
Description:
Operating modes are defined by <MODE1:0>, <P3EN> and <ZEN> as shown in the following table.
There are a total of eight operating modes.
Input signal
<MODE1> <MODE0> <ZEN> <P3EN> Operating Mode
Used
0 A, B Encoder mode
0 0 0
1 A, B, Z Encoder mode (using Z)
0 U, V Sensor Event Count mode (2 phase inputs)
0 1 0
1 U, V, W Sensor Event Count mode (3 phase inputs)
0 U, V Sensor Timer Count mode (2 phase inputs)
1 0 0
1 U, V, W Sensor Timer Count mode (3 phase inputs)
0 - Timer mode
1 1 0
1 Z Timer mode (using Z)
Note: <P3EN> must always be cleared in Encoder mode and Timer mode , irrespective of the number
of phase input pins used.
<CMP> is set to 1 when the counter value has been compared to the value programmed in the
EN0INT register.
<CMP> is cleared to 0 on a read. <CMP> remains cleared when <ENRUN> = 0. Writing to <CMP> has
no effect.
In Sensor Timer Count mode, <REVERR> is set to 1 when a change in the rotation direction has been
detected. <REVERR> is cleared to 0 on a read. <REVERR> remains cleared when <ENRUN> = 0.
Writing to <REVERR> has no effect.
This bit has an effect only in Sensor Timer Count mode.
Note: Once software has changed the operating mode of the ENC, <REVERR> must be cleared by
reading it.
The quadrature signals A and B identify the motor rotation direction. <UD> is set to 1 when the CW
direction is indicated (signal A of the incremental encoder signal is ahead of signal B). <UD> is cleared
to 0 when the CCW direction is indicated (signal A is behind signal B). <UD> remains cleared while
<ENRUN> = 0.
<ZDET>: Z Detected
0: Not detected
1: Detected
<ZDET> is set to 1 on the first edge of Z input signal (ENCZ) after <ENRUN> is written from 0 to 1. This
occurs on a rising edge of the signal Z during CW rotation or on a falling edge of Z during CCW rotation.
<ZDET> remains cleared while <ENRUN> = 0.
<ZEN> has no influence on the value of <ZDET>.
<ZDET> remains cleared in Sensor Event Count and Sensor Timer Count modes.
If <SFTCAP> is set to 1, the value of the encoder counter is captured into the EN0CNT register.
Writing a 0 to <SFTCAP> has no effect. Reading <SFTCAP> always returns a 0.
In Encoder and Sensor Event Count modes, <SFTCAP> has no effect; a write of a 1 to this bit is
ignored.
Writing a 1 to <ENCLR> clears the encoder counter to 0. Once cleared, the encoder counter restarts
counting from 0. Writing a 0 to <ENCLR> has no effect. Reading <ENCLR> always returns a 0.
<ZESEL> selects the edge of the ENCZ that should be used as an external trigger in Timer mode.
In the other operating modes, <ZESEL> has no effect.
If <CMPEN> is set to 1, the value of the encoder counter is compared to the value programmed in the
EN0INT register. If <CMPEN> is cleared to 0, this comparison is not done.
・ In Encoder mode
<ZEN> controls whether to clear the encoder counter (EN0CNT) on the rising or falling edge of Z.
When <ZEN> = 1, the encoder counter is cleared on the rising edge of the ENCZ input if the
motor is rotating in the CW direction; the encoder counter is cleared on the falling edge of ENCZ if
the motor is rotating in the CCW direction. If the edges of ENCLK (multiply_by_4 clock derived from
the decoded A and B signals) and the edge of ENCZ coincide, the encoder counter is cleared to 0
without incrementing or decrementing (i.e., the clear takes precedence).
・ In Timer mode
<ZEN> controls whether to use the ENCZ signal as an external trigger input.
When <ZEN> = 1, the value of the encoder counter is captured into the EN0INT register and
cleared to 0 on the edge of ENCZ selected by <ZESEL>.
There are counters and flags that are and are not cleared even if the <ENRUN> bit is cleared to 0.
The following table shows the states of the counters and flags, depending on the value of <ENRUN>.
The digital noise filters remove pulses narrower than the width selected by <NR1:0>.
The frequency of the encoder pulse is divided by the factor specified by <ENDEV2:0>.
The divided signal determines the interval of the event interrupt.
Description:
・ In Encoder mode
<RELOAD15:0> defines the encoder counter period multiplied by 4.
If the encoder counter is configured as an up-counter, it increments up to the value programmed
in <RELOAD15:0> and then wraps around to 0 on the next ENCLK. If the encoder counter is
configured as a down-counter, it decrements to 0 and then is reloaded with the value of
<RELOAD15:0> on the next ENCLK.
EN0INT 31 30 29 28 27 26 25 24
(0x4001_0408) Bit Symbol - - - - - - - -
Read/Write R R R R R R R R
Default 0 0 0 0 0 0 0 0
Description Reading these bits returns a 0.
23 22 21 20 19 18 17 16
Bit Symbol INT23 INT22 INT21 INT20 INT19 INT18 INT17 INT16
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Default 0 0 0 0 0 0 0 0
See the description below.
Description <INT23:16> are used only in Sensor Timer Count mode and Timer mode
15 14 13 12 11 10 9 8
Bit Symbol INT15 INT14 INT13 INT12 INT11 INT10 INT9 INT8
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Default 0 0 0 0 0 0 0 0
Description See the description below.
7 6 5 4 3 2 1 0
Bit Symbol INT7 INT6 INT5 INT4 INT3 INT2 INT1 INT0
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Default 0 0 0 0 0 0 0 0
In Encoder mode:
Generates an interrupt at the programmed encoder pulse count (0x0000 thru. 0xFFFF).
In Sensor Event Count mode:
Generates an interrupt at the programmed encoder pulse count (0x0000 thru. 0xFFFF).
Description In Sensor Timer Count mode:
Generates an interrupt when the counter has reached the programmed value without detecting a pulse (0x000000
thru. 0xFFFFFF).
In Timer mode:
Generates an interrupt when the counter value has reached the programmed value (0x000000 thru. 0xFFFFFF).
Description:
・ In Encoder mode
<CMP> is set to 1 when the value of the encoder counter has reached the value of <INT15:0>,
provided <CMPEN> is set to 1. At this time, the event counter interrupt (INTENC0) is asserted if
<INTEN> is set to 1.
However, when <ZEN> = 1, INTENC is not asserted until <ZDET> is set to 1. In Encoder mode,
<INT23:16> are not used (and are ignored even if programmed).
・ In Timer mode
<CMP> is set to 1 when the value of the encoder counter has reached the value of <INT23:0>,
provided <CMPEN> is set to 1. At this time, the timer compare interrupt (INTENC0) is asserted if
<INTEN> is set to 1. The value of <ZEN> has no effect on this interrupt generation.
EN0CNT 31 30 29 28 27 26 25 24
(0x4001_040C Bit Symbol - - - - - - - -
Read/Write R R R R R R R R
Default 0 0 0 0 0 0 0 0
Description Reading these bits returns a 0.
23 22 21 20 19 18 17 16
Bit Symbol CNT23 CNT22 CNT21 CNT20 CNT19 CNT18 CNT17 CNT16
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Default 0 0 0 0 0 0 0 0
See the description below.
Description <CNT23:16> are used only in Sensor Timer Count mode and Timer mode.
In Encoder mode and Sensor Event Count mode, reading these bits returns a 0.
15 14 13 12 11 10 9 8
Bit Symbol CNT15 CNT14 CNT13 CNT12 CNT11 CNT10 CNT9 CNT8
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Default 0 0 0 0 0 0 0 0
Description See the description below.
7 6 5 4 3 2 1 0
Bit Symbol CNT7 CNT6 CNT5 CNT4 CNT3 CNT2 CNT1 CNT0
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Default 0 0 0 0 0 0 0 0
In Encoder mode:
Number of encoder pulses
0x0000 thru. 0xFFFF
In Sensor mode:
Description Pulse detection time or the encoder counter value captured under software control
0x000000 thru. 0xFFFFFF
In Timer mode:
Iencoder counter value captured by hardware signaling or under software control
0x000000 thru. 0xFFFFFF
Description:
・ In Encoder mode
The value of encoder count.can be read out from <CNT15:0>.
In Encoder mode, the encoder counter counts up or down on each encoder pulse (ENCLK).
During CW rotation, encoder counter counts up; when it has reached the value of
<RELOAD15:0>, it wraps around to 0 on the next ENCLK.
During CCW rotation, encoder counter counts down; when it has reached 0, it is reloaded with the
value of <RELOAD15:0> on the next ENCLK.
・ In Timer mode
<CNT23:0> contains the value of the encoder counter captured by software setting <SFTCAP> to
1. When <ZEN> = 1, the value of the encoder counter is also captured into <CNT23:0> on the Z
ENCZ edge selected by <ZESEL>.
In Timer mode, the encoder counter is configured as a free-running counter that counts up with
fsys. When it has reached 0xFFFFFF, it wraps around to 0 automatically.
fsys
Encoder Input, A
Encoder Input, B
Encoder Input, Z
Internal Z_Detected
Z Detect, <ZDET>
dir
CW CCW
Rotation Direction
Counter Clear, ENCLR
(÷2) TIMPLS
Encoder Counter 110 111 112 0 1 2 3 0 1 0 380 37E 37D 0 380 37F
Interrupt, INTENC0
fsys
Encoder Input, A
Encoder Input, B
Encoder Input, Z
Internal Z_Detected
Z Detect, <ZDET>
dir
CW CCW
Rotation Direction
Counter Clear, ENCLR
(÷2) TIMPLS
Encoder Counter, encnt 110 111 112 113 0 1 2 0 1 0 380 37F 37E 37D 37C
Interrupt, INTENC0
・ In Encoder mode, the incremental encoder inputs of the TMPM370 should be connected to the A,
B and Z channels. The encoder counter counts pulses of ENCLK, which is multiplied_by_4 clock
derived from the decoded A and B quadrature signals.
・ During CW rotation (i.e., when A leads B), the encoder counter counts up; when it has reached
the value of <RELOAD>, it wraps around to 0 on the next ENCLK.
・ During CCW rotation (i.e., when A lags B), the encoder counter counts down; when it has reached
0x0000, it is reloaded with the value of <RELOAD> on the next ENCLK.
・ Additionally, when <ZEN> = 1, the encoder counter is cleared to 0 on the rising edge of Z during
CW rotation and on the falling edge of Z during CCW rotation (at the internal Z_Detected timing).
If the ENCLK and Z edges coincide, the encoder counter is cleared to 0 without incrementing or
decrementing.
・ TIMPLS, which is derived by dividing ENCLK by a programmed factor, can be driven out
externally.
・ If <CMPEN> is set to 1, an interrupt is generated when the value of the encoder counter has
reached the value of <EN0INT>. When <ZEN> = 1, however, an interrupt does not occur while
<ZDET> = 0.
fsys
Encoder Input, U
Encoder Input, V
Encoder Input, W
dir
CW CCW
Rotation Direction
(÷2) TIMPLS
Encoder Counter FFFC FFFD FFFE FFFF 0 1 2 3 2 1 0 FFFF FFFE FFFD FFFC FFFB FFFA
Interrupt, INTENC0
Encoder Input, U
Encoder Input, V
Encoder Input, W
dir
CW CCW
Rotation Direction
(÷2) TIMPLS
Encoder Counter FFFC FFFD FFFE FFFF 0 1 2 3 2 1 0 FFFF FFFE FFFD FFFC FFFB FFFA
Interrupt, INTENC0
・ In Sensor Event Count mode, the Hall sensor inputs of the TMPM370 should be connected to the
U, V and W channels. The encoder counter counts the pulses of ENCLK, which is either
multiplied_by_4 clock (when <P3EN> = 0) derived from the decoded U and V signals or
multiplied_by_6 clock (when <P3EN> = 1) derived from the decoded U, V and W signals.
・ During CW rotation, the encoder counter counts up; when it has reached 0xFFFF, it wraps around
to 0 on the next ENCLK.
・ During CCW rotation, the encoder counter counts down; when it has reached 0x0000, it wraps
TMPM370 19-14 Encoder Input Circuit
TMPM370
・ TIMPLS, which is derived by dividing ENCLK by a programmed factor, can be driven out
externally.
・ If <CMPEN> is set to 1, an interrupt is generated when the value of the internal counter has
reached the value of <EN0INT>.
fsys
Encoder Input, U
Encoder Input, V
Encoder Input, W
dir
CW CCW
Rotation Direction
(÷2) TIMPLS
Encoder Counter 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 2 3 0 1 2 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2
Interrupt, INTENC0
Encoder Input, U
Encoder Input, V
Encoder Input, W
dir
CW CCW
Rotation Direction
(÷2) TIMPLS
Encoder Counter 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 2 3 0 1 2 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2
Interrupt, INTENC0
・ In Sensor Timer Count mode, the Hall sensor inputs of the TMPM370 should be connected to the
U, V and W channels. The encoder counter measures the interval between two contiguous
pulses of ENCLK, which is either multiplied_by_4 clock (when <P3EN> = 0) derived from the
decoded U and V signals or multiplied_by_6 clock (when <P3EN> = 1) derived from the decoded
U, V and W signals.
・ The encoder counter always counts up; it is cleared to 0 on ENCLK. When the encoder counter
has reached 0xFFFFFF, it wraps around to 0.
TMPM370 19-15 Encoder Input Circuit
TMPM370
・ ENCLK causes the value of the encoder counter to be captured into the EN0CNT register. The
captured counter value can be read out of EN0CNT.
・ Setting the software capture bit, <SFTCAP>, to 1 causes the value of the encoder counter to be
captured into the ENCNT register. This capture operation can be performed at any time. The
captured counter value can be read out of ENCNT.
・ If <CMPEN> is set to 1, an interrupt is generated when the value of the encoder counter has
reached the value of <EN0INT>.
・ <REVERR> is set to 1 when the rotation direction has changed. This bit is cleared to 0 on a read.
・ The value of the ENCNT register (the captured value) is retained, regardless of the value of
<ENRUN>. The ENCNT register is only cleared by a reset.
fsys
Encoder Input, A
Encoder Input, B
Encoder Input, Z
Internal Z_Detected
dir
CW CCW
Rotation Direction
Z Edge Select, ZESEL
(÷2) TIMPLS
Encoder Counter 2 3 4 5 6 7 8 9 A B 0 1 2 3 4 31 32 33 34 35 36 37 38 39 40 41 0 1 2 3 4 5 6 7 8
Interrupt, INTENC0
Compare Interrupt Capture Interrupt Capture Interrupt Compare Interrupt
fsys
Encoder Input, A
Encoder Input, B
Encoder Input, Z
Internal Z_Detected
dir
CW CCW
Rotation Direction
Z Edge Select, ZESEL
(÷2) TIMPLS
Encoder Counter 2 3 4 5 6 7 8 9 A B C D E F 10 31 32 33 34 35 36 0 1 2 3 4 5 6 7 8 9 A B C D
Interrupt, INTENC0
Compare Interrupt Compare Interrupt
・ When <ZEN> = 1, the Z input pin is used as an external trigger. When <ZEN> = 0, no external
input is used to trigger the timer.
・ The encoder counter always counts up. If <ZEN> = 1, the counter is cleared to 0 on the selected
edge of Z (at the internal Z_Detected timing): a rising edge when <ZESEL> = 0 and a falling edge
when <ZESEL> = 1. When the encoder counter has reached 0xFFFFFF, it wraps around to 0.
・ Z_Detected causes the value of the encoder counter to be captured into the ENCNT register. The
captured counter value can be read out of ENCNT.
・ Setting the software capture bit, <SFTCAP>, to 1 causes the value of the encoder counter to be
TMPM370 19-17 Encoder Input Circuit
TMPM370
captured into the ENCNT register. This capture operation can be performed at any time. The
captured counter value can be read out of ENCNT.
・ If <CMPEN> is set to 1, an interrupt is generated when the value of the encoder counter has
reached the value of <ENINT>.
・ The value of the ENCNT register (the captured value) is retained, regardless of the value of
<ENRUN>. The ENCNT register is only cleared by a reset.
fsys
Encoder Input, A
Encoder Input, B
fsys
Encoder Input, U
Encoder Input, V
fsys
U/V/W
(Compare Register)
Event timeout period INTENC0
(Capture)
INTENC0
(compare)
• Event timeout error The counter wraps around to 0 on overflow.
EN0INT reg =0x0150 Encoder Counter 0 1 2 3 14C 14D 14E 14F 150 151 152 FFFD FFFE FFFF 0 1 2
EN0INT reg =0xFFFF Encoder Counter 0 1 2 3 14C 14D 14E 14F 150 151 152 FFFD FFFE FFFF 0 1 2
fsys
The counter is cleared when it
has reached the value of <INT>
EN0INT reg =0xFFFF Encoder Counter 0 1 2 3 14F 150 151 152 FFFD FFFE FFFF 0 1 2
fsys
<ENDEV> = 000
Encoder Input, A
Encoder Input, B
EN0INT reg =0x0150 Encoder Counter 0 1 2 3 14C 14D 14E 14F 150 151 152 FFFD FFFE FFFF 0 1 2
fsys
U/V/W
(Compare Register)
Event timeout period INT ENC0
(compare)
INTENC0
(compare)
• Event timeout error The counter wraps around to 0 on overflow.
ENINT reg =0x0150 Encoder Counter 0 1 2 3 14C 14D 14E 14F 150 151 152 FFFD FFFE FFFF 0 1 2
ENINT reg =0xFFFF Encoder Counter 0 1 2 3 14C 14D 14E 14F 150 151 152 FFFD FFFE FFFF 0 1 2
fsys
The counter is cleared when it
has reached the value of <INT>
ENINT reg =0xFFFF Encoder 0 1 2 3 14F 150 151 152 FFFD FFFE FFFF 0 1 2
(Compare Register) C t
INTENC0
(compare)
The following diagrams illustrate the phase shifting of the A, B and Z channels.
The ENC can interface with both two-phase (A/B) and three-phase (A/B/Z) encoder inputs. For
three-phase encoder inputs, <P3EN> should be set to 1.
(1) Here are possible combinations of values of the A (U), B (V) and Z (W) signals during CW
rotation.
A 0 1 1 0 0 1
B 0 0 1 1 0 0
A 0 1 1 1 0 0 0 1 1
B 0 0 0 1 1 1 0 0 0
Z 1 1 0 0 0 1 1 1 0
(2) Here are possible combinations of values of the A (U), B (V) and Z (W) signals during CCW
rotation.
A 0 0 1 1 0 0
B 0 1 1 0 0 1
A 1 1 0 0 0 1 1 1 0
B 0 0 0 1 1 1 0 0 0
Z 0 1 1 1 0 0 0 1 1
The counter block consists of a 24-bit up/down counter and its control logic.
19.3.5.1 Overview
The counter is configured as an up-counter or a down-counter, cleared and reloaded with a programmed value,
according to the selected operating mode.
19.3.6 Interrupts
The ENC has these interrupts: event (divided-clock/capture) interrupt, event timeout interrupt, timer
compare interrupt and capture interrupt.
19.3.6.1 Overview
When <INTEN> = 1, the ENC generates interrupt requests, based on the counter value and the
detection of a encoder pulse.
There are six interrupt sources, depending on the operating mode, and the settings of
<CMPEN> and <ZEN>, as shown in Table 19.5 .
Interrupt Status
Interrupt Source Description Operating Mode
Generation Flag
In Sensor Timer Count mode and Timer mode, the value of the encoder counter can be
captured into the ENCNT register.
The captured counter value can be read out of the ENCNT register.
In Sensor Timer Count mode, the value of the encoder counter is captured into the ENCNT
register upon occurrence of an event (encoder pulse). The counter value can also be captured by
writing a 1 to <SFTCAP>.
In Timer mode, the counter value can be captured by writing a 1 to <SFTCAP>. If <ZEN> is set
to 1, the counter value can also be captured by an edge of the Z signal input selected via
<ZESEL>.
20.1.1 Features
1) Memory capacity
The TMPM370FY contains flash memory. The memory sizes and configurations are shown
in the table below. Independent write access to each block is available. When the CPU is to
access the internal flash memory, 32-bit data bus width is used.
2) Write/erase time
Writing is executed per page. The TMPM370FY contains 64 words in a page.
Page writing requires 1.25ms (typical) regardless of number of words.
A block erase requires 0.1 sec. (typical).
The following table shows write and erase time per chip.
3) Programming method
The onboard programming mode is available for the user to program (rewrite) the device
while it is mounted on the user's board.
・The onboard programming mode
3-1) User boot mode
The user's original rewriting method can be supported.
3-2) Single boot mode
The rewriting method to use serial data transfer (Toshiba's unique method) can
be supported.
4) Rewriting method
The flash memory included in this device is generally compliant with the applicable JEDEC
standards except for some specific functions. Therefore, if the user is currently using an
external flash memory device, it is easy to implement the functions into this device.
Furthermore, the user is not required to build his/her own programs to realize complicated
write and erase functions because such functions are automatically performed using the
circuits already built-in the flash memory chip.
5) Protect/Security function
This device is also implemented with a read-protect function to inhibit reading flash memory
data from any external writer device. On the other hand, rewrite protection is available only
through command-based software programming; any hardware setting method to apply
+12VDC is not supported. See chapter 20 for details of ROM protection and security
function.
ROM controller
Command
Flash memory cell
register
Normal mode In this operation mode, two different modes, i.e., the mode to execute user application programs and the
mode to rewrite the flash memory onboard the user’s card, are defined. The former is referred to as
"normal mode" and the latter "user boot mode.
User boot mode The user can uniquely configure the system to switch between these two modes.
For example, the user can freely design the system such that the normal mode is selected when the port
"PA0" is set to "1" and the user boot mode is selected when it is set to "0."
The user should prepare a routine as part of the application program to make the decision on the
selection of the modes.
Single boot mode After reset is cleared, it starts up from the internal Boot ROM (Mask ROM). In the Boot ROM, an
algorithm to enable flash memory rewriting on the user’s set through the serial port of this device is
programmed. By connecting to an external host computer through the serial port, the internal flash
memory can be programmed by transferring data in accordance with predefined protocols.
Among the flash memory operation modes listed in the above table, the User Boot mode and the
Single Boot mode are the programmable modes. These two modes, the User Boot mode and the
Single Boot mode, are referred to as "Onboard Programming" modes where onboard rewriting of
internal flash memory can be made on the user's card.
Note: Regardless using or not using Single Boot mode, password must be written in password area.
Either the Single Chip or Single Boot operation mode can be selected by externally setting the level
of the BOOT (PF0) pin while the device is in reset status.
After the level is set, the CPU starts operation in the selected operation mode when the reset
condition is removed. Regarding the BOOT (PF0) pin, be sure not to change the levels during
operation once the mode is selected.
The mode setting method and the mode transition diagram are shown below:
Reset state
Single
boot mode
User
Normal mode boot mode
Onboard
programming mode
User to set the
switch method
The condition to switch the modes needs to be set by using the I/O of TMPM370 in conformity
with the user’s system setup condition. Also, flash memory programming routine that the user
uniquely makes up needs to be set in the new application. This routine is used for
programming after being switched to User Boot Mode. The execution of the programming
routine must take place while it is stored in the area other than the flash memory since the
data in the internal flash memory cannot be read out during delete/ writing mode. Once
re-programming is complete, it is recommended to protect relevant flash blocks from
accidental corruption during subsequent Single-Chip (Normal mode) operations. All the
interruption including a non-maskable are inhibited at User Boot Mode.
(1-A) and (1-B) are the examples of programming with routines in the internal flash memory
and in the external memory. For a detailed description of the erase and program sequence,
refer to 19.3 On-board Programming of Flash Memory (Rewrite/Erase).
(a) Mode judgment routine: Code to determine whether or not to switch to User Boot mode
(b) Programming routine: Code to download new program code from a host controller and
re-program the flash memory
(c) Copy routine: Code to copy the data described in (b) from the TMPM370 flash memory to either
the TMPM370 on-chip RAM or external memory device.
New Application
(Host) Program Code
(I/O)
(TMPM370)
Flash memory
Old Application Program
Code
[Reset Procedure]
(a) Mode Judgment Routine
(Step-2)
After RESET is released, the reset procedure determines whether to put the TMPM370 flash memory in
User Boot mode. If mode switching conditions are met, the flash memory enters User Boot mode. (All
interrupts including NMI must be disabled while in User Boot mode.)
New Application
Flash memory (Host) Program Code
(TMPM370) (I/O)
0 → 1 RESET
Old Application Program
Code
[Reset Procedure]
Conditions for
(a) Mode Judgment Routine entering User Boot
mode (defined by
(b) Programming routine
the user)
(c) Copy routine RAM
(Step-3)
Once transition to User Boot mode is occurred, execute the copy routine (c) to copy the flash
programming routine (b) to the TMPM370 on-chip RAM.
New Application
(Host) Program Code
(I/O)
(TMPM370)
Flash memory
Old Application Program
Code
(Step-4)
Jump program execution to the flash programming routine in the on-chip RAM to erase a flash block
containing the old application program code.
New Application
(Host) Program Code
(I/O)
(TMPM370)
Flash memory
(Erased)
書き替えルーチン
(b) Programming routine
[Reset procedure]
(a) Mode judgment routine
(b) Programming routine
(c) Copy routine RAM
(Step-5)
Continue executing the flash programming routine to download new program code from the host
controller and program it into the erased flash block. Once programming is complete, turn on the
protection of that flash block.
New Application
(Host) Program Code
(I/O)
(TMPM370)
Flash memory
New Application
Program Code
書き替えルーチン
(b) Programming routine
[Reset procedure]
(a) Mode judgment routine
(b) Programming routine
RAM
(c) Copy routine
(Step-6)
Set RESET to “0” to reset the TMPM370. Upon reset, the on-chip flash memory is put in Normal mode.
After RESET is released, the CPU will start executing the new application program code.
(Host)
(TMPM370) (I/O)
(a) Mode judgment routine: Code to determine whether or not to switch to User Boot mode
(b) Transfer routine: Code to download new program code from a host controller
New application
(Host) program code
(I/O)
(c) Programming routine
(TMPM370)
Flash memory
Old application
program code
[Reset procedure]
(a) Mode judgment routine
RAM
(b) Transfer routine
(Step-2)
After RESET is released, the reset procedure determines whether to put the TMPM370 flash memory in
User Boot mode. If mode switching conditions are met, the flash memory enters User Boot mode. (All
interrupts including NMI must be disabled while in User Boot mode).
New application
(Host) program code
(I/O)
(c) Programming routine
(TMPM370)
0 → 1 RESET
Flash memory
Old application
program code
Conditions for
[Reset procedure] entering User Boot
mode (defined by
(a) Mode judgment routine the user)
RAM
(b) Transfer routine
(Step-3)
Once User Boot mode is entered, execute the transfer routine (b) to download the flash programming
routine (c) from the host controller to the TMPM370 on-chip RAM.
New application
(Host) Program code
(I/O)
(c) Programming routine
(TMPM370)
Flash memory
Old application
program code
(c) Programming routine
[Reset procedure]
(a) Mode judgment routine
RAM
(b) Transfer routine
(Step-4)
Jump program execution to the flash programming routine in the on-chip RAM to erase a flash block
containing the old application program code.
New application
(Host) program code
(I/O)
(c) Programming routine
(TMPM370)
Flash memory
(Erased)
(c) Programming routine
[Reset procedure]
(a) Mode judgment routine
RAM
(b) Transfer routine
(Step-5)
Continue executing the flash programming routine to download new program code from the host
controller and program it into the erased flash block. Once programming is complete, turn on the
protection of that flash block.
New application
(Host) program code
(I/O)
(c) Programming routine
(TMPM370)
Flash memory
New application
Program code
(c) Programming routine
[Reset procedure]
(a) Mode judgment routine
RAM
(b) Transfer routine
(Step-6)
Set RESET to “0” low to reset the TMPM370. Upon reset, the on-chip flash memory is put in Normal
mode. After RESET is released, the CPU will start executing the new application program code.
(Host)
(I/O)
(TMPM370)
0 → 1 RESET
Flash memory
New application
program code
Set to normal mode
[Reset procedure]
(a) Mode judgment routine
RAM
(b) Transfer routine
Single Boot mode allows for serial programming of the flash memory. Channel 0 of the SIO
(SIO0) of the TMPM370 is connected to an external host controller. Via this serial link, a
programming routine is downloaded from the host controller to the TMPM370 on-chip RAM.
Then, the flash memory is re-programmed by executing the programming routine. The host
sends out both commands and programming data to re-program the flash memory.
Communications between the SIO0 and the host must follow the protocol described later. To
secure the contents of the flash memory, the validity of the application’s password is checked
before a programming routine is downloaded into the on-chip RAM. If password matching fails,
the transfer of a programming routine itself is aborted.
As in the case of User Boot mode, all interrupts including the non-maskable interrupt (NMI) must
be disabled in Single Boot mode while the flash memory is being erased or programmed. In
SingleBoot mode, the boot-ROM programs are executed in Normal mode.
Once re-programming is complete, it is recommended to protect relevant flash blocks from
accidental corruption during subsequent Single-Chip (Normal mode) operations.
−−−−−−−−−−−−
Note : When use Single Boot Mode, it is necessary to reset TMPM370FY from the RESET
terminal.
(Step-1)
The flash block containing the older version of the program code need not be erased before executing
the programming routine. Since a programming routine and programming data are transferred via the
SIO (SIO0), the SIO0 must be connected to a host controller. Prepare a programming routine (a) on the
host controller.
New application
(Host) program code
(I/O)
(a) Programming routine
(TMPM370)
Old application
program code
(or erased state)
RAM
(Step-2)
Cancel the reset of the TMPM370 by setting the Single Boot mode pin to “0”, so that the CPU re-boots
from the on-chip boot ROM. The 12-byte password transferred from the host controller via SIO0 is first
compared to the contents of the special flash memory locations. (If the flash block has already been
erased, the password is 0xFFFF).
New application
(Host) program code
(I/O)
(a) Programming routine
(TMPM370)
0 → 1 RESET
Boot ROM SIO0
Flash memory
0 BOOT
Old application
program code
(or erased state)
RAM
(Step-3)
If the password was correct, the boot program downloads, via the SIO0, the programming routine (a)
from the host controller into the on-chip RAM of the TMPM370. The programming routine must be
stored in the address range 0x2000_0400 to the end address of RAM.
New application
(Host) program code
(I/O)
(TMPM370) (a) Programming routine
Old application
(a) Programming routine
Program code
(or erased state)
RAM
(Step-4)
The CPU jumps to the programming routine (a) in the on-chip RAM to erase the flash block containing
the old application program code. The Block Erase or Chip Erase command may be used.
New application
(Host) Program code
(I/O)
(a) Programming routine
(TMPM370)
(Step-5)
Next, the programming routine (a) downloads new application program code from the host controller
and programs it into the erased flash block. Once programming is complete, protection of that flash
block is turned on. It is not allowed to move program control from the programming routine (a) back to
the boot ROM.
In the example below, new program code comes from the same host controller via the same SIO0
channel as for the programming routine. However, once the programming routine has begun to
execute, it is free to change the transfer path and the source of the transfer. Create board hardware
and a programming routine to suit your particular needs.
New application
(Host) program code
(I/O)
(a) Programming routine
(TMPM370)
(a)Programming routine
New application
program code
RAM
(Step-6)
When programming of the flash memory is complete, power off the board and disconnect the cable
leading from the host to the target board. Turn on the power again so that the TMPM370 re-boots in
Single-Chip (Normal) mode to execute the new program.
(Host)
(TMPM370)
0 → 1 RESET
Boot ROM SIO0
Flash memory
Set to Single-Chip
New application Normal) mode
program code (BOOT=1)
RAM
The following addresses are assigned for storing software ID information and
Internal ROM passwords. Storing program in these addresses is not recommendable.
TMPM370FY :0x3F83_FFF0 to 0x3F83_FFFF
(Note 1) In I/O Interface mode, the baud rate for the transfers of the first and second bytes must
be 1/16 of the desired baud rate.
(Note 2) In case of any negative acknowledge, the boot program returns to a state in which it
waits for a command code (3rd byte). In I/O Interface mode, if a communication error
occurs, a negative acknowledge does not occur.
(Note 3) The 19th to 25th bytes must be within the RAM address range from 0x2000_0400 through
the end address of RAM.
Table 20-7 Transfer Format for the Show Flash Memory Sum Command
Byte Data Transferred from the Controller Baud rate Data Transferred from the
to the TMPM370FY TMPM370FY to the Controller
Boot ROM 1 byte Serial operation mode and baud rate Desired baud -
For UART mode 0x86 rate (Note 1)
For I/O Interface mode 0x30
2 byte - ACK for the serial operation mode byte
For UART mode
-Normal acknowledge 0x86
(The boot program aborts if the baud rate
can not be set correctly.)
For I/O Interface mode
-Normal acknowledge 0x30
3 byte Command code (0x20) -
4 byte - ACK for the command code byte (Note 2)
-Normal acknowledge 0x20
-Negative acknowledge 0xN1
-Communication error 0xN8
5 byte - SUM (upper byte)
6 byte - SUM (lower byte)
7 byte - Checksum value for bytes 5 and 6
8 byte (Wait for the next command code.) -
(Note 1) In I/O Interface mode, the baud rate for the transfers of the first and second bytes must be
1/16 of the desired baud rate.
(Note 2) In case of any negative acknowledge, the boot program returns to a state in which it waits
for a command code (3rd byte). In I/O Interface mode, if a communication error occurs, a
negative acknowledge does not occur.
Table 20-8 Transfer Format for the Show Product Information Command (1/2)
Byte Data Transferred from the Controller Baud rate Data Transferred from the TMPM370FY to the
to the TMPM370FY Controller
Boot ROM 1 byte Serial operation mode and baud rate Desired baud -
For UART mode 0x86
rate (Note 1)
For I/O Interface mode 0x30
2 byte - ACK for the serial operation mode byte
For UART mode
-Normal acknowledge 0x86
(The boot program aborts if the baud rate can not
be set correctly.)
For I/O Interface mode
-Normal acknowledge 0x30
3 byte Command code (0x30) -
4 byte - ACK for the command code byte (Note 2)
-Normal acknowledge 0x30
-Negative acknowledge 0xN1
-Communication error 0xN8
5 byte - Flash memory data
at address 0x3F83_FFF0
Table 20-8 Transfer Format for the Show Product Information Command (2/2)
Byte Data Transferred from the Controller Baud rate Data Transferred from the
to the TMPM370FY TMPM370FY to the Controller
57 byte - - Start address of a group of the same-size
60 byte (16K) flash blocks (4 bytes)
th
From 57 byte: 0x00, 0x00, 0x80, 0x3F
(Note 1) In I/O Interface mode, the baud rate for the transfers of the first and second bytes must be
1/16 of the desired baud rate.
(Note 2) In case of any negative acknowledge, the boot program returns to a state in which it waits
for a command code (3rd byte). In I/O Interface mode, if a communication error occurs, a
negative acknowledge does not occur.
Table 20-9 Transfer Format for the Chip and Protection Bit Erase Command
Byte Data Transferred from the Controller Baud rate Data Transferred from the TMPM370FY
to the TMPM370FY to the Controller
Boot ROM 1 byte Serial operation mode and baud rate Desired baud ⎯
For UART mode 0x86
rate (Note 1)
For I/O Interface mode 0x30
2 byte ⎯ ACK for the serial operation mode byte
For UART mode
-Normal acknowledge 0x86
For I/O Interface mode
-Normal acknowledge 0x30
(The boot program aborts if the baud rate
can not be set correctly.)
(Note 1) In I/O Interface mode, the baud rate for the transfers of the first and second bytes must be
1/16 of the desired baud rate.
(Note 2) In case of any negative acknowledge, the boot program returns to a state in which it
waits for a command code (3rd byte). In I/O Interface mode, if a communication error
occurs, a negative acknowledge does not occur.
1. The 1st byte specifies which one of the two serial operation modes is used. For a
detailed description of how the serial operation mode is determined, see
Determination of a Serial Operation Mode described later. If it is determined as UART
mode, the boot program then checks if the SIO0 is programmable to the baud rate at
which the 1st byte was transferred. During the first-byte interval, the RXE bit in the
HSC0MOD register is cleared.
In I/O Interface mode, the CPU sees the serial receive pin as if it were a general
input port in monitoring its logic transitions. If the baud rate of the incoming data is
high or the chip’s operating frequency is high, the CPU may not be able to keep up
with the speed of logic transitions. To prevent such situations, the 1st and 2nd
bytes must be transferred at 1/16 of the desired baud rate; then the boot program
calculates 16 times that as the desired baud rate. When the serial operation mode
is determined as I/O Interface mode, the SIO0 is configured for SCLK Input mode.
Beginning with the third byte, the controller must ensure that its AC timing
restrictions are satisfied at the selected baud rate. In the case of I/O Interface
mode, the boot program does not check the receive error flag; thus there is no
such thing as error acknowledge (bit 3, 0xN8).
2. The 2nd byte, transmitted from the target board to the controller, is an acknowledge
response to the 1st byte. The boot program echoes back the first byte: 0x86 for UART
mode and 0x30 for I/O Interface mode.
UART mode
If the SIO0 can be programmed to the baud rate at which the 1st byte was transferred,
the boot program programs the SC0BRCR and sends back 0x86 to the controller as an
acknowledge. If the SIO0 is not programmable at that baud rate, the boot program
simply aborts with no error indication. Following the 1st byte, the controller should allow
for a time-out period of five seconds. If it does not receive 0x86 within the allowed
time-out period, the controller should give up the communication. The boot program
sets the RXE bit in the SC0MOD0 register to enable reception (1) before loading the
SIO transmit buffer with 0x86.
the SC0BUF. Then, the SIO0 waits for the SCLK0 signal to come from the
controller. Following the transmission of the 1st byte, the controller should send
the SCLK clock to the target board after a certain idle time (several microseconds).
This must be done at 1/16 the desire baud rate. If the 2nd byte, which is from the
target board to the controller, is 0x30, then the controller should take it as a
go-ahead. The controller must then deliver the 3rd byte to the target board at a
rate equal to the desired baud rate. The boot program sets the RXE bit in the
SC0MOD register to enable reception before loading the SIO transmit buffer with
0x30.
3. The 3rd byte transmitted from the controller to the target board is a command. The
code for the RAM Transfer command is 0x10.
4. The 4th byte, transmitted from the target board to the controller, is an acknowledge
response to the 3rd byte. Before sending back the acknowledge response, the boot
program checks for a receive error. If there was a receive error, the boot program
transmits x8H (bit 3) and returns to the state in which it waits for a command (the third
byte) again. In this case, the upper four bits of the acknowledge response are
undefined - they hold the same values as the upper four bits of the previously issued
command. When the SIO0 is configured for I/O Interface mode, the boot program does
not check for a receive error.
If the 3rd byte is equal to any of the command codes listed in Table 20-4, the boot
program echoes it back to the controller. When the RAM Transfer command was
received, the boot program echoes back a value of 0x10 and then branches to the
RAM Transfer routine. Once this branch is taken, password verification is done.
Password verification is detailed in a later section “Password”. If the 3rd byte is not a
valid command, the boot program sends back 0xN1 (bit 0) to the controller and returns
to the state in which it waits for a command (the third byte) again. In this case, the
upper four bits of the acknowledge response are undefined - they hold the same
values as the upper four bits of the previously issued command.
5. The 5th to 16th bytes transmitted from the controller to the target board, are a 12-byte
password. Each byte is compared to the contents of following addresses in the flash
memory. The verification is started with the 5th byte and the smallest address in the
designated area. If the password verification fails, the RAM Transfer routine sets the
password error flag.
Note: Regardless using or not using Single Boot mode, password must be
written in password area.
6. The 17th byte is a checksum value for the password sequence (5th to 16th bytes). To
calculate the checksum value for the 12-byte password, add the 12 bytes together,
drop the carries and take the two’s complement of the total sum. Transmit this
checksum value from the controller to the target board. The checksum calculation is
described in details in a later section “Checksum Calculation”.
7. The 18th byte, transmitted from the target board to the controller, is an acknowledge
response to the 5th to 17th bytes. First, the RAM Transfer routine checks for a receive
error in the 5th to 17th bytes. If there was a receive error, the boot program sends back
18H (bit 3) and returns to the state in which it waits for a command (i.e., the 3rd byte)
again. In this case, the upper four bits of the acknowledge response are the same as
those of the previously issued command (i.e., all 1s). When the SIO0 is configured for
I/O Interface mode, the RAM Transfer routine does not check for a receive error.
Next, the RAM Transfer routine performs the checksum operation to ensure data
integrity. Adding the series of the 5th to 16th bytes must result in 0x00 (with the carry
dropped). If it is not 0x00, one or more bytes of data has been corrupted. In case of a
checksum error, the RAM Transfer routine sends back 0x11 to the controller and
returns to the state in which it waits for a command (i.e., the 3rd byte) again.
Finally, the RAM Transfer routine examines the result of the password verification. The
following two cases are treated as a password error. In these cases, the RAM Transfer
routine sends back 0x11 (bit 0) to the controller and returns to the state in which it waits
for a command (i.e., the 3rd byte) again.
When all the above verification has been successful, the RAM Transfer routine returns
a normal acknowledge response (0x10) to the controller.
8. The 19th to 22nd bytes, transmitted from the controller the target board, indicate the
start address of the RAM region where subsequent data (e.g., a flash programming
routine) should be stored. The 19th byte corresponds to bits 31–24 of the address and
the 22nd byte corresponds to bits 7–0 of the address.
9. The 23rd and 24th bytes, transmitted from the controller to the target board, indicate
the number of bytes that will be transferred from the controller to be stored in the RAM.
The 23rd byte corresponds to bits 15–8 of the number of bytes to be transferred, and
the 24th byte corresponds to bits 7–0 of the number of bytes.
10. The 25th byte is a checksum value for the 19th to 24th bytes. To calculate the
checksum value, add all these bytes together, drop the carries and take the two’s
complement of the total sum. Transmit this checksum value from the controller to the
target board. The checksum calculation is described in details in a later section
“Checksum Calculation”.
11. The 26th byte, transmitted from the target board to the controller, is an acknowledge
response to the 19th to 25th bytes of data. First, the RAM Transfer routine checks for a
receive error in the 19th to 25th bytes. If there was a receive error, the RAM Transfer
routine sends back 0x18 and returns to the command wait state (i.e., the 3rd byte)
again. In this case, the upper four bits of the acknowledge response are the same as
those of the previously issued command (i.e., all 1s). When the SIO0 is configured for
I/O Interface mode, the RAM Transfer routine does not check for a receive error.
Next, the RAM Transfer routine performs the checksum operation to ensure data
integrity. Adding the series of the 19th to 25th bytes must result in 00H (with the carry
dropped). If it is not 00H, one or more bytes of data has been corrupted. In case of a
checksum error, the RAM Transfer routine sends back 0x11 to the controller and
returns to the state in which it waits for a command (i.e., the 3rd byte) again.
• The RAM storage start address must be within the range of 0x2000_0400 to the
end address of RAM.
When the above checks have been successful, the RAM Transfer routine returns a
normal acknowledge response (0x10) to the controller.
12. The 27th to mth bytes from the controller are stored in the on-chip RAM of the
TMPM370FY. Storage begins at the address specified by the 19th–22nd bytes and
continues for the number of bytes specified by the 23rd–24th bytes.
13. The (m+1) th byte is a checksum value. To calculate the checksum value, add the 27th
to mth bytes together, drop the carries and take the two’s complement of the total sum.
Transmit this checksum value from the controller to the target board. The checksum
calculation is described in details in a later section “Checksum Calculation”.
14. The (m+2) th byte is a acknowledge response to the 27th to (m+1) th bytes.
First, the RAM Transfer routine checks for a receive error in the 27th to (m+1) th bytes.
If there was a receive error, the RAM Transfer routine sends back 18H (bit 3) and
returns to the state in which it waits for a command (i.e., the 3rd byte) again. In this
case, the upper four bits of the acknowledge response are the same as those of the
previously issued command (i.e., all 1s). When the SIO0 is configured for I/O Interface
mode, the RAM Transfer routine does not check for a receive error.
Next, the RAM Transfer routine performs the checksum operation to ensure data
integrity. Adding the series of the 27th to (m+1) th bytes must result in 0x00 (with the
carry dropped). If it is not 0x00, one or more bytes of data has been corrupted. In case
of a checksum error, the RAM Transfer routine sends back 0x11 (bit 0) to the controller
and returns to the command wait state (i.e., the 3rd byte) again. When the above
checks have been successful, the RAM Transfer routine returns a normal
acknowledge response (0x10) to the controller.
15. If the (m+2) th byte was a normal acknowledge response, a branch is made to the address
specified by the 19th to 22nd bytes.
1. The processing of the 1st and 2nd bytes are the same as for the RAM Transfer
command.
2. The 3rd byte, which the target board receives from the controller, is a command. The
code for the Show Flash Memory Sum command is 20H.
3. The 4th byte, transmitted from the target board to the controller, is an acknowledge
response to the 3rd byte. Before sending back the acknowledge response, the boot
program checks for a receive error. If there was a receive error, the boot program
transmits x8H (bit 3) and returns to the command wait state again. In this case, the
upper four bits of the acknowledge response are undefined - they hold the same
values as the upper four bits of the previously issued command. When the SIO0 is
configured for I/O Interface mode, the boot program does not check for a receive error.
If the 3rd byte is equal to any of the command codes listed in Table 20-4, the boot
program echoes it back to the controller. When the Show Flash Memory Sum
command was received, the boot program echoes back a value of 0x20 and then
branches to the Show Flash Memory Sum routine. If the 3rd byte is not a valid
command, the boot program sends back 0xN1 (bit 0) to the controller and returns to
the command wait state (the third byte) again. In this case, the upper four bits of the
acknowledge response are undefined - they hold the same values as the upper four
bits of the previously issued command.
4. The Show Flash Memory Sum routine adds all the bytes of the flash memory together.
The 5th and 6th bytes, transmitted from the target board to the controller, indicate the
upper and lower bytes of this total sum, respectively. For details on sum calculation,
see a later section “Calculation of the Show Flash Memory Sum Command”.
5. The 7th byte is a checksum value for the 5th and 6th bytes. To calculate the checksum
value, add the 5th and 6th bytes together, drop the carry and take the two’s
complement of the sum. Transmit this checksum value from the controller to the target
board.
1. The processing of the 1st and 2nd bytes are the same as for the RAM Transfer
command.
2. The 3rd byte, which the target board receives from the controller, is a command. The
code for the Show Product Information command is 30H.
3. The 4th byte, transmitted from the target board to the controller, is an acknowledge
response to the 3rd byte. Before sending back the acknowledge response, the boot
program checks for a receive error. If there was a receive error, the boot program
transmits 0xN8 (bit 3) and returns to the command wait state again. In this case, the
upper four bits of the acknowledge response are undefined - they hold the same
values as the upper four bits of the previously issued command. When the SIO0 is
configured for I/O Interface mode, the boot program does not check for a receive error.
If the 3rd byte is equal to any of the command codes listed in Table 20-4, the boot
program echoes it back to the controller. When the Show Flash Memory Sum
command was received, the boot program echoes back a value of 0x30 and then
branches to the Show Flash Memory Sum routine. If the 3rd byte is not a valid
command, the boot program sends back 0xN1 (bit 0) to the controller and returns to
the state in which it waits for a command (the third byte) again. In this case, the upper
four bits of the acknowledge response are undefined - they hold the same values as
the upper four bits of the previously issued command.
4. The 5th to 8th bytes, transmitted from the target board to the controller, are the data
read from addresses shown below in the flash memory. Software version
management is possible by storing a software ID in these locations.
Product name Area
TMPM370FY 0x3F87_FFF0 – 0x3F87_FFF3
5. The 9th to 20th bytes, transmitted from the target board to the controller, indicate the
product name as shown below (where [ ] is a space) in ASCII code.
Product name Code
TMPM370FY T,M,P,M,3,7,0,F,Y,_,[ ],_
6. The 21st to 24th bytes, transmitted from the target board to the controller, indicate the
start address of the flash memory area containing the password. Each product has
own start address shown below.
Product name Address
TMPM370FY 0xF4, 0xFF, 0x87, 0x3F
7. The 25th to 28th bytes, transmitted from the target board to the controller, indicate the
start address of the on-chip RAM, are 0x00, 0x00, 0x00 and 0x20.
8. The 29th to 32nd bytes, transmitted from the target board to the controller, are dummy
data (0x00, 0x00, 0x00 and 0x00).
9. The 33rd to 36th bytes, transmitted from the target board to the controller, indicate the
end address of the on-chip RAM, are 0xFF, 0x27, 0x00 and 0x20.
10. The 37th to 40th bytes, transmitted from the target board to the controller, are 0x00,
0x00, 0x00 and 0x00. The 41st to 44th bytes, transmitted from the target board to the
controller, are 0x00, 0x00, 0x00 and 0x00.
11. The 45th and 46th bytes transmitted are 0x00, 0x00.
12. The 47th to 50th bytes, transmitted from the target board to the controller, indicate the
start address of the on-chip flash memory, are 0x00, 0x00, 0x80, and 0x3F.
13. The 51st to 54th bytes, transmitted from the target board to the controller, indicate the
end address of the on-chip flash memory, are 0xFF, 0xFF, 0x83 and 0x3F.
14. The 55th to 56th bytes, transmitted from the target board to the controller, indicate the
number of flash blocks available, are 0x06 and 0x00.
15. The 57th to 83rd bytes, transmitted from the target board to the controller, contain
information about the flash blocks. Flash blocks of the same size are treated as a
group. Information about the flash blocks indicate the start address of a group, the size
of the blocks in that group (in halfwords) and the number of the blocks in that group.
The 57th to 65th bytes are the information about the 16-kbyte blocks. The 66th to 74th
bytes are the information about the 32-kbyte blocks. The 75th to 83rd bytes are the
information about the 64-kbyte blocks. The 84th to 92nd bytes are the information
about the 128-kbyte blocks. See Table 20-8 for the values of bytes transmitted.
16. The 93rd byte, transmitted from the target board to the controller, is a checksum value
for the 5th to 92nd bytes. The checksum value is calculated by adding all these bytes
together, dropping the carry and taking the two’s complement of the total sum.
1. The processing of the 1st and 2nd bytes are the same as for the RAM Transfer
command.
2. The 3rd byte, which the target board receives from the controller, is a command. The
code for the Show Product Information command is 0x40.
3. The 4th byte, transmitted from the target board to the controller, is an acknowledge
response to the 3rd byte. Before sending back the acknowledge response, the boot
program checks for a receive error. If there was a receive error, the boot program
transmits x8H (bit 3) and returns to the command wait state again. In this case, the
upper four bits of the acknowledge response are undefined - they hold the same
values as the upper four bits of the previously issued command.
If the 3rd byte is equal to any of the command codes listed in Table 20-4, the boot
program echoes it back to the controller. When the Show Flash Memory Sum
command was received, the boot program echoes back a value of 0x40. If the 3rd byte
is not a valid command, the boot program sends back 0xN1 (bit 0) to the controller and
returns to the state in which it waits for a command (the third byte) again. In this case,
the upper four bits of the acknowledge response are undefined - they hold the same
values as the upper four bits of the previously issued command.
4. The 5th byte, transmitted from the target board to the controller, is the Chip Erase
Enable command code (0x54).
5. The 6th byte, transmitted from the target board to the controller, is an acknowledge
response to the 5th byte.
Before sending back the acknowledge response, the boot program checks for a
receive error. If there was a receive error, the boot program transmits 0xN8 (bit 3) and
returns to the command wait state again. In this case, the upper four bits of the
acknowledge response are undefined - they hold the same values as the upper four
bits of the previously issued command.
If the 5th byte is equal to any of the command codes to enable erasing, the boot
program echoes it back to the controller. When the Show Flash Memory Sum
command was received, the boot program echoes back a value of 0x54 and then
branches to the Chip Erase routine. If the 5th byte is not a valid command, the boot
program sends back 0xN1 (bit 0) to the controller and returns to the state in which it
waits for a command (the third byte) again. In this case, the upper four bits of the
acknowledge response are undefined - they hold the same values as the upper four
bits of the previously issued command.
6. The 7th byte indicates whether the Chip Erase command is normally completed or not.
At normal completion, completion code (0x4F) is sent.
When an error was detected, error code (0x4C) is sent.
5) Acknowledge Responses
The boot program represents processing states with specific codes. Table 20-10 to Table 20-13 show
the values of possible acknowledge responses to the received data. The upper four bits of the
acknowledge response are equal to those of the command being executed. Bit 3 of the code indicates
a receive error. Bit 0 indicates an invalid command error, a checksum error or a password error. Bit 1
and bit 2 are always 0. Receive error checking is not done in I/O Interface mode.
(Note) If the serial operation mode is determined as UART, the boot program checks if the SIO can
be programmed to the baud rate at which the operation mode byte was transferred. If that
baud rate is not possible, the boot program aborts, without sending back any response.
(Note) The upper four bits of the ACK response are the same as those of the previous command
code.
(Note) The upper four bits of the ACK response are the same as those of the operation command
code. It is 1 ( N=RAM transfer command data [7:4] ) when password error occurs.
Table 20-13 ACK Response to Chip and Protection Bit Erase Byte
Return Value Meaning
0x54 The Chip Erase enabling command was received.
0x4F The Chip Erase command was completed.
0x4C The Chip Erase command was abnormally completed.
The first byte from the controller determines the serial operation mode. To use UART mode for
communications between the controller and the target board, the controller must first send a value of
0x86 at a desired baud rate to the target board. To use I/O Interface mode, the controller must send a
value of 0x30 at 1/16 the desired baud rate. Fig. 20-4 shows the waveforms for the first byte.
Start bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 Stop
A B C D
UART (0x86)
tAB
tAC tCD
tAD
After RESET is released, the boot program monitors the first serial byte from the controller, with the
SIO reception disabled, and calculates the intervals of tAB, tAC and tAD. Fig. 20-5 shows a flowchart
describing the steps to determine the intervals of tAB, tAC and tAD. As shown in the flowchart, the boot
program captures timer counts each time a logic transition occurs in the first serial byte. Consequently,
the calculated tAB, tAC and tAD intervals are bound to have slight errors. If the transfer goes at a high
baud rate, the CPU might not be able to keep up with the speed of logic transitions at the serial receive
pin. In particular, I/O Interface mode is more prone to this problem since its baud rate is generally much
higher than that for UART mode. To avoid such a situation, the controller should send the first serial
byte at 1/16 the desired baud rate.
The flowchart in Fig. 20-5 shows how the boot program distinguishes between UART and I/O Interface
modes. If the length of tAB is equal to or less than the length of tCD, the serial operation mode is
determined as UART mode. If the length of tAB is greater than the length of tCD, the serial operation
mode is determined as I/O Interface mode. Bear in mind that if the baud rate is too high or the timer
operating frequency is too low, the timer resolution will be coarse, relative to the intervals between
logic transitions. This becomes a problem due to inherent errors caused by the way in which timer
counts are captured by software; consequently the boot program might not be able to determine the
serial operation mode correctly. To prevent this problem, reset UART mode within the programming
routine.
For example, the serial operation mode may be determined to be I/O Interface mode when the
intended mode is UART mode. To avoid such a situation, when UART mode is utilized, the controller
should allow for a time-out period within which it expects to receive an echo-back (0x86) from the
target board. The controller should give up the communication if it fails to get that echo-back within the
allowed time. When I/O Interface mode is utilized, once the first serial byte has been transmitted, the
controller should send the SCLK clock after a certain idle time to get an acknowledge response. If the
received acknowledge response is not 0x30, the controller should give up further communications.
When the intended mode is I/O interface mode, the first byte does not have to be 0x30 as long as tAB is
greater than tCD as shown above. 0x91, 0xA1 or 0xB1 can be sent as the first byte code to determine
the falling edges of Point A and Point C and the rising edges of Point B and Point D. If tAB is greater
than tCD and SIO is selected by the resolution of the operation mode determination, the second byte
code is 0x30 even though the transmitted code on the first byte is not 0x30 (The first byte code to
determine I/O interface mode is described as 0x30).
Start
Initialize TMRB0
High-to-low transition
Point A
on serial receive pin?
YES
Low-to-high transition
Point B
on serial receive pin?
YES
Software-capture and save timer value (tAB)
Low-to-high transition
Point C on serial receive pin?
YES
Low-to-high transition
Point D
on serial receive pin?
YES
Software-capture and save timer value (tAD)
YES
tAC ≥ tAD?
Stop operation
Done (infinite loop)
Start
YES
tAB > tCD?
7) Password
The RAM Transfer command (0x10) causes the boot program to perform password verification.
Following an echo-back of the command code, the boot program verifies the contents of the 12-byte
password area within the flash memory. The following table shows the password area.
Note: If a password is set to 0xFF (erased data), it is difficult to protect data securely to
due to an easy-to-guess password. Even if Single Boot mode is not used, it is
recommended to set a unique value as a password.
If all these address locations contain the same bytes of data other than 0xFF, a password area error
occurs as shown in Fig. 20-7.
In this case, the boot program returns an error acknowledge (0x11) in response to the checksum byte
(the 17th byte), regardless of whether the password sequence sent from the controller is all 0xFFs.
The password sequence received from the controller (5th to 16th bytes) is compared to the password
stored in the flash memory. All of the 12 bytes must match to pass the password verification. Otherwise, a
password error occurs, which causes the boot program to reply an error acknowledge in response to the
checksum byte (the 17th byte).
Start
YES
The result of the sum calculation “byte + byte + byte + …“ is responded by a word quantity. The Show Flash
Memory Sum command adds all 256 Kbytes of the flash memory together and provides the total sum as a word
quantity. The sum is sent to the controller, with the upper eight bits first, followed by the lower eight bits.
Example) For the interest of simplicity, assume the depth of the flash
0xA1
memory is four locations. Then the sum of the four bytes is
0xB2 calculated as:
0xA1 + 0xB2 + 0xC3 + 0xD4 = 0x02EA
0xC3 Hence, 0x02 is first sent to the controller, followed by 0xEA.
0xD4
9) Checksum Calculation
The checksum byte for a series of bytes of data is calculated by adding the bytes together, dropping
the carries, and taking the two’s complement of the total sum. The Show Flash Memory Sum
command and the Show Product Information command perform the checksum calculation. The
controller must perform the same checksum operation in transmitting checksum bytes.
Example) Assume the Show Flash Memory Sum command provides the upper and lower bytes of the
sum as 0xE5 and 0xF6. To calculate the checksum for a series of 0xE5 and 0xF6:
Take the two’s complement of the sum, and that is the checksum byte.
0 − 0xDB = 0x25
Single Boot
program starts
Initialize
Receive routine
Get a command
ACK data
← Received data | 0x01
Transmission routine
(Send 0xN1: Command
Processed
normally?
Yes normally
Jump to RAM
Note that addressing of operation commands is different from the case of standard commands due to the
specific interface arrangements with the CPU. Also note that the flash memory is written in 32-bit blocks. So,
32-bit (word) data transfer commands must be used in writing the flash memory.
0x0003_0000 0x3F86_0000
0x0002_0000 0x3F82_0000
0x0001_0000 0x3F81_0000
1) Read
When data is to be read, the flash memory must be set to the read mode. The flash memory
will be set to the read mode immediately after power is applied, when CPU reset is removed,
or when an automatic operation is normally terminated. In order to return to the read mode
from other modes or after an automatic operation has been abnormally terminated, either
the Read/reset command (a software command to be described later) or a hardware reset is
used. The device must also be in the read mode when any command written on the flash
memory is to be executed.
• With the Read/reset command, the device is returned to the read mode after
completing the third bus write cycle.
2) Command write
This flash memory uses the command control method. Commands are executed by
executing a command sequence to the flash memory. The flash memory executes
automatic operation commands according to the address and data combinations applied
(refer to Command Sequence).
If it is desired to cancel a command write operation already in progress or when any
incorrect command sequence has been entered, the Read/reset command is to be
executed. Then, the flash memory will terminate the command execution and return to the
read
While commands are generally comprised of several bus cycles, the operation to apply 32-bit
data transmit command to the flash memory is called "bus write cycle." The bus write cycles are
to be in a specific sequential order and the flash memory will perform an automatic operation
when the sequence of the bus write cycle data and address of a command write operation is in
accordance with a predefined specific sequence. If any bus write cycle does not follow a
predefined command write sequence, the flash memory will terminate the command execution
and return to the read mode.
(Note 1) Command sequences are executed from outside the flash memory area.
(Note 2) Each bus write cycle must be sequentially executed by 32-bit data transmit
command. While a command sequence is being executed, access to the flash
memory is prohibited. Also, don't generate any interrupt (except debug exceptions
when a Debugging probe is connected).If such an operation is made, it can result in
an unexpected read access to the flash memory and the command sequencer may
not be able to correctly recognize the command. While it could cause an abnormal
termination of the command sequence, it is also possible that the written command
is incorrectly recognized.
(Note 3) For the command sequencer to recognize a command, the device must be in the
read mode prior to executing the command. Be sure to check before the first bus
write cycle that the FCFLCS RDY/BSY bit is set to "1." It is recommended to
subsequently execute a Read command.
(Note 4) Upon issuing a command, if any address or data is incorrectly written, be sure to
perform a software reset to return to the read mode again.
(3) Reset
Hardware reset
A hardware reset is used to cancel the operational mode set by the command write
operation when forcibly termination during auto programming/ erasing or abnormal
termination during auto operations occurs. The flash memory has a reset input as the
----------------------
memory block and it is connected to the CPU reset signal. Therefore, when the RESET
input pin of this device is set to “Low” level or when the CPU is reset due to any overflow of
the watch dog timer, the flash memory will return to the read mode terminating any
automatic operation that may be in progress. It should also be noted that applying a
hardware reset during an automatic operation can result in incorrect rewriting of data. In
such a case, be sure to perform the rewriting again.
Refer to Section 20.2.1 "Reset Operation" for CPU reset operations. After a given reset
input, the CPU will read the reset vector data from the flash memory and starts operation
after the reset is removed.
(4) Commands
1) Automatic Page Programming
Writing to a flash memory device is to make "1" data cells to "0" data cells. Any "0" data cell
cannot be changed to a "1" data cell. For making "0" data cells to "1" data cells, it is
necessary to perform an erase operation.
The automatic page programming function of this device writes data of each page. The
TMPM370FY contains 64 words in a page. A 64 word block is defined by a same [31:8]
address and it starts from the address [7:0] = 0 and ends at the address [7:0] = 0xFF. This
programming unit is hereafter referred to as a "page."
No automatic verify operation is performed internally to the device. So, be sure to read the
data programmed to confirm that it has been correctly written.
The automatic page programming operation starts when the third bus write
cycle of the command cycle is completed. On and after the fifth bus write cycle, data will be
written sequentially starting from the next address of the address specified in the fourth bus
write cycle (in the fourth bus write cycle, the page top address will be command written) (32
bits of data is input at a time). Be sure to use the 32-bit data transfer command in writing
commands on and after the fourth bus cycle. In this, any 32-bit data transfer commands
shall not be placed across word boundary. On and after the fifth bus write cycle, data is
command written to the same page area. Even if it is desired to write the page only partially,
it is required to perform the automatic page programming for the entire page. In this case,
the address input for the fourth bus write cycle shall be set to the top address of the page.
Be sure to perform command write operation with the input data set to "1" for the data cells
not to be set to "0." For example, if the top address of a page is not to be written, set the
input data of the fourth bus write cycle to 0xFFFFFFFF to command write the data.
Once the fourth bus cycle is executed, it is in the automatic programming operation. This
condition can be checked by monitoring the register bit FCFLCS [0] <RDY/BSY> (See
Table 20-15). Any new command sequence is not accepted while it is in automatic page
programming mode. If it is desired to stop operation, use the hardware reset function. Be
careful in doing so because data cannot be written normally if the operation is interrupted.
When a single page has been command written normally terminating the automatic page
writing process, the FCFLCS [0] <RDY/BSY> bit is set to "1" and it returns to the read
mode.
When multiple pages are to be written, it is necessary to execute the page programming
command for each page because the number of pages to be written by a single execution of
the automatic page program command is limited to only one page. It is not allowed for
automatic page programming to process input data across pages.
(Note) Software reset becomes ineffective in bus write cycles on and after the fourth
bus write cycle of the automatic page programming command.
Also, any protected blocks cannot be erased. If all the blocks are protected, the automatic
chip erase operation will not be performed and it returns to the read mode after completing
the sixth bus read cycle of the command sequence. When an automatic chip erase
operation is normally terminated, it automatically returns to the read mode. If an automatic
chip erase operation has failed, the flash memory is locked in the mode and will not return to
the read mode.
For returning to the read mode, it is necessary to execute hardware reset to reset the device.
In this case, the failed block cannot be detected. It is recommended not to use the device
anymore or to identify the failed block by using the block erase function for not to use the
identified block anymore.
it is desired to stop operation, use the hardware reset function. In this case, it is necessary
to perform the automatic block erase operation again because the data erasing operation
has not been normally terminated.
Also, any protected blocks cannot be erased. If an automatic block erase operation has
failed, the flash memory is locked in the mode and will not return to the read mode. In this
case, execute hardware reset to reset the device.
(Note) Software reset is ineffective in the seventh bus write cycle of the automatic
protection bit programming command. The FLCS <RDY/BSY> bit turns to
"0" after entering the seventh bus write cycle.
・When all the FCFLCS <BLPRO> bits are set to "1" (all the protection bits are
programmed):
When the automatic protection bit erase command is command written, the flash memory is
automatically initialized within the device. When the seventh bus write cycle is completed,
the entire area of the flash memory data cells is erased and then the protection bits are
erased. This operation can be checked by monitoring FCFLCS <RDY/BSY>. If the
automatic operation to erase protection bits is normally terminated, FCFLCS will be set to
"0x00000001." While no automatic verify operation is performed internally to the device, be
sure to read the data to confirm that it has been correctly erased. For returning to the read
mode while the automatic operation after the seventh bus cycle is in progress, it is
necessary to use the hardware reset to reset the device. If this is done, it is necessary to
check the status of protection bits by FCFLCS <BLPRO> after retuning to the read mode
and perform either the automatic protection bit erase, automatic chip erase, or automatic
block erase operation, as appropriate.
・When the FCFLCS <BLPRO> bits include "0" (not all the protection bits are
programmed):
The protection condition can be canceled by the automatic protection bit erase operation.
With this device, protection bits set by an individual block can be erased handling all the
blocks at a time as shown in Table 20-21. The target bits are specified in the seventh bus
write cycle and when the command is completed, the device is in a condition all the blocks
are erased. The protection status of each block can be checked by FCFLCS <BLPRO> to
be described later. This status of the programming operation for automatic protection bits
can be checked by monitoring FCFLCS <RDY/BSY>. When the automatic operation to
erase protection bits is normally terminated, the protection bits of FCFLCS <BLPRO>
selected for erasure are set to "0."
In any case, any new command sequence is not accepted while it is in an automatic
operation to erase protection bits. If it is desired to stop the operation, use the hardware
reset function. When the automatic operation to erase protection bits is normally terminated,
it returns to the read mode.
(Note) The FLCS <RDY/BSY> bit is "0" while in automatic operation and it
turns to "1" when the automatic operation is terminated.
6) ID-Read
Using the ID-Read command, you can obtain the type and other information on the flash
memory contained in the device. The data to be loaded will be different depending on the
address [15:14] of the fourth and subsequent bus write cycles (recommended input data is
0x00). On and after the fourth bus write cycle, when an arbitrary flash memory area is read,
the ID value will be loaded. Once the fourth bus write cycle of an ID-Read command has
passed, the device will not automatically return to the read mode. In this condition, the set of
the fourth bus write cycle and ID-Read commands can be repetitively executed. For returning
to the read mode, use the Read/reset command or hardware reset command.
23 22 21 20 19 18 17 16
bit Symbol - - BLPRO5 BLPRO4 BLPRO3 BLPRO2 BLPRO1 BLPRO0
Read/Write R R R R R R R
After reset 0 (Note 2) (Note 2) (Note 2) (Note 2) (Note 2) (Note 2)
“0”is read. Protection Protection Protection Protection Protection Protection
for Block 5 for Block 4 for Block 3 for Block 2 for Block 1 for Block 0
Function
0: disabled 0: disabled 0: disabled 0: disabled 0: disabled 0: disabled
1:enabled 1:enabled 1:enabled 1:enabled 1:enabled 1:enabled
15 14 13 12 11 10 9 8
bit Symbol - - - - - - - -
Read/Write R
After reset 0
Function “0”is read.
7 6 5 4 3 2 1 0
bit Symbol - - - - - - - RDY/BSY
Read/Write R R
After reset 0 1
“0”is read. Ready/Bus
y (Note 1)
0:Auto
Function operating
1:Auto
operation
terminated
(Note 1) This command must be issued in the ready state. Issuing the command in
the busy state may disable both correct command transmission and further
command input. To exit from the condition, execute system reset. System
reset requires at least 0.5 microseconds regardless of the system clock
frequency. In this condition, it takes approx. 2 ms to enable reading after
reset.
(Note 2) The value varies depending on protection applied.
23 22 21 20 19 18 17 16
bit Symbol - - - - - - - -
Read/Write R
After reset 0
Function “0”is read
15 14 13 12 11 10 9 8
bit Symbol - - - - - - - -
Read/Write R
After reset 0
Function “0”is read
7 6 5 4 3 2 1 0
bit Symbol - - - - - - - SECBIT
Read/Write R R/W
After reset 0 1
“0”is read Security
bits
Function
0:disabled
1:enabled
Supplementary explanation
• RA: Read address
• RD: Read data
• IA: ID address
• ID: ID data
• PA: Program page address
PD: Program data (32 bit data)
After the fourth bus cycle, enter data in the order of the address for a page.
• BA: Block address
• PBA: Protection bit address
(Note 1) Always set "0" to the address bits [1:0] in the entire bus cycle. (Recommendable setting
values to bits [7:2] are ”0”.)
(Note 2) Bus cycles are "bus write cycles" except for the second bus cycle of the Read command,
the fourth bus cycle of the Read/reset command, and the fifth bus cycle of the ID-Read
command. Bus write cycles are executed by 32-bit data transfer commands. The address
[31:16] in each bus write cycle should be the target flash memory address [31:16] of the
command sequence. Use "Addr." in the table for the address [15:0].
Block erase
BA: Block address (Set the sixth bus write cycle address for block erase operation)
Block selection (Table 20-19) Addr[1:0]=“0” (fixed) , Others:0 (recommended)
Auto page
PA: Program page address (Set the fourth bus write cycle address for page programming operation)
programming Addr[1:0]=“0” (fixed)
Page selection
Others:0 (recommended)
PBA: Protection bit address (Set the seventh bus erase cycle address for protection bit erasure)
Protection bit
Protection bit
programming Protection bit selection Addr[1:0]=“0” (fixed)
Flash area Fixed to “0”. selection
(Table 20-20) Others:0 (recommended)
(Table 20-20)
PBA: Protection bit address (Set the seventh bus erase cycle address for protection bit erasure)
Protection bit
Protection bit Protection bit
erase Addr[1:0]=“0” (fixed)
Flash area selection “0” is recommended. selection
Others:0 (recommended)
(Table 20-21) (Table 20-21)
Block erase
BA: Block address (Set the sixth bus write cycle address for block erase operation)
Block selection (Table 20-19) Addr[1:0]=“0” (fixed) , Others:0 (recommended)
(Note 1) Table 20-17 "Flash Memory Access from the Internal CPU" can also be used.
(Note 2) Address setting can be performed according to the "Normal bus write cycle address
configuration" from the first bus cycle.
(Note 3) "0" is recommended" can be changed as necessary.
Size
Block
Address Address (Kbyte)
(User boot mode) (Single boot mode)
4 0x0000_0000-0x0000_3FFF 0x3F80_0000-0x3F80_3FFF 16
5 0x0000_4000-0x0000_7FFF 0x3F80_4000-0x3F80_7FFF 16
3 0x0000_8000-0x0000_FFFF 0x3F80_8000-0x3F80_FFFF 32
2 0x0001_0000-0x0001_FFFF 0x3F81_0000-0x3F81_FFFF 64
1 0x0002_0000-0x0002_FFFF 0x3F82_0000-0x3F82_FFFF 64
0 0x0003_0000-0x0003_FFFF 0x3F83_8000-0x3F83_FFFF 64
(Note) As for the addresses from the first to the fifth bus cycles, specify the upper 4
bit with the corresponding flash memory addresses of the blocks to be
erased.
(Note) The protection bit erase command cannot erase by individual block.
Table 20-22 The ID-Read command's fourth bus write cycle ID address (IA) and
the data to be read by the following 32-bit data transfer command (ID)
Manufact
00b 0x98
urer code
Device
01b 0x5A
code
10b Reserved ---
Macro
11b 0x13
code
(8) Flowchart
Start
YES
0x54xx/0xAA
0xAAxx/0x55
0x54xx/0xA0
Start
Automatic chip erase command sequence Automatic block/ multi-block erase command sequence
(address/ command) (address/ command)
0x54xx/0xAA 0x54xx/0xAA
0xAAxx/0x55 0xAAxx/0x55
0x54xx/0x80 0x54xx/0x80
0x54xx/0xAA 0x54xx/0xAA
0xAAxx/0x55 0xAAxx/0x55
21.2 Feature
21.2.1 Internal Flash ROM write/erase protect
The write/ erase-protect function enables the internal flash to prohibit the writing and erasing
operation for each block.
This function is available with a single chip mode, single boot mode and writer mode. To activate
the function, write “1” to the corresponding bits to a block to protect. Writing “0” to the bits cancels
the protection. The protection status of the bits can be monitored by the FCFLCS <BLPRO> bit.
Note) The FCSECBIT <SECBIT> bit is set to “1” at a power-on reset right after power-on.
21.3 Resisters
The flash control register shows the status of the flash memory operation and the protection of each
block.
Table 21-2 Flash control resister
31 30 29 28 27 26 25 24
bit Symbol - - - - - - - -
FCFLCS Read/Write R
0x41FF_F020 After reset 0
function “0”is read
23 22 21 20 19 18 17 16
bit Symbol - - BLPRO5 BLPRO4 BLPRO3 BLPRO2 BLPRO1 BLPRO0
Read/Write R R R R R R R
after Reset 0 (note2) (note2) (note2) (note2) (note2) (note2)
Block5 Block4 Block3 Block2 Block1 Block0
Reading data is “0” protect protect protect protect protect protect
status status status status status status
function 0: no 0: no 0: no 0: no 0: no 0: no
protect protect protect protect protect protect
status. status. status. status. status. status.
1: protect 1: protect 1: protect 1: protect 1: protect 1: protect
status. status. status. status. status. status.
15 14 13 12 11 10 9 8
bit Symbol - - - - - - - -
Read/Write R
after reset 0
function reading data is “0”
7 6 5 4 3 2 1 0
bit Symbol - - - - - - - RDY/BSY
Read/Write R R
after reset 0 1
1:fauto
operation
is finished
(Note 1) This command must be issued in the ready state. Issuing the command in the
busy state may disable both correct command transmission and further
command input. To exit from the condition, execute system reset. System reset
requires at least 0.5 microseconds regardless of the system clock frequency.
In this condition, it takes approx. 2 ms to enable reading after reset.
(Note 2) The value varies depending on protection status.
23 22 21 20 19 18 17 16
bit Symbol - - - - - - - -
Read/Write R
after reset 0
reading data is “0”
function
15 14 13 12 11 10 9 8
bit Symbol - - - - - - - -
Read/Write R
after reset 0
function reading data is “0”
7 6 5 4 3 2 1 0
bit Symbol - - - - - - - SECBIT
Read/Write R R/W
after reset 0 1
reading data is “0” security bit
0:
function disable
1:
enable
Note) The above procedure is enabled only when using 32-bit data transfer command.
(Note 1) As for the internal I/O areas (0x4000_0000~0x4007_FFFF), reading the areas not
described in this chapter yields undefined value. Writing these areas is ignored.
(Note 2) <R0> means 0(zero) is read. Writing data is disregarded.
22.1 Addresses
22.1.1 [1] Port [1/4]
<PORT A>
ADR Register ADR Register ADR Register ADR Register
name name name name
0x4000_0000 PADATA 0x4000_0010 0x4000_0020 0x4000_0030 PAPDN
0x4000_0001 <R0> 0x4000_0011 0x4000_0021 0x4000_0031 <R0>
0x4000_0002 <R0> 0x4000_0012 0x4000_0022 0x4000_0032 <R0>
0x4000_0003 <R0> 0x4000_0013 0x4000_0023 0x4000_0033 <R0>
0x4000_0004 PACR 0x4000_0014 0x4000_0024 0x4000_0034
0x4000_0005 <R0> 0x4000_0015 0x4000_0025 0x4000_0035
0x4000_0006 <R0> 0x4000_0016 0x4000_0026 0x4000_0036
0x4000_0007 <R0> 0x4000_0017 0x4000_0027 0x4000_0037
0x4000_0008 PAFR1 0x4000_0018 0x4000_0028 PAOD 0x4000_0038 PAIE
0x4000_0009 <R0> 0x4000_0019 0x4000_0029 <R0> 0x4000_0039 <R0>
0x4000_000A <R0> 0x4000_001A 0x4000_002A <R0> 0x4000_003A <R0>
0x4000_000B <R0> 0x4000_001B 0x4000_002B <R0> 0x4000_003B <R0>
0x4000_000C PAFR2 0x4000_001C 0x4000_002C PAPUP 0x4000_003C
0x4000_000D <R0> 0x4000_001D 0x4000_002D <R0> 0x4000_003D
0x4000_000E <R0> 0x4000_001E 0x4000_002E <R0> 0x4000_003E
0x4000_000F <R0> 0x4000_001F 0x4000_002F <R0> 0x4000_003F
<PORT B>
ADR Register ADR Register ADR Register ADR Register
name name name name
0x4000_0040 PBDATA 0x4000_0050 0x4000_0060 0x4000_0070 PBPDN
0x4000_0041 <R0> 0x4000_0051 0x4000_0061 0x4000_0071 <R0>
0x4000_0042 <R0> 0x4000_0052 0x4000_0062 0x4000_0072 <R0>
0x4000_0043 <R0> 0x4000_0053 0x4000_0063 0x4000_0073 <R0>
0x4000_0044 PBCR 0x4000_0054 0x4000_0064 0x4000_0074
0x4000_0045 <R0> 0x4000_0055 0x4000_0065 0x4000_0075
0x4000_0046 <R0> 0x4000_0056 0x4000_0066 0x4000_0076
0x4000_0047 <R0> 0x4000_0057 0x4000_0067 0x4000_0077
0x4000_0048 PBFR1 0x4000_0058 0x4000_0068 PBOD 0x4000_0078 PBIE
0x4000_0049 <R0> 0x4000_0059 0x4000_0069 <R0> 0x4000_0079 <R0>
0x4000_004A <R0> 0x4000_005A 0x4000_006A <R0> 0x4000_007A <R0>
0x4000_004B <R0> 0x4000_005B 0x4000_006B <R0> 0x4000_007B <R0>
0x4000_004C 0x4000_005C 0x4000_006C PBPUP 0x4000_007C
0x4000_004D 0x4000_005D 0x4000_006D <R0> 0x4000_007D
0x4000_004E 0x4000_005E 0x4000_006E <R0> 0x4000_007E
0x4000_004F 0x4000_005F 0x4000_006F <R0> 0x4000_007F
<PORT C>
ADR Register ADR Register ADR Register ADR Register
name name name name
0x4000_0080 PCDATA 0x4000_0090 0x4000_00A0 0x4000_00B0 PCPDN
0x4000_0081 <R0> 0x4000_0091 0x4000_00A1 0x4000_00B1 <R0>
0x4000_0082 <R0> 0x4000_0092 0x4000_00A2 0x4000_00B2 <R0>
0x4000_0083 <R0> 0x4000_0093 0x4000_00A3 0x4000_00B3 <R0>
0x4000_0084 PCCR 0x4000_0094 0x4000_00A4 0x4000_00B4
0x4000_0085 <R0> 0x4000_0095 0x4000_00A5 0x4000_00B5
0x4000_0086 <R0> 0x4000_0096 0x4000_00A6 0x4000_00B6
0x4000_0087 <R0> 0x4000_0097 0x4000_00A7 0x4000_00B7
0x4000_0088 PCFR1 0x4000_0098 0x4000_00A8 PCOD 0x4000_00B8 PCIE
0x4000_0089 <R0> 0x4000_0099 0x4000_00A9 <R0> 0x4000_00B9 <R0>
0x4000_008A <R0> 0x4000_009A 0x4000_00AA <R0> 0x4000_00BA <R0>
0x4000_008B <R0> 0x4000_009B 0x4000_00AB <R0> 0x4000_00BB <R0>
0x4000_008C 0x4000_009C 0x4000_00AC PCPUP 0x4000_00BC
0x4000_008D 0x4000_009D 0x4000_00AD <R0> 0x4000_00BD
0x4000_008E 0x4000_009E 0x4000_00AE <R0> 0x4000_00BE
0x4000_008F 0x4000_009F 0x4000_00AF <R0> 0x4000_00BF
<SIO3>
ADR Register ADR Register ADR Register ADR Register
name name name name
0x4002_0140 SC3EN 0x4002_0150 SC3BRCR 0x4002_0160 SC3RFC 0x4002_0170 SC3FCNF
0x4002_0141 <R0> 0x4002_0151 <R0> 0x4002_0161 <R0> 0x4002_0171 <R0>
0x4002_0142 <R0> 0x4002_0152 <R0> 0x4002_0162 <R0> 0x4002_0172 <R0>
0x4002_0143 <R0> 0x4002_0153 <R0> 0x4002_0163 <R0> 0x4002_0173 <R0>
0x4002_0144 SC3BUF 0x4002_0154 SC3BRADD 0x4002_0164 SC3TFC 0x4002_0174
0x4002_0145 <R0> 0x4002_0155 <R0> 0x4002_0165 <R0> 0x4002_0175
0x4002_0146 <R0> 0x4002_0156 <R0> 0x4002_0166 <R0> 0x4002_0176
0x4002_0147 <R0> 0x4002_0157 <R0> 0x4002_0167 <R0> 0x4002_0177
0x4002_0148 SC3CR 0x4002_0158 SC3MOD1 0x4002_0168 SC3RST 0x4002_0178
0x4002_0149 <R0> 0x4002_0159 <R0> 0x4002_0169 <R0> 0x4002_0179
0x4002_014A <R0> 0x4002_015A <R0> 0x4002_016A <R0> 0x4002_017A
0x4002_014B <R0> 0x4002_015B <R0> 0x4002_016B <R0> 0x4002_017B
0x4002_014C SC3MOD0 0x4002_015C SC3MOD2 0x4002_016C SC3TST 0x4002_017C
0x4002_014D <R0> 0x4002_015D <R0> 0x4002_016D <R0> 0x4002_017D
0x4002_014E <R0> 0x4002_015E <R0> 0x4002_016E <R0> 0x4002_017E
0x4002_014F <R0> 0x4002_015F <R0> 0x4002_016F <R0> 0x4002_017F
ADR Register name ADR Register name ADR Register name ADR Register name
0x4003_0040 ADAREG8 0x4003_0050 ADAPSEL0 0x4003_0060 ADAPSEL4 0x4003_0070 ADAPSEL8
0x4003_0041 " 0x4003_0051 " 0x4003_0061 " 0x4003_0071 "
0x4003_0042 " 0x4003_0052 " 0x4003_0062 " 0x4003_0072 "
0x4003_0043 " 0x4003_0053 " 0x4003_0063 " 0x4003_0073 "
0x4003_0044 ADAREG9 0x4003_0054 ADAPSEL1 0x4003_0064 ADAPSEL5 0x4003_0074 ADAPSEL9
0x4003_0045 " 0x4003_0055 " 0x4003_0065 " 0x4003_0075 "
0x4003_0046 " 0x4003_0056 " 0x4003_0066 " 0x4003_0076 "
0x4003_0047 " 0x4003_0057 " 0x4003_0067 " 0x4003_0077 "
0x4003_0048 ADAREG10 0x4003_0058 ADAPSEL2 0x4003_0068 ADAPSEL6 0x4003_0078 ADAPSEL10
0x4003_0049 " 0x4003_0059 " 0x4003_0069 " 0x4003_0079 "
0x4003_004A " 0x4003_005A " 0x4003_006A " 0x4003_007A "
0x4003_004B " 0x4003_005B " 0x4003_006B " 0x4003_007B "
0x4003_004C ADAREG11 0x4003_005C ADAPSEL3 0x4003_006C ADAPSEL7 0x4003_007C ADAPSEL11
0x4003_004D " 0x4003_005D " 0x4003_006D " 0x4003_007D "
0x4003_004E " 0x4003_005E " 0x4003_006E " 0x4003_007E "
0x4003_004F " 0x4003_005F " 0x4003_006F " 0x4003_007F "
ADR Register name ADR Register name ADR Register name ADR Register name
0x4003_0080 ADAPINTS0 0x4003_0090 ADAPINTS4 0x4003_00A0 ADAPSET2 0x4003_00B0 ADATSET03
0x4003_0081 " 0x4003_0091 " 0x4003_00A1 " 0x4003_00B1 "
0x4003_0082 " 0x4003_0092 " 0x4003_00A2 " 0x4003_00B2 "
0x4003_0083 " 0x4003_0093 " 0x4003_00A3 " 0x4003_00B3 "
0x4003_0084 ADAPINTS1 0x4003_0094 ADAPINTS5 0x4003_00A4 ADAPSET3 0x4003_00B4 ADATSET47
0x4003_0085 " 0x4003_0095 " 0x4003_00A5 " 0x4003_00B5 "
0x4003_0086 " 0x4003_0096 " 0x4003_00A6 " 0x4003_00B6 "
0x4003_0087 " 0x4003_0097 " 0x4003_00A7 " 0x4003_00B7 "
0x4003_0088 ADAPINTS2 0x4003_0098 ADAPSET0 0x4003_00A8 ADAPSET4 0x4003_00B8 ADATSET811
0x4003_0089 " 0x4003_0099 " 0x4003_00A9 " 0x4003_00B9 "
0x4003_008A " 0x4003_009A " 0x4003_00AA " 0x4003_00BA "
0x4003_008B " 0x4003_009B " 0x4003_00AB " 0x4003_00BB "
0x4003_008C ADAPINTS3 0x4003_009C ADAPSET1 0x4003_00AC ADAPSET5 0x4003_00BC ADASSET03
0x4003_008D " 0x4003_009D " 0x4003_00AD " 0x4003_00BD "
0x4003_008E " 0x4003_009E " 0x4003_00AE " 0x4003_00BE "
0x4003_008F " 0x4003_009F " 0x4003_00AF " 0x4003_00BF "
ADR Register name ADR Register name ADR Register name ADR Register name
0x4003_0240 ADBREG8 0x4003_0250 ADBPSEL0 0x4003_0260 ADBPSEL4 0x4003_0270 ADBPSEL8
0x4003_0241 " 0x4003_0251 " 0x4003_0261 " 0x4003_0271 "
0x4003_0242 " 0x4003_0252 " 0x4003_0262 " 0x4003_0272 "
0x4003_0243 " 0x4003_0253 " 0x4003_0263 " 0x4003_0273 "
0x4003_0244 ADBREG9 0x4003_0254 ADBPSEL1 0x4003_0264 ADBPSEL5 0x4003_0274 ADBPSEL9
0x4003_0245 " 0x4003_0255 " 0x4003_0265 " 0x4003_0275 "
0x4003_0246 " 0x4003_0256 " 0x4003_0266 " 0x4003_0276 "
0x4003_0247 " 0x4003_0257 " 0x4003_0267 " 0x4003_0277 "
0x4003_0248 ADBREG10 0x4003_0258 ADBPSEL2 0x4003_0268 ADBPSEL6 0x4003_0278 ADBPSEL10
0x4003_0249 " 0x4003_0259 " 0x4003_0269 " 0x4003_0279 "
0x4003_024A " 0x4003_025A " 0x4003_026A " 0x4003_027A "
0x4003_024B " 0x4003_025B " 0x4003_026B " 0x4003_027B "
0x4003_024C ADBREG11 0x4003_025C ADBPSEL3 0x4003_026C ADBPSEL7 0x4003_027C ADBPSEL11
0x4003_024D " 0x4003_025D " 0x4003_026D " 0x4003_027D "
0x4003_024E " 0x4003_025E " 0x4003_026E " 0x4003_027E "
0x4003_024F " 0x4003_025F " 0x4003_026F " 0x4003_027F "
ADR Register name ADR Register name ADR Register name ADR Register name
0x4003_0280 ADBPINTS0 0x4003_0290 ADBPINTS4 0x4003_02A0 ADBPSET2 0x4003_02B0 ADBTSET03
0x4003_0281 " 0x4003_0291 " 0x4003_02A1 " 0x4003_02B1 "
0x4003_0282 " 0x4003_0292 " 0x4003_02A2 " 0x4003_02B2 "
0x4003_0283 " 0x4003_0293 " 0x4003_02A3 " 0x4003_02B3 "
0x4003_0284 ADBPINTS1 0x4003_0294 ADBPINTS5 0x4003_02A4 ADBPSET3 0x4003_02B4 ADBTSET47
0x4003_0285 " 0x4003_0295 " 0x4003_02A5 " 0x4003_02B5 "
0x4003_0286 " 0x4003_0296 " 0x4003_02A6 " 0x4003_02B6 "
0x4003_0287 " 0x4003_0297 " 0x4003_02A7 " 0x4003_02B7 "
0x4003_0288 ADBPINTS2 0x4003_0298 ADBPSET0 0x4003_02A8 ADBPSET4 0x4003_02B8 ADBTSET811
0x4003_0289 " 0x4003_0299 " 0x4003_02A9 " 0x4003_02B9 "
0x4003_028A " 0x4003_029A " 0x4003_02AA " 0x4003_02BA "
0x4003_028B " 0x4003_029B " 0x4003_02AB " 0x4003_02BB "
0x4003_028C ADBPINTS3 0x4003_029C ADBPSET1 0x4003_02AC ADBPSET5 0x4003_02BC ADBSSET03
0x4003_028D " 0x4003_029D " 0x4003_02AD " 0x4003_02BD "
0x4003_028E " 0x4003_029E " 0x4003_02AE " 0x4003_02BE "
0x4003_028F " 0x4003_029F " 0x4003_02AF " 0x4003_02BF "
Output Data
P-ch
Output
Outputcontrol
Enable I/O
N-ch
Schmitt
Input Data
Pull-down Enable
Programmable
Pull-down Resistor
Output Data
P-ch
Output
Outputcontrol
Enable I/O
N-ch
Schmitt
Input Data
Pull-down Enable
Programmable
Pull-down Resistor
• PB0-3, PB5-7
Output Data
P-ch
Outputcontrol
Output Enable I/O
N-ch
Schmitt
Input Data
• PB4
Output Data
P-ch
Output
Output control
Enable I/O
N-ch
Schmitt
Input Data
Input Enable
Programmable
Pull-down Resistor
Pull-down Enable
• PL0-1
Schmitt
I/O
Input
Input Data
Input Enable
• X1, X2
Clock
Oscillator Circuit
X2
1 KΩ
500 KΩ
High-frequency
Oscillation Enable
X1
• RESET
Pull-up Resistor
Schimitt
Reset Input
• MODE
Schimitt
Input MODE
Data Input
ADC
VREFH
String
Resistor
VREFL
AVSS AVSS/VREFL
• CVREFABC, CVREFD
CVREF Input
24 Electrical Characteristics
DVDD5E − 0.3 to 6
AVDD5A/B − 0.3 to 6 V
AMPVDD5 − 0.3 to 6
VOUT15 − 0.3 to 3
Capacitor voltage
VOUT3 − 0.3 to 3.9
(Note) Absolute maximum ratings are limiting values of operating and environmental conditions
which should not be exceeded under the worst possible conditions. The equipment
manufacturer should design so that no Absolute maximum rating value is exceeded with
respect to current, voltage, power consumption, temperature, etc. Exposure to conditions
beyond those listed above may cause permanent damage to the device or affect device
reliability, which could increase potential risks of personal injury due to IC blowup and/or
burning.
V
input voltage
Hight-level
Programmable pull-up/
PKH 4.5V ≦ VDD ≦ 5.5V (Note4) − 50 150 kΩ
pull-down resistor
Pin capacitance
CIO fc = 1MHz − − 10 pF
(Except power supply pins)
(Note 1) Ta = 25°C, DVDD5 = DVDD5E = AVDD5A = AVDD5B = RVDD5 = AMVDD5 = 5V, unless
otherwise noted.
(Note 2) The same voltage must be supplied to DVDD5, DVDD5E, AVDD5A/B, RVDD5 and AMPVDD5.
(Note 3) VOUT15 and VOUT3 pin should be connected to GND via same value of capacitance. The IC
outside can not have the power supply from VOUT15 and VOUT3.
(Note4) VDD = DVDD5E = DVDD5 = AVDD5A = AVDD5B = AMPVDD5
STOP 7 11 mA
(Note 1) Ta = 25°C, DVDD5 = DVDD5E = AVDD5A/B = RVDD5 = AMPVDD5 = 5V, unless otherwise
noted.
(Note 2) ICC NORMAL, IDLE: All functions operates excluding A/D, Op amp and Comparator.
(Note 3) A/D reference voltage supply can not go into off state.
(Note 1) Gain can be selected among ×2.5, ×3, ×3.5, ×4, ×6 and ×8 by register setting.
(Note 2) Slew rate means a slant til the output of amplifier reaches AVDD-0.001×AVDD.
AIN input voltage range VIN AVDD = 4.5 to 5.5V AVSS − AVDD V
AVSS = 0V
Reference voltage range VREF 0.9 − AVDD−0.2 V
(Note 1) 1.0V≦VREF≦AVDD-0.2V
(Note 2) The case that VIN varies from VREF-100mv to VREF+100mv or from VREF+100mv to
VREF-100mv.
(Note 3) AVDD = AVDD5A = AVDD5B = AMPVDD5, AVSS = AVSSA = AVSSB = AMPVSS
AC measuremetn condition
Output levels: High 0.8VDD V/Low 0.2VDD, CL=30pF
Input levels: Refer to low-level input voltage and high-level input voltage in DC Electrical
Characteristics.
In the table below, the letter x represents the period of the system clock (fsys). It varies depending on
the programming of the clock gear function.
(Note 1) SCLK rise or fall:Measured relative to the programmed active edge of SCLK.
(Note 2) toss should be always positive. Therefore, set proper SCLK parameters (tSCY, tSCL and tSCY) to
keep toss positive. (toss > 0)
SCLK
Input Low Mode
tOSS tOHS
OUTPUT DATA 0 1 2 3
TxD
tSRD tHSR
INPUT DATA
0 1 2 3
RxD
VALID VALID VALID VALID
Ta = −40 to 85°C
Equation 80MHz
Parameter Symbol Unit
Min. Max. Min. Max.
24.7.3 Capture
Ta = −40 to 85°C
Equation 80MHz
Parameter Symbol Unit
Min. Max. Min. Max.
Low pulse width tCPL 2x + 100 125 ns
Tdck
CLK input
(SWCLK)
(TCK) Td2
Td1
Output Data
(SWDIO)
Td4
Output Data Td3
(TDO)
Input Data
(SWDIO)
(TMS/TDI)
Tds Tdh
AC measuremetn condition
Output levels: High 0.7VDD V/Low 0.3VDD
Load capacitance: TRACECLK CL=25pF, TRACEDATA CL=20pF
t tclk
TRACE CLK
TRACEDATA 0 1 2 3
0 to 1
Ta = 0 to 70°C
Parameter Rating Min. Typ. Max. Unit
The TMPM370 has been evaluated by the oscillator vender below. Use this information when
selecting external parts.
Note1: The load value of the oscillator is the sum of loads (C1 and C2) and the floating load of the
actual assembled board. There is a possibility of operating error when using C1 and C2
values in the table below. When designing the board, design the minimum length pattern
around the oscillator. We also recommend that oscillator evaluation be carried out using
the actual board.
Note2: Do not be driven X1/X2 by external driver.
Rd
C1 C2
The TMPM370 recommends the high-frequency oscillator by Murata Manufacturing Co., Ltd.
Please refer to the following URL for details.
http://www.murata.co.jp
Solderability
Table 24.1.Warming-up time and Rising time of power line (POR only)
Symbol Rating Min Typ. Max Unit
tPWUP Warming-up time after reset released 215/fosc s
tDVDD Rising time of power line 3 ms
Voltage tDVDD
4.5V
VDDs
PL0,PL1
VPORH
0.5V
Power on 200μs(min)
Detection Signal
Power on
Reset Signal
tPWUP
Power On
Counter ・・
Internal Reset
Signal
(Note) VDDs are DVDD5, RVDD5, AVDD5A/B and AMPVDD5.
Voltage tDVDD
4.5V
VDDs
PL0,PL1
VPORH
0.5V
Power on 200μs(min)
Detection Signal
Power on
Reset Signal
tPWUP
Power on Counter ・・
--------------------------
RESET pin
Internal Reset
Signal Depend on tPWUP
Voltage tDVDD
4.5V
VDDs
PL0,PL1
VPORH
0.5V
Power on 200μs(min)
Detection Signal
Power on
Reset Signal
tPWUP
Power on Counter
・・
--------------------------
RESET pin
Internal Reset
Signal Depend on the time of exterenal reset
(3) In case of the rising time of power line longer than tPWUP
------------------------------
(Note) In this case, must be reset from RESET pin.
Voltage tDVDD
4.5V
VDDs PL0,PL1
VPORH
0.5V
Power on 200μs(min)
Detection Signal
Power on
Reset Signal
VDDs must reach operating voltage and after
200μs, external reset can released.
Power on Counter ・・
--------------------------
RESET pin
Internal Reset
Signal
25. Package
Type:LQFP100-P-1414-0.50H
Dimensions
Unit : mm
Pin detail
(Note 1) For more dimensional information, please contact any one of our representatives
(Note 2) The package is palladized
Type:QFP100-P-1420-0.65Q
Dimensions
Unit : mm
Pin detail
Pin detail
(Note1) For more dimensional information, please contact any one of our representatives
(Note2) The package is palladized
TMPM370