upd70f3017ay Renesas Electronics Corporation., upd70f3017ay Datasheet - Page 205

no-image

upd70f3017ay

Manufacturer Part Number
upd70f3017ay
Description
V850/sa1tm 32-/16-bit Single-chip Microcontroller
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
upd70f3017ayGC-8EU-A
Manufacturer:
MICROCHIP
Quantity:
1 001
7.4.5 Operation as interval timer (16 bits)
(1) Cascade connection (16-bit timer) mode
The V850/SA1 provides 16-bit registers that can be used only when connected in cascade.
The following registers are available.
By setting bit 4 (TMCm4) of 8-bit timer mode control register m (TMCm) to 1, the timer enters the timer/counter
mode with 16-bit resolution (m = 3, 5).
The timer operates as an interval timer by repeatedly generating interrupts (n = 2 to 5) with the count preset in 8-
bit compare register n (CRn0) as the interval.
The following is an explanation of how to use TM2 and TM3. Substitute TM4 and TM5 for TM2 and TM3 as
appropriate when using TM4 and TM5.
<1> Set each register.
<2> Start the count operation by first setting the TCE3 bit of TMC3 to 1, and then setting the TCE2 bit of TMC2
<3> If a match occurs between cascade-connected timer TM2 and CR20, the INTTM2 of TM2 will be generated
<4> IMTTM2 will then be generated repeatedly at the same interval.
Example of setting method (when TM2 and TM3 are connected in cascade)
Cautions 1. To change the set value of the compare register (CR23) while the 8-bit timers (TM2, TM3)
TM2 to TM3 cascade connection: 16-bit counter TM23 (Address: FFFFF24AH)
TM4 to TM5 cascade connection: 16-bit counter TM45 (Address: FFFFF26AH)
• TCL20, TCL21: Select the count clock for TM2 (TM3 does not need to be set in a cascade connection)
• CR20, CR30: Compare values (each compare value can be set from 00H to FFH)
• TMC2: Selects clear and start mode when TM2 and CR20 match (x: don’t care)
to 1.
(TM2 and TM3 are cleared to 00H).
2. If the count value of the higher timer (TM3) matches CR30, the higher timer (TM3) interrupt
3. Set the TCE3 bit of TMC3 before setting the TCE2 bit of TMC2.
4. Restarting and stopping the count is possible just by setting the TCE2 bit of TMC2 to 1 or
TM2 → TMC2 = 0000xxx0B
TM3 → TMC3 = 0001xxx0B
are connected in cascade and being used as a 16-bit timer (TM23), change the CR23 value
after stopping the count operation of each of the 8-bit timers connected in cascade. If the
CR23 value is changed without stopping the timers, the value of the higher 8 bits (TM3)
will be undefined.
request (INTTM3) will be generated, even when the timers are being used in a cascade
connection. TM3 must therefore always be masked to disable interrupts.
0 respectively.
CHAPTER 7
16-bit compare register CR23 (Address: FFFFF24CH)
16-bit compare register CR45 (Address: FFFFF26CH)
User’s Manual U12768EJ4V1UD
TIMER/COUNTER FUNCTION
205

Related parts for upd70f3017ay