English
Language : 

HD6473837H Datasheet, PDF (240/562 Pages) Renesas Technology Corp – Hardware Manual
Table 9.18 Input Capture Input Signal Input Edges and Conditions by Switching of Input
Capture Pin Function
Input Capture Edge
Conditions
Rising edge recognized TMIG pin level is high, and TMIG bit is changed from 0 to 1
TMIG pin level is high and NCS bit is changed from 0 to 1, then TMIG
bit is changed from 0 to 1 before noise canceller circuit completes five
samples
Falling edge recognized TMIG pin level is high, and TMIG bit is changed from 1 to 0
TMIG pin level is low and NCS bit is changed from 0 to 1, then TMIG
bit is changed from 0 to 1 before noise canceller circuit completes five
samples
TMIG pin level is high and NCS bit is changed from 0 to 1, then TMIG
bit is changed from 1 to 0 before noise canceller circuit completes five
samples
Note: When pin P13 is not used for input capture, the input capture signal input to timer G is low.
• Switching the input capture noise canceling function
When modifying the NCS bit in port mode register 2 (PMR2) to enable or disable the input
capture noise canceling function, first clear the TMIG bit to 0. Otherwise an input capture edge
may be recognized even though no valid signal edge has been input. This occurs under the
conditions listed in table 9.19.
Table 9.19 Input Capture Input Signal Input Edges and Conditions by Switching of Noise
Canceling Function
Input Capture Edge
Rising edge recognized
Falling edge recognized
Conditions
TMIG bit is set to 1 and TMIG pin level changes from low to high, then
NCS bit is changed from 1 to 0 before noise canceller circuit completes
five samples
TMIG bit is set to 1 and TMIG pin level changes from high to low, then
NCS bit is changed from 1 to 0 before noise canceller circuit completes
five samples
If switching of the pin function generates a false input capture edge matching the edge selected
by the input capture interrupt edge select bit (IIEGS), the interrupt request flag will be set to 1,
making it necessary to clear this flag to 0 before using the interrupt function. Figure 9.15
shows the procedure for modifying port mode register settings and clearing the interrupt
request flag. The first step is to mask interrupts before modifying the port mode register. After
modifying the port mode register setting, wait long enough for an input capture edge to be
recognized (at least two system clocks when noise canceling is disabled; at least five sampling
clocks when noise canceling is enabled), then clear the interrupt request flag to 0 (assuming it
has been set to 1). An alternative procedure is to avoid having the interrupt request flag set
223