04.03.2013 Views

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

RL78/D1A User's Manual: Hardware - Renesas

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Under development<br />

Preliminary document<br />

Specifications in this document are tentative and subject to change.<br />

<strong>RL78</strong>/<strong>D1A</strong> CHAPTER 6 TIMER ARRAY UNIT<br />

(3) Timer mode register mn (TMRmn)<br />

TMRmn sets an operation mode of channel n. It is used to select an operation clock (fMCK), a count clock, whether<br />

the timer operates as the master or a slave, a start trigger and a capture trigger, the valid edge of the timer input,<br />

and an operation mode (interval, capture, event counter, one-count, or capture & one-count).<br />

Rewriting TMRmn is prohibited when the register is in operation (when TEm = 1). However, bits 7 and 6 (CISmn1,<br />

CISmn0) can be rewritten even while the register is operating with some functions (when TEm = 1) (for details, see<br />

6.7 Operation of Timer Array Unit as Independent Channel and 6.8 Operation of Plural Channels of Timer<br />

Array Unit).<br />

TMRmn can be set by a 16-bit memory manipulation instruction.<br />

Reset signal generation clears this register to 0000H.<br />

Figure 6-11. Format of Timer Mode Register mn (TMRmn) (1/3)<br />

Address: F0190H, F0191H (TMR00) to F019EH, F019FH (TMR07), After reset: 0000H R/W<br />

F01D0H, F01D1H (TMR10) to F01DEH, F01DFH (TMR17),<br />

F0210H, F0211H (TMR20) to F021EH, F021FH (TMR27)<br />

Symbol 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

TMRmn CKS<br />

mn1<br />

CKS<br />

mn1<br />

CKS<br />

mn0<br />

CKS<br />

mn0<br />

0 CCS<br />

mn0<br />

MAST<br />

ERmn<br />

STS<br />

mn2<br />

STS<br />

mn1<br />

STS<br />

mn0<br />

0 0 Operation clock CKm0 set byTPSm register<br />

0 1 Operation clock CKm1 set by TPSm register<br />

1 0 Operation clock CKm2 set by TPSm register<br />

1 1 Operation clock CKm3 set by TPSm register<br />

R01UH0317EJ0004 Rev. 0.04 332<br />

Feb. 22, 2013<br />

CIS<br />

mn1<br />

CIS<br />

mn0<br />

0 0 MD<br />

mn3<br />

Selection of operation clock (fMCK) of channel n<br />

Operation clock (fMCK) is used by the edge detector. A count clock (fTCLK) is generated depending on the setting of<br />

the CCSmn bit.<br />

CCS<br />

mn0<br />

0 Operation clock (fMCK) specified by CKSmn bit<br />

1 Valid edge of input signal input from TImn pin<br />

Selection of count clock (fTCLK) of channel n<br />

Count clock (fTCLK) is used for the timer counter, output controller, and interrupt controller.<br />

Cautions 1. Be sure to clear bits 13, 5, and 4 to “0”.<br />

2. The timer array unit must be stopped (TTm = 00FFH) if the clock selected for fCLK is<br />

changed (by changing the value of the system clock control register (CKC)), even if the<br />

operating clock specified by using the CKSmn bit (fMCK), or the valid edge of the signal<br />

input from the TImn pin is selected as the count clock (fTCLK).<br />

Remark m: Unit number (m = 0 to 2)<br />

n: Channel number (n = 0 to 7)<br />

MD<br />

mn2<br />

MD<br />

mn1<br />

MD<br />

mn0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!