mirror of https://github.com/rusefi/ChibiOS.git
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6436 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
3693a12c72
commit
3c0d502601
|
@ -62,10 +62,10 @@ static void hal_lld_backup_domain_init(void) {
|
|||
#if STM32_LSE_ENABLED
|
||||
#if defined(STM32_LSE_BYPASS)
|
||||
/* LSE Bypass.*/
|
||||
RCC->BDCR = STM32_LSEDRV | RCC_BDCR_LSEON | RCC_BDCR_LSEBYP;
|
||||
RCC->BDCR |= STM32_LSEDRV | RCC_BDCR_LSEON | RCC_BDCR_LSEBYP;
|
||||
#else
|
||||
/* No LSE Bypass.*/
|
||||
RCC->BDCR = STM32_LSEDRV | RCC_BDCR_LSEON;
|
||||
RCC->BDCR |= STM32_LSEDRV | RCC_BDCR_LSEON;
|
||||
#endif
|
||||
while ((RCC->BDCR & RCC_BDCR_LSERDY) == 0)
|
||||
; /* Waits until LSE is stable. */
|
||||
|
|
|
@ -62,10 +62,10 @@ static void hal_lld_backup_domain_init(void) {
|
|||
#if STM32_LSE_ENABLED
|
||||
#if defined(STM32_LSE_BYPASS)
|
||||
/* LSE Bypass.*/
|
||||
RCC->BDCR = STM32_LSEDRV | RCC_BDCR_LSEON | RCC_BDCR_LSEBYP;
|
||||
RCC->BDCR |= STM32_LSEDRV | RCC_BDCR_LSEON | RCC_BDCR_LSEBYP;
|
||||
#else
|
||||
/* No LSE Bypass.*/
|
||||
RCC->BDCR = STM32_LSEDRV | RCC_BDCR_LSEON;
|
||||
RCC->BDCR |= STM32_LSEDRV | RCC_BDCR_LSEON;
|
||||
#endif
|
||||
while ((RCC->BDCR & RCC_BDCR_LSERDY) == 0)
|
||||
; /* Waits until LSE is stable. */
|
||||
|
|
|
@ -62,10 +62,10 @@ static void hal_lld_backup_domain_init(void) {
|
|||
#if STM32_LSE_ENABLED
|
||||
#if defined(STM32_LSE_BYPASS)
|
||||
/* LSE Bypass.*/
|
||||
RCC->BDCR = STM32_LSEDRV | RCC_BDCR_LSEON | RCC_BDCR_LSEBYP;
|
||||
RCC->BDCR |= STM32_LSEDRV | RCC_BDCR_LSEON | RCC_BDCR_LSEBYP;
|
||||
#else
|
||||
/* No LSE Bypass.*/
|
||||
RCC->BDCR = STM32_LSEDRV | RCC_BDCR_LSEON;
|
||||
RCC->BDCR |= STM32_LSEDRV | RCC_BDCR_LSEON;
|
||||
#endif
|
||||
while ((RCC->BDCR & RCC_BDCR_LSERDY) == 0)
|
||||
; /* Waits until LSE is stable. */
|
||||
|
|
|
@ -61,7 +61,13 @@ static void hal_lld_backup_domain_init(void) {
|
|||
}
|
||||
|
||||
#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;
|
||||
#endif
|
||||
while ((RCC->BDCR & RCC_BDCR_LSERDY) == 0)
|
||||
; /* Waits until LSE is stable. */
|
||||
#endif
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
* @pre This module requires the following macros to be defined in the
|
||||
* @p board.h file:
|
||||
* - STM32_LSECLK.
|
||||
* - STM32_LSEDRV.
|
||||
* - STM32_LSE_BYPASS (optionally).
|
||||
* - STM32_HSECLK.
|
||||
* - STM32_HSE_BYPASS (optionally).
|
||||
|
|
Loading…
Reference in New Issue