Timer Operation; Timer A Operation States - Renesas H8/38024 Hardware Manual

8-bit single-chip microcomputer h8 family/h8/300l super low power series
Hide thumbs Also See for H8/38024:
Table of Contents

Advertisement

9.2.3

Timer Operation

Interval Timer Operation
When bit TMA3 in timer mode register A (TMA) is cleared to 0, timer A functions as an 8-bit
interval timer.
Upon reset, TCA is cleared to H'00 and bit TMA3 is cleared to 0, so up-counting and interval
timing resume immediately. The clock input to timer A is selected by bits TMA2 to TMA0 in
TMA; any of eight internal clock signals output by prescaler S can be selected.
After the count value in TCA reaches H'FF, the next clock signal input causes timer A to
overflow, setting bit IRRTA to 1 in interrupt request register 1 (IRR1). If IENTA = 1 in interrupt
enable register 1 (IENR1), a CPU interrupt is requested. *
At overflow, TCA returns to H'00 and starts counting up again. In this mode timer A functions as
an interval timer that generates an overflow output at intervals of 256 input clock pulses.
Note: * For details on interrupts, see section 3.3, Interrupts.
Real-Time Clock Time Base Operation
When bit TMA3 in TMA is set to 1, timer A functions as a real-time clock time base by counting
clock signals output by prescaler W. The overflow period of timer A is set by bits TMA1 and
TMA0 in TMA. A choice of four periods is available. In time base operation (TMA3 = 1), setting
bit TMA2 to 1 clears both TCA and prescaler W to their initial values of H'00.
9.2.4

Timer A Operation States

Table 9.3 summarizes the timer A operation states.
Table 9.3
Timer A Operation States
Operation Mode
TCA Interval
Clock time base Reset
TMA
Note: When the real-time clock time base function is selected as the internal clock of TCA in
active mode or sleep mode, the internal clock is not synchronous with the system clock, so
it is synchronized by a synchronizing circuit. This may result in a maximum error of 1/φ (s) in
the count cycle.
Reset Active
Sleep
Reset
Functions Functions Halted
Functions Functions Functions Functions Functions Halted
Reset
Functions Retained Retained Functions Retained Retained Retained
Sub-
Sub-
Watch
active
sleep
Halted
Halted
Rev. 6.00, 08/04, page 243 of 628
Module
Standby
Standby
Halted
Halted
Halted

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8/38024f-ztatH8/38124H8/38024s

Table of Contents