| Electronic Components Datasheet Search |
|
AN3147 Datasheet(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3147 Datasheet(HTML) 10 Page - STMicroelectronics |
|
10 / 25 page ![]() Clock management AN3147 10/25 DocID17035 Rev 3 The default clock source after reset is HSI/8. The user can then switch the clock to different frequencies and sources by using the following procedure: On the STM8L101xx devices: – Choose the prescaler (/1, /2, /4 or /8) for an internal RC 16 MHz (HSI) clock through the HSIDIV[1:0] bits in the CLK_CKDIVR register. On the STM8L05xxx, STM8L15xxx, STM8L162xx, STM8AL31xx and STM8AL3Lxx devices: – Choose the prescaler (/1, /2 ... /128) for an internal RC 16 MHz (HSI) clock through the CKM[2:0] bits in the CLK_CKDIVR register. – Or, change the system clock (to HSE, LSE or LSI). Refer to the STM8L05xx, STM8L15xx, STM8L162x, STM8AL31xx and STM8AL3Lxx microcontroller family reference manual (RM0031) for more details about the clock switching mechanism. Before switching off a previous clock source when using automatic switching mode, the user must ensure that the core is no longer running on the current clock. This means that the previous clock must be turned off after the SWIF flag has been set. If the user tries to switch off the clock and the SWIF flag has not been set by hardware, the current clock is not switched off as the microcontroller is still running using this clock source. Such clock switching can be combined with Wait mode (for example, if the HSE crystal is the new clock) as clock switch execution interrupt can wake up the MCU from wait mode. This enables the synchronization of the MCU wakeup with the new clock availability. The clock switching feature can also be used at the beginning and the end of a regular or interrupt routine to speed it up (for instance, if the clock master is LSI RC, but some parts of the code have to be executed quickly with HSI RC). Table 2. Clock sources HSE oscillator external HSE HSI external LSE LSE crystal LSI Cost Low to medium Low to high Free Low to medium Low to medium Free Accuracy ~ ppm / % depending on external clock ~ % depending on external clock ~ ppm ~ % Consumption 0.7 mA max High/medium 100 µA 1.4 µA max 100 - 400 nA Start-up time 1 ms depending on external clock 4µs depending on external clock 1s 200µs max Other information Crystal or ceramic resonator Clock already existing in the system - Clock already existing in the system Watch crystal - |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |