Kaynağa Gözat

Core: Added additional note about SystemCoreClock variable initialization to documentation.

Jonatan Antoni 8 yıl önce
ebeveyn
işleme
4a900e8f4c

+ 7 - 0
CMSIS/DoxyGen/Core/src/Ref_SystemAndClock.txt

@@ -14,6 +14,13 @@ The file configures the device and, typically, initializes the oscillator (PLL)
 of the microcontroller device. This file might export other functions or variables that provide 
 a more flexible configuration of the microcontroller system.
 
+\note Please pay special attention to the static variable \c SystemCoreClock. This variable might be
+used throughout the whole system initialization and runtime to calculate frequency/time related values.
+Thus one must assure that the variable always reflects the actual system clock speed. Be aware that
+a value stored to \c SystemCoreClock during low level initializaton (i.e. \c SystemInit()) might get
+overwritten by C libray startup code. Thus its highly recommended to call \ref SystemCoreClockUpdate
+at the beginning of the user \c main() routine.
+
 
 \section system_init_code_ex_sec Code Example     
 The code below shows the usage of the variable \ref SystemCoreClock and the functions 

+ 8 - 2
CMSIS/DoxyGen/Core_A/src/Ref_SystemAndClock.txt

@@ -14,8 +14,14 @@ The file configures the device and, typically, initializes the oscillator (PLL)
 of the microcontroller device. This file might export other functions or variables that provide 
 a more flexible configuration of the microcontroller system.
 
-
-\section system_init_code_ex_sec Code Example     
+\note Please pay special attention to the static variable \c SystemCoreClock. This variable might be
+used throughout the whole system initialization and runtime to calculate frequency/time related values.
+Thus one must assure that the variable always reflects the actual system clock speed. Be aware that
+a value stored to \c SystemCoreClock during low level initializaton (i.e. \c SystemInit()) might get
+overwritten by C libray startup code. Thus its highly recommended to call \ref SystemCoreClockUpdate
+at the beginning of the user \c main() routine.
+
+\section system_init_code_ex_sec Code Example
 The code below shows the usage of the variable \ref SystemCoreClock and the functions 
 SystemInit() and SystemCoreClockUpdate() with an arbitratry ARM Cortex-A9.