m37905 Renesas Electronics Corporation., m37905 Datasheet - Page 175

no-image

m37905

Manufacturer Part Number
m37905
Description
Mitsubishi 16-bit Single-chip Microcomputer 7700 Family / 7900 Series
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
m37905F8CSP
Manufacturer:
MIT
Quantity:
20 000
TIMER B
8.5 Pulse period/pulse width measurement mode
Fig. 8.5.3 Processing example of timer Bi interrupt when free-run count type is selected
8-24
(2) Timer Bi overflow flag
Figure 8.5.3 shows the processing example of a timer Bi interrupt when a measurement pulse’s valid
edge is detected by the timer Bi interrupt request.
When a value is written to the timer Bi mode register after the next count timing of the count
source with the count start bit = “1,” the timer Bi overflow flag will be cleared to “0”.
When counter clear type is selected
A timer Bi interrupt request occurs when a measurement pulse’s valid edge is input or when a
counter overflow occurs. The timer Bi overflow flag is used to identify the source of the interrupt
request occurrence, that is, whether it is an overflow occurrence or a valid edge input.
The timer Bi overflow flag is set to “1” at an overflow occurrence. Accordingly, the source of the
interrupt request occurrence is identified by checking the timer Bi overflow flag in the interrupt
routine. When a value is written to the timer Bi mode register after the next count timing of the
count source with the count start bit = “1,” the timer Bi overflow flag will be cleared to “0”.
The timer Bi overflow flag is a read-only bit.
Use the timer Bi interrupt request bit to detect the overflow timing. Do not use the timer Bi overflow
flag for this detection.
When free-run type is selected
The timer Bi overflow flag is set to “1” at an overflow occurrence. (At this time, no timer Bi interrupt
request is generated.) Accordingly, whether a counter overflow occurs between valid edges is
identified by checking the timer Bi overflow flag in the interrupt routine owing to a valid edge input.
The timer Bi overflow flag is a read-only bit.
Notes 1: The valid edge of the measurement pulse is detected.
2: Be sure to read out the timer Bi register.
3: After the timer Bi overflow flag is set to “1”, be sure to wait for one cycle
Then, write a value to the timer Bi mode register.
of the count source to elapse.
Timer Bi overflow flag is
cleared to “0.” (Note 3)
Measured value is read out.
Processing with overflow
Timer Bi overflow flag ?
Timer Bi interrupt
7905 Group User’s Manual Rev.1.0
(Note 1)
(Note 2)
RTI
1
0
Processing without overflow

Related parts for m37905