RTCv1. Fixed unneded RTC initialization when HAL_USE_RTC disabled (bug 3594620).

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.4.x@4898 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
barthess 2012-12-10 19:57:27 +00:00
parent 20f8a2227c
commit adb2d621c4
2 changed files with 7 additions and 6 deletions

View File

@ -58,6 +58,7 @@ static void hal_lld_backup_domain_init(void) {
/* Backup domain access enabled and left open.*/
PWR->CR |= PWR_CR_DBP;
#if HAL_USE_RTC
/* Reset BKP domain if different clock source selected.*/
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL){
/* Backup domain reset.*/
@ -70,7 +71,7 @@ static void hal_lld_backup_domain_init(void) {
RCC->BDCR |= RCC_BDCR_LSEON;
while ((RCC->BDCR & RCC_BDCR_LSERDY) == 0)
; /* Waits until LSE is stable. */
#endif
#endif /* STM32_LSE_ENABLED */
#if STM32_RTCSEL != STM32_RTCSEL_NOCLOCK
/* If the backup domain hasn't been initialized yet then proceed with
@ -83,11 +84,10 @@ static void hal_lld_backup_domain_init(void) {
RCC->BDCR |= RCC_BDCR_RTCEN;
/* Prescaler value loaded in registers.*/
#if HAL_USE_RTC
rtc_lld_set_prescaler();
#endif /* HAL_USE_RTC */
}
#endif /* STM32_RTCSEL != STM32_RTCSEL_NOCLOCK */
#endif /* HAL_USE_RTC */
}
/*===========================================================================*/

View File

@ -79,9 +79,10 @@
*****************************************************************************
*** 2.4.3 ***
- FIX: Compilation issue with HAL_USE_RTC disabled (bug 3594083)
- FIX: Wasting of BKP registers in RTCv1 driver (bug 3594005)
- FIX: Potential problem with RTC_CRL_RSF bit (bug 3593972)
- FIX: Unneded RTC initialization when HAL_USE_RTC disabled (bug 3594620).
- FIX: Compilation issue with HAL_USE_RTC disabled (bug 3594083).
- FIX: Wasting of BKP registers in RTCv1 driver (bug 3594005).
- FIX: Potential problem with RTC_CRL_RSF bit (bug 3593972).
- FIX: Fixed wrong stack initializations in GCC STM32L1xx port files (bug
3591321).
- FIX: Fixed different redefinition for __main_stack_end__ symbol (bug