LSE bypass implemented on STM32F1xx.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10110 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
4140ae5815
commit
3c720a3327
|
@ -66,7 +66,13 @@ static void hal_lld_backup_domain_init(void) {
|
||||||
|
|
||||||
/* If enabled then the LSE is started.*/
|
/* If enabled then the LSE is started.*/
|
||||||
#if STM32_LSE_ENABLED
|
#if STM32_LSE_ENABLED
|
||||||
|
#if defined(STM32_LSE_BYPASS)
|
||||||
|
/* LSE Bypass.*/
|
||||||
|
RCC->BDCR |= RCC_BDCR_LSEON | RCC_BDCR_LSEBYP;
|
||||||
|
#else
|
||||||
|
/* No LSE Bypass.*/
|
||||||
RCC->BDCR |= RCC_BDCR_LSEON;
|
RCC->BDCR |= RCC_BDCR_LSEON;
|
||||||
|
#endif
|
||||||
while ((RCC->BDCR & RCC_BDCR_LSERDY) == 0)
|
while ((RCC->BDCR & RCC_BDCR_LSERDY) == 0)
|
||||||
; /* Waits until LSE is stable. */
|
; /* Waits until LSE is stable. */
|
||||||
#endif /* STM32_LSE_ENABLED */
|
#endif /* STM32_LSE_ENABLED */
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
* @pre This module requires the following macros to be defined in the
|
* @pre This module requires the following macros to be defined in the
|
||||||
* @p board.h file:
|
* @p board.h file:
|
||||||
* - STM32_LSECLK.
|
* - STM32_LSECLK.
|
||||||
|
* - STM32_LSE_BYPASS (optionally).
|
||||||
* - STM32_HSECLK.
|
* - STM32_HSECLK.
|
||||||
* - STM32_HSE_BYPASS (optionally).
|
* - STM32_HSE_BYPASS (optionally).
|
||||||
* .
|
* .
|
||||||
|
|
Loading…
Reference in New Issue