| 数据搜索系统,热门电子元器件搜索 |
|
AN2669 数据表(PDF) 3 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2669 数据表(HTML) 3 Page - STMicroelectronics |
|
3 / 8 page ![]() AN2669 Example 1: Clock security system (CSS) capability 3/8 1 Example 1: Clock security system (CSS) capability 1.1 Overview This example shows how to use the CSS capability. Enabling the CSS, is a way of making the application more reliable, by ensuring the microcontroller keeps running even if the main clock, (HSE) fails. The example is provided as CLK example 1 in the STM8 firmware library. It uses most of the features of the CLK driver provided in the library. 1.2 Hardware description Figure 1 shows the main hardware connections needed to run the CSS. Figure 1. STM8A CLK interface 1.3 Firmware description The STM8 firmware library includes the CLK driver which supports all CLK features through a set of functions. The current example shows how to configure the CLK to detect a failure on the HSE. When the 24 MHz HSE clock is used as the system clock, the four LEDs (LD1, LD2, LD3, and LD4) connected to pins PH3, PH2, PH1 and PH0 respectively are toggled with a fast frequency derived from the system clock. The CSS is enabled, so that when the HSE clock disappears (when it is broken or the external crystal is disconnected), the following clock recovery sequence is performed automatically: ● The HSE clock is disabled and the system clock switches to the HSI backup clock. ● The CPU continues processing operations but the frequency is changed to HSI/8 (CSS default clock). ● LED1, 2, 3, 4 toggle at a slower frequency. ● The clock switchover can be monitored by connecting an oscilloscope to the CCO pin (PE0). CCO 24 MHz 20 pF 20 pF 1 M Ω 60 Ω Oscilloscope OSCIN OSCOUT STM8A PH0 PH1 PH2 PH3 1 k Ω 1 k Ω 1 k Ω 1 k Ω LD1 LD2 LD3 LD4 |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |