beautypg.com

4 timer driver, 1 timer mode, 2 event counter mode – Renesas M16C/62P Group User Manual

Page 10: 3 pulse width modulation mode (pwm mode), 4 pulse period measurement mode, 5 pulse width measurement mode

background image

Rev.1.00 2007.11.1
REC10B0002-0100

8

2.4 Timer Driver

The timer driver sets the timer, clears timer settings, controls timer operation, and

acquires a counter value with respect to the following modes:

• Timer mode
• Event counter mode
• Pulse width modulation mode (PWM mode)
• Pulse period measurement mode
• Pulse width measurement mode


2.4.1 Timer Mode

In this mode, the timer counts the internally generated count source. When an

underflow or an overflow interrupt occurs, it calls a preset callback function.


2.4.2 Event Counter Mode

In this mode, the timer counts the external signal fed in from an input pin or an

overflow or underflow from other timer. When an underflow or an overflow interrupt
occurs, it calls a preset callback function.


2.4.3 Pulse Width Modulation Mode (PWM Mode)

In this mode, the timer outputs pulses in a given width successively. When an

underflow or an overflow interrupt occurs, it calls a preset callback function.


2.4.4 Pulse Period Measurement Mode

In this mode, the timer measures the pulse period of an external signal fed in from an

input pin. When an underflow or an overflow interrupt occurs, it calls a preset callback
function.


2.4.5 Pulse Width Measurement Mode

In this mode, the timer measures the pulse width of an external signal fed in from an

input pin. When an underflow or an overflow interrupt occurs, it calls a preset callback
function.