
R01UH0336EJ0102 Rev.1.02
Page 803 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 15 TSG2 (TSG20)
15.7.7
Pattern Reversal Detection Flag (TSnPRF)
Name
Pattern reversal detection flag (TSnSTR2.TSnPRF)
Description
TSnPRF can detect that the pattern change order of the TSG2nPTSI2 to
TSG2nPTSI0 pins have been reversed.
TSnPRF is set to 1 when the pattern order detection flag (TSnTSF) changes,
and a warning interrupt (INTTSG2nIWN) is generated. However, immediately
after TSnSTR0.TSnTE is set to 1, TSnPRF is valid at the timing of the second
and subsequent change in TSG2nPTSI2 to TSG2nPTSI0 pins.
TSnPRF is cleared to 0 when 1 is written to the TSnSTC.TSnPRR bit.
Example of
operation
Figure 15-19
Example of Pattern Reversal Detection Flag Operation
Figure 15-20
Example of Operation immediately after TSnTE Flag in TSnSTR0 is Set to
1
Note 1.
Operation starts.
Note 2.
If TSnTSF is set to 1 by the first change in the TSG2nPTSI2 to TSG2nPTSI0
pins immediately after TSnTE is set to 1, reversal is not detected.
Operating mode
TSnPRF can be used in all operating modes.
Caution
TSnPRF is valid only when TSnCTL1.TSnPRC = 1 and TSnSTR0.TSnTE = 1.
Write 1 to TSnPRR (clear)
TSG2nPTSI2 pin
TSG2nPTSI1 pin
TSG2nPTSI0 pin
TSnTSF
TSnPRF
P
CLK
INTTSG2nIWN
interrupt
TSnTSF
INTTSG2nIWN
interrupt
TSnPRF
TSnTE
"L"
*
1
*
2
TSG2nPTSI2 pin
TSG2nPTSI1 pin
TSG2nPTSI0 pin
Detects reversal based
on the subsequent change in TSnTSF.