STM8 peripheral clock gating

Publisher:DazzlingSpiritLatest update time:2020-07-29 Source: 51heiKeywords:STM8 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Turning off the clocks of unused peripherals allows the STM8 to reduce power consumption. The peripheral clock gating (PCG) mode allows the user to turn on or off the connection between fMASTER and the following peripherals at any time in the running mode:


ADC

I2C

AWU (register clock, not counter clock)

SPI

TIM[4:1]

UART

CAN (register clock, not CAN clock)


After the STM8 system is reset, all peripheral clocks are in the on state. Users can turn off the corresponding peripheral clock by clearing the PCKEN bit in CLK_PCKENR1 or CLK_PCKENR2. However, before turning off the peripheral clock, users must set the corresponding bit to disable the peripheral.


To enable a peripheral, the user must first set the corresponding PCKEN bit in the CLK_PCKENR register, and then set the peripheral enable bit in the peripheral control register.


The AWU counter is driven by an internal or external clock (LSI or HSE) independent of fMASTER; therefore, the peripheral continues to run even if the clock to the register is turned off.


Keywords:STM8 Reference address:STM8 peripheral clock gating

Previous article:STM8 master clock switching
Next article:STM8 Clock Security System (CSS)

Recommended ReadingLatest update time:2024-11-21 20:32

How to set the STM8 microcontroller option word
There is a problem when using STM8 microcontrollers. If you want to use the second function of some pins, you need to set the option word. The option word can be set through code. However, it is troublesome to set the code. You need to calculate the value of the option word related register to be set. If the setting v
[Microcontroller]
How to set the STM8 microcontroller option word
STM8 timer interrupt program
System functions Use the STM8 timer for 1S timing and use LED for simple indication! hardware design This design is based on the internal RC oscillator 2M clock as the clock source of the STM8 timer TIM4 for 1S timing! LED control circuit schematic diagram software design /*********************************
[Microcontroller]
STM8 timer interrupt program
stm8s jumps out of the interrupt program c language, STM8 UART receives the interrupt program
software design /*---------------------------------------------------------------------- Experimental content: USART sends and receives data by itself, and uses the LED of the PB port to indicate the received data to see if it is consistent with the sent data. --------------------------------------------------------
[Microcontroller]
Design of multiple functional modules of universal testing machine based on STM32 and STM8 processors
    Based on STM32 and STM8 processors, multiple functional modules of the universal testing machine were designed. In order to improve the acquisition accuracy and speed of small signals, a hybrid phase-locked amplifier was designed using multiple processors, and digital processing was used for further processing, wh
[Microcontroller]
STM8 MAX485 serial port self-transmitting program
software design /********************************************************************* Purpose: Create a MAX485 operation library Target system: Based on STM8 microcontroller  Application software: Cosmic CxSTM8  *********************************************************************/ #include "STM8S207R8.h" void I
[Microcontroller]
STM8 Single Wire Interface Module (SWIM) and Debug Module (DM)
introduce The STM8 online debugging mode or in application programming mode is managed by a single-wire hardware interface that features ultra-high-speed memory programming. This interface, in conjunction with the online debugging module, provides a non-intrusive emulation mode in which the debugging emulation functio
[Microcontroller]
stm8 IAR compilation error Fatal Error[Cp001]
Fatal error Cp001: Copy protection check, no valid license was found for this product. This indicates that when installing the software, the serial password of the cracked software was not all capitalized, or the installation was not run as an administrator.
[Microcontroller]
What RTOS operating systems does STM8 support?
1. Extended issues Before answering this question, let me extend a question: Is it necessary to use an operating system for STM8? There is actually no standard answer to this question. I have developed projects using STM8 bare metal and also run RTOS on STM8 projects. It depends on the actual situation of the p
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号