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 5 CLOCK GENERATOR<br />

5.7.3 Example of controlling XT1 oscillation clock<br />

After a reset release, the CPU/peripheral hardware clock (fCLK) always starts operating with the high-speed on-chip<br />

oscillator clock. To subsequently change the clock to the XT1 oscillation clock, set the oscillator and start oscillation by<br />

using the operation speed mode control register (OSMC), clock operation mode control register (CMC), and clock<br />

operation status control register (CSC), set the XT1 oscillation clock to fCLK by using the system clock control register<br />

(CKC).<br />

[Register settings] Set the register in the order of to below.<br />

To run only the real-time clock and interval timer on the subsystem clock (ultra-low current consumption) when in<br />

the STOP mode or sub-HALT mode, set the RTCLPC bit to 1.<br />

7 6 5 4 3 2 1 0<br />

OSMC<br />

RTCLPC<br />

0/1<br />

0<br />

0<br />

WUTMMCK0<br />

0<br />

Set (1) the OSCSELS bit of the CMC register to operate the XT1 oscillator.<br />

7 6 5 4 3 2 1 0<br />

CMC<br />

EXCLK<br />

0<br />

OSCSEL<br />

0<br />

0<br />

OSCSELS<br />

1<br />

R01UH0317EJ0004 Rev. 0.04 300<br />

Feb. 22, 2013<br />

0<br />

0<br />

0<br />

AMPHS1<br />

0/1<br />

0<br />

AMPHS0<br />

0/1<br />

0<br />

AMPH<br />

0<br />

AMPHS0 and AMPHS1 bits: These bits are used to specify the oscillation mode of the XT1 oscillator.<br />

Clear (0) the XTSTOP bit of the CSC register to start oscillating the XT1 oscillator.<br />

7 6 5 4 3 2 1 0<br />

CSC<br />

MSTOP<br />

1<br />

XTSTOP<br />

0<br />

0<br />

0<br />

0<br />

0<br />

0<br />

HIOSTOP<br />

0<br />

Use the timer function or another function to wait for oscillation of the subsystem clock to stabilize by using<br />

software.<br />

Use the CSS bit of the CKC register to specify the XT1 oscillation clock as the CPU/peripheral hardware clock.<br />

7 6 5 4 3 2 1 0<br />

CKC<br />

CLS<br />

0<br />

CSS<br />

1<br />

MCS<br />

0<br />

MCM0<br />

0<br />

0<br />

0<br />

0<br />

0

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

Saved successfully!

Ooh no, something went wrong!