Fosc Setup (Internal Oscillation >>> External Clock Input); Fosc Setup (External Oscillation/External Clock Input >>> Internal Oscillation) - Toshiba TXZ+ TMPM4KLFYAUG Reference Manual

32-bit risc microcontroller
Table of Contents

Advertisement

(2) fosc setup (Internal oscillation >>> External clock input)
As a fosc setup, the example of switching procedure to the external clock input (EHCLKIN) from an internal
oscillator1(IHOSC1) is shown below.
<< The state before switching >>
[CGOSCCR]<IHOSC1EN> =1
[CGOSCCR]<OSCSEL> =0
[CGOSCCR]<OSCF> =0
Clock into to EHCLKIN
<< The example of switching procedure >>
[PHPDN]<bit[0]> =0
1
[PHIE]<bit[0]> =1
2
[CGOSCCR]<EOSCEN[1:0]> =10
3
[CGOSCCR]<OSCSEL> =1
4
[CGOSCCR]<OSCF> is read
5
[CGOSCCR]<IHOSC1EN> =0
(3) fosc setup (External oscillation/External clock input >>> Internal oscillation)
As a fosc setup, the example of switching procedure to the internal high speed oscillator1 (IHOSC1) from an
external high speed oscillator (EHOSC) Operation State or an external clock input (EHCLKIN) Operation State is
shown below.
<< The state before switching >>
[CGOSCCR]<EOSCEN[1:0]> = 01 or 10
[CGOSCCR]<OSCSEL> =1
[CGOSCCR]<OSCF> =1
<< The example of switching procedure >>
1
[CGWUPHCR]<WUCLK>=0
2
[CGWUPHCR]<WUPT[15:4]>=0x03C
3
[CGOSCCR]<IHOSC1EN> = 1
4
[CGWUPHCR]<WUON> = 1
5
[CGWUPHCR]<WUEF> is read
6
[CGOSCCR]<OSCSEL> = 0
7
[CGOSCCR]<OSCF> is read
8
[CGOSCCR]<EOSCEN[1:0]> = 00
An internal high speed oscillator1 oscillates.
The high speed oscillation selection for fosc is an internal high speed
oscillator1 (IHOSC1).
The high speed oscillation selection status for fosc is an internal high
speed oscillator1 (IHOSC1).
Input in the proper voltage range.
Disable the pull-down resistor of X1/EHCLKIN pin.
Enable the input control of X1/EHCLKIN pin.
Selection of an external high speed oscillation of operation is carried out
to an external clock input (EHCLKIN).
It is high speed oscillation selection for fosc to an external clock.
It waits until the high speed oscillation selection status for fosc becomes
external high speed oscillator (=1).
An internal high speed oscillator1 is suspended.
Selection of an external oscillator of operation is an external high speed
oscillator (EHOSC) or external clock input.
The high speed oscillation selection for fosc is the external high speed
oscillator (EHOSC).
The high speed oscillation selection status for fosc is the external high
speed oscillator (EHOSC).
Set the warming-up clock selection to internal high speed oscillator1
(IHOSC1).
Set the high speed oscillation warming-up timer setting value of 163.4 µs
(=0x03C) or more.
An internal high speed oscillator1 is oscillated.
Start the high speed oscillation warming-up timer
Wait until an warming-up timer status flag becomes ends(=1).
Set the high speed oscillation selection for fosc to internal high speed
oscillator1 (IHOSC1).
It waits until the high speed oscillation selection status for fosc becomes
an internal high speed oscillator1 (=0).
Set the selection of an external high speed oscillator operation to unused.
20 / 68
TMPM4K Group(2)
Clock Control and Operation Mode
TXZ+ Family
2023-12-25
Rev. 3.0

Advertisement

Table of Contents
loading

Table of Contents