STM8S105xx
Product overview
- 16 MHz high-speed internal RC oscillator (HSI)
- 128 kHz low-speed internal RC (LSI)
• Startup clock: After reset, the microcontroller restarts by default with an internal 2 MHz
clock (HSI/8). The prescaler ratio and clock source can be changed by the application
program as soon as the code execution starts.
• Clock security system (CSS): This feature can be enabled by software. If an HSE clock
failure occurs, the internal RC (16 MHz/8) is automatically selected by the CSS and an
interrupt can optionally be generated.
• Configurable main clock output (CCO): This outputs an external clock for use by the
application.
Table 3: Peripheral clock gating bit assignments in CLK_PCKENR1/2 registers
Bit
Peripheral Bit
Peripheral Bit
Peripheral Bit
Peripheral
clock
clock
clock
clock
PCKEN1 7 TIM1
PCKEN1 3 UART2 PCKEN2 7 Reserved PCKEN2 3 ADC
PCKEN1 6 TIM3
PCKEN1 2 Reserved PCKEN2 6 Reserved PCKEN2 2 AWU
PCKEN1 5 TIM2
PCKEN1 4 TIM4
PCKEN1 1 SPI
PCKEN1 0 I2C
PCKEN2 5 Reserved PCKEN2 1 Reserved
PCKEN2 4 Reserved PCKEN2 0 Reserved
4.6
Power management
For efficent power management, the application can be put in one of four different low-power
modes. You can configure each mode to obtain the best compromise between lowest power
consumption, fastest start-up time and available wakeup sources.
• Wait mode: In this mode, the CPU is stopped, but peripherals are kept running. The
wakeup is performed by an internal or external interrupt or reset.
• Active halt mode with regulator on: In this mode, the CPU and peripheral clocks are
stopped. An internal wakeup is generated at programmable intervals by the auto wake up
unit (AWU). The main voltage regulator is kept powered on, so current consumption is
higher than in active halt mode with regulator off, but the wakeup time is faster. Wakeup
is triggered by the internal AWU interrupt, external interrupt or reset.
• Active halt mode with regulator off: This mode is the same as active halt with regulator
on, except that the main voltage regulator is powered off, so the wake up time is slower.
• Halt mode: In this mode the microcontroller uses the least power. The CPU and peripheral
clocks are stopped, the main voltage regulator is powered off. Wakeup is triggered by
external event or reset.
DocID14771 Rev 9
15/127