
R01UH0336EJ0102 Rev.1.02
Page 877 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 15 TSG2 (TSG20)
(2)
Various Settings of 120-DC Mode
Mode setting
120-DC mode can be used by setting TSnCTL0.TSnMD1 and TSnMD0 are set
to 11
B
.
Setting timer output
The output pins TSG2nO1 to TSG2nO6 are controlled by setting TSnIOC0,
TSnIOC2, and TSnIOC3.
The TSG2nO7 pin outputs pulses of the diagnostic output or the A/D
conversion trigger. Please set it as required.
Enabling error
interrupt generation
With TSnIOC1.TSnEOC = 1, the error interrupt (INTTSG2nIER) generation is
enabled when the simultaneous active state of the positive phase and inverse
phase is detected. For details, see Section 15.10, Error/Warning Interrupt.
Setting register
rewrite timing
Reloading the registers with the reload function is activated with
TSnCTL3.TSnRMC (simultaneous rewrite; default setting is 0 = reload). Set
TSnCTL4.TSnPRE to 1 when reload is used.
The reload timing is not generated if TSnPRE is 0.
Setting A/D
conversion trigger
output
To set A/D conversion trigger 0 (TSnADTRG0 signal), use TSnCTL5.TSnAT09
to TSnAT00.
With TSnAT09 to TSnAT00, A/D conversion trigger output is enabled or
disabled at the match of the 16-bit counter and TSnDCMP2 to TSnDCMP0
(during up count).
To set A/D conversion trigger 1 (TSnADTRG1 signal), use TSnCTL6.TSnAT19
to TSnAT10.
To set the match timing of the 16-bit counter and TSnDCMP2 to TSnDCMP0,
set the compare value to the pertinent register.
The skipping function can be used for TSnADTRG0 and TSnADTRG1 signals.
Use TSnACC01, TSnACC00 of TSnCTL5 and TSnACC11, and TSnACC10 in
TSnCTL6 to select the skipping rate among 1/1, 1/2, 1/4, and 1/8.
Caution
• Set TSnCTL5, TSnCTL6, and TSnDCMP2 to TSnDCMP0 correctly when
using the TSG2nO7 output for the A/D conversion trigger timing pulse.
• In 120-DC mode, a valley interrupt (INTTSG2nIVLY) is not generated.
Therefore, set TSnAT00 and TSnAT10 in TSnCTL5 and TSnCTL6 to 0.
• In 120-DC mode, the 16-bit sub-counter does not operate. Therefore, set
TSnAT09, TSnAT08, TSnAT19, and TSnAT18 in TSnCTL5 and TSnCTL6 to
0.
• In 120-DC mode, the 16-bit counter does not decrement. Therefore, set
TSnAT07, TSnAT05, TSnAT03, TSnAT17, TSnAT15, and TSnAT13 in
TSnCTL5 and TSnCTL6 to 0.