Added an HSE bypass option to the STM32 clock initialization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4157 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
8ed6a8d9e3
commit
ad8290460d
|
@ -215,6 +215,10 @@ void stm32_clock_init(void) {
|
||||||
; /* Wait until HSI is the source.*/
|
; /* Wait until HSI is the source.*/
|
||||||
|
|
||||||
#if STM32_HSE_ENABLED
|
#if STM32_HSE_ENABLED
|
||||||
|
#if defined(STM32_HSE_BYPASS)
|
||||||
|
/* HSE Bypass.*/
|
||||||
|
RCC->CR |= RCC_CR_HSEBYP;
|
||||||
|
#endif
|
||||||
/* HSE activation.*/
|
/* HSE activation.*/
|
||||||
RCC->CR |= RCC_CR_HSEON;
|
RCC->CR |= RCC_CR_HSEON;
|
||||||
while (!(RCC->CR & RCC_CR_HSERDY))
|
while (!(RCC->CR & RCC_CR_HSERDY))
|
||||||
|
|
|
@ -149,6 +149,10 @@ void stm32_clock_init(void) {
|
||||||
; /* Waits until HSI is stable. */
|
; /* Waits until HSI is stable. */
|
||||||
|
|
||||||
#if STM32_HSE_ENABLED
|
#if STM32_HSE_ENABLED
|
||||||
|
#if defined(STM32_HSE_BYPASS)
|
||||||
|
/* HSE Bypass.*/
|
||||||
|
RCC->CR |= RCC_CR_HSEBYP;
|
||||||
|
#endif
|
||||||
/* HSE activation.*/
|
/* HSE activation.*/
|
||||||
RCC->CR |= RCC_CR_HSEON;
|
RCC->CR |= RCC_CR_HSEON;
|
||||||
while ((RCC->CR & RCC_CR_HSERDY) == 0)
|
while ((RCC->CR & RCC_CR_HSERDY) == 0)
|
||||||
|
|
|
@ -151,6 +151,10 @@ void stm32_clock_init(void) {
|
||||||
; /* Waits until HSI is stable. */
|
; /* Waits until HSI is stable. */
|
||||||
|
|
||||||
#if STM32_HSE_ENABLED
|
#if STM32_HSE_ENABLED
|
||||||
|
#if defined(STM32_HSE_BYPASS)
|
||||||
|
/* HSE Bypass.*/
|
||||||
|
RCC->CR |= RCC_CR_HSEBYP;
|
||||||
|
#endif
|
||||||
/* HSE activation.*/
|
/* HSE activation.*/
|
||||||
RCC->CR |= RCC_CR_HSEON;
|
RCC->CR |= RCC_CR_HSEON;
|
||||||
while ((RCC->CR & RCC_CR_HSERDY) == 0)
|
while ((RCC->CR & RCC_CR_HSERDY) == 0)
|
||||||
|
|
|
@ -165,6 +165,10 @@ void stm32_clock_init(void) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if STM32_HSE_ENABLED
|
#if STM32_HSE_ENABLED
|
||||||
|
#if defined(STM32_HSE_BYPASS)
|
||||||
|
/* HSE Bypass.*/
|
||||||
|
RCC->CR |= RCC_CR_HSEBYP;
|
||||||
|
#endif
|
||||||
/* HSE activation.*/
|
/* HSE activation.*/
|
||||||
RCC->CR |= RCC_CR_HSEON;
|
RCC->CR |= RCC_CR_HSEON;
|
||||||
while ((RCC->CR & RCC_CR_HSERDY) == 0)
|
while ((RCC->CR & RCC_CR_HSERDY) == 0)
|
||||||
|
|
|
@ -117,6 +117,9 @@
|
||||||
3484947)(backported to 2.4.1).
|
3484947)(backported to 2.4.1).
|
||||||
- FIX: Fixed various minor documentation errors (bug 3484942)(backported
|
- FIX: Fixed various minor documentation errors (bug 3484942)(backported
|
||||||
to 2.4.1).
|
to 2.4.1).
|
||||||
|
- NEW: Added HSE oscillator bypass capability to the STM32 clock
|
||||||
|
initialization, it is enabled by adding STM32_HSE_BYPASS to your
|
||||||
|
board.h file.
|
||||||
- NEW: Updated the MSP port to work with the latest MSPGCC compiler (4.6.3
|
- NEW: Updated the MSP port to work with the latest MSPGCC compiler (4.6.3
|
||||||
LTS 20120406 unpatched), now the old MSPGCC 3.2.3 is no more supported
|
LTS 20120406 unpatched), now the old MSPGCC 3.2.3 is no more supported
|
||||||
(backported to 2.4.1).
|
(backported to 2.4.1).
|
||||||
|
|
Loading…
Reference in New Issue