AN202
V1.0 | Page 42/73
www.cmostek.com
register to determine the current system clock source.
5.2.2
Oscillator Start-up Timeout Status(OSTS) Bit
The Oscillator Start-up Timeout Status (OSTS) bit of the OSCCON register is used to indicate whether the
system clock is from the external clock source or from the internal clock source.The external clock source is
defined by the FOSC<2:0> bit in the Configuration Word register (UCFG0). OSTS also indicates whether the
Oscillator Start-up Timer (OST) is timeout in the LP or XT mode.
5.3
Two-Speed Clock Start-up Mode
Two-Speed Start-upMode reduces the power consumption further by minimizing the latency between the
external oscillator and the code execution.For using the sleep mode frequently, Two-Speed Start-upMode will
remove the external oscillator start-up time from the time spent awake and can reduce the overall power
consumption of the device.This mode allows the application to wake-up from Sleep, use INTOSC as a clock
source to execute several instructions, and then go back to the Sleep status without waiting for the stability of
primary oscillator.
Note:
Executing a SLEEP instruction will abort the oscillator start-up time and clear the OSTS bit of the OSCCON
register.
When the oscillator module is configured as LP mode or XT mode, enable the Oscillator Start-upTimer (OST).
(See the section5.2.2
“OscillatorStart-up Timeout Status”). OST will suspend the program execution until the
1024 oscillations are counted. Two-Speed Start-up mode minimizes the delay in code execution by operating
from the internal oscillator as OST is counting. When OST count reaches 1024 and the OSTS bit of the
OSCCON register is set to 1, the program will switch to the external oscillator.
5.3.1
Two-Speed Start-up Mode Configuration
Two-Speed Start-up Modeis configured by the following settings:
Configure the IESO bit in the Configuration Wordregister (UCFG1) as 1, Internal/External Switch
Over bit. (Enable the Two-Speed Start-up Mode.)
Configure the SCS bit of the OSCCON register as 0.
Configure the F
OSC
<2:0> in the Configuration Word register(CONFIG) as the LP or XT mode.
Two-Speed Start-up mode is entered after the following operation:
Power-on Reset (POR) and, if enabled, after PWRT has expired, or
Wake-up from Sleep.
If the external clock oscillator is configured as any mode except the LP or XT mode, the Two-Speed Start-up
will be disabled. This is because the external clock oscillation does not require any stablilization time after
Содержание CMT2189C
Страница 32: ...AN202 V1 0 Page 32 73 www cmostek com...