git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3756 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
7b14ebcc5f
commit
0a3c31495e
|
@ -109,7 +109,7 @@ void rtc_lld_init(void){
|
||||||
preload |= ((RTC_CLK / (PREDIV_A + 1)) - 1) & 0x7FFF;
|
preload |= ((RTC_CLK / (PREDIV_A + 1)) - 1) & 0x7FFF;
|
||||||
|
|
||||||
/* Selects clock source (previously enabled and stabilized).*/
|
/* Selects clock source (previously enabled and stabilized).*/
|
||||||
RCC->BDCR = (RCC->BDCR & ~RCC_BDCR_RTCSEL) | STM32_RTC;
|
RCC->BDCR = (RCC->BDCR & ~RCC_BDCR_RTCSEL) | STM32_RTCSEL;
|
||||||
|
|
||||||
/* RTC enabled regardless its previous status.*/
|
/* RTC enabled regardless its previous status.*/
|
||||||
RCC->BDCR |= RCC_BDCR_RTCEN;
|
RCC->BDCR |= RCC_BDCR_RTCEN;
|
||||||
|
|
|
@ -40,11 +40,13 @@
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This RTC implementation supports callbacks.
|
* @brief This RTC implementation doesn't support callbacks.
|
||||||
*/
|
*/
|
||||||
#if !defined(RTC_SUPPORTS_CALLBACKS) || defined(__DOXYGEN__)
|
|
||||||
#define RTC_SUPPORTS_CALLBACKS FALSE
|
#define RTC_SUPPORTS_CALLBACKS FALSE
|
||||||
#endif
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Driver constants. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Two alarm comparators available on STM32F4x.
|
* @brief Two alarm comparators available on STM32F4x.
|
||||||
|
@ -71,8 +73,9 @@
|
||||||
#error "RTC not present in the selected device"
|
#error "RTC not present in the selected device"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !(STM32_RTC == STM32_RTC_LSE) && !(STM32_RTC == STM32_RTC_LSI) && \
|
#if !(STM32_RTCSEL == STM32_RTCSEL_LSE) && \
|
||||||
!(STM32_RTC == STM32_RTC_HSE)
|
!(STM32_RTCSEL == STM32_RTCSEL_LSI) && \
|
||||||
|
!(STM32_RTCSEL == STM32_RTCSEL_HSEDIV)
|
||||||
#error "invalid source selected for RTC clock"
|
#error "invalid source selected for RTC clock"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue